Sprout from master 2008-03-07 07:44:13 UTC jfa <jfa@opencascade.com> 'Join modifications from BR_Dev_For_4_0 tag V4_1_1.'
Delete:
AUTHORS
COPYING
ChangeLog
GUI_version.h.in
INSTALL
LICENCE
Makefile.am
NEWS
README
adm_local/Makefile.am
adm_local/unix/Makefile.am
adm_local/unix/config_files/Makefile.am
adm_local/unix/config_files/README
adm_local/unix/config_files/check_GLViewer.m4
adm_local/unix/config_files/check_GUI.m4
adm_local/unix/config_files/check_OCCViewer.m4
adm_local/unix/config_files/check_Plot2dViewer.m4
adm_local/unix/config_files/check_PyConsole.m4
adm_local/unix/config_files/check_QxGraphViewer.m4
adm_local/unix/config_files/check_SalomeObject.m4
adm_local/unix/config_files/check_SupervGraphViewer.m4
adm_local/unix/config_files/check_VTKViewer.m4
adm_local/unix/config_files/check_corba_in_GUI.m4
adm_local/unix/config_files/check_disable_Corba.m4
adm_local/unix/config_files/check_msg2qm.m4
adm_local/unix/config_files/check_opengl.m4
adm_local/unix/config_files/check_pyqt.m4
adm_local/unix/config_files/check_qt.m4
adm_local/unix/config_files/check_qwt.m4
adm_local/unix/config_files/check_sip.m4
adm_local/unix/config_files/check_vtk.m4
adm_local/unix/make_common_starter.am
adm_local/unix/make_conclude.in
bin/Makefile.am
bin/VERSION.in
bin/runLightSalome.csh
bin/runLightSalome.sh
build_configure
clean_configure
configure.ac
doc/Makefile.am
doc/salome/Makefile.am
doc/salome/gui/GUI/doxyfile.in
doc/salome/gui/GUI/images/batchmode.png
doc/salome/gui/GUI/images/cataloggenerator.png
doc/salome/gui/GUI/images/choicepage.png
doc/salome/gui/GUI/images/clipping.png
doc/salome/gui/GUI/images/closestudy.png
doc/salome/gui/GUI/images/copy-paste.jpg
doc/salome/gui/GUI/images/dumpstudy.png
doc/salome/gui/GUI/images/geomview-alt.png
doc/salome/gui/GUI/images/graduatedaxes1.png
doc/salome/gui/GUI/images/icon_about.png
doc/salome/gui/GUI/images/image100.gif
doc/salome/gui/GUI/images/image102.gif
doc/salome/gui/GUI/images/image103.gif
doc/salome/gui/GUI/images/image105.gif
doc/salome/gui/GUI/images/image106.gif
doc/salome/gui/GUI/images/image108.gif
doc/salome/gui/GUI/images/image109.gif
doc/salome/gui/GUI/images/image157.gif
doc/salome/gui/GUI/images/image54.jpg
doc/salome/gui/GUI/images/image65.gif
doc/salome/gui/GUI/images/image67.gif
doc/salome/gui/GUI/images/image69.gif
doc/salome/gui/GUI/images/image70.gif
doc/salome/gui/GUI/images/image72.gif
doc/salome/gui/GUI/images/image73.gif
doc/salome/gui/GUI/images/image75.gif
doc/salome/gui/GUI/images/image77.gif
doc/salome/gui/GUI/images/image86.gif
doc/salome/gui/GUI/images/image88.gif
doc/salome/gui/GUI/images/image89.gif
doc/salome/gui/GUI/images/image91.gif
doc/salome/gui/GUI/images/image94.gif
doc/salome/gui/GUI/images/image95.gif
doc/salome/gui/GUI/images/image96.gif
doc/salome/gui/GUI/images/image97.gif
doc/salome/gui/GUI/images/image98.gif
doc/salome/gui/GUI/images/image99.gif
doc/salome/gui/GUI/images/import.png
doc/salome/gui/GUI/images/intropage.png
doc/salome/gui/GUI/images/loadscript.png
doc/salome/gui/GUI/images/loadstudy2.png
doc/salome/gui/GUI/images/lockedstudy.png
doc/salome/gui/GUI/images/neo-view2.png
doc/salome/gui/GUI/images/newsticn.jpg
doc/salome/gui/GUI/images/note1.gif
doc/salome/gui/GUI/images/objectbrowser1.png
doc/salome/gui/GUI/images/objectbrowser2.png
doc/salome/gui/GUI/images/open.jpg
doc/salome/gui/GUI/images/plot2d_clone.gif
doc/salome/gui/GUI/images/plot2d_legend.gif
doc/salome/gui/GUI/images/plot2d_lines.gif
doc/salome/gui/GUI/images/plot2d_logarithmic_horizontal.gif
doc/salome/gui/GUI/images/plot2d_logarithmic_vertical.gif
doc/salome/gui/GUI/images/plot2d_points.gif
doc/salome/gui/GUI/images/plot2d_settings.gif
doc/salome/gui/GUI/images/plot2d_splines.gif
doc/salome/gui/GUI/images/plot2d_view_settings.png
doc/salome/gui/GUI/images/ppref1.png
doc/salome/gui/GUI/images/ppref2.png
doc/salome/gui/GUI/images/ppref3.png
doc/salome/gui/GUI/images/pref11.png
doc/salome/gui/GUI/images/pref12.png
doc/salome/gui/GUI/images/pref13.png
doc/salome/gui/GUI/images/pref14.png
doc/salome/gui/GUI/images/pref15.png
doc/salome/gui/GUI/images/pref21.png
doc/salome/gui/GUI/images/pref22.png
doc/salome/gui/GUI/images/pref23.png
doc/salome/gui/GUI/images/pref24.png
doc/salome/gui/GUI/images/pref31.png
doc/salome/gui/GUI/images/pref33.png
doc/salome/gui/GUI/images/pref34.png
doc/salome/gui/GUI/images/pref37.png
doc/salome/gui/GUI/images/pref38.png
doc/salome/gui/GUI/images/pref39.png
doc/salome/gui/GUI/images/pref40.png
doc/salome/gui/GUI/images/productpage.png
doc/salome/gui/GUI/images/productpage1.png
doc/salome/gui/GUI/images/productpage2.png
doc/salome/gui/GUI/images/progresspage.png
doc/salome/gui/GUI/images/progresspage1.png
doc/salome/gui/GUI/images/readmepage.png
doc/salome/gui/GUI/images/registry1.png
doc/salome/gui/GUI/images/registry3.png
doc/salome/gui/GUI/images/registry4.png
doc/salome/gui/GUI/images/save.jpg
doc/salome/gui/GUI/images/selectcolor.png
doc/salome/gui/GUI/images/selectfont.png
doc/salome/gui/GUI/images/set_rotation_point_dialog1.png
doc/salome/gui/GUI/images/set_rotation_point_dialog2.png
doc/salome/gui/GUI/images/studyproperties.png
doc/salome/gui/GUI/images/updaterate.png
doc/salome/gui/GUI/images/urbutton.png
doc/salome/gui/GUI/images/view2.png
doc/salome/gui/GUI/images/view_rotation_point.png
doc/salome/gui/GUI/input/about_salome.doc
doc/salome/gui/GUI/input/creating_new_study.doc
doc/salome/gui/GUI/input/displaying_studies.doc
doc/salome/gui/GUI/input/editing_studies.doc
doc/salome/gui/GUI/input/geometry_preferences.doc
doc/salome/gui/GUI/input/getting_started.doc
doc/salome/gui/GUI/input/gui_module_chapter.doc
doc/salome/gui/GUI/input/index.doc
doc/salome/gui/GUI/input/installing_salome.doc
doc/salome/gui/GUI/input/intro_to_salome.doc
doc/salome/gui/GUI/input/introduction.doc
doc/salome/gui/GUI/input/introduction_to_gui.doc
doc/salome/gui/GUI/input/mesh_preferences.doc
doc/salome/gui/GUI/input/occ_3d_viewer.doc
doc/salome/gui/GUI/input/opening_studies.doc
doc/salome/gui/GUI/input/plot2d_viewer.doc
doc/salome/gui/GUI/input/postpro_preferences.doc
doc/salome/gui/GUI/input/running_salome.doc
doc/salome/gui/GUI/input/salome_architecture.doc
doc/salome/gui/GUI/input/salome_desktop.doc
doc/salome/gui/GUI/input/salome_preferences.doc
doc/salome/gui/GUI/input/saving_and_closing_studies.doc
doc/salome/gui/GUI/input/select_color_and_font.doc
doc/salome/gui/GUI/input/setting_preferences.doc
doc/salome/gui/GUI/input/setting_preferences_chapter.doc
doc/salome/gui/GUI/input/setting_study_properties.doc
doc/salome/gui/GUI/input/study_management_chapter.doc
doc/salome/gui/GUI/input/using_catalog_generator.doc
doc/salome/gui/GUI/input/using_object_browser.doc
doc/salome/gui/GUI/input/using_registry_tool.doc
doc/salome/gui/GUI/input/viewers_chapter.doc
doc/salome/gui/GUI/input/vtk_3d_viewer.doc
doc/salome/gui/GUI/input/working_with_python_scripts.doc
doc/salome/gui/GUI/kernel/about_salome_pro_architecture.htm
doc/salome/gui/GUI/kernel/about_salome_pro_help_system.htm
doc/salome/gui/GUI/kernel/application.png
doc/salome/gui/GUI/kernel/batchmode.png
doc/salome/gui/GUI/kernel/choicepage.png
doc/salome/gui/GUI/kernel/creating_a_new_study.htm
doc/salome/gui/GUI/kernel/displaying_studies.htm
doc/salome/gui/GUI/kernel/editing_studies.htm
doc/salome/gui/GUI/kernel/getting_properties_of_the_study.htm
doc/salome/gui/GUI/kernel/getting_started2.htm
doc/salome/gui/GUI/kernel/introduction.bak
doc/salome/gui/GUI/kernel/introduction.htm
doc/salome/gui/GUI/kernel/introduction_to_salome_pro.htm
doc/salome/gui/GUI/kernel/intropage.png
doc/salome/gui/GUI/kernel/logocorp.png
doc/salome/gui/GUI/kernel/navigating_topics.htm
doc/salome/gui/GUI/kernel/opening_studies.htm
doc/salome/gui/GUI/kernel/productpage.png
doc/salome/gui/GUI/kernel/productpage1.png
doc/salome/gui/GUI/kernel/productpage2.png
doc/salome/gui/GUI/kernel/progresspage.png
doc/salome/gui/GUI/kernel/progresspage1.png
doc/salome/gui/GUI/kernel/readme.html
doc/salome/gui/GUI/kernel/readmepage.png
doc/salome/gui/GUI/kernel/running_salome_pro.htm
doc/salome/gui/GUI/kernel/salome_pro_desktop.htm
doc/salome/gui/GUI/kernel/saving_a_study.htm
doc/salome/gui/GUI/kernel/setting_preferences.htm
doc/salome/gui/GUI/kernel/using_catalog_generator.htm
doc/salome/gui/GUI/kernel/using_left-hand_tabs.htm
doc/salome/gui/GUI/kernel/using_object_browser.htm
doc/salome/gui/GUI/kernel/using_registry.htm
doc/salome/gui/GUI/pics/cataloggenerator.png
doc/salome/gui/GUI/pics/choicepage.png
doc/salome/gui/GUI/pics/clipping.png
doc/salome/gui/GUI/pics/copy-paste.jpg
doc/salome/gui/GUI/pics/dumpstudy.png
doc/salome/gui/GUI/pics/exemple.gif
doc/salome/gui/GUI/pics/geomview-alt.png
doc/salome/gui/GUI/pics/graduatedaxes1.png
doc/salome/gui/GUI/pics/icon_about.png
doc/salome/gui/GUI/pics/image100.gif
doc/salome/gui/GUI/pics/image102.gif
doc/salome/gui/GUI/pics/image103.gif
doc/salome/gui/GUI/pics/image105.gif
doc/salome/gui/GUI/pics/image106.gif
doc/salome/gui/GUI/pics/image108.gif
doc/salome/gui/GUI/pics/image109.gif
doc/salome/gui/GUI/pics/image157.gif
doc/salome/gui/GUI/pics/image77.gif
doc/salome/gui/GUI/pics/image86.gif
doc/salome/gui/GUI/pics/image88.gif
doc/salome/gui/GUI/pics/image89.gif
doc/salome/gui/GUI/pics/image91.gif
doc/salome/gui/GUI/pics/image95.gif
doc/salome/gui/GUI/pics/image96.gif
doc/salome/gui/GUI/pics/image97.gif
doc/salome/gui/GUI/pics/image98.gif
doc/salome/gui/GUI/pics/image99.gif
doc/salome/gui/GUI/pics/import.png
doc/salome/gui/GUI/pics/intropage.png
doc/salome/gui/GUI/pics/launch1.png
doc/salome/gui/GUI/pics/loadscript.png
doc/salome/gui/GUI/pics/loadstudy2.png
doc/salome/gui/GUI/pics/lockedstudy.png
doc/salome/gui/GUI/pics/neo-view2.png
doc/salome/gui/GUI/pics/newsticn.jpg
doc/salome/gui/GUI/pics/objectbrowser1.png
doc/salome/gui/GUI/pics/objectbrowser2.png
doc/salome/gui/GUI/pics/open.jpg
doc/salome/gui/GUI/pics/ppref1.png
doc/salome/gui/GUI/pics/ppref2.png
doc/salome/gui/GUI/pics/ppref3.png
doc/salome/gui/GUI/pics/pref11.png
doc/salome/gui/GUI/pics/pref12.png
doc/salome/gui/GUI/pics/pref13.png
doc/salome/gui/GUI/pics/pref14.png
doc/salome/gui/GUI/pics/pref15.png
doc/salome/gui/GUI/pics/pref21.png
doc/salome/gui/GUI/pics/pref22.png
doc/salome/gui/GUI/pics/pref23.png
doc/salome/gui/GUI/pics/pref24.png
doc/salome/gui/GUI/pics/pref31.png
doc/salome/gui/GUI/pics/pref32.png
doc/salome/gui/GUI/pics/pref33.png
doc/salome/gui/GUI/pics/pref34.png
doc/salome/gui/GUI/pics/pref37.png
doc/salome/gui/GUI/pics/pref38.png
doc/salome/gui/GUI/pics/pref39.png
doc/salome/gui/GUI/pics/productpage.png
doc/salome/gui/GUI/pics/progresspage.png
doc/salome/gui/GUI/pics/readmepage.png
doc/salome/gui/GUI/pics/registry1.png
doc/salome/gui/GUI/pics/registry3.png
doc/salome/gui/GUI/pics/registry4.png
doc/salome/gui/GUI/pics/save.jpg
doc/salome/gui/GUI/pics/selectcolor.png
doc/salome/gui/GUI/pics/selectfont.png
doc/salome/gui/GUI/pics/set_rotation_point_dialog1.png
doc/salome/gui/GUI/pics/set_rotation_point_dialog2.png
doc/salome/gui/GUI/pics/studyproperties.png
doc/salome/gui/GUI/pics/view2.png
doc/salome/gui/GUI/pics/view_rotation_point.png
doc/salome/gui/GUI/static/footer.html
doc/salome/gui/GUI/static/header.html
doc/salome/gui/GUI/whdata/whftdata.js
doc/salome/gui/GUI/whdata/whftdata0.htm
doc/salome/gui/GUI/whdata/whfts.htm
doc/salome/gui/GUI/whdata/whfts.js
doc/salome/gui/GUI/whdata/whfwdata.js
doc/salome/gui/GUI/whdata/whfwdata0.htm
doc/salome/gui/GUI/whdata/whgdata.js
doc/salome/gui/GUI/whdata/whgdata0.htm
doc/salome/gui/GUI/whdata/whglo.htm
doc/salome/gui/GUI/whdata/whglo.js
doc/salome/gui/GUI/whdata/whidata.js
doc/salome/gui/GUI/whdata/whidx.htm
doc/salome/gui/GUI/whdata/whidx.js
doc/salome/gui/GUI/whdata/whtdata.js
doc/salome/gui/GUI/whdata/whtdata0.htm
doc/salome/gui/GUI/whdata/whtoc.htm
doc/salome/gui/GUI/whdata/whtoc.js
doc/salome/gui/GUI/whgdata/whexpbar.gif
doc/salome/gui/GUI/whgdata/whlstf0.htm
doc/salome/gui/GUI/whgdata/whlstf1.htm
doc/salome/gui/GUI/whgdata/whlstf10.htm
doc/salome/gui/GUI/whgdata/whlstf11.htm
doc/salome/gui/GUI/whgdata/whlstf2.htm
doc/salome/gui/GUI/whgdata/whlstf3.htm
doc/salome/gui/GUI/whgdata/whlstf4.htm
doc/salome/gui/GUI/whgdata/whlstf5.htm
doc/salome/gui/GUI/whgdata/whlstf6.htm
doc/salome/gui/GUI/whgdata/whlstf7.htm
doc/salome/gui/GUI/whgdata/whlstf8.htm
doc/salome/gui/GUI/whgdata/whlstf9.htm
doc/salome/gui/GUI/whgdata/whlstfl0.htm
doc/salome/gui/GUI/whgdata/whlstfl1.htm
doc/salome/gui/GUI/whgdata/whlstfl10.htm
doc/salome/gui/GUI/whgdata/whlstfl11.htm
doc/salome/gui/GUI/whgdata/whlstfl12.htm
doc/salome/gui/GUI/whgdata/whlstfl13.htm
doc/salome/gui/GUI/whgdata/whlstfl14.htm
doc/salome/gui/GUI/whgdata/whlstfl15.htm
doc/salome/gui/GUI/whgdata/whlstfl16.htm
doc/salome/gui/GUI/whgdata/whlstfl17.htm
doc/salome/gui/GUI/whgdata/whlstfl18.htm
doc/salome/gui/GUI/whgdata/whlstfl19.htm
doc/salome/gui/GUI/whgdata/whlstfl2.htm
doc/salome/gui/GUI/whgdata/whlstfl20.htm
doc/salome/gui/GUI/whgdata/whlstfl21.htm
doc/salome/gui/GUI/whgdata/whlstfl22.htm
doc/salome/gui/GUI/whgdata/whlstfl23.htm
doc/salome/gui/GUI/whgdata/whlstfl24.htm
doc/salome/gui/GUI/whgdata/whlstfl25.htm
doc/salome/gui/GUI/whgdata/whlstfl26.htm
doc/salome/gui/GUI/whgdata/whlstfl3.htm
doc/salome/gui/GUI/whgdata/whlstfl4.htm
doc/salome/gui/GUI/whgdata/whlstfl5.htm
doc/salome/gui/GUI/whgdata/whlstfl6.htm
doc/salome/gui/GUI/whgdata/whlstfl7.htm
doc/salome/gui/GUI/whgdata/whlstfl8.htm
doc/salome/gui/GUI/whgdata/whlstfl9.htm
doc/salome/gui/GUI/whgdata/whlstg0.htm
doc/salome/gui/GUI/whgdata/whlsti0.htm
doc/salome/gui/GUI/whgdata/whlstt0.htm
doc/salome/gui/GUI/whgdata/whlstt1.htm
doc/salome/gui/GUI/whgdata/whlstt2.htm
doc/salome/gui/GUI/whgdata/whlstt3.htm
doc/salome/gui/GUI/whgdata/whlstt4.htm
doc/salome/gui/GUI/whgdata/whlstt5.htm
doc/salome/gui/GUI/whgdata/whnvf30.htm
doc/salome/gui/GUI/whgdata/whnvf31.htm
doc/salome/gui/GUI/whgdata/whnvf32.htm
doc/salome/gui/GUI/whgdata/whnvf33.htm
doc/salome/gui/GUI/whgdata/whnvl31.htm
doc/salome/gui/GUI/whgdata/whnvl32.htm
doc/salome/gui/GUI/whgdata/whnvl33.htm
doc/salome/gui/GUI/whgdata/whnvp30.htm
doc/salome/gui/GUI/whgdata/whnvp31.htm
doc/salome/gui/GUI/whgdata/whnvp32.htm
doc/salome/gui/GUI/whgdata/whnvp33.htm
doc/salome/gui/GUI/whgdata/whnvt30.htm
doc/salome/gui/GUI/whgdata/whnvt31.htm
doc/salome/gui/GUI/whgdata/whnvt32.htm
doc/salome/gui/GUI/whgdata/whnvt33.htm
doc/salome/gui/GUI/whxdata/whftdata0.xml
doc/salome/gui/GUI/whxdata/whfts.xml
doc/salome/gui/GUI/whxdata/whfwdata0.xml
doc/salome/gui/GUI/whxdata/whgdata0.xml
doc/salome/gui/GUI/whxdata/whglo.xml
doc/salome/gui/GUI/whxdata/whidx.xml
doc/salome/gui/GUI/whxdata/whtdata0.xml
doc/salome/gui/GUI/whxdata/whtoc.xml
doc/salome/gui/Makefile.am
doc/salome/tui/GUI/doxyfile.in
doc/salome/tui/GUI/sources/Application-About.png
doc/salome/tui/GUI/sources/application.gif
doc/salome/tui/GUI/sources/doxygen.css
doc/salome/tui/GUI/sources/footer.html
doc/salome/tui/GUI/sources/html_comments.gif
doc/salome/tui/GUI/sources/logocorp.gif
doc/salome/tui/GUI/sources/myheader.html
doc/salome/tui/Makefile.am
idl/Makefile.am
idl/SalomeApp_Engine.idl
resources/Makefile.am
resources/Tools_en.xml
resources/Tools_fr.xml
resources/back.xpm
resources/cascade.png
resources/channel.cfg
resources/close.png
resources/copy.png
resources/default.png
resources/dl_delete.png
resources/dl_insert.png
resources/dl_movedown.png
resources/dl_moveup.png
resources/forward.xpm
resources/help.png
resources/home.xpm
resources/new.png
resources/open.png
resources/paste.png
resources/plot2d_dump.png
resources/plot2d_fitall.png
resources/plot2d_fitarea.png
resources/plot2d_legend.png
resources/plot2d_linear.png
resources/plot2d_linear_y.png
resources/plot2d_lines.png
resources/plot2d_log.png
resources/plot2d_log_y.png
resources/plot2d_pan.png
resources/plot2d_points.png
resources/plot2d_settings.png
resources/plot2d_splines.png
resources/plot2d_zoom.png
resources/print.png
resources/reset.png
resources/save.png
resources/select1.png
resources/tile.png
resources/uc_add.png
resources/uc_clear.png
resources/uc_current.png
resources/uc_del.png
resources/uc_new.png
resources/view_back.png
resources/view_bottom.png
resources/view_camera_dump.png
resources/view_fitall.png
resources/view_fitarea.png
resources/view_front.png
resources/view_glpan.png
resources/view_left.png
resources/view_pan.png
resources/view_reset.png
resources/view_right.png
resources/view_rotate.png
resources/view_top.png
resources/view_triedre.png
resources/view_zoom.png
src/CAF/Makefile.am
src/CAF/resources/redo.png
src/CAF/resources/undo.png
src/CAM/CAM.h
src/CAM/CAM_Application.cxx
src/CAM/CAM_Application.h
src/CAM/CAM_DataModel.cxx
src/CAM/CAM_DataModel.h
src/CAM/CAM_DataObject.cxx
src/CAM/CAM_DataObject.h
src/CAM/CAM_Module.cxx
src/CAM/CAM_Module.h
src/CAM/CAM_RootObject.cxx
src/CAM/CAM_RootObject.h
src/CAM/CAM_Study.cxx
src/CAM/CAM_Study.h
src/CAM/Makefile.am
src/CAM/resources/CAM_msg_en.po
src/CASCatch/CASCatch.hxx
src/CASCatch/CASCatch_CatchSignals.cxx
src/CASCatch/CASCatch_CatchSignals.hxx
src/CASCatch/CASCatch_ErrorHandler.cxx
src/CASCatch/CASCatch_ErrorHandler.hxx
src/CASCatch/CASCatch_Failure.cxx
src/CASCatch/CASCatch_Failure.hxx
src/CASCatch/Makefile.am
src/DDS/DDS.h
src/DDS/DDS_DicGroup.cxx
src/DDS/DDS_DicGroup.h
src/DDS/DDS_DicItem.cxx
src/DDS/DDS_DicItem.h
src/DDS/DDS_Dictionary.cxx
src/DDS/DDS_Dictionary.h
src/DDS/DDS_KeyWords.cxx
src/DDS/DDS_KeyWords.h
src/DDS/Makefile.am
src/Event/Event.h
src/Event/Makefile.am
src/Event/SALOME_Event.cxx
src/Event/SALOME_Event.hxx
src/GLViewer/GLViewer.h
src/GLViewer/GLViewer_AspectLine.cxx
src/GLViewer/GLViewer_AspectLine.h
src/GLViewer/GLViewer_BaseDrawers.cxx
src/GLViewer/GLViewer_BaseDrawers.h
src/GLViewer/GLViewer_BaseObjects.cxx
src/GLViewer/GLViewer_BaseObjects.h
src/GLViewer/GLViewer_Compass.cxx
src/GLViewer/GLViewer_Compass.h
src/GLViewer/GLViewer_Context.cxx
src/GLViewer/GLViewer_Context.h
src/GLViewer/GLViewer_CoordSystem.cxx
src/GLViewer/GLViewer_CoordSystem.h
src/GLViewer/GLViewer_Defs.h
src/GLViewer/GLViewer_Drawer.cxx
src/GLViewer/GLViewer_Drawer.h
src/GLViewer/GLViewer_Geom.cxx
src/GLViewer/GLViewer_Geom.h
src/GLViewer/GLViewer_Grid.cxx
src/GLViewer/GLViewer_Grid.h
src/GLViewer/GLViewer_Group.cxx
src/GLViewer/GLViewer_Group.h
src/GLViewer/GLViewer_MimeSource.cxx
src/GLViewer/GLViewer_MimeSource.h
src/GLViewer/GLViewer_Object.cxx
src/GLViewer/GLViewer_Object.h
src/GLViewer/GLViewer_Selector.cxx
src/GLViewer/GLViewer_Selector.h
src/GLViewer/GLViewer_Selector2d.cxx
src/GLViewer/GLViewer_Selector2d.h
src/GLViewer/GLViewer_Text.cxx
src/GLViewer/GLViewer_Text.h
src/GLViewer/GLViewer_ToolTip.cxx
src/GLViewer/GLViewer_ToolTip.h
src/GLViewer/GLViewer_Tools.cxx
src/GLViewer/GLViewer_Tools.h
src/GLViewer/GLViewer_ViewFrame.cxx
src/GLViewer/GLViewer_ViewFrame.h
src/GLViewer/GLViewer_ViewManager.cxx
src/GLViewer/GLViewer_ViewManager.h
src/GLViewer/GLViewer_ViewPort.cxx
src/GLViewer/GLViewer_ViewPort.h
src/GLViewer/GLViewer_ViewPort2d.cxx
src/GLViewer/GLViewer_ViewPort2d.h
src/GLViewer/GLViewer_Viewer.cxx
src/GLViewer/GLViewer_Viewer.h
src/GLViewer/GLViewer_Viewer2d.cxx
src/GLViewer/GLViewer_Viewer2d.h
src/GLViewer/GLViewer_Widget.cxx
src/GLViewer/GLViewer_Widget.h
src/GLViewer/Makefile.am
src/GLViewer/resources/GLViewer_images.po
src/GLViewer/resources/GLViewer_msg_en.po
src/GLViewer/resources/cursor_rotate.png
src/GLViewer/resources/cursor_sketch.png
src/GLViewer/resources/cursor_zoom.png
src/GLViewer/resources/view_dump.png
src/GLViewer/resources/view_fitall.png
src/GLViewer/resources/view_fitarea.png
src/GLViewer/resources/view_fitselect.png
src/GLViewer/resources/view_glpan.png
src/GLViewer/resources/view_pan.png
src/GLViewer/resources/view_reset.png
src/GLViewer/resources/view_zoom.png
src/LightApp/LightApp.h
src/LightApp/LightApp_AboutDlg.cxx
src/LightApp/LightApp_AboutDlg.h
src/LightApp/LightApp_Application.cxx
src/LightApp/LightApp_Application.h
src/LightApp/LightApp_DataModel.cxx
src/LightApp/LightApp_DataModel.h
src/LightApp/LightApp_DataObject.cxx
src/LightApp/LightApp_DataObject.h
src/LightApp/LightApp_DataOwner.cxx
src/LightApp/LightApp_DataOwner.h
src/LightApp/LightApp_DataSubOwner.cxx
src/LightApp/LightApp_DataSubOwner.h
src/LightApp/LightApp_Dialog.cxx
src/LightApp/LightApp_Dialog.h
src/LightApp/LightApp_Displayer.cxx
src/LightApp/LightApp_Displayer.h
src/LightApp/LightApp_Driver.cxx
src/LightApp/LightApp_Driver.h
src/LightApp/LightApp_EventFilter.cxx
src/LightApp/LightApp_EventFilter.h
src/LightApp/LightApp_GLSelector.cxx
src/LightApp/LightApp_GLSelector.h
src/LightApp/LightApp_HDFDriver.cxx
src/LightApp/LightApp_HDFDriver.h
src/LightApp/LightApp_Module.cxx
src/LightApp/LightApp_Module.h
src/LightApp/LightApp_ModuleDlg.cxx
src/LightApp/LightApp_ModuleDlg.h
src/LightApp/LightApp_NameDlg.cxx
src/LightApp/LightApp_NameDlg.h
src/LightApp/LightApp_OBFilter.cxx
src/LightApp/LightApp_OBFilter.h
src/LightApp/LightApp_OBSelector.cxx
src/LightApp/LightApp_OBSelector.h
src/LightApp/LightApp_OCCSelector.cxx
src/LightApp/LightApp_OCCSelector.h
src/LightApp/LightApp_Operation.cxx
src/LightApp/LightApp_Operation.h
src/LightApp/LightApp_Preferences.cxx
src/LightApp/LightApp_Preferences.h
src/LightApp/LightApp_PreferencesDlg.cxx
src/LightApp/LightApp_PreferencesDlg.h
src/LightApp/LightApp_RootObject.h
src/LightApp/LightApp_Selection.cxx
src/LightApp/LightApp_Selection.h
src/LightApp/LightApp_SelectionMgr.cxx
src/LightApp/LightApp_SelectionMgr.h
src/LightApp/LightApp_ShowHideOp.cxx
src/LightApp/LightApp_ShowHideOp.h
src/LightApp/LightApp_Study.cxx
src/LightApp/LightApp_Study.h
src/LightApp/LightApp_SwitchOp.cxx
src/LightApp/LightApp_SwitchOp.h
src/LightApp/LightApp_UpdateFlags.h
src/LightApp/LightApp_VTKSelector.cxx
src/LightApp/LightApp_VTKSelector.h
src/LightApp/LightApp_WidgetContainer.cxx
src/LightApp/LightApp_WidgetContainer.h
src/LightApp/Makefile.am
src/LightApp/resources/LightApp.ini
src/LightApp/resources/LightApp.xml
src/LightApp/resources/LightApp_images.po
src/LightApp/resources/LightApp_msg_en.po
src/LightApp/resources/icon_about.png
src/LightApp/resources/icon_applogo.png
src/LightApp/resources/icon_default.png
src/LightApp/resources/icon_module.png
src/LightApp/resources/icon_module_big.png
src/LightApp/resources/icon_select.png
src/LogWindow/Makefile.am
src/Makefile.am
src/OBJECT/Makefile.am
src/OCCViewer/Makefile.am
src/OCCViewer/OCCViewer.h
src/OCCViewer/OCCViewer_AISSelector.cxx
src/OCCViewer/OCCViewer_AISSelector.h
src/OCCViewer/OCCViewer_ClippingDlg.cxx
src/OCCViewer/OCCViewer_ClippingDlg.h
src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx
src/OCCViewer/OCCViewer_CreateRestoreViewDlg.h
src/OCCViewer/OCCViewer_SetRotationPointDlg.cxx
src/OCCViewer/OCCViewer_SetRotationPointDlg.h
src/OCCViewer/OCCViewer_VService.cxx
src/OCCViewer/OCCViewer_VService.h
src/OCCViewer/OCCViewer_ViewManager.cxx
src/OCCViewer/OCCViewer_ViewManager.h
src/OCCViewer/OCCViewer_ViewModel.cxx
src/OCCViewer/OCCViewer_ViewModel.h
src/OCCViewer/OCCViewer_ViewPort.cxx
src/OCCViewer/OCCViewer_ViewPort.h
src/OCCViewer/OCCViewer_ViewPort3d.cxx
src/OCCViewer/OCCViewer_ViewPort3d.h
src/OCCViewer/OCCViewer_ViewSketcher.cxx
src/OCCViewer/OCCViewer_ViewSketcher.h
src/OCCViewer/OCCViewer_ViewWindow.cxx
src/OCCViewer/OCCViewer_ViewWindow.h
src/OCCViewer/resources/OCCViewer_images.po
src/OCCViewer/resources/OCCViewer_msg_en.po
src/OCCViewer/resources/view_back.png
src/OCCViewer/resources/view_bottom.png
src/OCCViewer/resources/view_camera_dump.png
src/OCCViewer/resources/view_clipping.png
src/OCCViewer/resources/view_clipping_pressed.png
src/OCCViewer/resources/view_clone.png
src/OCCViewer/resources/view_fitall.png
src/OCCViewer/resources/view_fitarea.png
src/OCCViewer/resources/view_front.png
src/OCCViewer/resources/view_glpan.png
src/OCCViewer/resources/view_left.png
src/OCCViewer/resources/view_pan.png
src/OCCViewer/resources/view_presets.png
src/OCCViewer/resources/view_reset.png
src/OCCViewer/resources/view_right.png
src/OCCViewer/resources/view_rotate.png
src/OCCViewer/resources/view_rotation_point.png
src/OCCViewer/resources/view_shoot.png
src/OCCViewer/resources/view_top.png
src/OCCViewer/resources/view_triedre.png
src/OCCViewer/resources/view_zoom.png
src/ObjBrowser/Makefile.am
src/ObjBrowser/OB_Filter.cxx
src/ObjBrowser/OB_Filter.h
src/ObjBrowser/OB_FindDlg.cxx
src/ObjBrowser/OB_FindDlg.h
src/ObjBrowser/OB_ListItem.cxx
src/ObjBrowser/OB_ListItem.h
src/ObjBrowser/OB_ListView.cxx
src/ObjBrowser/OB_ListView.h
src/ObjBrowser/OB_ObjSearch.cxx
src/ObjBrowser/OB_ObjSearch.h
src/Plot2d/Makefile.am
src/Prs/Makefile.am
src/PyInterp/Makefile.am
src/PythonConsole/Makefile.am
src/PythonConsole/PythonConsole.h
src/PythonConsole/PythonConsole_PyConsole.cxx
src/PythonConsole/PythonConsole_PyConsole.h
src/PythonConsole/PythonConsole_PyEditor.cxx
src/PythonConsole/PythonConsole_PyEditor.h
src/PythonConsole/PythonConsole_PyInterp.cxx
src/PythonConsole/PythonConsole_PyInterp.h
src/QDS/Makefile.am
src/QDS/QDS.cxx
src/QDS/QDS.h
src/QDS/QDS_CheckBox.cxx
src/QDS/QDS_CheckBox.h
src/QDS/QDS_ComboBox.cxx
src/QDS/QDS_ComboBox.h
src/QDS/QDS_Datum.cxx
src/QDS/QDS_Datum.h
src/QDS/QDS_LineEdit.cxx
src/QDS/QDS_LineEdit.h
src/QDS/QDS_RadioBox.cxx
src/QDS/QDS_RadioBox.h
src/QDS/QDS_SpinBox.cxx
src/QDS/QDS_SpinBox.h
src/QDS/QDS_SpinBoxDbl.cxx
src/QDS/QDS_SpinBoxDbl.h
src/QDS/QDS_Table.cxx
src/QDS/QDS_Table.h
src/QDS/QDS_TextEdit.cxx
src/QDS/QDS_TextEdit.h
src/QDS/QDS_Validator.cxx
src/QDS/QDS_Validator.h
src/QDS/resources/QDS_msg_en.po
src/Qtx/Makefile.am
src/Qtx/QtxDblSpinBox.cxx
src/Qtx/QtxDblSpinBox.h
src/Qtx/QtxDblValidator.cxx
src/Qtx/QtxDblValidator.h
src/Qtx/QtxDirListEditor.cxx
src/Qtx/QtxDirListEditor.h
src/Qtx/QtxDockWindow.cxx
src/Qtx/QtxDockWindow.h
src/Qtx/QtxListBox.cxx
src/Qtx/QtxListBox.h
src/Qtx/QtxListOfOperations.cxx
src/Qtx/QtxListOfOperations.h
src/Qtx/QtxListResourceEdit.cxx
src/Qtx/QtxListResourceEdit.h
src/Qtx/QtxListView.cxx
src/Qtx/QtxListView.h
src/Qtx/QtxMenuButton.cxx
src/Qtx/QtxMenuButton.h
src/Qtx/QtxOperations.cxx
src/Qtx/QtxOperations.h
src/Qtx/QtxParser.cxx
src/Qtx/QtxParser.h
src/Qtx/QtxPopupMenu.cxx
src/Qtx/QtxPopupMenu.h
src/Qtx/QtxResourceEdit.cxx
src/Qtx/QtxResourceEdit.h
src/Qtx/QtxStdOperations.cxx
src/Qtx/QtxStdOperations.h
src/QxGraph/Makefile.am
src/QxGraph/QxGraph.h
src/QxGraph/QxGraph_ActiveItem.h
src/QxGraph/QxGraph_Canvas.cxx
src/QxGraph/QxGraph_Canvas.h
src/QxGraph/QxGraph_CanvasView.cxx
src/QxGraph/QxGraph_CanvasView.h
src/QxGraph/QxGraph_Def.h
src/QxGraph/QxGraph_Prs.cxx
src/QxGraph/QxGraph_Prs.h
src/QxGraph/QxGraph_ViewManager.cxx
src/QxGraph/QxGraph_ViewManager.h
src/QxGraph/QxGraph_ViewModel.cxx
src/QxGraph/QxGraph_ViewModel.h
src/QxGraph/QxGraph_ViewWindow.cxx
src/QxGraph/QxGraph_ViewWindow.h
src/QxGraph/resources/QxGraph_images.po
src/QxGraph/resources/QxGraph_msg_en.po
src/QxGraph/resources/view_fitall.png
src/QxGraph/resources/view_fitarea.png
src/QxGraph/resources/view_glpan.png
src/QxGraph/resources/view_pan.png
src/QxGraph/resources/view_reset.png
src/QxGraph/resources/view_zoom.png
src/RegistryDisplay/HelpWindow.cxx
src/RegistryDisplay/HelpWindow.hxx
src/RegistryDisplay/IntervalWindow.cxx
src/RegistryDisplay/IntervalWindow.hxx
src/RegistryDisplay/Makefile.am
src/RegistryDisplay/RegWidget.cxx
src/RegistryDisplay/RegWidget.h
src/RegistryDisplay/RegWidgetFactory.cxx
src/ResExporter/Makefile.am
src/ResExporter/ResourceExporter.cxx
src/SALOME_PY/Makefile.am
src/SALOME_PY/SalomePy.cxx
src/SALOME_PYQT/Makefile.am
src/SALOME_PYQT/SALOME_PYQT_GUI/Makefile.am
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_GUI.h
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_GUI.sip
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.cxx
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.h
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_SipDefs.h.in
src/SALOME_PYQT/SalomePyQt/Makefile.am
src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx
src/SALOME_PYQT/SalomePyQt/SalomePyQt.h
src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip
src/SALOME_PYQT/SalomePyQt/SalomePyQt_v4.sip
src/SALOME_SWIG/Help.py
src/SALOME_SWIG/Makefile.am
src/SALOME_SWIG/PyInterp.py
src/SALOME_SWIG/SALOMEGUI_Swig.cxx
src/SALOME_SWIG/SALOMEGUI_Swig.hxx
src/SALOME_SWIG/SALOMEGUI_Swig.i
src/SALOME_SWIG/SALOMEGUI_shared_modules.py
src/SALOME_SWIG/examplevtk1.py
src/SALOME_SWIG/libSALOME_Swig.i
src/SALOME_SWIG/salome.py
src/SALOME_SWIG/supervisionexample.py.in
src/SALOME_SWIG/supervisiongeomexample.py.in
src/SALOME_SWIG/test_big_table.py
src/SALOME_SWIG/test_many_objects.py
src/SALOME_SWIG/test_remove_ref.py
src/SALOME_SWIG/test_table.py
src/SOCC/Makefile.am
src/SOCC/SOCC.h
src/SOCC/SOCC_Prs.cxx
src/SOCC/SOCC_Prs.h
src/SOCC/SOCC_ViewModel.cxx
src/SOCC/SOCC_ViewModel.h
src/SOCC/SOCC_ViewWindow.cxx
src/SOCC/SOCC_ViewWindow.h
src/SPlot2d/Makefile.am
src/SPlot2d/SPlot2d.h
src/SPlot2d/SPlot2d_Curve.cxx
src/SPlot2d/SPlot2d_Curve.h
src/SPlot2d/SPlot2d_Prs.cxx
src/SPlot2d/SPlot2d_Prs.h
src/SPlot2d/SPlot2d_ViewModel.cxx
src/SPlot2d/SPlot2d_ViewModel.h
src/SPlot2d/SPlot2d_ViewWindow.cxx
src/SPlot2d/SPlot2d_ViewWindow.h
src/SPlot2d/resources/SPlot2d_msg_en.po
src/STD/Makefile.am
src/STD/STD_LoadStudiesDlg.cxx
src/STD/STD_LoadStudiesDlg.h
src/STD/resources/STD_images.po
src/STD/resources/STD_msg_en.po
src/STD/resources/config
src/SUIT/Makefile.am
src/SUIT/SUIT_Convertor.h
src/SUIT/SUIT_MsgDlg.cxx
src/SUIT/SUIT_MsgDlg.h
src/SUIT/SUIT_ParserSettings.cxx
src/SUIT/SUIT_ParserSettings.h
src/SUIT/resources/SUIT_images.po
src/SUIT/resources/SUIT_msg_en.po
src/SUIT/utilities.h
src/SUITApp/Makefile.am
src/SUITApp/resources/SUITApp_msg_en.po
src/SUPERVGraph/Makefile.am
src/SUPERVGraph/SUPERVGraph.cxx
src/SUPERVGraph/SUPERVGraph.h
src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx
src/SUPERVGraph/SUPERVGraph_ViewFrame.h
src/SUPERVGraph/SUPERVGraph_ViewManager.cxx
src/SUPERVGraph/SUPERVGraph_ViewManager.h
src/SUPERVGraph/SUPERVGraph_ViewModel.cxx
src/SUPERVGraph/SUPERVGraph_ViewModel.h
src/SUPERVGraph/resources/SUPERVGraph_images.po
src/SUPERVGraph/resources/SUPERVGraph_msg_en.po
src/SUPERVGraph/resources/view_pan.png
src/SUPERVGraph/resources/view_reset.png
src/SVTK/Makefile.am
src/SalomeApp/Makefile.am
src/SalomeApp/SalomeApp.h
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Application.h
src/SalomeApp/SalomeApp_CheckFileDlg.cxx
src/SalomeApp/SalomeApp_CheckFileDlg.h
src/SalomeApp/SalomeApp_DataModel.cxx
src/SalomeApp/SalomeApp_DataModel.h
src/SalomeApp/SalomeApp_DataObject.cxx
src/SalomeApp/SalomeApp_DataObject.h
src/SalomeApp/SalomeApp_EventFilter.cxx
src/SalomeApp/SalomeApp_EventFilter.h
src/SalomeApp/SalomeApp_ExceptionHandler.cxx
src/SalomeApp/SalomeApp_ExceptionHandler.h
src/SalomeApp/SalomeApp_ExitDlg.cxx
src/SalomeApp/SalomeApp_ExitDlg.h
src/SalomeApp/SalomeApp_Filter.cxx
src/SalomeApp/SalomeApp_Filter.h
src/SalomeApp/SalomeApp_ImportOperation.cxx
src/SalomeApp/SalomeApp_ImportOperation.h
src/SalomeApp/SalomeApp_ListView.cxx
src/SalomeApp/SalomeApp_ListView.h
src/SalomeApp/SalomeApp_Module.cxx
src/SalomeApp/SalomeApp_Module.h
src/SalomeApp/SalomeApp_PyInterp.cxx
src/SalomeApp/SalomeApp_PyInterp.h
src/SalomeApp/SalomeApp_Study.cxx
src/SalomeApp/SalomeApp_Study.h
src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx
src/SalomeApp/SalomeApp_StudyPropertiesDlg.h
src/SalomeApp/SalomeApp_Tools.cxx
src/SalomeApp/SalomeApp_Tools.h
src/SalomeApp/SalomeApp_TypeFilter.cxx
src/SalomeApp/SalomeApp_TypeFilter.h
src/SalomeApp/SalomeApp_VisualState.cxx
src/SalomeApp/SalomeApp_VisualState.h
src/SalomeApp/Test/Makefile.am
src/SalomeApp/Test/SalomeAppTest.cxx
src/SalomeApp/Test/SalomeAppTest.hxx
src/SalomeApp/Test/TestSalomeApp.cxx
src/SalomeApp/Test/TestSalomeApp.py
src/SalomeApp/resources/SalomeApp.ini
src/SalomeApp/resources/SalomeApp.xml
src/SalomeApp/resources/SalomeApp_images.po
src/SalomeApp/resources/SalomeApp_msg_en.po
src/Session/InquireServersQThread.cxx
src/Session/InquireServersQThread.h
src/Session/Makefile.am
src/Session/SALOME_Session.hxx
src/Session/SALOME_Session_Server.cxx
src/Session/SalomeApp_Engine_i.cxx
src/Session/SalomeApp_Engine_i.hxx
src/Session/Session_ServerCheck.cxx
src/Session/Session_ServerCheck.hxx
src/Session/Session_ServerLauncher.cxx
src/Session/Session_ServerLauncher.hxx
src/Session/Session_ServerThread.cxx
src/Session/Session_ServerThread.hxx
src/Session/Session_Session_i.cxx
src/Session/Session_Session_i.hxx
src/Style/Makefile.am
src/Style/SalomeStyle.cxx
src/Style/SalomeStyle.h
src/TOOLSGUI/Makefile.am
src/TOOLSGUI/ToolsGUI.cxx
src/TOOLSGUI/ToolsGUI.h
src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.cxx
src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.h
src/TOOLSGUI/ToolsGUI_HelpWindow.cxx
src/TOOLSGUI/ToolsGUI_HelpWindow.h
src/TOOLSGUI/ToolsGUI_IntervalWindow.cxx
src/TOOLSGUI/ToolsGUI_IntervalWindow.h
src/TOOLSGUI/ToolsGUI_RegWidget.cxx
src/TOOLSGUI/ToolsGUI_RegWidget.h
src/TOOLSGUI/resources/ToolsGUI_icons.po
src/TOOLSGUI/resources/ToolsGUI_msg_en.po
src/VTKViewer/Makefile.am
src/VTKViewer/VTKViewer_VectorText.cxx
src/VTKViewer/VTKViewer_VectorText.h
+++ /dev/null
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-\f
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-\f
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-\f
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-\f
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-\f
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-\f
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-\f
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-\f
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-\f
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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, or (at your option) any later version.
-
- 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
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
+++ /dev/null
-// Copyright (C) 2005 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/
-//
-// File : GUI_version.h
-// Author : Vadim SANDLER
-// Module : SALOME
-
-#if !defined(__GUI_VERSION_H__)
-#define __GUI_VERSION_H__
-
-/*
- GUI_VERSION is (major << 16) + (minor << 8) + patch.
-*/
-
-#define GUI_VERSION_STR "@VERSION@"
-#define GUI_VERSION @XVERSION@
-
-#endif // __GUI_VERSION_H__
+++ /dev/null
-SALOME2 : GUI module
+++ /dev/null
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-\f
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-\f
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-\f
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-\f
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-\f
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-\f
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-\f
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-\f
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-\f
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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, or (at your option) any later version.
-
- 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
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# -* Makefile *-
-#
-# Author : Patrick GOLDBRONN (CEA)
-# Date : 28/06/2001
-# $Header$
-#
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-if GUI_ENABLE_CORBA
- IDLDIR = idl
-else !GUI_ENABLE_CORBA
- IDLDIR =
-endif
-
-SUBDIRS = $(IDLDIR) adm_local resources src doc bin
-
-DIST_SUBDIRS = idl adm_local resources src doc bin
-
-DISTCLEANFILES = a.out aclocal.m4 configure
-
-salomeinclude_DATA=GUI_version.h
-
-EXTRA_DIST+= \
- build_configure \
- clean_configure \
- LICENCE
-
-dist-hook:
- rm -rf `find $(distdir) -name CVS`
-
-usr_docs:
- (cd doc && $(MAKE) $(AM_MAKEFLAGS) usr_docs)
-
-docs:usr_docs
-
-dev_docs:
- (cd doc && $(MAKE) $(AM_MAKEFLAGS) dev_docs)
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
-# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
-# 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
-#
-SUBDIRS = unix
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
-# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
-# 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 $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-SUBDIRS = config_files
-
-# this is for LIGHT module compatibility
-dist_admlocalunix_DATA=make_conclude.in
\ No newline at end of file
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
-# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
-# 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 $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-dist_admlocalm4_DATA=\
-check_disable_Corba.m4 \
-check_GLViewer.m4 \
-check_GUI.m4 \
-check_msg2qm.m4 \
-check_OCCViewer.m4 \
-check_opengl.m4 \
-check_Plot2dViewer.m4 \
-check_PyConsole.m4 \
-check_pyqt.m4 \
-check_qt.m4 \
-check_qwt.m4 \
-check_SalomeObject.m4 \
-check_sip.m4 \
-check_SupervGraphViewer.m4 \
-check_vtk.m4 \
-check_VTKViewer.m4 \
-check_corba_in_GUI.m4 \
-check_QxGraphViewer.m4 \
-README
+++ /dev/null
-This file is only here for CVS:
-CVS does not always create empty directory, and adm_local/unix/config_file
-is needed by build_configure.
+++ /dev/null
-#
-# Check configure option --disable-glViewer=[yes|no|DIR] taking into account that
-# DISABLE_GLVIEWER may be already set during build_configure,
-# Set DISABLE_GLVIEWER to yes|no
-#
-# Author : Edawrd AGAPOV (OCC, 2005)
-#
-
-AC_DEFUN([CHECK_GLVIEWER],[
-
-AC_ARG_WITH(glViewer,
- [ --disable-glViewer default=no ],
- disable_glViewer="$withval",disable_glViewer="${DISABLE_GLVIEWER}")
-
-case $disable_glViewer in
- yes)
-# AC_MSG_RESULT(************************************************)
-# AC_MSG_RESULT(******* DISABLE GLViewer configuration *****)
-# AC_MSG_RESULT(************************************************)
- DISABLE_GLVIEWER="yes"
- AC_SUBST(DISABLE_GLVIEWER)
-esac
-
-
-])dnl
+++ /dev/null
-# Check availability of Salome binary distribution
-#
-# Author : Marc Tajchman (CEA, 2002)
-#------------------------------------------------------------
-
-AC_DEFUN([CHECK_GUI],[
-AC_REQUIRE([AC_LINKER_OPTIONS])dnl
-
-AC_CHECKING(for $2 $1 )
-
-SalomeGUI_ok=no
-
-GUI_LDFLAGS=""
-GUI_CXXFLAGS=""
-
-AC_ARG_WITH(gui,
- --with-salome_gui=DIR root directory path of SALOME GUI installation,
- SALOME_GUI_DIR="$withval",SALOME_GUI_DIR="")
-
-if test "x${SALOME_GUI_DIR}" = "x" ; then
- # no --with-gui-dir option used
- AC_MSG_RESULT(try \${GUI_ROOT_DIR}: ${GUI_ROOT_DIR})
- if test "x${GUI_ROOT_DIR}" != "x" ; then
- # SALOME_ROOT_DIR environment variable defined
- SALOME_GUI_DIR=${GUI_ROOT_DIR}
- else
- # search Salome binaries in PATH variable
- AC_PATH_PROG(TEMP, $1)
- if test "x${TEMP}" != "x" ; then
- AC_MSG_RESULT($1 was found at : ${TEMP})
- SALOME_BIN_DIR=`dirname ${TEMP}`
- SALOME_GUI_DIR=`cd ${SALOME_BIN_DIR}/../..; pwd`
- fi
- fi
-fi
-
-if test -f ${SALOME_GUI_DIR}/bin/salome/$1 ; then
- SalomeGUI_ok=yes
- AC_MSG_RESULT(Using SALOME GUI distribution in ${SALOME_GUI_DIR})
-
- if test "x${GUI_ROOT_DIR}" == "x" ; then
- GUI_ROOT_DIR=${SALOME_GUI_DIR}
- fi
-
- AC_SUBST(GUI_ROOT_DIR)
-
- GUI_LDFLAGS=-L${SALOME_GUI_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
- GUI_CXXFLAGS=-I${SALOME_GUI_DIR}/include/salome
-
- AC_SUBST(GUI_LDFLAGS)
- AC_SUBST(GUI_CXXFLAGS)
-else
- AC_MSG_WARN("Cannot find compiled SALOME GUI distribution")
-fi
-
-AC_MSG_RESULT(for $2: ${SalomeGUI_ok})
-
-])dnl
-
-AC_DEFUN([CHECK_SALOME_GUI],[
- CHECK_GUI([SUITApp],
- [SALOME GUI])
-])dnl
+++ /dev/null
-#
-# Check configure option --disable-occViewer=[yes|no|DIR] taking into account that
-# DISABLE_OCCVIEWER may be already set during build_configure,
-# Set DISABLE_OCCVIEWER to yes|no
-#
-# Author : Edawrd AGAPOV (OCC, 2005)
-#
-
-AC_DEFUN([CHECK_OCCVIEWER],[
-
-AC_ARG_WITH(occViewer,
- [ --disable-occViewer default=no ],
- disable_occViewer="$withval",disable_occViewer="${DISABLE_OCCVIEWER}")
-
-case $disable_occViewer in
- yes)
-# AC_MSG_RESULT(************************************************)
-# AC_MSG_RESULT(***** DISABLE OCCViewer configuration ******)
-# AC_MSG_RESULT(************************************************)
- DISABLE_OCCVIEWER="yes"
- AC_SUBST(DISABLE_OCCVIEWER)
-esac
-
-
-])dnl
+++ /dev/null
-#
-# Check configure option --disable-plot2dViewer=[yes|no|DIR] taking into account that
-# DISABLE_PLOT2DVIEWER may be already set during build_configure,
-# Set DISABLE_PLOT2DVIEWER to yes|no
-#
-# Author : Edawrd AGAPOV (OCC, 2005)
-#
-
-AC_DEFUN([CHECK_PLOT2DVIEWER],[
-
-AC_ARG_WITH(plot2dViewer,
- [ --disable-plot2dViewer default=no ],
- disable_plot2dViewer="$withval",disable_plot2dViewer="${DISABLE_PLOT2DVIEWER}")
-
-case $disable_plot2dViewer in
- yes)
-# AC_MSG_RESULT(************************************************)
-# AC_MSG_RESULT(*** DISABLE Plot2dViewer configuration *****)
-# AC_MSG_RESULT(************************************************)
- DISABLE_PLOT2DVIEWER="yes"
- AC_SUBST(DISABLE_PLOT2DVIEWER)
-esac
-
-
-])dnl
+++ /dev/null
-#
-# Check configure option --disable-pyConsole=[yes|no|DIR] taking into account that
-# DISABLE_PYCONSOLE may be already set during build_configure,
-# Set DISABLE_PYCONSOLE to yes|no
-#
-# Author : Edawrd AGAPOV (OCC, 2005)
-#
-
-AC_DEFUN([CHECK_PYCONSOLE],[
-
-AC_ARG_WITH(pyConsole,
- [ --disable-pyConsole default=no ],
- disable_pyConsole="$withval",disable_pyConsole="${DISABLE_PYCONSOLE}")
-
-case $disable_pyConsole in
- yes)
-# AC_MSG_RESULT(************************************************)
-# AC_MSG_RESULT(***** DISABLE PyConsole configuration ******)
-# AC_MSG_RESULT(************************************************)
- DISABLE_PYCONSOLE="yes"
- AC_SUBST(DISABLE_PYCONSOLE)
-esac
-
-
-])dnl
+++ /dev/null
-#
-# Check configure option --disable-qxGraphViewer=[yes|no|DIR] taking into account that
-# DISABLE_QXGRAPHVIEWER may be already set during build_configure,
-# Set DISABLE_QXGRAPHVIEWER to yes|no
-#
-# Author : Edawrd AGAPOV (OCC, 2005)
-#
-
-AC_DEFUN([CHECK_QXGRAPHVIEWER],[
-
-AC_ARG_WITH(qxGraphViewer,
- [ --disable-qxGraphViewer default=no ],
- disable_qxGraphViewer="$withval",disable_qxGraphViewer="${DISABLE_QXGRAPHVIEWER}")
-
-case $disable_qxGraphViewer in
- yes)
-# AC_MSG_RESULT(************************************************)
-# AC_MSG_RESULT(******* DISABLE QxGraphViewer configuration ********)
-# AC_MSG_RESULT(************************************************)
- DISABLE_QXGRAPHVIEWER="yes"
- AC_SUBST(DISABLE_QXGRAPHVIEWER)
-esac
-
-
-])dnl
+++ /dev/null
-#
-# Check configure option --disable-salomeObject=[yes|no|DIR] taking into account that
-# DISABLE_SALOMEOBJECT may be already set during build_configure,
-# Set DISABLE_SALOMEOBJECT to yes|no
-#
-# Author : Edawrd AGAPOV (OCC, 2005)
-#
-
-AC_DEFUN([CHECK_SALOMEOBJECT],[
-
-AC_ARG_WITH(salomeObject,
- [ --disable-salomeObject default=no ],
- disable_salomeObject="$withval",disable_salomeObject="${DISABLE_SALOMEOBJECT}")
-
-case $disable_salomeObject in
- yes)
-# AC_MSG_RESULT(************************************************)
-# AC_MSG_RESULT(*** DISABLE Salome object configuration ****)
-# AC_MSG_RESULT(************************************************)
- DISABLE_SALOMEOBJECT="yes"
- AC_SUBST(DISABLE_SALOMEOBJECT)
-esac
-
-
-])dnl
+++ /dev/null
-#
-# Check configure option --disable-supervGraphViewer=[yes|no|DIR] taking into account that
-# DISABLE_SUPERVGRAPHVIEWER may be already set during build_configure,
-# Set DISABLE_SUPERVGRAPHVIEWER to yes|no
-#
-# Author : Edawrd AGAPOV (OCC, 2005)
-#
-
-AC_DEFUN([CHECK_SUPERVGRAPHVIEWER],[
-
-AC_ARG_WITH(supervGraphViewer,
- [ --disable-supervGraphViewer default=no ],
- disable_supervGraphViewer="$withval",disable_supervGraphViewer="${DISABLE_SUPERVGRAPHVIEWER}")
-
-case $disable_supervGraphViewer in
- yes)
-# AC_MSG_RESULT(************************************************)
-# AC_MSG_RESULT(******* DISABLE SupervGraphViewer configuration ********)
-# AC_MSG_RESULT(************************************************)
- DISABLE_SUPERVGRAPHVIEWER="yes"
- AC_SUBST(DISABLE_SUPERVGRAPHVIEWER)
-esac
-
-
-])dnl
+++ /dev/null
-#
-# Check configure option --disable-vtkViewer=[yes|no|DIR] taking into account that
-# DISABLE_VTKVIEWER may be already set during build_configure,
-# Set DISABLE_VTKVIEWER to yes|no
-#
-# Author : Edawrd AGAPOV (OCC, 2005)
-#
-
-AC_DEFUN([CHECK_VTKVIEWER],[
-
-AC_ARG_WITH(vtkViewer,
- [ --disable-vtkViewer default=no ],
- disable_vtkViewer="$withval",disable_vtkViewer="${DISABLE_VTKVIEWER}")
-
-case $disable_vtkViewer in
- yes)
-# AC_MSG_RESULT(************************************************)
-# AC_MSG_RESULT(***** DISABLE VTK Viewer configuration *****)
-# AC_MSG_RESULT(************************************************)
- DISABLE_VTKVIEWER="yes"
- AC_SUBST(DISABLE_VTKVIEWER)
-esac
-
-
-])dnl
+++ /dev/null
-# Check availability of full Salome binary distribution
-#
-# Author : Marc Tajchman (CEA, 2002)
-#------------------------------------------------------------
-
-AC_DEFUN([CHECK_CORBA_IN_GUI],[
- CHECK_GUI([SALOME_Session_Server],
- [CORBA SALOME GUI])
- CORBA_IN_GUI=${SalomeGUI_ok}
- AC_SUBST(CORBA_IN_GUI)
-])dnl
-
+++ /dev/null
-#
-# Check configure option --disable-corba=[yes|no|DIR] taking into account that
-# GUI_DISABLE_CORBA may be already set during build_configure,
-# Set GUI_DISABLE_CORBA to yes|no
-#
-# Author : Edawrd AGAPOV (OCC, 2005)
-#
-
-AC_DEFUN([CHECK_DISABLE_CORBA],[
-
-AC_ARG_WITH(corba,
- [ --disable-corba-gen default=no ],
- disable_corba="$withval",disable_corba="${GUI_DISABLE_CORBA}")
-
-case $disable_corba in
- yes)
-# AC_MSG_RESULT(************************************************)
-# AC_MSG_RESULT(******* DISABLE CORBA configuration ********)
-# AC_MSG_RESULT(************************************************)
- GUI_DISABLE_CORBA="yes";;
- *)
- GUI_DISABLE_CORBA="no"
-esac
-
-AC_SUBST(GUI_DISABLE_CORBA)
-
-])dnl
+++ /dev/null
-# Check availability of Qt's msg2qm tool binary distribution
-#
-# Author : Jerome Roy (CEA, 2003)
-#
-
-AC_DEFUN([CHECK_MSG2QM],[
-
-AC_CHECKING(for msg2qm)
-
-msg2qm_ok=no
-
-AC_ARG_WITH(msg2qm,
- [ --with-msg2qm=DIR root directory path of MSG2QM installation],
- MSG2QM_DIR="$withval",MSG2QM_DIR="")
-
-if test "x$MSG2QM_DIR" == "x" ; then
-
-# no --with-MSG2QM-dir option used
-
- if test "x$MSG2QM_ROOT" != "x" ; then
-
- # MSG2QM_ROOT environment variable defined
- MSG2QM_DIR=$MSG2QM_ROOT
-
- else
-
- # search MSG2QM binaries in PATH variable
- AC_PATH_PROG(TEMP, msg2qm)
- if test "x$TEMP" != "x" ; then
- MSG2QM_DIR=`dirname $TEMP`
- fi
-
- fi
-#
-fi
-
-# look for msg2qm in ${MSG2QM_DIR} directory
-if test -f ${MSG2QM_DIR}/msg2qm ; then
- msg2qm_ok=yes
- MSG2QM="${MSG2QM_DIR}/msg2qm"
- AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR})
-else
- # if not found, look for msg2qm in ${MSG2QM_DIR}/bin directory
- if test -f ${MSG2QM_DIR}/bin/msg2qm ; then
- msg2qm_ok=yes
- MSG2QM="${MSG2QM_DIR}/bin/msg2qm"
- AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}/bin)
- else
- AC_MSG_WARN("Cannot find MSG2QM executable")
- fi
-fi
-
-AC_SUBST(MSG2QM)
-AC_MSG_RESULT(for MSG2QM: $msg2qm_ok)
-
-])dnl
-
+++ /dev/null
-dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-dnl
-dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-dnl
-dnl
-dnl
-AC_DEFUN([CHECK_OPENGL],[
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_CPP])dnl
-AC_REQUIRE([AC_LINKER_OPTIONS])dnl
-
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-
-AC_ARG_WITH(opengl,
- [AC_HELP_STRING([--with-opengl=DIR],[root directory path of OpenGL installation])],
- [opengl_dir="$withval"],
- [dirs="/usr/lib${LIB_LOCATION_SUFFIX} /usr/local/lib${LIB_LOCATION_SUFFIX} /opt/graphics/OpenGL/lib${LIB_LOCATION_SUFFIX} /usr/openwin/lib${LIB_LOCATION_SUFFIX} /usr/X11R6/lib${LIB_LOCATION_SUFFIX}"])dnl
-
-AC_CHECKING(for OpenGL)
-AC_CHECKING(for OpenGL headers)
-
-OGL_INCLUDES=""
-OGL_LIBS=""
-
-GL_LIB_PATH=""
-GLU_LIB_PATH=""
-
-OpenGL_ok=no
-OpenGL_libs_ok=no
-OpenGL_headers_ok=no
-
-dnl openGL headers
-# by default
-if test "x${opengl_dir}" != "x" ; then
- AC_MSG_RESULT(for opengl_dir: $opengl_dir)
- AC_CHECK_HEADER([${opengl_dir}/include/GL/gl.h],
- [OpenGL_headers_ok=yes; OGL_INCLUDES="-I${opengl_dir}/include"],
- [OpenGL_headers_ok=no])
- if test "x${OpenGL_headers_ok}" = "xyes" ; then
- AC_CHECKING(for default OpenGL library)
- if test "x${opengl_dir}" = "x/usr" ; then
- OGL_LIBS=""
- else
- OGL_LIBS="-L${opengl_dir}/lib"
- fi
- LDFLAGS_old="$LDFLAGS"
- LDFLAGS="$LDFLAGS $OGL_LIBS"
- AC_CHECK_LIB([GL],
- [glBegin],
- [OpenGL_libs_ok=yes],
- [OpenGL_libs_ok=no])
- if test "x${OpenGL_libs_ok}" = "xyes" ; then
- AC_TRY_LINK([],
- [],
- [OpenGL_libs_ok=yes ; OpenGL_ok=yes; OGL_LIBS="$OGL_LIBS -lGL"],
- [OpenGL_libs_ok=no])
- fi
- LDFLAGS="$LDFLAGS_old"
- fi
-fi
-
-if test "x${OpenGL_headers_ok}" = "xno" ; then
- AC_CHECK_HEADER(GL/gl.h,
- [OpenGL_headers_ok=yes],
- [OpenGL_headers_ok=no])
-fi
-
-# under SunOS ?
-if test "x${OpenGL_headers_ok}" = "xno" ; then
- AC_CHECK_HEADERS(/usr/openwin/share/include/GL/glxmd.h,
- [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/usr/openwin/share/include/"],
- [OpenGL_headers_ok=no])
-fi
-
-# under IRIX ?
-if test "x${OpenGL_headers_ok}" = "xno" ; then
- AC_CHECK_HEADERS(/opt/graphics/OpenGL/include/GL/glxmd.h,
- [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/opt/graphics/OpenGL/include"],
- [OpenGL_headers_ok=no])
-fi
-
-# some linux OpenGL servers hide the includes in /usr/X11R6/include/GL
-if test "x${OpenGL_headers_ok}" = "xno" ; then
- AC_CHECK_HEADERS(/usr/X11R6/include/GL/gl.h,
- [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/usr/X11R6/include"],
- [OpenGL_headers_ok=no])
-fi
-
-if test "x${OpenGL_headers_ok}" = "xyes" ; then
- AC_CHECKING(for OpenGL library)
- for idir in $dirs; do
- if test -r "${idir}/libGL.so"; then
- AC_MSG_RESULT(in ${idir})
- if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
- GL_LIB_PATH=""
- else
- GL_LIB_PATH="-L${idir}"
- fi
- break
- fi
- # under IRIX ?
- if test -r "${idir}/libGL.sl"; then
- AC_MSG_RESULT(in ${idir})
- if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
- GL_LIB_PATH=""
- else
- GL_LIB_PATH="-L${idir}"
- fi
- break
- fi
- done
- LDFLAGS_old="${LDFLAGS}"
- LDFLAGS="${LDFLAGS} ${GL_LIB_PATH}"
- AC_CHECK_LIB([GL],
- [glBegin],
- [OpenGL_libs_ok=yes],
- [OpenGL_libs_ok=no])
- if test "x${OpenGL_libs_ok}" = "xyes" ; then
- AC_TRY_LINK([],
- [],
- [OpenGL_libs_ok=yes ; OGL_LIBS="${OGL_LIBS} ${GL_LIB_PATH} -lGL"],
- [OpenGL_libs_ok=no])
- fi
- LDFLAGS="$LDFLAGS_old"
-fi
-
-if test "x${OpenGL_libs_ok}" = "xyes" ; then
- for idir in $dirs; do
- if test -r "${idir}/libGLU.so"; then
- AC_MSG_RESULT(in ${idir})
- if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
- GLU_LIB_PATH=""
- else
- GLU_LIB_PATH="-L${idir}"
- fi
- break
- fi
- # under IRIX ?
- if test -r "${idir}/libGLU.sl"; then
- AC_MSG_RESULT(in ${idir})
- if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
- GLU_LIB_PATH=""
- else
- GLU_LIB_PATH="-L${idir}"
- fi
- break
- fi
- done
-
- # workaround a problem with libGL library location
- for idir in $dirs; do
- if test -r "${idir}/libGLU.la"; then
- GLU_LA_PATH="${idir}/libGLU.la"
- GL_LA_PATH_TO_CHECK=`cat ${GLU_LA_PATH} | awk '{ for(i=1;i<NF;i++){ if(gsub("libGL.la","&",$i)>0) print $i } }'`
- if test -z ${GL_LA_PATH_TO_CHECK} || test -r ${GL_LA_PATH_TO_CHECK}; then
- # nothing to do
- break
- fi
- for jdir in $dirs; do
- if test -r "${jdir}/libGL.la"; then
- GL_LA_PATH="${jdir}/libGL.la"
- # copy the libGLU.la file and set correct libGL.la path in it
- NEW_GLU_LA_PATH=${ROOT_BUILDDIR}
- NEW_GLU_LA_FILE="${NEW_GLU_LA_PATH}/libGLU.la"
- sed -e "s%${GL_LA_PATH_TO_CHECK}%${GL_LA_PATH}%" ${GLU_LA_PATH} > "${NEW_GLU_LA_FILE}"
- chmod -f --reference=${GLU_LA_PATH} "${NEW_GLU_LA_FILE}"
- # set a new libGLU.la path
- GLU_LIB_PATH="-L${NEW_GLU_LA_PATH}"
- # create a simbolic link to libGLU.so
- for kdir in $dirs; do
- if test -r "${kdir}/libGLU.so"; then
- cp -fs "${kdir}/libGLU.so" "${NEW_GLU_LA_PATH}/libGLU.so"
- break
- fi
- done
- break
- fi
- done
- break
- fi
- done
-
- LDFLAGS_old="${LDFLAGS}"
- LDFLAGS="${LDFLAGS} ${OGL_LIBS} ${GLU_LIB_PATH}"
- AC_CHECK_LIB([GLU],
- [gluBeginSurface],
- [OpenGL_libs_ok=yes],
- [OpenGL_libs_ok=no])
- if test "x${OpenGL_libs_ok}" = "xyes" ; then
- AC_TRY_LINK([],
- [],
- [OpenGL_libs_ok=yes ; OGL_LIBS="${OGL_LIBS} ${GLU_LIB_PATH} -lGLU"],
- [OpenGL_libs_ok=no])
- fi
- LDFLAGS="$LDFLAGS_old"
-fi
-
-if test "x${OpenGL_headers_ok}" = "xyes" ; then
- if test "x${OpenGL_libs_ok}" = "xyes" ; then
- OpenGL_ok=yes
- fi
-fi
-
-AC_MSG_RESULT(for OpenGL_headers_ok: $OpenGL_headers_ok)
-AC_MSG_RESULT(for OpenGL_libs_ok: $OpenGL_libs_ok)
-AC_MSG_RESULT(for OpenGL_ok: $OpenGL_ok)
-
-AC_SUBST(OGL_INCLUDES)
-AC_SUBST(OGL_LIBS)
-
-AC_LANG_RESTORE
-
-])dnl
-
+++ /dev/null
-dnl Copyright (C) 2003 CEA/DEN, EDF R&D
-
-AC_DEFUN([CHECK_PYQT],[
-AC_REQUIRE([CHECK_PYTHON])dnl
-AC_REQUIRE([CHECK_QT])dnl
-AC_REQUIRE([CHECK_SIP])dnl
-AC_REQUIRE([AC_LINKER_OPTIONS])dnl
-
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-
-AC_ARG_WITH(pyqt,
- [ --with-pyqt=DIR root directory path to PyQt installation ],
- [PYQTDIR="$withval"
- AC_MSG_RESULT("select $withval as path to PyQt")
- ])
-
-AC_ARG_WITH(pyqt_sips,
- [ --with-pyqt_sips=DIR a directory path to PyQt sips installation ],
- [PYQT_SIPS="$withval"
- AC_MSG_RESULT("select $withval as path to PyQt sips")
- ])
-
-
-AC_ARG_WITH(pyuic,
- [ --with-pyuic=EXEC pyuic executable ],
- [PYUIC="$withval"
- AC_MSG_RESULT("select $withval as pyqt executable")
- ])
-
-AC_CHECKING(for pyqt)
-
-pyqt_ok=yes
-
-dnl look for pyuic
-pyqt_uic_ok=no
-if test "x$PYUIC" != x; then
- dnl try withval value
- AC_CHECK_FILE($PYUIC,pyqt_uic_ok=yes,pyqt_uic_ok=no)
-fi
-if test "x$pyqt_uic_ok" == "xno"; then
- dnl try ${PYQTDIR}
- if test "x${PYQTDIR}" != "x"; then
- if test -d ${PYQTDIR} ; then
- AC_CHECK_FILE(${PYQTDIR}/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no)
- if test "x$pyqt_uic_ok" == "xyes"; then
- PYUIC="${PYQTDIR}/pyuic"
- fi
- fi
- fi
-fi
-if test "x$pyqt_uic_ok" == "xno"; then
- dnl try in $PATH
- AC_PATH_PROG(PYUIC, pyuic)
- if test "x$PYUIC" != x; then
- PYQTDIR=$PYUIC
- PYQTDIR=`dirname $PYQTDIR`
- PYQTDIR=`dirname $PYQTDIR`
- pyqt_uic_ok=yes
- fi
-fi
-if test "x$pyqt_uic_ok" == "xno"; then
- dnl try ${SIPDIR}
- if test "x${SIPDIR}" != "x"; then
- if test -d ${SIPDIR} ; then
- AC_CHECK_FILE(${SIPDIR}/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no)
- if test "x$pyqt_uic_ok" == "xyes"; then
- PYUIC="${SIPDIR}/pyuic"
- fi
- fi
- fi
-fi
-if test "x$pyqt_uic_ok" == "xno"; then
- dnl try ${PYTHONHOME}/bin
- if test "x${PYTHONHOME}" != "x"; then
- if test -d ${PYTHONHOME}/bin ; then
- AC_CHECK_FILE(${PYTHONHOME}/bin/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no)
- if test "x$pyqt_uic_ok" == "xyes"; then
- PYUIC="${PYTHONHOME}/bin/pyuic"
- fi
- fi
- fi
-fi
-if test "x$pyqt_uic_ok" == "xno"; then
- dnl try /usr/bin
- AC_CHECK_FILE(/usr/bin/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no)
- if test "x$pyqt_uic_ok" == "xyes"; then
- PYUIC="/usr/bin/pyuic"
- fi
-fi
-if test "x$pyqt_uic_ok" == "xno"; then
- pyqt_ok=no
-fi
-
-dnl look for PyQt libs
-pyqt_lib_ok=no
-if test "x${PYQTDIR}" != "x"; then
- dnl try {PYQTDIR}
- AC_CHECK_FILE(${PYQTDIR}/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- if test "x${PYQTDIR}" = "x/usr/lib"
- then
- PYQT_LIBS="-lqtcmodule"
- else
- PYQT_LIBS="-L${PYQTDIR} -lqtcmodule"
- fi
- else
- AC_CHECK_FILE(${PYQTDIR}/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- if test "x${PYQTDIR}" = "x/usr/lib"
- then
- PYQT_LIBS=""
- else
- PYQT_LIBS="-L${PYQTDIR}"
- fi
- fi
- fi
- if test "x$pyqt_lib_ok" == "xno"; then
- dnl try ${PYQTDIR}/lib
- if test -d ${PYQTDIR}/lib; then
- AC_CHECK_FILE(${PYQTDIR}/lib/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- PYQT_LIBS="-L${PYQTDIR}/lib -lqtcmodule"
- else
- AC_CHECK_FILE(${PYQTDIR}/lib/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- PYQT_LIBS="-L${PYQTDIR}/lib"
- fi
- fi
- fi
- fi
- if test "x$pyqt_lib_ok" == "xno"; then
- dnl try ${PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
- if test -d ${PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages; then
- AC_CHECK_FILE(${PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- PYQT_LIBS="-L${PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lqtcmodule"
- else
- AC_CHECK_FILE(${PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- PYQT_LIBS="-L${PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
- fi
- fi
- fi
- fi
-fi
-if test "x$pyqt_lib_ok" == "xno"; then
- dnl try ${SIPDIR}
- if test "x${SIPDIR}" != "x"; then
- if test -d ${SIPDIR} ; then
- AC_CHECK_FILE(${SIPDIR}/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- if test "x${SIPDIR}" = "x/usr/lib"
- then
- PYQT_LIBS="-lqtcmodule"
- else
- PYQT_LIBS="-L${SIPDIR} -lqtcmodule"
- fi
- else
- AC_CHECK_FILE(${SIPDIR}/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- if test "x${SIPDIR}" = "x/usr/lib"
- then
- PYQT_LIBS=""
- else
- PYQT_LIBS="-L${SIPDIR}"
- fi
- fi
- fi
- fi
- fi
-fi
-if test "x$pyqt_lib_ok" == "xno"; then
- dnl try ${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
- if test "x${PYTHONHOME}" != "x"; then
- if test -d ${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages ; then
- AC_CHECK_FILE(${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- PYQT_LIBS="-L${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lqtcmodule"
- else
- AC_CHECK_FILE(${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- PYQT_LIBS="-L${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
- fi
- fi
- fi
- fi
-fi
-if test "x$pyqt_lib_ok" == "xno"; then
- dnl try /usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
- AC_CHECK_FILE(/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- PYQT_LIBS="-L/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lqtcmodule"
- else
- AC_CHECK_FILE(/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
- if test "x$pyqt_lib_ok" == "xyes"; then
- PYQT_LIBS="-L/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
- fi
- fi
-fi
-if test "x$pyqt_lib_ok" == "xno"; then
- pyqt_ok=no
-fi
-
-dnl look for PyQt sips
-pyqt_sips_ok=no
-dnl try ${PYQT_SIPS} or ${PYQT_SIPS}/qt
-if test "x${PYQT_SIPS}" != "x"; then
- AC_CHECK_FILE(${PYQT_SIPS}/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
- if test "x$pyqt_sips_ok" == "xno"; then
- AC_CHECK_FILE(${PYQT_SIPS}/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
- if test "x$pyqt_sips_ok" == "xyes"; then
- PYQT_SIPS="${PYQT_SIPS}/qt"
- fi
- fi
-fi
-if test "x$pyqt_sips_ok" == "xno"; then
- dnl try ${PYQTDIR}/sip
- if test "x${PYQTDIR}" != "x"; then
- if test -d ${PYQTDIR}/sip ; then
- AC_CHECK_FILE(${PYQTDIR}/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
- if test "x$pyqt_sips_ok" == "xyes"; then
- PYQT_SIPS="${PYQTDIR}/sip"
- else
- AC_CHECK_FILE(${PYQTDIR}/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
- if test "x$pyqt_sips_ok" == "xyes"; then
- PYQT_SIPS="${PYQTDIR}/sip/qt"
- fi
- fi
- fi
- fi
-fi
-if test "x$pyqt_sips_ok" == "xno"; then
- dnl try ${PYQTDIR}/share/sip/qt
- if test "x${PYQTDIR}" != "x"; then
- if test -d ${PYQTDIR}/share/sip/qt ; then
- AC_CHECK_FILE(${PYQTDIR}/share/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
- if test "x$pyqt_sips_ok" == "xyes"; then
- PYQT_SIPS="${PYQTDIR}/share/sip/qt"
- fi
- fi
- fi
-fi
-if test "x$pyqt_sips_ok" == "xno"; then
- dnl try ${SIPDIR}/sip
- if test "x${SIPDIR}" != "x"; then
- if test -d ${SIPDIR}/sip ; then
- AC_CHECK_FILE(${SIPDIR}/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
- if test "x$pyqt_sips_ok" == "xyes"; then
- PYQT_SIPS="${SIPDIR}/sip"
- else
- AC_CHECK_FILE(${SIPDIR}/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
- if test "x$pyqt_sips_ok" == "xyes"; then
- PYQT_SIPS="${SIPDIR}/sip/qt"
- fi
- fi
- fi
- fi
-fi
-if test "x$pyqt_sips_ok" == "xno"; then
- dnl try /usr/share/sip
- if test -d /usr/share/sip ; then
- AC_CHECK_FILE(/usr/share/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
- if test "x$pyqt_sips_ok" == "xyes"; then
- PYQT_SIPS="/usr/share/sip"
- else
- AC_CHECK_FILE(/usr/share/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
- if test "x$pyqt_sips_ok" == "xyes"; then
- PYQT_SIPS="/usr/share/sip/qt"
- fi
- fi
- fi
-fi
-if test "x$pyqt_sips_ok" == "xno"; then
- pyqt_ok=no
-else
- PYQT_INCLUDES="-I$PYQT_SIPS"
-
- dnl Additional sip flags required for correct wrappers compilation
- AC_MSG_CHECKING(which qt classes should be excluded)
-
- PYQT_SIPFLAGS=""
-
- CXXFLAGS_old=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS $QT_INCLUDES"
- LIBS_old=$LIBS
- LIBS="$LIBS $QT_LIBS"
-
- AC_TRY_COMPILE([#include <qcdestyle.h>],
- [new QCDEStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_CDE")
- AC_TRY_COMPILE([#include <qinterlacestyle.h>],
- [new QInterlaceStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_INTERLACE")
- AC_TRY_COMPILE([#include <qmotifstyle.h>],
- [new QMotifStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_MOTIF")
- AC_TRY_COMPILE([#include <qmotifplusstyle.h>],
- [new QMotifPlusStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_MOTIFPLUS")
- AC_TRY_COMPILE([#include <qplatinumstyle.h>],
- [new QPlatinumStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_PLATINUM")
- AC_TRY_COMPILE([#include <qsgistyle.h>],
- [new QSGIStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_SGI")
- AC_TRY_COMPILE([#include <qwindowsstyle.h>],
- [new QWindowsStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_WINDOWS")
- AC_TRY_COMPILE([#include <qwindowsxpstyle.h>],
- [new QWindowsXPStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_WINDOWSXP")
-
- LIBS="$LIBS -lqassistantclient"
- AC_TRY_LINK([#include <qassistantclient.h>],
- [new QAssistantClient("foo");],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_ASSISTANTCLIENT")
-
- AC_MSG_RESULT(done)
-
- CXXFLAGS=$CXXFLAGS_old
- LIBS=$LIBS_old
-fi
-# get latest Qt version supported
-QT_VERS=`grep -e "[[[:space:]]]*Qt_[[[:digit:]_]]\+}" ${PYQT_SIPS}/versions.sip | sed -e "s/\(.*\)[[[:space:]]]*\(Qt_[[[:digit:]_]]\+\)}/\2/g"`
-AC_MSG_RESULT(Latest Qt version supported by PyQt is $QT_VERS)
-
-AC_SUBST(PYQT_INCLUDES)
-AC_SUBST(PYQT_LIBS)
-AC_SUBST(PYQT_SIPS)
-AC_SUBST(PYUIC)
-AC_SUBST(PYQT_SIPFLAGS)
-AC_SUBST(QT_VERS)
-
-AC_LANG_RESTORE
-
-AC_MSG_RESULT(for pyqt: $pyqt_ok)
-
-])dnl
-dnl
-
-
+++ /dev/null
-dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-dnl
-dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-dnl
-dnl
-dnl
-
-AC_DEFUN([CHECK_QT],[
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_CXX])dnl
-AC_REQUIRE([AC_PROG_CPP])dnl
-AC_REQUIRE([AC_PROG_CXXCPP])dnl
-AC_REQUIRE([CHECK_OPENGL])dnl
-AC_REQUIRE([AC_LINKER_OPTIONS])dnl
-
-AC_CHECKING(for Qt)
-
-if test "x$OpenGL_ok" != "xyes" ; then
- AC_MSG_WARN(Qt needs OpenGL correct configuration, check configure output)
-fi
-
-qt_ok=yes
-
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-
-if test "x$QTDIR" = "x"
-then
- AC_MSG_RESULT(please define QTDIR variable)
- qt_ok=no
-else
- AC_MSG_RESULT(QTDIR is $QTDIR)
- qt_inc_ok=no
- QTINC=""
- AC_CHECK_FILE(${QTDIR}/include/qt3/qglobal.h,QTINC="/qt3",QTINC="")
- QT_VERSION=`grep "QT_VERSION_STR" ${QTDIR}/include${QTINC}/qglobal.h | sed -e 's%^#define QT_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'`
- AC_MSG_RESULT(Qt version is $QT_VERSION)
-fi
-
-if test "x$qt_ok" = "xyes"
-then
- if test -f ${QTDIR}/bin/moc
- then
- MOC=${QTDIR}/bin/moc
- else
- AC_PATH_PROG(MOC, moc)
- fi
- if test "x$MOC" = "x"
- then
- qt_ok=no
- AC_MSG_RESULT(moc qt-compiler not in PATH variable)
- else
- qt_ok=yes
- AC_MSG_RESULT(moc found)
- fi
-fi
-
-if test "x$qt_ok" = "xyes"
-then
- if test -f ${QTDIR}/bin/uic
- then
- UIC=${QTDIR}/bin/uic
- else
- AC_PATH_PROG(UIC, uic)
- fi
- if test "x$UIC" = "x"
- then
- qt_ok=no
- AC_MSG_RESULT(uic qt-interface compiler not in PATH variable)
- else
- qt_ok=yes
- AC_MSG_RESULT(uic found)
- fi
-fi
-
-AC_SUBST(QTDIR)
-QT_ROOT=$QTDIR
-
-if test "x$qt_ok" = "xyes"
-then
- CPPFLAGS_old=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$QTDIR/include${QTINC}"
-
- AC_LANG_CPLUSPLUS
- AC_CHECK_HEADER(qaction.h,qt_ok=yes ,qt_ok=no)
-
- CPPFLAGS=$CPPFLAGS_old
-
- AC_MSG_CHECKING(include of qt headers)
-
- if test "x$qt_ok" = "xno"
- then
- AC_MSG_RESULT(qt headers not found, or too old qt version, in $QTDIR/include)
- AC_MSG_RESULT(QTDIR environment variable may be wrong)
- else
- AC_MSG_RESULT(yes)
- QT_INCLUDES="-I${QT_ROOT}/include${QTINC} -DQT_THREAD_SUPPORT -DQT_CLEAN_NAMESPACE"
- QT_MT_INCLUDES="-I${QT_ROOT}/include${QTINC} -DQT_THREAD_SUPPORT -DQT_CLEAN_NAMESPACE"
- fi
-fi
-
-if test "x$qt_ok" = "xyes"
-then
- AC_MSG_CHECKING(linking qt library)
- LIBS_old=$LIBS
- if test "x$QTDIR" = "x/usr"
- then
- LIBS="$LIBS -lqt-mt $OGL_LIBS"
- else
- LIBS="$LIBS -L$QTDIR/lib${LIB_LOCATION_SUFFIX} -lqt-mt $OGL_LIBS"
- fi
-
- CXXFLAGS_old=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS $QT_INCLUDES"
-
- AC_CACHE_VAL(salome_cv_lib_qt,[
- AC_TRY_LINK(
-#include <qapplication.h>
-, int n;
- char **s;
- QApplication a(n, s);
- a.exec();,
- eval "salome_cv_lib_qt=yes",eval "salome_cv_lib_qt=no")
- ])
- qt_ok="$salome_cv_lib_qt"
-
- if test "x$qt_ok" = "xno"
- then
- AC_MSG_RESULT(unable to link with qt library)
- AC_MSG_RESULT(QTDIR environment variable may be wrong)
- else
- AC_MSG_RESULT(yes)
- if test "x$QTDIR" = "x/usr"
- then
- QT_LIBS=" -lqt-mt"
- QT_MT_LIBS=" -lqt-mt"
- else
- QT_LIBS="-L$QTDIR/lib${LIB_LOCATION_SUFFIX} -lqt-mt"
- QT_MT_LIBS="-L$QTDIR/lib${LIB_LOCATION_SUFFIX} -lqt-mt"
- fi
- fi
-
- LIBS=$LIBS_old
- CXXFLAGS=$CXXFLAGS_old
-
-fi
-
-AC_SUBST(MOC)
-AC_SUBST(UIC)
-
-AC_SUBST(QT_ROOT)
-AC_SUBST(QT_INCLUDES)
-AC_SUBST(QT_MT_INCLUDES)
-AC_SUBST(QT_LIBS)
-AC_SUBST(QT_MT_LIBS)
-AC_SUBST(QT_VERSION)
-
-AC_LANG_RESTORE
-
-AC_MSG_RESULT(for Qt: $qt_ok)
-
-# Save cache
-AC_CACHE_SAVE
-
-])dnl
-dnl
+++ /dev/null
-dnl Copyright (C) 2003 CEA/DEN, EDF R&D
-
-AC_DEFUN([CHECK_QWT],[
-AC_REQUIRE([CHECK_QT])dnl
-AC_REQUIRE([AC_LINKER_OPTIONS])dnl
-
-AC_CHECKING(for qwt)
-
-qwt_ok=yes
-
-dnl were is qwt ?
-
-AC_ARG_WITH(qwt,
- [ --with-qwt=DIR directory path to QWT installation ],
- [QWTHOME="$withval"
- AC_MSG_RESULT("select $withval as path to QWT")
- ])
-
-AC_ARG_WITH(qwt_inc,
- [ --with-qwt_inc=DIR directory path to QWT includes ],
- [QWT_INCLUDES="$withval"
- AC_MSG_RESULT("select $withval as path to QWT includes")
- ])
-
-if test -z $QWTHOME; then
- AC_MSG_RESULT(QWTHOME not defined)
- exits_ok=no
- if test "x$exits_ok" = "xno"; then
- for d in /usr/local /usr ; do
- AC_CHECK_FILE(${d}/lib${LIB_LOCATION_SUFFIX}/libqwt.so,exits_ok=yes,exits_ok=no)
- if test "x$exits_ok" = "xyes"; then
- QWTHOME=$d
- AC_MSG_RESULT(libqwt.so detected in $d/lib)
- fi
- done
- fi
- if test "x$exits_ok" = "xno"; then
- for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do
- if test -f $d/libqwt.so ; then
- AC_MSG_RESULT(libqwt.so detected in $d)
- QWTHOME=$d
- QWTHOME=`echo ${QWTHOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
- exits_ok=yes
- break
- fi
- done
- fi
- if test "x$exits_ok" = "xyes"; then
- if test -z $QWT_INCLUDES; then
- QWT_INCLUDES=$QWTHOME"/include/qwt"
- if test ! -f $QWT_INCLUDES/qwt.h ; then
- QWT_INCLUDES=$QWTHOME"/include"
- fi
- if test ! -f $QWT_INCLUDES/qwt.h ; then
- QWT_INCLUDES=/usr/lib/qt3/include/qwt
- fi
- fi
- fi
-else
- if test -z $QWT_INCLUDES; then
- QWT_INCLUDES="$QWTHOME/include"
- fi
-fi
-
-if test "x$qwt_ok" = xno -o ! -d "$QWTHOME" ; then
- AC_MSG_RESULT(no)
- AC_MSG_WARN(qwt not found)
- qwt_ok=no
-else
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- CPPFLAGS_old=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$QWT_INCLUDES"
- CPPFLAGS="$CPPFLAGS $QT_INCLUDES"
-
- AC_CHECK_HEADER(qwt.h,qwt_ok=yes,qwt_ok=no)
-
- CPPFLAGS=$CPPFLAGS_old
-
- if test "x$qwt_ok" = xno ; then
- AC_MSG_RESULT(no)
- AC_MSG_WARN(qwt not found)
- else
- qwt_ok=yes
- fi
-
-if test "x$qwt_ok" = "xyes"
-then
- AC_MSG_CHECKING(linking qwt library)
- LIBS_old=$LIBS
- if test "x$QTDIR" = "x/usr"
- then
- LIBS="$LIBS -lqt-mt"
- else
- LIBS="$LIBS -L$QTDIR/lib${LIB_LOCATION_SUFFIX} -lqt-mt"
- fi
- if test "x$QWTHOME" = "x/usr"
- then
- LIBS="$LIBS -lqwt"
- else
- LIBS="$LIBS -L$QWTHOME/lib -lqwt"
- fi
-
- CXXFLAGS_old=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS $QT_INCLUDES -I$QWT_INCLUDES"
-
- AC_CACHE_VAL(salome_cv_lib_qwt,[
- AC_TRY_LINK(
-#include <qapplication.h>
-#include <qwt_plot.h>
-, int n;
- char **s;
- QApplication a(n, s);
- QwtPlot* p;
- a.setMainWidget(p);
- a.exec();,
- eval "salome_cv_lib_qwt=yes",eval "salome_cv_lib_qwt=no")
- ])
- qwt_ok="$salome_cv_lib_qwt"
-
- if test "x$qwt_ok" = "xno"
- then
- AC_MSG_RESULT(unable to link with qwt library)
- AC_MSG_RESULT(QWTHOME environment variable may be wrong)
- else
- QWT_INCLUDES="-I$QWT_INCLUDES"
- if test "x$QWTHOME" = "x/usr"
- then
- QWT_LIBS=" -lqwt"
- else
- QWT_LIBS="-L$QWTHOME/lib -lqwt"
- fi
-
- AC_SUBST(QWT_INCLUDES)
- AC_SUBST(QWT_LIBS)
-
- AC_MSG_RESULT(yes)
- fi
-
- LIBS=$LIBS_old
- CXXFLAGS=$CXXFLAGS_old
-
-fi
-
-
- AC_LANG_RESTORE
-
-fi
-
-
-])dnl
-dnl
+++ /dev/null
-dnl Copyright (C) 2003 CEA/DEN, EDF R&D
-
-AC_DEFUN([CHECK_SIP],[
-AC_REQUIRE([CHECK_PYTHON])dnl
-AC_REQUIRE([CHECK_QT])dnl
-AC_REQUIRE([AC_LINKER_OPTIONS])dnl
-
-sip_ok=yes
-
-AC_ARG_WITH(sip,
- [ --with-sip=EXEC sip executable ],
- [SIP="$withval"
- AC_MSG_RESULT("select $withval as sip executable")
- ], [
- AC_PATH_PROG(SIP, sip)
- ])
-
-if test "x$SIP" = "x" ; then
- sip_ok=no
- AC_MSG_RESULT(sip not in PATH variable)
-else
- version=`$SIP -V`
- AC_MSG_RESULT(sip version is $version)
- case "$version" in
- 3.2*)
- SIP_VERS=v3_old ;;
- 3.3*)
- SIP_VERS=v3_old ;;
- 3.4*)
- SIP_VERS=v3_old ;;
- 3.5*)
- SIP_VERS=v3_old ;;
- 3.6*)
- SIP_VERS=v3_old ;;
- 3.7*)
- SIP_VERS=v3_old ;;
- 3.8*)
- SIP_VERS=v3_old ;;
- 3.9*)
- SIP_VERS=v3_old ;;
- 3.10*)
- SIP_VERS=v3_new ;;
- 4.1*)
- SIP_VERS=v4_old ;;
- 4.2*)
- SIP_VERS=v4_new ;;
- 4.3*)
- SIP_VERS=v4_new ;;
- 4.4*)
- SIP_VERS=v4_new ;;
- 4.5*)
- SIP_VERS=v4_new ;;
- 4.6*)
- SIP_VERS=v4_new ;;
- 4.7*)
- SIP_VERS=v4_new ;;
- *)
- AC_MSG_RESULT(sip version $version not supported)
- SIP_VERS=unsupported ;;
- esac
-
- if test "x$SIPDIR" = "x" ; then
- SIPDIR=`dirname $SIP`
- SIPDIR=`dirname $SIPDIR`
- fi
-
- sip_ok=no
- dnl Search sip.h file
- if test "x$SIPDIR" != "x" ; then
- dnl look for sip.h in ${SIPDIR}
- AC_CHECK_FILE(${SIPDIR}/sip.h,sip_ok=yes,sip_ok=no)
- if test "x$sip_ok" == "xyes" ; then
- SIP_INCLUDES="-I${SIPDIR}"
- fi
- if test "x$sip_ok" == "xno" ; then
- dnl look for sip.h in ${SIPDIR}/include/python${PYTHON_VERSION}
- if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then
- AC_CHECK_FILE(${SIPDIR}/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no)
- if test "x$sip_ok" == "xyes" ; then
- SIP_INCLUDES="-I${SIPDIR}/include/python${PYTHON_VERSION}"
- fi
- fi
- fi
- fi
- if test "x$sip_ok" == "xno" ; then
- dnl look for sip.h in ${PYTHON_PREFIX}/include/python${PYTHON_VERSION}
- if test -d ${PYTHON_PREFIX}/include/python${PYTHON_VERSION} ; then
- AC_CHECK_FILE(${PYTHON_PREFIX}/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no)
- if test "x$sip_ok" == "xyes" ; then
- SIP_INCLUDES="${PYTHON_INCLUDES}"
- fi
- fi
- fi
- if test "x$sip_ok" == "xno" ; then
- dnl look for sip.h in /usr/include/python${PYTHON_VERSION}
- if test -d /usr/include/python${PYTHON_VERSION} ; then
- AC_CHECK_FILE(/usr/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no)
- if test "x$sip_ok" == "xyes" ; then
- SIP_INCLUDES="/usr/include/python${PYTHON_VERSION}"
- fi
- fi
- fi
-
- dnl Search (lib)sip.so file
- sip_lib_ok=no
- if test "x$SIPDIR" != "x" ; then
- dnl look for (lib)sip.so in ${SIPDIR}
- AC_CHECK_FILE(${SIPDIR}/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
- if test "x$sip_lib_ok" == "xyes" ; then
- if test "x${SIPDIR}" = "x/usr/lib"
- then
- SIP_LIBS="-lsip"
- else
- SIP_LIBS="-L${SIPDIR} -lsip"
- fi
- else
- AC_CHECK_FILE(${SIPDIR}/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
- if test "x$sip_lib_ok" == "xyes" ; then
- if test "x${SIPDIR}" = "x/usr/lib"
- then
- SIP_LIBS=""
- else
- SIP_LIBS="-L${SIPDIR}"
- fi
- fi
- fi
-
- if test "x$sip_lib_ok" == "xno" ; then
- dnl look for (lib)sip.so in ${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
- if test -d ${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages ; then
- AC_CHECK_FILE(${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
- if test "x$sip_lib_ok" == "xyes" ; then
- SIP_LIBS="-L${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lsip"
- else
- AC_CHECK_FILE(${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
- if test "x$sip_lib_ok" == "xyes" ; then
- SIP_LIBS="-L${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
- fi
- fi
- fi
- fi
- fi
- if test "x$sip_lib_ok" == "xno" ; then
- dnl look for (lib)sip.so in ${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
- if test -d ${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages ; then
- AC_CHECK_FILE(${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
- if test "x$sip_lib_ok" == "xyes" ; then
- SIP_LIBS="-L${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lsip"
- else
- AC_CHECK_FILE(${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
- if test "x$sip_lib_ok" == "xyes" ; then
- SIP_LIBS="-L${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
- fi
- fi
- fi
- fi
- if test "x$sip_lib_ok" == "xno" ; then
- dnl look for (lib)sip.so in /usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
- if test -d /usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages ; then
- AC_CHECK_FILE(/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
- if test "x$sip_lib_ok" == "xyes" ; then
- SIP_LIBS="-L$/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lsip"
- else
- AC_CHECK_FILE(/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
- if test "x$sip_lib_ok" == "xyes" ; then
- SIP_LIBS="-L/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
- fi
- fi
- fi
- fi
- if test "x$sip_lib_ok" == "xno" ; then
- sip_ok=no
- fi
-fi
-
-AC_SUBST(SIP)
-AC_SUBST(SIP_INCLUDES)
-AC_SUBST(SIP_LIBS)
-AC_SUBST(SIP_VERS)
-
-AM_CONDITIONAL(IS_SIP_V4, [test $SIP_VERS == v4_old || test $SIP_VERS == v4_new])
-AM_CONDITIONAL(IS_SIP_NEW, [test $SIP_VERS == v3_new || test $SIP_VERS == v4_new])
-
-AC_MSG_RESULT(for sip: $sip_ok)
-
-])dnl
-dnl
+++ /dev/null
-dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-dnl
-dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-dnl
-dnl
-dnl
-
-dnl
-dnl OPTIONS_VTK
-dnl ------------------------------------------------------------------------
-dnl Adds the --with-vtk=path and --with-vtk-version configure options
-dnl
-AC_DEFUN([OPTIONS_VTK], [
- AC_ARG_WITH([vtk],
- [AC_HELP_STRING([--with-vtk], [The prefix where VTK is installed (default "" means taking from environment variable)])],
- [with_vtk=$withval], [with_vtk=""])
-
- AC_ARG_WITH([vtk-version],
- [AC_HELP_STRING([--with-vtk-version], [VTK include directory name is vtk-suffix, e.g. vtk-5.0/. What is the suffix? (Default "yes" means taking from environment variable)])],
- [vtk_suffix=$withval], [vtk_suffix="yes"])
-])
-
-dnl
-dnl CHECK_VTK
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN([CHECK_VTK], [
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_CXX])dnl
-AC_REQUIRE([AC_PROG_CPP])dnl
-AC_REQUIRE([AC_PROG_CXXCPP])dnl
-AC_REQUIRE([AC_LINKER_OPTIONS])dnl
-
-AC_REQUIRE([OPTIONS_VTK])dnl
-
-AC_CHECKING(for VTK)
-
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-
-AC_SUBST(VTK_INCLUDES)
-AC_SUBST(VTK_LIBS)
-AC_SUBST(VTKPY_MODULES)
-
-VTK_INCLUDES=""
-VTK_LIBS=""
-VTKPY_MODULES=""
-
-vtk_ok=no
-
-if test "x$OpenGL_ok" != "xyes" ; then
- AC_MSG_WARN(VTK needs OpenGL correct configuration, check configure output)
-fi
-
-AC_PATH_X
-if test "x$x_libraries" != "x"
-then
- LXLIB="-L$x_libraries"
-else
- LXLIB=""
-fi
-
-if test "x$x_libraries" = "x/usr/lib"
-then
- LXLIB=""
-fi
-
-if test "x$x_libraries" = "x/usr/lib${LIB_LOCATION_SUFFIX}"
-then
- LXLIB=""
-fi
-
-LOCAL_INCLUDES="$OGL_INCLUDES"
-LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid -lvtkParallel -lvtkWidgets $OGL_LIBS $LXLIB -lX11 -lXt"
-TRY_LINK_LIBS="-lvtkCommon $OGL_LIBS $LXLIB -lX11 -lXt"
-
-dnl VTK version suffix
-if test -z $vtk_suffix ; then
- vtk_suffix="yes"
-fi
-if test "x$vtk_suffix" == "xno" ; then
- dnl in case user wrote --with-vtk-version=no, use empty suffix
- vtk_suffix=""
-fi
-if test "x$vtk_suffix" != "xyes" ; then
- VTKSUFFIX="$vtk_suffix"
-else
- dnl in case user wrote --with-vtk-version=yes, get the suffix from env
- if test -z $VTKSUFFIX ; then
- VTKSUFFIX="-5.0"
- fi
-fi
-
-dnl VTK install dir
-if test -z $with_vtk ; then
- with_vtk=""
-fi
-if test "x$with_vtk" = "xyes" ; then
- dnl in case user wrote --with-vtk=yes
- with_vtk=""
-fi
-if test "x$with_vtk" = "xno" ; then
- dnl in case user wrote --with-vtk=no
- with_vtk=""
- AC_MSG_WARN(Value "no", specified for option --with-vtk, is not supported)
-fi
-
-if test "x$with_vtk" != "x" ; then
- VTKHOME="$with_vtk"
-else
- if test -z $VTKHOME ; then
- AC_MSG_WARN(undefined VTKHOME variable which specify where vtk was compiled)
- for d in /usr/local /usr ; do
- if test -f ${d}/include/vtk${VTKSUFFIX}/vtkPlane.h ; then
- AC_MSG_RESULT(trying ${d})
- VTKHOME="${d}"
- break
- else
- if test -f ${d}/include/vtk-5.0/vtkPlane.h ; then
- AC_MSG_RESULT(trying ${d})
- VTKHOME="${d}"
- VTKSUFFIX="-5.0"
- break
- else
- if test -f ${d}/include/vtk/vtkPlane.h ; then
- AC_MSG_RESULT(trying ${d})
- VTKHOME="${d}"
- VTKSUFFIX=""
- break
- fi
- fi
- fi
- done
- fi
-fi
-
-LOCAL_INCLUDES="-I$VTKHOME/include/vtk${VTKSUFFIX} $LOCAL_INCLUDES"
-LOCAL_LIBS="-L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk${VTKSUFFIX} $LOCAL_LIBS"
-TRY_LINK_LIBS="-L$VTKHOME/lib${LIB_LOCATION_SUFFIX} -L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk${VTKSUFFIX} $TRY_LINK_LIBS"
-if test "x$VTKHOME" != "x/usr" ; then
- LOCAL_LIBS="-L$VTKHOME/lib${LIB_LOCATION_SUFFIX} $LOCAL_LIBS"
-fi
-
-dnl vtk headers
-CPPFLAGS_old="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES"
-
-AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no")
-
-CPPFLAGS="$CPPFLAGS_old"
-
-if test "x$vtk_ok" = "xyes"
-then
- VTK_INCLUDES="$LOCAL_INCLUDES"
-
- dnl vtk libraries
-
- AC_MSG_CHECKING(linking VTK library)
-
- LIBS_old="$LIBS"
- LIBS="$LIBS $TRY_LINK_LIBS"
- #LIBS="$LIBS $LOCAL_LIBS"
- CPPFLAGS_old="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $VTK_INCLUDES"
-
- dnl VTKPY_MODULES="$VTKHOME/python"
-
- AC_CACHE_VAL(salome_cv_lib_vtk,[
- AC_TRY_LINK([#include "vtkPlane.h"
- ],
- [vtkPlane::New()],
- [salome_cv_lib_vtk=yes],
- [salome_cv_lib_vtk=no])
- ])
- vtk_ok="$salome_cv_lib_vtk"
- LIBS="$LIBS_old"
- CPPFLAGS="$CPPFLAGS_old"
-fi
-
-if test "x$vtk_ok" = "xno"
-then
- AC_MSG_RESULT(no)
- AC_MSG_WARN(unable to link with vtk library)
-else
- AC_MSG_RESULT(yes)
- VTK_LIBS="$LOCAL_LIBS"
- VTK_MT_LIBS="$LOCAL_LIBS"
-fi
-
-AC_MSG_RESULT(for VTK: $vtk_ok)
-
-AC_LANG_RESTORE
-
-# Save cache
-AC_CACHE_SAVE
-
-])dnl
+++ /dev/null
-#
-# ============================================================
-# This file defines the common definitions used in several
-# Makefile. This file must be included, if needed, by the file
-# Makefile.am.
-# ============================================================
-#
-
-# Standard directory for installation
-salomeincludedir = $(includedir)/@PACKAGE@
-libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/@PACKAGE@
-bindir = $(prefix)/bin/@PACKAGE@
-salomescriptdir = $(bindir)
-
-# Directory for installing idl files
-salomeidldir = $(prefix)/idl/@PACKAGE@
-
-# Directory for installing resource files
-salomeresdir = $(prefix)/share/@PACKAGE@/resources/@MODULE_NAME@
-
-# Directories for installing admin files
-admlocaldir = $(prefix)/adm_local
-admlocalunixdir = $(admlocaldir)/unix
-admlocalm4dir = $(admlocaldir)/unix/config_files
-
-# Shared modules installation directory
-sharedpkgpythondir =$(pkgpythondir)/shared_modules
-
-# Documentation directory
-docdir = $(datadir)/doc/@PACKAGE@
-
-# common rules
-
-# moc-files generation
-%_moc.cxx: %.h
- $(MOC) $< -o $@
-
-# qm-files generation
-%.qm: resources/%.po
- $(MSG2QM) $< $@
-
-EXTRA_DIST=$(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=resources/%.po)
-
-mostlyclean-local:
- rm -f @builddir@/*_moc.cxx
- rm -f @builddir@/*.qm
-
-# tests
-tests: unittest
-
-unittest: $(UNIT_TEST_PROG)
- @if test "x$(UNIT_TEST_PROG)" != "x"; then \
- $(UNIT_TEST_PROG); \
- fi;
+++ /dev/null
-#=======================================================================
-# This section of this makefile comes from the file
-# 'adm/unix/make_conclude' which was generated with config.status
-# from file adm/unix/make_conclude.in
-#=======================================================================
-# -* Makefile *-
-#
-# Authors : Patrick GOLDBRONN (CEA) - Marc Tajchman (CEA)
-# Date : 6/07/2001
-# $Header$
-#
-
-ifneq ($(GUI_DISABLE_CORBA),yes)
-# ORB Specifics rules
-
-@CORBA@
-
-# transform idl reference in appropriate obj file
-LIB_CLIENT_SRC = $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_CXX))
-LIB_SERVER_SRC = $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_CXX))
-LIB_SWIG_SRC = $(SWIG_DEF:%.i=%_wrap.cxx)
-else
-LIB_CLIENT_SRC =
-LIB_SERVER_SRC =
-LIB_SWIG_SRC =
-endif
-
-LIB_MOC_SRC = $(LIB_MOC:%.h=%_moc.cxx)
-LIB_SRC+=$(LIB_MOC_SRC)
-LIB_DEP= $(LIB_SRC) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(LIB_SWIG_SRC)
-
-ifneq ($(GUI_DISABLE_CORBA),yes)
-LIB_CLIENT_OBJ = $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_OBJ))
-LIB_SERVER_OBJ = $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_OBJ))
-LIB_SWIG_OBJ = $(LIB_SWIG_SRC:%.cxx=%.lo)
-else
-LIB_CLIENT_OBJ =
-LIB_SERVER_OBJ =
-LIB_SWIG_OBJ =
-endif
-
-# transform c file in appropriate libtool obj file (.c, .cc and .cxx)
-LIB_OBJ_C = $(patsubst %.c, %.lo, $(filter %.c, $(LIB_SRC)))
-LIB_OBJ_CC = $(patsubst %.cc, %.lo, $(filter %.cc, $(LIB_SRC)))
-LIB_OBJ_CXX = $(patsubst %.cxx, %.lo, $(filter %.cxx, $(LIB_SRC)))
-LIB_OBJ_F = $(patsubst %.f, %.lo, $(filter %.f, $(LIB_SRC)))
-
-# all libtool obj file in library
-LIB_OBJ = $(LIB_OBJ_CXX) $(LIB_OBJ_CC) $(LIB_OBJ_C) $(LIB_CLIENT_OBJ:%.o=%.lo) $(LIB_SERVER_OBJ:%.o=%.lo) $(LIB_SWIG_OBJ) $(LIB_OBJ_F)
-
-# LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la)
-LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la, $(filter %.la, $(LIB)))
-LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a, $(filter %.a, $(LIB)))
-LIB_BUILD_SO = $(patsubst %.so, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.so, $(filter %.so, $(LIB)))
-
-ifneq ($(findstring cmodule.la,$(filter %.la, $(LIB))),)
-ifneq ($(GUI_DISABLE_CORBA),yes)
-LIB_SWIG = $(patsubst %cmodule.la,%.so, $(filter %.la, $(LIB)))
-else
-LIB_SWIG =
-endif
-else
-LIB_SWIG =
-endif
-
-lib: $(LIB_BUILD) $(LIB_BUILD_SO) $(LIB_CLIENT_PY)
-# we don't build static library !
-
-$(LIB_BUILD): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la: %.la
- -$(RM) $@
- -$(RM) $(patsubst %.la, %.so, $@)
- -$(RM) $(patsubst %.la, %.a, $@)
- ln -sf $(CURDIR)/$< $@ || true
- ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<) \
- $(patsubst %.la, %.so, $@) || true
- ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \
- $(patsubst %.la, %.so, $@).0 || true
-
- if ! test -z $(LIB_SWIG) ; then \
- ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/_$(LIB_SWIG) || true;\
- fi;
-
-$(LIB_BUILD_A): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a: %.a
- -$(RM) $@
- ln -sf $(CURDIR)/$< $@ || true
-
-$(LIB_BUILD_SO): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.so: %.so
- -$(RM) $@
- ln -sf $(CURDIR)/$< $@ || true
-
-$(LIB): $(LIB_OBJ)
- @$(LT) --mode=link $(CXX) -shared -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS)
-
-# transform idl reference in appropriate obj file
-ifneq ($(GUI_DISABLE_CORBA),yes)
-BIN_CLIENT_SRC = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_CXX))
-BIN_SERVER_SRC = $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_CXX))
-else
-BIN_CLIENT_SRC =
-BIN_SERVER_SRC =
-endif
-BIN_MOC_SRC = $(BIN_MOC:%.h=%_moc.cxx)
-BIN_SRC+=$(BIN_MOC_SRC)
-BIN_DEP=$(BIN:%=%.cxx) $(BIN_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC)
-
-ifneq ($(GUI_DISABLE_CORBA),yes)
-BIN_CLIENT_OBJ = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_OBJ))
-BIN_SERVER_OBJ = $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_OBJ))
-else
-BIN_CLIENT_OBJ =
-BIN_SERVER_OBJ =
-endif
-# transform c file in appropriate libtool obj file (.c)
-BIN_OBJ_C = $(patsubst %.c, %.o, $(filter %.c, $(BIN_SRC)))
-# transform c++ file in appropriate libtool obj file (.cc and .cxx)
-BIN_OBJ_CC = $(patsubst %.cc, %.o, $(filter %.cc, $(BIN_SRC)))
-BIN_OBJ_CXX = $(patsubst %.cxx, %.o, $(filter %.cxx, $(BIN_SRC)))
-# all obj file in bin target
-BIN_OBJ = $(BIN_OBJ_CC) $(BIN_OBJ_CXX) $(BIN_OBJ_C) $(BIN_CLIENT_OBJ) $(BIN_SERVER_OBJ)
-
-bin: $(BIN:%=$(top_builddir)/bin/salome/%) $(BIN) $(LIB) pyscripts sharedpyscripts
-
-BIN_LIB=$(LIB:lib%.la=-l%)
-
-$(BIN:%=$(top_builddir)/bin/salome/%) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%): $(top_builddir)/bin/salome/%: %
- -$(RM) $@
- ln -sf $(CURDIR)/$< $@
-
-$(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ)
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGSFORBIN) $(LIBSFORBIN)
-
-# copy python scripts in $(top_builddir)/bin/salome
-#
-
-UI_FILES = $(notdir $(wildcard $(srcdir)/*.ui))
-UI_PY_FILES_PY = $(patsubst %.ui, %.py, $(UI_FILES))
-UI_PY_FILES = $(filter-out $(EXPORT_PYSCRIPTS) ,$(UI_PY_FILES_PY))
-
-DEST_PYSCRIPTS = $(EXPORT_PYSCRIPTS:%=$(top_builddir)/bin/salome/%)
-DEST_UI_PY_FILES = $(UI_PY_FILES:%=$(top_builddir)/bin/salome/%)
-pyscripts: $(DEST_PYSCRIPTS) $(UI_PY_FILES) $(DEST_UI_PY_FILES)
-$(DEST_PYSCRIPTS): $(top_builddir)/bin/salome/%: %
- cp -f $< $@
-
-# generate generic python scripts from *.ui files
-#
-$(UI_PY_FILES): %.py: %.ui
- $(PYUIC) $< -o $@
-
-# copy ui-generated python scripts in $(top_builddir)/bin
-#
-$(DEST_UI_PY_FILES): $(top_builddir)/bin/salome/%: %
- cp -f $< $@
-
-# copy pyqt files in $(PYTHON_SHARED_SITE)
-#
-PYTHON_SHARED_SITE=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules
-
-$(PYTHON_SHARED_SITE):
- $(INSTALL) -d $@
-
-DEST_SHAREDPYSCRIPTS = $(EXPORT_SHAREDPYSCRIPTS:%=$(PYTHON_SHARED_SITE)/%)
-sharedpyscripts: $(PYTHON_SHARED_SITE) $(DEST_SHAREDPYSCRIPTS)
-$(DEST_SHAREDPYSCRIPTS): $(PYTHON_SHARED_SITE)/%: %
- cp -f $< $@
-
-check: test
-
-tests: unittest
-
-test: $(LIB) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%)
-
-unittest:
- @if test "x$(UNIT_TEST_PROG)" != "x"; then \
- $(top_builddir)/bin/salome/$(UNIT_TEST_PROG); \
- fi;
-
-# copy header file in $(inc_builddir)
-#
-DEST_HEADERS = $(EXPORT_HEADERS:%=$(inc_builddir)/%)
-inc: $(DEST_HEADERS)
-$(DEST_HEADERS): $(inc_builddir)/%: %
- cp -f $< $@
-
-# build resources file (icons and messages) : .qm file from .po file
-RESOURCES_FILES_ALL := $(notdir $(wildcard $(srcdir)/resources/*))
-RESOURCES_FILES_ALL := $(filter-out CVS, $(RESOURCES_FILES_ALL))
-RESOURCES_FILES_ALL := $(filter-out %.po, $(RESOURCES_FILES_ALL))
-RESOURCES_FILES_ALL := $(filter-out %.in, $(RESOURCES_FILES_ALL))
-RESOURCES_FILES ?= $(RESOURCES_FILES_ALL)
-
-resources: resources-po resources-cp
-
-resources-po: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm)
-
-resources-cp: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%)
-
-$(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%): $(top_builddir)/share/salome/resources/$(MODULE_NAME)/% : %
- cp -fr $< $@;
-
-# Make installation directories if they don't exist.
-$(libdir) $(includedir) $(bindir) $(datadir) $(idldir) $(sharedpydir):
- $(INSTALL) -d $@ && chmod 755 $@
-
-# Install the library, the public header files, and programs.
-install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) install-python install-sharedpyqt install-qm install-res
- @for f in X $(LIB); do \
- if test $$f != X; then \
- ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1); \
- fi; \
- done
- @if ! test -z $(LIB_SWIG) ; then \
- (cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG) || true); \
- fi;
- @for f in X $(BIN); do \
- if test $$f != X; then \
- ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \
- fi; \
- done
-# Install tests programmes in bindir
- @for f in X $(TEST_PROGS); do \
- if test $$f != X; then \
- ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \
- fi; \
- done
-# Install exported includes in includedir
- @for f in X $(EXPORT_HEADERS:%=$(srcdir)/%); do \
- if test $$f != X; then \
- (cp -p -f $$f $(includedir) || exit 1); \
- fi; \
- done
-
-# Install python script in $(bindir)
-install-python: $(bindir) $(EXPORT_PYSCRIPTS:%=install-%) $(UI_PY_FILES:%=install-%)
-
-$(UI_PY_FILES:%=install-%): install-%: %
- $(INSTALL_PROGRAM) $< $(bindir)/.
-
-$(EXPORT_PYSCRIPTS:%=install-%): install-%: %
- $(INSTALL_PROGRAM) $< $(bindir)/.
-
-#install-python: $(bindir) $(EXPORT_PYSCRIPTS)
-# @for f in X $(EXPORT_PYSCRIPTS); do \
-# if test $$f != X; then \
-# ($(INSTALL_PROGRAM) $$f $(bindir)/. || exit 1); \
-# fi; \
-# done
-
-# Install pyqt script in $(install-sharedpyqt)
-install-sharedpyqt: $(sharedpydir) $(EXPORT_SHAREDPYSCRIPTS:%=install-%)
-
-$(EXPORT_SHAREDPYSCRIPTS:%=install-%): install-%: %
- $(INSTALL_PROGRAM) $< $(sharedpydir)/.
-
-
-# generic rule to install .qm files :
-install-qm: resources
- $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME)
- @for f in X $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm); do \
- if test $$f != X; then \
- ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1); \
- fi; \
- done
-
-# generic rule to install resources files (png, ini ...):
-install-res: resources
- $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME)
- @for f in X $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%); do \
- if test $$f != X; then \
- ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1); \
- fi; \
- done
-
-# Removes those things that `make install' (would have) installed.
-uninstall:
- @if test "X$(LIB)" != X; then \
- for f in $(LIB); do \
- $(LT_UNINSTALL) $(libdir)/$$f; \
- done; \
- fi
- @if test "X$(BIN)" != X; then \
- for f in $(BIN); do \
- $(LT_UNINSTALL) $(bindir)/$$f; \
- done; \
- fi
- @for f in X $(TEST_PROGS); do \
- if test $$f != X; then \
- $(LT_UNINSTALL) $(bindir)/$$f; \
- fi; \
- done
-# Uninstall exported includes in includedir
- @for f in X $(EXPORT_HEADERS); do \
- if test $$f != X; then \
- $(LT_UNINSTALL) $(includedir)/$$f; \
- fi; \
- done
-# Uninstall python script in $(bindir)
- @for f in X $(EXPORT_PYSCRIPTS); do \
- if test $$f != X; then \
- $(LT_UNINSTALL) $(bindir)/$$f ; \
- fi; \
- done
-
-# Uninstall python script in $(bindir)
- @for f in X $(UI_PY_FILES); do \
- if test $$f != X; then \
- $(LT_UNINSTALL) $(bindir)/$$f ; \
- fi; \
- done
-
-# Uninstall pyqt script in $(sharedpydir)
- @for f in X $(EXPORT_SHAREDPYSCRIPTS); do \
- if test $$f != X; then \
- $(LT_UNINSTALL) $(sharedpydir)/$$f ; \
- fi; \
- done
-
-# Uninstall qm files
- @for f in X $(PO_FILES:%.po=%.qm); do \
- if test $$f != X; then \
- $(LT_UNINSTALL) $(datadir)/resources/$(MODULE_NAME)/$$f ; \
- fi; \
- done
-
-# remove all dependencies files
-#
-cleandep:
- -$(RM) .dep*
-
-# Removes temporary files without removing the final target files. That is,
-# remove things like object files but not libraries or executables.
-#
-mostlyclean: cleandep
- -$(RM) $(LIB_OBJ) $(LIB_OBJ:.lo=.o)
- -$(RM) $(BIN_OBJ) $(BIN:%=%.o)
- -$(RM) $(TEST_OBJ) $(TEST_OBJ:.lo=.o)
- -$(RM) $(PROG_OBJ) $(PROG_OBJ:.lo=.o) $(MOSTLYCLEAN)
-
-# Like `mostlyclean' except it also removes the final targets: things like
-# libraries and executables. This target doesn't remove any file that
-# is part of the SALOME distribution.
-#
-clean: mostlyclean
- -$(RM) $(LIB) $(TEST_PROGS) $(BIN) $(CLEAN)
- -$(RM) TAGS *~ *# core *.core
- -$(RM) -r .libs
- -$(RM) $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB)
- -$(RM) $(patsubst %,$(top_builddir)/bin/salome/%, $(BIN))
- -$(RM) $(patsubst %.la, %.so, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB))
- -$(RM) $(patsubst %.la, %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB))
-# remove idl generated files (sources)
- -$(RM) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC)
-# remove idl generated files (headers)
- -$(RM) $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_H))
- -$(RM) $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_H))
- -$(RM) $(LIB_MOC_SRC) $(BIN_MOC_SRC)
- -$(RM) $(LIB_SWIG_SRC)
-
-# Like `clean' except it also removes files that were created by running
-# configure. If you've unpacked the source and built without creating
-# any other files, then `make distclean' will leave only the files that were
-# in the distribution.
-#
-distclean: clean
- #remove qm file !
- -$(RM) $(PO_FILES:%.po=%.qm) $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm)
- #remove include files
- -$(RM) $(DEST_HEADERS)
- -$(RM) $(DISTCLEAN) *.bak *.old *.new .dep*
- @if test -f $(srcdir)/Makefile.in; then \
- (@SETX@; $(RM) Makefile); \
- fi
-
-
-#implicits rules
-.cc.o:
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
-
-.cc.lo:
- $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
-
-.cxx.o:
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
-
-.cxx.lo:
- $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
-
-.c.o:
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
-
-.c.lo:
- $(LT_COMPILE) $(CFLAGS) $(CPPFLAGS) -c $<
-
-.f.o:
- $(FC) $(FFLAGS) -c $< -o $@
-
-.f.lo:
- $(LT) --mode=compile $(FC) $(FFLAGS) -c $<
-
-.ui.h:
- $(UIC) -o $@ $<
-
-.ui.cxx:
- $(UIC) -o $@ -i $*.h $<
-
-#pattern rules
-%_moc.cxx : %.h
- $(MOC) $< -o $@
-
-%_wrap.cxx : %.i
- $(SWIG) $(SWIG_FLAGS) -o $@ $<
-
-$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm: %.po
- $(MSG2QM) $< $@ ; \
-
-#------------------------------------------------------------------------------
-# The following section of this makefile contains dependencies between the
-# source files and the header files. If GNU make and GCC are being used then
-# the dependencies are in the form of rules that cause the information to
-# be kept updated automatically. Otherwise the dependencies are listed
-# explicitly and come from the `.distdep' files in the various directories.
-# These files are part of the distribution and are generated automatically on
-# GNU/GCC systems.
-#------------------------------------------------------------------------------
-
-@DEPEND@
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
-# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
-# 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
-# -* Makefile *-
-#
-# Author : Guillaume Boulant (CSSI)
-# Module : KERNEL
-# $Header$
-#
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-#
-# ===============================================================
-# Files to be installed
-# ===============================================================
-#
-
-# These files are data, module or lib files
-nodist_salomescript_DATA= VERSION
-
-EXTRA_DIST+= VERSION.in
-
-# These files are executable scripts
-dist_salomescript_SCRIPTS=\
- runLightSalome.csh \
- runLightSalome.sh
+++ /dev/null
-THIS IS SALOME - SALOMEGUI VERSION: @VERSION@
+++ /dev/null
-#!/bin/csh -f
-
-# this variable necessary for loading .ini or .xml file
-if ( ! $?LightAppConfig ) setenv LightAppConfig ${GUI_ROOT_DIR}/share/salome/resources/gui
-if ( ! $?LightAppResources ) setenv LightAppResources ${GUI_ROOT_DIR}/share/salome/resources/gui
-
-SUITApp LightApp -style salome $* &
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-#!/bin/bash -f
-
-# this variable necessary for loading .ini or .xml file
-if [ -z "$LightAppConfig" ] ; then
- export LightAppConfig=${GUI_ROOT_DIR}/share/salome/resources/gui
-fi
-if [ -z "$LightAppResources" ] ; then
- export LightAppResources=${GUI_ROOT_DIR}/share/salome/resources/gui
-fi
-
-SUITApp LightApp -style salome $* &
+++ /dev/null
-#!/bin/bash
-
-#
-# Tool for updating list of .in file for the SALOME project
-# and regenerating configure script
-#
-# Author : Marc Tajchman - CEA
-# Date : 10/10/2002
-# $Header$
-#
-# 26/10/2006: Mikhail PONIKAROV - OCN
-# Reorganization for uage of autotools
-
-ORIG_DIR=`pwd`
-CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
-
-# ____________________________________________________________________
-# Test if the KERNEL_ROOT_DIR is set correctly
-if test ! -d "${KERNEL_ROOT_DIR}"; then
- echo "failed : KERNEL_ROOT_DIR variable is not correct !"
- exit
-fi
-
-cd ${CONF_DIR}
-ABS_CONF_DIR=`pwd`
-
-mkdir -p salome_adm/unix/config_files
-#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
-#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
-
-# remove KERNEL deprecated configure files
-#for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
-# check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig \
-# ac_cxx_typename.m4 check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4
-#do
-# rm salome_adm/unix/config_files/${deprecated}
-#done
-
-# remove KERNEL CVS directories in subdirectory salome_adm
-#for deprecated in CVS unix/CVS unix/config_files/CVS
-#do
-# rm -rf salome_adm/${deprecated}
-#done
-
-cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
-
-# ____________________________________________________________________
-# aclocal creates the aclocal.m4 file from the standard macro and the
-# custom macro embedded in the directory salome_adm/unix/config_files
-# and KERNEL config_files directory.
-# output:
-# aclocal.m4
-# autom4te.cache (directory)
-echo "====================================================== aclocal"
-
-aclocal -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
- -I adm_local/unix/config_files || exit 1
-
-# ____________________________________________________________________
-# libtoolize creates some configuration files (ltmain.sh,
-# config.guess and config.sub). It only depends on the libtool
-# version. The files are created in the directory specified with the
-# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
-# output:
-# salome_adm/unix/config_files/config.guess
-# salome_adm/unix/config_files/config.sub
-# salome_adm/unix/config_files/ltmain.sh
-#echo "====================================================== libtoolize"
-
-libtoolize --force --copy --automake || exit 1
-
-# ____________________________________________________________________
-# make link to KERNEL configuration files to
-#ln -sf ${KERNEL_ROOT_DIR}/salome_adm .
-
-# ____________________________________________________________________
-# autoconf creates the configure script from the file configure.ac (or
-# configure.in if configure.ac doesn't exist)
-# output:
-# configure
-echo "====================================================== autoconf"
-
-autoconf
-
-# ____________________________________________________________________
-# automake creates some scripts used in building process
-# (install-sh, missing, ...). It only depends on the automake
-# version. The files are created in the directory specified with the
-# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
-# creates the Makefile.in files from the Makefile.am files.
-# output:
-# salome_adm/unix/config_files/compile
-# salome_adm/unix/config_files/depcomp
-# salome_adm/unix/config_files/install-sh
-# salome_adm/unix/config_files/missing
-# salome_adm/unix/config_files/py-compile
-# Makefile.in (from Makefile.am)
-echo "====================================================== automake"
-
-automake --copy --gnu --add-missing
+++ /dev/null
-#!/bin/sh
-
-rm -rf autom4te.cache aclocal.m4 configure make_config
-find . -name "*~" -print -exec rm {} \;
-find . -name "*.pyc" -print -exec rm {} \;
-#exit
-# ==================== ON SORT AVANT
-
-find bin -name Makefile.in | xargs rm -f
-find doc -name Makefile.in | xargs rm -f
-find idl -name Makefile.in | xargs rm -f
-find resources -name Makefile.in | xargs rm -f
-find salome_adm -name Makefile.in | xargs rm -f
-find src -name Makefile.in | xargs rm -f
-rm -f Makefile.in
+++ /dev/null
-#
-# Author : Marc Tajchman (CEA)
-# Date : 28/06/2001
-# Modified by : Patrick GOLDBRONN (CEA)
-# Modified by : Marc Tajchman (CEA)
-# Modified by : Mikhail PONIKAROV (OCN) - autotools usage
-#
-# Created from configure.in.base
-#
-AC_INIT([Salome2 Project GUI module], [4.1.1], [webmaster.salome@opencascade.com], [salome])
-AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
-AC_CANONICAL_HOST
-AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE
-
-XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
-AC_SUBST(XVERSION)
-
-# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
-MODULE_NAME=gui
-AC_SUBST(MODULE_NAME)
-
-echo
-echo ---------------------------------------------
-echo Initialize source and build root directories
-echo ---------------------------------------------
-echo
-
-########################################################################
-# Check --disable-corba-gen and other --disable-* options
-
-if test "x${enable_corba_gen}" != "xno" ; then
- GUI_DISABLE_CORBA="no"
-else
- GUI_DISABLE_CORBA="yes"
-fi
-
-if test "x${enable_pyConsole}" != "xno" ; then
- DISABLE_PYCONSOLE="no"
-else
- DISABLE_PYCONSOLE="yes"
-fi
-
-if test "x${enable_glViewer}" != "xno" ; then
- DISABLE_GLVIEWER="no"
-else
- DISABLE_GLVIEWER="yes"
-fi
-
-if test "x${enable_plot2dViewer}" != "xno" ; then
- DISABLE_PLOT2DVIEWER="no"
-else
- DISABLE_PLOT2DVIEWER="yes"
-fi
-
-if test "x${enable_supervGraphViewer}" != "xno" ; then
- DISABLE_SUPERVGRAPHVIEWER="no"
-else
- DISABLE_SUPERVGRAPHVIEWER="yes"
-fi
-
-if test "x${enable_occViewer}" != "xno" ; then
- DISABLE_OCCVIEWER="no"
-else
- DISABLE_OCCVIEWER="yes"
-fi
-
-if test "x${enable_vtkViewer}" != "xno" ; then
- DISABLE_VTKVIEWER="no"
-else
- DISABLE_VTKVIEWER="yes"
-fi
-
-if test "x${enable_salomeObject}" != "xno" ; then
- DISABLE_SALOMEOBJECT="no"
-else
- DISABLE_SALOMEOBJECT="yes"
-fi
-
-if test "x${enable_qxGraphViewer}" != "xno" ; then
- DISABLE_QXGRAPHVIEWER="no"
-else
- DISABLE_QXGRAPHVIEWER="yes"
-fi
-
-
-dnl
-dnl Initialize source and build root directories
-dnl
-
-ROOT_BUILDDIR=`pwd`
-ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
-cd $ROOT_SRCDIR
-ROOT_SRCDIR=`pwd`
-cd $ROOT_BUILDDIR
-
-AC_SUBST(ROOT_SRCDIR)
-AC_SUBST(ROOT_BUILDDIR)
-
-echo
-echo Source root directory : $ROOT_SRCDIR
-echo Build root directory : $ROOT_BUILDDIR
-echo
-echo
-
-if test -z "$AR"; then
- AC_CHECK_PROGS(AR,ar xar,:,$PATH)
-fi
-AC_SUBST(AR)
-
-dnl Export the AR macro so that it will be placed in the libtool file
-dnl correctly.
-export AR
-
-echo
-echo ---------------------------------------------
-echo testing make
-echo ---------------------------------------------
-echo
-
-AC_PROG_MAKE_SET
-AC_PROG_INSTALL
-dnl
-dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
-
-echo
-echo ---------------------------------------------
-echo Coniguring production
-echo ---------------------------------------------
-echo
-AC_ENABLE_DEBUG(yes)
-AC_DISABLE_PRODUCTION
-
-echo ---------------------------------------------
-echo testing libtool
-echo ---------------------------------------------
-
-dnl first, we set static to no!
-dnl if we want it, use --enable-static
-AC_ENABLE_STATIC(no)
-
-AC_LIBTOOL_DLOPEN
-AC_PROG_LIBTOOL
-
-dnl Fix up the INSTALL macro if it s a relative path. We want the
-dnl full-path to the binary instead.
-case "$INSTALL" in
- *install-sh*)
- INSTALL='\${ROOT_BUILDDIR}'/salome_adm/unix/config_files/install-sh
- ;;
-esac
-
-echo
-echo ---------------------------------------------
-echo testing C/C++
-echo ---------------------------------------------
-echo
-
-cc_ok=no
-dnl inutil car libtool
-dnl AC_PROG_CC
-AC_PROG_CXX
-AC_CXX_WARNINGS
-AC_CXX_TEMPLATE_OPTIONS
-AC_DEPEND_FLAG
-# AC_CC_WARNINGS([ansi])
-cc_ok=yes
-
-dnl Library libdl :
-AC_CHECK_LIB(dl,dlopen)
-
-dnl add library libm :
-AC_CHECK_LIB(m,ceil)
-
-dnl
-dnl Well we use sstream which is not in gcc pre-2.95.3
-dnl We must test if it exists. If not, add it in include !
-dnl
-
-AC_CXX_HAVE_SSTREAM
-
-dnl
-dnl ---------------------------------------------
-dnl testing MPICH
-dnl ---------------------------------------------
-dnl
-
-CHECK_MPICH
-
-echo
-echo ---------------------------------------------
-echo testing LEX \& YACC
-echo ---------------------------------------------
-echo
-
-lex_yacc_ok=no
-AC_PROG_YACC
-AC_PROG_LEX
-lex_yacc_ok=yes
-
-echo
-echo ---------------------------------------------
-echo testing python
-echo ---------------------------------------------
-echo
-
-CHECK_PYTHON
-
-dnl echo
-dnl echo ---------------------------------------------
-dnl echo testing java
-dnl echo ---------------------------------------------
-dnl echo
-
-dnl CHECK_JAVA
-
-echo
-echo ---------------------------------------------
-echo Testing Disable Corba
-echo ---------------------------------------------
-echo
-
-CHECK_DISABLE_CORBA
-echo "GUI_DISABLE_CORBA = "$GUI_DISABLE_CORBA
-
-if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
-
-echo
-echo ---------------------------------------------
-echo testing swig
-echo ---------------------------------------------
-echo
-
-AM_PATH_PYTHON(2.3)
-CHECK_SWIG
-fi
-
-echo
-echo ---------------------------------------------
-echo testing threads
-echo ---------------------------------------------
-echo
-
-ENABLE_PTHREADS
-
-if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
-echo
-echo ---------------------------------------------
-echo testing omniORB
-echo ---------------------------------------------
-echo
-
-CHECK_OMNIORB
-
-dnl echo
-dnl echo ---------------------------------------------
-dnl echo testing mico
-dnl echo ---------------------------------------------
-dnl echo
-
-dnl CHECK_MICO
-
-echo
-echo ---------------------------------------------
-echo default ORB : omniORB
-echo ---------------------------------------------
-echo
-
-DEFAULT_ORB=omniORB
-
-echo
-echo ---------------------------------------------
-echo testing Corba
-echo ---------------------------------------------
-echo
-
-CHECK_CORBA
-
-AC_SUBST_FILE(CORBA)
-corba=make_$ORB
-CORBA=adm_local/unix/$corba
-
-fi
-echo
-echo ---------------------------------------------
-echo testing openGL
-echo ---------------------------------------------
-echo
-
-CHECK_OPENGL
-
-echo
-echo ---------------------------------------------
-echo testing QT
-echo ---------------------------------------------
-echo
-
-CHECK_QT
-
-echo
-echo ---------------------------------------------
-echo testing msg2qm
-echo ---------------------------------------------
-echo
-
-CHECK_MSG2QM
-
-echo
-echo ---------------------------------------------
-echo testing VTK
-echo ---------------------------------------------
-echo
-
-CHECK_VTK
-
-echo
-echo ---------------------------------------------
-echo testing HDF5
-echo ---------------------------------------------
-echo
-
-CHECK_HDF5
-
-echo
-echo ---------------------------------------------
-echo BOOST Library
-echo ---------------------------------------------
-echo
-
-CHECK_BOOST
-
-echo
-echo ---------------------------------------------
-echo Testing OpenCascade
-echo ---------------------------------------------
-echo
-
-CHECK_CAS
-
-echo
-echo ---------------------------------------------
-echo Testing sip
-echo ---------------------------------------------
-echo
-
-CHECK_SIP
-
-echo
-echo ---------------------------------------------
-echo Testing pyqt
-echo ---------------------------------------------
-echo
-
-CHECK_PYQT
-
-echo
-echo ---------------------------------------------
-echo Testing qwt
-echo ---------------------------------------------
-echo
-
-CHECK_QWT
-
-echo
-echo ---------------------------------------------
-echo Testing PyConsole
-echo ---------------------------------------------
-echo
-
-CHECK_PYCONSOLE
-echo "DISABLE_PYCONSOLE = "$DISABLE_PYCONSOLE
-
-echo
-echo ---------------------------------------------
-echo Testing GlViewer
-echo ---------------------------------------------
-echo
-
-CHECK_GLVIEWER
-echo "DISABLE_GLVIEWER = "$DISABLE_GLVIEWER
-
-echo
-echo ---------------------------------------------
-echo Testing Plot2dViewer
-echo ---------------------------------------------
-echo
-
-CHECK_PLOT2DVIEWER
-echo "DISABLE_PLOT2DVIEWER = "$DISABLE_PLOT2DVIEWER
-
-echo
-echo ---------------------------------------------
-echo Testing SupervGraphViewer
-echo ---------------------------------------------
-echo
-
-CHECK_SUPERVGRAPHVIEWER
-echo "DISABLE_SUPERVGRAPHVIEWER = "$DISABLE_SUPERVGRAPHVIEWER
-
-echo
-echo ---------------------------------------------
-echo Testing OCCViewer
-echo ---------------------------------------------
-echo
-
-CHECK_OCCVIEWER
-echo "DISABLE_OCCVIEWER = "$DISABLE_OCCVIEWER
-
-echo
-echo ---------------------------------------------
-echo Testing VTKViewer
-echo ---------------------------------------------
-echo
-
-CHECK_VTKVIEWER
-echo "DISABLE_VTKVIEWER = "$DISABLE_VTKVIEWER
-
-echo
-echo ---------------------------------------------
-echo Testing SalomeObject
-echo ---------------------------------------------
-echo
-
-CHECK_SALOMEOBJECT
-echo "DISABLE_SALOMEOBJECT = "$DISABLE_SALOMEOBJECT
-
-echo
-echo ---------------------------------------------
-echo Testing QxGraphViewer
-echo ---------------------------------------------
-echo
-
-CHECK_QXGRAPHVIEWER
-echo "DISABLE_QXGRAPHVIEWER = "$DISABLE_QXGRAPHVIEWER
-
-if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
- if test "x${DISABLE_PYCONSOLE}" == "xyes" ; then
- echo "failed : for full configuration of GUI module necessary enable PyConsole !"
- exit
- fi
- if test "x${DISABLE_GLVIEWER}" == "xyes" ; then
- echo "failed : for full configuration of GUI module necessary enable GlViewer !"
- exit
- fi
- if test "x${DISABLE_PLOT2DVIEWER}" == "xyes" ; then
- echo "failed : for full configuration of GUI module necessary enable Plot2dViewer !"
- exit
- fi
- if test "x${DISABLE_SUPERVGRAPHVIEWER}" == "xyes" ; then
- echo "failed : for full configuration of GUI module necessary enable SupervGraphViewer !"
- exit
- fi
- if test "x${DISABLE_OCCVIEWER}" == "xyes" ; then
- echo "failed : for full configuration of GUI module necessary enable OCCViewer !"
- exit
- fi
- if test "x${DISABLE_VTKVIEWER}" == "xyes" ; then
- echo "failed : for full configuration of GUI module necessary enable VTKViewer !"
- exit
- fi
- if test "x${DISABLE_SALOMEOBJECT}" == "xyes" ; then
- echo "failed : for full configuration of GUI module necessary enable SalomeObject !"
- exit
- fi
- if test "x${DISABLE_QXGRAPHVIEWER}" == "xyes" ; then
- echo "failed : for full configuration of GUI module necessary enable QxGraphViewer !"
- exit
- fi
-fi
-
-echo
-echo ---------------------------------------------
-echo Testing html generators
-echo ---------------------------------------------
-echo
-
-CHECK_HTML_GENERATORS
-
-echo
-echo ---------------------------------------------
-echo Testing Kernel
-echo ---------------------------------------------
-echo
-CHECK_KERNEL
-
-echo
-echo ---------------------------------------------
-echo Testing CPPUNIT only required for unit testing
-echo ---------------------------------------------
-echo
-
-CHECK_CPPUNIT
-
-echo
-echo ---------------------------------------------
-echo Testing libxml2
-echo ---------------------------------------------
-echo
-
-CHECK_LIBXML
-
-echo
-echo ---------------------------------------------
-echo Summary
-echo ---------------------------------------------
-echo
-
-if test "$GUI_DISABLE_CORBA" == "yes"; then
- echo "Configure (without Corba)"
-else
- echo Configure
-fi
-
-
-if test "$GUI_DISABLE_CORBA" != "yes"; then
-variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok msg2qm_ok vtk_ok hdf5_ok
-omniORB_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok"
-else
-variables="cc_ok lex_yacc_ok python_ok threads_ok OpenGL_ok qt_ok msg2qm_ok vtk_ok hdf5_ok boost_ok
-occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok"
-fi
-
-for var in $variables
-do
- printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
- eval echo \$$var
-done
-
-echo "---Optional:"
-variables="cppunit_ok"
-
-for var in $variables
-do
- eval toto=\$$var
- if test x$toto != "x"; then
- printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
- eval echo \$$var
- fi
-done
-
-if test "$GUI_DISABLE_CORBA" != "yes"; then
-echo
-echo "Default ORB : $DEFAULT_ORB"
-echo
-fi
-
-dnl We don t need to say when we re entering directories if we re using
-dnl GNU make becuase make does it for us.
-if test "X$GMAKE" = "Xyes"; then
- AC_SUBST(SETX) SETX=":"
-else
- AC_SUBST(SETX) SETX="set -x"
-fi
-
-AM_CONDITIONAL(GUI_ENABLE_CORBA, [test "$GUI_DISABLE_CORBA" = no])
-AM_CONDITIONAL(ENABLE_PYCONSOLE, [test "$DISABLE_PYCONSOLE" = no])
-AM_CONDITIONAL(ENABLE_GLVIEWER, [test "$DISABLE_GLVIEWER" = no])
-AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no])
-AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no])
-AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no])
-AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
-AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no])
-AM_CONDITIONAL(ENABLE_QXGRAPHVIEWER, [test "$DISABLE_QXGRAPHVIEWER" = no])
-
-echo
-echo ---------------------------------------------
-echo copying resource files, shell scripts, and
-echo xml files
-echo ---------------------------------------------
-echo
-
-
-dnl copy shells and utilities contained in the bin directory
-dnl excluding .in files (treated in AC-OUTPUT below) and CVS
-dnl directory
-
-mkdir -p bin/salome
-cd bin/salome
-
-for i in $ROOT_SRCDIR/bin/*
-do
- local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
- case "$local_bin" in
- *.in | *~) ;;
- ./bin/CVS | ./bin/salome) ;;
- *) $INSTALL $i . ; echo $local_bin ;;
- esac
-done
-cd $ROOT_BUILDDIR
-
-echo
-echo ---------------------------------------------
-echo generating Makefiles and configure files
-echo ---------------------------------------------
-echo
-
-AC_OUTPUT_COMMANDS([ \
- chmod +x ./bin/*; \
- chmod +x ./bin/salome/*; \
-])
-
-# This list is initiated using autoscan and must be updated manually
-# when adding a new file <filename>.in to manage. When you execute
-# autoscan, the Makefile list is generated in the output file configure.scan.
-# This could be helpfull to update de configuration.
-AC_OUTPUT([ \
- ./salome_adm/unix/SALOMEconfig.h \
- ./adm_local/Makefile \
- ./adm_local/unix/Makefile \
- ./adm_local/unix/config_files/Makefile \
- ./bin/VERSION \
- ./bin/Makefile \
- ./GUI_version.h \
- ./doc/Makefile \
- ./doc/salome/Makefile \
- ./doc/salome/gui/Makefile \
- ./doc/salome/gui/GUI/doxyfile \
- ./doc/salome/tui/Makefile \
- ./doc/salome/tui/GUI/doxyfile \
- ./src/Makefile \
- ./src/CASCatch/Makefile \
- ./src/Qtx/Makefile \
- ./src/Style/Makefile \
- ./src/DDS/Makefile \
- ./src/QDS/Makefile \
- ./src/SUIT/Makefile \
- ./src/STD/Makefile \
- ./src/CAF/Makefile \
- ./src/CAM/Makefile \
- ./src/SUITApp/Makefile \
- ./src/LogWindow/Makefile \
- ./src/ObjBrowser/Makefile \
- ./src/Prs/Makefile \
- ./src/OBJECT/Makefile \
- ./src/GLViewer/Makefile \
- ./src/VTKViewer/Makefile \
- ./src/SVTK/Makefile \
- ./src/OCCViewer/Makefile \
- ./src/SOCC/Makefile \
- ./src/PyInterp/Makefile \
- ./src/PythonConsole/Makefile \
- ./src/Plot2d/Makefile \
- ./src/SPlot2d/Makefile \
- ./src/SUPERVGraph/Makefile \
- ./src/QxGraph/Makefile \
- ./src/LightApp/Makefile \
- ./src/ResExporter/Makefile \
- ./src/RegistryDisplay/Makefile \
- ./src/TOOLSGUI/Makefile \
- ./src/Event/Makefile \
- ./src/Session/Makefile \
- ./src/SalomeApp/Makefile \
- ./src/SalomeApp/Test/Makefile \
- ./src/SALOME_SWIG/Makefile \
- ./src/SALOME_SWIG/supervisionexample.py \
- ./src/SALOME_SWIG/supervisiongeomexample.py \
- ./src/SALOME_PY/Makefile \
- ./src/SALOME_PYQT/Makefile \
- ./src/SALOME_PYQT/SALOME_PYQT_GUI/Makefile \
- ./src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_SipDefs.h \
- ./src/SALOME_PYQT/SalomePyQt/Makefile \
- ./resources/Makefile \
- ./idl/Makefile \
- Makefile
-])
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-
-# -* Makefile *-
-#
-# Author : Patrick GOLDBRONN (CEA)
-# Date : 30/11/2001
-# $Header$
-#
-
-SUBDIRS= salome
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-
-# -* Makefile *-
-#
-# Author : Patrick GOLDBRONN (CEA)
-# Date : 30/11/2001
-# $Header$
-#
-
-SUBDIRS= tui gui
-SUBDIRSTUI= tui
-SUBDIRSGUI= gui
-
-usr_docs:
- @@SETX@; for d in $(SUBDIRSGUI); do \
- (cd $$d && $(MAKE) $@) || exit 1; \
- done;
-
-docs: usr_docs
-
-dev_docs:
- @@SETX@; for d in $(SUBDIRSTUI); do \
- (cd $$d && $(MAKE) $@) || exit 1; \
- done;
+++ /dev/null
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "GUI Module Reference Manual v.@VERSION@"
-OUTPUT_DIRECTORY = ./
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-TAB_SIZE = 5
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-
-#---------------------------------------------------------------------------
-#Input related options
-#---------------------------------------------------------------------------
-INPUT = @srcdir@/input
-FILE_PATTERNS = *.doc
-IMAGE_PATH = @srcdir@/images
-
-#---------------------------------------------------------------------------
-#HTML related options
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = ./
-HTML_HEADER = @srcdir@/static/header.html
-HTML_FOOTER = @srcdir@/static/footer.html
-#HTML_STYLESHEET = @srcdir@/static/doxygen.css
-TOC_EXPAND = YES
-DISABLE_INDEX = NO
-GENERATE_TREEVIEW = YES
-TREEVIEW_WIDTH = 300
-
-#---------------------------------------------------------------------------
-#LaTeX related option
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-
-#---------------------------------------------------------------------------
-#RTF related options
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page about_salome_page About SALOME
-
-<ul>
-<li>\subpage intro_to_salome_page</li>
-<li>\subpage salome_architecture_page</li>
-<li>\subpage installing_salome_page "Installing SALOME"</li>
-<li>\subpage running_salome_page</li>
-</ul>
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page creating_new_study_page Creating a new study
-
-Study is a document within GUI, an abstraction layer between actual
-document data (probably, remote data available through CORBA) and data
-presentation (in the Object Browser). It contains a tree of Data
-Object instances.
-
-<em>To create a new study:</em>
-
-\par
-From the main menu select <b>File > New</b> or in the standard toolbar
-click "New document" button.
-
-\image html newsticn.jpg ""New document" button"
-
-Your study will be created with default name \b Study1. In SALOME you
-can create several studies.
-
-In addition to it, you can create several windows with different
-activated viewers (VTK, OCC, Plot2d) for each study.
-
-<em>To create a new window for a definite study:</em>
-<ol>
-<li>Make your study \b active: maximize it (if it minimized) or click on
-the top control zone of the study window.
-</li>
-<li>\n From the main menu select <b>Window > New Window</b> and from the submenu
-choose the viewer, which will be activated in a new window.
-</li>
-</ol>
-
-The window for your study will be created with a default name \b Study1.
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page displaying_studies_page Displaying studies
-
-Starting from SALOME version 3.0.0. you are able to work in a
-multi-desktop environment, which means that you can open as many
-studies as you need, place them wherever you wish on the desktop, in
-brief, work with Salome Platform like with a normal Windows
-application.
-\n Such windows as Object Browser and Python Console are dockable and
-also can be placed at any part of the desktop.
-\n Only one study window in representation area can be active. You can
-change their size and move any windows between representation
-areas. When an area becomes empty, it is not displayed.
-\n All windows are placed inside tabs where you can switch between
-them. If there are several windows (viewers) in your current study and
-you want to display more then one at the same time, you can split
-representation area into two parts, in horizontal or vertical
-direction, to create two representation areas with windows be placed
-in them. To do this, right-click on the tab and select <b>Split
-Vertically</b> or <b>Split Horizontally</b>.
-
-For example, on this screen-shot the active zone has been split
-horizontally to be able to work with OCC and VTK viewers
-simultaneously, the one of the windows was split again, at this time
-vertically to see Plot 2d graphs.
-
-\image html neo-view2.png
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page editing_studies_page Editing studies
-
-\b SALOME has \b Copy/Paste functionality allowing to edit your study
-within a definite component:
-
-<em>To copy/paste a definite object:</em>
-\par
-In the main toolbar click "Copy"/"Paste" button or from the main menu
-choose <b>Edit > Copy/Paste</b> option.
-
-\image html copy-paste.jpg ""Copy" and "Paste" buttons"
-
-\n The availability of \b Copy/Paste operations depends on the module and
-the nature of an operation or an object, so if the module does not
-provide this functionality, it won't be available.
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page geometry_preferences_page Geometry preferences
-
-In the \b Geometry module you can set preferences for visualisation of
-geometrical figures which can be used in later sessions with this
-module.
-
-\image html pref15.png
-
-\par
-For all color definitions click on the respective line to access to
-the \ref select_color_and_font_page "Select Color" dialog box.
-
-<ul>
-<li><b>General</b></li>
-<ul>
-<li><b>Default Display Mode</b> - allows to choose between wireframe
-or shading.<li>
-<li><b>Default Shading Color</b> - allows to select default shading
-color.<li>
-<li><b> Default Wireframe Color</b> - allows to select default
-wireframe color (to be applied to any lines not being free boundaries
-or isolated lines).<li>
-<li><b>Color of free boundaries</b> - allows to select default color for free boundaries.<li>
-<li><b>Color of edges, vectors and wires</b> - allows to select
-default color for edges, vectors and wires (isolated lines).<li>
-<li><b>Color of points</b> - allows to select default color for
-vertices.<li>
-<li><b>Color of isolines</b> - allows to select default color for
-isolines.<li>
-<li><b>Step Value for Spin Boxes</b> - allows to define the increment
-of values set in spin boxes.<li>
-</ul>
-</ul>
-
-<ul>
-<li><b>Marker of Points</b></li>
-<ul>
-<li><b>Type</b> - allows to select the symbol for representation of
-points (cross, asterisk, etc.).</li>
-<li><b>Size</b> - allows to define the size of the marker from 1
-(smallest) to 7 (largest).</li>
-</ul>
-</ul>
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page getting_started_page Getting started
-
-When you start the SALOME Platform, the following initial desktop window appears:
-
-\image html view2.png
-
- In general, the SALOME platform is destined
-for performance of different numerical calculations and visualization
-of the resulting data. For that purpose, in the SALOME environment the
-following notion is used - \b Study.
-<br>Study represents a working document in which you can realize all
-operations connected with the SALOME functionality.
-<br>SALOME is a multi-study platform. It means that simultaneously you can
-work with several studies.
-
-\note To proceed working in SALOME you should create or open a new study.
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page gui_module_page GUI module
-
-<ul>
-<li>\subpage introduction_to_gui_page</li>
-<li>\subpage getting_started_page</li>
-<li>\subpage salome_desktop_page</li>
-<li>\subpage study_management_page</li>
-<ul>
-<li>\ref creating_new_study_page</li>
-<li>\ref opening_studies_page</li>
-<li>\ref saving_and_closing_studies_page</li>
-<li>\ref editing_studies_page</li>
-<li>\ref displaying_studies_page</li>
-<li>\ref working_with_python_scripts_page</li>
-<li>\ref setting_study_properties_page</li>
-</ul>
-<li>\subpage using_object_browser_page</li>
-<li>\subpage using_registry_tool_page</li>
-<li>\subpage using_catalog_generator_page "Using Catalog Generator"</li>
-<li>\subpage viewers_page</li>
-<ul>
-<li>\ref occ_3d_viewer_page</li>
-<li>\ref vtk_3d_viewer_page</li>
-<li>\ref plot2d_viewer_page</li>
-</ul>
-<li>\subpage setting_preferences_page</li>
-<ul>
-<li>\ref setting_preferences_subpage</li>
-<li>\ref select_color_and_font_page</li>
-<li>\ref salome_preferences_page</li>
-<li>\ref geometry_preferences_page</li>
-<li>\ref mesh_preferences_page</li>
-<li>\ref postpro_preferences_page</li>
-</ul>
-</ul>
-
-*/
+++ /dev/null
-/*!
-
-\mainpage GUI Module Reference Documentation
-
-<ul>
-<li>\subpage introduction_page</li>
-<li>\subpage about_salome_page</li>
-<ul>
-<li>\ref intro_to_salome_page</li>
-<li>\ref salome_architecture_page</li>
-<li>\ref installing_salome_page</li>
-<li>\ref running_salome_page</li>
-</ul>
-<li>\subpage gui_module_page "GUI module"</li>
-<ul>
-<li>\ref introduction_to_gui_page</li>
-<li>\ref getting_started_page</li>
-<li>\ref salome_desktop_page</li>
-<li>\ref study_management_page</li>
-<ul>
-<li>\ref creating_new_study_page</li>
-<li>\ref opening_studies_page</li>
-<li>\ref saving_and_closing_studies_page</li>
-<li>\ref editing_studies_page</li>
-<li>\ref displaying_studies_page</li>
-<li>\ref working_with_python_scripts_page</li>
-<li>\ref setting_study_properties_page</li>
-</ul>
-</ul>
-<li>\ref using_object_browser_page</li>
-<li>\ref using_registry_tool_page</li>
-<li>\ref using_catalog_generator_page "Using Catalog Generator"</li>
-<li>\ref viewers_page</li>
-<ul>
-<li>\ref occ_3d_viewer_page</li>
-<li>\ref vtk_3d_viewer_page</li>
-<li>\ref plot2d_viewer_page</li>
-</ul>
-<li>\ref setting_preferences_page</li>
-<ul>
-<li>\ref setting_preferences_subpage</li>
-<li>\ref select_color_and_font_page</li>
-<li>\ref salome_preferences_page</li>
-<li>\ref geometry_preferences_page</li>
-<li>\ref mesh_preferences_page</li>
-<li>\ref postpro_preferences_page</li>
-</ul>
-</ul>
-
-
-*/
+++ /dev/null
-/*!
-
-\page installing_salome_page SALOME Installation Wizard Help
-
-<hr>
-<ul>
-<li>\ref installing_products "Installing products with the Installation Wizard"
-<ul>
-<li>\ref gui_mode_install "GUI mode"
-<li>\ref batch_mode_install "Batch mode"
-<li>\ref environment_files "Environment files"
-</ul>
-<li>\ref notes_on_check "Notes on check products version procedure"
-<li>\ref pick_up_env "Pick up the environment"
-<li>\ref modifying_xml "Modifying XML configuration file"
-<li>\ref installation_scripts "Implementing installation scripts for the new products"
-<li>\ref finish_buttons "Customizing Readme page buttons"
-</ul>
-<hr>
-\anchor installing_products
-<h1>Installing products with the <em>Installation Wizard</em></h1>
-
-The Installation Wizard can be launched in two modes: \b GUI and \b
-batch.
-<br>The root directory of the Installation Wizard contains Python
-script \b runInstall. To run the Installation Wizard just type \b runInstall.
-in the terminal window:
-<br><br>[ python ] \b runInstall [options]
-
-Without options this script will launch the SALOME Installation
-Wizard in the default mode (GUI). \n The default installation settings
-can be overridden by using command line options. Each option has a
-short and a long notation:
-
-<b>-g / --gui</b>
-\par
-Runs the Installation Wizard in the GUI mode (this is the default
-mode).
-
-<b>-b / --batch</b>
-\par
-Runs the Installation Wizard in the terminal mode.
-
-<b>-f FILE / --file=FILE</b>
-\par
-The XML configuration file to be used by the Installation Wizard. If
-this option is not used then the installation script tries to define
-the \e Linux version and use the corresponding XML file if it exists. For
-examle, for <em>Linux Mandrake 10.1</em> the <b>config_Mandrake_10.1.xml</b> file
-will be used by default. If no appropriate file is found, the file
-<b>config.xml</b> will be used. This file refers to the basic target platform
-which is <em>Linux Mandrake 10.1</em> for SALOME 3.0 and newer. If <b>config.xml</b>
-file is not found either, a warning message box is shown (in GUI mode)
-or printed to the console (in batch mode) and the Installation Wizard
-quits.
-
-<b>-d DIR / --target=DIR</b>
-\par
-The target directory SALOME platform is to be installed to.
-If used, this option overrides the default target directory, given in
-the configuration XML file (usually <b>${HOME}/salome_\<version\></b>,
-see \ref modifying_xml "here" for more details).
-
-<b>-t DIR / --tmp=DIR</b>
-\par
-The directory, which should be used for temporary files. If given,
-this option overrides the default temporary directory, given in the
-configuration xml file (usually \b /tmp, see \ref modifying_xml "here"
-for more information).
-
-<b>-a / --all-from-sources</b>
-\par
-Forces all the products to be installed from sources (including all
-SALOME modules). If this option is used, all default installation
-modes for all products are ignored.
-\n This option is helpful when the user wants to install SALOME on the
-platform which is not officially supported. In this case, the user can
-try to run the SALOME Installation Wizard with the \b -a option in order
-to build all the products from sources.
-\n <b>Note, that this is a time-consuming operation which can take
-more than 24 hours depending on the computer.</b>
-
-<b>-h / --help</b>
-\par
-Prints help information on the Installation Wizard's use.
-
-<b>-v / --version</b>
-\par
-Prints version information (\b Note: this is the Installation Wizard's
-version number, not the number of SALOME platform version).
-
-The installation procedure supports different \em Linux platforms and
-installs various installation 3d-party prerequisite products which are
-required by SALOME platform. As it was mentioned above, the basic
-target platform for SALOME 3.0 and newer is <em>Linux Mandrake 10.1</em>.
-Use of configuration XML files gives a flexible way to modify the list
-of products to be installed by the Installation Wizard without
-changing the program source code. Just create your own XML
-configuration file and implement installation scripts for the
-prerequisite products you need and then use this XML file with the
-Installation Wizard. This can be done, for example, for some Linux
-platform which is not supported directly by the Installation
-Wizard. See \ref modifying_xml "Modifying XML configuration file" and
-\ref installation_scripts "Implementing installation scripts for the new products"
-sections for more information.
-
-<br>
-\anchor gui_mode_install
-<h2>GUI mode</h2>
-
-The <b>Installation Wizard</b> GUI has been developed using
-Trolltech's <b>Qt 3.0.5</b> toolkit. After launching the Installation
-Wizard in the GUI mode the wizard window is shown to the user. This
-wizard guides the user through several subsequent pages. To navigate
-between the pages use \em "Next" and \em "Back" buttons in the lower
-part of the wizard window. The \em "Cancel" button closes the wizard
-window and quits the installation procedure after the user's
-confirmation. The \em "Help" button opens an additional window to show
-help information.
-
-The first \em "Introduction" page is shown in \ref figure_1 "Figure 1".
-Skip this page by clicking \em "Next":
-
-\anchor figure_1
-\image html intropage.png
-\n <center><b>Figure 1:</b> "Introduction" page</center>
-
-In the second page you are proposed to enter the target directory
-where the SALOME platform should be installed to. You can also click
-<em>"Browse..."</em> and choose the destination folder using the standard
-browse directory dialog box.
-\n If the directory you want to install products to does not exist you
-are prompted to confirm directory creation. If you type a wrong
-directory path, or if you do not have write permissions
-for the directory you use, the corresponding message box is shown.
-
-You can also change the temporary directory (which is used to store
-temporary files required for the installation).
-\n In the bottom part of the window the total disk space required for
-the installation and for the temporary files is displayed (see below
-for more details).
-
-In the GUI mode the Installation Wizard provides two different options
-to install the SALOME platform: \b basic (default option) and
-\b advanced. In the \b basic mode the user should enter the target
-installation directory and temporary folder. All other installation
-options are taken from the XML configuration file (see \ref figure_2 "Figure 2"):
-
-\anchor figure_2
-\image html productpage1.png
-\n <center><b>Figure 2:</b> "Installation settings"</center>
-
-In addition, you have a choice to use "Install all products from
-sources" check box. If this option is turned on, all the products will
-be installed from the sources (using their own build procedures). This
-check box corresponds to the <b>--all-from-sources (-a)</b> option of
-the \b runInstall script (see \ref installing_products "here").
-
-\Note <b>Installation of all products from sources is a long-time
-operation.</b>
-
-To switch to the \b advanced option, click <em>"More..."</em> (see
-\ref figure_3 "Figure 3" ).
-
-In the advanced mode you have a possibility to select products to be
-installed. Each product can have several options of installation: you
-have a possibility to use the native product (provided with Linux
-distribution and installed in the system folders), install already
-precompiled binaries, build the product from sources or not install it
-at all. Available options and default option are taken from the XML
-configuration file. You can mark the products you want to install by
-clicking the corresponding radio-buttons in the list view in the left
-part of the page.
-\n Note, that some products may require some other pre-requisite
-products to be installed (or these prerequisite products should be
-already available on your computer). The installation procedure has a
-special feature to automatically mark these products in the list
-view. For example, in order to install \b PyQt it is necessary to have
-<b>gcc, Python, Qt</b> and \b Sip installed. Therefore all these
-products will also be turned on when you check on \b PyQt. This
-feature can be switched off by clicking the <em>"Automatic
-dependencies"</em> checkbox. Turn on this checkbox if you want all
-prerequisite products to be automatically checked when you select some
-product to be installed. Turn off this checkbox if you want to disable
-this feature.
-
-\anchor figure_3
-\image html productpage.png
-\n <center><b>Figure 3:</b> "Installation settings" page in the 'advanced' mode</center>
-
-If you want to use native products (like \b gcc, \b tcl, etc.), select <em>"use
-native"</em> option.
-\n Special button in the right part of the page - <em>"Unselect All"</em> -
-allows to reset quickly all products to the <em>"not install"</em> state.
-<br><br>
-There are also two checkboxes on this page: <em>"SALOME sources"</em>
-and <em>"SALOME binaries"</em>. These three-state checkboxes allow
-quick selecting/unselecting sources/binaries packages of SALOME
-modules for installation.
-<br><br>
-In addition, when some SALOME sources are selected, one more check box
-becomes available: <em>"Build SALOME sources"</em>. If this option is
-turned on, the selected SALOME modules will be built and installed
-from sources.
-
-\note <b>If this check box is turned on, the corresponding SALOME
-module binaries package installation is disabled, because of SALOME
-module sources and binaries packages conflict</b> (see \ref figure_4 "Figure 4" below).
-
-\anchor figure_4
-\image html productpage2.png
-\n <center><b>Figure 4:</b> "Build SALOME sources" check box
-usage</center>
-
-The box at the right side of the page displays the information about
-currently highlighted product: name, version and short description,
-required disk space, disk space required for temporary files, list of
-prerequisites (this information is provided in the XML file) and
-current user choice.
-<br><br>
-The <em>"Disk space required:"</em> field displays how much disk space
-on the hard drive is required for installation of selected products.
-
-\note <b>Please, take into account that the displayed amount of
-required disk space is approximate and may differ when you install
-products on your hard drive.</b>
-
-The installation procedure uses a special directory to store temporary
-files. The <em>"Space for temporary files:"</em> field shows the information
-about required disk space on the hard drive for extracting and
-compiling the selected products. You can change the temporary
-directory - just type a path to the folder you want to use or click on
-the corresponding <em>"Browse..."</em> button.
-
-\note Actually, temporary files are not stored directly in the
-directory entered by the user. The Installation Wizard creates an
-additional folder in this directory named something like
-INSTALLWORK<b>XXXXX</b> where XXXXX is a unique number. This allows to launch
-several Installation Wizards simultaneously. This temporary directory
-is removed automatically when the installation finishes.
-
-The installation procedure also checks the available disk space. If
-there is not enough disk space on your hard drive you will see a
-corresponding error message box.
-
-\note <b>You are strongly recommended not to use directory names
-containing spaces</b>. Otherwise you can experience
-some troubles with the installation.
-
-To proceed further click <em>"Next"</em>. At this moment the program will make
-some tests to check installation settings: if there is enough disk
-space on the hard drive, check for native products installation,
-dependencies (prerequisites) for each product you have selected to be
-installed. If any test fails you will see the corresponding warning
-message box. Otherwise the wizard will proceed to the next page:
-
-\anchor figure_5
-\image html choicepage.png
-\n <center><b>Figure 5:</b> "Check your choice" page</center>
-
-This page summarizes the installation options you've made on the
-previous pages. You can check again your choice and change it if
-necessary by getting back to the previous page.
-\n When you are sure that everything is OK, click <em>"Next"</em> to
-follow to the \ref figure_6 "next page".
-
-\anchor figure_6
-\image html progresspage1.png
-\n <center><b>Figure 6:</b> "Installation progress" page</center>
-
-To start installation of the selected products click "Start". It
-launches the shell installation script and you will be able to see the
-output of the script in the dialog topmost frame. If any errors occur
-during the installation progress the corresponding messages will be
-printed to the log window in bold red font.
-
-It is possible to break the installation at any time by clicking
-"Stop". Then you can get back to the previous pages if you wish to
-change installation settings or restart installation by pressing again
-"Start" button.
-
-\note <b>In the current implementation it is not possible to resume
-the stopped installation process; it will be re-started from the very
-beginning.</b>
-
-\anchor figure_7
-\image html progresspage.png
-\n <center><b>Figure 7:</b> "Installation progress" page: installation in progress</center>
-
-The <em>"Installation Status"</em> frame window shows you the progress of
-installation. \c "Waiting" status means that installation of this product
-has not been started yet. The product currently being installed is
-marked as \c "Processing". All installed products have \c "Completed"
-status.
-
-You can abort installation and close the installation procedure using
-\em "Cancel" button.
-
-\note <b>This button sends the signal "SIGTERM" to the shell
-script. The script tries to clear all temporary files. The process of
-removing temporary files can take some time, so the installation
-wizard will wait 3 seconds before closing.</b>
-
-At the end of installation (all selected products have been installed
-successfully) you can go back to the previous pages to start a new
-installation or click \em "Next" to go the Readme page:
-
-\anchor figure_8
-\image html readmepage.png
-\n <center><b>Figure 8:</b> "Finish installation" page</center>
-
-In this page you can read important information about the Instalation
-Wizard itself and some tips: how to run and test SALOME or how to
-build SALOME from the sources. This is the contents of the README file
-which you can find in the root directory of the Installation Wizard.
-
-You can also launch SALOME Desktop from this page or read the Release
-Notes file by clicking on the corresponding buttons in the lower part
-of the page (see \ref modifying_xml "here" and \ref finish_buttons
-"here" for more information about customizing these buttons).
-
-<br>
-\anchor batch_mode_install
-<h2>Batch mode</h2>
-
-To launch the Installation Wizard in the batch mode use -\b b (--\b batch)
-parameter.
-\n In this mode the GUI wizard is not shown but all the installation
-status is displayed directly in the console. In the batch mode the
-user does not have a possibility to change installation settings which
-are given in the configuration file, except target and temporary
-directories which can be overridden by the corresponding command line
-options.
-\n The only exception is --\b all-from-sources (-\b a) option which enables
-special installation mode in which all the products (including SALOME
-modules) are installed from sources, ignoring the default mode defined
-in the XML configuration file (see \ref installing_products "here" for details).
-
-\anchor figure_9
-\image html batchmode.png
-\n <center><b>Figure 9:</b> Batch mode</center>
-
-<br>
-\anchor environment_files
-<h2>Environment files</h2>
-
-During the process of installation the script creates some environment
-files to simplify the procedure of launching SALOME. These shell
-scripts set all necessary environment variables for all products you
-have installed. To learn how installation scripts collects the
-environment, see \ref pick_up_env "here". These files are: \b
-salome.csh + \b salome.sh in the <b><em>KERNEL module sources</em></b>
-and <b><em>KERNEL module binaries</em></b> root directories and
-\b env_products.csh + \b env_products.sh and \b env_build.csh +
-\b env_build.sh in the target installation directory.
-
-\note there is some difference between these files: \b env_build.*
-files are optimized to be used for building SALOME modules from
-sources (see \b README file provided with the installation procedure
-on the CD). The \b env_products.* (and \b salome.*) files are
-optimized for SALOME launching. The behavior is defined by the
-environment variable \b ENV_FOR_LAUNCH which is set to \b 0 in
-env_build.* files and to \b 1 in env_products.* (salome.*) files.
-
-<br>
-<hr>
-\anchor notes_on_check
-<h2>Notes on <em>check products version</em> procedure</h2>
-
-Unfortunately there is no exact algorithm to identify the product
-version under Linux platform. The information in this section gives an
-idea how the version is checked for the native/preinstalled products
-(this information refers to the base platform <em>Linux Mandrake
-10.1</em>; and the same algorithms are used for other platforms).
-
-The general rule for all products is that the path to the binaries
-should be set via the \b PATH environment variable, path to the libraries
-should be set via the \b LD_LIBRARY_PATH variable and the python modules
-should be available via the \b PYTHONPATH variable.
-
-\note the information given in this section refers to the prerequisite
-products for SALOME version 3.2.4.
-
-<ul>
-<li>gcc 3.4.1
-\n\n Version number is checked by <b>gcc -dumpversion</b> command. The \b gcc
-executable should be in the \b PATH environment variable. Version should
-be equal to "3.4.1". It is recommended to use native gcc on Mandrake
-10.1.<br><br>
-</li>
-<li>tcl/tk 8.4.5
-\n\n Version number for \b tcl/tk can be found in tclConfig.sh and
-tkConfig.sh files (\b TCL_VERSION and \b TK_VERSION variables
-correspondingly). Version number should be equal to "8.4" (release
-number is not checked). Set the \b TCLHOME environment variable to the
-root directory of tcl/tk installation. It is recommended to use native
-tcl/tk on Mandrake 10.1.<br><br>
-</li>
-<li>boost 1.31.0
-\n\n Version number is defined by \b version.hpp file which is part of
-the boost distribution. This file defines the \b BOOST_VERSION macro
-which should be equal to "103100". In addition the existence of boost
-libraries is checked. Set the \b BOOSTDIR environment variable if you
-have a preinstalled version of boost.<br><br>
-</li>
-<li>Python 2.3.4
-\n\n Version number is checked by \b python -\b V command. The \b python
-executable should be in the \b PATH environment variable. Version
-number should be equal to "2.3.4". It is recommended to use native
-Python on Mandrake 10.1. Set the \b PYTHONHOME environment variable if
-you have a preinstalled version of Python.<br><br>
-</li>
-<li>Swig 1.3.24
-\n\n Version number is checked by \b swig -\b version command. The \b swig
-executable should be in the \b PATH environment variable. Version number
-should be equal to "1.3.24".
-<br><br>
-</li>
-<li>Qt 3.3.3
-\n\n Version number is defined by \b qglobal.h file which is part of the
-Qt distribution. This file defines \b QT_VERSION_STR macro which should be equal to "3.3.3". It is recommended to use native Qt on Mandrake 10.1.
-\n Set the \b QTDIR environment variable if you have a preinstalled version of qt.<br><br>
-</li>
-<li>msg2qm
-\n\n \b msg2qm is a Qt tool which is used to convert text *.po files
-to *.qm resource files. Unfortunately this tool is not included to the
-Linux distribution and provided only in Qt sources package. This is
-the reason why this tool is supplied with the SALOME Installation
-Wizard. There is no way to check the version number of msg2qm tool. Just set
-\b MSG2QM_ROOT environment variable if you have a preinstalled version
-of msg2qm tool.<br><br>
-</li>
-<li>Open CASCADE 6.1.2a2
-\n\n Version number is defined by \b Standard_Version.hxx file which
-is part of the Open CASCADE distribution. This file defines \b
-OCC_VERSION_MAJOR, \b OCC_VERSION_MINOR and \b OCC_VERSION_MAINTENANCE
-macros which should refer to version 6.1.2. \n Set the CASROOT
-environment variable if you have a preinstalled version of Open
-CASCADE.<br><br>
-</li>
-<li>qwt 4.2.0/0.4.2
-\n\n Version number is defined by \b qwt_global.h file which is part of
-the qwt distribution. This file defines \b QWT_VERSION_STR macro which should be equal to "4.2.0".
-\n Set the \b QWTHOME environment variable if you have a preinstalled version of qwt.<br><br>
-</li>
-<li>hdf 5-1.6.4
-\n\n Version number is defined by \b libhdf5.settings file which is
-part of the \b hdf5 distribution. Version should be equal to 1.6.4.
-\n Set the \b HDF5HOME environment variable if you have a preinstalled
-version of hdf5.<br><br>
-</li>
-<li>med 2.2.3
-\n\n Unfortunately there is no formal way to check med version
-number. We check existence of libmed.so.1.0.2 library on the
-computer. If you have any problem with a preinstalled version of med,
-please, reinstall it.
-\n Set the \b MED2HOME environment variable if you have a preinstalled
-version of med.<br><br>
-</li>
-<li>Vtk 4.2.6
-\n\n Unfortunately there is no formal way to check VTK version
-number. We just check the existence of \b libvtkCommon.so library on
-the computer and hope that it is of version we need. If you have any
-problem with a preinstalled version of Vtk, please, reinstall it.
-\n Set the \b VTKHOME environment variable if you have a preinstalled
-version of Vtk.<br><br>
-</li>
-<li>OmniORB 4.0.5, OmniORBpy 2.5, OmniNotify 2.1
-\n\n We just check existence of some omniORB libraries and executable
-on the computer, like \b libomniORB4.so.0.5, \b _omnipymodule.so.2.4,
-\b libCOSNotify4.so.0.1 and \b notifd. \n Set the \b OMNIORBDIR
-environment variable if you have a preinstalled version of omniORB
-products.<br><br>
-</li>
-<li>sip 4.1
-\n\n Version number is checked by \b sip -\b V command. The \b sip
-executable should be in the \b PATH environment variable. Version number should be equal to "4.1".
-\n Set the \b SIPDIR environment variable to the directory where you
-have sip executable preinstalled.<br><br>
-</li>
-<li>PyQt 3.13
-\n\n Version number is defined by \b pyqtconfig.py Python module file
-which is part of the \b PyQt distribution. Version should be equal to "3.13".
-\n Set the \b PYQTDIR environment variable if you have a preinstalled
-version of PyQt.<br><br>
-</li>
-<li>netgen 4.5
-\n\n Unfortunarely we can't find anything about netgen version. We
-just check if \b NETGENROOT environment variable is set. \n Set the\b
-NETGENROOT environment variable if you have a preinstalled version of
-netgen mesher.<br>
-\note netgen 4.5 provided with the SALOME installation Wizard has been patched to improve its performance.
-</li>
-<li>Numeric 23.7
-\n\n Version number is checked by <b>python -c 'import Numeric; print
-Numeric.__version__'</b> command. The \b python executable should be
-in the \b PATH environment variable and \b Numeric module should be
-available for the Python (for example it should be in the \b PYTHONPATH environment variable). Version number should be equal to "23.7". If you have any problem with a preinstalled version of Numeric 23.7, please, reinstall it.
-\n Add the directory where you have a preinstalled version of Numeric
-package to the the \b PYTHONHOME environment variable.<br><br>
-</li>
-<li>graphviz 2.2.1
-\n\n Version number is checked by \b dot -\b V command. The dot
-executable should be in the \b PATH environment variable. Version
-number should be equal to "2.2.1". \n Add \b graphviz bin directory to
-the the \b PATH environment variable.<br><br>
-</li>
-<li>doxygen 1.4.6
-\n\n Version number is checked by \b doxygen --\b version command. The
-\b doxygen executable should be in the \b PATH environment
-variable. Version number should be equal to "1.4.6".<br><br>
-</li>
-<li>\b SALOME module \b sources (3.2.4).
-\n\n For each SALOME module sources package (KERNEL, GUI, GEOM,
-etc...) the root directory contains file configure.in (configure.ac)
-which defines version information.\n Set the \b \<MODULE\>_SRC_DIR environment variable for each SALOME \b
-MODULE sources package installed (where \b MODULE is KERNEL, GUI,
-GEOM, ...).<br><br>
-</li>
-<li>\b SALOME module \b binaries (3.2.4)
-\n\n For each SALOME module binaries package (KERNEL, GUI, GEOM,
-etc...) the \b bin/salome directory contains file \b VERSION which
-defines version information.\n Set \<MODULE\>_ROOT_DIR environment
-variable for each SALOME \b MODULE binaries package installed (where
-\b MODULE is KERNEL, GUI, GEOM, ...).<br><br>
-</li>
-</ul>
-
-If you have native products installed to directories different from
-default ones (not \b /usr/bin, \b /usr/lib...), it is recommended to follow
-the above mentioned instructions. Or you should properly set \b PATH and
-\b LD_LIBRARY_PATH variables \em before starting the Installation
-Wizard. Otherwise the installation script will fail to find
-preinstalled/native products.
-
-\note for some native products (e.g. gcc, Python) the rules of version
-checking are not so strict as described above. Only major and minor
-version numbers should coincide with the prerequisite. Newer version
-of the product can also be used. If some native product has version
-number larger than that required by the installation procedure, the
-user will be prompted by the warning message like this: "<em>You have
-newer version of gcc installed on your computer than that is required
-(3.4.1). Continue?</em>". You can click "\em Yes" to proceed with the
-installation but in this case you should be aware of what you are
-doing. SALOME binaries (including other products) are compiled with
-the predefined prerequisites and most likely can not be run
-successfully if these products are not found. This can be helpful only
-if you plan to build all products from sources.
-
-<br>
-<hr>
-\anchor pick_up_env
-<h2>Pick up the <em>environment</em></h2>
-
-Please, read the following information carefully . This section
-describes how the installation procedure generates the environment
-scripts for the SALOME platform being installed.
-<br><br>
-After installing each product shell the script creates a special
-environment file for the product in its installation folder. The name
-of the file is generated from the name of product by the following
-scheme: \b env_<product_name>.sh (for example \b env_Vtk.sh for the
-Vtk). This file includes all necessary environment settings. At the
-final step of the installation the script picks up all the settings
-files and generates two common environment files from them: \b salome.sh
-and \b salome.csh for \b bash and \b csh shells correspondingly. Such approach
-helps to save time when reinstalling products and you may not bother
-about setting all environment variables manually to build/launch
-SALOME. What you simply need is to source one of these environment
-files.
-<br><br>
-This also concerns those products which are not being installed. For
-example, you install some SALOME binaries to the directory where you
-have previously installed other products. The Installation procedure
-tries to collect environment files from the target directory if it
-finds necessary products installed there. If some product is not found
-in the target directory the corresponding section of
-\b salome.sh/salome.csh files will be skipped.
-\n For native products (like \b gcc, \b tcl, etc...) the installation
-procedure tries to find them first using \b PATH / \b LD_LIBRARY_PATH
-variables and then in the system default directories (\b /usr/bin,
-\b /usr/lib etc., depending on the product).
-<br><br>
-In any case you may edit \b salome.* files after the installation
-procedure finishes, if you want.
-
-\note As it was mentioned \ref environment_files "above" there are
-other environment files which are generated by the installation
-procedure: \b env_products.csh + \b env_products.sh and \b env_build.csh +
-\b env_build.sh. These files can be found in the target installation root
-directory.
-
-<br>
-<hr>
-\anchor modifying_xml
-<h2>Modifying <em>XML</em> configuration <em>file</em></h2>
-
-You can create your own XML configuration file. The Installation
-Wizard can then take it as a command line argument to provide a list
-of products you want to install with it. The list of products and some
-other settings for the Installation Wizard are provided in the XML
-file. The default file which Installation Wizard looks for if no
-command line arguments are given, is \b config.xml.
-\n This section describes the structure of the configuration file.
-\n Optional sections/tags are in brackets.
-
-\code
-<document>
- [ <config [ version=<install_wizard_version> ]
- [ caption=<install_wizard_caption> ]
- [ copyright=<install_wizard_copyright> ]
- [ license=<install_wizard_license_info> ]
- [ os=<target_platform> ]
- />
- ]
- [ <path [ targetdir=<target_directory> ]
- [ tempdir=<temp_directory> ]
- />
- ]
- [ <button label=<button_label>
- [ tooltip=<button_tooltip> ]
- script=<button_script>
- [ disable=<disable_flag> ]
- />
- ]
- [ <button ...
- />
- ]
- [ <product name=<product_name>
- version=<product_version>
- [ context=<product_context> ]
- [ description=<product_description> ]
- install=<installation_mode>
- supported=<supported_installation_modes>
- [ disable=<disable_flag> ]
- [ pickupenv=<pickup_env_flag> ]
- dependancies=<list_of_prerequisites>
- installdiskspace=<install_disk_space>
- temporarydiskspace=<tmp_disk_space>
- script=<installation_script_name>
- />
- ]
- [ <product ...
- />
- ]
- ...
-</document>
-\endcode
-
-<b>\<config\> section</b>
-\n\n This is an optional section; it provides general information about
-the Installation Wizard itself.
-<br><br>
-Attributes:
-<ul>
-<li><b>version</b>
-\n\n The application version number to be shown in the caption.<br><br>
-</li>
-<li><b>caption</b>
-\n\n The application main window caption - if this string contains
-'\%1' text the title will contain the version number in this place (see
-above).<br><br>
-</li>
-<li><b>copyright</b>
-\n\n The application copyright information (shown in the first
-page).<br><br>
-</li>
-<li><b>license</b>
-\n\n The application license information (shown in the first
-page).<br><br>
-</li>
-<li><b>os</b>
-\n\n This parameter defines the directory (relative from
-./Products/BINARIES) where the Installation Wizard will search
-precompiled binaries packages. If this tag is not provided, binaries
-packages are looked for in the ./Products/BINARIES directory.<br><br>
-</li>
-</ul>
-
-<b>\<path\> section</b>
-\n\n This is an optional section; it defines default installation
-directories.
-<br><br>
-Attributes:
-<ul>
-<li><b>targetdir</b>
-\n\n The target directory - the path to the directory where products
-should be installed.<br><br>
-</li>
-<li><b>tempdir</b>
-\n\n The temporary directory - the path to the directory for the
-temporary files.<br><br>
-</li>
-</ul>
-
-<b>\<product\> section</b>
-\n\n This section describes product to be installed with the
-Installation Wizard. The XML file should include a \<product\> section
-for each product to be installed. The products appear in the tree view
-and are installed in the order they are described in the configuration
-file. It is recommended (but not obligatory) to define native products
-at the top of the list before all other products.
-<br><br>
-Attributes:
-<ul>
-<li><b>name</b>
-\n\n Product name.<br><br>
-</li>
-<li><b>version</b>
-\n\n Product version.<br><br>
-</li>
-<li><b>description</b>
-\n\n Product description (optional).<br><br>
-</li>
-<li><b>context</b>
-\n\n Context (optional). The possible values are '<b>salome
-sources</b>', '<b>salome binaries</b>' and '<b>prerequisite</b>'
-(several contexts can be given separated by ":" symbol).<br><br>
-</li>
-<li><b>supported</b>
-\n\n Supported modes of installation. Several modes can be separated
-by comma. Possible value are: <em>install sources, install binaries, use
-native</em>. The Installation script should contain the corresponding
-functions for each of the supported installation modes (see
-\ref installation_scripts "here").<br><br>
-</li>
-<li><b>install</b>
-\n\n Default (starting) installation mode.<br><br>
-</li>
-<li><b>disable</b>
-\n\n If this optional flag has 'true' value, the corresponding product
-will not appear in the list of products and will not be
-installed.<br><br>
-</li>
-<li><b>pickupenv</b>
-\n\n This flag points that pickup environment procedure should be
-performed for this product. If this flag equal to 'true', salome.sh
-and salome.csh files will be created in the product installation
-directory. Usually this option is set to true for SALOME KERNEL module
-sources and binaries package. This is an optional key, default value
-is 'false'.<br><br>
-</li>
-<li><b>dependancies</b>
-\n\n List of prerequisite products, which are necessary to build this
-product, separated by comma.<br><br>
-</li>
-<li><b>installdiskspace</b>
-\n\n Total amount of space (integer, in Kbytes), which the product
-occupies on the hard drive after the installation.<br><br>
-</li>
-<li><b>temporarydiskspace</b>
-\n\n Disk space (integer, in Kbytes) for temporary files, which is
-necessary to build the product from the sources.<br><br>
-</li>
-<li><b>script</b>
-\n\n The installation script name. This script is in charge of the
-installation of the product. It is called automatically by the
-Installation Wizard when necessary from the main program.
-See the \ref installation_scripts "next section" for more information.<br><br>
-</li>
-</ul>
-
-<b>\<button\> section</b>
-\n\n This is an optional section. It allows customization of the last
-"Finish installation" page of the Installation Wizard by adding one or
-more buttons in the lower part of the wizard's window. The script
-which is attached to each such button, can perform some specific
-action, for example, launch the application or show the Release Notes
-file by using an external program. See \ref finish_buttons "here" for
-more details about writing scripts.<br><br>
-Attributes:
-<ul>
-<li><b>label</b>
-\n\n This is the button text.<br><br>
-</li>
-<li><b>tooltip</b>
-\n\n The button tooltip (optional).<br><br>
-</li>
-<li><b>script</b>
-\n\n The script attached to the button.<br><br>
-</li>
-<li><b>disable</b>
-\n\n If this optional flag has 'true' value, the corresponding button
-will not appear in the "<em>Finish installation</em>" page - the section of XML
-file is silently ignored.<br><br>
-</li>
-</ul>
-
-\note If you add new products to be installed with Installation
-Wizard, you should also provide installation script for this
-product. See the next section for more details.
-
-<br>
-<hr>
-\anchor installation_scripts
-<h2>Implementing <em>installation scripts</em> for the new products</h2>
-
-When you want some product to be installed with the Installation
-Wizard, you should add its description \ref modifying_xml "to the configuration file"
-and create the installation script, following the rules described in this section.
-
-There are some obligatory functions which should be implemented in
-this installation script. These functions are automatically called by
-the master installation script or/and its GUI shell when it is
-necessary. \n File \b common.sh contains some service functions which can
-be used in your installation script, like \b make_env(), \b make_dir(),
-\b try_existing(), \b sort_path(), \b find_in_path(), etc.
-
-<ul>
-<li><b>check_version()</b>
-\n\n This function allows to check the version of the product already
-installed on the computer. It should try to find the product (native
-or preinstalled in the target directory) and check its version. This
-helps to avoid unnecessary reinstallation. This is an internal
-function and is not called from the master installation
-script.<br><br>
-</li>
-<li><b>try_native()</b>
-\n\n This function is called when the 'use native' installation mode
-is selected by the user. The function should try to find a native
-version of the product and define possibility of its use. It should
-create the environment file for the product in the temporary directory
-(see also the description of \b print_env() function). It is not
-necessary to implement this function if you do not provide native mode
-installation.<br><br>
-</li>
-<li><b>install_source()</b>
-\n\n This function is called when the 'install sources' installation
-mode is selected by the user. The function is responsible for building
-the product from the sources package. It should create the environment
-file for the product in the temporary directory (see also description
-of \b print_env() function). It is not necessary to implement this
-function if you do not provide sources mode installation.<br><br>
-</li>
-<li><b>install_source_and_build()</b>
-\n\n This function is called when SALOME module is installed and the
---\b all-from-sources (-\b a) option is used (<em>"Build SALOME sources"</em>
-check box in GUI mode). This function should be used to unpack SALOME
-sources package and then call the build/install procedure for it.
-For more details please refer to the \ref installing_products "this"
-and \ref gui_mode_install "this" sections for more details.<br><br>
-</li>
-<li><b>install_binary()</b>
-\n\n This function is called when the <em>'install binaries'</em> installation
-mode is selected by the user. The function is responsible for the
-extracting of the product from the binaries package. It should create
-environment for the product in the temporary directory (see also
-description of \b print_env() function). It is not necessary to implement
-this function if you do not provide binaries mode
-installation.<br><br>
-</li>
-<li><b>try_preinstalled()</b>
-\n\n This function is called when the 'not install' installation mode
-is selected by the user. In this case the script should inspect the
-target directory to try to find an already preinstalled product, pick
-up and check the environment from there. See \ref pick_up_env "here" for more
-details.<br><br>
-</li>
-<li><b>print_env()</b>
-\n\n This function is in charge of creating the environment script. It
-should create a file with name \b env_<product_name>.sh in the temporary
-directory and then copy it into the product installation
-directory. The file should contain all necessary environment variables
-settings for the product. It will be collected during the
-'pick-up-environment' procedure.<br><br>
-</li>
-<li><b>pickup_env()</b>
-\n\n This procedure corresponds to the \b pickupenv tag of the
-configuration xml file (see previous section). It should call the
-\b make_env procedure to perform the pick-up environment procedure for
-the product.<br><br>
-</li>
-</ul>
-
-The calling signature of the product installation script is the following:
-<b>\<product_script_name\> \<function_name\> \<temp_folder\>
-\<products_directory\> \<target_directory\> \<dependancies\>
-\<product_name\></b>
-\n\n where \n\n
-<b>\<product_script_name\></b> - installation script name (described in the
-configuration xml file);\n
-<b>\<function_name\></b> - the name of function, corresponding to the selected
-installation mode: \em try_native, \em install_source, \em install_binary or
-\em try_preinstalled;\n
-<b>\<temp_folder\></b> - temporary files directory;\n
-<b>\<products_directory\></b> - directory where the sources/binaries package
-can be found. You should provide the sources package in the
-<em>\<Install_Wizard_root_directory\>/Products/SOURCES</em> directory and
-binaries package in the
-<em>\<InstallWizard_root_directory\>/Products/BINARIES/\<os_version\></em>, where
-\<os_version\> is the target platform description, which appears in the
-corresponding section of the \ref modifying_xml "configuration xml file";
-<em>\<target_directory\></em> - root target directory where the product should be installed to;
-<em>\<dependancies\></em> - single-quoted list of prerequisite products, separated by space;
-<em>\<product_name\></em> - product name itself.
-
-\b Example:
-\n <em>med-2.2.3.sh install_binary /tmp/work
-./Products/BINARIES/Mandrake10.1 /usr/salome 'gcc Hdf' med</em>
-
-Copy the created script into the
-<em>\<Install_Wizard_root_directory\>/config_files</em> sub-directory where all
-installation scripts are stored. Installation Wizard will
-automatically search and call your script during the installation
-procedure.
-
-<br>
-<hr>
-\anchor finish_buttons
-<h2>Customizing <em>Readme page</em> buttons</h2>
-
-The Installation Wizard allows customizing the look-n-feel of the last
-<em>"Finish installation"</em> page. If you want to add one or more buttons to
-this page in order to perform some specific actions at the end of the
-installation (for example, to show the Release Notes file by using
-Open Office) you can put an additional section to the XML
-configuration file. This is the \b \<button\> section (see
-\ref modifying_xml "here" for more details).
-
-To implement the action which will be performed when the user clicks
-the button, you need to create a script and put it to the
-<em>\<Install_Wizard_root_directory\>/config_files</em> directory.
-\n There are some obligatory functions which should be implemented in
-this script. These functions are automatically called by the
-Installation Wizard GUI.
-
-<ul>
-<li><b>check_enabled()</b>
-\n\n This procedure is called by the Installation Wizard when the
-<em>"Finish installation"</em> page is displayed and the status of the buttons
-should be modified according to the installation options. This
-procedure should return \b 0 if the corresponding action can be performed
-and, thus, the button should become enabled. Otherwise, it should
-return \b 1 - in this case the corresponding button will be
-disabled.<br><br>
-</li>
-<li><b>execute()</b>
-\n\n This procedure is invoked when the user clicks the button. This
-procedure should return \b 0 if the corresponding action is done
-successfully and \b 1 if any error occurs.<br><br>
-</li>
-</ul>
-
-The calling signature of the script is the following:
-\n <b>\<product_script_name\> \<function_name\> \<target_directory\>
-\<temp_folder\></b>
-\n\n where \n\n
-\b \<product_script_name\> - the script name itself (retrieved from the XML configuration xml file);
-\n \b \<function_name\> - the name of function;
-\n \b \<target_directory\> - root target directory where the product is installed to;
-\n \b \<temp_folder\> - temporary files directory;
-
-\note The standard Installation Wizard buttons "Launch SALOME" and
-"Release Notes" are implemented with this feature. Refer to scripts
-\b start_salome.sh and \b release_notes.sh for sample implementation.
-
-\note Any button (even standard) can be ignored by the Installation
-Wizard if the attribute \b \<disable\> in the XML configuration file is set
-to the "true" value.
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page intro_to_salome_page Introduction to SALOME
-
-
-\b SALOME platform represents a generic open source platform for pre-
-and post-processing in numeric simulations. \b SALOME combines several
-software components, which are built in such a way that it allows to
-integrate solvers and existing meshing algorithms along with the
-specification of physical properties for a given domain. The
-originality of this approach is that the various components must
-cooperate dynamically and be
-configurable.
-
-\image html image54.jpg
-
-<br>SALOME platform integrates a number of modules each having its own function:
-<ul>
-<li>\b KERNEL : provides a common shell for all components, which can be integrated into the SALOME platform.
-<li>\b GUI : provides visual representation: basic widgets, viewers
-etc. Third party modules optionally can have GUI, but in any case they always connected with KERNEL.
-<li>\b Geometry : facilitates construction and optimization of geometrical models using a wide range of CAD functions.
-<li>\b Mesh : generates meshes on geometrical models previously created or imported by the Geometry component.
-<li>\b Supervisor : provides tools for construction of graphs and execution of calculations.
-<li>\b Post-Pro : performs data visualization.
-<li>\b MED : allows to work with MED files.
-</ul>
-
-*/
+++ /dev/null
-/*!
-
-\image html icon_about.png
-
-\page introduction_page Introduction
-
-<br>
-
-Welcome to SALOME Platform! Modern technological products (cars,
-structures, electrical or electronic equipment) are getting more and
-more complex every year and must meet increasingly severe requirements
-in terms of quality and performance. For example, for structures and
-their environment the demands to reduce risks and optimize costs are
-extremely high. It requires particularly refined simulations
-concerning structural behavior and robustness to ensure high
-reliability.
-\n The numeric modeling of a physical problem, the development of
-solutions and their integration into the design process are often
-handled in very specific environments. SALOME represents a generic
-CAD-based application for digital simulation with "high reactivity to
-market evolutions and customer expectations".
-
-SALOME is a free software that provides a generic platform for Pre and
-Post-Processing for numerical simulation. It is based on an open and
-flexible architecture made of reusable components available as free
-software.
-
-SALOME is a CAD/CAE integration platform. It provides reusable
-components for:
-<ul>
-<li>3D modeling (bottom-up construction, import, healing);
-<li>Visualization;
-<li>Computational schemas management;
-<li>Post-processing.
-</ul>
-
-SALOME is tailored for integration of custom components:
-<ul>
-<li>CAD interfaces;
-<li>Mesh generators;
-<li>Finite Element solvers with specific pre-processors.
-</ul>
-
-The SALOME platform is available in Open Source.
-
-<b>Salome Platform:</b>
-<ul>
-<li>Supports interoperability between CAD modeling and computation software (CAD-CAE link)
-<li>Makes easier the integration of new components on heterogeneous systems for numerical computation
-<li>Sets the priority to multi-physics coupling between computation software
-<li>Provides a generic user interface, user-friendly and efficient, which helps to reduce the costs and delays of carrying out the studies
-<li>Reduces training time to the specific time for learning the software solution which has been based on this platform
-<li>All functionalities are accessible through the programmatic
-integrated Python console
-</ul>
-
-\image html image65.gif
-
-<b>What can you do in SALOME? (Some of SALOME main functions)</b>
-<ul>
-<li>Define geometrical models (create/modify geometrical items), import and export them using the BREP, IGES and STEP formats;
-<li>Define meshing of these geometrical items, import and export them;
-<li>Handle physical properties and quantities attached to geometrical items, import and export them to a reusable format;
-<li>Perform computations using a solver (optionally provided): read input data, configure the solver, and write calculation results);
-<li>Visualize result fields in 3D, 2D and export images of their visualization to an appropriate format;
-<li>Manage study schemes: definition, save/restore;
-<li>Manage computation schemes: definition, execution.
-</ul>
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page introduction_to_gui_page Introduction to GUI
-
-\b GUI (Graphical User Interface) provides a common shell for all components, which can be integrated into the SALOME platform.
-
-\b GUI component in SALOME platform provides:
-<ul>
-<li>Common desktop environment (\ref salome_desktop_page "SALOME desktop") for all
-components</li>
-<li>Component integration and management: uploading, switching,
-component menus/toolbars handling</li>
-<li>Study management (creation, saving, loading, editing studies)</li>
-<li>Multi-window management in the framework of one study</li>
-<li>Management of objects created or imported into the SALOME
-application (\ref using_object_browser_page "Object Browser")</li>
-<li>Integrated Python interpreter</li>
-<li>Output messages window</li>
-<li>Additional tools : \ref using_catalog_generator_page "Catalogue Generator",
-\ref using_registry_tool_page "Registry tool"</li>
-<li>Standard viewers for data visualization:</li>
-<ul>
-<li>VTK 3d viewer
-<li>OCC 3d viewer
-<li>Gauss Points viewer
-<li>Plot 2d viewer
-<li>Supervision viewer
-</ul>
-</ul>
-
-
-
-Since version 3.0.0 SALOME GUI is based on SUIT (Salome User Interface
-Toolkit) that proposes very flexible, powerful and safe mechanisms of
-interaction with SALOME tool components (both CORBA and standalone),
-resources management, viewers and selection handling,
-exception/signals processing, bringing to top multi-desktop
-dockable-windowed user interface which improves the usability of
-SALOME GUI.
-\n All Graphical User Interfaces of standard modules have plug-in
-structure, i.e. each module is placed in a dynamic library which is
-loaded on demand. All modules can create their own menu items, buttons
-in toolbar, windows etc
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page mesh_preferences_page Mesh preferences
-
-In the Mesh module you can set mesh preferences, which can be used in
-later sessions with this module.
-
-<h2>General Preferences</h2>
-
-\image html pref21.png
-
-<ul>
-<li><b>Update</b></li>
-<ul>
-<li>If you toggle <b>Automatic Update</b> checkbox, the model in your
-viewer automatically updated whenever you make changes in it.</li>
-</ul>
-<li><b>Quality Controls</b></li>
-<ul>
-<li>If you toggle <b>Display entity</b>, both faces and edges of an
-object will be displayed in the viewer by default.</li>
-<li>If you toggle <b>Use precision</b> checkbox, you can display numbers in
-<b>Quality Control</b> diagrams at the necessary level of precision.</li>
-</ul>
-<li><b>Precision</b> - can be defined by the <b>Number of digits after point</b> in
-the corresponding field. By default, numbers in <b>Quality Control</b>
-diagrams are presented as integers.</li>
-<li><b>Display mode</b> - allows to set Wireframe, Shading, Nodes or Shrink
-presentation mode as default.</li>
-<li><b>Mesh export</b></li>
-<ul>
-<li>If you toggle <b>Automatically create groups for MED export</b> checkbox,
-this operation will be carried out automatically.</li>
-<li>If you toggle <b>Automatic renumbering</b> checkbox, the exported
-mesh will be renumbered automatically</li>
-</ul>
-</ul>
-
-<h2>Mesh Preferences</h2>
-
-\image html pref22.png
-
-<ul>
-<li><b>Nodes</b></li>
-<ul>
-<li><b>Color</b> - allows to select the color of nodes. Click on the
-colored line to access to the \ref select_color_and_font_page "Select Color"
-dialog box.</li>
-<li><b>Size</b> - allows to define the size of nodes.</li>
-</ul>
-<li><b>Elements</b></li>
-<ul>
-<li><b>Fill</b> - allows to select the color of surface of elements
-(seen in Shading mode). Click on the colored line to access to the
-\ref select_color_and_font_page "Select Color" dialog box.</li>
-<li><b>Outline</b> - allows to select the color of borders of
-elements. Click on the colored line to access to the
-\ref select_color_and_font_page "Select Color" dialog box.</li>
-<li><b>Back Face</b> - allows to select the color of interior surface
-of elements. Click on the colored line to access to the
-\ref select_color_and_font_page "Select Color" dialog box.</li>
-<li><b>Width</b> - allows to define the width of lines (edges and borders of elements).</li>
-<li><b>Shrink coef.</b> - allows to define relative space of elements
-compared to gaps between them in shrink mode.</li>
-</ul>
-</ul>
-
-<br><h2>Selection Preferences</h2>
-
-\image html pref23.png
-
-<ul>
-<li><b>Selection</b> - performed with mouse-indexing (preselection)
-and left-clicking on an object, whose appearance changes as defined in
-the <b>Preferences</b>.</li>
-<ul>
-<li><b>Object Color</b> - allows to select the color of mesh (edges and
-borders of meshes) of the selected entity. Click on the colored line
-to access to the \ref select_color_and_font_page "Select Color" dialog
-box.</li>
-<li><b>Element color</b> - allows to select the color of surface of selected
-elements (seen in Shading mode). Click on the colored line to access
-to the \ref select_color_and_font_page "Select Color" dialog box.</li>
-<li><b>Width</b> - allows to define the width of selected edges. </li>
-</ul>
-<li><b>Preselection</b> - performed with mouse-indexing on an object,
-whose appearance changes as defined in the <b>Preferences</b>.</li>
-<ul>
-<li><b>Highlight Color</b> - allows to select the color of mesh (edges and
-borders of meshes) of the entity . Click on the colored line to access
-to the \ref select_color_and_font_page "Select Color" dialog box.</li>
-<li><b>Width</b> - allows to define the width of preselected edges.</li>
-</ul>
-<li><b>Precision</b> - in this menu you can set the value of precision
-used for <b>Nodes</b>, <b>Elements</b> and <b>Objects</b>.</li>
-</ul>
-
-<br><h2>Scalar Bar Preferences</h2>
-
-\image html pref24.png
-
-<ul>
-<li><b>Font</b> - in this menu you can set type, face and color for
-the font of <b>Title</b> and <b>Labels</b>.</li>
-<li><b>Colors & Labels</b> - in this menu you can set the <b>number of
-colors</b> and the <b>number of labels</b> in use.<li>
-<li><b>Orientation</b> - here you can choose between vertical and
-horizontal orientation of the <b>Scalar Bar</b></li>.
-<li><b>Origin & Size Vertical & Horizontal</b> - allows to define
-placement (<b>X</b> and <b>Y</b>) and lookout (<b>Width</b> and
-<b>Height</b>) of Scalar Bars</li>
-<ul>
-<li><b>X</b>: abscissa of the point of origin (from the left
-side)</li>
-<li><b>Y</b>: ordinate of the origin of the bar (from the bottom)</li>
-</ul>
-</ul>
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page occ_3d_viewer_page OCC 3D Viewer
-
-<b>OCC (Open CasCade) 3D viewer</b> has been developed on the basis of Open
-CASCADE Technology. This is the default viewer for Geometry Module,
-providing good representation of construction and transformation of
-geometrical objects. Only this viewer allows to work with groups and
-sub-shapes. This viewer can also work in Mesh module, however, it
-doesn't allow to visualize meshes.
-
-The functionalities of OCC viewer are available via its Viewer
-Toolbar. Buttons marked with small downward triangles have extended
-functionality which can be accessed by locking on them with left mouse
-button.
-
-\image html image95.gif "Viewer Toolbar"
-
-<hr>
-\image html image77.gif
-\n <center><b>Dump View</b> - exports an object from the viewer in bmp, png, jpg
-or jpeg image format.</center>
-<hr>
-
-\image html image88.gif
-\n <center><b>Show/Hide Trihedron</b> - shows or hides coordinate axes.</center>
-<hr>
-
-\image html image96.gif
-\n <center><b>Fit all</b> - allows to select a point to be the center of a
-scene representing all displayed objects in the visible area.</center>
-<hr>
-
-\image html image97.gif
-\n <center><b>Fit area</b> - resizes the view to place in the visible area
-only the contents of a frame drawn with pressed left mouse button.</center>
-<hr>
-
-\image html image98.gif
-\n <center><b>Zoom</b> - allows to zoom in and out.</center>
-<hr>
-
-\image html image99.gif
-\n <center><b>Panning</b> - if the represented objects are greater that the
-visible area and you don't wish to use <b>Fit all</b> functionality, click on
-this button and you'll be able to drag the scene to see its remote
-parts.</center>
-<hr>
-
-\image html image100.gif
-\n <center><b>Global panning</b> - represents all displayed objects in
-the visible area.</center>
-<hr>
-
-\image html view_rotation_point.png
-\n <center><b>Change rotation point</b> - allows to to choose the point around
-which the rotation is performed.</center>
-
-\image html set_rotation_point_dialog1.png
-
-<center>By default the rotation point is located in the Center of the bounding
-box of an object.</center>
-
-\image html set_rotation_point_dialog2.png
-
-<center>Unchecking <b>Use Bounding Box Center</b> checkbox allows you to
-define the coordinates of the rotation point manually.</center>
-
-<b>Set to Origin</b> button restores the default rotation point
-coordinates.\n
-<b>Select Point from View</b> button allows to select the rotation
-point in the 3D Viewer.
-<hr>
-
-\image html image89.gif
-\n <center><b>Rotation</b> - allows to rotate the selected object using the
-mouse.</center>
-
-\image html image102.gif
-
-<center>These buttons orientate the scene strictly about coordinate axes.</center>
-<hr>
-
-\image html image91.gif
-\n <center><b>Reset</b> - restores the default position (isometric) of
-objects in the scene.</center>
-<hr>
-
-\image html image103.gif
-\n <center><b>Memorise view</b> - saves the current position of
-objects in the scene.</center>
-<hr>
-
-\image html image105.gif
-\n <center><b>Restore view</b> - restores the saved position of
-objects in the scene.</center>
-<hr>
-
-\image html image86.gif
-\n <center><b>Clone view</b> - opens a new duplicate scene.</center>
-<hr>
-
-\image html image106.gif
-\n <center><b>Clipping</b> - allows to create cross-section views
-(clipping planes) of geometrical objects.</center>
-
-\image html clipping.png
-
-<ul>
-<li><b>Base point</b> - allows to define the coordinates of the base
-point for the clipping plane.</li>
-<ul>
-<li><b>Reset</b> - returns the base point to coordinate origin.</li>
-</ul>
-<li><b>Direction</b> - allows to define the orientation of the
-clipping plane.</li>
-<ul>
-<li><b>Invert</b> - allows to select which part of the object will be removed
-and which will remain after clipping.</li>
-</ul>
-<li><b>Preview</b> - allows to see the results of clipping in the
-viewer.</li>
-</ul>
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page opening_studies_page Opening studies
-
-In \b SALOME all studies are stored in a special format *.hdf.
-
-<em>To open an existing study:</em>
-\par
-In the main toolbar click "Open document" button or from the main menu select <b>File > Open</b>
-option. From a standard Search File dialog box choose the required
-*.hdf file and click \b Open button.
-
-\image html open.jpg ""Open document" button"
-
-<em>To load an unloaded study (\ref saving_and_closing_studies_page
-"see also"):</em>
-\par
-From the main menu select <b>File > Connect</b> option. In the following
-dialog box select one of the studies, which has been previously
-created and unloaded and click \b Ok button:
-
-\image html loadstudy2.png
-
-\n\b Tip: After opening an existing study, you will see its structure
-in the \ref using_object_browser_page "Object Browser". It will contain the objects created with the
-help of different components during the previous study session. If you
-right-click on one of the objects and from the associated pop-up menu
-choose <b>Open With</b> option, which will automatically launch the component
-corresponding to this object.
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page plot2d_viewer_page Plot 2D viewer
-
-\n <b>Plot 2d viewer</b> is destined to the representation of 2d
-plots and graphs in Post-Pro module.
-\n Its viewer toolbar gives you fast access to the following
-operations:
-
-\image html image77.gif
-<center><b>Dump View</b> - exports an object from the viewer in bmp,
-png, jpg or jpeg image format.</center>
-
-\image html image96.gif
-<center><b>Fit all</b> - scales the display to show the entire
-scene. Use this to resize the scene so that it could fit within the
-Viewer boundary.</center>
-
-\image html image97.gif
-<center><b>Fit area</b> - resizes the view to place in the visible
-area only the contents of a frame drawn with pressed left mouse
-button.</center>
-
-\image html image98.gif
-<center><b>Zoom</b> - allows to zoom in and out.</center>
-
-\image html image99.gif
-<center>\b Panning - if the represented objects are greater that the
-visible area and you don't wish to use Fit all functionality, click on
-this button and you'll be able to drag the scene to see its remote
-parts.</center>
-
-\image html image100.gif
-<center><b>Global panning</b> - allows to define the center of the
-scene presenting all displayed objects in the visible area.</center>
-
-\image html plot2d_points.gif
-<center><b>Draw Points</b> - represents points on the graph.</center>
-
-\image html plot2d_lines.gif
-<center><b>Draw Lines</b> - represents lines on the graph.</center>
-
-\image html plot2d_splines.gif
-<center><b>Draw Splines</b> - represents splines on the graph.</center>
-
-\image html plot2d_logarithmic_horizontal.gif
-<center><b>Horizontal axis logarithmic</b> - changes the scaling on
-horizontal axis to logarithmic.</center>
-
-\image html plot2d_logarithmic_vertical.gif
-<center><b>Vertical axis logarithmic</b> - changes the scaling on vertical
-axis to logarithmic.</center>
-
-\image html plot2d_legend.gif
-<center><b>Show Legend</b> - reveals all verbal and numerical
-information on the graphs.</center>
-
-\image html plot2d_settings.gif
-<center>\b Settings - calls a menu, in which you can specify advanced
-settings for your Plot 2d Viewer.</center>
-
-\image html plot2d_clone.gif
-<center><b>Clone view</b> - opens a new duplicate scene.</center>
-
-\anchor settings
-\n \image html plot2d_view_settings.png
-
-The options are as follows:
-<ul>
-<li><b>Main title:</b> the title of the XY plot. By default, it will
-consist of the names of the tables, on the basis of which the curve
-lines have been constructed.</li>
-<li><b>Curve type:</b> you can select from \b Points, \b Lines and \b Spline.</li>
-<li><b>Show legend:</b> here you can define the position of the
-description table on the XY plot (to the \b Left, to the \b Right, on
-\b Top or on \b Bottom).</li>
-<li><b>Marker size</b> - size of the points (markers) forming curve lines.</li>
-<li><b>Background color</b> of the XY plot.</li>
-<li><b>Scale mode:</b> here you can select the type of scaling (\b
-Linear or \b Logarithmic) along <b>X (Horizontal)</b> or <b>Y (Vertical)</b> axes.</li>
-</ul>
-
-You can define settings for each axis separately:
-<ul>
-<li>\b Horizontal or \b Vertical axis title.</li>
-<li><b>Grid/Axes marks:</b> here you can define the maximum number of major
-and minor scale divisions for a specified axis. The real number of
-intervals fits to {1,2,5}*10^N, where N is a natural number, and
-doesn't exceed the maximum.</li>
-<li><b>Save settings as default:</b> If this check box is marked, all
-XY plots will be displayed with these defined properties.</li>
-</ul>
-
-*/
+++ /dev/null
-/*!
-
-\page postpro_preferences_page Post-Pro Preferences
-
-In the Post-Pro module you can set preferences, default settings,
-which can be used in later sessions with this module.
-
-<h2>MED import Preferences</h2>
-
-\image html ppref1.png
-
-<ul>
-<li><b>MED files import</b></li>
-<ul>
-<li><b>Use Build Progress</b> - when this option is checked you can choose
-all other import MED options at the moment of loading of each file
-using <b>Build Progress</b> menu, otherwise the loading will be done
-according to the <b>Preferences</b> without addressing to the
-user.</li>
-<li><b>Full MED Loading</b> - when this option is checked, the MED file is
-fully loaded in the study, and no additional access to the MED file is
-needed during the session. Reversibly, when unchecked, the MED file is
-loaded on demand. This is the default behaviour in SALOME and
-recommended for big files to optimize memory usage.</li>
-<li><b>Build at once</b> - when this option is checked, you can't
-perform any operations until the MED file is fully loaded and
-processed.</li>
-<li><b>Build fields</b> - when this option is checked, the fields are
-built automatically at loading.</li>
-<li><b>Build min/max</b> - when this option is checked, minimum and
-maximum values of the time stamps are found at loading.</li>
-<li><b>Build groups</b> - when this option is checked, the groups and
-families are built automatically at loading.</li>
-<li><b>Close dialog at finish</b> - when this option is checked, the
-dialog box is closed after loading of the selected MED file. When
-unchecked, it allows loading other MED files.</li>
-</ul>
-</ul>
-
-<br><h2>Scalar Bar Preferences</h2>
-
-\image html pref31.png
-
-<ul>
-<li><b>Scalar Range</b></li>
-<ul>
-<li><b>Scalar Mode</b> - this feature allows refining the value to be
-inspected:</li>
-<ul>
-<li><b>Modulus:</b> value of a scalar or modulus of a vector.</li>
-<li><b>Component N:</b> Nth component of a vector, a tensor or a matrix.</li>
-</ul>
-<li><b>Logarithmic Scaling</b> - this checkbox toggles logarithmic
-scaling.</li>
-<li><b>Ranges to Use</b> - you can use either Field Range or Imposed Range.</li>
-</ul>
-<li><b>Min and Max for Imposed Range</b> - in this menu you can set
-the limits for your Imposed Range, if you have chosen to use it.</li>
-<li><b>Font</b> - in this menu you can set type, face and color for
-the font of <b>Title</b> and <b>Labels</b>.</li>
-<li><b>Colors & Labels</b> - in this menu you can set the <b>number of
-colors</b> and the <b>number of labels</b> in the Scalar bar.</li>
-<li><b>Orientation</b> - here you can choose between vertical and horizontal
-orientation of the Scalar Bar.</li>
-<li><b>Origin & Size Vertical & Horizontal</b> - allows to define
-placement (<b>X</b> and <b>Y</b>) and lookout (<b>Width</b> and
-<b>Height</b>) of Scalar Bars.</li>
-<ul>
-<li><b>X:</b> abscissa of the point of origin (from the left
-side)</li>
-<li><b>Y:</b> ordinate of the origin of the bar (from the bottom)</li>
-</ul>
-<li><b>Scalar bars default position</b></li>
-<ul>
-<li><b>Arrange Scalar Bars</b> - this option prevents superposition of
-scalar bars during visualisation of several fields in the same
-window. If checked, a separate scalar bar is displayed for each
-presentation.</li>
-</ul>
-</ul>
-
-<br><h2>Cut Lines Preferences</h2>
-
-\image html ppref2.png
-
-<ul>
-<li><b>CutLine Preferences</b></li>
-<ul>
-<li><b>Show preview</b> check box allows to edit the parameters of the
-presentation and simultaneously observe the preview of this
-presentation in the viewer.</li>
-<li><b>Invert all curves</b> check box allows to invert the resulting
-curves.</li>
-<li><b>Use absolute length</b> check box allows to use absolute length
-for curves.</li>
-<li><b>Generate Data Table:</b> If this check box is marked, <b>Post
-Pro</b> will automatically generate a data table on the basis of your
-Cut Lines presentation. This table will be created in the structure of
-the study.</li>
-<li><b>Generate Curves:</b> If this check box is marked, <b>Post Pro</b> will
-automatically generate curve lines on the basis of values taken from
-the generated data table. These curves will be created in the
-structure of the study and can be visualized in a XY plot.</li>
-</ul>
-</ul>
-
-<br><h2>Sweep Preferences</h2>
-
-\image html ppref3.png
-
-<ul>
-<li><b>Sweeping preferences</b></li>
-<ul>
-<li><b>Mode of the Sweeping</b> - allows to choose between Linear,
-Cosinusoidal and sinusoidal sweeping.</li>
-<li><b>Time step</b> - in this menu you can set the time of
-representation of one step.</li>
-<li><b>Number of cycles</b> - in this menu you can define the number
-of times this animation will be repeated.</li>
-<li><b>Number of steps</b> - in this menu you can define the number of
-steps, which will compose the whole animation.</li>
-<li><b>Parameter varies</b> - allows to choose the range for the
-parameter: from 0 to Pi or from Pi to -Pi.</li>
-</ul>
-</ul>
-
-<ul>
-<li><b>Animation preferences</b></li>
-<ul>
-<li><b>Speed</b> - allows to define the speed of the animation.</li>
-<li><b>Cycled animation</b> - allows to start a cycled animation of the presentation.</li>
-<li><b>Use proportional timing</b> - allows to render the animation with proportional periods of time between every frame (not depending on the time stamps).</li>
-<li><b>Clean memory at each frame</b> - this option allows to optimize the performance of the operation.</li>
-</ul>
-</ul>
-
-<br><h2>Representation Preferences</h2>
-
-\image html pref33.png
-
-<ul>
-<li><b>Representation properties</b> - these checkboxes allow to
-choose the default representation type for each field presentation.</li>
-<ul>
-<li><b>Use Shading</b> - when this option is checked, the objects will
-be displayed with shading.</li>
-<li><b>Display only on creation</b> - when this option is checked, all
-previously created presentations will be automatically removed from
-the viewer when a new presentation is created and displayed. You can
-restore the previously created presentations using the Object
-Browser.</li>
-</ul>
-</ul>
-
-<br><h2>3D Cache</h2>
-
-\image.html pref40.png
-
-<ul>
-<li><b>3D Cache Preferences</b> - allow to define the mode of usage
-and the size of the 3D Cache, which enables to save in RAM and quickly
-restore the states of field animation.</li>
-<ul>
-<li><b>Memory Mode</b> - allows to define the mode of usage
-of the 3D Cache: <b>Minimal</b> actually disables the Cache,
-<b>Limited</b> Cache size depends on the current system
-configuration.</li>
-<li><b>Memory Limit</b> - allows to define the maximum size of the 3D
-Cache</li>
-</ul>
-</ul>
-
-
-<br><h2>Gauss Points Preferences</h2>
-
-\image html pref34.png
-
-<ul>
-<li><b>Primitive</b> - this menu allows user to choose the graphic
-primitive to use to present the results at Gauss points in the
-viewer.</li>
-<ul>
-<li><b>Primitive type</b> - provides choice between <b>Point
-sprites</b>, <b>Open GL points</b> and <b>Geometrical Spheres</b>.</li>
-<li><b>Maximum Size (Clamp)</b> - defines the maximum size of sprite
-points ranging from 1 to 512. By default the value is set to 256
-pixels.</li>
-<li><b>Main Texture</b> - path to the <b>Main Texture</b> (16x16
-pixels) which defines the shape of the point sprite used for
-rendering.</li>
-<li><b>Alpha Channel Texture (16*16)</b> - path to the <b>Alpha
-Channel Texture</b> which defines the texture of the point
-sprite.</li>
-<li><b>Alpha Channel Threshold</b> - defines the level of transparency
-ranging from 0 to 1.</li>
-<li><b>Geometrical Sphere Resolution</b> - defines the number of faces
-of <b>Geometry Spheres</b>.</li>
-<li><b>Notify when number of faces exceeds</b> - limitation of the
-number of faces; the user will be warned if it exceeds the given
-value.</li>
-</ul>
-</ul>
-
-<ul>
-<li><b>Size</b> - in this menu you can define:</li>
-<ul>
-<li><b>Range value for min and max size</b> - these two parameters
-will be respectively multiplied by a reference length (average size of
-cells of the mesh) to define the range for minimum and maximum size of
-a point during rendering (at magnification = 100%). Default values
-are:</li>
-<ul>
-<li><b>Rainbow</b> scale: <b>min</b> = <b>10%</b>, <b>max</b> =
-<b>33%</b></li>
-<ul>
-<li>Min size is associated to the smallest real value (including
-negative values).</li>
-<li>Max size is associated to the largest real value.</li>
-</ul>
-<li><b>Bicolor</b> scale: <b>min</b> = <b>0</b> (not editable),
-<b>max</b> = <b>33%</b></li>
-<ul>
-<li>Null size is associated to the 0 scalar value.</li>
-<li>Max size is associated to the largest absolute value.</li>
-</ul>
-</ul>
-Both values are dynamically updated by the system according to the
-selected scalar bar. In the case of a Bicolor scale, the minimum value
-is set to 0 in the dialog and the control is disabled.
-<li><b>Magnification (%)</b> corresponds to the change of size of
-results at Gauss point primitives in 2D space. Acceptable values range
-from 0 to N; 100% means no magnification, 50% means half of its size,
-200% mean twice its size and so forth. By default this value is set to
-100%.</li>
-<li><b>+/- Ratio</b> corresponds to the number by which the
-magnification will be respectively multiplied or divided at edition,
-ranging from 0.01 to 10. By default this value is set to 2.</li>
-</ul>
-</ul>
-
-<ul>
-<li><b>Geometry</b></li>
-<ul>
-<li><b>Size of points (%)</b> defines a value that will be multiplied
-by a reference length (representative of the average size of cells of
-the mesh) to define the size of points during rendering (at
-magnification = 100%). Default values 10%.</li>
-<li><b>Color</b> - allows to select the color of points used for
-presentations. Click on the colored line to access to the \ref
-select_color_and_font_page "Select Color" dialog box.</li>
-</ul>
-</ul>
-
-<ul>
-<li><b>Gauss Points Scalar Bar</b></li>
-<ul>
-<li><b>Active Bar</b> - this option allows to choose <b>Local</b> or
-<b>Global</b> Bar as active.</li>
-<li><b>Display Global Bar</b> - this option allows to visualize or to
-hide the Global Bar.</li>
-<li><b>Scalar Bar Mode</b> - this option allows to choose between
-<b>Bicolor</b> and <b>Rainbow</b> Scalar Bar Mode.</li>
-<li><b>Spacing</b> - allows to define Spacing from 0.01 to 1.</li>
-</ul>
-</ul>
-
-<br><br><b>Inside<b> and </b>Outside Cursor Preferences</b> allow to set
-<b>Primitives</b>, <b>Size</b> and <b>Magnification</b> for the
-respective zones.
-
-<br><h2>Picking Preferences</h2>
-
-\image html pref37.png
-
-<ul>
-<li><b>Cursor</b> - allows to adjust the Size of the cursor used for
-Picking (ranging from 0.1 to 1), the Height of the pyramids (ranging
-from 0 to 10) and the Selection cursor color.</li>
-<li><b>Tolerance</b> - defines at which distance of the cursor from
-the point it becomes selected (ranges from 0.001 to 10).</li>
-<li><b>Information window</b> - allows to define the
-<b>Transparency</b> (from 0% = opaque to 100% = transparent) and
-<b>Position</b> of the window, which can be:</li>
-<ul>
-<li><b>Centred below the point</b>, or</li>
-<li>located at <b>Top-left corner of the 3D view</b></li>
-</ul>
-<li><b>Movement of the Camera</b> can also be define by the user.</li>
-<ul>
-<li><b>Zoom at first selected point</b> - This value is used to define
-the focal distance at the first selected point (at the end of the
-movement of the camera). This value is a ratio that will be multiplied
-by the current zoom value.</li>
-<li><b>Number of steps between two positions</b> - defines the
-smoothness of camera movement at selection by the number of
-iterations. If set to 1 the camera is zoomed and centered at the point
-momentarily. Greater numbers mean very slow camera movement.</li>
-</ul>
-<li><b>Display parent mesh element</b> - allows to visualize or hide
-the patent mesh element of the selected gauss point.</li>
-</ul>
-
-<br><h2>Navigation Preferences</h2>
-
-\image html pref38.png
-
-<br>
-<ul>
-<li><b>Mouse</b></li>
-<ul>
-<li><b>Mouse Behaviour</b> - this option allows to choose one of the
-modes of work with mouse in Gauss Viewer.</li>
-<ul>
-<li><b>Salome Standard Controls</b> - allows to manipulate objects in the
-viewer with the mouse and locked Ctrl button: increase or decrease the
-zoom ratio with the left mouse button, translate object in any
-direction with the central mouse button or rotate it with the right
-mouse button.</li>
-<li><b>Keyboard Free</b> - allows to manipulate objects in the viewer
-with the mouse without locking Ctrl button. In this case the
-operations are assigned to the buttons differently: rotation is made
-with the left button, translation with the right and zoom with both
-pressed in the same time.</li>
-</ul>
-</ul>
-</ul>
-
-<ul>
-<li><b>Keyboard</b></li>
-<ul>
-<li><b>[+]/[-] Speed Increment</b> - defines the number of units by
-which the speed increases or respectively decreases after pressing [+]
-or [-] keyboard buttons.</li>
-</ul>
-</ul>
-
-<ul>
-<li><b>Spacemouse</b> - a mouse-like manipulator device specially designed
-for working with 3D presentations, objects, etc. You can reassign the
-actions listed below to any of its buttons.</li>
-<ul>
-<li><b>Decrease Speed Increment</b> - decreases by 1 the speed increment used for the keyboard (same as [-] key).</li>
-<li><b>Increase Speed Increment</b> - increase by 1 the speed increment used for the keyboard (same as [+] key).</li>
-<li><b>Decrease Gauss Points Magnification</b> - divides the current magnification by the magnification ratio.</li>
-<li><b>Increase Gauss Points Magnification</b> - multiplies the current magnification by the magnification ratio.</li>
-<li><b>Dominant / combined switch</b> - toggles button to switch to dominant or combined movements.</li>
-</ul>
-</ul>
-
-<br><h2>Recorder Preferences</h2>
-
-\image html pref38.png
-
-<ul>
-<li><b>Settings</b></li>
-<ul>
-<li><b>Mode</b> - allows to choose from two recording regimes:</li>
-<ul>
-<li><b>Recording all displayed frames</b> - records exactly at the FPS rate specified by the user.</li>
-<li><b>Recording at a given FPS</b> - records only when the contents
-of the viewer change (some activity is performed). In the AVI file
-non-recorded images are substituted with the copies of the latest
-recorded image, which produces files with lower quality but requires
-less system resources. </li>
-</ul>
-<li><b>FPS</b> - allows to define the FPS (frames per second) rate for
-the clip. Set greater value for better quality.</li>
-<li><b>Quality</b> - allows to set the quality of the clip in the
-interval between 0 and 100.</li>
-<li><b>Progressive</b> - allows to record a progressive API
-file.</li>
-</ul>
-</ul>
-
-*/
+++ /dev/null
-/*!
-
-\page running_salome_page Running SALOME
-
-<em>To launch SALOME:</em>
-<ol>
-<li>Install the SALOME package into a definite directory (ex. \b SALOME)
-on your hard disk. It is preferable if you use the special
-installation procedure allowing to install the SALOME platform and
-all corresponding applications.</li>
-<li>The installation shell script will create a special file:
-<b>salome.csh</b> (CShell file) in your SALOME/KERNEL directory. This file
-contains all environment variables necessary for launching SALOME
-platform with other application products provided with SALOME
-installation package. You have a possibility to add one of them into
-your profile if you enter in the command console the following: <br><br>
-<tt>source salome.csh</tt>
-
-<b>Tip:</b> During the installation procedure you have a possibility to set your profile automatically.</li>
-
-<li> Launch SALOME platform, using the following Python script located
-in the <b>SALOME/KERNEL/bin/salome</b> directory:<br><br>
-<ul>
-<li>\b runSalome.py [command line options]
-</ul>
-</li>
-</ol>
-
-\anchor batch_mode_run
-
-<table>
-<tr>
-<td><h2>Options</h2></td>
-<td><h2>Description</h2></td>
-</tr>
-<tr>
-<td>--\b help or -\b h</td>
-<td>print this help</td>
-</tr>
-<tr>
-<td>--\b gui or -\b g</td>
-<td>launch with GUI</td>
-</tr>
-<tr>
-<td> --\b terminal or -\b t</td>
-<td>launch without GUI in batch mode</td>
-</tr>
-<tr>
-<td>--\b logger or -\b l</td>
-<td>redirects log messages in the file <em>logger.log</em></td>
-</tr>
-<tr>
-<td>--\b file=<b>\<FILE\></b> or -\b f=<b>\<FILE\></b></td>
-<td>redirects log messages in a custom file</td>
-</tr>
-<tr>
-<td>--\b xterm or -\b x</td>
-<td>the servers open an xterm window and log messages are displayed in this window</td>
-</tr>
-<tr>
-<td>--\b modules=\b module1,\b module2,... or -\b m=\b module1,\b module2,...</td>
-<td>list of SALOME modules which will be loaded into the module catalogue</td>
-</tr>
-<tr>
-<td>--\b embedded=<b>registry,study,moduleCatalog,cppContainer</b>,
-or -\b e=<b>registry,study,moduleCatalog,cppContainer</b></td>
-<td>embedded CORBA servers (default: registry,study,moduleCatalog,cppContainer)
-note that logger,pyContainer,supervContainer can't be embedded</td>
-</tr>
-<tr>
-<td>--\b standalone=<b>registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer</b>, or
--\b s=<b>registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer</b></td>
-<td>standalone CORBA servers (default: pyContainer,supervContainer)</td>
-</tr>
-<tr>
-<td>--\b containers=<b>cpp,python,superv</b>
-or -\b c=<b>cpp,python,superv</b></td>
-<td>launch of cpp, python and supervision containers</td>
-</tr>
-<tr>
-<td>--\b portkill or -\b p</td>
-<td>kill SALOME launched with the current port</td>
-</tr>
-<tr>
-<td>--\b killall or -\b k</td>
-<td>kill SALOME</td>
-</tr>
-<tr>
-<td>--<b>interp</b>=<b>n</b> or -<b>i</b>=<b>n</b></td>
-<td>number of additional xterm to open, with session environment</td>
-</tr>
-<tr>
-<td>-\b z</td>
-<td>display splash screen</td>
-</tr>
-<tr>
-<td>-\b r</td>
-<td>disable centralized exception handling mechanism</td>
-</tr>
-</table>
-
-<b>Tip:</b> If the \b runSalome.py script is launched without prompting
-any options, they will be taken by default from the file <b>SalomeApp.xml
-(SALOME/GUI/share/salome/resources/SalomeApp.xml)</b>. If you are
-constantly launching SALOME with some specific options which are
-different from the defaults, you can edit this file according to your
-requirements. So the next time you run SALOME, you won't have to enter
-these numerous command console options.
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page salome_architecture_page SALOME architecture
-
-
-\b SALOME architecture is based on \b CORBA technology using
-distributed system model of applications. This architecture takes the
-concept of multitier client/server to its natural conclusion. The
-distributed system model exposes all functionality of the application
-as objects, each of which can use any of the services provided by
-other objects in the system, or even objects in other systems. The
-architecture can also blur the distinction between "client" and
-"server" because the client components can also create objects that
-behave in server-like roles. This architecture provides the ultimate
-in flexibility.
-
-
-
-The distributed system architecture achieves its flexibility by
-encouraging (or enforcing) the definition of specific component
-interfaces. The interface of a component specifies to other components
-what services are offered by that component and how they are used. As
-long as the interface of a component remains constant, that
-component's implementation can change dramatically without affecting
-other components.
-
-
-
-All software components (Post-Pro, Geometry, Mesh...) integrated into
-\b SALOME platform implement predefined interfaces. Each component
-provides data for the \b SALOME study in a form of links (stored in
-the Study) to the specific data created and stored in the
-component. All components represent \b CORBA servers and it allows to
-run them on different host stations.
-
-\image html image67.gif
-
-
-It is equally possible to create engine-independent modules. These
-modules may not use CORBA at all, and can have internal data structure
-which can be written in pure C++ (or python). Such modules are located
-inside SALOME GUI process and from the point of view of the end user
-have no difference with standard components. Such modules not using
-the standard tools of SALOME platform are defined on a special
-separated level named CAM. CAM component is the basis for new SALOME
-GUI and contains all basic functionality for working with modules
-(loading; saving, closing, customization of toolbar and menu).
-
-
-
-Another fundamental piece of the \b SALOME architecture is the use of
-the Interface Definition Language (IDL). IDL, which specifies
-interfaces between CORBA components, is instrumental in ensuring
-CORBA's language independence. Because interfaces described in IDL can
-be mapped to any programming language, CORBA applications and
-components are thus independent of the language(s) used to implement
-them.
-
-
-Additional information about CORBA technology
-is available at http://www.omg.org
-
-\note In \b SALOME there is a possibility to run
-definite components in the so-called \ref batch_mode_run "batch mode" without GUI provided
-by GUI component. In this case you can work with these components with
-the help of Python commands and scripts.
-
-
-The architecture of this all-inclusive
-platform for numerical components responds to the following
-objectives:
-<ol>
-<li>\b Flexibility : the creation and modification of computation
-schemes must be easy. The developer must have easy access to all
-modeling parameters to create domain-specific tools adapted to new
-situations or to test new numerical algorithms. SALOME allows
-integration and implementation of numerical and physical components
-derived from existing code.</li>
-<li>\b Productivity : the implementation of code is simple for the
-user and the reuse of components (within other environments for
-macro-components) is noticeably facilitated.</li>
-<li> \b Performance :\b SALOME is able to more finely simulate
-phenomena that is more complex in scale and in physical coupling
-requirements. \b SALOME economically exploits the performance of used
-machines (massively parallel processors, PC clusters, etc).</li>
-<li> \b Expandability: on the one hand, software technologies and
-physical architectures evolve rapidly compared to the development
-time, validation and use of a scientific application while on the
-other hand, the development of a database model adapted to the
-totality of exchanges between components can be achieved
-incrementally. \b SALOME is able to easily follow these
-developments.</li>
-</ol>
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page salome_desktop_page SALOME desktop
-
-The main SALOME Desktop consists of the following sections and
-toolbars:
-
-\image html geomview-alt.png
-
-<b>Basic parts of the SALOME Desktop:</b>
-<ul>
-<li><b>Main menu</b> - This is a set of context-sensitive menus, which will
-be updated according the functionality of the loaded component. In
-general, these menus contain all functional options of SALOME
-platform.</li>
-<li><b>Standard Toolbar</b> - This toolbar contains icons allowing
-creating/saving studies, correcting mistakes, copying/pasting
-objects.</li>
-<li><b>Components Toolbar</b> - This toolbar is destined for uploading
-components in SALOME platform.</li>
-<li><b>Module Toolbar</b> - This toolbar contains icons specific to the
-loaded module.</li>
-<li><b>Viewer Toolbar</b> - This is a set of tools destined for visualization
-of the presentations in the viewer.</li>
-</ul>
-
- All toolbars in the
-\b SALOME Platform are context-sensitive. Loading of a definite component
-(Geometry, Post-Pro, Mesh etc.) will automatically add some additional
-toolbars specific to this component. To display/hide a definite
-toolbar, in the main menu choose <b>View > Toolbars</b>, and from this
-submenu check or uncheck the toolbar, you would like to display/hide.
-
- By default all
-toolbars are located on the top of the SALOME desktop. But you can
-relocate toolbars by dragging with the mouse and dropping it in any
-place of the window.
-
-<b>Parts of the study window:</b>
-<ul>
-<li><b>Object Browser</b> - Management of objects created or imported into
-SALOME application.</li>
-<li>\b Viewer - This window is destined for visualization of
-presentations.</li>
-<li><b>Python console</b> - Window for Python interpreter. This window
-functions like a standard document: the pop-up menu invoked by
-right-click in this window gives access to
-<b>Copy/Paste/SelectAll/ClearAll</b> options.</li>
-</ul>
-
- Object Browser, Python
-Console, MenuBar, etc are, in fact, separate dockable windows.
-Dockable windows can be placed in special areas, on the borders of
-desktop like toolbars. You can change the size and the position of
-dockable windows, hide them or even place outside desktop. SALOME
-saves in the same file all positions and sizes of dockable windows. It
-means that the difference in settings of the same windows (for example
-Python console) is possible between different modules (the same window
-can have different size and position when other module is
-activated). Also each module can indicate which common windows are
-necessary for working, and only they will be displayed when this
-module is active.
-
- Starting from the
-version 3.0.0 Salome uses a <b>Multi-Desktop Approach</b>. Multi-desktop
-Approach means that now there is separate Desktop for each document
-(Study) and all windows connected to a Study (viewers, dockable
-windows etc) are placed in one container. It is very comfortable,
-because you can't mix up windows from different studies. This approach
-positively differs from the classic multi document interface in case
-if many windows are used, i.e. when one document contains a lot of
-viewers, dialogs, etc. Each desktop also has its own menu and toolbar.
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page salome_preferences_page SALOME preferences
-
-To begin setting preferences for your study, select \b Preferences in the
-main menu, the following dialog box will appear:
-
-\image html pref11.png
-If you've just started your study and haven't yet loaded other
-modules, you'll be able to change only those settings, which refer to
-the whole GUI SALOME session. These settings will be valid for the
-whole study session.
-
-<h2>General Preferences</h2>
-
-<ul>
-<li><b>Study Properties</b></li>
-<ul>
-<li><b>MultiFile Save</b> - if checked in, your study will be saved in
-several HDF files (one file for the data created by each component
-used during the study session).</li>
-<li><b>ASCII Save</b> - if checked in, your study will be saved in
-ASCII format file (or files).</li>
-<li><b>Store positions of windows</b> - if checked in, positions of windows
-will be saved in a special file at the end of the current session and
-then restored for a new session.</li>
-<li><b>Store/restore last GUI state</b> - if checked in, all GUI settings are
-saved with the rest of the data whenever you save the study. When the
-study is reopened, the GUI state is restored.</li>
-</ul>
-<li><b>External browser</b></li>
-<ul>
-<li>\b Application - this option allows you to set an external browser (IE,
-Netscape) which will be used for viewing SALOME reference manuals. By
-default, Mozilla is used. Press the "<b>...</b>" button(see
-the picture below) to browse for the application you need in the data
-tree of your computer.</li>
-<li>\b Parameters</li>
-</ul>
-<li><b>Python console properties</b> - here you can quickly set the
-parameters (style, size, face) of the font used in your Python
-console.</li>
-</ul>
-\par
-For detailed settings in \ref select_color_and_font_page "Select Font"
-dialog box press the "<b>...</b>" button(see the picture below).
-
-\image html image69.gif ""..." button"
-
-<br><h2>Viewers Preferences</h2>
-
-\image html pref12.png
-
-<ul>
-<li><b>OCC and VTK 3D Viewers</b></li>
-<ul>
-<li><b>Trihedron size</b> - this submenu allows to set the size of
-coordinate axes displayed in the viewer.</li>
-<li><b>Background Color</b> - this submenu allows to select background
-color. Click on the colored line to access to the
-\ref select_color_and_font_page "Select Color" dialog box.</li>
-<li><b>Number of isolines along U</b> (or <b>V</b>) - this submenu allows to specify
-the number of isolines along the axes of coordinates.</li>
-<li><b>Relative size</b> - if checked in, trihedron axes scale to fit the
-size of the area displayed in 3D Viewer.</li>
-</ul>
-<br>
-<li><b>Plot2d Viewer</b></li>
-<ul>
-<li><b>Legend Position</b> - this submenu allows to set the default position
-of the legend, it can be located to the left, to the right, on top or
-on bottom of the graph.</li>
-<li><b>Curve Type</b> - this allows to set the representation of graphs in
-your presentations. You can see only <b>Points</b>, points connected with
-<b>Lines</b> or points connected with smooth <b>Splines</b>.</li>
-<li><b>Marker Size</b> - this submenu allows you to set the size of
-markers in your graphs</li>
-<li><b>Horizontal & Vertical Axis Scale</b> - this submenu allows you to set
-the scale for vertical and horizontal axes. It can be either <b>Linear</b> or
-<b>Logarithmic</b></li>
-<li>Background Color - this submenu allows to select the background
-color. Click on the colored line to access to the
-\ref select_color_and_font_page "Select Color" dialog box.</li>
-</ul>
-<br>
-<li><b>Graph Supervisor</b></li>
-<ul>
-<li><b>Background Color</b> - this submenu allows to select background
-color. Click on the colored line to access to the
-\ref select_color_and_font_page "Select Color" dialog box.</li>
-<li><b>Title Color</b> - this submenu allows to select title color. Click on
-the colored line to access to the
-\ref select_color_and_font_page "Select Color" dialog box.</li>
-</ul>
-</ul>
-
-<br><h2>Directories Preferences</h2>
-
-\image html pref13.png
-
-<ul>
-<li>
-<b>Quick Directory List</b> - this section allows to create and manage
-a custom quick directory list. To add a directory in the list, press
-the "Add directory" button:
-\image html image70.gif
-
-then the "<b>...</b>" button and browse the data tree for the
-directory you need.
-The "Up" and "Down" buttons(see the picture below) help you to sort
-the directories in the list:
-\image html image73.gif
-
-\image html image75.gif
-To remove the selected directory from the list, press the "Delete"
-button:
-\image html image72.gif
-</li>
-</ul>
-
-<br><h2>Object Browser Preferences</h2>
-
-\image html pref14.png
-
-<ul>
-<li><b>Object browser settings</b></li>
-<ul>
-<li><b>Auto size for the first column</b> - this checkbox enables automatic
-resizing for the first column.</li>
-<li><b>Auto size for other columns</b> - this checkbox enables
-automatic resizing for the other columns.</li>
-</ul>
-</ul>
-
-<ul>
-<li><b>Default columns</b> - these checkboxes allow to display or hide <b>Value</b>,
-<b>Entry</b>, <b>IOR</b> and <b>Reference entry</b> columns in the Object Browser.</li>
-</ul>
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page saving_and_closing_studies_page Saving and closing studies
-
-In \b SALOME a study can be saved in \b HDF binary (by default) or \b ASCII
-files (see also: \ref salome_preferences_page "Setting ASCII save option").
-
-You can also specify two options of saving your study:
-<ul>
-<li><b>In one HDF file:</b> in this case all components used during this
-study session will write their data into one common HDF file.
-</li>
-<li>
-<b>In multiple files</b> (see also: \ref salome_preferences_page
-"Setting Multifile save option") : in this
-case SALOME will create one base HDF file which will store the main
-information about the saved study and several other special files with
-particular extensions storing the data written by each component which
-has been used during this study session. Opening of this study
-requires that \b ALL saved files should be stored in the \b SAME directory.
-If you would like to copy your saved study in another directory or
-machine, you should copy all stored files. Otherwise, if you try to
-open this study, some data will be lost and it will lead to invalid
-functioning of the SALOME platform.
-</li>
-</ul>
-
-Saving a study you also save its layout, i.e. all positions and sizes
-of dockable windows. It means that the difference in settings of the
-same windows (for example Python console) is possible between
-different modules (the same window can have different size and
-position when other module is activated). Also each module can
-indicate which common windows are necessary for working, and only they
-will be displayed when this module is active.
-
-<em>To save an existing study:</em>
-\par
-In the main toolbar click "Save document" button or from the main menu
-select <b>File > Save</b> option. Your study will be automatically
-updated.
-
-\image html save.jpg ""Save document" button"
-
-\note If your study hasn't been previously saved, this option will
-call the standard Search File dialog box where you can enter the name
-for your study and save it.
-
-<em>To save a study with a new name:</em>
-\par
-From the main menu select <b>File > Save as</b> option. In the standard
-Search File dialog box enter a new name for your study and click \b Save
-button.
-
-<em>To save the current layout of the GUI:</em>
-\par
-From the main menu select <b>File > Save VISU State</b>. The current
-state of the graphic interface is published in Object Browser in the
-folder GUI states and can be at any time \b Restored, \b Renamed or \b
-Deleted. This operation saves and allows to
-restore almost all GUI settings: names, position, zooming and panning
-of viewers and all displayed objects (in Post-Pro module only).
-
-<em>To close a study:</em>
-\par
-In the main toolbar click "Close document" button or from the main menu select <b>File > Close</b>
-option or click on the cross in the upper right corner of the study
-window.
-
-\image html image94.gif ""Close document" button"
-
-\note If your study hasn't been previously saved, this option will
-call the following dialog box with several options:
-
-\image html closestudy.png
-
-\n\b Unload option allows to unload your current study from the SALOME
-Desktop. In the same working session you can reload it again (see:
-\ref opening_studies_page "Opening studies"). But if you quit the SALOME application, all changes
-in the unloaded study will be lost.
-
-*/
+++ /dev/null
-/*!
-
-\page select_color_and_font_page Select Color and Font
-
-<b>Select Color</b> and <b>Select Font</b> menus are used in many
-Preferences.
-
-<br><h2>Select color</h2>
-
-\image html selectcolor.png
-
-This menu allows to choose from either predefined <b>Basic Colors</b>
-grouped in the upper left corner of the window or <b>Custom Colors</b>, which
-you can define yourselves. To define a Custom Color, click on one of
-the Custom Color cells, select the color you need in the field of
-colors or by typing in its numeric parameters in the lower right
-corner of the window, then click <b>Add to Custom Colors</b> button. The
-chosen color will be added to <b>Custom Colors</b> table.
-
-<br><h2>Select font</h2>
-
-\image html selectfont.png
-
-This menu provides a wide choice of \b Fonts, <b>Font Styles</b> and
-\b Sizes. Characters can be underlined or struck out. It is possible to
-preview them in the \b Sample window. \b Script dialog-box gives the
-possibility to use not only Latin and Latin Extended but also
-Cyrillic, Greek, Arabic, Runic and many other subsets.
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page setting_preferences_subpage Setting Preferences
-
-In \b SALOME you can set preferences for each module in the common editor
-of preferences. SALOME preferences refer to the whole GUI SALOME
-session, other preferences are module-specific and are accessible only
-after you load a respective module.
-\n When you change settings (click \b OK or \b Apply button) each module
-receives the notification about what preferences are changed. You can
-also click \b Defaults button to restore default preferences or \b Close
-button to quit the menu without any changes.
-\n \b Import button allows to load a user file containing preferences
-from your home directory through a standard Import dialog box.
-
-\image html import.png
-
-This file has no extension and by default starts with
-.SalomeApprc. followed by Salome version number. There exists one file
-for each Salome version in use.
-\n The preferences, set during the current study session, are
-automatically saved in this file at the end of the session. Next time
-you launch SALOME application, these preferences will be restored.
-
-\note The preferences you set will be default preferences for all \b new
-objects, but they are not retroactive and do not automatically apply
-to the existing objects.
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page setting_preferences_page Setting Preferences
-
-<ul>
-<li>\subpage setting_preferences_subpage</li>
-<li>\subpage select_color_and_font_page</li>
-<li>\subpage salome_preferences_page</li>
-<li>\subpage geometry_preferences_page</li>
-<li>\subpage mesh_preferences_page</li>
-<li>\subpage postpro_preferences_page</li>
-</ul>
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page setting_study_properties_page Setting study properties
-
-<em>To view the properties of the current study:</em>
-\par
-From the main menu select \b File > \b Properties option. The following
-dialog box will appear:
-
-\image html studyproperties.png
-
-This dialog box gives complete information about your study.
-
-<em>To change the name of the study author:</em>
-\par
-In this dialog box click on the \b Author field and enter a new name.
-
-<em>To view the list of changes made with your study:</em>
-\par
-In this dialog box click on the \b Modifications field and scroll it
-down. Each record contains the following information: date and time of
-modification of the study, name of the user, who has made these
-changes.
-
-<em>To lock your study for modifications:</em>
-\par
-In the dialog box shown on the picture above click on the \b Locked
-field and choose \b Yes item.
-
-In this case your study will be locked for any kind of modifications
-for all users. Next time you try to edit it, you will see the
-following warning message:
-
-\image html lockedstudy.png
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page study_management_page Study management
-
-<ul>
-<li>\subpage creating_new_study_page</li>
-<li>\subpage opening_studies_page</li>
-<li>\subpage saving_and_closing_studies_page</li>
-<li>\subpage editing_studies_page</li>
-<li>\subpage displaying_studies_page</li>
-<li>\subpage working_with_python_scripts_page</li>
-<li>\subpage setting_study_properties_page</li>
-</ul>
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page using_catalog_generator_page Using Catalog Generator (for advanced users)
-
-SALOME platform is an open platform for
-integration of your custom components, which can used in the same way
-as typical modules provided in the standard installed package. The
-<b>Catalog Generator</b> tool serves for implementation of the interface of
-your custom component. It allows to generate from IDL description of
-your component interface its xml description. The component xml
-description allows SALOME application to know about the component and
-its services and provides the possibility to call the component
-services, for example, inside Supervisor module.
-
-If you have a look at runSalome,
-runSalomeWithPort scripts running SALOME application, which are stored
-in build/bin directory you will see that SALOME_ModuleCatalog_Server
-is started with two xml files as its input parameters:
-\b CatalogModuleGeneral.xml and \b CatalogModulePersonnel.xml. These two
-files store the descriptions of interfaces and services of all
-components, provided with typical SALOME package. To add a new
-component into SALOME platform you should either update one of these
-existing xml files with generated xml description of your component or
-create a new one.
-
-<em>To open the Catalog Generator:</em>
-\par
-From the main menu choose <b>Tools > Catalog Generator</b>, the following
-dialog box will appear:
-
-\image html cataloggenerator.png
-
-<br>In this dialog box you can specify:
-<ul>
-<li>Name and location of the IDL file describing the interface of your
-component (Click the \b Browse button to find it using the data tree).</li>
-<li>Name and location of an existing XML file, which will be updated
-with the interface of you component or name and desired location of a
-new XML file, which will be generated (Click the \b Browse button to find
-it using the data tree).</li>
-<li>Name of the author.</li>
-<li>Name of the component.</li>
-<li>Name of the user.</li>
-<li>Version.</li>
-<li>Capability of multi study support.</li>
-<li>Type of the component.</li>
-<li>Icon of your component (Click the \b Browse button to find it using
-the data tree).</li>
-</ul>
-
-\note If you have chosen to create a new xml file containing the
-description of your component, don't forget to specify it as
-input parameter for SALOME_ModuleCatalog_Server in the file, you are
-using as a running script of SALOME platform (in runSalomeWithPort,
-for example).
-
-When launching SALOME next time you will see your module alongside other components.
-
-\b Tip: You can use the <b>Catalog Generator</b> tool, if you would like to \b
-test the functionality of your new component. After implementation of
-your component interface, launch SUPERVISION module where you can try
-using the services of your new component. (see also: Adding factory
-nodes)
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page using_object_browser_page Using Object Browser
-
-The <b>Object Browser</b> in SALOME is destined for displaying the
-structure of the current study in a tree-like form. It contains:
-
-<ul>
-<li>components, loaded during the current session</li>
-<li>objects created with the help of different components (The objects
-created with the help of a definite component are located in the
-folder having the name of this component)
-</li>
-<li>references to different objects (they are highlighted in red)</li>
-</ul>
-
-\image html objectbrowser1.png
-
-\note The <b>Object Browser</b> is destined to getting quick access to
-different objects created during SALOME session. All pop-up menus
-associated with the objects displayed in the Object Browser are
-context-sensitive. So it depends on a definite currently loaded SALOME
-component what options you will see in the pop-up menu, if you
-right-click on a definite object in the Object Browser.
-
-The Object Browser may contain supplementary attributes of the objects
-displayed in additional columns. By default, these columns are not
-displayed - displaying/hiding these columns is possible through
-\ref salome_preferences_page "setting study preferences" or
-right-clicking on the attributes bar and toggling the necessary
-attributes.
-
-\image html objectbrowser2.png
-
-<ul>
-<li>\b Entry - Identification index of the object in the structure of
-the study</li>
-<li>\b IOR - Interoperable Object Reference</li>
-<li><b>Reference entry</b> - Identification index of the references
-to the objects</li>
-<li>\b Value - Displays the value of the first object attribute</li>
-</ul>
-
-\note <b>Entry, IOR and Reference entry</b> attributes are displayed for debugging purposes only.
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page using_registry_tool_page Using Registry tool
-
-\b Registry tool is in the SALOME platform is destined for providing
-information about the processes (components), which have ever been
-launched in the current study session.
-
-<em>To view the Registry:</em>
-\par
-From the main menu choose <b>Tools > Registry display</b>, the
-following dialog box will appear:
-
-\image html registry1.png
-
-\b Running tab of this dialog box displays a list of the currently
-started processes (components) with supplementary information on each
-of them divided into columns:
-
-<ul>
-<li>\b Component: name of the started component
-<li>\b PID: process identification number
-<li>\b User \b Name: name of the user launching the component
-<li>\b Machine: name of the machine, on which the process has been started
-<li>\b begins: date and time of the starting of the component
-<li>\b hello: date and time of the last call to the component
-</ul>
-
-\b History tab displays a list of all processes, which have ever been
-launched within this study session. It contains the same supplementary
-information on each of the processes (components).
-
-\b Refresh button allows to refresh the current list of processes
-(components).
-
-\b Interval button allows to set an interval for refreshment of the
-current list of processes (components).
-
-\image html registry3.png
-
-<em>To display complete information on a definite process
-(component):</em>
-\par
-Double-click on this process (component). The following window will
-appear:
-
-\image html registry4.png
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page viewers_page Viewers
-
-<ul>
-<li>\subpage occ_3d_viewer_page</li>
-<li>\subpage vtk_3d_viewer_page</li>
-<li>\subpage plot2d_viewer_page</li>
-</ul>
-
-*/
+++ /dev/null
-/*!
-
-\page vtk_3d_viewer_page VTK 3D Viewer
-
-<b>VTK 3D viewer</b> is the default viewer for Mesh Module, allowing to
-visualize meshes. It is also used in Post-Pro module for all 3D
-presentations except for Gauss Points.
-
-The functionalities of VTK viewer are available via its Viewer
-Toolbar. Buttons marked with small downward triangles have extended
-functionality which can be accessed by locking on them with left mouse
-button.
-
-\image html image157.gif "Viewer Toolbar"
-
-<hr>
-\image html image77.gif
-\n <center><b>Dump View</b> - exports an object from the viewer in bmp, png, jpg
-or jpeg image format.</center>
-<hr>
-
-\image html image88.gif
-\n <center><b>Show/Hide Trihedron</b> - shows or hides coordinate axes.</center>
-<hr>
-
-\image html image96.gif
-\n <center><b>Fit all</b> - scales the presentation so that it could
-fit within the Viewer boundaries. </center>
-<hr>
-
-\image html image97.gif
-\n <center><b>Fit area</b> - resizes the view to place in the visible area
-only the contents of a frame drawn with pressed left mouse button.</center>
-<hr>
-
-\image html image98.gif
-\n <center><b>Zoom</b> - allows to zoom in and out.</center>
-<hr>
-
-\image html image99.gif
-\n <center><b>Panning</b> - if the represented objects are greater that the
-visible area and you don't wish to use <b>Fit all</b> functionality, click on
-this button and you'll be able to drag the scene to see its remote
-parts.</center>
-<hr>
-
-\image html image100.gif
-\n <center><b>Global panning</b> - allows to select a point to be the
-center of the presentation showing all displayeed objects in the
-visible ares <center>
-<hr>
-
-\image html view_rotation_point.png
-\n <center><b>Change rotation point</b> - allows to to choose the point around
-which the rotation is performed.</center>
-
-\image html set_rotation_point_dialog1.png
-
-<center>By default the rotation point is located in the Center of the bounding
-box of an object.</center>
-
-\image html set_rotation_point_dialog2.png
-
-<center>Unchecking <b>Use Bounding Box Center</b> checkbox allows you to
-define the coordinates of the rotation point manually.</center>
-
-<b>Set to Origin</b> button restores the default rotation point
-coordinates.\n
-<b>Select Point from View</b> button allows to select the rotation
-point in the 3D Viewer.
-<hr>
-
-\image html image89.gif
-\n <center><b>Rotation</b> - allows to rotate the selected object using the
-mouse.</center>
-
-\image html image102.gif
-
-<center>These buttons orientate the scene strictly about coordinate axes.</center>
-<hr>
-
-\image html image91.gif
-\n <center><b>Reset</b> - restores the default position (isometric) of
-objects in the scene.</center>
-<hr>
-
-\image html urbutton.png
-\n <center><b>Update Rate</b> - allows to define the Update Rate for
-the presentations displayed in the viewer</center>
-
-\image html updaterate.png
-
-<ul>
-<li><b>Desired Update Rate, FPS</b> - allows to set the target Update
-Rate</li>
-<li><b>Still Update Rate, FPS</b> - allows to set the Update Rate for
-the periods when both the user and the application do not perform any
-actions in the viewer</li>
-<li><b>Current Update Rate, FPS</b> - shows the Update Rate currently
-available on your configuration</li>
-<li><b>Number of Cells</b> - shows the number of cells currently in
-display</li>
-</ul>
-
-\image html image108.gif
-\n <center><b>Scaling</b> - represents objects deformed (stretched or
-stuffed) along the axes of coordinates.</center>
-<hr>
-
-\image html image109.gif
-\n <center><b>Graduated axes</b> - allows to define parameters of axes
-and graduate them.</center>
-
-\image html graduatedaxes1.png
-
-<ul>
-<li><b>Axis name</b></li>
-<ul>
-<li><b>Is visible</b> - if checked the axis name is displayed in the
-viewer.</li>
-<li><b>Name</b> - allows to redefine the name of the axis.</li>
-<li><b>Font</b> - allows to define color and properties of the font of
-axis name.</li>
-</ul>
-<li><b>Labels</b></li>
-<ul>
-<li><b>Is visible</b> - if checked the labels are displayed in the
-viewer.</li>
-<li><b>Number</b> - allows to define the number of labels.</li>
-<li><b>Offset</b> - allows to define the distance between labels.</li>
-<li><b>Font</b> - allows to define color and properties of the font of
-labels names.</li>
-</ul>
-<li><b>Tick marks</b></li>
-<ul>
-<li><b>Is visible</b> - if checked the tick marks are displayed in the
-viewer.</li>
-<li><b>Length</b> - allows to define the length of tick marks.</li>
-</ul>
-<li><b>Is visible</b> - if checked the axis is displayed in the
-viewer. </li>
-</ul>
-
-*/
\ No newline at end of file
+++ /dev/null
-/*!
-
-\page working_with_python_scripts_page Working with Python Scripts
-
-\b SALOME Platform can be launched in the batch mode, without Graphical
-User Interface, and operated with the use of Python scripts, which can
-fulfill most of the necessary tasks, however, the process of scripting
-is quite time consuming and rather error-prone.
-\n This problem has been resolved by the possibility to automatically
-generate a set of Python scripts from data created with SALOME GUI,
-which greatly increases the productivity of using SALOME platform in
-the batch mode. This mechanism can convert a SALOME Study in one or
-several Python scripts, which can be stored and imported later to
-re-create the content of the original study. The first script is a
-SALOME document, which re-creates the SALOME Study, adds the
-stored Salome components to the SALOME and automatically calls
-Python scripts of the second type containing component specific Python
-function calls. This architecture gives great flexibility in manual
-modification of the generated scripts because you can modify only one
-of the component specific Python scripts without touching others, thus
-avoiding expert knowledge of Python API of unused components.
-
-To Dump a SALOME Study in one or several scripts, in the main menu
-select \b File --> <b>Dump study</b>
-\n The following dialog box allowing to browse for the location and
-define the name for a Python file will appear:
-
-\image html dumpstudy.png
-
-\par
-<ul>
-<li>
-<b>Publish in study</b> - if checked in, the component objects created by
-Python commands will be published in the created Study when the script
-is played, otherwise the objects will not be published in the Study.
-</li>
-<li>
-<b>Save GUI state</b> - if checked in, the current application layout will be
-saved in the Python file.
-</li>
-</ul>
-To confirm your choice click \b Save.
-
-Reversibly it is possible to load a saved Python Script selecting in
-the main menu \b File -> <b>Load Script</b>.
-
-\image html loadscript.png
-
-\par
-To confirm your choice click \b Open.
-
-*/
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>About SALOME architecture</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { margin-left:40px; }\r
-p.whs2 { font-family:'Times New Roman' , serif; text-align:justify; text-indent:48px; }\r
-p.whs3 { text-indent:48px; font-weight:bold; font-family:'Times New Roman' , serif; text-align:justify; }\r
-img_whs4 { border:none; width:445px; height:288px; border-style:none; }\r
-p.whs5 { text-indent:48px; font-family:'Times New Roman' , serif; text-align:justify; font-weight:normal; }\r
-p.whs6 { font-family:'Times New Roman' , serif; text-align:justify; font-weight:bold; text-indent:8px; background-image:url('../texture_horiz_ltbluebubbles.jpg'); }\r
-img_whs7 { border:none; width:35px; height:37px; float:none; border-style:none; }\r
-p.whs8 { font-family:'Times New Roman' , serif; text-align:justify; font-weight:bold; text-indent:8px; }\r
-p.whs9 { margin-left:40px; font-family:'Times New Roman' , serif; }\r
-p.whs10 { font-family:'Times New Roman' , serif; margin-left:40px; }\r
-ul.whs11 { list-style:disc; }\r
-p.whs12 { font-family:'Times New Roman' , serif; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("About SALOME\nSALOME architecture");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1"> SALOME \r
- architecture</h1>\r
-\r
-<p class="whs2"><span style="font-weight: bold;"><B>SALOME \r
- </B></span>architecture is based on <span style="font-weight: bold;"><B>CORBA</B></span> \r
- technology using distributed system model of applications. This architecture \r
- takes the concept of multitier client/server to its natural conclusion. \r
- The distributed system model exposes all functionality of the application \r
- as objects, each of which can use any of the services provided by other \r
- objects in the system, or even objects in other systems. The architecture \r
- can also blur the distinction between "client" and "server" \r
- because the client components can also create objects that behave in server-like \r
- roles. This architecture provides the ultimate in flexibility.</p>\r
-\r
-<p class="whs2"><span style="font-family: 'Times New Roman', serif;">The \r
- distributed system architecture achieves its flexibility by encouraging \r
- (or enforcing) the definition of specific component interfaces. The interface \r
- of a component specifies to other components what services are offered \r
- by that component and how they are used. As long as the interface of a \r
- component remains constant, that component's implementation can change \r
- dramatically without affecting other components. </span></p>\r
-\r
-<p class="whs3"><span style="font-weight: normal;">All \r
- software components (Post-Pro, Geometry, Mesh...) integrated into </span>SALOME \r
- <span style="font-weight: normal;">platform implement \r
- predefined interfaces. Each component provides data for the </span>SALOME<span \r
- style="font-weight: normal;"> study in a form of links (stored in the \r
- Study) to the specific data created and stored in the component. All components \r
- represent</span> CORBA <span style="font-weight: normal;">servers and \r
- it allows to run them on different host stations.</span></p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs2"><img src="../image67.gif" width="445px" height="288px" border="0" class="img_whs4"></p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs5">It is equally possible to create engine-independent \r
- modules. These modules may not use CORBA at all, and can have internal \r
- data structure which can be written in pure C++ (or python). Such modules \r
- are located inside SALOME GUI process and from the point of view of the \r
- end user have no difference with standard components. Such modules not \r
- using the standard tools of SALOME platform are defined on a special separated \r
- level named CAM. CAM component is the basis for new SALOME GUI and contains \r
- all basic functionality for working with modules (loading; saving, closing, \r
- customization of toolbar and menu).</p>\r
-\r
-<p class="whs5">Another fundamental piece of the <span \r
- style="font-weight: bold;"><B>SALOME</B></span> architecture is the use of the \r
- Interface Definition Language (IDL). IDL, which specifies interfaces between \r
- CORBA components, is instrumental in ensuring CORBA's language independence. \r
- Because interfaces described in IDL can be mapped to any programming language, \r
- CORBA applications and components are thus independent of the language(s) \r
- used to implement them. </p>\r
-\r
-<p class="whs3"><span style="font-weight: normal;">Additional \r
- information about CORBA technology is available at </span><span style="text-indent: 8px;"><a \r
- href="http://www.omg.org">www.omg.org</a></span><span style="font-weight: normal;"> \r
- </span></p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs6"><span \r
- style="font-weight: normal;"> <img src="../note1.gif" x-maintain-ratio="TRUE" width="35px" height="37px" border="0" class="img_whs7">In </span>SALOME<span style="font-weight: normal;"> there \r
- is a possibility to run definite components in the so-called </span><a href="running_salome_pro.htm#batchmode">batch mode</a><span style="font-weight: normal;"> \r
- without GUI provided by GUI component. In this case you can work with \r
- these components with the help of Python commands and scripts. </span> </p>\r
-\r
-<p class="whs8"> </p>\r
-\r
-<p class="whs9">The \r
- architecture of this all-inclusive platform for numerical components responds \r
- to the following objectives: </p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<ul type="disc" class="whs11">\r
- \r
- <li style="margin-left: -20px;"\r
- class=kadov-p><p class="whs12"><span \r
- style="font-weight: bold;"><B>Flexibility</B></span> : the \r
- creation and modification of computation schemes must be easy. The developer \r
- must have easy access to all modeling parameters to create domain-specific \r
- tools adapted to new situations or to test new numerical algorithms. SALOME \r
- allows integration and implementation of numerical and physical components \r
- derived from existing code. </p></li>\r
-</ul>\r
-\r
-<p class="whs12"> </p>\r
-\r
-<ul type="disc" class="whs11">\r
- \r
- <li style="margin-left: -20px;"\r
- class=kadov-p><p class="whs12"><span \r
- style="font-weight: bold;"><B>Productivity</B></span> : the \r
- implementation of code is simple for the user and the reuse of components \r
- (within other environments for macro-components) is noticeably facilitated.</p></li>\r
-</ul>\r
-\r
-<p class="whs12"> </p>\r
-\r
-<ul type="disc" class="whs11">\r
- \r
- <li style="margin-left: -20px;"\r
- class=kadov-p><p class="whs12"><span \r
- style="font-weight: bold;"><B>Performance</B></span> : <span \r
- style="font-weight: bold;"><B>SALOME</B></span> \r
- is able to more finely simulate phenomena that is more complex in scale \r
- and in physical coupling requirements. <span style="font-weight: bold;"><B>SALOME \r
- </B></span>economically exploits the performance of used machines (massively \r
- parallel processors, PC clusters, etc).</p></li>\r
-</ul>\r
-\r
-<p class="whs12"> </p>\r
-\r
-<ul type="disc" class="whs11">\r
- \r
- <li style="margin-left: -20px;"\r
- class=kadov-p><p class="whs12"><span \r
- style="font-weight: bold;"><B>Expandability</B></span>: on \r
- the one hand, software technologies and physical architectures evolve \r
- rapidly compared to the development time, validation and use of a scientific \r
- application while on the other hand, the development of a database model \r
- adapted to the totality of exchanges between components can be achieved \r
- incrementally. <span style="font-weight: bold;"><B>SALOME</B></span> is \r
- able to easily follow these developments.</p></li>\r
-</ul>\r
-\r
-<p class="whs12"> </p>\r
-\r
-<p class="whs12"> </p>\r
-\r
-<p class="whs12"> </p>\r
-\r
-<p class="whs12">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Introduction to SALOME ','introduction_to_salome_pro.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs12"> </p>\r
-\r
-<p class="whs12"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>About SALOME help system</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { font-family:'Times New Roman' , serif; }\r
-p.whs2 { font-family:'Times New Roman' , serif; text-indent:48px; }\r
-p.whs3 { font-family:'Times New Roman' , serif; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("Using this reference manual\nAbout SALOME help system");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">About SALOME help system</h1>\r
-\r
-<p class="whs2">Welcome \r
- to SALOME help system. This on-line help has been created in the HTML \r
- format with the help of Java applets. It can be launched in any WEB browser \r
- (Internet Explorer, Netscape Navigator and others) and on any platform \r
- (Windows, Macintosh, Linux and UNIX).</p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs3">The SALOME reference \r
- manual contains a set of topics which are divided into different chapters \r
- describing the functionality of different modules of the SALOME platform. \r
- This help system contains a wide variety of <a href="navigating_topics.htm" style="font-family: 'Times New Roman', serif;">navigation \r
- components</a> and <a href="using_left-hand_tabs.htm" style="font-family: 'Times New Roman', serif;">search \r
- utilities</a> which will help you to get acquainted with all features \r
- of SALOME. </p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs3"> \r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Navigating topics','navigating_topics.htm','Using left-hand tabs','using_left-hand_tabs.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Creating a new study</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { text-align:justify; }\r
-p.whs2 { font-family:'Arial Black' , sans-serif; font-style:italic; }\r
-p.whs3 { color:#ff0000; font-style:italic; margin-left:40px; text-align:justify; }\r
-img_whs4 { border:none; width:24px; height:29px; float:none; border-style:none; }\r
-p.whs5 { margin-left:0px; text-align:justify; }\r
-p.whs6 { margin-left:0px; font-style:italic; text-align:justify; color:#000000; font-family:'Arial Black' , sans-serif; }\r
-p.whs7 { margin-left:40px; text-align:justify; }\r
-p.whs8 { font-style:italic; color:#ff0000; margin-left:40px; text-align:justify; }\r
-p.whs9 { margin-left:0px; font-weight:bold; text-align:justify; }\r
-p.whs10 { font-weight:bold; margin-left:0px; text-align:justify; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs5 {margin-left:1pt; }";\r
- strNSS += "p.whs6 {margin-left:1pt; }";\r
- strNSS += "p.whs9 {margin-left:1pt; }";\r
- strNSS += "p.whs10 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nStudy management\nCreating a new study");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Creating a new study</h1>\r
-\r
-<p>Study is a document within GUI, an abstraction layer between actual \r
- document data (probably, remote data available through CORBA) and data \r
- presentation (in the Object Browser). It contains a tree of Data Object \r
- instances.</p>\r
-\r
-<p> </p>\r
-\r
-<p class="whs2">To \r
- create a new study:</p>\r
-\r
-<p class="whs3"><span style="font-style: normal; color: #000000;"><font color=black >From \r
- the main menu select </font></span><span style="font-style: normal;\r
- color: #000000;\r
- font-weight: bold;"><font color=black ><B>File > \r
- New </B></font></span><span style="font-style: normal; color: #000000;"><font color=black >or in the \r
- standard toolbar click </font></span><img src="../pics/newsticn.jpg" x-maintain-ratio="TRUE" width="24px" height="29px" border="0" class="img_whs4"> <span style="font-style: normal; color: #000000;"><font color=black >icon.</font></span></p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs5">Your study will be created \r
- with default name <span style="font-weight: bold;"><B>Study1</B></span>. In SALOME \r
- you can create several studies. </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5">In addition to it, you \r
- can create several windows with different activated viewers (VTK, OCC, \r
- Plot2d) for each study.</p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs6">To create a new window \r
- for a definite study:</p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs7">1. Make \r
- your study <span style="font-weight: bold;"><B>active:</B></span> maximize it \r
- (if it minimized) or click \r
- on the top control zone of the study window.</p>\r
-\r
-<p class="whs8"> </p>\r
-\r
-<p class="whs7">2. From \r
- the main menu select <span style="font-weight: bold;"><B>Window > New \r
- Window </B></span>and from the submenu choose the viewer, which will be activated \r
- in a new window. </p>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs5">The window for your study \r
- will be created with a default name <span style="font-weight: bold;"><B>Study1</B></span>.<span \r
- style="font-weight: bold;"> <B></B></span></p>\r
-\r
-<p class="whs9"> </p>\r
-\r
-<p class="whs10">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Displaying studies','displaying_studies.htm','Introduction to GUI','../introduction_to_gui.htm','Opening studies','opening_studies.htm','SALOME desktop','salome_pro_desktop.htm','Saving and closing studies','saving_a_study.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Displaying studies</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { text-align:justify; }\r
-p.whs2 { font-weight:bold; text-align:justify; margin-left:40px; }\r
-img_whs3 { border:none; width:811px; height:513px; float:none; border-style:none; }\r
-p.whs4 { font-style:italic; color:#ff0000; margin-left:40px; text-align:justify; }\r
-p.whs5 { font-weight:bold; margin-left:0px; text-align:justify; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs5 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nStudy management\nDisplaying studies");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Displaying studies</h1>\r
-\r
-<p>Starting from SALOME version 3.0.0. you are able to work in a multi-desktop \r
- environment, which means that you can open as many studies as you need, \r
- place them wherever you wish on the desktop, in brief, work with Salome \r
- Platform like with a normal Windows application.</p>\r
-\r
-<p>Such windows as Object Browser and Python Console are dockable and also \r
- can be placed at any part of the desktop.</p>\r
-\r
-<p>Only one study window in representation area can be active. You can \r
- change their size and move any windows between representation areas. When \r
- an area becomes empty, it is not displayed.</p>\r
-\r
-<p>All windows are placed inside tabs where you can switch between them. \r
- If there are several windows (viewers) in your current study and you want \r
- to display more then one at the same time, you can split representation \r
- area into two parts, in horizontal or vertical direction, to create two \r
- representation areas with windows be placed in them. To do this, right-click \r
- on the tab and select <span style="font-weight: bold;"><B>Split Vertically</B></span> \r
- or <span style="font-weight: bold;"><B>Split Horizontally</B></span>. </p>\r
-\r
-<p> </p>\r
-\r
-<p>For example, on this screen-shot the active zone has been split horizontally \r
- to be able to work with OCC and VTK viewers simultaneously, the one of \r
- the windows was split again, at this time vertically to see Plot 2d graphs. \r
- </p>\r
-\r
-<p> </p>\r
-\r
-<p class="whs2"><img src="../pics/neo-view2.png" x-maintain-ratio="TRUE" width="811px" height="513px" border="0" class="img_whs3"></p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Creating a new study','creating_a_new_study.htm','Introduction to GUI','../introduction_to_gui.htm','Opening studies','opening_studies.htm','SALOME desktop','salome_pro_desktop.htm','Saving and closing studies','saving_a_study.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Editing studies</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { text-align:justify; }\r
-p.whs2 { text-align:justify; }\r
-img_whs3 { border:none; float:none; width:30px; height:30px; border-style:none; }\r
-p.whs4 { margin-left:0px; font-style:italic; text-align:justify; color:#000000; font-family:'Arial Black' , sans-serif; }\r
-p.whs5 { margin-left:40px; text-align:justify; }\r
-img_whs6 { border:none; width:48px; height:26px; float:none; border-style:none; }\r
-p.whs7 { text-align:justify; margin-left:0px; font-size:12pt; }\r
-p.whs8 { margin-left:0px; text-align:justify; }\r
-p.whs9 { margin-left:0px; font-weight:bold; text-align:justify; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs4 {margin-left:1pt; }";\r
- strNSS += "p.whs7 {margin-left:1pt; }";\r
- strNSS += "p.whs8 {margin-left:1pt; }";\r
- strNSS += "p.whs9 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nStudy management\nEditing studies");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Editing studies</h1>\r
-\r
-<p class="whs2"><img src="../i_blue.jpg" x-maintain-ratio="TRUE" width="30px" height="30px" border="0" class="img_whs3"><span style="font-weight: bold;"><B>SALOME \r
- </B></span>has <span style="font-weight: bold;"><B>Copy/Paste </B></span>functionality \r
- allowing to edit your study within a definite component: </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs4">To copy/paste a definite \r
- object:</p>\r
-\r
-<p class="whs5">In the main toolbar \r
- click one of the icons <img src="../pics/copy-paste.jpg" x-maintain-ratio="TRUE" width="48px" height="26px" border="0" class="img_whs6"> or from the main menu choose <span \r
- style="font-weight: bold;"><B>Edit > Copy/Paste</B></span> option. </p>\r
-\r
-<p class="whs7"><span lang=EN-US><font size=3 style="font-size:12pt;">The availability of </font></span><span \r
- lang=EN-US\r
- style="font-weight: bold;"><B>Copy/Paste</B></span><span lang=EN-US> operations \r
- depends on the module and the nature of an operation or an object, so \r
- if the module does not provide this functionality, it won't be available.</span></p>\r
-\r
-<p class="whs8"> </p>\r
-\r
-<p class="whs9">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Creating a new study','creating_a_new_study.htm','Displaying studies','displaying_studies.htm','Introduction to GUI','../introduction_to_gui.htm','Opening studies','opening_studies.htm','SALOME desktop','salome_pro_desktop.htm','Saving and closing studies','saving_a_study.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Getting properties of the study</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { text-align:justify; }\r
-p.whs2 { font-style:italic; text-align:justify; color:#000000; font-family:'Arial Black' , sans-serif; }\r
-p.whs3 { font-style:italic; color:#ff0000; text-align:justify; }\r
-p.whs4 { margin-left:40px; text-align:justify; }\r
-img_whs5 { border:none; width:332px; height:236px; float:none; border-style:none; }\r
-p.whs6 { margin-left:0px; text-align:justify; }\r
-img_whs7 { border:none; width:221px; height:123px; float:none; border-style:none; }\r
-p.whs8 { margin-left:0px; font-weight:bold; text-align:justify; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs6 {margin-left:1pt; }";\r
- strNSS += "p.whs8 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nStudy management\nSetting study properties");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Setting study properties</h1>\r
-\r
-<p class="whs2">To view the properties \r
- of the current study:</p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs4">From the main menu select \r
- <span style="font-weight: bold;"><B>File > Properties</B></span> option. The \r
- following dialog box will appear:</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs4"><img src="../pics/studyproperties.png" x-maintain-ratio="TRUE" width="332px" height="236px" border="0" class="img_whs5"></p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs6">This dialog box gives \r
- complete information about your study. </p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class=TODO>To change the name of the study author:</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs4">In this dialog box click \r
- on the <span style="font-weight: bold;"><B>Author</B></span> field and enter \r
- a new name.</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class=TODO>To view the list of changes made with your study:</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs4">In this dialog box click \r
- on the <span style="font-weight: bold;"><B>Modifications</B></span> field and \r
- scroll it down. Each record contains the following information: date and \r
- time of modification of the study, name of the user, who has made these \r
- changes. </p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class=TODO>To lock your study for modifications:</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs4">In the dialog box shown \r
- on the picture above click on the <span style="font-weight: bold;"><B>Locked \r
- </B></span>field and choose <span style="font-weight: bold;"><B>Yes</B></span> item. \r
- </p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs6">In this case your study \r
- will be locked for any kind of modifications for all users. Next time \r
- you try to edit it, you will see the following warning message:</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs4"><img src="../pics/lockedstudy.png" x-maintain-ratio="TRUE" width="221px" height="123px" border="0" class="img_whs7"></p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs8">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Creating a new study','creating_a_new_study.htm','Displaying studies','displaying_studies.htm','Introduction to GUI','../introduction_to_gui.htm','Opening studies','opening_studies.htm','SALOME desktop','salome_pro_desktop.htm','Saving and closing studies','saving_a_study.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs8"> </p>\r
-\r
-<p class="whs8"> </p>\r
-\r
-<p class="whs8"> </p>\r
-\r
-<p class="whs8"> </p>\r
-\r
-<p class="whs8"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Getting started2</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { text-align:justify; }\r
-p.whs2 { text-align:justify; }\r
-p.whs3 { margin-left:40px; text-align:justify; }\r
-img_whs4 { border:none; width:604px; height:376px; float:none; border-style:none; }\r
-img_whs5 { border:none; width:30px; height:30px; float:none; border-style:none; }\r
-p.whs6 { text-align:justify; background-image:url('../texture_horiz_ltbluebubbles.jpg'); }\r
-img_whs7 { border:none; width:36px; height:38px; float:none; border-style:none; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nGetting started");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Getting started</h1>\r
-\r
-<p class="whs2">When you start the SALOME Platform, the \r
- following initial desktop window appears:</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs3"><img src="../pics/view2.png" x-maintain-ratio="TRUE" width="604px" height="376px" border="0" class="img_whs4"></p>\r
-\r
-<p class="whs2"><img src="../i_blue.jpg" x-maintain-ratio="TRUE" width="30px" height="30px" border="0" class="img_whs5"> In general, the SALOME platform \r
- is destined for performance of different numerical calculations and visualization \r
- of the resulting data. For that purpose, in the SALOME environment the \r
- following notion is used - \r
- <span style="font-weight: bold;"><B>Study. </B></span></p>\r
-\r
-<p class="whs2">Study represents a working document in \r
- which you can realize all operations connected with the SALOME functionality. \r
- </p>\r
-\r
-<p class="whs2">SALOME is a multi-study platform. It means \r
- that simultaneously you can work with several studies. <span> </span> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs6"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs7">To proceed working in SALOME you should create or open a new \r
- study. </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Creating a new study','creating_a_new_study.htm','Introduction to GUI','../introduction_to_gui.htm','SALOME desktop','salome_pro_desktop.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<!--(==============================================================)-->\r
-<!--(Document created with RoboEditor. )============================-->\r
-<!--(==============================================================)-->\r
-\r
-<head>\r
-\r
-<title>SALOME Installation Wizard Help</title>\r
-\r
-<!--(Meta)==========================================================-->\r
-\r
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">\r
-<meta name=Author content="Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)">\r
-<meta name=Copyright content="2002-2006 CEA">\r
-<meta name=generator content="RoboHELP by eHelp Corporation - www.ehelp.com">\r
-<meta name=generator-major-version content=0.1>\r
-<meta name=generator-minor-version content=1>\r
-<meta name=filetype content=kadov>\r
-<meta name=filetype-version content=1>\r
-<meta name=page-count content=1>\r
-<meta name=layout-height content=18589>\r
-<meta name=layout-width content=901>\r
-\r
-\r
-\r
-<!--(Style Sheet)===================================================-->\r
-\r
-<style>\r
-<!--\r
-\r
-A:visited {\r
- color: #551a8b;\r
-}\r
-\r
-A:active {\r
- color: #ff0000;\r
-}\r
-\r
-A:link {\r
- color: #0000ee;\r
-}\r
-\r
--->\r
-</style>\r
-\r
-\r
-<!--(Body)==========================================================-->\r
-\r
-\r
-</head>\r
-\r
-<body style="color: #000000;">\r
-\r
-<p style="text-align: center;"\r
- align=center> </p>\r
-\r
-<!--(Table)=========================================================-->\r
-<table nosave\r
- x-use-null-cells\r
- style="width: 100%;"\r
- width=100%>\r
-\r
-<tr nosave>\r
-<td nosave>\r
-<h1><a href="http://www.opencascade.com"><img src="logocorp.png"\r
- style="width: 139px;\r
- height: 47px;\r
- border-style: none;\r
- border-style: none;"\r
- width=139\r
- height=47\r
- border=0> </a></h1>\r
-</td>\r
-<td>\r
-<h3 style="text-align: center;"\r
- align=center><font style="font-size: xx-large;"\r
- size=7><font style="color: #000099;"\r
- color=#000099>SALOME Installation Wizard \r
- Help</font></font></h3>\r
-</td>\r
-<td>\r
-<div style="text-align: right;"\r
- align=right>\r
-<!--kadov_tag{{<implicit_p>}}--><a href="http://www.opencascade.org/SALOME/"><img \r
- src="application.png"\r
- style="width: 109px;\r
- height: 47px;\r
- border-style: none;\r
- border-style: none;"\r
- width=109\r
- height=47\r
- border=0> </a>\r
-</div></td></tr>\r
-</table>\r
-\r
-<div style="text-align: right;"\r
- align=right>\r
- \r
-</div>\r
-\r
-\r
-<!--(HR)============================================================-->\r
-<hr style="/*begin!kadov{{*/ float: aligncenter; /*}}end!kadov*/ ">\r
-\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#install_from_wizard">Installing products \r
- with the Installation Wizard</a></li>\r
- \r
- <ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#gui_mode">GUI mode</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#batch_mode">Batch mode</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#env_files">Environment files</a></li>\r
- </ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#check_version_proc">Notes on check products \r
- version procedure</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#pick_up_env">Pick up the environment</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#xml_files">Modifying XML configuration \r
- file</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#new_products">Implementing installation \r
- scripts for the new products</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#finish_buttons">Customizing Readme page \r
- buttons</a></li>\r
-</ul>\r
-\r
-\r
-<!--(HR)============================================================-->\r
-<hr style="/*begin!kadov{{*/ float: aligncenter; /*}}end!kadov*/ ">\r
-\r
-\r
-<h3><a name=install_from_wizard></a>Installing products with the <font \r
- style="color: #ff0000;"\r
- color=#FF0000>Installation Wizard</font></h3>\r
-\r
-<span>The Installation Wizard can be launched in two modes: </span><span \r
- style="font-weight: bold;">GUI </span><span>and </span><span \r
- style="font-weight: bold;">batch</span><span>. \r
- <br>\r
-The root directory of the Installation Wizard contains Python script </span><span \r
- style="font-weight: bold;">runInstall</span><span>. To run the Installation \r
- Wizard just type <b>runInstall</b> in the terminal window: \r
-\r
-</span><p>[ python ] <b>runInstall </b>[options]</p>\r
-\r
-<p>Without options this script will launch the SALOME Installation Wizard \r
- in the default mode (GUI).<br>\r
-The default installation settings can be overridden by using command line \r
- options. Each option has a short and a long notation:</p>\r
-\r
-<p><b style="font-weight: bold;">-g / --gui</b></p>\r
-\r
-<div style="margin-left: 40px;">\r
-<span>Runs the Installation Wizard in the GUI mode (this is the default \r
- mode). \r
-</span></div>\r
-\r
-<p><b style="font-weight: bold;">-b / --batch</b></p>\r
-\r
-<div style="margin-left: 40px;">\r
-<span>Runs the Installation Wizard in the terminal mode. \r
-</span></div>\r
-\r
-<p><b style="font-weight: bold;">-f FILE / --file=</b><span \r
- style="font-weight: bold;">FILE</span></p>\r
-\r
-<div style="margin-left: 40px;">\r
-<span>The XML configuration file to be used by the Installation Wizard. \r
- If this option is not used then the installation script tries to define \r
- the <i>Linux </i>version and use the corresponding XML file if it exists. \r
- For examle, for </span><span style="color: rgb(0, 0, 153);">Linux Mandrake \r
- 10.1</span><span> the <b>config_Mandrake_10.1.xml</b> file \r
- will be used by default. If no appropriate file is found, the file <b>config.xml</b> \r
- will be used. This file refers to the basic target platform which is </span><span style="color: rgb(0, 0, 153);">Linux Mandrake 10.1</span><span> for SALOME \r
- 3.0 and newer. If </span><span \r
- style="font-weight: bold;">config.xml</span><span> \r
- file is not found either, a warning message box is shown (in GUI mode) \r
- or printed to the console (in batch mode) and the Installation Wizard \r
- quits. \r
-</span></div>\r
-\r
-<p><b style="font-weight: bold;">-d DIR / --target=DIR</b></p>\r
-\r
-<div style="margin-left: 40px;">\r
-<span>The target directory SALOME platform is to be installed to. If used, \r
- this option overrides the default target directory, given in the configuration \r
- XML file (usually</span><span \r
- style="font-weight: bold;"> ${HOME}/salome_<version></span><span>, \r
- see <a href="#xml_files"\r
- style="font-size: 12pt;">here</a> for more details). \r
-</span></div>\r
-\r
-<p><b style="font-weight: bold;">-t DIR / --tmp=DIR </b></p>\r
-\r
-<div style="margin-left: 40px;">\r
-<span>The directory, which should be used for temporary files. If given, \r
- this option overrides the default temporary directory, given in the configuration \r
- xml file (usually </span><span \r
- style="font-weight: bold;">/tmp</span><span>, \r
- see <a href="#xml_files"\r
- style="font-size: 12pt;">here</a> for more information). \r
-</span></div>\r
-\r
-<p><b style="font-weight: bold;">-a / --all-from-sources</b></p>\r
-\r
-<div style="margin-left: 40px;">\r
-<span>Forces all the products to be installed from sources (including all \r
- SALOME modules). If this option is used, all default installation modes \r
- for all products are ignored.<br>\r
-This option is helpful when the user wants to install SALOME on the platform \r
- which is not officially supported. In this case, the user can try to run \r
- the SALOME Installation Wizard with the </span><span \r
- style="font-weight: bold;">-a</span><span> \r
- option in order to build all the products from sources.</span><span style="font-weight: bold; color: #ff0000;"><br>\r
-Note, that this is a time-consuming operation which can take more than \r
- 24 hours depending on the computer.</span><span> \r
-</span></div>\r
-\r
-<p><b style="font-weight: bold;">-h / --help</b></p>\r
-\r
-<div style="margin-left: 40px;">\r
-<span>Prints help information on the Installation Wizard's use. \r
-</span></div>\r
-\r
-<p><b style="font-weight: bold;">-v / --version</b></p>\r
-\r
-<div style="margin-left: 40px;">\r
-<span>Prints version information (</span><span \r
- style="font-weight: bold;">Note: \r
- </span><span>this is the Installation Wizard's version number, not the \r
- number of SALOME platform version). \r
-</span></div>\r
-\r
-<p>The installation procedure supports different <span style="color: rgb(0, 0, 153);">Linux \r
- </span>platforms and installs various installation 3d-party prerequisite \r
- products which are required by SALOME platform. As it was mentioned above, \r
- the basic target platform for SALOME 3.0 and newer is <span style="color: rgb(0, 0, 153);">Linux \r
- Mandrake 10.1</span>.<br>\r
-Use of configuration XML files gives a flexible way to modify the list \r
- of products to be installed by the Installation Wizard without changing \r
- the program source code. Just create your own XML configuration file and \r
- implement installation scripts for the prerequisite products you need \r
- and then use this XML file with the Installation Wizard. This can be done, \r
- for example, for some <span style="color: rgb(0, 0, 153);">Linux </span>platform \r
- which is not supported directly by the Installation Wizard. See <a href="#xml_files"\r
- style="font-size: 12pt;">Modifying XML configuration file</a> and <a \r
- href="#new_products"\r
- style="font-size: 12pt;">Implementing installation scripts for the \r
- new products</a> sections for more information. </p>\r
-\r
-<h3 style="margin-left: 40px;"><a name=gui_mode></a>GUI mode</h3>\r
-\r
-<p>The <font \r
- style="color: #ff0000;"\r
- color=#FF0000>Installation Wizard</font> GUI has been developed \r
- using <span style="color: rgb(0, 0, 153);">Trolltech's </span><span \r
- style="font-weight: bold;">Qt \r
- 3.0.5 </span>toolkit. After launching the Installation Wizard in the GUI \r
- mode the wizard window is shown to the user. This wizard guides the user \r
- through several subsequent pages. To navigate between the pages use <i>"Next"</i> \r
- and <i>"Back"</i> buttons in the lower part of the wizard window. \r
- The <i>"Cancel"</i> button closes the wizard window and \r
- quits the installation procedure after the user's confirmation. The <i>"Help"</i> \r
- button opens an additional window to show help information. </p>\r
-\r
-<p>The first "<span style="font-style: italic;">Introduction"</span> \r
- page is shown in <a href="#IntroPage">Figure 1</a>. Skip this page by \r
- clicking <i>"Next"</i>: </p>\r
-\r
-<a name=IntroPage></a>\r
-\r
-<p style="text-align: center;"\r
- align=center> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><img alt="Intro page"\r
- src="intropage.png"\r
- style="width: 586px;\r
- height: 364px;\r
- border-style: none;\r
- border-style: none;"\r
- width=586\r
- height=364\r
- border=0> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><b style="font-weight: bold;">Figure 1:</b> "Introduction" \r
- page</p>\r
-\r
-<p>In the second page you are proposed to enter the target directory where \r
- the SALOME platform should be installed to. You can also click <i>"Browse..."</i> \r
- and choose the destination folder using the standard browse directory \r
- dialog box. <br>\r
-If the directory you want to install products to does not exist you are \r
- prompted to confirm directory creation. If you type a wrong directory \r
- path, or if you do not have write permissions for the directory you use, \r
- the corresponding message box is shown.</p>\r
-\r
-<p>You can also change the temporary directory (which is used to store \r
- temporary files required for the installation).<br>\r
-In the bottom part of the window the total disk space required for the \r
- installation and for the temporary files is displayed (see below for more \r
- details).</p>\r
-\r
-<p>In the GUI mode the Installation Wizard provides two different options \r
- to install the SALOME platform: <span \r
- style="font-weight: bold;">basic</span> \r
- (default option) and <span \r
- style="font-weight: bold;">advanced.</span> \r
- In the <span \r
- style="font-weight: bold;">basic</span> mode the user should \r
- enter the target installation directory and temporary folder. All other \r
- installation options are taken from the XML configuration file (see <a \r
- href="#Product_page1">Fig.2</a>):</p>\r
-\r
-<a name=Product_page1></a>\r
-\r
-<p style="text-align: center;"\r
- align=center> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><img alt="Intro page"\r
- src="productpage1.png"\r
- style="width: 586px;\r
- height: 364px;\r
- border-style: none;\r
- border-style: none;"\r
- width=586\r
- height=364\r
- border=0> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><b style="font-weight: bold;">Figure 2:</b> "Installation \r
- settings" </p>\r
-\r
-<p>In addition, you have a choice to use "Install all products from \r
- sources" check box. If this option is turned on, all the products \r
- will be installed from the sources (using their own build procedures). \r
- This check box corresponds to the <span \r
- style="font-weight: bold;">--all-from-sources</span> \r
- (<span \r
- style="font-weight: bold;">-a</span>) option of the <span \r
- style="font-weight: bold;">runInstall</span> \r
- script (see <a href="#install_from_wizard">here</a>). </p>\r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><img \r
- src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 35px;\r
- height: 37px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=35\r
- height=37\r
- border=0><span \r
- style="font-weight: bold;"> Installation of all products \r
- from sources is a long-time operation.</span></p>\r
-\r
-<p>To switch to the <span \r
- style="font-weight: bold;">advanced</span> option, \r
- click <i>"More..."</i> (see <a href="#ProductPage2">Fig.3</a> \r
- ).</p>\r
-\r
-<p>In the advanced mode you have a possibility to select products to be \r
- installed. Each product can have several options of installation: you \r
- have a possibility to use the native product (provided with Linux distribution \r
- and installed in the system folders), install already precompiled binaries, \r
- build the product from sources or not install it at all. Available options \r
- and default option are taken from the XML configuration file. You can \r
- mark the products you want to install by clicking the corresponding radio-buttons \r
- in the list view in the left part of the page. <br>\r
-Note, that some products may require some other pre-requisite products \r
- to be installed (or these prerequisite products should be already available \r
- on your computer). The installation procedure has a special feature to \r
- automatically mark these products in the list view. For example, in order \r
- to install <b><i>PyQt</i></b> it is necessary to have <b><i>gcc, Python</i></b>,<b><i> \r
- Qt</i></b> and <b><i>Sip</i></b> installed. Therefore all these products \r
- will also be <!--kadov_tag{{<spaces>}}--> <!--kadov_tag{{</spaces>}}-->turned \r
- on when you check on <b><i>PyQt</i></b>. This feature can be switched \r
- off by clicking the <i>"Automatic dependencies"</i> checkbox. \r
- Turn on this checkbox if you want all prerequisite products to be automatically \r
- checked when you select some product to be installed. Turn off this checkbox \r
- if you want to disable this feature.</p>\r
-\r
-<a name=ProductPage2></a>\r
-\r
-<p style="text-align: center;"\r
- align=center> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><img src="productpage.png"\r
- alt="Products page"\r
- style="float: none;\r
- width: 586px;\r
- height: 525px;\r
- border-style: none;\r
- border-style: none;"\r
- width=586\r
- height=525\r
- border=0> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><b style="font-weight: bold;">Figure 3:</b> "Installation \r
- settings" page in the 'advanced' mode</p>\r
-\r
-<p>If you want to use native products (like <span \r
- style="font-weight: bold;">gcc</span>, \r
- <span \r
- style="font-weight: bold;">tcl</span>, etc.), select <i>"use \r
- native" </i>option. <br>\r
-Special button in the right part of the page - <i>"Unselect All" \r
- </i>- allows to reset quickly all products to the <i>"not install"</i> \r
- state. </p>\r
-\r
-<p>There are also two checkboxes on this page: <i>"SALOME sources"</i> \r
- and <i>"SALOME binaries"</i>. These three-state checkboxes allow \r
- quick selecting/unselecting sources/binaries packages of SALOME modules \r
- for installation.</p>\r
-\r
-<p>In addition, when some SALOME sources are selected, one more check box \r
- becomes available: <span style="font-style: italic;">"Build SALOME \r
- sources"</span>. If this option is turned on, the selected SALOME \r
- modules will be built and installed from sources.<span \r
- style="font-weight: bold;"><br>\r
- </span></p>\r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><span \r
- style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0> If this check box is turned on, \r
- the corresponding SALOME module binaries package installation is disabled, \r
- because of <!--kadov_tag{{<spaces>}}--> <!--kadov_tag{{</spaces>}}-->SALOME \r
- module sources and binaries packages conflict </span>(see <a href="#ProductPage3">Fig. \r
- 4</a> below). </p>\r
-\r
-<a name=ProductPage3></a>\r
-\r
-<p style="text-align: center;"\r
- align=center><img src="productpage2.png"\r
- alt="Products page"\r
- style="width: 586px;\r
- height: 525px;\r
- border-style: none;\r
- border-style: none;"\r
- width=586\r
- height=525\r
- border=0> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><b style="font-weight: bold;">Figure 4:</b> "Build \r
- SALOME sources" check box usage</p>\r
-\r
-<p>The box at the right side of the page displays the information about \r
- currently highlighted product: name, version and short description, required \r
- disk space, disk space required for temporary files, list of prerequisites \r
- (this information is provided in the XML file) and current user choice. \r
- </p>\r
-\r
-The <i>"Disk space required:"</i> field displays how much disk \r
- space on the hard drive is required for installation of selected products. \r
- \r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><b style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0></b><span \r
- style="font-weight: bold;">Please, \r
- take into account that the displayed amount of required disk space is \r
- approximate and may differ when you install products on your hard drive.</span> \r
- </p>\r
-\r
-<p>The installation procedure uses a special directory to store temporary \r
- files. The <i>"Space for temporary files:"</i> field shows the \r
- information about required disk space on the hard drive for extracting \r
- and compiling the selected products. You can change the temporary directory \r
- - just type a path to the folder you want to use or click on the corresponding \r
- <i>"Browse..."</i> button. <span \r
- style="font-weight: bold;"><br>\r
- </span></p>\r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><span><b \r
- style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0></b></span><b \r
- style="font-weight: bold;"><span style="font-weight: normal;">A</span></b>ctually, \r
- temporary files are not stored directly in the directory entered by the \r
- user. The Installation Wizard creates an additional folder in this directory \r
- named something like INSTALLWORK<span \r
- style="font-weight: bold;">XXXXX</span> \r
- where XXXXX is a unique number. This allows to launch several Installation \r
- Wizards simultaneously. This temporary directory is removed automatically \r
- when the installation finishes.</p>\r
-\r
-<p>The installation procedure also checks the available disk space. If \r
- there is not enough disk space on your hard drive you will see a corresponding \r
- error message box. </p>\r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><b style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0>You are strongly recommended not \r
- to use directory names containing spaces. </b>Otherwise you can experience \r
- some troubles with the installation.<b> </b></p>\r
-\r
-<p>To proceed further click <i>"Next"</i>. At this moment the \r
- program will make some tests to check installation settings: if there \r
- is enough disk space on the hard drive, check for native products installation, \r
- dependencies (prerequisites) for each product you have selected to be \r
- installed. If any test fails you will see the corresponding warning message \r
- box. Otherwise the wizard will proceed to the next page: </p>\r
-\r
-<a name=ChoicePage></a>\r
-\r
-<p style="text-align: center;"\r
- align=center> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><img src="choicepage.png"\r
- alt="Choice page"\r
- style="width: 586px;\r
- height: 485px;\r
- border-style: none;\r
- border-style: none;"\r
- width=586\r
- height=485\r
- border=0> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><b style="font-weight: bold;">Figure 5:</b> "Check \r
- your choice" page</p>\r
-\r
-<p>This page summarizes the installation options you've made on the previous \r
- pages. You can check again your choice and change it if necessary by getting \r
- back to the previous page. <br>\r
-When you are sure that everything is OK, click <i>"Next"</i> \r
- to follow to the <a href="#ProgressPage">next page</a>. </p>\r
-\r
-<a name=ProgressPage></a>\r
-\r
-<p style="text-align: center;"\r
- align=center> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><img alt="Progress page"\r
- src="progresspage1.png"\r
- style="width: 586px;\r
- height: 364px;\r
- border-style: none;\r
- border-style: none;"\r
- width=586\r
- height=364\r
- border=0></p>\r
-\r
-<p style="text-align: center;"\r
- align=center><b style="font-weight: bold;">Figure 6:</b> "Installation \r
- progress" page</p>\r
-\r
-<p style="text-align: justify;">To start installation of the selected products \r
- click "Start". It launches the shell installation script and \r
- you will be able to see the output of the script in the <!--kadov_tag{{<spaces>}}--> <!--kadov_tag{{</spaces>}}-->dialog \r
- topmost frame. If any errors occur during the installation progress the \r
- corresponding messages will be printed to the log window in bold red font.</p>\r
-\r
-<p style="text-align: justify;">It is possible to break the installation \r
- at any time by clicking "Stop". Then you can get back to the \r
- previous pages if you wish to change installation settings or restart \r
- installation by pressing again "Start" button.</p>\r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><b><span \r
- style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0> I</span></b><span \r
- style="font-weight: bold;">n the current implementation \r
- it is not possible to resume the stopped installation process; it will \r
- be re-started from the very beginning.</span> </p>\r
-\r
-<a name=ProgressPage1></a>\r
-\r
-<p style="text-align: center;"\r
- align=center> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><img alt="Progress page"\r
- src="progresspage.png"\r
- style="width: 586px;\r
- height: 364px;\r
- border-style: none;\r
- border-style: none;"\r
- width=586\r
- height=364\r
- border=0> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><b style="font-weight: bold;">Figure 7:</b> "Installation \r
- progress" page: installation in progress</p>\r
-\r
-<p>The <i>"Installation Status"</i> frame window shows you the \r
- progress of installation. "<font \r
- style="color: #ff0000;"\r
- color=#FF0000>Waiting</font>" \r
- status means that installation of this product has not been started yet. \r
- The product currently being installed is marked as "<font style="color: #ff9900;"\r
- color=#FF9900>Processing</font>". All installed products have \r
- "<font style="color: #33ff33;"\r
- color=#33FF33>Completed</font>" status. </p>\r
-\r
-<p>You can abort installation and close the installation procedure using \r
- <i>"Cancel"</i> button. </p>\r
-\r
- \r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><span \r
- style="font-weight: bold;"><b style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0>T</b>his button sends the signal "SIGTERM" to the \r
- shell script. The script tries to clear all temporary files. The process \r
- of removing temporary files can take some time, so the installation wizard \r
- will wait 3 seconds before closing.</span> </p>\r
-\r
-<p>At the end of installation (all selected products have been installed \r
- successfully) you can go back to the previous pages to start a new installation \r
- or click <i>"Next" </i>to go the Readme page: </p>\r
-\r
-<a name=readmepage></a>\r
-\r
-<p style="text-align: center;"\r
- align=center> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><img alt="Read page"\r
- src="readmepage.png"\r
- style="width: 586px;\r
- height: 484px;\r
- border-style: none;\r
- border-style: none;"\r
- width=586\r
- height=484\r
- border=0> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><b style="font-weight: bold;">Figure 8:</b> "Finish \r
- installation" page</p>\r
-\r
-<p>In this page you can read important information about the Instalation \r
- Wizard itself and some tips: how to run and test SALOME or how to build \r
- SALOME from the sources. This is the contents of the README file which \r
- you can find in the root directory of the Installation Wizard. <br>\r
-You can also launch SALOME Desktop from this page or read the Release Notes \r
- file by clicking on the corresponding buttons in the lower part of the \r
- page (see <a href="#xml_files">here</a> and <a href="#finish_buttons">here</a> \r
- for more information about customizing these buttons).</p>\r
-\r
-<h3 style="margin-left: 40px;"><a name=batch_mode></a>Batch mode</h3>\r
-\r
-<p>To launch the Installation Wizard in the batch mode use <span \r
- style="font-weight: bold;">-b</span> \r
- (<span \r
- style="font-weight: bold;">--batch</span>) parameter.<br>\r
-In this mode the GUI wizard is not shown but all the installation status \r
- is displayed directly in the console. In the batch mode the user does \r
- not have a possibility to change installation settings which are given \r
- in the configuration file, except target and temporary directories which \r
- can be overridden by the corresponding command line options.<br>\r
-The only exception is <span \r
- style="font-weight: bold;">--all-from-sources</span> \r
- (<span \r
- style="font-weight: bold;">-a</span>) option which enables special \r
- installation mode in which all the products (including SALOME modules) \r
- are installed from sources, ignoring the default mode defined in the XML \r
- configuration file (see <a href="#install_from_wizard">here</a> for details).</p>\r
-\r
-<p style="text-align: center;"\r
- align=center><!--kadov_tag{{<spaces>}}--> <!--kadov_tag{{</spaces>}}--><a \r
- name=BatchMode></a><br>\r
-<br>\r
-<img alt="Batch mode"\r
- src="batchmode.png"\r
- style="width: 660px;\r
- height: 410px;\r
- border-style: none;\r
- border-style: none;"\r
- width=660\r
- height=410\r
- border=0> </p>\r
-\r
-<p style="text-align: center;"\r
- align=center><b style="font-weight: bold;">Figure 9:</b> Batch mode</p>\r
-\r
-<h3 style="margin-left: 40px;"><a name=env_files></a>Environment files</h3>\r
-\r
-<p>During the process of installation the script creates some environment \r
- files to simplify the procedure of launching SALOME. These shell scripts \r
- set all necessary environment variables for all products you have installed. \r
- To learn how installation scripts collects the environment, see <a href="#pick_up_env">here</a>. \r
- These files are: <b>salome.csh</b> + <b>salome.sh</b> in the <span style="font-style: italic; font-weight: bold;">KERNEL \r
- module</span><b><i> sources</i></b> and <span style="font-style: italic; font-weight: bold;">KERNEL \r
- module</span><b><i> binaries</i></b> root directories and <b>env_products.csh</b> \r
- + <b>env_products.sh </b>and <span \r
- style="font-weight: bold;">env_build.csh \r
- </span>+ <span \r
- style="font-weight: bold;">env_build.sh</span> in the target \r
- installation directory.</p>\r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><b><span \r
- style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0></span></b><span \r
- style="font-weight: bold;">Note:</span> there is some \r
- difference between these files: <span \r
- style="font-weight: bold;">env_build.*</span> \r
- files are optimized to be used for building SALOME modules from sources \r
- (see <span \r
- style="font-weight: bold;">README </span>file provided with \r
- the installation procedure on the CD). The <span \r
- style="font-weight: bold;">env_products.*</span> \r
- (and<span \r
- style="font-weight: bold;"> salome.*</span>) files are optimized \r
- for SALOME launching. The behavior is defined by the environment variable<span \r
- style="font-weight: bold;"> </span><b>ENV_FOR_LAUNCH</b> which is set \r
- to <span \r
- style="font-weight: bold;">0</span> in env_build.* files and \r
- to <span \r
- style="font-weight: bold;">1</span> in env_products.* (salome.*) \r
- files. </p>\r
-\r
-<!--kadov_tag{{<implicit_empty_p>}}--> <br><!--kadov_tag{{</implicit_empty_p>}}-->\r
-\r
-\r
-<!--(HR)============================================================-->\r
-<hr style="/*begin!kadov{{*/ float: aligncenter; /*}}end!kadov*/ ">\r
-\r
-\r
-<h3><a name=check_version_proc></a>Notes on<font \r
- style="color: #ff0000;"\r
- color=#FF0000> check products \r
- version</font> procedure</h3>\r
-\r
-Unfortunately there is no exact algorithm to identify the product version \r
- under Linux platform. The information in this section gives an idea how \r
- the version is checked for the native/preinstalled products (this information \r
- refers to the base platform <span style="color: rgb(0, 0, 153);">Linux \r
- Mandrake 10.1</span>; and the same algorithms are used for other platforms). \r
- <br>\r
-The general rule for all products is that the path to the binaries should \r
- be set via the <span \r
- style="font-weight: bold;">PATH</span> environment \r
- variable, path to the libraries should be set via the <span \r
- style="font-weight: bold;">LD_LIBRARY_PATH</span> \r
- variable and the python modules should be available via the <span \r
- style="font-weight: bold;">PYTHONPATH</span> \r
- variable. \r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><b><span \r
- style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0></span></b><span \r
- style="font-weight: bold;">Note:</span> the information \r
- given in this section refers to the prerequisite products for SALOME version \r
- 3.2.4. </p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>gcc 3.4.1</li>\r
-</ul>\r
-\r
-Version number is checked by <span \r
- style="font-weight: bold;">gcc -dumpversion</span> \r
- command. The <span \r
- style="font-weight: bold;">gcc</span> executable should \r
- be in the <span \r
- style="font-weight: bold;">PATH</span> environment variable. \r
- Version should be equal to "3.4.1". It is recommended to use \r
- native gcc on Mandrake 10.1. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>tcl/tk 8.4.5</li>\r
-</ul>\r
-\r
-Version number for <span \r
- style="font-weight: bold;">tcl/tk</span> can be \r
- found in tclConfig.sh and tkConfig.sh files (<span \r
- style="font-weight: bold;">TCL_VERSION</span> \r
- and <span \r
- style="font-weight: bold;">TK_VERSION</span> variables correspondingly). \r
- Version number should be equal to "8.4" (release number is not \r
- checked). <br>\r
-Set the <span \r
- style="font-weight: bold;">TCLHOME</span> environment variable \r
- to the root directory of tcl/tk installation.<br>\r
-It is recommended to use native tcl/tk on Mandrake 10.1. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>boost 1.31.0</li>\r
-</ul>\r
-\r
-Version number is defined by <span \r
- style="font-weight: bold;">version.hpp</span> \r
- file which is part of the boost distribution. This file defines the <span \r
- style="font-weight: bold;">BOOST_VERSION</span> macro which should be \r
- equal to "103100". In addition the existence of boost libraries \r
- is checked. <br>\r
-Set the <span \r
- style="font-weight: bold;">BOOSTDIR</span> environment variable \r
- if you have a preinstalled version of boost. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>Python 2.3.4</li>\r
-</ul>\r
-\r
-Version number is checked by <span \r
- style="font-weight: bold;">python -V</span> \r
- command. The <span \r
- style="font-weight: bold;">python</span> executable \r
- should be in the <span \r
- style="font-weight: bold;">PATH</span> environment \r
- variable. Version number should be equal to "2.3.4". It is recommended \r
- to use native Python on Mandrake 10.1.<br>\r
-Set the <span \r
- style="font-weight: bold;">PYTHONHOME</span> environment \r
- variable if you have a preinstalled version of Python. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>Swig 1.3.24</li>\r
-</ul>\r
-\r
-Version number is checked by <span \r
- style="font-weight: bold;">swig -version</span> \r
- command. The <span \r
- style="font-weight: bold;">swig</span> executable should \r
- be in the <span \r
- style="font-weight: bold;">PATH</span> environment variable. \r
- Version number should be equal to "1.3.24". \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>Qt 3.3.3</li>\r
-</ul>\r
-\r
-Version number is defined by <span \r
- style="font-weight: bold;">qglobal.h</span> \r
- file which is part of the Qt distribution. This file defines <span \r
- style="font-weight: bold;">QT_VERSION_STR</span> \r
- macro which should be equal to "3.3.3". It is recommended to \r
- use native Qt on Mandrake 10.1.<br>\r
-Set the <span \r
- style="font-weight: bold;">QTDIR</span> environment variable \r
- if you have a preinstalled version of qt. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>msg2qm</li>\r
-</ul>\r
-\r
-<span \r
- style="font-weight: bold;">msg2qm</span> is a Qt tool which is used \r
- to convert text *.po files to *.qm resource files. Unfortunately this \r
- tool is not included to the Linux distribution and provided only in Qt \r
- sources package. This is the reason why this tool is supplied with the \r
- SALOME Installation Wizard.<br>\r
-There is no way to check the version number of msg2qm tool. Just set <span \r
- style="font-weight: bold;">MSG2QM_ROOT</span> environment variable if \r
- you have a preinstalled version of msg2qm tool. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>Open CASCADE 6.1.2a2</li>\r
-</ul>\r
-\r
-Version number is defined by <span \r
- style="font-weight: bold;">Standard_Version.hxx</span> \r
- file which is part of the Open CASCADE distribution. This file defines \r
- <span \r
- style="font-weight: bold;">OCC_VERSION_MAJOR,</span> <span \r
- style="font-weight: bold;">OCC_VERSION_MINOR</span> \r
- and <span \r
- style="font-weight: bold;">OCC_VERSION_MAINTENANCE</span> macros \r
- which should refer to version 6.1.2.<br>\r
-Set the <span \r
- style="font-weight: bold;">CASROOT</span> environment variable \r
- if you have a preinstalled version of Open CASCADE. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>qwt 4.2.0/0.4.2</li>\r
-</ul>\r
-\r
-Version number is defined by <span \r
- style="font-weight: bold;">qwt_global.h</span> \r
- file which is part of the qwt distribution. This file defines <span \r
- style="font-weight: bold;">QWT_VERSION_STR</span> \r
- macro which should be equal to "4.2.0".<br>\r
-Set the <span \r
- style="font-weight: bold;">QWTHOME</span> environment variable \r
- if you have a preinstalled version of qwt. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>hdf 5-1.6.4</li>\r
-</ul>\r
-\r
-Version number is defined by <span \r
- style="font-weight: bold;">libhdf5.settings</span> \r
- file which is part of the <span \r
- style="font-weight: bold;">hdf5</span> \r
- distribution. Version should be equal to 1.6.4.<br>\r
-Set the <span \r
- style="font-weight: bold;">HDF5HOME</span> environment variable \r
- if you have a preinstalled version of hdf5. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>med 2.2.3</li>\r
-</ul>\r
-\r
-Unfortunately there is no formal way to check med version number. We check \r
- existence of libmed.so.1.0.2 library on the computer. If you have any \r
- problem with a preinstalled version of med, please, reinstall it.<br>\r
-Set the <span \r
- style="font-weight: bold;">MED2HOME</span> environment variable \r
- if you have a preinstalled version of med. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>Vtk 4.2.6</li>\r
-</ul>\r
-\r
-Unfortunately there is no formal way to check VTK version number. We just \r
- check the existence of <span \r
- style="font-weight: bold;">libvtkCommon.so</span> \r
- library on the computer and hope that it is of version we need. If you \r
- have any problem with a preinstalled version of Vtk, please, reinstall \r
- it.<br>\r
-Set the <span \r
- style="font-weight: bold;">VTKHOME</span> environment variable \r
- if you have a preinstalled version of Vtk. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>OmniORB 4.0.5, OmniORBpy 2.5, OmniNotify 2.1</li>\r
-</ul>\r
-\r
-We just check existence of some omniORB libraries and executable on the \r
- computer, like <span \r
- style="font-weight: bold;">libomniORB4.so.0.5</span>, \r
- <span \r
- style="font-weight: bold;">_omnipymodule.so.2.4</span>, <span \r
- style="font-weight: bold;">libCOSNotify4.so.0.1</span> \r
- and <span \r
- style="font-weight: bold;">notifd</span>.<br>\r
-Set the <span \r
- style="font-weight: bold;">OMNIORBDIR</span> environment \r
- variable if you have a preinstalled version of omniORB products. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>sip 4.1</li>\r
-</ul>\r
-\r
-Version number is checked by <span \r
- style="font-weight: bold;">sip -V</span> \r
- command. The <span \r
- style="font-weight: bold;">sip</span> executable should \r
- be in the <span \r
- style="font-weight: bold;">PATH</span> environment variable. \r
- Version number should be equal to "4.1".<br>\r
-Set the <span \r
- style="font-weight: bold;">SIPDIR</span> environment variable \r
- to the directory where you have sip executable preinstalled. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>PyQt 3.13</li>\r
-</ul>\r
-\r
-Version number is defined by <span \r
- style="font-weight: bold;">pyqtconfig.py</span> \r
- Python module file which is part of the <span \r
- style="font-weight: bold;">PyQt</span> \r
- distribution. Version should be equal to "3.13".<br>\r
-Set the <span \r
- style="font-weight: bold;">PYQTDIR </span>environment variable \r
- if you have a preinstalled version of PyQt. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>netgen 4.5</li>\r
-</ul>\r
-\r
-Unfortunarely we can't find anything about netgen version. We just check \r
- if <span \r
- style="font-weight: bold;">NETGENROOT</span> environment variable \r
- is set.<br>\r
-Set the <span \r
- style="font-weight: bold;">NETGENROOT</span> environment \r
- variable if you have a preinstalled version of netgen mesher. \r
-\r
-<!--begin!kadov{{--><br><!--}}end!kadov--><!--kadov_tag{{<implicit_p>}}--> \r
- \r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><span \r
- style="font-weight: bold;"><b style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0></b>Note: </span>netgen 4.5 provided with the SALOME installation \r
- Wizard has been patched to improve its performance. </p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>Numeric 23.7</li>\r
-</ul>\r
-\r
-Version number is checked by <span \r
- style="font-weight: bold;">python -c \r
- 'import Numeric; print Numeric.__version__'</span> command. The <span \r
- style="font-weight: bold;">python</span> executable should be in the <span \r
- style="font-weight: bold;">PATH</span> environment variable and <span \r
- style="font-weight: bold;">Numeric</span> module should be available for \r
- the Python (for example it should be in the <span \r
- style="font-weight: bold;">PYTHONPATH</span> \r
- environment variable). Version number should be equal to "23.7". \r
- If you have any problem with a preinstalled version of Numeric 23.7, please, \r
- reinstall it.<br>\r
-Add the directory where you have a preinstalled version of Numeric \r
- package to the the <span \r
- style="font-weight: bold;">PYTHONHOME </span>environment \r
- variable. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>graphviz 2.2.1</li>\r
-</ul>\r
-\r
-Version number is checked by <span \r
- style="font-weight: bold;">dot -V</span> \r
- command. The <span \r
- style="font-weight: bold;">dot</span> executable should \r
- be in the <span \r
- style="font-weight: bold;">PATH</span> environment variable. \r
- Version number should be equal to "2.2.1".<br>\r
-Add <span \r
- style="font-weight: bold;">graphviz</span> bin directory to the \r
- the <span \r
- style="font-weight: bold;">PATH</span> environment variable. \r
- \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p>doxygen 1.4.6</li>\r
-</ul>\r
-\r
-Version number is checked by <span \r
- style="font-weight: bold;">doxygen --version</span> \r
- command. The <span \r
- style="font-weight: bold;">doxygen</span> executable \r
- should be in the <span \r
- style="font-weight: bold;">PATH</span> environment \r
- variable. Version number should be equal to "1.4.6". \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-weight: bold; color: rgb(0, 0, 153);">SALOME \r
- </span>module <span style="font-weight: bold; color: rgb(0, 0, 153);">sources</span> \r
- (3.2.4).</li>\r
-</ul>\r
-\r
-For each SALOME module sources package (KERNEL, GUI, GEOM, etc...) the \r
- root directory contains file configure.in (configure.ac) which defines \r
- version information.<br>\r
-Set the <span \r
- style="font-weight: bold;"><MODULE>_SRC_DIR</span> \r
- environment variable for each SALOME <span \r
- style="font-weight: bold;">MODULE</span> \r
- sources package installed (where <span \r
- style="font-weight: bold;">MODULE</span> \r
- is KERNEL, GUI, GEOM, ...). \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-weight: bold; color: rgb(0, 0, 153);">SALOME \r
- </span>module <span style="font-weight: bold; color: rgb(0, 0, 153);">binaries \r
- </span>(3.2.4)</li>\r
-</ul>\r
-\r
-For each SALOME module binaries package (KERNEL, GUI, GEOM, etc...) the \r
- <span \r
- style="font-weight: bold;">bin/salome</span> directory contains \r
- file <span \r
- style="font-weight: bold;">VERSION</span> which defines version \r
- information.<br>\r
-Set <span \r
- style="font-weight: bold;"><MODULE>_ROOT_DIR</span> environment \r
- variable for each SALOME <span \r
- style="font-weight: bold;">MODULE</span> \r
- binaries package installed (where <span \r
- style="font-weight: bold;">MODULE</span> \r
- is KERNEL, GUI, GEOM, ...). \r
-\r
-<p>If you have native products installed to directories different from \r
- default ones (not <b>/usr/bin</b>, <b>/usr/lib</b>...), it is recommended \r
- to follow the above mentioned instructions. Or you should properly set \r
- <span \r
- style="font-weight: bold;">PATH</span> and <span \r
- style="font-weight: bold;">LD_LIBRARY_PATH</span> \r
- variables <b><font style="color: #ff0000;"\r
- color=#FF0000>before</font></b> starting the Installation \r
- Wizard. Otherwise the installation script will fail to find preinstalled/native \r
- products. </p>\r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><span><b \r
- style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0></b></span><b style="font-weight: bold;">Note:</b> for some native \r
- products (e.g. gcc, Python) the rules of version checking are not so strict \r
- as described above. Only major and minor version numbers should coincide \r
- with the prerequisite. Newer version of the product can also be used. \r
- If some native product has version number larger than that required by \r
- the installation procedure, the user will be prompted by the warning message \r
- like this: <i>"You have newer version of gcc installed on your computer \r
- than that is required (3.4.1). Continue?"</i>. You can click <i>"Yes"</i> \r
- to proceed with the installation but in this case you should be aware \r
- of what you are doing. SALOME binaries (including other products) are \r
- compiled with the predefined prerequisites and most likely can not be \r
- run successfully if these products are not found. This can be helpful \r
- only if you plan to build all products from sources. </p>\r
-\r
-\r
-<!--(HR)============================================================-->\r
-<hr style="/*begin!kadov{{*/ float: aligncenter; /*}}end!kadov*/ ">\r
-\r
-\r
-<h3><a name=pick_up_env></a>Pick up the <font \r
- style="color: #ff0000;"\r
- color=#FF0000>environment</font></h3>\r
-\r
-Please, read the following information carefully . This section describes \r
- how the installation procedure generates the environment scripts for the \r
- SALOME platform being installed. \r
-\r
-<p>After installing each product shell the script creates a special environment \r
- file for the product in its installation folder. The name of the file \r
- is generated from the name of product by the following scheme: <b>env_<product_name>.sh</b> \r
- (for example <b>env_Vtk.sh </b>for the Vtk). This file includes all necessary \r
- environment settings. At the final step of the installation the script \r
- picks up all the settings files and generates two common environment files \r
- from them: <b>salome.sh</b> and <b>salome.csh </b>for <span \r
- style="font-weight: bold;">bash</span> \r
- and <span \r
- style="font-weight: bold;">csh</span> shells correspondingly. \r
- Such approach helps to save time when reinstalling products and you may \r
- not bother about setting all environment variables manually to build/launch \r
- SALOME. What you simply need is to source one of these environment files. \r
- </p>\r
-\r
-<p>This also concerns those products which are not being installed. For \r
- example, you install some SALOME binaries to the directory where you have \r
- previously installed other products. The Installation procedure \r
- tries to collect environment files from the target directory if it finds \r
- necessary products installed there. If some product is not found in the \r
- target directory the corresponding section of <b>salome.sh/salome.csh</b> \r
- files will be skipped. <br>\r
-For native products (like <i><b>gcc, tcl, etc...)</b></i> the installation \r
- procedure tries to find them first using <b>PATH</b> / <b>LD_LIBRARY_PATH</b> \r
- variables and then in the system default directories (<b>/usr/bin, /usr/lib</b> \r
- etc., depending on the product). </p>\r
-\r
-<p>In any case you may edit <b>salome.*</b> files after the installation \r
- procedure finishes, if you want.</p>\r
-\r
- \r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><span><b \r
- style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0></b></span><span \r
- style="font-weight: bold;">Note:</span> \r
- as it was mentioned <a href="#env_files">above</a> there are other environment \r
- files which are generated by the installation procedure: <span \r
- style="font-weight: bold;">env_products.csh</span> \r
- + <span \r
- style="font-weight: bold;">env_products.sh</span> and <span \r
- style="font-weight: bold;">env_build.csh</span> \r
- + <span \r
- style="font-weight: bold;">env_build.sh</span>. These files can \r
- be found in the target installation root directory.</p>\r
-\r
-<!--kadov_tag{{<implicit_empty_p>}}--> <br><!--kadov_tag{{</implicit_empty_p>}}-->\r
-\r
-\r
-<!--(HR)============================================================-->\r
-<hr style="/*begin!kadov{{*/ float: aligncenter; /*}}end!kadov*/ ">\r
-\r
-\r
-<h3><a name=xml_files></a>Modifying <font \r
- style="color: #ff0000;"\r
- color=#FF0000>XML</font> configuration \r
- <font \r
- style="color: #ff0000;"\r
- color=#FF0000>file</font></h3>\r
-\r
-You can create your own XML configuration file. The Installation Wizard \r
- can then take it as a command line argument to provide a list of products \r
- you want to install with it. The list of products and some other settings \r
- for the Installation Wizard are provided in the XML file. The default \r
- file which Installation Wizard looks for if no command line arguments \r
- are given, is <b>config.xml</b>.<br>\r
-This section describes the structure of the configuration file. <br>\r
-XML tags are in bold blue, optional sections/tags are in brackets. \r
-\r
-<p><font style="font-family: Courier;"\r
- face=Courier><b style="font-weight: bold;"><font style="color: #000099;"\r
- color=#000099><document></font></b> \r
- <font style="color: #000000;"\r
- color=#000000><b><br>\r
- </b>[</font><b><font style="color: #000099;"\r
- color=#000099> <config</font></b><font style="color: #000000;"\r
- color=#000000> [ version=<install_wizard_version> ]</font> <font style="color: #000000;"\r
- color=#000000><br>\r
- [ \r
- caption=<install_wizard_caption> ]</font> <font style="color: #000000;"\r
- color=#000000><br>\r
- [ \r
- copyright=<install_wizard_copyright> ]</font> <font style="color: #000000;"\r
- color=#000000><br>\r
- [ \r
- license=<install_wizard_license_info> ]</font> <font style="color: #000000;"\r
- color=#000000><br>\r
- [ \r
- os=<target_platform> ]</font><b><font style="color: #000099;"\r
- color=#000099><br>\r
- /></font></b><font style="color: #000000;"\r
- color=#000000> <br>\r
- ]</font> <font style="color: #000000;"\r
- color=#000000><b><br>\r
- </b>[ </font><b><font style="color: #000099;"\r
- color=#000099><path</font></b><font style="color: #000000;"\r
- color=#000000> [ targetdir=<target_directory> ]</font> \r
- <font style="color: #000000;"\r
- color=#000000><br>\r
- [ \r
- tempdir=<temp_directory> ]</font><b><font style="color: #000099;"\r
- color=#000099><br>\r
- /> </font></b><font style="color: #000000;"\r
- color=#000000><br>\r
- ]</font> <font style="color: #000000;"\r
- color=#000000><b><br>\r
- </b>[ </font><b><font style="color: #000099;"\r
- color=#000099><button</font></b><font style="color: #000000;"\r
- color=#000000> label=<button_label> </font> \r
- <font style="color: #000000;"\r
- color=#000000><br>\r
- \r
- [ tooltip=<button_tooltip> ]</font> <font style="color: #000000;"\r
- color=#000000><br>\r
- \r
- script=<button_script> </font> <font style="color: #000000;"\r
- color=#000000><br>\r
- \r
- [ disable=<disable_flag> ]</font><b><font style="color: #000099;"\r
- color=#000099><br>\r
- /> </font></b><font style="color: #000000;"\r
- color=#000000><br>\r
- ]</font> <font style="color: #000000;"\r
- color=#000000><br>\r
- [</font><b><font style="color: #000099;"\r
- color=#000099> <button</font></b><font style="color: #000000;"\r
- color=#000000> ... </font><font style="color: #000099;"\r
- color=#000099><br>\r
- /<b>></b></font><font style="color: #000000;"\r
- color=#000000><br>\r
- ]</font> <font style="color: #000000;"\r
- color=#000000><br>\r
- [</font><b><font style="color: #000099;"\r
- color=#000099> <product</font></b><font style="color: #000000;"\r
- color=#000000> name=<product_name></font> <font style="color: #000000;"\r
- color=#000000><br>\r
- \r
- version=<product_version></font> <br>\r
- [ context=<product_context> \r
- ]<br>\r
- [ description=<product_description> \r
- ]<font style="color: #000000;"\r
- color=#000000><br>\r
- \r
- install=<installation_mode></font> <font style="color: #000000;"\r
- color=#000000><br>\r
- \r
- supported=<supported_installation_modes></font> <font style="color: #000000;"\r
- color=#000000><br>\r
- [ \r
- disable=<disable_flag> ]<br>\r
- [ pickupenv=<pickup_env_flag> \r
- ]<br>\r
- \r
- dependancies=<list_of_prerequisites></font> <font style="color: #000000;"\r
- color=#000000><br>\r
- \r
- installdiskspace=<install_disk_space></font> <font style="color: #000000;"\r
- color=#000000><br>\r
- \r
- temporarydiskspace=<tmp_disk_space></font> <font style="color: #000000;"\r
- color=#000000><br>\r
- \r
- script=<installation_script_name></font><font style="color: #000099;"\r
- color=#000099><br>\r
- /<b>></b></font><font style="color: #000000;"\r
- color=#000000> \r
- <br>\r
- ]</font> <font style="color: #000000;"\r
- color=#000000><br>\r
- [</font><b><font style="color: #000099;"\r
- color=#000099> <product</font></b><font style="color: #000000;"\r
- color=#000000> ... </font><font style="color: #000099;"\r
- color=#000099><br>\r
- /<b>></b></font><font style="color: #000000;"\r
- color=#000000> \r
- <br>\r
- ]<br>\r
- ...</font><b><font style="color: #000099;"\r
- color=#000099><br>\r
-</document></font></b> </font></p>\r
-\r
-<h4><font style="color: #000000;"\r
- color=#000000><config> section</font></h4>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>This is an optional section; it provides general \r
- information about the Installation Wizard itself.<br>\r
-<br>\r
-Attributes:</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">version</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>The application version number to be shown in the \r
- caption.</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">caption</b></font></li>\r
-</ul>\r
-\r
-The application main window caption - if this string contains '%1' text \r
- the title will contain the version number in this place (see above). \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">copyright</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>The application copyright information (shown in the \r
- first page).</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">license</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>The application license information (shown in the \r
- first page).</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">os</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>This parameter defines the directory (relative from \r
- ./Products/BINARIES) where the Installation Wizard will search precompiled \r
- binaries packages. If this tag is not provided, binaries packages are \r
- looked for in the ./Products/BINARIES directory.</font> \r
-\r
-<h4><b style="font-weight: bold;"><font style="color: #000000;"\r
- color=#000000><path> section</font></b></h4>\r
-\r
-This is an optional section; it defines default installation directories.<font style="color: #000000;"\r
- color=#000000><br>\r
-<br>\r
-Attributes:</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">targetdir</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>The target directory - the path to the directory \r
- where products should be installed.</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">tempdir</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>The temporary directory - the path to the directory \r
- for the temporary files.</font> \r
-\r
-<h4><b style="font-weight: bold;"><product> section</b></h4>\r
-\r
-This section describes product to be installed with the Installation Wizard. \r
- The XML file should include a <product> section for each product \r
- to be installed. The products appear in the tree view and are installed \r
- in the order they are described in the configuration file. It is recommended \r
- (but not obligatory) to define native products at the top of the list \r
- before all other products.<font style="color: #000000;"\r
- color=#000000><br>\r
-<br>\r
-Attributes:</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">name</b></font></li>\r
-</ul>\r
-\r
-Product name. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">version</b></font></li>\r
-</ul>\r
-\r
-<span>Product</span> version. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">description</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>Product description (optional).</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">context</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>Context (optional). The possible values are <b>'salome \r
- sources'</b>, <b>'salome binaries'</b> and <b>'prerequisite'</b> (several \r
- contexts can be given separated by ":" symbol).</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">supported</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>Supported modes of installation. Several modes can \r
- be separated by comma. Possible value are: <i>install sources</i>, <i>install \r
- binaries</i>, <i>use native</i>. The Installation script should contain \r
- the corresponding functions for each of the supported installation modes \r
- (see <a href="#new_products">here</a>).</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">install</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>Default (starting) installation mode.</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">disable</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>If this optional flag has 'true' value, the corresponding \r
- product will not appear in the list of products and will not be installed.</font> \r
- \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;">pickupenv</b></li>\r
-</ul>\r
-\r
-This flag points that pickup environment procedure should be performed \r
- for this product. If this flag equal to 'true', salome.sh and salome.csh \r
- files will be created in the product installation directory. Usually \r
- this option is set to true for SALOME KERNEL module sources and binaries \r
- package. This is an optional key, default value is 'false'<b>.</b> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">dependancies</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>List of prerequisite products, which are necessary \r
- to build this product, separated by comma.</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">installdiskspace</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>Total amount of space (integer, in Kbytes), which \r
- the product occupies on the hard drive after the installation.</font> \r
- \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">temporarydiskspace</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>Disk space (integer, in Kbytes) for temporary files, \r
- which is necessary to build the product from the sources.</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">script</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>The installation script name. This script is in charge \r
- of the installation of the product. It is called automatically by the \r
- Installation Wizard when necessary from the main program. See the <a href="#new_products">next \r
- section</a> for more information.</font> \r
-\r
-<h4><b style="font-weight: bold;"><button> section</b></h4>\r
-\r
-This is an optional section. It allows customization of the last <i>"Finish \r
- installation"</i> page of the Installation Wizard by adding one or \r
- more buttons in the lower part of the wizard's window. The script which \r
- is attached to each such button, can perform some specific action, for \r
- example, launch the application or show the Release Notes file by using \r
- an external program. See <a href="#finish_buttons">here</a> for more details \r
- about writing scripts.<font style="color: #000000;"\r
- color=#000000><br>\r
-<br>\r
-Attributes:</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">label</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>This is the button text.</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">tooltip</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>The button tooltip (optional).</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">script</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>The script attached to the button.</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">disable</b></font></li>\r
-</ul>\r
-\r
-<p style="background-color: #ffffff;">If this optional flag has 'true' \r
- value, the corresponding button will not appear in the <i>"Finish \r
- installation"</i> page - the section of XML file is silently ignored.<b> </b></p>\r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><b \r
- style="font-weight: bold;"><span style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0></span><span style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');">Note:</span></b><span style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"> \r
- If you add new products to be installed with Installation Wizard, you \r
- should also provide installation script for this product. See the next \r
- section for more details. </span></p>\r
-\r
-<!--kadov_tag{{<implicit_empty_p>}}--> <br><!--kadov_tag{{</implicit_empty_p>}}-->\r
-\r
-\r
-<!--(HR)============================================================-->\r
-<hr style="/*begin!kadov{{*/ float: aligncenter; /*}}end!kadov*/ ">\r
-\r
-\r
-<h3><a name=new_products></a>Implementing <font \r
- style="color: #ff0000;"\r
- color=#FF0000>installation \r
- scripts</font> for the new products</h3>\r
-\r
-When you want some product to be installed with the Installation Wizard, \r
- you should add its description <a href="#xml_files">to the configuration \r
- file</a> and create the installation script, following the rules described \r
- in this section. <br>\r
-<br>\r
-There are some obligatory functions which should be implemented in this \r
- installation script. These functions are automatically called by the master \r
- installation script or/and its GUI shell when it is necessary.<font style="color: #000000;"\r
- color=#000000><br>\r
-File <b>common.sh</b> contains some service functions which can be used \r
- in your installation script, like <b>make_env()</b>,<b> make_dir()</b>, \r
- <b>try_existing()</b>, <b>sort_path()</b>,<b> find_in_path()</b>, etc.</font> \r
- \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;">check_version()</b></li>\r
-</ul>\r
-\r
-This function allows to check the version of the product already installed \r
- on the computer. It should try to find the product (native or preinstalled \r
- in the target directory) and check its version. This helps to avoid unnecessary \r
- reinstallation. This is an internal function and is not called from the \r
- master installation script. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><b style="font-weight: bold;"><font style="color: #000000;"\r
- color=#000000>try_native()</font></b></li>\r
-</ul>\r
-\r
-This function is called when the <i>'use native' </i>installation mode \r
- is selected by the user. The function should try to find a native version \r
- of the product and define possibility of its use. It should create the \r
- environment file for the product in the temporary directory (see also \r
- the description of <b>print_env(</b><span \r
- style="font-weight: bold;">)</span> \r
- function). It is not necessary to implement this function if you do not \r
- provide native mode installation. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">install_source()</b></font></li>\r
-</ul>\r
-\r
-This function is called when the <i>'install sources</i>' installation \r
- mode is selected by the user. The function is responsible for building \r
- the product from the sources package. It should create the environment \r
- file for the product in the temporary directory (see also description \r
- of <b>print_env(</b><span \r
- style="font-weight: bold;">)</span> function). \r
- It is not necessary to implement this function if you do not provide sources \r
- mode installation. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">install_source_and_build()</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>This function is called when SALOME module is installed \r
- and the <span style="font-weight: bold;">--all-from-sources</span> (<span style="font-weight: bold;">-a</span>) option is used (<span style="font-style: italic;">"Build \r
- SALOME sources"</span> check box in GUI mode). This function should \r
- be used to unpack SALOME sources package and then call the build/install \r
- procedure for it.<br>\r
-For more details please refer to the <a href="#install_from_wizard">this</a> \r
- and <a href="#gui_mode">this</a> sections for more details.</font> \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">install_binary()</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>This function is called when the <i>'install binaries'</i> \r
- installation mode is selected by the user. The function is responsible \r
- for the extracting of the product from the binaries package. It should \r
- create environment for the product in the temporary directory (see also \r
- description of <b>print_env(</b>) function). It is not necessary to implement \r
- this function if you do not provide binaries mode installation. \r
-\r
-</font><ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;">try_preinstalled()</b></li>\r
-</ul>\r
-\r
-This function is called when<i><span style="font-style: normal;"> the</span> \r
- 'not install'</i> installation mode is selected by the user. In this case \r
- the script should inspect the target directory to try to find an already \r
- preinstalled product, pick up and check the environment from there. See \r
- <a href="#pick_up_env">here</a> for more details. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;">print_env()</b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000>This function is in charge of creating the environment \r
- script. It should create a file with name </font><b>env_<product_name>.sh</b> \r
- in the temporary directory and then copy it into the product installation \r
- directory. The file should contain all necessary environment variables \r
- settings for the product. It will be collected during the 'pick-up-environment' \r
- procedure. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;">pickup_env()</b></li>\r
-</ul>\r
-\r
-This procedure corresponds to the <b>pickupenv</b> tag of the configuration \r
- xml file (see previous section). It should call the <b>make_env</b> procedure \r
- to perform the pick-up environment procedure for the product.<font style="color: #000000;"\r
- color=#000000><br>\r
-<br>\r
-The calling signature of the product installation script is the following:</font> \r
- <b><font style="color: #000000;"\r
- color=#000000><br>\r
-<product_script_name> <function_name> <temp_folder> <products_directory> \r
- <target_directory> <dependancies> <product_name></font></b> \r
- \r
-\r
-<p><font style="color: #000000;"\r
- color=#000000>where</font> </p>\r
-\r
-<p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><product_script_name></b> \r
- - installation script name (described in the configuration xml file);</font> \r
- <font style="color: #000000;"\r
- color=#000000><b><br>\r
-<function_name></b> - the name of function, corresponding to the \r
- selected installation mode: <i>try_native, install_source, install_binary</i> \r
- or <i>try_preinstalled</i>;</font> <font style="color: #000000;"\r
- color=#000000><b><br>\r
-<temp_folder></b> - temporary files directory;</font> <font style="color: #000000;"\r
- color=#000000><b><br>\r
-<products_directory></b> - directory where the sources/binaries package \r
- can be found. You should provide the sources package in the <i><Install_Wizard_root_directory>/Products/SOURCES</i> \r
- directory and binaries package in the <i><InstallWizard_root_directory>/Products/BINARIES/<os_version></i>, \r
- where <os_version> is the target platform description, which appears \r
- in the corresponding section of the <a href="#xml_files">configuration \r
- xml file</a>.</font> <font style="color: #000000;"\r
- color=#000000><b><br>\r
-<target_directory></b> - root target directory where the product \r
- should be installed to;</font> <font style="color: #000000;"\r
- color=#000000><b><br>\r
-<dependancies></b> - single-quoted list of prerequisite products, \r
- separated by space;</font> <font style="color: #000000;"\r
- color=#000000><b><br>\r
-<product_name> </b>- product name itself.</font> </p>\r
-\r
-<p><font style="font-weight: bold;">Example:</font> <i><br>\r
-med-2.2.3.sh install_binary /tmp/work ./Products/BINARIES/Mandrake10.1 \r
- /usr/salome 'gcc Hdf' med</i> </p>\r
-\r
-<p><font style="color: #000000;"\r
- color=#000000>Copy the created script into the <i><Install_Wizard_root_directory>/config_files</i> \r
- sub-directory where all installation scripts are stored. Installation \r
- Wizard will automatically search and call your script during the installation \r
- procedure.</font> </p>\r
-\r
-\r
-<!--(HR)============================================================-->\r
-<hr style="/*begin!kadov{{*/ float: aligncenter; /*}}end!kadov*/ ">\r
-\r
-\r
- \r
-\r
-<h3><a name=finish_buttons></a>Customizing <font \r
- style="color: #ff0000;"\r
- color=#FF0000>Readme page</font> \r
- buttons</h3>\r
-\r
-The Installation Wizard allows customizing the look-n-feel of the last \r
- <i>"Finish installation"</i> page. If you want to add one or \r
- more buttons to this page in order to perform some specific actions at \r
- the end of the installation (for example, to show the Release Notes file \r
- by using Open Office) you can put an additional section to the XML configuration \r
- file. This is the <b><button></b> section (see <a href="#xml_files">here</a> \r
- for more details). \r
-\r
-<!--begin!kadov{{--><br><!--}}end!kadov--><!--kadov_tag{{<implicit_p>}}--> \r
- \r
-\r
-<!--begin!kadov{{--><br><!--}}end!kadov--><!--kadov_tag{{<implicit_p>}}-->To \r
- implement the action which will be performed when the user clicks the \r
- button, you need to create a script and put it to the <i><Install_Wizard_root_directory>/config_files</i> \r
- directory.<br>\r
-There are some obligatory functions which should be implemented in this \r
- script. These functions are automatically called by the Installation Wizard \r
- GUI. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;">check_enabled()</b></li>\r
-</ul>\r
-\r
-This procedure is called by the Installation Wizard when the <i>"Finish \r
- installation"</i> page is displayed and the status of the buttons \r
- should be modified according to the installation options. This procedure \r
- should return <b>0</b> if the corresponding action can be performed and, \r
- thus, the button should become enabled. Otherwise, it should return <b>1</b> \r
- - in this case the corresponding button will be disabled. \r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;">execute()</b></li>\r
-</ul>\r
-\r
-This procedure is invoked when the user clicks the button. This procedure \r
- should return <b>0</b> if the corresponding action is done successfully \r
- and <b>1</b> if any error occurs.<br>\r
-<br>\r
-The calling signature of the script is the following:<b><font style="color: #000000;"\r
- color=#000000><br>\r
-<product_script_name> <function_name> <target_directory> \r
- <temp_folder></font></b> \r
-\r
-<p><font style="color: #000000;"\r
- color=#000000>where</font> </p>\r
-\r
-<p><b style="font-weight: bold;"><product_script_name></b> - the \r
- script name itself (retrieved from the XML configuration xml file); <b><br>\r
-<function_name></b> - the name of function; <b><br>\r
-<target_directory></b> - root target directory where the product \r
- is installed to; <b><br>\r
-<temp_folder> </b>- temporary files directory; <b><br>\r
- </b></p>\r
-\r
-<p style="background-image: url('../Texture_horiz_ltbluebubbles.jpg');"><b><span \r
- style="font-weight: bold;"><img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0></span>Note:</b> The standard \r
- Installation Wizard buttons "Launch SALOME" and "Release \r
- Notes" are implemented with this feature. Refer to scripts <b>start_salome.sh</b> \r
- and <b>release_notes.sh</b> for sample implementation.<b><span \r
- style="font-weight: bold;"><br>\r
-<br>\r
-<img src="../note1.gif"\r
- x-maintain-ratio=TRUE\r
- style="border: none;\r
- width: 36px;\r
- height: 38px;\r
- float: none;\r
- border-style: none;\r
- border-style: none;"\r
- width=36\r
- height=38\r
- border=0></span>Note:</b> Any button (even standard) can be \r
- ignored by the Installation Wizard if the attribute <b><disable></b> \r
- in the XML configuration file is set to the "true" value. </p>\r
-\r
-\r
-<!--(HR)============================================================-->\r
-<hr style="/*begin!kadov{{*/ float: aligncenter; /*}}end!kadov*/ ">\r
-\r
-\r
- \r
-\r
-</body>\r
-\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Introduction</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { text-align:center; }\r
-img_whs2 { border:none; width:550px; height:275px; float:none; border-style:none; }\r
-h1.whs3 { text-align:justify; }\r
-p.whs4 { font-family:'Times New Roman' , serif; text-align:justify; text-indent:48px; }\r
-p.whs5 { font-family:'Times New Roman' , serif; text-align:justify; }\r
-ul.whs6 { list-style:disc; }\r
-p.whs7 { font-family:'Times New Roman' , serif; text-align:justify; font-weight:bold; }\r
-table.whs8 { x-cell-content-align:top; width:100%; border-spacing:0px; }\r
-col.whs9 { width:31.561%; }\r
-col.whs10 { width:68.439%; }\r
-tr.whs11 { x-cell-content-align:top; }\r
-td.whs12 { width:31.561%; padding-right:10px; padding-left:10px; border-right-style:none; border-left-style:none; border-top-style:none; border-bottom-style:none; }\r
-img_whs13 { border:none; width:249px; height:221px; border-style:none; }\r
-td.whs14 { width:68.439%; padding-right:10px; padding-left:10px; border-top-style:none; border-bottom-style:none; border-right-style:none; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("Welcome to SALOME");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 align="center" class="whs1"><img src="../pics/icon_about.png" x-maintain-ratio="TRUE" width="550px" height="275px" border="0" class="img_whs2"></h1>\r
-\r
-<h1 class="whs3"><span style="font-family: 'Times New Roman', serif;">Introduction</span></h1>\r
-\r
-<p class="whs4">Welcome to SALOME Platform! Modern technological \r
- products (cars, structures, electrical or electronic equipment) are getting \r
- more and more complex every year and must meet increasingly severe requirements \r
- in terms of quality and performance. For example, for structures and their \r
- environment the demands to reduce risks and optimize costs are extremely \r
- high. It requires particularly refined simulations concerning structural \r
- behavior and robustness to ensure high reliability.</p>\r
-\r
-<p class="whs5">The \r
- numeric modeling of a physical problem, the development of solutions and \r
- their integration into the design process are often handled in very specific \r
- environments. SALOME represents a generic CAD-based application for digital \r
- simulation with "high reactivity to market evolutions and customer \r
- expectations". </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5">SALOME \r
- is a free software that provides a generic platform for Pre and Post-Processing \r
- for numerical simulation. It is based on an open and flexible architecture \r
- made of reusable components available as free software.</p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5">SALOME \r
- is a CAD/CAE integration platform. It provides reusable components for: \r
- </p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs5">3D \r
- modeling (bottom-up construction, import, healing);</p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Visualization;</p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Computational \r
- schemas management;</p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Post-processing.</p></li>\r
-</ul>\r
-\r
-<p class="whs5">SALOME \r
- is tailored for integration of custom components:</p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs5">CAD \r
- interfaces;</p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Mesh \r
- generators;</p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Finite \r
- Element solvers with specific pre-processors.</p></li>\r
-</ul>\r
-\r
-<p class="whs5">The \r
- SALOME platform is available in Open Source.</p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs7">Salome Platform:</p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs5">Supports \r
- interoperability between CAD modeling and computation software (CAD-CAE \r
- link) </p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Makes \r
- easier the integration of new components on heterogeneous systems for \r
- numerical computation </p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Sets \r
- the priority to multi-physics coupling between computation software </p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Provides \r
- a generic user interface, user-friendly and efficient, which helps to \r
- reduce the costs and delays of carrying out the studies </p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Reduces \r
- training time to the specific time for learning the software solution \r
- which has been based on this platform </p></li>\r
- \r
- <li class=kadov-p><p class="whs5">All \r
- functionalities are accessible through the programmatic integrated Python \r
- console</p></li>\r
-</ul>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<table x-use-null-cells cellspacing="0" width="100%" class="whs8">\r
-<col class="whs9">\r
-<col class="whs10">\r
-\r
-<tr valign="top" class="whs11">\r
-<td width="31.561%" class="whs12">\r
-<p><img src="../image65.gif" width="249px" height="221px" border="0" class="img_whs13"></td>\r
-<td width="68.439%" class="whs14">\r
-<p class="whs7"><span style="font-family: 'Times New Roman', serif; font-weight: bold;"><B>What \r
- can you do in SALOME? (Some of SALOME main functions)</B></span></p>\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs5"><span \r
- style="font-family: 'Times New Roman', serif;">Define geometrical models \r
- (create/modify geometrical items), import and export them using the BREP, \r
- IGES and STEP formats; </span></p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Define \r
- meshing of these geometrical items, import and export them;</p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Handle \r
- physical properties and quantities attached to geometrical items, import \r
- and export them to a reusable format;</p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Perform \r
- computations using a solver (optionally provided): read input data, configure \r
- the solver, and write calculation results);</p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Visualize \r
- result fields in 3D, 2D and export images of their visualization to an \r
- appropriate format;</p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Manage \r
- study schemes: definition, save/restore;</p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Manage \r
- computation schemes: definition, execution.</p></li>\r
-</ul></td></tr>\r
-</table>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Introduction to SALOME</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { font-family:'Times New Roman' , serif; }\r
-p.whs2 { font-family:'Times New Roman' , serif; margin-left:0px; text-indent:48px; }\r
-p.whs3 { font-family:'Times New Roman' , serif; text-align:justify; text-indent:48px; font-weight:normal; }\r
-img_whs4 { border:none; width:623px; height:408px; border-style:none; }\r
-p.whs5 { font-family:'Times New Roman' , serif; margin-left:0px; }\r
-ul.whs6 { list-style:disc; }\r
-p.whs7 { font-family:'Times New Roman' , serif; margin-left:0px; font-weight:bold; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs2 {margin-left:1pt; }";\r
- strNSS += "p.whs5 {margin-left:1pt; }";\r
- strNSS += "p.whs7 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("About SALOME\nIntroduction to SALOME");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1"><span style="font-family: 'Times New Roman', serif;">Introduction \r
- to SALOME </span></h1>\r
-\r
-<p class="whs2"> <span \r
- style="font-weight: bold;"><B>SALOME</B></span> \r
- platform represents a generic open source platform for pre- and post-processing \r
- in numeric simulations. <span style="font-weight: bold;"><B>SALOME</B></span> \r
- combines several software components, which are built in such a way that \r
- it allows to integrate solvers and existing meshing algorithms along with \r
- the specification of physical properties for a given domain. The originality \r
- of this approach is that the various components must cooperate dynamically \r
- and be configurable. </p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs3"><img src="../image54.jpg" width="623px" height="408px" border="0" class="img_whs4"></p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs5">SALOME \r
- platform integrates a number of modules each having its own function:</p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs7"><span lang=EN-US><B>KERNEL</B></span><span \r
- lang=EN-US\r
- style="font-weight: normal;"> : </span><span \r
- style="font-weight: normal;">provides a common \r
- shell for all components, which can be integrated into the SALOME platform.</span></p></li>\r
-</ul>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs7">GUI<span style="font-weight: normal;"> \r
- :</span> <span style="font-weight: normal;">provides visual representation: \r
- </span><span lang=EN-US\r
- style="font-weight: normal;">basic widgets, viewers etc. \r
- Third party modules optionally can have GUI, but in any case they always \r
- connected with KERNEL.</span></p></li>\r
-</ul>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs5"><span \r
- style="font-weight: bold;"><B>Geometry</B></span> : facilitates \r
- construction and optimization of geometrical models using a wide range \r
- of CAD \r
- functions. </p></li>\r
-</ul>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs5"><span \r
- style="font-weight: bold;"><B>Mesh</B></span> : generates \r
- meshes on geometrical models previously created or imported by the GEOM \r
- component.</p></li>\r
-</ul>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs5"><span \r
- style="font-weight: bold;"><B>Supervisor</B></span> : provides \r
- tools for construction of graphs and execution of calculations. </p></li>\r
-</ul>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs5"><span \r
- style="font-weight: bold;"><B>Post-Pro</B></span> : performs \r
- data visualization.</p></li>\r
-</ul>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs5"><span \r
- style="font-weight: bold;"><B>MED</B></span> : allows \r
- to work with MED files. </p></li>\r
-</ul>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','About SALOME architecture','about_salome_pro_architecture.htm','Introduction to GUI','../introduction_to_gui.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Navigating topics</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { font-family:'Times New Roman' , serif; }\r
-p.whs2 { font-family:'Times New Roman' , serif; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("Using this reference manual\nNavigating topics");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Navigating topics</h1>\r
-\r
-<p class="whs2">Topics in the SALOME \r
- <span style="font-family: 'Times New Roman', serif;">Help system include \r
- a variety of navigation components including:</span></p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p-CBULLETS><p class=BULLETS\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"><span \r
- style="font-weight: bold;"><B>Related Topics buttons:</B></span> When you click \r
- a Related Topics button, a pop-up menu opens that displays a list of topics \r
- you can go to. The topics are relevant to what you are currently reading \r
- in the right-hand pane or they cross-reference related information that \r
- you can go to. Click a topic from the pop-up and it opens in the right-hand \r
- pane. </p></li>\r
-</ul>\r
-\r
-<p class=BULLETS\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"> </p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p-CBULLETS><p class=BULLETS\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"><span \r
- style="font-weight: bold;"><B>Drop-down hotspots:</B></span> Many topics include \r
- drop-down hotspots. This is clickable text (text links) that displays \r
- more information below the hotspot. You only need to click the hotspots \r
- you want to read. To close the text, click the hotspot again. </p></li>\r
-</ul>\r
-\r
-<p class=BULLETS\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"> </p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p-CBULLETS><p class=BULLETS\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"><span \r
- style="font-weight: bold;"><B>Expanding hotspots:</B></span> Some topics include \r
- expanding hotspots. This kind of hotspot is a text link that displays \r
- information immediately following the text. You only have to click the \r
- hotspots you want more information about. To close the text, click the \r
- hotspot again. </p></li>\r
-</ul>\r
-\r
-<p class=BULLETS\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"> </p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p-CBULLETS><p class=BULLETS\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"><span \r
- style="font-weight: bold;"><B>Text-only popups:</B></span> This kind of link \r
- is text that displays a pop-up window when clicked. The popup window displays \r
- brief information about a term or concept relevant to the topic you're \r
- currently reading. When you finish viewing the information, you click \r
- inside the pop-up window to close it. </p></li>\r
-</ul>\r
-\r
-<p class=BULLETS\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"> </p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p-CBULLETS><p class=BULLETS\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"><span \r
- style="font-weight: bold;"><B>Popups:</B></span> When you click some links, the \r
- destination topic opens in a popup inside the same window that's open. \r
- It's like having two windows in one, only the focus is on the information \r
- in the popup. When you finish reading the information in the popup, you \r
- can close it from view or navigate to any of its links. </p></li>\r
-</ul>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'_blank','About SALOME help system','about_salome_pro_help_system.htm','Using left-hand tabs','using_left-hand_tabs.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Opening studies</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { text-align:justify; }\r
-p.whs2 { margin-left:0px; text-align:justify; }\r
-img_whs3 { border:none; width:30px; height:30px; float:none; border-style:none; }\r
-p.whs4 { font-style:italic; color:#ff0000; margin-left:0px; text-align:justify; }\r
-p.whs5 { font-style:italic; text-align:justify; color:#000000; font-family:'Arial Black' , sans-serif; }\r
-p.whs6 { font-style:italic; color:#ff0000; text-align:justify; }\r
-p.whs7 { font-style:italic; color:#ff0000; margin-left:40px; text-align:justify; }\r
-img_whs8 { border:none; width:25px; height:28px; float:none; border-style:none; }\r
-p.whs9 { margin-left:0px; font-style:italic; color:#ff0000; text-align:justify; }\r
-p.whs10 { margin-left:40px; text-align:justify; }\r
-img_whs11 { border:none; width:331px; height:207px; float:none; border-style:none; }\r
-p.whs12 { color:#ff0000; margin-left:0px; background-image:url('../texture_horiz_ltbluebubbles.jpg'); text-align:justify; }\r
-img_whs13 { border:none; float:none; width:35px; height:37px; border-style:none; }\r
-p.whs14 { color:#ff0000; margin-left:0px; text-align:justify; }\r
-p.whs15 { margin-left:0px; font-weight:bold; text-align:justify; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs2 {margin-left:1pt; }";\r
- strNSS += "p.whs4 {margin-left:1pt; }";\r
- strNSS += "p.whs9 {margin-left:1pt; }";\r
- strNSS += "p.whs12 {margin-left:1pt; }";\r
- strNSS += "p.whs14 {margin-left:1pt; }";\r
- strNSS += "p.whs15 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nStudy management\nOpening studies");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Opening studies</h1>\r
-\r
-<p class="whs2"><img src="../i_blue.jpg" x-maintain-ratio="TRUE" width="30px" height="30px" border="0" class="img_whs3">In <span \r
- style="font-weight: bold;"><B>SALOME</B></span> all studies are stored in a special \r
- format *.hdf. </p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5">To open an existing \r
- study:</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs7"><span style="font-style: normal; color: #000000;"><font color=black >In \r
- the main toolbar click </font></span><img src="../pics/open.jpg" x-maintain-ratio="TRUE" width="25px" height="28px" border="0" class="img_whs8"> <span style="font-style: normal; color: #000000;"><font color=black >or \r
- from the main menu select </font></span><span style="font-style: normal;\r
- color: #000000;\r
- font-weight: bold;"><font color=black ><B>File \r
- > Open</B></font></span><span style="font-style: normal; color: #000000;"><font color=black > option. \r
- From a standard Search File dialog box choose the required *.hdf file \r
- and click </font></span><span style="font-style: normal;\r
- color: #000000;\r
- font-weight: bold;"><font color=black ><B>Open</B></font></span><span style="font-style: normal; color: #000000;"><font color=black > \r
- button.</font></span></p>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs9"><span style="color: #000000; font-family: 'Arial Black', sans-serif;"><font color=black >To \r
- load an unloaded study (<a href="saving_a_study.htm">see also</a>):</font></span> \r
- </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs10">From the main menu select \r
- <span style="font-weight: bold;"><B>File > Connect</B></span> option. In the \r
- following dialog box select one of the studies, which has been previously \r
- created and unloaded and click <span style="font-weight: bold;"><B>Ok</B></span> \r
- button:</p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs10"><img src="../pics/loadstudy2.png" x-maintain-ratio="TRUE" width="331px" height="207px" border="0" class="img_whs11"></p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs12"><span style="color: #000000;"><font color=black ><img src="../tip1.gif" x-maintain-ratio="TRUE" x-save-file="TRUE" x-save-method="compute-relative" width="35px" height="37px" border="0" class="img_whs13"> After opening an existing study, you will see its structure \r
- in the <a href="using_object_browser.htm">Object Browser</a>. It will \r
- contain the objects created with the help of different components during \r
- the previous study session. If you right-click on one of the objects and \r
- from the associated pop-up menu choose </font></span><span style="color: #000000; font-weight: bold;"><font color=black ><B>Open \r
- With</B></font></span><span style="color: #000000;"><font color=black > option, which will automatically \r
- launch the component corresponding to this object. </font></span></p>\r
-\r
-<p class="whs14"> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs15">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Creating a new study','creating_a_new_study.htm','Displaying studies','displaying_studies.htm','Introduction to GUI','../introduction_to_gui.htm','SALOME desktop','salome_pro_desktop.htm','Saving and closing studies','saving_a_study.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs15"> </p>\r
-\r
-<p class="whs15"> </p>\r
-\r
-<p class="whs15"> </p>\r
-\r
-<p class="whs15"> </p>\r
-\r
-<p class="whs15"> </p>\r
-\r
-<p class="whs15"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>SALOME Installation Wizard Help</title>\r
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com"><style>\r
-<!--\r
-A:visited { color:#551a8b; }\r
-A:active { color:#ff0000; }\r
-A:link { color:#0000ee; }\r
--->\r
-</style><style type="text/css">\r
-<!--\r
-p.whs1 { text-align:center; }\r
-table.whs2 { width:100%; }\r
-img_whs3 { width:139px; height:47px; border-style:none; }\r
-h3.whs4 { text-align:center; }\r
-div.whs5 { text-align:right; }\r
-img_whs6 { width:109px; height:47px; border-style:none; }\r
-hr.whs7 { float:aligncenter; }\r
-div.whs8 { margin-left:40px; }\r
-h3.whs9 { margin-left:40px; }\r
-img_whs10 { width:586px; height:364px; border-style:none; }\r
-p.whs11 { background-image:url('../texture_horiz_ltbluebubbles.jpg'); }\r
-img_whs12 { border:none; width:35px; height:37px; float:none; border-style:none; }\r
-img_whs13 { float:none; width:586px; height:525px; border-style:none; }\r
-img_whs14 { border:none; width:36px; height:38px; float:none; border-style:none; }\r
-img_whs15 { width:586px; height:525px; border-style:none; }\r
-img_whs16 { width:586px; height:485px; border-style:none; }\r
-p.whs17 { text-align:justify; }\r
-img_whs18 { width:586px; height:484px; border-style:none; }\r
-img_whs19 { width:660px; height:410px; border-style:none; }\r
-p.whs20 { background-color:#ffffff; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("About SALOME\nInstalling SALOME");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body style="color: #000000;"><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<p align="center" class="whs1"> </p>\r
-\r
-<table nosave x-use-null-cells width="100%" class="whs2">\r
-\r
-<tr nosave>\r
-<td nosave>\r
-<h1><a href="http://www.opencascade.com"><img src="logocorp.png" width="139px" height="47px" border="0" class="img_whs3"> </a></td>\r
-<td>\r
-<h3 align="center" class="whs4"><font style="font-size: xx-large;"\r
- size=7><font style="color: #000099;"\r
- color=#000099>SALOME Installation Wizard \r
- Help</font></font></td>\r
-<td>\r
-<div align="right" class="whs5">\r
-<a href="http://www.opencascade.org/SALOME/"><img src="application.png" width="109px" height="47px" border="0" class="img_whs6"> </a>\r
-</div></td></tr>\r
-</table>\r
-\r
-<div align="right" class="whs5">\r
- \r
-</div>\r
-\r
-\r
-<hr class="whs7">\r
-\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#install_from_wizard">Installing products \r
- with the Installation Wizard</a></li>\r
- \r
- <ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#gui_mode">GUI mode</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#batch_mode">Batch mode</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#env_files">Environment files</a></li>\r
- </ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#check_version_proc">Notes on check products \r
- version procedure</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#pick_up_env">Pick up the environment</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#xml_files">Modifying XML configuration \r
- file</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#new_products">Implementing installation \r
- scripts for the new products</a></li>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><a href="#finish_buttons">Customizing Readme page \r
- buttons</a></li>\r
-</ul>\r
-\r
-\r
-<hr class="whs7">\r
-\r
-\r
-<h3><a name=install_from_wizard></a>Installing products with the <font \r
- style="color: #ff0000;"\r
- color=#FF0000>Installation Wizard</font></h3>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The Installation Wizard can be launched \r
- in two modes: </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>GUI \r
- </B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">and </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>batch</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. <br>\r
-The root directory of the Installation Wizard contains Python script </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>runInstall</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. \r
- To run the Installation Wizard just type <b>runInstall</b> in the terminal \r
- window: </font></span>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">[ python ] </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">runInstall \r
- </font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">[options]</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Without options this script will launch \r
- the SALOME Installation Wizard in the default mode (GUI).<br>\r
-The default installation settings can be overridden by using command line \r
- options. Each option has a short and a long notation:</font></span></p>\r
-\r
-<p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">-g / --gui</font></span></b></p>\r
-\r
-<div class="whs8">\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Runs the Installation Wizard in the GUI \r
- mode (this is the default mode). </font></span>\r
-</div>\r
-\r
-<p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">-b / --batch</font></span></b></p>\r
-\r
-<div class="whs8">\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Runs the Installation Wizard in the terminal \r
- mode. </font></span>\r
-</div>\r
-\r
-<p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">-f FILE \r
- / --file=</font></span></b><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>FILE</B></font></span></p>\r
-\r
-<div class="whs8">\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The XML configuration file to be used by \r
- the Installation Wizard. If this option is not used then the installation \r
- script tries to define the <i>Linux </i>version and use the corresponding \r
- XML file if it exists. For examle, for </font></span><span style="font-size: 12pt; color: rgb(0, 0, 153);"><font size=3 style="font-size:12pt;">Linux \r
- Mandrake 10.1</font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> the <b>config_Mandrake_10.1.xml</b> \r
- file will be used by default. If no appropriate file is found, the file \r
- <b>config.xml</b> will be used. This file refers to the basic target platform \r
- which is </font></span><span style="font-size: 12pt; color: rgb(0, 0, 153);"><font size=3 style="font-size:12pt;">Linux \r
- Mandrake 10.1</font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> for SALOME 3.0 and \r
- newer. If </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>config.xml</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> file is not found either, a warning message \r
- box is shown (in GUI mode) or printed to the console (in batch mode) and \r
- the Installation Wizard quits. </font></span>\r
-</div>\r
-\r
-<p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">-d DIR \r
- / --target=DIR</font></span></b></p>\r
-\r
-<div class="whs8">\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The target directory SALOME platform is \r
- to be installed to. If used, this option overrides the default target \r
- directory, given in the configuration XML file (usually</font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B> \r
- ${HOME}/salome_<version></B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, \r
- see <a href="#xml_files"\r
- style="font-size: 12pt;">here</a> for more details). </font></span>\r
-</div>\r
-\r
-<p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">-t DIR \r
- / --tmp=DIR </font></span></b></p>\r
-\r
-<div class="whs8">\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The directory, which should be used for \r
- temporary files. If given, this option overrides the default temporary \r
- directory, given in the configuration xml file (usually </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>/tmp</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, see <a href="#xml_files"\r
- style="font-size: 12pt;">here</a> for \r
- more information). </font></span>\r
-</div>\r
-\r
-<p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">-a / --all-from-sources</font></span></b></p>\r
-\r
-<div class="whs8">\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Forces all the products to be installed \r
- from sources (including all SALOME modules). If this option is used, all \r
- default installation modes for all products are ignored.<br>\r
-This option is helpful when the user wants to install SALOME on the platform \r
- which is not officially supported. In this case, the user can try to run \r
- the SALOME Installation Wizard with the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>-a</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> option in order to build all the products from \r
- sources.</font></span><span style="font-weight: bold;\r
- font-size: 12pt;\r
- color: #ff0000;"><font size=3 color=red style="font-size:12.000000pt;"><B><br>\r
-Note, that this is a time-consuming operation which can take more than \r
- 24 hours depending on the computer.</B></font></span><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span>\r
-</div>\r
-\r
-<p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">-h / --help</font></span></b></p>\r
-\r
-<div class="whs8">\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Prints help information on the Installation \r
- Wizard's use. </font></span>\r
-</div>\r
-\r
-<p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">-v / --version</font></span></b></p>\r
-\r
-<div class="whs8">\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Prints version information (</font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>Note: </B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">this \r
- is the Installation Wizard's version number, not the number of SALOME \r
- platform version). </font></span>\r
-</div>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The installation procedure supports different \r
- </font></span><span style="font-size: 12pt; color: rgb(0, 0, 153);"><font size=3 style="font-size:12pt;">Linux </font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">platforms and installs various installation 3d-party \r
- prerequisite products which are required by SALOME platform. As it was \r
- mentioned above, the basic target platform for SALOME 3.0 and newer is \r
- </font></span><span style="font-size: 12pt; color: rgb(0, 0, 153);"><font size=3 style="font-size:12pt;">Linux Mandrake \r
- 10.1</font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">.<br>\r
-Use of configuration XML files gives a flexible way to modify the list \r
- of products to be installed by the Installation Wizard without changing \r
- the program source code. Just create your own XML configuration file and \r
- implement installation scripts for the prerequisite products you need \r
- and then use this XML file with the Installation Wizard. This can be done, \r
- for example, for some </font></span><span style="font-size: 12pt; color: rgb(0, 0, 153);"><font size=3 style="font-size:12pt;">Linux \r
- </font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">platform which is not supported \r
- directly by the Installation Wizard. See </font></span><a href="#xml_files"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Modifying XML configuration file</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><a href="#new_products"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Implementing \r
- installation scripts for the new products</font></span></a><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- sections for more information. </font></span></p>\r
-\r
-<h3 class="whs9"><a name=gui_mode></a>GUI mode</h3>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The </font></span><font style="color: #ff0000;"\r
- color=#FF0000><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Installation Wizard</font></span></font><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- GUI has been developed using </font></span><span style="font-size: 12pt; color: rgb(0, 0, 153);"><font size=3 style="font-size:12pt;">Trolltech's \r
- </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>Qt 3.0.5 </B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">toolkit. After launching the Installation Wizard \r
- in the GUI mode the wizard window is shown to the user. This wizard guides \r
- the user through several subsequent pages. To navigate between the pages \r
- use </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Next"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Back"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> buttons in the lower part of the wizard window. \r
- The </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Cancel"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> button closes the wizard window and quits \r
- the installation procedure after the user's confirmation. The </font></span><i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Help"</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- button opens an additional window to show help information. </font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The first "</font></span><span style="font-style: italic; font-size: 12pt;"><font size=3 style="font-size:12pt;"><I>Introduction"</I></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> page is shown in </font></span><a href="#IntroPage"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Figure 1</font></span></a><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. \r
- Skip this page by clicking </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Next"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">: </font></span></p>\r
-\r
-<a name=IntroPage></a>\r
-\r
-<p align="center" class="whs1"> </p>\r
-\r
-<p align="center" class="whs1"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><img alt="Intro page" src="intropage.png" width="586px" height="364px" border="0" class="img_whs10"> </font></span></p>\r
-\r
-<p align="center" class="whs1"><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Figure \r
- 1:</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> "Introduction" \r
- page</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">In the second page you are proposed to \r
- enter the target directory where the SALOME platform should be installed \r
- to. You can also click </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Browse..."</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and choose the destination folder using the \r
- standard browse directory dialog box. <br>\r
-If the directory you want to install products to does not exist you are \r
- prompted to confirm directory creation. If you type a wrong directory \r
- path, or if you do not have write permissions for the directory you use, \r
- the corresponding message box is shown.</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">You can also change the temporary directory \r
- (which is used to store temporary files required for the installation).<br>\r
-In the bottom part of the window the total disk space required for the \r
- installation and for the temporary files is displayed (see below for more \r
- details).</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">In the GUI mode the Installation Wizard \r
- provides two different options to install the SALOME platform: </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>basic</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- (default option) and </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>advanced.</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> In the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>basic</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> mode the user should enter the target installation \r
- directory and temporary folder. All other installation options are taken \r
- from the XML configuration file (see </font></span><a href="#Product_page1"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Fig.2</font></span></a><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">):</font></span></p>\r
-\r
-<a name=Product_page1></a>\r
-\r
-<p align="center" class="whs1"> </p>\r
-\r
-<p align="center" class="whs1"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><img alt="Intro page" src="productpage1.png" width="586px" height="364px" border="0" class="img_whs10"> </font></span></p>\r
-\r
-<p align="center" class="whs1"><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Figure \r
- 2:</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> "Installation settings" \r
- </font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">In addition, you have a choice to use \r
- "Install all products from sources" check box. If this option \r
- is turned on, all the products will be installed from the sources (using \r
- their own build procedures). This check box corresponds to the </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>--all-from-sources</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> (</font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>-a</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">) option of the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>runInstall</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> script (see </font></span><a href="#install_from_wizard"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">here</font></span></a><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">). \r
- </font></span></p>\r
-\r
-<p class="whs11"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><img src="../note1.gif" x-maintain-ratio="TRUE" width="35px" height="37px" border="0" class="img_whs12"></font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B> \r
- Installation of all products from sources is a long-time operation.</B></font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">To switch to the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>advanced</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> option, click </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"More..."</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> (see </font></span><a href="#ProductPage2"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Fig.3</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> ).</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">In the advanced mode you have a possibility \r
- to select products to be installed. Each product can have several options \r
- of installation: you have a possibility to use the native product (provided \r
- with Linux distribution and installed in the system folders), install \r
- already precompiled binaries, build the product from sources or not install \r
- it at all. Available options and default option are taken from the XML \r
- configuration file. You can mark the products you want to install by clicking \r
- the corresponding radio-buttons in the list view in the left part of the \r
- page. <br>\r
-Note, that some products may require some other pre-requisite products \r
- to be installed (or these prerequisite products should be already available \r
- on your computer). The installation procedure has a special feature to \r
- automatically mark these products in the list view. For example, in order \r
- to install </font></span><b><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">PyQt</font></span></i></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> it is necessary to have </font></span><b><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">gcc, \r
- Python</font></span></i></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">,</font></span><b><i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> Qt</font></span></i></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- and </font></span><b><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Sip</font></span></i></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> installed. Therefore all these products will \r
- also be turned \r
- on when you check on </font></span><b><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">PyQt</font></span></i></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. This feature can be switched off by clicking \r
- the </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Automatic dependencies"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> checkbox. Turn on this checkbox if you want \r
- all prerequisite products to be automatically checked when you select \r
- some product to be installed. Turn off this checkbox if you want to disable \r
- this feature.</font></span></p>\r
-\r
-<a name=ProductPage2></a>\r
-\r
-<p align="center" class="whs1"> </p>\r
-\r
-<p align="center" class="whs1"><img src="productpage.png" alt="Products page" width="586px" height="525px" border="0" class="img_whs13"> </p>\r
-\r
-<p align="center" class="whs1"><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Figure \r
- 3:</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> "Installation settings" \r
- page in the 'advanced' mode</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">If you want to use native products (like \r
- </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>gcc</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>tcl</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, etc.), select </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"use \r
- native" </font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">option. <br>\r
-Special button in the right part of the page - </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Unselect \r
- All" </font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">- allows to reset \r
- quickly all products to the </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"not \r
- install"</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> state. </font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">There are also two checkboxes on this \r
- page: </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"SALOME sources"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"SALOME \r
- binaries"</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. These three-state \r
- checkboxes allow quick selecting/unselecting sources/binaries packages \r
- of SALOME modules for installation.</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">In addition, when some SALOME sources \r
- are selected, one more check box becomes available: </font></span><span style="font-style: italic; font-size: 12pt;"><font size=3 style="font-size:12pt;"><I>"Build \r
- SALOME sources"</I></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. If this option \r
- is turned on, the selected SALOME modules will be built and installed \r
- from sources.</font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><br>\r
- </B></font></span></p>\r
-\r
-<p class="whs11"><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"> If this check \r
- box is turned on, the corresponding SALOME module binaries package installation \r
- is disabled, because of SALOME \r
- module sources and binaries packages conflict </B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">(see \r
- </font></span><a href="#ProductPage3"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Fig. 4</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> below). </font></span></p>\r
-\r
-<a name=ProductPage3></a>\r
-\r
-<p align="center" class="whs1"><img src="productpage2.png" alt="Products page" width="586px" height="525px" border="0" class="img_whs15"> </p>\r
-\r
-<p align="center" class="whs1"><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Figure \r
- 4:</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> "Build SALOME sources" \r
- check box usage</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The box at the right side of the page \r
- displays the information about currently highlighted product: name, version \r
- and short description, required disk space, disk space required for temporary \r
- files, list of prerequisites (this information is provided in the XML \r
- file) and current user choice. </font></span></p>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Disk \r
- space required:"</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> field \r
- displays how much disk space on the hard drive is required for installation \r
- of selected products. </font></span>\r
-\r
-<p class="whs11"><b \r
- style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"></font></span></b><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>Please, \r
- take into account that the displayed amount of required disk space is \r
- approximate and may differ when you install products on your hard drive.</B></font></span><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The installation procedure uses a special \r
- directory to store temporary files. The </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Space \r
- for temporary files:"</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> field \r
- shows the information about required disk space on the hard drive for \r
- extracting and compiling the selected products. You can change the temporary \r
- directory - just type a path to the folder you want to use or click on \r
- the corresponding </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Browse..."</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> button. </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><br>\r
- </B></font></span></p>\r
-\r
-<p class="whs11"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><b style="font-weight: bold;"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"></b></font></span><b><span \r
- style="font-weight: normal; font-size: 12pt;"><font size=3 style="font-size:12pt;">A</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">ctually, \r
- temporary files are not stored directly in the directory entered by the \r
- user. The Installation Wizard creates an additional folder in this directory \r
- named something like INSTALLWORK</font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>XXXXX</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> where XXXXX is a unique number. This allows \r
- to launch several Installation Wizards simultaneously. This temporary \r
- directory is removed automatically when the installation finishes.</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The installation procedure also checks \r
- the available disk space. If there is not enough disk space on your hard \r
- drive you will see a corresponding error message box. </font></span></p>\r
-\r
-<p class="whs11"><b \r
- style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14">You are strongly recommended not to use directory names containing \r
- spaces. </font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Otherwise you can experience \r
- some troubles with the installation.</font></span><b><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span></b></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">To proceed further click </font></span><i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Next"</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. \r
- At this moment the program will make some tests to check installation \r
- settings: if there is enough disk space on the hard drive, check for native \r
- products installation, dependencies (prerequisites) for each product you \r
- have selected to be installed. If any test fails you will see the corresponding \r
- warning message box. Otherwise the wizard will proceed to the next page: \r
- </font></span></p>\r
-\r
-<a name=ChoicePage></a>\r
-\r
-<p align="center" class="whs1"> </p>\r
-\r
-<p align="center" class="whs1"><img src="choicepage.png" alt="Choice page" width="586px" height="485px" border="0" class="img_whs16"> </p>\r
-\r
-<p align="center" class="whs1"><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Figure \r
- 5:</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> "Check your choice" \r
- page</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This page summarizes the installation \r
- options you've made on the previous pages. You can check again your choice \r
- and change it if necessary by getting back to the previous page. <br>\r
-When you are sure that everything is OK, click </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Next"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> to follow to the </font></span><a href="#ProgressPage"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">next page</font></span></a><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. \r
- </font></span></p>\r
-\r
-<a name=ProgressPage></a>\r
-\r
-<p align="center" class="whs1"> </p>\r
-\r
-<p align="center" class="whs1"><img alt="Progress page" src="progresspage1.png" width="586px" height="364px" border="0" class="img_whs10"></p>\r
-\r
-<p align="center" class="whs1"><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Figure \r
- 6:</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> "Installation progress" \r
- page</font></span></p>\r
-\r
-<p class="whs17"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">To start \r
- installation of the selected products click "Start". It launches \r
- the shell installation script and you will be able to see the output of \r
- the script in the dialog \r
- topmost frame. If any errors occur during the installation progress the \r
- corresponding messages will be printed to the log window in bold red font.</font></span></p>\r
-\r
-<p class="whs17"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">It is possible \r
- to break the installation at any time by clicking "Stop". Then \r
- you can get back to the previous pages if you wish to change installation \r
- settings or restart installation by pressing again "Start" button.</font></span></p>\r
-\r
-<p class="whs11"><b><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"> I</B></font></span></b><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>n the current implementation \r
- it is not possible to resume the stopped installation process; it will \r
- be re-started from the very beginning.</B></font></span><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span></p>\r
-\r
-<a name=ProgressPage1></a>\r
-\r
-<p align="center" class="whs1"> </p>\r
-\r
-<p align="center" class="whs1"><img alt="Progress page" src="progresspage.png" width="586px" height="364px" border="0" class="img_whs10"> </p>\r
-\r
-<p align="center" class="whs1"><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Figure \r
- 7:</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> "Installation progress" \r
- page: installation in progress</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Installation \r
- Status"</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> frame window shows \r
- you the progress of installation. "</font></span><font style="color: #ff0000;"\r
- color=#FF0000><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Waiting</font></span></font><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">" \r
- status means that installation of this product has not been started yet. \r
- The product currently being installed is marked as "</font></span><font \r
- style="color: #ff9900;"\r
- color=#FF9900><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Processing</font></span></font><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">". All installed products have "</font></span><font \r
- style="color: #33ff33;"\r
- color=#33FF33><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Completed</font></span></font><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">" status. </font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">You can abort installation and close \r
- the installation procedure using </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Cancel"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> button. </font></span></p>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> </font></span>\r
-\r
-<p class="whs11"><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><b style="font-weight: bold;"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14">T</b>his button sends the signal "SIGTERM" to the \r
- shell script. The script tries to clear all temporary files. The process \r
- of removing temporary files can take some time, so the installation wizard \r
- will wait 3 seconds before closing.</B></font></span><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">At the end of installation (all selected \r
- products have been installed successfully) you can go back to the previous \r
- pages to start a new installation or click </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Next" \r
- </font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">to go the Readme page: </font></span></p>\r
-\r
-<a name=readmepage></a>\r
-\r
-<p align="center" class="whs1"> </p>\r
-\r
-<p align="center" class="whs1"><img alt="Read page" src="readmepage.png" width="586px" height="484px" border="0" class="img_whs18"> </p>\r
-\r
-<p align="center" class="whs1"><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Figure \r
- 8:</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> "Finish installation" \r
- page</font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">In this page you can read important information \r
- about the Instalation Wizard itself and some tips: how to run and test \r
- SALOME or how to build SALOME from the sources. This is the contents of \r
- the README file which you can find in the root directory of the Installation \r
- Wizard. <br>\r
-You can also launch SALOME Desktop from this page or read the Release Notes \r
- file by clicking on the corresponding buttons in the lower part of the \r
- page (see </font></span><a href="#xml_files"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">here</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><a href="#finish_buttons"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">here</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> for more information about customizing these \r
- buttons).</font></span></p>\r
-\r
-<h3 class="whs9"><a name=batch_mode></a>Batch mode</h3>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">To launch the Installation Wizard in \r
- the batch mode use </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>-b</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> (</font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>--batch</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">) parameter.<br>\r
-In this mode the GUI wizard is not shown but all the installation status \r
- is displayed directly in the console. In the batch mode the user does \r
- not have a possibility to change installation settings which are given \r
- in the configuration file, except target and temporary directories which \r
- can be overridden by the corresponding command line options.<br>\r
-The only exception is </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>--all-from-sources</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> (</font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>-a</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">) option which enables special installation mode \r
- in which all the products (including SALOME modules) are installed from \r
- sources, ignoring the default mode defined in the XML configuration file \r
- (see </font></span><a href="#install_from_wizard"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">here</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> for details).</font></span></p>\r
-\r
-<p align="center" class="whs1"> <a \r
- name=BatchMode></a><br>\r
-<br>\r
-<img alt="Batch mode" src="batchmode.png" width="660px" height="410px" border="0" class="img_whs19"> </p>\r
-\r
-<p align="center" class="whs1"><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Figure \r
- 9:</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> Batch mode</font></span></p>\r
-\r
-<h3 class="whs9"><a name=env_files></a>Environment files</h3>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">During the process of installation the \r
- script creates some environment files to simplify the procedure of launching \r
- SALOME. These shell scripts set all necessary environment variables for \r
- all products you have installed. To learn how installation scripts collects \r
- the environment, see </font></span><a href="#pick_up_env"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">here</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. These files are: </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">salome.csh</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> + </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">salome.sh</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> in the </font></span><span style="font-style: italic;\r
- font-weight: bold;\r
- font-size: 12pt;"><font size=3 style="font-size:12pt;"><I><B>KERNEL \r
- module</B></I></font></span><b><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> sources</font></span></i></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><span style="font-style: italic;\r
- font-weight: bold;\r
- font-size: 12pt;"><font size=3 style="font-size:12pt;"><I><B>KERNEL \r
- module</B></I></font></span><b><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> binaries</font></span></i></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> root directories and </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">env_products.csh</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> + </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">env_products.sh \r
- </font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">and </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>env_build.csh \r
- </B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">+ </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>env_build.sh</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> in the target installation directory.</font></span></p>\r
-\r
-<p class="whs11"><b><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"></B></font></span></b><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>Note:</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- there is some difference between these files: </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>env_build.*</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> files are optimized to be used for building \r
- SALOME modules from sources (see </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>README \r
- </B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">file provided with the installation \r
- procedure on the CD). The </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>env_products.*</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> (and</font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B> \r
- salome.*</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">) files are optimized for \r
- SALOME launching. The behavior is defined by the environment variable</font></span><span \r
- style="font-weight: bold; font-size: 12pt;"> <font size=3 style="font-size:12pt;"><B></B></font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">ENV_FOR_LAUNCH</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> which is set to </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>0</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> in env_build.* files and to </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>1</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> in env_products.* (salome.*) files. </font></span></p>\r
-\r
- <br>\r
-\r
-\r
-<hr class="whs7">\r
-\r
-\r
-<h3><a name=check_version_proc></a>Notes on<font style="color: #ff0000;"\r
- color=#FF0000> check products \r
- version</font> procedure</h3>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Unfortunately there is no exact algorithm \r
- to identify the product version under Linux platform. The information \r
- in this section gives an idea how the version is checked for the native/preinstalled \r
- products (this information refers to the base platform </font></span><span style="font-size: 12pt; color: rgb(0, 0, 153);"><font size=3 style="font-size:12pt;">Linux \r
- Mandrake 10.1</font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">; and the same algorithms \r
- are used for other platforms). <br>\r
-The general rule for all products is that the path to the binaries should \r
- be set via the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable, path to the libraries \r
- should be set via the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>LD_LIBRARY_PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> variable and the python modules should be available \r
- via the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PYTHONPATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> variable. </font></span>\r
-\r
-<p class="whs11"><b><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"></B></font></span></b><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>Note:</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- the information given in this section refers to the prerequisite products \r
- for SALOME version 3.2.4. </font></span></p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">gcc 3.4.1</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is checked by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>gcc -dumpversion</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> command. The </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>gcc</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> executable should be in the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable. Version should be equal \r
- to "3.4.1". It is recommended to use native gcc on Mandrake \r
- 10.1. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">tcl/tk 8.4.5</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number for </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>tcl/tk</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> can be found in tclConfig.sh and tkConfig.sh \r
- files (</font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>TCL_VERSION</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>TK_VERSION</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> variables correspondingly). Version number should \r
- be equal to "8.4" (release number is not checked). <br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>TCLHOME</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable to the root directory of \r
- tcl/tk installation.<br>\r
-It is recommended to use native tcl/tk on Mandrake 10.1. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">boost 1.31.0</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is defined by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>version.hpp</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- file which is part of the boost distribution. This file defines the </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>BOOST_VERSION</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> macro which should be equal to "103100". \r
- In addition the existence of boost libraries is checked. <br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>BOOSTDIR</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable if you have a preinstalled \r
- version of boost. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Python 2.3.4</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is checked by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>python -V</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- command. The </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>python</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> executable should be in the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable. Version number should \r
- be equal to "2.3.4". It is recommended to use native Python \r
- on Mandrake 10.1.<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PYTHONHOME</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable if you have a preinstalled \r
- version of Python. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Swig 1.3.24</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is checked by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>swig -version</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> command. The </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>swig</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> executable should be in the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable. Version number should \r
- be equal to "1.3.24". </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Qt 3.3.3</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is defined by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>qglobal.h</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- file which is part of the Qt distribution. This file defines </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>QT_VERSION_STR</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> macro which should be equal to "3.3.3". \r
- It is recommended to use native Qt on Mandrake 10.1.<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>QTDIR</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable if you have a preinstalled \r
- version of qt. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">msg2qm</font></span></li>\r
-</ul>\r
-\r
-<span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>msg2qm</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- is a Qt tool which is used to convert text *.po files to *.qm resource \r
- files. Unfortunately this tool is not included to the Linux distribution \r
- and provided only in Qt sources package. This is the reason why this tool \r
- is supplied with the SALOME Installation Wizard.<br>\r
-There is no way to check the version number of msg2qm tool. Just set </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>MSG2QM_ROOT</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- environment variable if you have a preinstalled version of msg2qm tool. \r
- </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Open CASCADE 6.1.2a2</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is defined by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>Standard_Version.hxx</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> file which is part of the Open CASCADE distribution. \r
- This file defines </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>OCC_VERSION_MAJOR,</B></font></span><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>OCC_VERSION_MINOR</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>OCC_VERSION_MAINTENANCE</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> macros which should refer to version 6.1.2.<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>CASROOT</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable if you have a preinstalled \r
- version of Open CASCADE. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">qwt 4.2.0/0.4.2</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is defined by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>qwt_global.h</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- file which is part of the qwt distribution. This file defines </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>QWT_VERSION_STR</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> macro which should be equal to "4.2.0".<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>QWTHOME</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable if you have a preinstalled \r
- version of qwt. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">hdf 5-1.6.4</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is defined by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>libhdf5.settings</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> file which is part of the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>hdf5</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> distribution. Version should be equal to 1.6.4.<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>HDF5HOME</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable if you have a preinstalled \r
- version of hdf5. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">med 2.2.3</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Unfortunately there is no formal way to \r
- check med version number. We check existence of libmed.so.1.0.2 library \r
- on the computer. If you have any problem with a preinstalled version of \r
- med, please, reinstall it.<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>MED2HOME</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable if you have a preinstalled \r
- version of med. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Vtk 4.2.6</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Unfortunately there is no formal way to \r
- check VTK version number. We just check the existence of </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>libvtkCommon.so</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> library on the computer and hope that it is \r
- of version we need. If you have any problem with a preinstalled version \r
- of Vtk, please, reinstall it.<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>VTKHOME</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable if you have a preinstalled \r
- version of Vtk. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">OmniORB 4.0.5, OmniORBpy \r
- 2.5, OmniNotify 2.1</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">We just check existence of some omniORB \r
- libraries and executable on the computer, like </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>libomniORB4.so.0.5</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>_omnipymodule.so.2.4</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>libCOSNotify4.so.0.1</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>notifd</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">.<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>OMNIORBDIR</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable if you have a preinstalled \r
- version of omniORB products. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">sip 4.1</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is checked by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>sip -V</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- command. The </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>sip</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> executable should be in the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable. Version number should \r
- be equal to "4.1".<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>SIPDIR</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable to the directory where \r
- you have sip executable preinstalled. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">PyQt 3.13</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is defined by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>pyqtconfig.py</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> Python module file which is part of the </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PyQt</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- distribution. Version should be equal to "3.13".<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PYQTDIR \r
- </B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">environment variable if you have \r
- a preinstalled version of PyQt. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">netgen 4.5</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Unfortunarely we can't find anything about \r
- netgen version. We just check if </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>NETGENROOT</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable is set.<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>NETGENROOT</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable if you have a preinstalled \r
- version of netgen mesher. </font></span>\r
-\r
-<br><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> </font></span>\r
-\r
-<p class="whs11"><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><b style="font-weight: bold;"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"></b>Note: </B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">netgen 4.5 \r
- provided with the SALOME installation Wizard has been patched to improve \r
- its performance. </font></span></p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Numeric 23.7</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is checked by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>python -c 'import Numeric; \r
- print Numeric.__version__'</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> command. \r
- The </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>python</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> executable should be in the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable and </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>Numeric</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> module should be available for the Python (for \r
- example it should be in the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PYTHONPATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable). Version number should \r
- be equal to "23.7". If you have any problem with a preinstalled \r
- version of Numeric 23.7, please, reinstall it.<br>\r
-Add the directory where you have a preinstalled version of Numeric \r
- package to the the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PYTHONHOME \r
- </B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">environment variable. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">graphviz 2.2.1</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is checked by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>dot -V</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- command. The </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>dot</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> executable should be in the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable. Version number should \r
- be equal to "2.2.1".<br>\r
-Add </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>graphviz</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> bin directory to the the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">doxygen 1.4.6</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Version number is checked by </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>doxygen --version</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> command. The </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>doxygen</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> executable should be in the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable. Version number should \r
- be equal to "1.4.6". </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-weight: bold;\r
- font-size: 12pt;\r
- color: rgb(0, 0, 153);"><font size=3 style="font-size:12pt;"><B>SALOME </B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">module </font></span><span style="font-weight: bold;\r
- font-size: 12pt;\r
- color: rgb(0, 0, 153);"><font size=3 style="font-size:12pt;"><B>sources</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> (3.2.4).</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">For each SALOME module sources package (KERNEL, \r
- GUI, GEOM, etc...) the root directory contains file configure.in (configure.ac) \r
- which defines version information.<br>\r
-Set the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><MODULE>_SRC_DIR</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable for each SALOME </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>MODULE</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- sources package installed (where </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>MODULE</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> is KERNEL, GUI, GEOM, ...). </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><span style="font-weight: bold;\r
- font-size: 12pt;\r
- color: rgb(0, 0, 153);"><font size=3 style="font-size:12pt;"><B>SALOME </B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">module </font></span><span style="font-weight: bold;\r
- font-size: 12pt;\r
- color: rgb(0, 0, 153);"><font size=3 style="font-size:12pt;"><B>binaries \r
- </B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">(3.2.4)</font></span></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">For each SALOME module binaries package \r
- (KERNEL, GUI, GEOM, etc...) the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>bin/salome</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> directory contains file </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>VERSION</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> which defines version information.<br>\r
-Set </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><MODULE>_ROOT_DIR</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> environment variable for each SALOME </font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>MODULE</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- binaries package installed (where </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>MODULE</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> is KERNEL, GUI, GEOM, ...). </font></span>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">If you have native products installed \r
- to directories different from default ones (not </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">/usr/bin</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">/usr/lib</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">...), it is recommended to follow the above mentioned \r
- instructions. Or you should properly set </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>LD_LIBRARY_PATH</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> variables </font></span><b><font style="color: #ff0000;"\r
- color=#FF0000><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">before</font></span></font></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- starting the Installation Wizard. Otherwise the installation script will \r
- fail to find preinstalled/native products. </font></span></p>\r
-\r
-<p class="whs11"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><b style="font-weight: bold;"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"></b></font></span><b \r
- style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Note:</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> for some native products (e.g. gcc, Python) \r
- the rules of version checking are not so strict as described above. Only \r
- major and minor version numbers should coincide with the prerequisite. \r
- Newer version of the product can also be used. If some native product \r
- has version number larger than that required by the installation procedure, \r
- the user will be prompted by the warning message like this: </font></span><i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"You have newer version of gcc installed \r
- on your computer than that is required (3.4.1). Continue?"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. You can click </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Yes"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> to proceed with the installation but in this \r
- case you should be aware of what you are doing. SALOME binaries (including \r
- other products) are compiled with the predefined prerequisites and most \r
- likely can not be run successfully if these products are not found. This \r
- can be helpful only if you plan to build all products from sources. </font></span></p>\r
-\r
-\r
-<hr class="whs7">\r
-\r
-\r
-<h3><a name=pick_up_env></a>Pick up the <font style="color: #ff0000;"\r
- color=#FF0000>environment</font></h3>\r
-\r
-P<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">lease, read the following information carefully \r
- . This section describes how the installation procedure generates the \r
- environment scripts for the SALOME platform being installed. </font></span>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">After installing each product shell the \r
- script creates a special environment file for the product in its installation \r
- folder. The name of the file is generated from the name of product by \r
- the following scheme: </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">env_<product_name>.sh</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> (for example </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">env_Vtk.sh \r
- </font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">for the Vtk). This file includes \r
- all necessary environment settings. At the final step of the installation \r
- the script picks up all the settings files and generates two common environment \r
- files from them: </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">salome.sh</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">salome.csh \r
- </font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">for </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>bash</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>csh</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> shells correspondingly. Such approach helps \r
- to save time when reinstalling products and you may not bother about setting \r
- all environment variables manually to build/launch SALOME. What you simply \r
- need is to source one of these environment files. </font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This also concerns those products which \r
- are not being installed. For example, you install some SALOME binaries \r
- to the directory where you have previously installed other products. \r
- The Installation procedure tries to collect environment files from the \r
- target directory if it finds necessary products installed there. If some \r
- product is not found in the target directory the corresponding section \r
- of </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">salome.sh/salome.csh</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> files will be skipped. <br>\r
-For native products (like </font></span><i><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">gcc, \r
- tcl, etc...)</font></span></b></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> the installation \r
- procedure tries to find them first using </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">PATH</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> / </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">LD_LIBRARY_PATH</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> variables and then in the system default directories \r
- (</font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">/usr/bin, /usr/lib</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> etc., depending on the product). </font></span></p>\r
-\r
-<p><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">In any case you may edit </font></span><b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">salome.*</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- files after the installation procedure finishes, if you want.</font></span></p>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> </font></span>\r
-\r
-<p class="whs11"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><b style="font-weight: bold;"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"></b></font></span><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>Note:</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- as it was mentioned </font></span><a href="#env_files"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">above</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> there are other environment files which are \r
- generated by the installation procedure: </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>env_products.csh</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> + </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>env_products.sh</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>env_build.csh</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> + </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>env_build.sh</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. These files can be found in the target installation \r
- root directory.</font></span></p>\r
-\r
- <br>\r
-\r
-\r
-<hr class="whs7">\r
-\r
-\r
-<h3><a name=xml_files></a>Modifying <font style="color: #ff0000;"\r
- color=#FF0000>XML</font> configuration \r
- <font style="color: #ff0000;"\r
- color=#FF0000>file</font></h3>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">You can create your own XML configuration \r
- file. The Installation Wizard can then take it as a command line argument \r
- to provide a list of products you want to install with it. The list of \r
- products and some other settings for the Installation Wizard are provided \r
- in the XML file. The default file which Installation Wizard looks for \r
- if no command line arguments are given, is </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">config.xml</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">.<br>\r
-This section describes the structure of the configuration file. <br>\r
-XML tags are in bold blue, optional sections/tags are in brackets. </font></span>\r
-\r
-<p><font style="font-family: Courier;"\r
- face=Courier><b style="font-weight: bold;"><font style="color: #000099;"\r
- color=#000099><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><document></font></span></font></b><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- </font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">[</font></span></font><b><font \r
- style="color: #000099;"\r
- color=#000099><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> <config</font></span></font></b><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> [ version=<install_wizard_version> \r
- ]</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- [ \r
- caption=<install_wizard_caption> ]</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- [ \r
- copyright=<install_wizard_copyright> ]</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- [ \r
- license=<install_wizard_license_info> ]</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- [ \r
- os=<target_platform> ]</font></span></font><b><font style="color: #000099;"\r
- color=#000099><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- /></font></span></font></b><font style="color: #000000;"\r
- color=#000000><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"><br>\r
- ]</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font \r
- style="color: #000000;"\r
- color=#000000><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- </font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">[ </font></span></font><b><font \r
- style="color: #000099;"\r
- color=#000099><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><path</font></span></font></b><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> [ targetdir=<target_directory> \r
- ]</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- [ \r
- tempdir=<temp_directory> ]</font></span></font><b><font \r
- style="color: #000099;"\r
- color=#000099><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- /> </font></span></font></b><font style="color: #000000;"\r
- color=#000000><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- ]</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font \r
- style="color: #000000;"\r
- color=#000000><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- </font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">[ </font></span></font><b><font \r
- style="color: #000099;"\r
- color=#000099><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><button</font></span></font></b><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> label=<button_label> </font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- \r
- [ tooltip=<button_tooltip> ]</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- \r
- script=<button_script> </font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- \r
- [ disable=<disable_flag> ]</font></span></font><b><font \r
- style="color: #000099;"\r
- color=#000099><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- /> </font></span></font></b><font style="color: #000000;"\r
- color=#000000><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- ]</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- [</font></span></font><b><font style="color: #000099;"\r
- color=#000099><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- <button</font></span></font></b><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- ... </font></span></font><font style="color: #000099;"\r
- color=#000099><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- /</font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">></font></span></b></font><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- ]</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- [</font></span></font><b><font style="color: #000099;"\r
- color=#000099><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- <product</font></span></font></b><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- name=<product_name></font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- \r
- version=<product_version></font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"><br>\r
- [ context=<product_context> \r
- ]<br>\r
- [ description=<product_description> \r
- ]</font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- \r
- install=<installation_mode></font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- \r
- supported=<supported_installation_modes></font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- [ \r
- disable=<disable_flag> ]<br>\r
- [ pickupenv=<pickup_env_flag> \r
- ]<br>\r
- \r
- dependancies=<list_of_prerequisites></font></span></font><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> </font></span><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- \r
- installdiskspace=<install_disk_space></font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- \r
- temporarydiskspace=<tmp_disk_space></font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- \r
- script=<installation_script_name></font></span></font><font style="color: #000099;"\r
- color=#000099><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- /</font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">></font></span></b></font><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"><br>\r
- ]</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- [</font></span></font><b><font style="color: #000099;"\r
- color=#000099><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- <product</font></span></font></b><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- ... </font></span></font><font style="color: #000099;"\r
- color=#000099><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- /</font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">></font></span></b></font><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"><br>\r
- ]<br>\r
- ...</font></span></font><b><font style="color: #000099;"\r
- color=#000099><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-</document></font></span></font></b><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span></font></p>\r
-\r
-<h4><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><config> \r
- section</font></span></font></h4>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This is an optional \r
- section; it provides general information about the Installation Wizard \r
- itself.<br>\r
-<br>\r
-Attributes:</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">version</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The application version \r
- number to be shown in the caption.</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">caption</font></span></b></font></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The application main window caption - if \r
- this string contains '%1' text the title will contain the version number \r
- in this place (see above). </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">copyright</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The application copyright \r
- information (shown in the first page).</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">license</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The application license \r
- information (shown in the first page).</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">os</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This parameter defines \r
- the directory (relative from ./Products/BINARIES) where the Installation \r
- Wizard will search precompiled binaries packages. If this tag is not provided, \r
- binaries packages are looked for in the ./Products/BINARIES directory.</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<h4><b style="font-weight: bold;"><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><path> \r
- section</font></span></font></b></h4>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This is an optional section; it defines \r
- default installation directories.</font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<br>\r
-Attributes:</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">targetdir</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The target directory \r
- - the path to the directory where products should be installed.</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">tempdir</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The temporary directory \r
- - the path to the directory for the temporary files.</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<h4><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><product> \r
- section</font></span></b></h4>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This section describes product to be installed \r
- with the Installation Wizard. The XML file should include a <product> \r
- section for each product to be installed. The products appear in the tree \r
- view and are installed in the order they are described in the configuration \r
- file. It is recommended (but not obligatory) to define native products \r
- at the top of the list before all other products.</font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<br>\r
-Attributes:</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">name</font></span></b></font></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Product name. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">version</font></span></b></font></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Product version. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">description</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Product description \r
- (optional).</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">context</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Context (optional). \r
- The possible values are </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">'salome \r
- sources'</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">'salome \r
- binaries'</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">'prerequisite'</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- (several contexts can be given separated by ":" symbol).</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">supported</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Supported modes of \r
- installation. Several modes can be separated by comma. Possible value \r
- are: </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">install sources</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">install \r
- binaries</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">use \r
- native</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">. The Installation script \r
- should contain the corresponding functions for each of the supported installation \r
- modes (see </font></span><a href="#new_products"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">here</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">).</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">install</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Default (starting) \r
- installation mode.</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">disable</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">If this optional flag \r
- has 'true' value, the corresponding product will not appear in the list \r
- of products and will not be installed.</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">pickupenv</font></span></b></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This flag points that pickup environment \r
- procedure should be performed for this product. If this flag equal to \r
- 'true', salome.sh and salome.csh files will be created in \r
- the product installation directory. Usually this option is set to true \r
- for SALOME KERNEL module sources and binaries package. This is an optional \r
- key, default value is 'false'</font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">.</font></span></b><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">dependancies</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">List of prerequisite \r
- products, which are necessary to build this product, separated by comma.</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">installdiskspace</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Total amount of space \r
- (integer, in Kbytes), which the product occupies on the hard drive after \r
- the installation.</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">temporarydiskspace</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Disk space (integer, \r
- in Kbytes) for temporary files, which is necessary to build the product \r
- from the sources.</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">script</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The installation script \r
- name. This script is in charge of the installation of the product. It \r
- is called automatically by the Installation Wizard when necessary from \r
- the main program. See the </font></span><a href="#new_products"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">next \r
- section</font></span></a><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> for more information.</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<h4><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><button> \r
- section</font></span></b></h4>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This is an optional section. It allows customization \r
- of the last </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Finish installation"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> page of the Installation Wizard by adding one \r
- or more buttons in the lower part of the wizard's window. The script which \r
- is attached to each such button, can perform some specific action, for \r
- example, launch the application or show the Release Notes file by using \r
- an external program. See </font></span><a href="#finish_buttons"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">here</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> for more details about writing scripts.</font></span><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<br>\r
-Attributes:</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">label</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This is the button \r
- text.</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">tooltip</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The button tooltip \r
- (optional).</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">script</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The script attached \r
- to the button.</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">disable</font></span></b></font></li>\r
-</ul>\r
-\r
-<p class="whs20"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">If \r
- this optional flag has 'true' value, the corresponding button will not \r
- appear in the </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Finish installation"</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> page - the section of XML file is silently ignored.</font></span><b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> </font></span></b></p>\r
-\r
-<p class="whs11"><b \r
- style="font-weight: bold;"><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"></B></font></span><span style="font-size:12pt; background-image:url('../texture_horiz_ltbluebubbles.jpg'); "><font size=3 style="font-size:12pt;">Note:</font></span></b><span style="font-size:12pt; background-image:url('../texture_horiz_ltbluebubbles.jpg'); "><font size=3 style="font-size:12pt;"> \r
- If you add new products to be installed with Installation Wizard, you \r
- should also provide installation script for this product. See the next \r
- section for more details. </font></span></p>\r
-\r
- <br>\r
-\r
-\r
-<hr class="whs7">\r
-\r
-\r
-<h3><a name=new_products></a>Implementing <font style="color: #ff0000;"\r
- color=#FF0000>installation \r
- scripts</font> for the new products</h3>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">When you want some product to be installed \r
- with the Installation Wizard, you should add its description </font></span><a \r
- href="#xml_files"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">to the configuration \r
- file</font></span></a><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and create the installation \r
- script, following the rules described in this section. <br>\r
-<br>\r
-There are some obligatory functions which should be implemented in this \r
- installation script. These functions are automatically called by the master \r
- installation script or/and its GUI shell when it is necessary.</font></span><font \r
- style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-File </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">common.sh</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> contains some service functions which can be \r
- used in your installation script, like </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">make_env()</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">,</font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> make_dir()</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">try_existing()</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">sort_path()</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">,</font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> find_in_path()</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, etc.</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">check_version()</font></span></b></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This function allows to check the version \r
- of the product already installed on the computer. It should try to find \r
- the product (native or preinstalled in the target directory) and check \r
- its version. This helps to avoid unnecessary reinstallation. This is an \r
- internal function and is not called from the master installation script. \r
- </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><b style="font-weight: bold;"><font style="color: #000000;"\r
- color=#000000><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">try_native()</font></span></font></b></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This function is called when the </font></span><i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">'use native' </font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">installation \r
- mode is selected by the user. The function should try to find a native \r
- version of the product and define possibility of its use. It should create \r
- the environment file for the product in the temporary directory (see also \r
- the description of </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">print_env(</font></span></b><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>)</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- function). It is not necessary to implement this function if you do not \r
- provide native mode installation. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">install_source()</font></span></b></font></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This function is called when the </font></span><i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">'install sources</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">' \r
- installation mode is selected by the user. The function is responsible \r
- for building the product from the sources package. It should create the \r
- environment file for the product in the temporary directory (see also \r
- description of </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">print_env(</font></span></b><span \r
- style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>)</B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- function). It is not necessary to implement this function if you do not \r
- provide sources mode installation. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">install_source_and_build()</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This function is called \r
- when SALOME module is installed and the </font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>--all-from-sources</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> (</font></span><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>-a</B></font></span><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">) option is used (</font></span><span style="font-style: italic; font-size: 12pt;"><font size=3 style="font-size:12pt;"><I>"Build \r
- SALOME sources"</I></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> check box in \r
- GUI mode). This function should be used to unpack SALOME sources package \r
- and then call the build/install procedure for it.<br>\r
-For more details please refer to the </font></span><a href="#install_from_wizard"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">this</font></span></a><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- and </font></span><a href="#gui_mode"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">this</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> sections for more details.</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">install_binary()</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This function is called \r
- when the </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">'install binaries'</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> installation mode is selected by the user. The \r
- function is responsible for the extracting of the product from the binaries \r
- package. It should create environment for the product in the temporary \r
- directory (see also description of </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">print_env(</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">) function). It is not necessary to implement \r
- this function if you do not provide binaries mode installation. </font></span></font>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">try_preinstalled()</font></span></b></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This function is called when</font></span><i><span \r
- style="font-style: normal; font-size: 12pt;"><font size=3 style="font-size:12pt;"> the</font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- 'not install'</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> installation mode \r
- is selected by the user. In this case the script should inspect the target \r
- directory to try to find an already preinstalled product, pick up and \r
- check the environment from there. See </font></span><a href="#pick_up_env"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">here</font></span></a><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- for more details. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- style="/*begin!kadov{{*/ color: #000000; /*}}end!kadov*/ "\r
- class=kadov-p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">print_env()</font></span></b></font></li>\r
-</ul>\r
-\r
-<font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This function is in \r
- charge of creating the environment script. It should create a file with \r
- name </font></span></font><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">env_<product_name>.sh</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> in the temporary directory and then copy it \r
- into the product installation directory. The file should contain all necessary \r
- environment variables settings for the product. It will be collected during \r
- the 'pick-up-environment' procedure. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">pickup_env()</font></span></b></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This procedure corresponds to the </font></span><b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">pickupenv</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- tag of the configuration xml file (see previous section). It should call \r
- the </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">make_env</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> procedure to perform the pick-up environment \r
- procedure for the product.</font></span><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<br>\r
-The calling signature of the product installation script is the following:</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><b><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<product_script_name> <function_name> <temp_folder> <products_directory> \r
- <target_directory> <dependancies> <product_name></font></span></font></b><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<p><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">where</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span></p>\r
-\r
-<p><font style="color: #000000;"\r
- color=#000000><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><product_script_name></font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> - installation script name (described in the \r
- configuration xml file);</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<function_name></font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> - the name \r
- of function, corresponding to the selected installation mode: </font></span><i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">try_native, install_source, install_binary</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> or </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">try_preinstalled</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">;</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<temp_folder></font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> - temporary \r
- files directory;</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font \r
- style="color: #000000;"\r
- color=#000000><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<products_directory></font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> - \r
- directory where the sources/binaries package can be found. You should \r
- provide the sources package in the </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><Install_Wizard_root_directory>/Products/SOURCES</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> directory and binaries package in the </font></span><i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><InstallWizard_root_directory>/Products/BINARIES/<os_version></font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">, where <os_version> is the target platform \r
- description, which appears in the corresponding section of the </font></span><a \r
- href="#xml_files"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">configuration xml file</font></span></a><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">.</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<target_directory></font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> - root \r
- target directory where the product should be installed to;</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<dependancies></font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> - single-quoted \r
- list of prerequisite products, separated by space;</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><font style="color: #000000;"\r
- color=#000000><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<product_name> </font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">- product \r
- name itself.</font></span></font><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span></p>\r
-\r
-<p><font style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Example:</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-med-2.2.3.sh install_binary /tmp/work ./Products/BINARIES/Mandrake10.1 \r
- /usr/salome 'gcc Hdf' med</font></span></i><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span></p>\r
-\r
-<p><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Copy the created script \r
- into the </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><Install_Wizard_root_directory>/config_files</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> sub-directory where all installation scripts \r
- are stored. Installation Wizard will automatically search and call your \r
- script during the installation procedure.</font></span></font><span style="font-size: 12pt;"> \r
- <font size=3 style="font-size:12pt;"></font></span></p>\r
-\r
-\r
-<hr class="whs7">\r
-\r
-\r
- \r
-\r
-<h3><a name=finish_buttons></a>Customizing <font style="color: #ff0000;"\r
- color=#FF0000>Readme page</font> \r
- buttons</h3>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">The Installation Wizard allows customizing \r
- the look-n-feel of the last </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Finish \r
- installation"</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> page. If \r
- you want to add one or more buttons to this page in order to perform some \r
- specific actions at the end of the installation (for example, to show \r
- the Release Notes file by using Open Office) you can put an additional \r
- section to the XML configuration file. This is the </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><button></font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> section (see </font></span><a href="#xml_files"><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">here</font></span></a><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- for more details). </font></span>\r
-\r
-<br><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> </font></span>\r
-\r
-<br><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;">To implement the action which will be performed \r
- when the user clicks the button, you need to create a script and put it \r
- to the </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><Install_Wizard_root_directory>/config_files</font></span></i><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> directory.<br>\r
-There are some obligatory functions which should be implemented in this \r
- script. These functions are automatically called by the Installation Wizard \r
- GUI. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">check_enabled()</font></span></b></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This procedure is called by the Installation \r
- Wizard when the </font></span><i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">"Finish \r
- installation"</font></span></i><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> page is displayed \r
- and the status of the buttons should be modified according to the installation \r
- options. This procedure should return </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">0</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> if the corresponding action can be performed \r
- and, thus, the button should become enabled. Otherwise, it should return \r
- </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">1</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- - in this case the corresponding button will be disabled. </font></span>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p\r
- class=kadov-p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">execute()</font></span></b></li>\r
-</ul>\r
-\r
-<span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">This procedure is invoked when the user \r
- clicks the button. This procedure should return </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">0</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> if the corresponding action is done successfully \r
- and </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">1</font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
- if any error occurs.<br>\r
-<br>\r
-The calling signature of the script is the following:</font></span><b><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<product_script_name> <function_name> <target_directory> \r
- <temp_folder></font></span></font></b><span style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span>\r
-\r
-<p><font style="color: #000000;"\r
- color=#000000><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">where</font></span></font><span \r
- style="font-size: 12pt;"> <font size=3 style="font-size:12pt;"></font></span></p>\r
-\r
-<p><b style="font-weight: bold;"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><product_script_name></font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> - the script name itself (retrieved from the \r
- XML configuration xml file); </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<function_name></font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> - the name \r
- of function; </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<target_directory></font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> - root \r
- target directory where the product is installed to; </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
-<temp_folder> </font></span></b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">- temporary \r
- files directory; </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><br>\r
- </font></span></b></p>\r
-\r
-<p class="whs11"><b \r
- style="font-weight: bold;"><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"></B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Note:</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> The standard Installation Wizard buttons "Launch \r
- SALOME" and "Release Notes" are implemented with this feature. \r
- Refer to scripts </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">start_salome.sh</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> and </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">release_notes.sh</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> for sample implementation.</font></span><b><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B><br>\r
-<br>\r
-<img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs14"></B></font></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Note:</font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> Any button (even standard) can be ignored by \r
- the Installation Wizard if the attribute </font></span><b><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><disable></font></span></b><span \r
- style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> in the XML configuration file is set to the \r
- "true" value. </font></span></p>\r
-\r
-\r
-<hr class="whs7">\r
-\r
-\r
- \r
-\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Running SALOME</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { font-family:'Times New Roman' , serif; }\r
-p.whs2 { margin-left:0px; font-style:italic; color:#000000; font-family:'Arial Black' , sans-serif; }\r
-p.whs3 { font-family:'Times New Roman' , serif; margin-left:0px; }\r
-p.whs4 { font-family:'Times New Roman' , serif; margin-left:40px; font-style:normal; color:#000000; }\r
-p.whs5 { font-family:'Times New Roman' , serif; color:#ff0000; font-style:italic; margin-left:40px; }\r
-p.whs6 { font-family:'Times New Roman' , serif; margin-left:40px; color:#000000; font-style:normal; }\r
-p.whs7 { font-family:'Courier New' , monospace; margin-left:0px; background-image:url('../texture_horiz_ltbluebubbles.jpg'); }\r
-img_whs8 { border:none; width:35px; height:37px; float:none; border-style:none; }\r
-p.whs9 { margin-left:0px; }\r
-p.whs10 { margin-left:40px; }\r
-p.whs11 { margin-left:40px; font-style:normal; color:#000000; font-weight:normal; font-family:'Times New Roman' , serif; }\r
-ul.whs12 { list-style:disc; }\r
-table.whs13 { x-cell-content-align:top; width:96.029%; border-left-style:Solid; border-left-width:1px; border-right-style:Solid; border-right-width:1px; border-top-style:Solid; border-top-width:1px; border-bottom-style:Solid; border-bottom-width:1px; border-left-color:#c0c0c0; border-right-color:#c0c0c0; border-top-color:#c0c0c0; border-bottom-color:#c0c0c0; border-spacing:0px; }\r
-col.whs14 { width:645px; }\r
-col.whs15 { width:421px; }\r
-tr.whs16 { x-cell-content-align:top; height:41px; }\r
-td.whs17 { width:645px; padding-right:10px; padding-left:10px; background-color:#400080; border-left-color:#c0c0c0; border-top-color:#c0c0c0; border-top-style:Solid; border-bottom-color:#c0c0c0; border-bottom-width:1px; border-bottom-style:Solid; border-right-color:#c0c0c0; border-right-width:1px; border-right-style:Solid; border-left-width:1px; border-left-style:Solid; border-top-width:1px; }\r
-p.whs18 { color:#ffffff; }\r
-td.whs19 { width:421px; padding-right:10px; padding-left:10px; background-color:#400080; border-top-color:#c0c0c0; border-top-style:Solid; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-width:1px; border-bottom-style:Solid; border-top-width:1px; border-right-width:1px; }\r
-td.whs20 { width:645px; padding-right:10px; padding-left:10px; border-left-color:#c0c0c0; border-bottom-color:#c0c0c0; border-bottom-width:1px; border-bottom-style:Solid; border-right-color:#c0c0c0; border-right-width:1px; border-right-style:Solid; border-left-width:1px; border-left-style:Solid; }\r
-td.whs21 { width:421px; padding-right:10px; padding-left:10px; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-width:1px; border-bottom-style:Solid; border-right-width:1px; }\r
-p.whs22 { font-weight:bold; }\r
-td.whs23 { width:645px; padding-right:10px; padding-left:10px; border-left-color:#c0c0c0; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-right-color:#c0c0c0; border-right-width:1px; border-right-style:Solid; border-left-width:1px; border-left-style:Solid; border-bottom-width:1px; }\r
-td.whs24 { width:421px; padding-right:10px; padding-left:10px; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-bottom-width:1px; border-right-width:1px; }\r
-td.whs25 { width:645px; padding-right:10px; padding-left:10px; border-left-style:Solid; border-left-width:1px; border-left-color:#c0c0c0; border-right-style:Solid; border-right-width:1px; border-right-color:#c0c0c0; border-bottom-width:1px; border-bottom-style:Solid; border-bottom-color:#c0c0c0; }\r
-td.whs26 { width:421px; padding-right:10px; padding-left:10px; border-right-width:1px; border-right-style:Solid; border-right-color:#c0c0c0; border-bottom-width:1px; border-bottom-style:Solid; border-bottom-color:#c0c0c0; }\r
-td.whs27 { width:645px; padding-right:10px; padding-left:10px; border-left-color:#c0c0c0; border-left-width:1px; border-left-style:Solid; border-right-color:#c0c0c0; border-right-width:1px; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-bottom-width:1px; }\r
-td.whs28 { width:421px; padding-right:10px; padding-left:10px; border-right-color:#c0c0c0; border-right-style:Solid; border-right-width:1px; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-bottom-width:1px; }\r
-p.whs29 { font-weight:bold; margin-left:0px; font-family:'Courier New' , monospace; background-image:url('../texture_horiz_ltbluebubbles.jpg'); }\r
-p.whs30 { font-family:'Times New Roman' , serif; margin-left:80px; }\r
-p.whs31 { font-family:'Courier New' , monospace; margin-left:0px; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs2 {margin-left:1pt; }";\r
- strNSS += "p.whs3 {margin-left:1pt; }";\r
- strNSS += "p.whs7 {margin-left:1pt; }";\r
- strNSS += "p.whs9 {margin-left:1pt; }";\r
- strNSS += "p.whs29 {margin-left:1pt; }";\r
- strNSS += "p.whs31 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("About SALOME\nRunning SALOME");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Running SALOME</h1>\r
-\r
-<p class="whs2">To launch SALOME:</p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs4">1. Install the SALOME package into a definite \r
- directory (ex. <span style="font-weight: bold;"><B>SALOME</B></span>) on your \r
- hard disk. It is preferable if you use the special installation procedure \r
- allowing to install the SALOME \r
- platform and all corresponding applications. </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs6">2.<span style="font-family: 'Courier New', monospace;"> \r
- </span>The installation shell script will create a special file: <b>salome.csh</b> \r
- (CShell file) in your <b><i><span style="font-style: normal; font-weight: bold;"><B>SALOME/KERNEL</B></span><span \r
- style="font-weight: normal; font-style: normal;"> </span></i></b>directory. \r
- This file contains all environment variables necessary for launching SALOME \r
- platform with other application products provided with SALOME installation \r
- package. You have a possibility to add one of them into your profile if \r
- you enter in the command console the following:</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs6"><span style="font-family: 'Courier New', monospace;">source \r
- salome.csh </span></p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs7"><img src="../tip1.gif" x-maintain-ratio="TRUE" width="35px" height="37px" border="0" class="img_whs8"> <span style="font-family: 'Times New Roman', serif;">During \r
- the installation procedure you have a possibility to set your profile \r
- automatically. </span> </p>\r
-\r
-<p class="whs9"> </p>\r
-\r
-<p> </p>\r
-\r
-<p class="whs10">3. Launch SALOME platform, using the following \r
- Python script located in the <span style="font-weight: bold;"><B>SALOME/KERNEL/bin/salome</B></span> \r
- directory:</p>\r
-\r
-<p class="whs11"> </p>\r
-\r
-<ul type="disc" class="whs12">\r
- \r
- <li class=kadov-p><p class="whs10"><span style="font-weight: bold;"><B>runSalome.py</B></span> \r
- [command line options]</p></li>\r
-</ul>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<table x-use-null-cells resizable="no" cellspacing="0" width="96.029%" class="whs13">\r
-<script language='JavaScript'><!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4)) document.write("</table><table x-use-null-cells resizable='no' cellspacing='0' width='96.029%' border='1' bordercolor='silver' bordercolorlight='silver' bordercolordark='silver'>");\r
-//--></script>\r
-<col class="whs14">\r
-<col class="whs15">\r
-\r
-<tr valign="top" class="whs16">\r
-<td bgcolor="#400080" width="645px" class="whs17">\r
-<p class="whs18">Options</td>\r
-<td bgcolor="#400080" width="421px" class="whs19">\r
-<p class="whs18">Description</td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td width="645px" class="whs20">\r
-<p><span style="font-weight: bold;"><B>--help</B></span> <span style="font-style: italic;"><I>or</I></span> \r
- <span style="font-weight: bold;"><B>-h</B></span> </td>\r
-<td width="421px" class="whs21">\r
-<p>print this help</p>\r
-<p> </td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td width="645px" class="whs20">\r
-<p><span style="font-weight: bold;"><B>--gui</B></span> <span style="font-style: italic;"><I>or</I></span> \r
- <span style="font-weight: bold;"><B>-g</B></span> </td>\r
-<td width="421px" class="whs21">\r
-<p>launch with GUI</td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td width="645px" class="whs20">\r
-<p> <span style="font-weight: bold;"><B><a \r
- name=batchmode></a>--terminal</B></span> <span style="font-style: italic;"><I>or \r
- </I></span><span style="font-weight: bold;"><B>-t</B></span> </td>\r
-<td width="421px" class="whs21">\r
-<p>launch without GUI in batch mode</td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs20">\r
-<p><span style="font-weight: bold;"><B>--logger</B></span> <span style="font-style: italic;"><I>or</I></span> \r
- <span style="font-weight: bold;"><B>-l</B></span> </td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs21">\r
-<p>redirects log \r
- messages in the file <span style="font-style: italic;"><I>logger.log</I></span></td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs20">\r
-<p class="whs22">--file=<FILE> <span style="font-weight: normal; font-style: italic;"><I>or</I></span> \r
- -f=<FILE></td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs21">\r
-<p>redirects log \r
- messages in a custom file</td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs20">\r
-<p><span style="font-weight: bold;"><B>--xterm</B></span> <span style="font-style: italic;"><I>or</I></span> \r
- <span style="font-weight: bold;"><B>-x</B></span> </td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs21">\r
-<p>the servers open an xterm window and log messages are displayed in this \r
- window</td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs20">\r
-<p><span style="font-weight: bold;"><B>--modules=module1,module2,...</B></span> \r
- <span style="font-style: italic;"><I>or</I></span> <span style="font-weight: bold;"><B>-m=module1,module2,...</B></span></td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs21">\r
-<p>list of SALOME modules which will be loaded into the module catalogue</td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs23">\r
-<p class="whs22">--embedded=registry,study,moduleCatalog,cppContainer,</p>\r
-<p><span style="font-style: italic;"><I>or</I></span> <span \r
- style="font-weight: bold;"><B>-e=registry,study,moduleCatalog,cppContainer</B></span> \r
- </td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs24">\r
-<p>embedded CORBA servers (default: registry,study,moduleCatalog,cppContainer)</p>\r
-<p>note that logger,pyContainer,supervContainer can't be embedded </td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs23">\r
-<p><span style="font-weight: bold;"><B>--standalone=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer</B></span>, \r
- or</p>\r
-<p><span style="font-weight: bold;"><B>-s=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer</B></span> \r
- </td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs24">\r
-<p>standalone CORBA servers (default: pyContainer,supervContainer) </td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs23">\r
-<p><span style="font-weight: bold;"><B>--containers=cpp,python,superv</B></span></p>\r
-<p><span style="font-style: italic;"><I>or</I></span> <span style="font-weight: bold;"><B>-c=cpp,python,superv</B></span></td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs24">\r
-<p>launch of cpp, python and supervision containers</td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs25">\r
-<p><span style="font-weight: bold;"><B>--portkill</B></span> <span style="font-style: italic;"><I>or</I></span> \r
- <span style="font-weight: bold;"><B>-p</B></span></td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs26">\r
-<p>kill SALOME launched with the current port</td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs27">\r
-<p><span style="font-weight: bold;"><B>--killall</B></span> <span style="font-style: italic;"><I>or</I></span> \r
- <span style="font-weight: bold;"><B>-k</B></span> </p>\r
-<p> </td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs28">\r
-<p>kill SALOME</p>\r
-<p> </td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs27">\r
-<p><span style="font-weight: bold;"><B>--interp=n</B></span> <span style="font-style: italic;"><I>or</I></span> \r
- <span style="font-weight: bold;"><B>-i=n</B></span> </td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs28">\r
-<p>number of additional xterm to open, with session environment </td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs27">\r
-<p class="whs22">-z</td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs28">\r
-<p>display splash screen</td></tr>\r
-\r
-<tr valign="top" class="whs16">\r
-<td colspan="1" rowspan="1" width="645px" class="whs27">\r
-<p class="whs22">-r</td>\r
-<td colspan="1" rowspan="1" width="421px" class="whs28">\r
-<p>disable centralized exception handling mechanism </td></tr>\r
-<script language='JavaScript'><!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4)) document.write("</table></table><table>");\r
-//--></script>\r
-</table>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs29"><img src="../tip1.gif" x-maintain-ratio="TRUE" width="35px" height="37px" border="0" class="img_whs8"><span style="font-weight: normal; font-family: 'Times New Roman', serif;"> \r
- If the </span><span style="font-family: 'Times New Roman', serif;">runSalome.py \r
- </span><span style="font-family: 'Times New Roman', serif; font-weight: normal;">script \r
- is launched without prompting any options, they will be taken by default \r
- from the file </span><span style="font-family: 'Times New Roman', serif;">SalomeApp.xml \r
- (SALOME/GUI/share/salome/resources/SalomeApp.xml)</span><span style="font-family: 'Times New Roman', serif; font-weight: normal;">. \r
- If you are constantly launching SALOME with some specific options which \r
- are different from the defaults, you can edit this file according to your \r
- requirements. So the next time you run SALOME, you won't have to enter \r
- these numerous command console options. </span> </p>\r
-\r
-<p class="whs30"> </p>\r
-\r
-<p class="whs31">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','About SALOME architecture','about_salome_pro_architecture.htm','Introduction to SALOME ','introduction_to_salome_pro.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
- </p>\r
-\r
-<p class="whs31"> </p>\r
-\r
-<p class="whs31"> </p>\r
-\r
-<p class="whs31"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>SALOME desktop</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { font-family:'Times New Roman' , serif; }\r
-p.whs2 { font-family:'Times New Roman' , serif; }\r
-img_whs3 { border:none; width:694px; height:549px; float:none; border-style:none; }\r
-p.whs4 { font-family:'Times New Roman' , serif; margin-left:40px; font-weight:bold; }\r
-p.whs5 { font-family:'Times New Roman' , serif; margin-left:40px; }\r
-ul.whs6 { list-style:disc; }\r
-p.whs7 { text-indent:36px; }\r
-p.whs8 { text-align:justify; margin-left:0px; text-indent:36px; }\r
-p.whs9 { text-align:justify; font-weight:bold; margin-left:40px; }\r
-p.whs10 { text-align:justify; }\r
-p.whs11 { text-align:justify; font-weight:bold; margin-left:0px; text-indent:36px; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs8 {margin-left:1pt; }";\r
- strNSS += "p.whs11 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nSALOME desktop");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">SALOME Desktop</h1>\r
-\r
-<p class="whs2">The main SALOME Desktop \r
- consists of the following sections and toolbars:</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"><img src="../pics/geomview-alt.png" x-maintain-ratio="TRUE" width="694px" height="549px" border="0" class="img_whs3"></p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs4">Basic parts of the SALOME Desktop:</p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs2"><span \r
- style="font-weight: bold;"><B>Main menu - </B></span>This is a set of context-sensitive \r
- menus, which will be updated according the functionality of the loaded \r
- component. In general, these \r
- menus contain all functional options of SALOME platform.</p></li>\r
- \r
- <li class=kadov-p><p class="whs2"><span \r
- style="font-weight: bold;"><B>Standard Toolbar - </B></span>This toolbar contains \r
- icons allowing creating/saving studies, correcting mistakes, copying/pasting \r
- objects</p></li>\r
- \r
- <li class=kadov-p><p class="whs2"><span \r
- style="font-weight: bold;"><B>Components Toolbar - </B></span>This toolbar is \r
- destined for uploading components in SALOME platform</p></li>\r
- \r
- <li class=kadov-p><p class="whs2"><span \r
- style="font-weight: bold;"><B>Module Toolbar</B></span> - This toolbar contains \r
- icons specific to the loaded module.</p></li>\r
- \r
- <li class=kadov-p><p class="whs2"><span \r
- style="font-weight: bold;"><B>Viewer Toolbar - </B></span>This is a set of tools \r
- destined for visualization of the presentations in the viewer. </p></li>\r
-</ul>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs7">All toolbars in the <span style="font-weight: bold;"><B>SALOME</B></span> \r
- Platform are context-sensitive. Loading of a definite component (Geometry, \r
- Post-Pro, Mesh etc.) will automatically add some additional toolbars specific \r
- to this component. To display/hide a definite toolbar, in the main menu \r
- choose <span style="font-weight: bold;"><B>View</B></span> > Toolbars, and \r
- from this submenu check or uncheck the toolbar, you would like to display/hide. \r
- </p>\r
-\r
-<p class="whs8">By default all toolbars are located on \r
- the top of the SALOME desktop. But you can relocate toolbars by dragging \r
- with the mouse and dropping it in any place of the window. </p>\r
-\r
-<p class="whs9"> </p>\r
-\r
-<p class="whs4">Parts of the \r
- study window:</p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<ul type="disc" class="whs6">\r
- \r
- <li class=kadov-p><p class="whs10"><span style="font-weight: bold;"><B>Object \r
- Browser</B></span> - Management of objects created or imported into SALOME \r
- application</p></li>\r
- \r
- <li class=kadov-p><p class="whs10"><span style="font-weight: bold;"><B>Viewer \r
- - </B></span>This window is destined for visualization of presentations. </p></li>\r
- \r
- <li class=kadov-p><p class="whs10"><span style="font-weight: bold;"><B>Python \r
- console</B></span> - Window for Python interpreter. This window functions \r
- like a standard document: the pop-up menu invoked by right-click in this \r
- window gives access to <span style="font-weight: bold;"><B>Copy/Paste/SelectAll/ClearAll \r
- </B></span>options.</p></li>\r
-</ul>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs8">Object Browser, Python Console, MenuBar, \r
- etc are, in fact, separate dockable windows. Dockable \r
- windows can be placed in special areas, on the borders of desktop like \r
- toolbars. You can change the size and the position of dockable windows, \r
- hide them or even place outside desktop. SALOME saves in the same file \r
- all positions and sizes of dockable windows. It means that the difference \r
- in settings of the same windows (for example Python console) is possible \r
- between different modules (the same window can have different size and \r
- position when other module is activated). Also each module can indicate \r
- which common windows are necessary for working, and only they will be \r
- displayed when this module is active.</p>\r
-\r
-<p class="whs9"> </p>\r
-\r
-<p class="whs11"><span style="font-weight: normal;">Starting \r
- from the version 3.0.0 Salome uses a</span> Multi-Desktop Approach. <span \r
- style="font-weight: normal;">Multi-desktop Approach means that now there \r
- is separate Desktop for each document (Study) and \r
- all windows connected to a Study (viewers, dockable windows etc) are placed \r
- in one container. It is very comfortable, because you can't mix up windows \r
- from different studies. This approach positively differs from the classic \r
- multi document interface in case if many windows are used, i.e. when one \r
- document contains a lot of viewers, dialogs, etc. Each desktop also has \r
- its own menu and toolbar.</span></p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Creating a new study','creating_a_new_study.htm','Displaying studies','displaying_studies.htm','Editing studies','editing_studies.htm','Introduction to GUI','../introduction_to_gui.htm','Saving and closing studies','saving_a_study.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Saving a study</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { text-align:justify; }\r
-p.whs2 { text-align:justify; }\r
-img_whs3 { border:none; float:none; width:30px; height:30px; border-style:none; }\r
-p.whs4 { font-style:italic; color:#ff0000; text-align:justify; }\r
-ul.whs5 { list-style:disc; }\r
-p.whs6 { font-weight:bold; margin-left:0px; text-align:justify; }\r
-p.whs7 { margin-left:0px; text-align:justify; }\r
-p.whs8 { font-style:italic; text-align:justify; color:#000000; font-family:'Arial Black' , sans-serif; }\r
-p.whs9 { font-style:italic; color:#ff0000; margin-left:40px; text-align:justify; }\r
-img_whs10 { border:none; width:23px; height:29px; float:none; border-style:none; }\r
-p.whs11 { margin-left:0px; background-image:url('../texture_horiz_ltbluebubbles.jpg'); text-align:justify; }\r
-img_whs12 { border:none; float:none; width:36px; height:38px; border-style:none; }\r
-p.whs13 { margin-left:0px; font-style:italic; text-align:justify; color:#000000; font-family:'Arial Black' , sans-serif; }\r
-p.whs14 { margin-left:0px; font-style:italic; color:#ff0000; text-align:justify; }\r
-p.whs15 { margin-left:40px; text-align:justify; }\r
-p.whs16 { text-align:justify; margin-left:40px; font-family:'Times New Roman' , serif; font-style:normal; }\r
-p.whs17 { font-style:italic; margin-left:0px; text-align:justify; color:#000000; font-family:'Arial Black' , sans-serif; }\r
-p.whs18 { font-style:italic; color:#ff0000; margin-left:0px; text-align:justify; }\r
-img_whs19 { border:none; width:22px; height:23px; border-style:none; }\r
-img_whs20 { border:none; width:394px; height:161px; float:none; border-style:none; }\r
-p.whs21 { margin-left:0px; font-weight:bold; text-align:justify; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs6 {margin-left:1pt; }";\r
- strNSS += "p.whs7 {margin-left:1pt; }";\r
- strNSS += "p.whs11 {margin-left:1pt; }";\r
- strNSS += "p.whs13 {margin-left:1pt; }";\r
- strNSS += "p.whs14 {margin-left:1pt; }";\r
- strNSS += "p.whs17 {margin-left:1pt; }";\r
- strNSS += "p.whs18 {margin-left:1pt; }";\r
- strNSS += "p.whs21 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nStudy management\nSaving and closing studies");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Saving and closing studies</h1>\r
-\r
-<p class="whs2"><img src="../i_blue.jpg" x-maintain-ratio="TRUE" width="30px" height="30px" border="0" class="img_whs3">In <span style="font-weight: bold;"><B>SALOME \r
- </B></span>a study can be saved in <span style="font-weight: bold;"><B>HDF</B></span> \r
- binary (by default) or <span style="font-weight: bold;"><B>ASCII</B></span> files \r
- (<a href="setting_preferences.htm#ASCII">see also: Setting ASCII save \r
- option</a>).</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2">You can also specify two \r
- options of saving your study: </p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<ul type="disc" class="whs5">\r
- \r
- <li style="margin-left: -20px;"\r
- class=kadov-p><p class="whs6">In one HDF file: \r
- <span style="font-weight: normal;">in this case all components used during \r
- this study session will write their data into one common HDF file. </span></p></li>\r
- \r
- <li style="margin-left: -20px;"\r
- class=kadov-p><p class="whs7"><span \r
- style="font-weight: bold;"><B>In multiple files </B></span>(<a href="setting_preferences.htm#MultiFile">see \r
- also: Setting Multifile save option</a>)<span style="font-weight: bold;"> \r
- <B></B></span>: in this case SALOME will create one base HDF file which will \r
- store the main information about the saved study and several other special \r
- files with particular extensions storing the data written by each component \r
- which has been used during this study session. Opening of this study requires \r
- that <span style="font-weight: bold;"><B>ALL</B></span> saved files should be \r
- stored in the <span style="font-weight: bold;"><B>SAME</B></span> directory. \r
- If you \r
- would like to copy your saved study in another directory or machine, you \r
- should copy all stored files. Otherwise, if you try to open this study, \r
- some data will be lost and it will lead to invalid functioning of the \r
- SALOME platform. </p></li>\r
-</ul>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs7">Saving a study you also \r
- save its layout, i.e. all positions and sizes of dockable windows. It \r
- means that the difference in settings of the same windows (for example \r
- Python console) is possible between different modules (the same window \r
- can have different size and position when other module is activated). \r
- Also each module can indicate which common windows are necessary for working, \r
- and only they will be displayed when this module is active.</p>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs8">To save an existing \r
- study :</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs9"><span style="font-style: normal; color: #000000;"><font color=black >In \r
- the main toolbar click </font></span><img src="../pics/save.jpg" x-maintain-ratio="TRUE" width="23px" height="29px" border="0" class="img_whs10"> <span style="font-style: normal; color: #000000;"><font color=black >or \r
- from the main menu select </font></span><span style="font-style: normal;\r
- color: #000000;\r
- font-weight: bold;"><font color=black ><B>File \r
- > Save </B></font></span><span style="font-style: normal; color: #000000;"><font color=black >option. \r
- Your study will be automatically updated. </font></span></p>\r
-\r
-<p class="whs9"> </p>\r
-\r
-<p class="whs11"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs12">If your study hasn't been \r
- previously saved, this option will call the standard Search File dialog \r
- box where you can enter the name for your study and save it. </p>\r
-\r
-<p class="whs9"> </p>\r
-\r
-<p class="whs13">To save a study with \r
- a new name:</p>\r
-\r
-<p class="whs14"> </p>\r
-\r
-<p class="whs15">From the main menu select \r
- <span style="font-weight: bold;"><B>File > Save as </B></span>option. In the \r
- standard Search File dialog box enter a new name for your study and click \r
- <span style="font-weight: bold;"><B>Save</B></span> button.</p>\r
-\r
-<p class="whs15"> </p>\r
-\r
-<p class="whs13">To save the current \r
- layout of the GUI:</p>\r
-\r
-<p class="whs13"> </p>\r
-\r
-<p class="whs16">From the main menu select <span style="font-weight: bold;"><B>File \r
- > Save GUI State</B></span>. The GUI state is published in Object Browser \r
- in the folder GUI states and can be at any time <span style="font-weight: bold;"><B>Restored</B></span>, \r
- <span style="font-weight: bold;"><B>Renamed</B></span> or <span style="font-weight: bold;"><B>Deleted.</B></span> \r
- This operation \r
- saves and allows to restore almost all GUI settings: names, position, \r
- zooming and panning of viewers and \r
- all displayed objects (in Post-Pro module only). </p>\r
-\r
-<p> </p>\r
-\r
-<p class="whs17">To close a study:</p>\r
-\r
-<p class="whs18"> </p>\r
-\r
-<p class="whs9"><span style="font-style: normal; color: #000000;"><font color=black >In \r
- the main toolbar click<img src="../image94.gif" width="22px" height="23px" border="0" class="img_whs19"> or from \r
- the main menu select </font></span><span style="font-weight: bold;\r
- font-style: normal;\r
- color: #000000;"><font color=black ><B>File > \r
- Close</B></font></span><span style="font-weight: bold;"> <B></B></span><span style="font-style: normal; color: #000000;"><font color=black >option \r
- or click on the cross in the upper right corner of the study window.</font></span></p>\r
-\r
-<p class="whs9"> </p>\r
-\r
-<p class="whs11"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs12">If your study hasn't been \r
- previously saved, this option will call the following dialog box with \r
- several options:</p>\r
-\r
-<p class="whs15"> </p>\r
-\r
-<p class="whs15"><img src="../closestudy.png" x-maintain-ratio="TRUE" width="394px" height="161px" border="0" class="img_whs20"></p>\r
-\r
-<p class="whs15"> </p>\r
-\r
-<p class="whs7"><span style="font-weight: bold;"><B>Unload \r
- </B></span>option allows to unload your current study from the SALOME Desktop. \r
- In the same working session you can reload \r
- it again (<a href="opening_studies.htm">see: Opening studies</a>). But \r
- if you quit the SALOME application, all changes in the unloaded study \r
- will be lost.</p>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs21">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Creating a new study','creating_a_new_study.htm','Displaying studies','displaying_studies.htm','Introduction to GUI','../introduction_to_gui.htm','Opening studies','opening_studies.htm','SALOME desktop','salome_pro_desktop.htm','Setting preferences','setting_preferences.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs21"> </p>\r
-\r
-<p class="whs21"> </p>\r
-\r
-<p class="whs21"> </p>\r
-\r
-<p class="whs21"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Setting preferences</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { font-family:'Times New Roman' , serif; }\r
-p.whs2 { font-family:'Times New Roman' , serif; }\r
-img_whs3 { border:none; border-style:none; width:752px; height:646px; float:none; }\r
-ul.whs4 { list-style:disc; }\r
-p.whs5 { font-family:'Times New Roman' , serif; margin-left:0px; font-weight:bold; }\r
-img_whs6 { border:none; width:23px; height:29px; border-style:none; }\r
-p.whs7 { font-family:'Times New Roman' , serif; font-weight:bold; }\r
-p.whs8 { font-weight:bold; margin-left:0px; }\r
-p.whs9 { font-weight:bold; margin-left:38px; }\r
-p.whs10 { font-family:'Times New Roman' , serif; font-weight:normal; }\r
-p.whs11 { font-family:'Times New Roman' , serif; font-style:normal; font-weight:bold; }\r
-img_whs12 { border:none; width:20px; height:20px; border-style:none; }\r
-img_whs13 { border:none; width:22px; height:23px; border-style:none; float:none; }\r
-img_whs14 { border:none; width:22px; height:21px; border-style:none; }\r
-img_whs15 { border:none; width:23px; height:23px; border-style:none; }\r
-img_whs16 { border:none; width:25px; height:24px; border-style:none; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs5 {margin-left:1pt; }";\r
- strNSS += "p.whs8 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nSetting Preferences\nSALOME preferences");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">SALOME preferences</h1>\r
-\r
-<p class="whs2">To begin setting preferences \r
- for your study, select <span style="font-weight: bold;"><B>Preferences </B></span>in \r
- the main menu, the following dialog box will appear:</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"> <img src="../pics/pref11.png" x-maintain-ratio="TRUE" width="752px" height="646px" border="0" class="img_whs3"></p>\r
-\r
-<p class="whs2">If you've just started \r
- your study and haven't yet loaded other modules, you'll be able to change \r
- only those settings, which refer to the whole GUI SALOME session. These \r
- settings will be valid for the whole study session.</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"><span style="font-weight: bold; font-size: 12pt;"><font size=3 style="font-size:12pt;"><B>General \r
- Preferences</B></font></span> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs5">Study Properties</p></li>\r
-</ul>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs5">MultiFile Save<span \r
- style="font-weight: normal;"> - if checked in, your study will be saved \r
- in several HDF files (one file for the data created by each component \r
- used during the study session).</span></p></li>\r
- \r
- <li class=kadov-p><p class="whs5">ASCII Save - <span \r
- style="font-weight: normal;">if checked in, your study will be saved in \r
- ASCII format file (or files).</span></p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Store positions \r
- of windows<span style="font-weight: normal;"> - </span> <span \r
- style="font-weight: normal;">if checked in, \r
- positions of windows will be saved in a special file at the end of the \r
- current session and then restored for a new session.</span></p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Store/restore last \r
- GUI state -<span style="font-weight: normal;"> if checked in, all GUI \r
- settings are saved with the rest of the data whenever you save the study. \r
- When the study is reopened, the GUI state is restored. </span></p></li>\r
- </ul>\r
- \r
- <li class=kadov-p><p class="whs5">External browser </p></li>\r
- \r
- <ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs5">Application <span \r
- style="font-weight: normal;">this option allows you to set an external \r
- browser (IE, Netscape) which will be used for viewing SALOME reference \r
- manuals. By default, Mozilla is used. Press the </span><img src="../image69.gif" width="23px" height="29px" border="0" class="img_whs6"> <span \r
- style="font-weight: normal;">button to browse for the application you \r
- need in the data tree of your computer.</span></p></li>\r
- \r
- <li class=kadov-p><p class="whs5">Parameters</p></li>\r
- </ul>\r
-</ul>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs5">Python console properties \r
- -<span style="font-weight: normal;"> here you can quickly set the parameters \r
- (style, size, face) of the font used in your Python console. For detailed \r
- settings in </span><a href="../select_color_and_font.htm">Select Font</a><span \r
- style="font-weight: normal;"> dialog box press the </span><img src="../image68.gif" width="23px" height="29px" border="0" class="img_whs6"> <span style="font-weight: normal;">button.</span></p></li>\r
-</ul>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs7"><span \r
- style="font-family: 'Times New Roman', serif; font-weight: bold;"><B>Viewers \r
- Preferences</B></span></p>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs7"><img src="../pics/pref12.png" x-maintain-ratio="TRUE" width="752px" height="646px" border="0" class="img_whs3"></p>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs7">OCC \r
- and VTK 3D Viewers</p></li>\r
-</ul>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs5">Trihedron size \r
- - <span style="font-weight: normal;">this submenu allows to set the size \r
- of coordinate axes displayed in the viewer.</span></p></li>\r
- \r
- <li class=kadov-p><p class="whs8">Background \r
- Color - <span style="font-weight: normal;">this submenu allows to select \r
- background color. Click on the colored line to access to the </span><a href="../select_color_and_font.htm">Select Color</a><span style="font-weight: normal;"> \r
- dialog box. </span></p></li>\r
- </ul>\r
-</ul>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs8"><span \r
- style="font-weight: normal;"> </span>Number \r
- of isolines along U <span style="font-weight: normal;">(or</span> V<span \r
- style="font-weight: normal;">) - this submenu allows to specify the number \r
- of isolines along the axes of coordinates.</span></p></li>\r
- \r
- <li class=kadov-p><p class="whs8">Relative \r
- size<span style="font-weight: normal;"> - if checked in, trihedron axes \r
- scale to fit the size of the area displayed in 3D Viewer. </span></p></li>\r
- </ul>\r
-</ul>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs7">Plot2d \r
- Viewer</p></li>\r
- \r
- <ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs7">Legend \r
- Position - <span style="font-weight: normal;">this submenu allows to set \r
- the default position of the legend, it can be located to the left, to \r
- the right, on top or on bottom of the graph.</span> </p></li>\r
- \r
- <li class=kadov-p><p class="whs7">Curve \r
- Type - <span style="font-weight: normal;">this allows to set the representation \r
- of graphs in your presentations. You can see only</span> Points<span style="font-weight: normal;">, \r
- points connected with</span> Lines <span style="font-weight: normal;">or \r
- points connected with smooth</span> Splines. </p></li>\r
- \r
- <li class=kadov-p><p class="whs7">Marker \r
- Size - <span style="font-weight: normal;">this submenu allows you to set \r
- the size of markers in your graphs</span></p></li>\r
- \r
- <li class=kadov-p><p class="whs7">Horizontal \r
- <span style="font-weight: normal;">&</span> Vertical Axis Scale - \r
- <span style="font-weight: normal;">this submenu allows you to set the \r
- scale for vertical and horizontal axes. It can be either</span> Linear \r
- <span style="font-weight: normal;">or</span> Logarithmic</p></li>\r
- \r
- <li class=kadov-p><p class="whs7">Background \r
- Color - <span style="font-weight: normal;">this submenu allows to select \r
- the background color. Click on the colored line to access to the </span><a href="../select_color_and_font.htm">Select Color</a><span style="font-weight: normal;"> \r
- dialog box. </span></p></li>\r
- </ul>\r
-</ul>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs7">Graph \r
- Supervisor</p></li>\r
- \r
- <li class=kadov-p><p class="whs9">Background \r
- Color - <span style="font-weight: normal;">this submenu allows to select \r
- background color. Click on the colored line to access to the </span><a href="../select_color_and_font.htm">Select Color</a><span style="font-weight: normal;"> \r
- dialog box. </span></p></li>\r
- \r
- <li class=kadov-p><p class="whs9">Title \r
- Color - <span style="font-weight: normal;">this submenu allows to select \r
- title color. Click on the colored line to access to the </span><a href="../select_color_and_font.htm">Select \r
- Color</a><span style="font-weight: normal;"> dialog box. </span></p></li>\r
-</ul>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs11">Directories Preferences</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"><img src="../pics/pref13.png" x-maintain-ratio="TRUE" width="752px" height="646px" border="0" class="img_whs3"></p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs5">Quick Directory List \r
- - <span style="font-weight: normal;">this section allows to create and \r
- manage a custom quick directory list. To add a directory in the list, \r
- press the </span><img src="../image70.gif" width="20px" height="20px" border="0" class="img_whs12"> <span style="font-weight: normal;">button, \r
- then the <img src="../image71.gif" width="22px" height="23px" border="0" class="img_whs13"> button and browse the data tree for the</span> \r
- <span style="font-weight: normal;">directory you need.</span> <span style="font-weight: normal;"><br>\r
- The <img src="../image73.gif" width="22px" height="21px" border="0" class="img_whs14"> and <img src="../image75.gif" width="23px" height="23px" border="0" class="img_whs15"> buttons help you to sort the \r
- directories in the list.<br>\r
- To remove the selected directory from the list, press the <img src="../image72.gif" width="25px" height="24px" border="0" class="img_whs16"> button.</span> </p></li>\r
-</ul>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs7"><span \r
- style="font-family: 'Times New Roman', serif; font-weight: bold;"><B>Object \r
- Browser Preferences</B></span></p>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs7"><img src="../pics/pref14.png" x-maintain-ratio="TRUE" width="752px" height="646px" border="0" class="img_whs3"></p>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs7">Object \r
- browser settings</p></li>\r
- \r
- <ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs7">Auto \r
- size for the first column - <span style="font-weight: normal;">this checkbox \r
- enables automatic resizing for the first column.</span> </p></li>\r
- \r
- <li class=kadov-p><p class="whs7">Auto \r
- size for other columns - <span style="font-weight: normal;">this checkbox \r
- enables automatic resizing for the other columns.</span></p></li>\r
- </ul>\r
-</ul>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs7">Default \r
- columns - <span style="font-weight: normal;">these checkboxes allow to</span> \r
- <span style="font-weight: normal;">display or hide </span>Value, Entry, \r
- IOR<span style="font-weight: normal;"> and </span>Reference entry<span \r
- style="font-weight: normal;"> columns in the Object Browser.</span></p></li>\r
-</ul>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Introduction to GUI','../introduction_to_gui.htm','SALOME desktop','salome_pro_desktop.htm','Saving a study','saving_a_study.htm','Using Object Browser','using_object_browser.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Using Catalog Generator</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { font-family:'Times New Roman' , serif; }\r
-p.whs2 { margin-left:0px; text-align:justify; }\r
-img_whs3 { border:none; width:30px; height:30px; float:none; border-style:none; }\r
-p.whs4 { margin-left:0px; text-indent:48px; text-align:justify; }\r
-p.whs5 { text-align:justify; }\r
-p.whs6 { font-family:'Times New Roman' , serif; }\r
-p.whs7 { font-family:'Times New Roman' , serif; margin-left:40px; font-style:normal; color:#000000; }\r
-p.whs8 { font-family:'Times New Roman' , serif; margin-left:40px; }\r
-img_whs9 { border:none; width:475px; height:289px; float:none; border-style:none; }\r
-p.whs10 { font-family:'Times New Roman' , serif; margin-left:0px; }\r
-ul.whs11 { list-style:disc; }\r
-p.whs12 { font-family:'Times New Roman' , serif; margin-left:0px; background-image:url('../texture_horiz_ltbluebubbles.jpg'); }\r
-img_whs13 { border:none; float:none; width:36px; height:38px; border-style:none; }\r
-img_whs14 { border:none; width:35px; height:37px; float:none; border-style:none; }\r
-p.whs15 { font-family:'Times New Roman' , serif; margin-left:0px; font-weight:bold; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs2 {margin-left:1pt; }";\r
- strNSS += "p.whs4 {margin-left:1pt; }";\r
- strNSS += "p.whs10 {margin-left:1pt; }";\r
- strNSS += "p.whs12 {margin-left:1pt; }";\r
- strNSS += "p.whs15 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nUsing Catalog Generator");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Using Catalog Generator \r
- (for advanced users)</h1>\r
-\r
-<p class="whs2"><img src="../i_blue.jpg" x-maintain-ratio="TRUE" width="30px" height="30px" border="0" class="img_whs3"> SALOME \r
- platform is an open platform for integration of your custom components, \r
- which can used in the same way as typical modules provided in the standard \r
- installed package. The <span style="font-weight: bold;"><B>Catalog Generator \r
- </B></span>tool serves for implementation of the interface of your custom \r
- component. It allows to generate from IDL description of your component \r
- interface its xml description. The \r
- component xml description allows SALOME application to know about the \r
- component and its services and provides the possibility to call the component \r
- services, for example, inside Supervisor module.</p>\r
-\r
-<p class="whs4">If you have a look at runSalome, runSalomeWithPort \r
- scripts running SALOME application, which are stored in build/bin directory \r
- you will see that SALOME_ModuleCatalog_Server is started with two xml \r
- files as its input parameters: <span style="font-weight: bold;"><B>CatalogModuleGeneral.xml</B></span> \r
- and <span style="font-weight: bold;"><B>CatalogModulePersonnel.xml</B></span>. \r
- These two files store the descriptions of interfaces and services of all \r
- components, provided with typical SALOME package. To add a new component \r
- into SALOME platform you should either update one of these existing xml \r
- files with generated xml description of your component or create a new \r
- one.</p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class=TODO>To open the Catalog Generator:</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs7">From the main menu choose <span style="font-weight: bold;"><B>Tools \r
- > Catalog Generato</B></span>r, the following dialog box will appear:</p>\r
-\r
-<p> </p>\r
-\r
-<p class="whs8"><img src="../pics/cataloggenerator.png" x-maintain-ratio="TRUE" width="475px" height="289px" border="0" class="img_whs9"></p>\r
-\r
-<p class="whs8"> </p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs10">In \r
- this dialog box you can specify:</p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<ul type="disc" class="whs11">\r
- \r
- <li class=kadov-p><p class="whs8">Name \r
- and location of the IDL file describing the interface of your component \r
- (Click the <span style="font-weight: bold;"><B>Browse</B></span> button to find \r
- it using the data tree).</p></li>\r
- \r
- <li class=kadov-p><p class="whs8">Name \r
- and location of an existing XML file, which will be updated with the interface \r
- of you component or name and desired location of a new XML file, which \r
- will be generated (Click the <span style="font-weight: bold;"><B>Browse</B></span> \r
- button to find it using the data tree).</p></li>\r
- \r
- <li class=kadov-p><p class="whs8">Name \r
- of the author,</p></li>\r
- \r
- <li class=kadov-p><p class="whs8">Name \r
- of the component,</p></li>\r
- \r
- <li class=kadov-p><p class="whs8">Name \r
- of the user</p></li>\r
- \r
- <li class=kadov-p><p class="whs8">Version,</p></li>\r
- \r
- <li class=kadov-p><p class="whs8">Capability \r
- of multi study support</p></li>\r
- \r
- <li class=kadov-p><p class="whs8">Type \r
- of the component,</p></li>\r
- \r
- <li class=kadov-p><p class="whs8">Icon \r
- of your component (Click the <span style="font-weight: bold;"><B>Browse</B></span> \r
- button to find it using the data tree).</p></li>\r
-</ul>\r
-\r
-<p class="whs8"> </p>\r
-\r
-<p class="whs12"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs13">If you have chosen to create a new xml file containing the \r
- description of your component, don't forget to specify it as input parameter \r
- for SALOME_ModuleCatalog_Server in the file, you are using as a running \r
- script of SALOME platform (in runSalomeWithPort, for example).</p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs10"> When \r
- launching SALOME next time you will see your module alongside other components.</p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs12"><img src="../tip1.gif" x-maintain-ratio="TRUE" width="35px" height="37px" border="0" class="img_whs14"> You can use the <span style="font-weight: bold;"><B>Catalog \r
- Generator</B></span> tool, if you would like to <span style="font-weight: bold;"><B>test</B></span> \r
- the functionality of your new component. After implementation of your \r
- component interface, launch SUPERVISION module where you can try using \r
- the services of your new component. (see also: Adding factory nodes)</p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs15">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Introduction to GUI','../introduction_to_gui.htm','SALOME desktop','salome_pro_desktop.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs15"> </p>\r
-\r
-<p class="whs15"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Using left-hand tabs</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { font-family:'Times New Roman' , serif; }\r
-p.whs2 { font-family:'Times New Roman' , serif; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("Using this reference manual\nUsing left-hand tabs");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Using left-hand tabs</h1>\r
-\r
-<p class="whs2">SALOME Help system includes \r
- the following left-hand tabs:</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p-Cbullets><p CLASS=bullets\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"><span \r
- style="font-weight: bold;"><B>Contents:</B></span> The Contents tab displays \r
- books and pages that represent the categories of information in the online \r
- Help system. When you click a closed book, it opens to display its content \r
- (sub-books and pages). When you click an open book, it closes. When you \r
- click pages, you select topics to view in the right-hand pane of the HTML \r
- Help viewer.</p></li>\r
-</ul>\r
-\r
-<p CLASS=bullets\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"> </p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p-Cbullets><p CLASS=bullets\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"><span \r
- style="font-weight: bold;"><B>Search:</B></span> The Search tab enables you to \r
- search for words in the Help system and locate topics containing those \r
- words. Full-text searching looks through every word in the online Help \r
- to find matches. When the search is completed, a list of topics is displayed \r
- so you can select a specific topic to view.</p></li>\r
-</ul>\r
-\r
-<p CLASS=bullets\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"> </p>\r
-\r
-<ul>\r
- \r
- <li class=kadov-p-Cbullets><p CLASS=bullets\r
- style="font-weight: normal; font-family: 'Times New Roman', serif;"><span \r
- style="font-weight: bold;"><B>Glossary:</B></span> The Glossary tab displays \r
- a glossary providing a list of words, short phrases, and their definitions \r
- related to SALOME. When you select a term from the list, its corresponding \r
- definition is displayed in the lower pane.</p></li>\r
-</ul>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','About SALOME help system','about_salome_pro_help_system.htm','Navigating topics','navigating_topics.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Using Object Browser</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { text-align:justify; }\r
-p.whs2 { text-align:justify; }\r
-img_whs3 { border:none; width:30px; height:30px; float:none; border-style:none; }\r
-ul.whs4 { list-style:disc; }\r
-p.whs5 { text-align:justify; margin-left:40px; }\r
-img_whs6 { border:none; width:294px; height:280px; float:none; border-style:none; }\r
-p.whs7 { background-image:url('../texture_horiz_ltbluebubbles.jpg'); text-align:justify; }\r
-img_whs8 { border:none; float:none; width:36px; height:38px; border-style:none; }\r
-img_whs9 { border:none; width:354px; height:280px; float:none; border-style:none; }\r
-p.whs10 { margin-left:0px; font-weight:bold; text-align:justify; }\r
-p.whs11 { margin-left:0px; text-align:justify; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs10 {margin-left:1pt; }";\r
- strNSS += "p.whs11 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nUsing Object Browser");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Using Object Browser</h1>\r
-\r
-<p class="whs2"><img src="../i_blue.jpg" x-maintain-ratio="TRUE" width="30px" height="30px" border="0" class="img_whs3"> The <span style="font-weight: bold;"><B>Object \r
- Browser</B></span> in SALOME is destined for displaying the structure of the \r
- current study in a tree-like form. It contains: </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs2">components, loaded \r
- during the current session</p></li>\r
- \r
- <li class=kadov-p><p class="whs2">objects created with \r
- the help of different components (The \r
- objects created with the help of a definite component are located in the \r
- folder having the name of this component.)</p></li>\r
- \r
- <li class=kadov-p><p class="whs2">references to different \r
- objects (they are highlighted in red).</p></li>\r
-</ul>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs5"><img src="../pics/objectbrowser1.png" x-maintain-ratio="TRUE" width="294px" height="280px" border="0" class="img_whs6"></p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs7"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs8">The <span style="font-weight: bold;"><B>Object Browser </B></span>is \r
- destined to getting quick access to different objects created during SALOME \r
- session. All pop-up menus associated with the objects displayed in the \r
- Object Browser are context-sensitive. So it depends on a definite currently \r
- loaded SALOME component what options you will see in the pop-up menu, \r
- if you right-click on a definite object in the Object Browser.</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2">The Object Browser may contain supplementary \r
- attributes of the objects displayed in additional columns. By default, \r
- these columns are not displayed - displaying/hiding \r
- these columns is possible through <a href="setting_preferences.htm#Object_Browser">setting \r
- study preferences</a> or right-clicking on the attributes bar and toggling \r
- the necessary attributes.</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs5"><img src="../pics/objectbrowser2.png" x-maintain-ratio="TRUE" width="354px" height="280px" border="0" class="img_whs9"> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs2"><span style="font-weight: bold;"><B>Entry</B></span> \r
- - Identification \r
- index of the object in the structure of the study</p></li>\r
- \r
- <li class=kadov-p><p class="whs2"><span style="font-weight: bold;"><B>IOR</B></span> \r
- - Interoperable \r
- Object Reference</p></li>\r
- \r
- <li class=kadov-p><p class="whs2"><span style="font-weight: bold;"><B>Reference \r
- entry</B></span> - \r
- Identification \r
- index of the references to the objects</p></li>\r
-</ul>\r
-\r
-<ul type="disc" class="whs4">\r
- \r
- <li class=kadov-p><p class="whs2"><span style="font-weight: bold;"><B>Value</B></span> \r
- - Displays \r
- the value of the first object attribute </p></li>\r
-</ul>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs7"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs8"> <span style="font-weight: bold;"><B>Entry, IOR and Reference \r
- entry </B></span>attributes \r
- are displayed for debugging purposes only.</p>\r
-\r
-<p class="whs2"><span style="text-align: justify;"> </span></p>\r
-\r
-<p class="whs10">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Introduction to GUI','../introduction_to_gui.htm','SALOME desktop','salome_pro_desktop.htm','Setting preferences','setting_preferences.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs10"> </p>\r
-\r
-<p class="whs11"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Using Registry tool</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{ document.write("<link rel='stylesheet' href='../default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-h1.whs1 { text-align:justify; }\r
-p.whs2 { text-align:justify; }\r
-p.whs3 { margin-left:40px; text-align:justify; }\r
-p.whs4 { font-style:italic; color:#ff0000; margin-left:40px; text-align:justify; }\r
-img_whs5 { border:none; width:604px; height:201px; float:none; border-style:none; }\r
-p.whs6 { margin-left:0px; text-align:justify; }\r
-p.whs7 { text-align:justify; margin-left:40px; }\r
-img_whs8 { border:none; width:327px; height:128px; float:none; border-style:none; }\r
-p.whs9 { text-align:justify; margin-left:80px; }\r
-img_whs10 { border:none; width:460px; height:283px; float:none; border-style:none; }\r
-p.whs11 { margin-left:0px; font-weight:bold; text-align:justify; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs6 {margin-left:1pt; }";\r
- strNSS += "p.whs11 {margin-left:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="BSSC Special Effects" src="../ehlpdhtm.js"></script><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
- if (innerWidth != origWidth || innerHeight != origHeight)\r
- location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
- origWidth = innerWidth;\r
- origHeight = innerHeight;\r
- onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="../whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
- if (window.setRelStartPage)\r
- {\r
- addTocInfo("GUI module\nUsing Registry tool");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"../whd_show0.gif","../whd_show2.gif","../whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"../whd_hide0.gif","../whd_hide2.gif","../whd_hide1.gif");\r
-\r
- }\r
-\r
-\r
- if (window.setRelStartPage)\r
- {\r
- setRelStartPage("../index.htm");\r
-\r
- autoSync(1);\r
- sendSyncInfo();\r
- sendAveInfoOut();\r
- }\r
-\r
-}\r
-else\r
- if (window.gbIE4)\r
- document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1 class="whs1">Using Registry tool</h1>\r
-\r
-<p class="whs2"><span style="font-weight: bold;"><B>Registry</B></span> \r
- tool is in the SALOME platform is destined for providing information about \r
- the processes (components), which have ever been launched in the current \r
- study session. </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class=TODO>To view the Registry:</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs3">From the main menu choose \r
- <span style="font-weight: bold;"><B>Tools > Registry display</B></span>, the \r
- following dialog box will appear:</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs3"><img src="../pics/registry1.png" x-maintain-ratio="TRUE" width="604px" height="201px" border="0" class="img_whs5"></p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs6"><span style="font-weight: bold;"><B>Running</B></span> \r
- tab of this dialog box displays a list of the currently started processes \r
- (components) with supplementary information on each of them divided into \r
- columns:</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs3">- <span style="font-weight: bold;"><B>Component: \r
- </B></span>name of the started component</p>\r
-\r
-<p class="whs3">- <span style="font-weight: bold;"><B>PID: \r
- </B></span>process identification number</p>\r
-\r
-<p class="whs3">- <span style="font-weight: bold;"><B>User \r
- Name: </B></span>name of the user launching the component</p>\r
-\r
-<p class="whs3">- <span style="font-weight: bold;"><B>Machine: \r
- </B></span>name of the machine, on which the process has been started</p>\r
-\r
-<p class="whs3">- <span style="font-weight: bold;"><B>begins: \r
- </B></span>date and time of the starting of the component</p>\r
-\r
-<p class="whs3">- <span style="font-weight: bold;"><B>hello:</B></span> \r
- date and time of the last call to the component</p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs6"><span style="font-weight: bold;"><B>History</B></span> \r
- tab displays a list of all processes, which have ever been launched within \r
- this study session. It contains the same supplementary information on \r
- each of the processes (components).</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs6"><span style="font-weight: bold;"><B>Refresh \r
- </B></span>button allows to refresh the current list of processes (components).</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs6"><span style="font-weight: bold;"><B>Interval</B></span> \r
- button allows to set an interval for refreshment of the current list of \r
- processes (components).</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs7"><img src="../pics/registry3.png" x-maintain-ratio="TRUE" width="327px" height="128px" border="0" class="img_whs8"></p>\r
-\r
-<p class="whs9"> </p>\r
-\r
-<p class=TODO>To display complete information on a definite process (component):</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs3">Double-click on this \r
- process (component). The following window will appear:</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs3"><img src="../pics/registry4.png" x-maintain-ratio="TRUE" width="460px" height="283px" border="0" class="img_whs10"></p>\r
-\r
-<p class="whs3"> </p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs11">\r
-<a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Introduction to GUI','../introduction_to_gui.htm','SALOME desktop','salome_pro_desktop.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
-\r
-\r
- </p>\r
-\r
-<p class="whs11"> </p>\r
-\r
-<p class="whs11"> </p>\r
-\r
-<script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
-if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
- WritePopupMenuLayer();\r
-//--></script><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
- writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-</head>
-<body>
-<hr style="width: 100%; height: 2px;">
-<div style="text-align: center;">Copyright © 2003-2007 CEA, EDF<br>
-</div>
-</body>
-</html>
+++ /dev/null
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>$title</title>
- <link href="doxygen.css" rel="stylesheet" type="text/css">
-</head>
-<hr>
-<center>
-SALOME documentation central
-</center>
-<hr>
+++ /dev/null
-// WebHelp 5.10.001\r
-var gTEA = new Array();\r
-function aTE(sTopicTitle, sTopicURL)\r
-{\r
- var len = gTEA.length;\r
- gTEA[len] = new topicEntry(sTopicTitle, sTopicURL);\r
-}\r
-\r
-function topicEntry(sTopicTitle, sTopicURL)\r
-{\r
- this.sTopicTitle = sTopicTitle;\r
- this.sTopicURL = sTopicURL;\r
-}\r
-\r
-function window_OnLoad()\r
-{\r
- if (parent && parent != this) {\r
- if (parent.putFtsTData) \r
- {\r
- parent.putFtsTData(gTEA);\r
- }\r
- }\r
-}\r
-\r
-window.onload = window_OnLoad;
\ No newline at end of file
+++ /dev/null
-<html>\r
-<head>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<body>\r
-<script language="javascript" src="whftdata.js"></script>\r
-<script language="javascript">\r
-<!--\r
-//-->\r
-</script>\r
-<script language="javascript">\r
-<!--\r
-aTE("Dump Study","dump_study.htm");\r
-aTE("GEOM preferences","geom_preferences.htm");\r
-aTE("Introduction to GUI","introduction_to_gui.htm");\r
-aTE("About SALOME architecture","kernel/about_salome_pro_architecture.htm");\r
-aTE("About SALOME help system","kernel/about_salome_pro_help_system.htm");\r
-aTE("Creating a new study","kernel/creating_a_new_study.htm");\r
-aTE("Displaying studies","kernel/displaying_studies.htm");\r
-aTE("Editing studies","kernel/editing_studies.htm");\r
-aTE("Getting properties of the study","kernel/getting_properties_of_the_study.htm");\r
-aTE("Getting started2","kernel/getting_started2.htm");\r
-aTE("Introduction","kernel/introduction.htm");\r
-aTE("Introduction to SALOME","kernel/introduction_to_salome_pro.htm");\r
-aTE("Navigating topics","kernel/navigating_topics.htm");\r
-aTE("Opening studies","kernel/opening_studies.htm");\r
-aTE("SALOME Installation Wizard Help","kernel/readme.html");\r
-aTE("Running SALOME","kernel/running_salome_pro.htm");\r
-aTE("SALOME desktop","kernel/salome_pro_desktop.htm");\r
-aTE("Saving a study","kernel/saving_a_study.htm");\r
-aTE("Setting preferences","kernel/setting_preferences.htm");\r
-aTE("Using Catalog Generator","kernel/using_catalog_generator.htm");\r
-aTE("Using left-hand tabs","kernel/using_left-hand_tabs.htm");\r
-aTE("Using Object Browser","kernel/using_object_browser.htm");\r
-aTE("Using Registry tool","kernel/using_registry.htm");\r
-aTE("MESH preferences","mesh_preferences.htm");\r
-aTE("OCC 3D Viewer","occ_3d_viewer.htm");\r
-aTE("Post-Pro Preferences","post-pro_preferences.htm");\r
-aTE("Select Color and Font","select_color_and_font.htm");\r
-aTE("Setting Preferences","setting_preferences.htm");\r
-aTE("VTK 3D Viewer","vtk_3d_viewer.htm");\r
-\r
-//-->\r
-</script>\r
-</html>\r
+++ /dev/null
-<html>\r
-<head>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<body>\r
-<script language="javascript" src="whfts.js"></script>\r
-<script language="javascript">\r
-<!--\r
-iWM("__version__","zoom","whfwdata0.htm");\r
-\r
-iTM(0,26,"whftdata0.htm");\r
-\r
-//-->\r
-</script>\r
-</body>\r
-</html>
\ No newline at end of file
+++ /dev/null
-// WebHelp 5.10.001\r
-var gaFileMapping = new Array();\r
-var gaFileTopicMapping = new Array();\r
-\r
-function fileMapping(sStartKey, sEndKey, sFileName)\r
-{\r
- this.sStartKey = sStartKey;\r
- this.sEndKey = sEndKey;\r
- this.sFileName = sFileName;\r
- this.aFtsKeys = null;\r
-}\r
-\r
-function fileTopicMapping(nIdBegin, nIdEnd, sFileName)\r
-{\r
- this.nBegin = nIdBegin;\r
- this.nEnd = nIdEnd;\r
- this.sFileName = sFileName;\r
- this.aTopics = null;\r
-}\r
-\r
-\r
-function iWM(sStartKey, sEndKey, sFileName)\r
-{\r
- gaFileMapping[gaFileMapping.length] = new fileMapping(sStartKey, sEndKey, sFileName); \r
-}\r
-\r
-function window_OnLoad()\r
-{\r
- if (parent && parent != this && parent.ftsReady)\r
- {\r
- parent.ftsReady(gaFileMapping, gaFileTopicMapping);\r
- } \r
-}\r
-\r
-function iTM(nIdBegin, nIdEnd, sFileName)\r
-{\r
- gaFileTopicMapping[gaFileTopicMapping.length] = new fileTopicMapping(nIdBegin, nIdEnd, sFileName); \r
-}\r
-\r
-window.onload = window_OnLoad;\r
+++ /dev/null
-// WebHelp 5.10.001\r
-var gWEA = new Array();\r
-function aWE()\r
-{\r
- var len = gWEA.length;\r
- gWEA[len] = new ftsEntry(aWE.arguments);\r
-}\r
-\r
-function ftsEntry(fn_arguments) \r
-{\r
- if (fn_arguments.length && fn_arguments.length >= 1) \r
- {\r
- this.sItemName = fn_arguments[0];\r
- this.aTopics = null;\r
- var nLen = fn_arguments.length;\r
- if (nLen > 1) \r
- {\r
- this.aTopics = new Array();\r
- for (var i = 0; i < nLen - 1; i ++ )\r
- {\r
- this.aTopics[i] = fn_arguments[i + 1];\r
- }\r
- }\r
- }\r
-}\r
-\r
-function window_OnLoad()\r
-{\r
- if (parent && parent != this) {\r
- if (parent.putFtsWData) \r
- {\r
- parent.putFtsWData(gWEA);\r
- }\r
- }\r
-}\r
-\r
-window.onload = window_OnLoad;
\ No newline at end of file
+++ /dev/null
-<html>\r
-<head>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<body>\r
-<script language="javascript" src="whfwdata.js"></script>\r
-<script language="javascript">\r
-<!--\r
-//-->\r
-</script>\r
-<script language="javascript">\r
-<!--\r
-aWE("__version__",14);\r
-aWE("_omnipymodul",14);\r
-aWE("_root_dir",14);\r
-aWE("_src_dir",14);\r
-aWE("0",6,2,25,16,14);\r
-aWE("001",25);\r
-aWE("01",25);\r
-aWE("1",5,25,15,14);\r
-aWE("10",25,14);\r
-aWE("100",25);\r
-aWE("103100",14);\r
-aWE("13",14);\r
-aWE("16",25);\r
-aWE("16x16",25);\r
-aWE("2",5,25,15,14);\r
-aWE("200",25);\r
-aWE("23",14);\r
-aWE("24",14);\r
-aWE("256",25);\r
-aWE("2a2",14);\r
-aWE("2d",6,10,2,25);\r
-aWE("3",6,2,15,16,14);\r
-aWE("31",14);\r
-aWE("33",25);\r
-aWE("3d",10,2,24,25,14,18,28);\r
-aWE("4",14);\r
-aWE("5",14);\r
-aWE("50",25);\r
-aWE("512",25);\r
-aWE("6",14);\r
-aWE("7",14);\r
-aWE("8",14);\r
-aWE("9",14);\r
-aWE("abl",3,6,24,14,18,28);\r
-aWE("abort",14);\r
-aWE("abov",8,14);\r
-aWE("abscissa",23,25);\r
-aWE("absolut",25);\r
-aWE("abstraction",5);\r
-aWE("ac",14);\r
-aWE("acceptabl",25);\r
-aWE("acces",3,1,23,24,25,16,18,21,28);\r
-aWE("accessibl",10,27);\r
-aWE("accord",25,15,16,14);\r
-aWE("account",14);\r
-aWE("achiev",3);\r
-aWE("acquaint",4);\r
-aWE("action",25,14);\r
-aWE("activ",5,6,25,16,17);\r
-aWE("activat",5,16,17);\r
-aWE("activity",25);\r
-aWE("actual",5,14);\r
-aWE("ad",0,14,26,19);\r
-aWE("adapt",3);\r
-aWE("add",15,16,14,26,18,19);\r
-aWE("addition",5,14);\r
-aWE("additional",3,2,25,15,16,14,21);\r
-aWE("addres",25);\r
-aWE("adjust",25);\r
-aWE("advanc",14,19);\r
-aWE("affect",3);\r
-aWE("again",6,12,14,17);\r
-aWE("algorithm",3,11,14);\r
-aWE("allow",3,0,7,1,11,23,24,25,15,16,14,17,26,18,27,19,22,28);\r
-aWE("almost",17);\r
-aWE("along",11,18,28);\r
-aWE("alongsid",19);\r
-aWE("alpha",25);\r
-aWE("already",14);\r
-aWE("alway",11);\r
-aWE("amount",14);\r
-aWE("animation",25);\r
-aWE("anoth",3,17);\r
-aWE("any",3,4,6,1,8,11,12,25,15,16,14,17,27);\r
-aWE("anyth",14);\r
-aWE("ap",27);\r
-aWE("api",0,25);\r
-aWE("appear",0,8,9,14,18,19,22);\r
-aWE("appearanc",23);\r
-aWE("applet",4);\r
-aWE("appli",1);\r
-aWE("application",3,6,0,10,2,15,16,14,17,18,27,19);\r
-aWE("approach",11,16,14);\r
-aWE("appropriat",10,14);\r
-aWE("approximat",14);\r
-aWE("arabic",26);\r
-aWE("architectur",3,0,10);\r
-aWE("area",6,24,16,18,28);\r
-aWE("argument",14);\r
-aWE("around",24,28);\r
-aWE("arrang",25);\r
-aWE("ascii",17,18);\r
-aWE("assign",25);\r
-aWE("associat",13,25,21);\r
-aWE("attach",10,14);\r
-aWE("attribut",14,21);\r
-aWE("author",8,19);\r
-aWE("auto",18);\r
-aWE("automatic",23,14,18);\r
-aWE("automatical",0,23,13,25,15,16,14,17,27);\r
-aWE("availability",7);\r
-aWE("availabl",3,5,7,10,24,14,28);\r
-aWE("averag",25);\r
-aWE("avi",25);\r
-aWE("avoid",0,14);\r
-aWE("awar",14);\r
-aWE("ax",24,18,28);\r
-aWE("axi",18,28);\r
-aWE("b",14);\r
-aWE("back",23,14);\r
-aWE("background",25,18);\r
-aWE("bar",23,25,21);\r
-aWE("bas",3,10,2,24,14,17);\r
-aWE("bash",14);\r
-aWE("basi",3,24,25);\r
-aWE("basic",3,11,16,14,26);\r
-aWE("batch",3,0,15,14);\r
-aWE("be",1,14);\r
-aWE("becom",6,25,14);\r
-aWE("befor",14);\r
-aWE("begin",14,18,22);\r
-aWE("behav",3);\r
-aWE("behavior",10,14);\r
-aWE("behaviour",25);\r
-aWE("below",12,25,14);\r
-aWE("bet",25);\r
-aWE("bicolor",25);\r
-aWE("big",25);\r
-aWE("bin",15,14,19);\r
-aWE("binari",14);\r
-aWE("binary",17);\r
-aWE("blu",14);\r
-aWE("blur",3);\r
-aWE("bmp",24,28);\r
-aWE("bold",14);\r
-aWE("book",20);\r
-aWE("boost",14);\r
-aWE("boost_version",14);\r
-aWE("boostdir",14);\r
-aWE("border",23,16);\r
-aWE("both",2,23,25,14);\r
-aWE("bottom",10,23,25,14,18);\r
-aWE("bound",24,28);\r
-aWE("boundari",1);\r
-aWE("box",0,1,8,23,24,13,25,14,17,26,18,27,19,22,28);\r
-aWE("bracket",14);\r
-aWE("break",14);\r
-aWE("brep",10);\r
-aWE("brief",6,12);\r
-aWE("bring",2);\r
-aWE("brows",4,5,6,0,2,13,25,16,14,17,18,19,21);\r
-aWE("build",25,14,19);\r
-aWE("built",11,25,14);\r
-aWE("button",2,12,24,13,25,14,17,26,18,27,19,22,28);\r
-aWE("button_label",14);\r
-aWE("button_script",14);\r
-aWE("button_tooltip",14);\r
-aWE("c",3,15,14);\r
-aWE("ca",10);\r
-aWE("cad",10,11);\r
-aWE("cal",3,0,14);\r
-aWE("calculation",9,10,11);\r
-aWE("call",14,17,19,22);\r
-aWE("cam",3);\r
-aWE("camera",25);\r
-aWE("cancel",14);\r
-aWE("capability",19);\r
-aWE("caption",14);\r
-aWE("car",10);\r
-aWE("careful",14);\r
-aWE("carri",23);\r
-aWE("carry",10);\r
-aWE("cas",3,8,11,25,16,14,17);\r
-aWE("cascad",24,14);\r
-aWE("casroot",14);\r
-aWE("catalog",19);\r
-aWE("catalogmodulegeneral",19);\r
-aWE("catalogmodulepersonnel",19);\r
-aWE("catalogu",2,15);\r
-aWE("categori",20);\r
-aWE("cd",14);\r
-aWE("cel",25,26);\r
-aWE("cent",24,28);\r
-aWE("center",25);\r
-aWE("centr",25);\r
-aWE("central",25);\r
-aWE("centraliz",15);\r
-aWE("chang",3,6,8,23,24,25,16,14,17,18,27,28);\r
-aWE("channel",25);\r
-aWE("chapter",4);\r
-aWE("character",26);\r
-aWE("charg",14);\r
-aWE("check",0,25,16,14,18,28);\r
-aWE("check_enabl",14);\r
-aWE("check_version",14);\r
-aWE("checkbox",23,25,14,18);\r
-aWE("choic",0,25,14,26);\r
-aWE("choos",5,7,1,8,23,24,13,25,16,14,26,19,22,28);\r
-aWE("chosen",25,26,19);\r
-aWE("clamp",25);\r
-aWE("classic",16);\r
-aWE("clean",25);\r
-aWE("clear",14);\r
-aWE("clearall",16);\r
-aWE("click",5,6,0,7,1,8,23,12,24,13,25,16,14,17,26,18,27,19,20,21,22,28);\r
-aWE("clickabl",12);\r
-aWE("client",3);\r
-aWE("clip",24,25);\r
-aWE("clon",24);\r
-aWE("clos",3,12,25,14,17,27,20);\r
-aWE("cluster",3);\r
-aWE("cod",3,14);\r
-aWE("coef",23);\r
-aWE("coincid",14);\r
-aWE("collect",14);\r
-aWE("color",1,23,25,26,18,28);\r
-aWE("column",18,21,22);\r
-aWE("combin",11,25);\r
-aWE("comfortabl",16);\r
-aWE("comma",14);\r
-aWE("command",3,0,15,14);\r
-aWE("common",2,11,16,14,17,27);\r
-aWE("compar",3,23);\r
-aWE("compil",14);\r
-aWE("complet",8,14,20,22);\r
-aWE("complex",3,10);\r
-aWE("component",3,4,0,7,10,2,11,12,13,25,16,17,18,19,21,22);\r
-aWE("compos",25);\r
-aWE("comput",14,18);\r
-aWE("computation",3,10);\r
-aWE("computational",10);\r
-aWE("concept",3,12);\r
-aWE("concern",10,14);\r
-aWE("conclusion",3);\r
-aWE("config",14);\r
-aWE("config_fil",14);\r
-aWE("config_mandrake_10",14);\r
-aWE("configur",10,14);\r
-aWE("configurabl",11);\r
-aWE("configuration",14);\r
-aWE("confirm",0,14);\r
-aWE("confirmation",14);\r
-aWE("conflict",14);\r
-aWE("connect",9,11,13,16,18);\r
-aWE("consist",16);\r
-aWE("consol",6,10,15,16,14,17,18);\r
-aWE("constant",3,15);\r
-aWE("construction",10,11,24);\r
-aWE("consum",0,14);\r
-aWE("contain",3,4,5,0,8,13,15,16,14,27,19,20,21,22);\r
-aWE("container",15);\r
-aWE("content",0,24,25,14,20,28);\r
-aWE("context",16,14,21);\r
-aWE("continu",14);\r
-aWE("control",5,23,25);\r
-aWE("convert",0,14);\r
-aWE("cooperat",11);\r
-aWE("coordinat",24,18,28);\r
-aWE("copi",25);\r
-aWE("copy",7,16,14,17);\r
-aWE("copyright",14);\r
-aWE("corba",3,5,2,15);\r
-aWE("corn",25,17,26);\r
-aWE("correct",16);\r
-aWE("correspond",23,13,25,15,14,20);\r
-aWE("cost",10);\r
-aWE("coupl",3,10);\r
-aWE("cpp",15);\r
-aWE("cppcontain",15);\r
-aWE("creat",3,4,5,6,0,9,10,2,11,23,24,13,25,15,16,14,17,18,19,21);\r
-aWE("creation",3,2,25,14);\r
-aWE("cros",12,24,17);\r
-aWE("csh",15,14);\r
-aWE("cshell",15);\r
-aWE("ctrl",25);\r
-aWE("current",6,0,8,12,24,25,15,14,17,18,27,21,22);\r
-aWE("cursor",25);\r
-aWE("curv",25,18);\r
-aWE("custom",10,15,26,18,19);\r
-aWE("customiz",14);\r
-aWE("customization",3,14);\r
-aWE("cut",25);\r
-aWE("cutlin",25);\r
-aWE("cycl",25);\r
-aWE("cyrillic",26);\r
-aWE("d",14);\r
-aWE("dat",8,22);\r
-aWE("data",3,5,0,9,10,2,11,25,17,18,19);\r
-aWE("databas",3);\r
-aWE("debug",21);\r
-aWE("decreas",25);\r
-aWE("default",5,1,23,24,25,15,16,14,17,18,27,21,28);\r
-aWE("defin",3,0,1,10,23,24,25,14,26,28);\r
-aWE("definit",3,5,7,15,16,21,22);\r
-aWE("definition",3,1,10,20);\r
-aWE("deform",28);\r
-aWE("delay",10);\r
-aWE("delet",17);\r
-aWE("demand",10,2,25);\r
-aWE("depend",7,25,14,21);\r
-aWE("dependanci",14);\r
-aWE("dependenci",14);\r
-aWE("deriv",3);\r
-aWE("describ",3,4,14,19);\r
-aWE("description",15,14,19);\r
-aWE("design",10,25);\r
-aWE("desir",19);\r
-aWE("desktop",6,9,2,16,14,17);\r
-aWE("destin",9,16,21,22);\r
-aWE("destination",12,14);\r
-aWE("detail",14,18);\r
-aWE("develop",3,24,14);\r
-aWE("development",3,10);\r
-aWE("devic",25);\r
-aWE("diagram",23);\r
-aWE("dialog",0,1,8,23,13,25,16,14,17,26,18,27,19,22);\r
-aWE("dif",14);\r
-aWE("differ",16);\r
-aWE("differenc",3,16,14,17);\r
-aWE("different",3,4,5,9,13,25,15,16,14,17,21);\r
-aWE("digit",23);\r
-aWE("digital",10);\r
-aWE("dir",14);\r
-aWE("direct",14);\r
-aWE("direction",6,24,25);\r
-aWE("directori",14,18);\r
-aWE("directory",15,14,17,18,27,19);\r
-aWE("disabl",25,15,14);\r
-aWE("disable_flag",14);\r
-aWE("disk",15,14);\r
-aWE("display",6,1,23,12,24,25,15,16,14,17,18,20,21,22,28);\r
-aWE("distanc",25,28);\r
-aWE("distinction",3);\r
-aWE("distribut",3);\r
-aWE("distribution",14);\r
-aWE("divid",4,25,22);\r
-aWE("do",7,14);\r
-aWE("dockabl",6,2,16,17);\r
-aWE("document",5,0,9,16,14);\r
-aWE("doesn",24);\r
-aWE("domain",3,11);\r
-aWE("dominant",25);\r
-aWE("don",24,25,14,19,28);\r
-aWE("dot",14);\r
-aWE("doubl",22);\r
-aWE("down",8,12);\r
-aWE("downward",24,28);\r
-aWE("doxygen",14);\r
-aWE("drag",24,16,28);\r
-aWE("dramatical",3);\r
-aWE("drawn",24,28);\r
-aWE("driv",14);\r
-aWE("drop",12,16);\r
-aWE("dump",0,24,28);\r
-aWE("dumpversion",14);\r
-aWE("duplicat",24);\r
-aWE("dynamic",2);\r
-aWE("dynamical",11,25);\r
-aWE("e",2,15,16,14,17);\r
-aWE("easi",3,10);\r
-aWE("easy",3);\r
-aWE("economical",3);\r
-aWE("edg",1,23);\r
-aWE("edit",7,8,2,25,15,14);\r
-aWE("editabl",25);\r
-aWE("edition",25);\r
-aWE("editor",27);\r
-aWE("efficient",10);\r
-aWE("eith",25,14,26,18,19);\r
-aWE("electrical",10);\r
-aWE("electronic",10);\r
-aWE("element",10,23,25);\r
-aWE("embed",15);\r
-aWE("empty",6);\r
-aWE("enabl",14,18,20);\r
-aWE("encourag",3);\r
-aWE("end",3,25,14,18,27);\r
-aWE("enforc",3);\r
-aWE("engin",3);\r
-aWE("enough",14);\r
-aWE("ensur",3,10);\r
-aWE("ent",8,15,14,17);\r
-aWE("enter",14);\r
-aWE("entity",23);\r
-aWE("entry",18,21);\r
-aWE("env_",14);\r
-aWE("env_build",14);\r
-aWE("env_for_launch",14);\r
-aWE("env_product",14);\r
-aWE("env_vtk",14);\r
-aWE("environment",3,6,9,10,2,15,14);\r
-aWE("environmentpleas",14);\r
-aWE("equal",3,14);\r
-aWE("equipment",10);\r
-aWE("error",0,14);\r
-aWE("etc",3,2,11,25,16,14);\r
-aWE("ev",22);\r
-aWE("even",3,16,14);\r
-aWE("every",10,25,20);\r
-aWE("everyth",14);\r
-aWE("evolution",10);\r
-aWE("evolv",3);\r
-aWE("ex",15);\r
-aWE("exact",25,14);\r
-aWE("examl",14);\r
-aWE("exampl",6,10,16,14,17,19);\r
-aWE("exceed",25);\r
-aWE("except",14,28);\r
-aWE("exception",2,15,14);\r
-aWE("exchang",3);\r
-aWE("execut",14);\r
-aWE("executabl",14);\r
-aWE("execution",10,11);\r
-aWE("exist",3,11,13,14,17,27,19);\r
-aWE("existenc",14);\r
-aWE("expand",12);\r
-aWE("expandability",3);\r
-aWE("expectation",10);\r
-aWE("experienc",14);\r
-aWE("expert",0);\r
-aWE("exploit",3);\r
-aWE("explor",4);\r
-aWE("export",10,23,24,28);\r
-aWE("expos",3);\r
-aWE("extend",24,26,28);\r
-aWE("extension",17,27);\r
-aWE("external",14,18);\r
-aWE("extract",14);\r
-aWE("extreme",10);\r
-aWE("f",15,14);\r
-aWE("fac",23,25,18);\r
-aWE("facilitat",3,11);\r
-aWE("fact",16);\r
-aWE("factory",19);\r
-aWE("fail",14);\r
-aWE("fals",14);\r
-aWE("famili",25);\r
-aWE("featur",4,25,14);\r
-aWE("feel",14);\r
-aWE("field",8,10,23,25,14,26);\r
-aWE("fig",14);\r
-aWE("figur",1,14);\r
-aWE("fil",5,0,8,11,13,25,15,16,14,17,18,27,19);\r
-aWE("fill",23);\r
-aWE("final",14);\r
-aWE("find",14,19,20);\r
-aWE("find_in_path",14);\r
-aWE("fine",3);\r
-aWE("finish",12,25,14);\r
-aWE("finit",10);\r
-aWE("first",0,25,14,18,21);\r
-aWE("fit",24,18,28);\r
-aWE("flag",14);\r
-aWE("flexibility",3,0);\r
-aWE("flexibl",10,2,14);\r
-aWE("focal",25);\r
-aWE("focu",12);\r
-aWE("fold",14,17,21);\r
-aWE("folder",14);\r
-aWE("follow",3,0,8,9,12,13,15,16,14,17,18,27,19,20,22);\r
-aWE("font",23,25,14,26,18,28);\r
-aWE("forc",14);\r
-aWE("forget",19);\r
-aWE("formal",14);\r
-aWE("format",4,10,24,13,18,28);\r
-aWE("forth",25);\r
-aWE("fp",25);\r
-aWE("fram",24,25,14,28);\r
-aWE("framework",2);\r
-aWE("fre",1,10,25);\r
-aWE("friend",10);\r
-aWE("ful",25);\r
-aWE("fulfill",0);\r
-aWE("full",25,20);\r
-aWE("function",0,10,11,16,14,17);\r
-aWE("function_nam",14);\r
-aWE("functional",16);\r
-aWE("functionaliti",10,24,28);\r
-aWE("functionality",3,4,7,9,24,16,19,28);\r
-aWE("fundamental",3);\r
-aWE("furth",14);\r
-aWE("g",15,14);\r
-aWE("gap",23);\r
-aWE("gaus",2,25,28);\r
-aWE("gcc",14);\r
-aWE("general",9,23,16,14,18);\r
-aWE("generat",0,11,25,14,19);\r
-aWE("generator",10,2,19);\r
-aWE("generic",10,11);\r
-aWE("geom",11,14);\r
-aWE("geometrical",1,10,11,24,25);\r
-aWE("geometry",3,1,11,24,25,16);\r
-aWE("get",4,9,10,14,21);\r
-aWE("giv",0,8,16,14,26);\r
-aWE("given",11,25,14);\r
-aWE("gl",25);\r
-aWE("global",24,25,28);\r
-aWE("glossary",20);\r
-aWE("go",12,14);\r
-aWE("good",24);\r
-aWE("graduat",28);\r
-aWE("graph",6,11,18);\r
-aWE("graphic",25);\r
-aWE("graphical",0,2);\r
-aWE("graphviz",14);\r
-aWE("great",0,24,25,28);\r
-aWE("greek",26);\r
-aWE("group",23,24,25,26);\r
-aWE("gui",3,5,0,2,11,15,14,17,18,27);\r
-aWE("guid",14);\r
-aWE("h",15,14);\r
-aWE("half",25);\r
-aWE("hand",3,12,20);\r
-aWE("handl",10,2,15);\r
-aWE("hard",15,14);\r
-aWE("hasn",17);\r
-aWE("hav",11,12,21);\r
-aWE("haven",18);\r
-aWE("hdf",13,14,17,18);\r
-aWE("hdf5",14);\r
-aWE("hdf5hom",14);\r
-aWE("heal",10);\r
-aWE("height",23,25);\r
-aWE("hello",22);\r
-aWE("help",3,4,10,12,13,15,14,18,20,21);\r
-aWE("helpful",14);\r
-aWE("her",23,25,14,18);\r
-aWE("heterogeneou",10);\r
-aWE("hid",24,25,16,18,21,28);\r
-aWE("high",10);\r
-aWE("highlight",23,14,21);\r
-aWE("history",22);\r
-aWE("hom",14,27);\r
-aWE("hop",14);\r
-aWE("horizontal",6,23,25,18);\r
-aWE("host",3);\r
-aWE("hotspot",12);\r
-aWE("hour",14);\r
-aWE("how",3,14);\r
-aWE("hpp",14);\r
-aWE("html",4,20);\r
-aWE("hxx",14);\r
-aWE("i",2,15,16,17);\r
-aWE("icon",5,7,16,19);\r
-aWE("idea",14);\r
-aWE("identification",21,22);\r
-aWE("identify",14);\r
-aWE("idl",3,19);\r
-aWE("ie",18);\r
-aWE("if",5,6,0,7,23,24,13,25,15,16,14,17,18,19,21,28);\r
-aWE("ig",10);\r
-aWE("ignor",14);\r
-aWE("imag",10,24,25,28);\r
-aWE("immediate",12);\r
-aWE("implement",3,14);\r
-aWE("implementation",3,14,19);\r
-aWE("import",0,10,2,11,25,16,14,27);\r
-aWE("important",14);\r
-aWE("impos",25);\r
-aWE("improv",2,14);\r
-aWE("includ",12,25,14,20);\r
-aWE("inclusiv",3);\r
-aWE("increas",0,10,25);\r
-aWE("increment",1,25);\r
-aWE("incremental",3);\r
-aWE("independenc",3);\r
-aWE("independent",3);\r
-aWE("index",23,21);\r
-aWE("indicat",16,17);\r
-aWE("information",3,8,12,25,14,17,20,22);\r
-aWE("initial",9);\r
-aWE("input",10,19);\r
-aWE("insid",3,6,12,25,19);\r
-aWE("inspect",25,14);\r
-aWE("instal",14,19);\r
-aWE("instalation",14);\r
-aWE("install",15,14);\r
-aWE("install_binary",14);\r
-aWE("install_disk_spac",14);\r
-aWE("install_sourc",14);\r
-aWE("install_source_and_build",14);\r
-aWE("install_wizard_caption",14);\r
-aWE("install_wizard_copyright",14);\r
-aWE("install_wizard_license_info",14);\r
-aWE("install_wizard_root_directory",14);\r
-aWE("install_wizard_version",14);\r
-aWE("installation",15,14);\r
-aWE("installation_mod",14);\r
-aWE("installation_script_nam",14);\r
-aWE("installdiskspac",14);\r
-aWE("installwizard_root_directory",14);\r
-aWE("installworkxxxxx",14);\r
-aWE("instanc",5);\r
-aWE("instruction",14);\r
-aWE("instrumental",3);\r
-aWE("integ",14);\r
-aWE("integer",23);\r
-aWE("integrat",3,10,2,11);\r
-aWE("integration",3,10,2,19);\r
-aWE("interaction",2);\r
-aWE("interfac",3,0,10,2,16,19);\r
-aWE("interior",23);\r
-aWE("internal",3,14);\r
-aWE("internet",4);\r
-aWE("interoperability",10);\r
-aWE("interoperabl",21);\r
-aWE("interp",15);\r
-aWE("interpret",2,16);\r
-aWE("interval",25,22);\r
-aWE("introduction",10,2,11,14);\r
-aWE("invalid",17);\r
-aWE("invert",24,25);\r
-aWE("invok",16,14);\r
-aWE("ior",18,21);\r
-aWE("isolat",1);\r
-aWE("isolin",1,18);\r
-aWE("isometric",24,28);\r
-aWE("item",8,10,2);\r
-aWE("iteration",25);\r
-aWE("itself",14);\r
-aWE("java",4);\r
-aWE("jpeg",24,28);\r
-aWE("jpg",24,28);\r
-aWE("just",14,18);\r
-aWE("k",15);\r
-aWE("kbyt",14);\r
-aWE("kernel",11,15,14);\r
-aWE("key",25,14);\r
-aWE("keyboard",25);\r
-aWE("kill",15);\r
-aWE("killall",15);\r
-aWE("kind",8,12);\r
-aWE("know",19);\r
-aWE("knowledg",0);\r
-aWE("l",15);\r
-aWE("label",23,25,14,28);\r
-aWE("languag",3);\r
-aWE("larg",14);\r
-aWE("largest",25);\r
-aWE("last",14,18,22);\r
-aWE("latest",25);\r
-aWE("latin",26);\r
-aWE("launch",4,0,13,15,14,27,19,22);\r
-aWE("lay",5);\r
-aWE("layout",0,17);\r
-aWE("ld_library_path",14);\r
-aWE("lead",17);\r
-aWE("learn",10,14);\r
-aWE("left",23,24,25,14,26,18,20,28);\r
-aWE("legend",18);\r
-aWE("length",25,28);\r
-aWE("les",25);\r
-aWE("level",3,23,25);\r
-aWE("lib",14);\r
-aWE("libcosnotify4",14);\r
-aWE("libhdf5",14);\r
-aWE("libm",14);\r
-aWE("libomniorb4",14);\r
-aWE("librari",14);\r
-aWE("library",2,14);\r
-aWE("libvtkcommon",14);\r
-aWE("licens",14);\r
-aWE("lik",3,6,12,25,16,14,17,19,21);\r
-aWE("like",14);\r
-aWE("limit",25);\r
-aWE("limitation",25);\r
-aWE("lin",4,1,23,25,15,14,18);\r
-aWE("linear",18);\r
-aWE("link",3,10,12);\r
-aWE("linux",4,14);\r
-aWE("list",8,12,25,15,14,18,20,22);\r
-aWE("list_of_prerequisit",14);\r
-aWE("ll",24,18,28);\r
-aWE("load",3,0,2,13,25,15,16,18,27,21);\r
-aWE("local",25);\r
-aWE("locat",3,24,25,15,16,18,20,21,28);\r
-aWE("location",0,19);\r
-aWE("lock",8,24,25,28);\r
-aWE("log",15,14);\r
-aWE("logarithmic",25,18);\r
-aWE("long",3,14);\r
-aWE("look",14,19,20);\r
-aWE("lookout",23,25);\r
-aWE("lost",17);\r
-aWE("lot",16);\r
-aWE("low",25,14,26,20);\r
-aWE("m",15);\r
-aWE("machin",3,17,22);\r
-aWE("macintosh",4);\r
-aWE("macro",3,14);\r
-aWE("magnification",25);\r
-aWE("main",5,0,7,8,10,13,25,16,14,17,18,19,22);\r
-aWE("major",14);\r
-aWE("mak",5,10,23,14);\r
-aWE("make_dir",14);\r
-aWE("make_env",14);\r
-aWE("manag",10,18);\r
-aWE("management",10,2,16);\r
-aWE("mandrak",14);\r
-aWE("mandrake10",14);\r
-aWE("manipulat",25);\r
-aWE("manipulator",25);\r
-aWE("manual",4,0,24,14,18,28);\r
-aWE("map",3);\r
-aWE("mark",24,25,14,18,28);\r
-aWE("marker",18);\r
-aWE("market",10);\r
-aWE("massive",3);\r
-aWE("mast",14);\r
-aWE("match",20);\r
-aWE("matrix",25);\r
-aWE("max",25);\r
-aWE("maximiz",5);\r
-aWE("maximum",25);\r
-aWE("mean",6,9,25,16,14,17);\r
-aWE("mechanism",0,2,15);\r
-aWE("med2hom",14);\r
-aWE("meet",10);\r
-aWE("memoris",24);\r
-aWE("memory",25);\r
-aWE("mention",14);\r
-aWE("menu",3,5,0,7,8,2,23,12,13,25,16,17,26,18,27,19,21,22);\r
-aWE("menubar",16);\r
-aWE("mesh",3,10,11,23,24,25,16,14,28);\r
-aWE("messag",8,2,15,14);\r
-aWE("min",25);\r
-aWE("minimiz",5);\r
-aWE("minimum",25);\r
-aWE("minor",14);\r
-aWE("mistak",16);\r
-aWE("mix",16);\r
-aWE("mod",3,0,1,23,25,15,14);\r
-aWE("model",3,10,11,23);\r
-aWE("modern",10);\r
-aWE("modifi",14);\r
-aWE("modification",3,0,8);\r
-aWE("modify",0,10,14);\r
-aWE("modul",3,4,7,1,2,11,23,24,25,15,16,14,17,18,27,19,28);\r
-aWE("module1",15);\r
-aWE("module2",15);\r
-aWE("modulecatalog",15);\r
-aWE("modulu",25);\r
-aWE("moment",25,14);\r
-aWE("momentari",25);\r
-aWE("mous",23,24,25,16,28);\r
-aWE("mov",6);\r
-aWE("movement",25);\r
-aWE("mozilla",18);\r
-aWE("msg2qm",14);\r
-aWE("msg2qm_root",14);\r
-aWE("much",14);\r
-aWE("multi",6,9,10,2,16,19);\r
-aWE("multifil",17,18);\r
-aWE("multipl",17);\r
-aWE("multipli",25);\r
-aWE("multiti",3);\r
-aWE("must",3,10,11);\r
-aWE("n",25,15,14);\r
-aWE("nam",3,5,0,8,14,17,19,21,22,28);\r
-aWE("nativ",14);\r
-aWE("natur",7);\r
-aWE("natural",3);\r
-aWE("navigat",12,14);\r
-aWE("navigation",4,12,25);\r
-aWE("navigator",4);\r
-aWE("ne",6,12,14,26,18);\r
-aWE("necessary",0,23,15,16,14,17,21);\r
-aWE("need",25);\r
-aWE("negativ",25);\r
-aWE("netgen",14);\r
-aWE("netgenroot",14);\r
-aWE("netscap",4,18);\r
-aWE("new",3,5,8,9,10,24,25,14,17,18,27,19);\r
-aWE("next",8,15,14,27,19);\r
-aWE("nod",23,19);\r
-aWE("normal",6);\r
-aWE("not",15,14);\r
-aWE("notation",14);\r
-aWE("noticeab",3);\r
-aWE("notifd",14);\r
-aWE("notification",27);\r
-aWE("notify",25);\r
-aWE("notion",9);\r
-aWE("now",16);\r
-aWE("nth",25);\r
-aWE("null",25);\r
-aWE("numb",11,23,25,15,14,18,27,22,28);\r
-aWE("number",23,25,14);\r
-aWE("numeric",10,11,14,26);\r
-aWE("numerical",3,9,10);\r
-aWE("numerou",15);\r
-aWE("object",3,5,6,0,7,2,23,24,13,25,16,17,18,27,21,28);\r
-aWE("objectiv",3);\r
-aWE("obligatory",14);\r
-aWE("observ",25);\r
-aWE("occ",5,6,2,24,18);\r
-aWE("occ_version_maintenanc",14);\r
-aWE("occ_version_major",14);\r
-aWE("occ_version_minor",14);\r
-aWE("occupi",14);\r
-aWE("occur",14);\r
-aWE("off",14);\r
-aWE("offer",3);\r
-aWE("offic",14);\r
-aWE("official",14);\r
-aWE("offset",28);\r
-aWE("often",10);\r
-aWE("ok",13,14,27);\r
-aWE("omg",3);\r
-aWE("omninotify",14);\r
-aWE("omniorb",14);\r
-aWE("omniorbdir",14);\r
-aWE("omniorbpy",14);\r
-aWE("on",3,6,0,7,2,12,13,25,15,16,14,17,26,18,27,19);\r
-aWE("onc",25);\r
-aWE("onlin",20);\r
-aWE("opaqu",25);\r
-aWE("open",6,0,9,10,11,12,24,13,25,15,14,17,19,20);\r
-aWE("operat",0);\r
-aWE("operation",7,9,23,25,14,17);\r
-aWE("optimiz",10,25,14);\r
-aWE("optimization",11);\r
-aWE("option",7,8,13,25,15,16,14,17,18,21);\r
-aWE("optional",10,11,14);\r
-aWE("ord",14);\r
-aWE("ordinat",23,25);\r
-aWE("org",3);\r
-aWE("orientat",24,28);\r
-aWE("orientation",23,24,25);\r
-aWE("origin",23,24,25,28);\r
-aWE("original",0);\r
-aWE("originality",11);\r
-aWE("os",14);\r
-aWE("os_version",14);\r
-aWE("other",4,0);\r
-aWE("otherwis",0,25,14,17);\r
-aWE("out",10,23,24,26,28);\r
-aWE("outlin",23);\r
-aWE("output",2,14);\r
-aWE("outsid",25,16);\r
-aWE("overrid",14);\r
-aWE("overridden",14);\r
-aWE("own",2,11,16,14);\r
-aWE("p",15);\r
-aWE("packag",15,14,19);\r
-aWE("pag",14,20);\r
-aWE("pan",12,24,17,20,28);\r
-aWE("parallel",3);\r
-aWE("paramet",14,19);\r
-aWE("parameter",3,25,26,18,19,28);\r
-aWE("parent",25);\r
-aWE("part",6,24,16,14,28);\r
-aWE("particular",10,17);\r
-aWE("party",11,14);\r
-aWE("past",7,16);\r
-aWE("patch",14);\r
-aWE("patent",25);\r
-aWE("path",25,14);\r
-aWE("pc",3);\r
-aWE("per",25);\r
-aWE("perform",10,11,23,24,25,14,28);\r
-aWE("performanc",3,9,10,25,14);\r
-aWE("period",25);\r
-aWE("permission",14);\r
-aWE("phenomena",3);\r
-aWE("phras",20);\r
-aWE("physic",10);\r
-aWE("physical",3,10,11);\r
-aWE("pick",25,14);\r
-aWE("pickup",14);\r
-aWE("pickup_env",14);\r
-aWE("pickup_env_flag",14);\r
-aWE("pickupenv",14);\r
-aWE("pictur",8);\r
-aWE("pid",22);\r
-aWE("piec",3);\r
-aWE("pixel",25);\r
-aWE("plac",6,2,24,16,14,28);\r
-aWE("placement",23,25);\r
-aWE("plan",24,14);\r
-aWE("platform",3,4,6,0,9,10,2,11,15,16,14,17,19,22);\r
-aWE("play",0);\r
-aWE("pleas",14);\r
-aWE("plot",6,2,25);\r
-aWE("plot2d",5,18);\r
-aWE("plug",2);\r
-aWE("png",24,28);\r
-aWE("po",14);\r
-aWE("point",3,1,2,23,24,25,14,18,28);\r
-aWE("pop",12,13,16,21);\r
-aWE("popup",12);\r
-aWE("port",15);\r
-aWE("portkill",15);\r
-aWE("position",24,25,16,17,18,28);\r
-aWE("positive",16);\r
-aWE("possibility",3,0,15,14,26,19);\r
-aWE("possibl",3,0,16,14,17,26,21);\r
-aWE("post",3,10,11,25,16,17,28);\r
-aWE("powerful",2);\r
-aWE("pr",10,11,14);\r
-aWE("precision",23);\r
-aWE("precompil",14);\r
-aWE("predefin",3,14,26);\r
-aWE("preferabl",15);\r
-aWE("preferenc",1,23,25,26,18,27,21);\r
-aWE("preinstal",14);\r
-aWE("prerequisit",14);\r
-aWE("pres",24,25,14,18,28);\r
-aWE("preselect",23);\r
-aWE("preselection",23);\r
-aWE("present",23,25);\r
-aWE("presentation",5,23,25,16,18,28);\r
-aWE("prevent",25);\r
-aWE("preview",24,25,26);\r
-aWE("previou",13,14);\r
-aWE("previous",11,13,25,14,17);\r
-aWE("primitiv",25);\r
-aWE("print",15,14);\r
-aWE("print_env",14);\r
-aWE("priority",10);\r
-aWE("pro",3,11,25,16,17,28);\r
-aWE("probab",5);\r
-aWE("problem",0,10,14);\r
-aWE("proce",9,14);\r
-aWE("procedur",15,14);\r
-aWE("proces",3,0,10,2,11,25,14,22);\r
-aWE("processor",3,10);\r
-aWE("produc",25);\r
-aWE("product",10,15,14);\r
-aWE("product_context",14);\r
-aWE("product_description",14);\r
-aWE("product_nam",14);\r
-aWE("product_script_nam",14);\r
-aWE("product_version",14);\r
-aWE("productivity",3,0);\r
-aWE("products_directory",14);\r
-aWE("profil",15);\r
-aWE("program",3,14);\r
-aWE("programmatic",10);\r
-aWE("progres",25,14);\r
-aWE("progressiv",25);\r
-aWE("prompt",15,14);\r
-aWE("pron",0);\r
-aWE("proper",14);\r
-aWE("properti",8,10,11,25,18,28);\r
-aWE("proportional",25);\r
-aWE("propos",2,14);\r
-aWE("provid",3,7,10,2,11,24,25,15,14,26,19,20,22);\r
-aWE("publish",0,17);\r
-aWE("pur",3);\r
-aWE("purpos",9,21);\r
-aWE("put",14);\r
-aWE("py",15,14);\r
-aWE("pycontain",15);\r
-aWE("pyqt",14);\r
-aWE("pyqtconfig",14);\r
-aWE("pyqtdir",14);\r
-aWE("pyramid",25);\r
-aWE("python",3,6,0,10,2,15,16,14,17,18);\r
-aWE("pythonhom",14);\r
-aWE("pythonpath",14);\r
-aWE("qglobal",14);\r
-aWE("qm",14);\r
-aWE("qt",14);\r
-aWE("qt_version_str",14);\r
-aWE("qtdir",14);\r
-aWE("quality",10,23,25);\r
-aWE("quantiti",10);\r
-aWE("quick",14,18,21);\r
-aWE("quit",0,14,17,27);\r
-aWE("quot",14);\r
-aWE("qwt",14);\r
-aWE("qwt_global",14);\r
-aWE("qwt_version_str",14);\r
-aWE("qwthom",14);\r
-aWE("r",15);\r
-aWE("radio",14);\r
-aWE("rainbow",25);\r
-aWE("rang",11,25);\r
-aWE("rapid",3);\r
-aWE("rat",25);\r
-aWE("rath",0);\r
-aWE("ratio",25);\r
-aWE("re",0,12,14);\r
-aWE("reactivity",10);\r
-aWE("read",10,12,14);\r
-aWE("readm",14);\r
-aWE("real",25);\r
-aWE("realiz",9);\r
-aWE("reason",14);\r
-aWE("reassign",25);\r
-aWE("receiv",27);\r
-aWE("recommend",25,14);\r
-aWE("record",8,25);\r
-aWE("red",14,21);\r
-aWE("redefin",28);\r
-aWE("redirect",15);\r
-aWE("reduc",10);\r
-aWE("ref",14,18,27);\r
-aWE("refer",14);\r
-aWE("referenc",4,12,25,18,21);\r
-aWE("refin",10,25);\r
-aWE("refresh",22);\r
-aWE("refreshment",22);\r
-aWE("regim",25);\r
-aWE("registry",2,15,22);\r
-aWE("reinstal",14);\r
-aWE("reinstall",14);\r
-aWE("reinstallation",14);\r
-aWE("relat",12,20);\r
-aWE("relativ",23,14,18);\r
-aWE("releas",14);\r
-aWE("release_not",14);\r
-aWE("relevant",12);\r
-aWE("reliability",10);\r
-aWE("reload",17);\r
-aWE("relocat",16);\r
-aWE("remain",3,24);\r
-aWE("remot",5,24,28);\r
-aWE("remov",24,25,14,18);\r
-aWE("renam",17);\r
-aWE("rend",25);\r
-aWE("render",25);\r
-aWE("reopen",18);\r
-aWE("repeat",25);\r
-aWE("represent",3,9,10,11,24,20,28);\r
-aWE("representation",6,11,24,25,18);\r
-aWE("representativ",25);\r
-aWE("requir",10,13,25,14,17);\r
-aWE("requirement",3,10,15);\r
-aWE("requisit",14);\r
-aWE("reset",24,14,28);\r
-aWE("resiz",24,18,28);\r
-aWE("resolution",25);\r
-aWE("resolv",0);\r
-aWE("resourc",2,25,15,14);\r
-aWE("respectiv",1,25,27);\r
-aWE("respective",25);\r
-aWE("respond",3);\r
-aWE("responsibl",14);\r
-aWE("rest",18);\r
-aWE("restart",14);\r
-aWE("restor",10,24,25,17,18,27,28);\r
-aWE("result",9,10,24,25);\r
-aWE("resum",14);\r
-aWE("retriev",14);\r
-aWE("retroactiv",27);\r
-aWE("return",24,14);\r
-aWE("reus",3);\r
-aWE("reusabl",10);\r
-aWE("reversib",0,25);\r
-aWE("right",6,12,13,25,16,14,17,26,18,20,21);\r
-aWE("risk",10);\r
-aWE("robustnes",10);\r
-aWE("rol",3);\r
-aWE("root",14);\r
-aWE("rotat",24,25,28);\r
-aWE("rotation",24,25,28);\r
-aWE("rul",14);\r
-aWE("run",3,15,14,19,22);\r
-aWE("runic",26);\r
-aWE("runinstall",14);\r
-aWE("runsalom",15,19);\r
-aWE("runsalomewithport",19);\r
-aWE("s",3,12,15,14);\r
-aWE("saf",2);\r
-aWE("salom",3,4,5,6,0,7,9,10,2,11,12,13,25,15,16,14,17,18,27,19,20,21,22);\r
-aWE("salome_",14);\r
-aWE("salome_modulecatalog_serv",19);\r
-aWE("salomeapp",15);\r
-aWE("salomeapprc",27);\r
-aWE("salomed",0);\r
-aWE("sam",6,12,25,16,14,17,19,22);\r
-aWE("sampl",14,26);\r
-aWE("sav",3,0,10,2,24,16,14,17,18,27);\r
-aWE("scal",3,25,18,28);\r
-aWE("scalar",23,25);\r
-aWE("scen",24,28);\r
-aWE("schem",3,10,14);\r
-aWE("schema",10);\r
-aWE("scientific",3);\r
-aWE("screen",6,15);\r
-aWE("script",3,0,15,14,26,19);\r
-aWE("scroll",8);\r
-aWE("se",6,8,24,13,14,17,18,19,21,28);\r
-aWE("search",4,13,14,17,20);\r
-aWE("second",0,25,14);\r
-aWE("section",24,16,14,18);\r
-aWE("seen",23);\r
-aWE("select",5,6,0,1,8,23,24,13,25,14,17,26,18,20,28);\r
-aWE("selectall",16);\r
-aWE("selection",2,23,25);\r
-aWE("send",14);\r
-aWE("sensitiv",16,21);\r
-aWE("separat",3,25,16,14);\r
-aWE("serv",3,19);\r
-aWE("server",3,15);\r
-aWE("servic",3,14,19);\r
-aWE("session",1,23,13,25,15,17,18,27,21,22);\r
-aWE("set",4,0,1,8,10,23,24,25,15,16,14,17,18,27,21,22,28);\r
-aWE("setting",25,16,14,17,18,27);\r
-aWE("sever",10);\r
-aWE("sh",14);\r
-aWE("shad",1,23,25);\r
-aWE("shap",24,25);\r
-aWE("shar",15);\r
-aWE("shel",14);\r
-aWE("shell",2,11,15,14);\r
-aWE("short",14,20);\r
-aWE("shot",6);\r
-aWE("should",9,14,17,19);\r
-aWE("show",24,25,14,28);\r
-aWE("shown",8,14);\r
-aWE("shrink",23);\r
-aWE("sid",23,25,14);\r
-aWE("signal",2,14);\r
-aWE("signatur",14);\r
-aWE("sigterm",14);\r
-aWE("silent",14);\r
-aWE("simp",14);\r
-aWE("simpl",3);\r
-aWE("simplify",14);\r
-aWE("simulat",3);\r
-aWE("simulation",10,11);\r
-aWE("simultaneous",6,9,25,14);\r
-aWE("sinc",2);\r
-aWE("singl",14);\r
-aWE("sip",14);\r
-aWE("sipdir",14);\r
-aWE("situation",3);\r
-aWE("siz",6,23,25,16,17,26,18);\r
-aWE("skip",14);\r
-aWE("slow",25);\r
-aWE("small",24,28);\r
-aWE("smallest",25);\r
-aWE("smooth",18);\r
-aWE("smoothnes",25);\r
-aWE("so",3,7,25,15,14,20,21);\r
-aWE("softwar",3,10,11);\r
-aWE("solution",10);\r
-aWE("solv",10);\r
-aWE("solver",10,11);\r
-aWE("someth",14);\r
-aWE("sort",18);\r
-aWE("sort_path",14);\r
-aWE("sourc",10,11,15,14);\r
-aWE("spac",23,25,14);\r
-aWE("spacemous",25);\r
-aWE("spe",25);\r
-aWE("special",3,13,25,15,16,14,17,18);\r
-aWE("specifi",3,25);\r
-aWE("specific",3,0,10,15,16,14,27,20);\r
-aWE("specification",11);\r
-aWE("specify",17,18,19);\r
-aWE("spher",25);\r
-aWE("spin",1);\r
-aWE("splash",15);\r
-aWE("splin",18);\r
-aWE("split",6);\r
-aWE("sprit",25);\r
-aWE("stamp",25);\r
-aWE("standalon",2,15);\r
-aWE("standard",3,5,2,13,25,16,14,17,27,19);\r
-aWE("standard_version",14);\r
-aWE("start",6,9,25,16,14,18,27,19,22);\r
-aWE("start_salom",14);\r
-aWE("stat",0,14,17,18);\r
-aWE("station",3);\r
-aWE("statu",14);\r
-aWE("step",1,10,25,14);\r
-aWE("stop",14);\r
-aWE("stor",3,0,13,14,17,18,19);\r
-aWE("str",14);\r
-aWE("stretch",28);\r
-aWE("strict",24,14,28);\r
-aWE("strong",14);\r
-aWE("struck",26);\r
-aWE("structur",3,10,2,13,25,14,21);\r
-aWE("structural",10);\r
-aWE("studi",5,6,7,9,10,2,13,16,17);\r
-aWE("study",3,5,6,0,7,8,9,10,2,13,25,15,16,17,18,27,19,21,22);\r
-aWE("study1",5);\r
-aWE("stuf",28);\r
-aWE("styl",26,18);\r
-aWE("sub",24,14,20);\r
-aWE("submenu",5,16,18);\r
-aWE("subsequent",14);\r
-aWE("subset",26);\r
-aWE("substitut",25);\r
-aWE("successful",14);\r
-aWE("suit",2);\r
-aWE("summariz",14);\r
-aWE("superposition",25);\r
-aWE("superv",15);\r
-aWE("supervcontain",15);\r
-aWE("supervision",2,15,19);\r
-aWE("supervisor",11,18,19);\r
-aWE("supplementary",21,22);\r
-aWE("suppli",14);\r
-aWE("support",10,14,19);\r
-aWE("supported_installation_mod",14);\r
-aWE("sur",14);\r
-aWE("surfac",23);\r
-aWE("sweep",25);\r
-aWE("swig",14);\r
-aWE("switch",6,2,25,14);\r
-aWE("symbol",14);\r
-aWE("system",3,4,10,12,25,14,20);\r
-aWE("t",7,24,25,15,16,14,17,18,19,28);\r
-aWE("tab",6,20,22);\r
-aWE("tabl",25,26);\r
-aWE("tag",14);\r
-aWE("tailor",10);\r
-aWE("tak",3,14);\r
-aWE("taken",25,15,14);\r
-aWE("target",14);\r
-aWE("target_directory",14);\r
-aWE("target_platform",14);\r
-aWE("targetdir",14);\r
-aWE("task",0);\r
-aWE("tcl",14);\r
-aWE("tcl_version",14);\r
-aWE("tclconfig",14);\r
-aWE("tclhom",14);\r
-aWE("technologi",3);\r
-aWE("technological",10);\r
-aWE("technology",3,24);\r
-aWE("temp_directory",14);\r
-aWE("temp_fold",14);\r
-aWE("tempdir",14);\r
-aWE("temporary",14);\r
-aWE("temporarydiskspac",14);\r
-aWE("tensor",25);\r
-aWE("term",10,12,20);\r
-aWE("terminal",15,14);\r
-aWE("test",3,14,19);\r
-aWE("text",12,14,20);\r
-aWE("textur",25);\r
-aWE("them",3,6,10,23,24,15,16,14,26,22,28);\r
-aWE("therefor",14);\r
-aWE("third",11);\r
-aWE("thos",14,18,20);\r
-aWE("thre",14);\r
-aWE("threshold",25);\r
-aWE("thu",3,0,14);\r
-aWE("tick",28);\r
-aWE("tim",3,6,0,8,10,25,15,14,17,27,19,22);\r
-aWE("tip",14);\r
-aWE("titl",23,25,14,18);\r
-aWE("tk",14);\r
-aWE("tk_version",14);\r
-aWE("tkconfig",14);\r
-aWE("tmp",14);\r
-aWE("tmp_disk_spac",14);\r
-aWE("toggl",23,25,21);\r
-aWE("toleranc",25);\r
-aWE("tool",3,2,11,16,14,19,22);\r
-aWE("toolbar",3,5,7,2,24,13,16,17,28);\r
-aWE("toolkit",2,14);\r
-aWE("tooltip",14);\r
-aWE("top",5,2,25,16,14,18);\r
-aWE("topic",4,12,20);\r
-aWE("topmost",14);\r
-aWE("total",14);\r
-aWE("totality",3);\r
-aWE("touch",0);\r
-aWE("train",10);\r
-aWE("transformation",24);\r
-aWE("translat",25);\r
-aWE("translation",25);\r
-aWE("transparency",25);\r
-aWE("transparent",25);\r
-aWE("tre",5,14,18,19,21);\r
-aWE("tri",14);\r
-aWE("triangl",24,28);\r
-aWE("trihedron",24,18,28);\r
-aWE("trolltech",14);\r
-aWE("troubl",14);\r
-aWE("tru",14);\r
-aWE("try",8,14,17,19);\r
-aWE("try_exist",14);\r
-aWE("try_nativ",14);\r
-aWE("try_preinstal",14);\r
-aWE("turn",14);\r
-aWE("twic",25);\r
-aWE("two",6,12,25,14,17,19);\r
-aWE("typ",0,23,25,14,26,18,19);\r
-aWE("typical",19);\r
-aWE("u",18);\r
-aWE("ultimat",3);\r
-aWE("uncheck",24,25,16,28);\r
-aWE("underlin",26);\r
-aWE("unfortunare",14);\r
-aWE("unfortunate",14);\r
-aWE("uniqu",14);\r
-aWE("unit",25);\r
-aWE("unix",4);\r
-aWE("unload",13,17);\r
-aWE("unnecessary",14);\r
-aWE("unpack",14);\r
-aWE("unselect",14);\r
-aWE("unus",0);\r
-aWE("up",10,12,13,16,14,17,26,21);\r
-aWE("updat",23,25,16,17,19);\r
-aWE("upload",2,16);\r
-aWE("us",3,0,1,8,9,10,2,11,23,24,25,15,16,14,17,26,18,27,19,20,21,22,28);\r
-aWE("usability",2);\r
-aWE("usag",25,14);\r
-aWE("user",8,19);\r
-aWE("usr",14);\r
-aWE("usual",14);\r
-aWE("utiliti",4);\r
-aWE("v",14,18);\r
-aWE("valid",18);\r
-aWE("validation",3);\r
-aWE("valu",1,23,25,14,18,21);\r
-aWE("variabl",15,14);\r
-aWE("variety",4,12);\r
-aWE("variou",11,14);\r
-aWE("ve",14,18);\r
-aWE("vector",1,25);\r
-aWE("version",6,2,16,14,27,19);\r
-aWE("vertic",1);\r
-aWE("vertical",6,23,25,18);\r
-aWE("very",10,2,25,16,14);\r
-aWE("via",24,14,28);\r
-aWE("view",3,5,8,2,23,12,24,25,16,14,18,20,22,28);\r
-aWE("viewer",5,6,2,11,16,17,18);\r
-aWE("visibl",24,28);\r
-aWE("visual",11);\r
-aWE("visualisation",1,25);\r
-aWE("visualiz",10,24,25,28);\r
-aWE("visualization",9,10,2,11,16);\r
-aWE("vtk",5,6,2,14,18,28);\r
-aWE("vtkhom",14);\r
-aWE("wait",14);\r
-aWE("want",6,12,14);\r
-aWE("warn",8,25,14);\r
-aWE("way",11,14,19);\r
-aWE("web",4);\r
-aWE("welcom",4,10);\r
-aWE("what",3,10,12,14,27,21);\r
-aWE("whenev",23,18);\r
-aWE("wherev",6);\r
-aWE("whil",3);\r
-aWE("whol",25,18,27);\r
-aWE("whos",23);\r
-aWE("why",14);\r
-aWE("wid",4,11,26);\r
-aWE("widget",11);\r
-aWE("width",23,25);\r
-aWE("will",4,5,0,8,23,24,13,25,15,16,14,17,26,18,27,19,21,22);\r
-aWE("window",4,5,6,9,2,12,25,15,16,14,17,26,18,22);\r
-aWE("wir",1);\r
-aWE("wirefram",1,23);\r
-aWE("wish",6,24,14,28);\r
-aWE("within",3,5,7,22);\r
-aWE("without",3,0,25,15,14,27);\r
-aWE("wizard",14);\r
-aWE("won",7,15);\r
-aWE("word",20);\r
-aWE("work",3,6,0,9,11,24,25,16,14,17);\r
-aWE("would",16,17,19);\r
-aWE("writ",10,14,17);\r
-aWE("written",3,17);\r
-aWE("wrong",14);\r
-aWE("www",3);\r
-aWE("x",23,25,15);\r
-aWE("xml",15,14,19);\r
-aWE("xterm",15);\r
-aWE("xxxxx",14);\r
-aWE("xy",25);\r
-aWE("y",23,25);\r
-aWE("year",10);\r
-aWE("yes",8,14);\r
-aWE("yet",14,18);\r
-aWE("your",5,6,0,7,8,23,25,15,14,17,18,27,19);\r
-aWE("yourselv",26);\r
-aWE("z",15);\r
-aWE("zon",5,6,25);\r
-aWE("zoom",24,25,17,28);\r
-\r
-//-->\r
-</script>\r
-</html>\r
+++ /dev/null
-// WebHelp 5.10.001\r
-var gIEA = new Array();\r
-function aGE(sName, sDef)\r
-{\r
- var len = gIEA.length;\r
- gIEA[len] = new gloEntry(sName, sDef);\r
-}\r
-\r
-function gloEntry(sName, sDef) \r
-{\r
- this.sName = sName;\r
- this.sDef = sDef;\r
- this.nNKOff = 0;\r
-}\r
-\r
-function window_OnLoad()\r
-{\r
- if (parent && parent != this) {\r
- if (parent.putData) \r
- {\r
- parent.putData(gIEA);\r
- }\r
- }\r
-}\r
-\r
-window.onload = window_OnLoad;
\ No newline at end of file
+++ /dev/null
-<html>\r
-<head>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<body>\r
-<script language="javascript" src="whgdata.js"></script>\r
-<script language="javascript">\r
-<!--\r
- aGE("Cell","Element of a mesh. Cells are determined by their connectivity. They can have 0,1,2 or 3 dimension.");\r
- aGE("Component","One integer or real value can correspond to each component of a field and to each entity of a mesh");\r
- aGE("Descendant connectivity","It is a description of the entities of the mesh with dimension N. This description is made by an ordered list of geometrical entities (nodes, edges, or faces) with dimension N-1.");\r
- aGE("Edge","An edge of a volumetric or surface mesh. It is composed of 2 or 3 nodes (2 vertex nodes and optionally one middle node).");\r
- aGE("Entity of a mesh","Geometrical component of the mesh: node, cell, face and edge. Faces and edges are only intermediate entities allowing to define the cells in descendant connectivity.");\r
- aGE("Equivalence","Equivalence represents a list of correspondance 2 by 2 of the entities of the same dimension.");\r
- aGE("Face","Face of a volumetrical cell (triangle, quadrangle).");\r
- aGE("Family","Entities of a mesh are described by a certain number of characteristics (boundary conditions, groups membership). Families represent classes equivalent to these characteristics (two entities of a mesh can belong to the same family if they have the same characteristics). Every family is determined by a set of attributes and a list of groups membership.");\r
- aGE("Field","Field consists of one or several scalar components. One definite type is associated to the given field and the values corresponding to different components are all of the same type.");\r
- aGE("Field profile","Fields can be defined only on one part of the mesh. Profile of the field or profile of the component of a field indicates which entities of the mesh contain values.");\r
- aGE("Group","Unordered set of entities of a mesh. One entity can belong to several groups.");\r
- aGE("Mesh","Mesh is described by its geometry: list of nodes and list of cells which constitute this mesh. Supplementary information is added with the help of families (initial, boundary conditions).");\r
- aGE("Nodal connectivity","It is a description of an entity of the mesh by an ordered list of nodes constituting this entity.");\r
- aGE("Node","Node can be an isolated node of a mesh, a vertex or middle node of an edge. A node is associated to a point.");\r
- aGE("Point","Geometrical entity determined by its coordinates in the space.");\r
- aGE("Reference connectivity","For each type of entity of a mesh, reference connectivity define the topology of an entity.");\r
- aGE("Result","List of fields referring to one mesh.");\r
- aGE("Study","Study represents a chain of sequences of calculations.");\r
-\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<html>\r
-<head>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<body>\r
-<script language="javascript" src="whglo.js"></script>\r
-<script language="javascript">\r
-<!--\r
-iFM("Cell","Study","whgdata0.htm",18);\r
-\r
-//-->\r
-</script>\r
-</body>\r
-</html>
\ No newline at end of file
+++ /dev/null
-// WebHelp 5.10.001\r
-var gaFileMapping = new Array();\r
-function fileMapping(sBK, sEK, sFileName, nNum)\r
-{\r
- this.sBK = sBK;\r
- this.sEK = sEK;\r
- this.sFileName = sFileName;\r
- this.aKs = null;\r
- this.nNum = nNum;\r
- this.oUsedItems = null;\r
-}\r
-\r
-\r
-function iFM(sBK, sEK, sFileName, nNum)\r
-{\r
- var i = gaFileMapping.length;\r
- gaFileMapping[i] = new fileMapping(sBK, sEK, sFileName, nNum); \r
- if (i == 0) {\r
- gaFileMapping[i].nTotal = nNum;\r
- }\r
- else {\r
- gaFileMapping[i].nTotal = nNum + gaFileMapping[i - 1].nTotal;\r
- }\r
-}\r
-\r
-function window_OnLoad()\r
-{\r
- if (parent && parent != this && parent.projReady)\r
- {\r
- parent.projReady(gaFileMapping);\r
- } \r
-}\r
-\r
-window.onload = window_OnLoad;\r
+++ /dev/null
-// WebHelp 5.10.001\r
-// const strings\r
-var gIEA = new Array();\r
-function aIE()\r
-{\r
- var len = gIEA.length;\r
- gIEA[len] = new indexEntry(aIE.arguments);\r
-}\r
-\r
-function topic(sName, sURL)\r
-{\r
- this.sName = sName;\r
- this.sURL = sURL;\r
-}\r
-\r
-function indexEntry(fn_arguments) \r
-{\r
- if (fn_arguments.length && fn_arguments.length >= 3) \r
- {\r
- this.nType = fn_arguments[0];\r
- this.nPKOff = 0;\r
- this.nNKOff = fn_arguments[1];\r
- this.sName = fn_arguments[2];\r
- this.aTopics = null;\r
- var nLen = fn_arguments.length;\r
- if (Math.floor(nLen / 2) * 2 == nLen)\r
- {\r
- this.sTarget = fn_arguments[3];\r
- if (nLen > 5)\r
- {\r
- this.aTopics = new Array();\r
- for (var i = 0; i < (nLen - 5)/2; i++)\r
- {\r
- this.aTopics[i] = new topic(fn_arguments[i * 2 + 4], fn_arguments[i * 2 + 5]);\r
- }\r
- }\r
-\r
- }\r
- else \r
- {\r
- if (nLen > 4) \r
- {\r
- this.aTopics = new Array();\r
- for (var i = 0; i < (nLen - 4)/2; i++)\r
- {\r
- this.aTopics[i] = new topic(fn_arguments[i * 2 + 3], fn_arguments[i * 2 + 4]);\r
- }\r
- }\r
- }\r
- }\r
-}\r
-\r
-function getIndexTopicMappingList(nItemIndex)\r
-{\r
- var sTopics = "";\r
- if (gIEA.length > nItemIndex)\r
- {\r
- if (gIEA[nItemIndex].aTopics) \r
- {\r
- var i = 0;\r
- var nLen = gIEA[nItemIndex].aTopics.length;\r
- for (i = 0; i < nLen; i ++) \r
- {\r
- sTopics += "," + gIEA[nItemIndex].aTopics[i];\r
- }\r
- }\r
- }\r
- return sTopics; \r
-}\r
-\r
-function window_OnLoad()\r
-{\r
- if (parent && parent != this) {\r
- if (parent.putData) \r
- {\r
- for (var i = 0; i < gIEA.length; i ++ )\r
- {\r
- if (gIEA[i].nNKOff != 0 && i + gIEA[i].nNKOff + 1 < gIEA.length)\r
- {\r
- \r
- gIEA[i + gIEA[i].nNKOff + 1].nPKOff = gIEA[i].nNKOff;\r
- }\r
- }\r
- parent.putData(gIEA);\r
- }\r
- }\r
-}\r
-\r
-window.onload = window_OnLoad;
\ No newline at end of file
+++ /dev/null
-<html>\r
-<head>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<body>\r
-<script language="javascript" src="whidx.js"></script>\r
-<script language="javascript">\r
-<!--\r
-\r
-//-->\r
-</script>\r
-</body>\r
-</html>
\ No newline at end of file
+++ /dev/null
-// WebHelp 5.10.001\r
-var gaFileMapping = new Array();\r
-function fileMapping(sBK, sEK, sFileName, nNum)\r
-{\r
- this.sBK = sBK;\r
- this.sEK = sEK;\r
- this.sFileName = sFileName;\r
- this.aKs = null;\r
- this.nNum = nNum;\r
- this.oUsedItems = null;\r
-}\r
-\r
-\r
-function iFM(sBK, sEK, sFileName, nNum)\r
-{\r
- var i = gaFileMapping.length;\r
- gaFileMapping[i] = new fileMapping(sBK, sEK, sFileName, nNum); \r
- if (i == 0) {\r
- gaFileMapping[i].nTotal = nNum;\r
- }\r
- else {\r
- gaFileMapping[i].nTotal = nNum + gaFileMapping[i - 1].nTotal;\r
- }\r
-}\r
-\r
-function window_OnLoad()\r
-{\r
- if (parent && parent != this && parent.projReady)\r
- {\r
- parent.projReady(gaFileMapping);\r
- } \r
-}\r
-\r
-window.onload = window_OnLoad;\r
+++ /dev/null
-// WebHelp 5.10.001\r
-var gTEA = new Array();\r
-function aTE()\r
-{\r
- gTEA[gTEA.length] = new tocEntry(aTE.arguments);\r
-}\r
-\r
-function tocEntry(fn_arguments) \r
-{\r
- if (fn_arguments.length < 3) \r
- {\r
- alert ("data format wrong!!!");\r
- return;\r
- }\r
- \r
- this.nType = fn_arguments[0];\r
- this.nContents = fn_arguments[1];\r
- this.sItemName = fn_arguments[2];\r
- \r
- if (this.nType == 1 || this.nType == 2 || this.nType == 16)\r
- {\r
- if (fn_arguments.length > 3)\r
- {\r
- this.sItemURL = fn_arguments[3];\r
- if (fn_arguments.length > 4)\r
- {\r
- this.sTarget = fn_arguments[4];\r
- if (fn_arguments.length > 5)\r
- this.sIconRef = fn_arguments[5];\r
- }\r
- }\r
- }\r
- if (this.nType == 4 || this.nType == 8)\r
- {\r
- if (fn_arguments.length > 3)\r
- {\r
- this.sRefURL = fn_arguments[3];\r
- if (this.nType == 4)\r
- {\r
- if(this.sRefURL.lastIndexOf("/")!=this.sRefURL.length-1)\r
- this.sRefURL+="/";\r
- }\r
- if (fn_arguments.length > 4)\r
- {\r
- this.sItemURL = fn_arguments[4];\r
- if (fn_arguments.length > 5)\r
- {\r
- this.sTarget = fn_arguments[5];\r
- if (fn_arguments.length > 6)\r
- this.sIconRef = fn_arguments[6];\r
- }\r
- }\r
- }\r
- }\r
-}\r
-\r
-\r
-function window_OnLoad()\r
-{\r
- if (parent && parent != this && parent.putData) {\r
- parent.putData(gTEA);\r
- }\r
-}\r
-window.onload = window_OnLoad;
\ No newline at end of file
+++ /dev/null
-<html>\r
-<head>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<body>\r
-<script language="javascript" src="whtdata.js"></script>\r
-<script language="javascript">\r
-<!--\r
- aTE(2,0,"Welcome to SALOME","kernel/introduction.htm");\r
- aTE(1,3,"Using this reference manual");\r
- aTE(2,0,"About SALOME help system","kernel/about_salome_pro_help_system.htm");\r
- aTE(2,0,"Navigating topics","kernel/navigating_topics.htm");\r
- aTE(2,0,"Using left-hand tabs","kernel/using_left-hand_tabs.htm");\r
- aTE(1,4,"About SALOME");\r
- aTE(2,0,"Introduction to SALOME","kernel/introduction_to_salome_pro.htm");\r
- aTE(2,0,"SALOME architecture","kernel/about_salome_pro_architecture.htm");\r
- aTE(2,0,"Installing SALOME","kernel/readme.html");\r
- aTE(2,0,"Running SALOME","kernel/running_salome_pro.htm");\r
- aTE(1,24,"GUI module");\r
- aTE(2,0,"Introduction to GUI","introduction_to_gui.htm");\r
- aTE(2,0,"Getting started","kernel/getting_started2.htm");\r
- aTE(2,0,"SALOME desktop","kernel/salome_pro_desktop.htm");\r
- aTE(1,7,"Study management");\r
- aTE(2,0,"Creating a new study","kernel/creating_a_new_study.htm");\r
- aTE(2,0,"Opening studies","kernel/opening_studies.htm");\r
- aTE(2,0,"Saving and closing studies","kernel/saving_a_study.htm");\r
- aTE(2,0,"Editing studies","kernel/editing_studies.htm");\r
- aTE(2,0,"Displaying studies","kernel/displaying_studies.htm");\r
- aTE(2,0,"Working with Python Scripts","dump_study.htm");\r
- aTE(2,0,"Setting study properties","kernel/getting_properties_of_the_study.htm");\r
- aTE(2,0,"Using Object Browser","kernel/using_object_browser.htm");\r
- aTE(2,0,"Using Registry tool","kernel/using_registry.htm");\r
- aTE(2,0,"Using Catalog Generator","kernel/using_catalog_generator.htm");\r
- aTE(1,2,"Viewers");\r
- aTE(2,0,"OCC 3D Viewer","occ_3d_viewer.htm");\r
- aTE(2,0,"VTK 3D Viewer","vtk_3d_viewer.htm");\r
- aTE(1,6,"Setting Preferences");\r
- aTE(2,0,"Setting Preferences","setting_preferences.htm");\r
- aTE(2,0,"Select Color and Font","select_color_and_font.htm");\r
- aTE(2,0,"SALOME preferences","kernel/setting_preferences.htm");\r
- aTE(2,0,"Geometry preferences","geom_preferences.htm");\r
- aTE(2,0,"Mesh preferences","mesh_preferences.htm");\r
- aTE(2,0,"Post-Pro Preferences","post-pro_preferences.htm");\r
-\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+++ /dev/null
-<html>\r
-<head>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<body>\r
-<script language="javascript" src="whtoc.js"></script>\r
-<script language="javascript">\r
-<!--\r
- setRoot("whtdata0.htm");\r
-\r
-//-->\r
-</script>\r
-</body>\r
-</html>
\ No newline at end of file
+++ /dev/null
-// WebHelp 5.10.001\r
-// const strings\r
-var gaProj = new Array();\r
-var gsRoot = "";\r
-\r
-function setRoot(sRoot)\r
-{\r
- gsRoot = sRoot\r
-}\r
-\r
-function aPE(sProjPath, sRootPath)\r
-{\r
- gaProj[gaProj.length] = new tocProjEntry(sProjPath, sRootPath);\r
-}\r
-\r
-function tocProjEntry(sProjPath, sRootPath) \r
-{\r
- if(sProjPath.lastIndexOf("/")!=sProjPath.length-1)\r
- sProjPath+="/"; \r
- this.sPPath = sProjPath;\r
- this.sRPath = sRootPath;\r
-}\r
-\r
-\r
-function window_OnLoad()\r
-{\r
- if (parent && parent != this && parent.projReady) {\r
- parent.projReady(gsRoot, gaProj);\r
- }\r
-}\r
-window.onload = window_OnLoad;
\ No newline at end of file
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" >\r
-\r
-\r
-<a name="bm_{"></a><a name="subkey_{{"></a><a href="../kernel/readme.html"><b>__version__</b></a> <br><a name="bms_{O"></a><a name="subkey_{O"></a><a href="../kernel/readme.html"><b>_omnipymodule</b></a> <br><a name="bms_{{"></a><a name="subkey_{{"></a><a href="../post-pro_preferences.htm"><b>16x16</b></a> <br><nobr><a name="bms_{D"></a><a name="subkey_{D"></a>2d <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> </nobr><br><nobr>3d <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br>\r
-<br><br>\r
-<nobr><a name="bm_A"></a><a name="subkey_AB"></a>able <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a href="../kernel/readme.html"><b>abort</b></a> <br><nobr>above <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> </nobr><br><nobr>abscissa <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>absolute</b></a> <br><a href="../kernel/creating_a_new_study.htm"><b>abstraction</b></a> <br><a name="bms_AC"></a><a name="subkey_AC"></a><a href="../post-pro_preferences.htm"><b>acceptable</b></a> <br><nobr>access <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../geom_preferences.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../mesh_preferences.htm"><b>4</b></a> <a href="../kernel/using_object_browser.htm"><b>5</b></a> <a href="../kernel/setting_preferences.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><nobr>accessible <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>accidentally</b></a> <br><nobr>according <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><a href="../kernel/readme.html"><b>account</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>achieved</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>achieves</b></a> <br><a href="../kernel/about_salome_pro_help_system.htm"><b>acquainted</b></a> <br><a href="../post-pro_preferences.htm"><b>actions</b></a> <br><nobr>activated <a href="../kernel/creating_a_new_study.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>3</b></a> </nobr><br><nobr>active <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../kernel/creating_a_new_study.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>activity</b></a> <br><a href="../kernel/creating_a_new_study.htm"><b>actual</b></a> <br><a name="bms_AD"></a><a name="subkey_AD"></a><a href="../kernel/about_salome_pro_architecture.htm"><b>adapted</b></a> <br><nobr>add <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../select_color_and_font.htm"><b>3</b></a> <a href="../kernel/using_catalog_generator.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><a href="../select_color_and_font.htm"><b>added</b></a> <br><a href="../kernel/using_catalog_generator.htm"><b>adding</b></a> <br><nobr>addition <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/creating_a_new_study.htm"><b>2</b></a> </nobr><br><nobr>additional <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> <a href="../post-pro_preferences.htm"><b>5</b></a> <a href="../kernel/using_object_browser.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>addressing</b></a> <br><a href="../dump_study.htm"><b>adds</b></a> <br><a href="../post-pro_preferences.htm"><b>adjust</b></a> <br><nobr>advanced <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><a name="bms_AF"></a><a name="subkey_AF"></a><a href="../kernel/about_salome_pro_architecture.htm"><b>affecting</b></a> <br><nobr><a name="bms_AG"></a><a name="subkey_AG"></a>again <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><a name="bms_AL"></a><a name="subkey_AL"></a><a href="../kernel/readme.html"><b>algorithm</b></a> <br><nobr>algorithms <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><nobr>allow <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> </nobr><br><nobr>allowing <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/editing_studies.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><nobr>allows <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../geom_preferences.htm"><b>5</b></a> <a href="../setting_preferences.htm"><b>6</b></a> <a href="../select_color_and_font.htm"><b>7</b></a> <a href="../post-pro_preferences.htm"><b>8</b></a> <a href="../mesh_preferences.htm"><b>9</b></a> <a href="../kernel/using_registry.htm"><b>10</b></a> <a href="../kernel/using_catalog_generator.htm"><b>11</b></a> <a href="../kernel/setting_preferences.htm"><b>12</b></a> <a href="../kernel/saving_a_study.htm"><b>13</b></a> </nobr><br><a href="../kernel/saving_a_study.htm"><b>almost</b></a> <br><nobr>along <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/using_catalog_generator.htm"><b>alongside</b></a> <br><a href="../post-pro_preferences.htm"><b>alpha</b></a> <br><a href="../kernel/readme.html"><b>already</b></a> <br><a href="../kernel/introduction_to_salome_pro.htm"><b>always</b></a> <br><a name="bms_AM"></a><a name="subkey_AM"></a><a href="../kernel/readme.html"><b>amount</b></a> <br><a name="bms_AN"></a><a name="subkey_AN"></a><a href="../post-pro_preferences.htm"><b>animation</b></a> <br><a href="../kernel/readme.html"><b>annoying</b></a> <br><nobr>another <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>answer</b></a> <br><nobr>any <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/navigating_topics.htm"><b>3</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>4</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>5</b></a> <a href="../kernel/displaying_studies.htm"><b>6</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>7</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>8</b></a> <a href="../setting_preferences.htm"><b>9</b></a> <a href="../post-pro_preferences.htm"><b>10</b></a> <a href="../kernel/saving_a_study.htm"><b>11</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>12</b></a> </nobr><br><a href="../kernel/readme.html"><b>anything</b></a> <br><nobr><a name="bms_AP"></a><a name="subkey_AP"></a>api <a href="../dump_study.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><nobr>appear <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> <a href="../kernel/using_registry.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/setting_preferences.htm"><b>6</b></a> </nobr><br><a href="../mesh_preferences.htm"><b>appearance</b></a> <br><nobr>appears <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_help_system.htm"><b>applets</b></a> <br><nobr>application <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../introduction_to_gui.htm"><b>5</b></a> <a href="../dump_study.htm"><b>6</b></a> <a href="../setting_preferences.htm"><b>7</b></a> <a href="../kernel/using_catalog_generator.htm"><b>8</b></a> <a href="../kernel/setting_preferences.htm"><b>9</b></a> <a href="../kernel/saving_a_study.htm"><b>10</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>11</b></a> </nobr><br><nobr>applications <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../setting_preferences.htm"><b>apply</b></a> <br><nobr>approach <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>3</b></a> </nobr><br><nobr>appropriate <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>approximate</b></a> <br><a name="bms_AR"></a><a name="subkey_AR"></a><a href="../select_color_and_font.htm"><b>arabic</b></a> <br><nobr>architecture <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>architectures</b></a> <br><nobr>area <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>areas <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>argument</b></a> <br><a href="../kernel/readme.html"><b>arguments</b></a> <br><a href="../post-pro_preferences.htm"><b>arrange</b></a> <br><nobr><a name="bms_AS"></a><a name="subkey_AS"></a>ascii <a href="../kernel/setting_preferences.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>ask</b></a> <br><a href="../post-pro_preferences.htm"><b>assigned</b></a> <br><nobr>associated <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../kernel/using_object_browser.htm"><b>3</b></a> </nobr><br><a name="bms_AT"></a><a name="subkey_AT"></a><a href="../kernel/introduction.htm"><b>attached</b></a> <br><a href="../kernel/using_object_browser.htm"><b>attribute</b></a> <br><a href="../kernel/using_object_browser.htm"><b>attributes</b></a> <br><nobr><a name="bms_AU"></a><a name="subkey_AU"></a>author <a href="../kernel/getting_properties_of_the_study.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><nobr>auto <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>automatic <a href="../mesh_preferences.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>automatically <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> <a href="../setting_preferences.htm"><b>5</b></a> <a href="../post-pro_preferences.htm"><b>6</b></a> <a href="../mesh_preferences.htm"><b>7</b></a> <a href="../kernel/saving_a_study.htm"><b>8</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>9</b></a> </nobr><br><a name="bms_AV"></a><a name="subkey_AV"></a><a href="../kernel/editing_studies.htm"><b>availability</b></a> <br><nobr>available <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/editing_studies.htm"><b>3</b></a> <a href="../kernel/creating_a_new_study.htm"><b>4</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>5</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>average</b></a> <br><a href="../post-pro_preferences.htm"><b>avi</b></a> <br><a href="../kernel/readme.html"><b>avoid</b></a> <br><a href="../dump_study.htm"><b>avoiding</b></a> <br><a name="bms_AW"></a><a name="subkey_AW"></a><a href="../kernel/readme.html"><b>aware</b></a> <br><a href="../kernel/readme.html"><b>awk</b></a> <br><a name="bms_AX"></a><a name="subkey_AX"></a><a href="../kernel/setting_preferences.htm"><b>axes</b></a> <br><a href="../kernel/setting_preferences.htm"><b>axis</b></a> <br>\r
-<br><br>\r
-<a name="bm_B"></a><a name="subkey_B{"></a><a href="../kernel/readme.html"><b>b</b></a> <br><nobr><a name="bms_BA"></a><a name="subkey_BA"></a>back <a href="../kernel/readme.html"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><nobr>background <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>bar <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> <a href="../kernel/using_object_browser.htm"><b>3</b></a> </nobr><br><nobr>bars <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/saving_a_study.htm"><b>base</b></a> <br><nobr>based <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>bash</b></a> <br><nobr>basic <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../select_color_and_font.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>basis</b></a> <br><nobr>batch <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> </nobr><br><nobr><a name="bms_BE"></a><a name="subkey_BE"></a>becomes <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>before</b></a> <br><a href="../kernel/setting_preferences.htm"><b>begin</b></a> <br><a href="../kernel/using_registry.htm"><b>begins</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>behave</b></a> <br><a href="../kernel/introduction.htm"><b>behavior</b></a> <br><a href="../post-pro_preferences.htm"><b>behaviour</b></a> <br><a href="../kernel/readme.html"><b>being</b></a> <br><nobr>below <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>better</b></a> <br><a name="bms_BI"></a><a name="subkey_BI"></a><a href="../post-pro_preferences.htm"><b>bicolor</b></a> <br><a href="../post-pro_preferences.htm"><b>big</b></a> <br><nobr>bin <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>binaries</b></a> <br><nobr>binary <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a name="bms_BL"></a><a name="subkey_BL"></a><a href="../kernel/readme.html"><b>blue</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>blur</b></a> <br><a name="bms_BO"></a><a name="subkey_BO"></a><a href="../kernel/readme.html"><b>bold</b></a> <br><a href="../kernel/using_left-hand_tabs.htm"><b>book</b></a> <br><a href="../kernel/using_left-hand_tabs.htm"><b>books</b></a> <br><a href="../kernel/readme.html"><b>boost</b></a> <br><a href="../kernel/readme.html"><b>boost_version</b></a> <br><a href="../kernel/readme.html"><b>boostdir</b></a> <br><nobr>borders <a href="../mesh_preferences.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><nobr>both <a href="../introduction_to_gui.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><nobr>bottom <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><nobr>box <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../geom_preferences.htm"><b>4</b></a> <a href="../dump_study.htm"><b>5</b></a> <a href="../setting_preferences.htm"><b>6</b></a> <a href="../select_color_and_font.htm"><b>7</b></a> <a href="../post-pro_preferences.htm"><b>8</b></a> <a href="../mesh_preferences.htm"><b>9</b></a> <a href="../kernel/using_registry.htm"><b>10</b></a> <a href="../kernel/using_catalog_generator.htm"><b>11</b></a> <a href="../kernel/setting_preferences.htm"><b>12</b></a> <a href="../kernel/saving_a_study.htm"><b>13</b></a> </nobr><br><a href="../geom_preferences.htm"><b>boxes</b></a> <br><br><br></p><p class="ftsbody" align="center"><a href="whlstf1.htm" target="_self" title="previous search group"><b>>></b></a>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" align="center"><a href="whlstf0.htm" target="_self" title="previous search group"><b><<</b></a><br><br></p>\r
-<p class="ftsbody" >\r
-<a name="bms_BR"></a><a name="subkey_BR"></a><a href="../kernel/readme.html"><b>brackets</b></a> <br><a href="../kernel/introduction.htm"><b>brep</b></a> <br><nobr>brief <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> </nobr><br><a href="../introduction_to_gui.htm"><b>bringing</b></a> <br><nobr>browse <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><nobr>browser <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../kernel/creating_a_new_study.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>4</b></a> <a href="../introduction_to_gui.htm"><b>5</b></a> <a href="../kernel/using_object_browser.htm"><b>6</b></a> <a href="../kernel/setting_preferences.htm"><b>7</b></a> <a href="../kernel/saving_a_study.htm"><b>8</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>9</b></a> </nobr><br><a name="bms_BU"></a><a name="subkey_BU"></a><a href="../kernel/readme.html"><b>bug</b></a> <br><nobr>build <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>building</b></a> <br><nobr>built <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><nobr>button <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/navigating_topics.htm"><b>3</b></a> <a href="../setting_preferences.htm"><b>4</b></a> <a href="../select_color_and_font.htm"><b>5</b></a> <a href="../post-pro_preferences.htm"><b>6</b></a> <a href="../kernel/using_registry.htm"><b>7</b></a> <a href="../kernel/using_catalog_generator.htm"><b>8</b></a> <a href="../kernel/setting_preferences.htm"><b>9</b></a> <a href="../kernel/saving_a_study.htm"><b>10</b></a> </nobr><br><nobr>buttons <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> </nobr><br>\r
-<br><br>\r
-<nobr><a name="bm_C"></a><a name="subkey_C{"></a>c <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> </nobr><br><nobr><a name="bms_CA"></a><a name="subkey_CA"></a>cad <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>cae</b></a> <br><a href="../kernel/introduction.htm"><b>calculation</b></a> <br><nobr>calculations <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> </nobr><br><nobr>call <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_registry.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><nobr>called <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>calling</b></a> <br><a href="../dump_study.htm"><b>calls</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>cam</b></a> <br><a href="../post-pro_preferences.htm"><b>camera</b></a> <br><a href="../kernel/readme.html"><b>cancel</b></a> <br><a href="../kernel/using_catalog_generator.htm"><b>capability</b></a> <br><a href="../kernel/readme.html"><b>caption</b></a> <br><a href="../kernel/readme.html"><b>care</b></a> <br><a href="../kernel/readme.html"><b>carefully</b></a> <br><a href="../mesh_preferences.htm"><b>carried</b></a> <br><a href="../kernel/introduction.htm"><b>carrying</b></a> <br><a href="../kernel/introduction.htm"><b>cars</b></a> <br><a href="../kernel/readme.html"><b>cascade</b></a> <br><nobr>case <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../post-pro_preferences.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><a href="../kernel/readme.html"><b>casroot</b></a> <br><a href="../kernel/readme.html"><b>cat</b></a> <br><a href="../kernel/using_catalog_generator.htm"><b>catalog</b></a> <br><a href="../kernel/using_catalog_generator.htm"><b>catalogmodulegeneral</b></a> <br><a href="../kernel/using_catalog_generator.htm"><b>catalogmodulepersonnel</b></a> <br><nobr>catalogue <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> </nobr><br><a href="../kernel/using_left-hand_tabs.htm"><b>categories</b></a> <br><a name="bms_CD"></a><a name="subkey_CD"></a><a href="../kernel/readme.html"><b>cd</b></a> <br><nobr><a name="bms_CE"></a><a name="subkey_CE"></a>cells <a href="../select_color_and_font.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>centered</b></a> <br><a href="../post-pro_preferences.htm"><b>central</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>centralized</b></a> <br><a href="../post-pro_preferences.htm"><b>centred</b></a> <br><nobr><a name="bms_CH"></a><a name="subkey_CH"></a>change <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../setting_preferences.htm"><b>5</b></a> <a href="../post-pro_preferences.htm"><b>6</b></a> <a href="../kernel/setting_preferences.htm"><b>7</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>8</b></a> </nobr><br><a href="../setting_preferences.htm"><b>changed</b></a> <br><nobr>changes <a href="../kernel/getting_properties_of_the_study.htm"><b>1</b></a> <a href="../setting_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><a href="../kernel/readme.html"><b>changing</b></a> <br><a href="../post-pro_preferences.htm"><b>channel</b></a> <br><a href="../kernel/about_salome_pro_help_system.htm"><b>chapters</b></a> <br><a href="../select_color_and_font.htm"><b>characters</b></a> <br><a href="../kernel/readme.html"><b>charge</b></a> <br><nobr>check <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>check_version</b></a> <br><nobr>checkbox <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><nobr>checkboxes <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> </nobr><br><nobr>checked <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a href="../kernel/readme.html"><b>checking</b></a> <br><a href="../kernel/readme.html"><b>checks</b></a> <br><nobr>choice <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../select_color_and_font.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> </nobr><br><nobr>choose <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/editing_studies.htm"><b>4</b></a> <a href="../kernel/creating_a_new_study.htm"><b>5</b></a> <a href="../geom_preferences.htm"><b>6</b></a> <a href="../select_color_and_font.htm"><b>7</b></a> <a href="../post-pro_preferences.htm"><b>8</b></a> <a href="../mesh_preferences.htm"><b>9</b></a> <a href="../kernel/using_registry.htm"><b>10</b></a> <a href="../kernel/using_catalog_generator.htm"><b>11</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>12</b></a> </nobr><br><nobr>chosen <a href="../select_color_and_font.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><a name="bms_CL"></a><a name="subkey_CL"></a><a href="../post-pro_preferences.htm"><b>clamp</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>classic</b></a> <br><a href="../kernel/readme.html"><b>clear</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>clearall</b></a> <br><nobr>click <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/navigating_topics.htm"><b>3</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>4</b></a> <a href="../kernel/editing_studies.htm"><b>5</b></a> <a href="../kernel/displaying_studies.htm"><b>6</b></a> <a href="../kernel/creating_a_new_study.htm"><b>7</b></a> <a href="../geom_preferences.htm"><b>8</b></a> <a href="../dump_study.htm"><b>9</b></a> <a href="../setting_preferences.htm"><b>10</b></a> <a href="../select_color_and_font.htm"><b>11</b></a> <a href="../post-pro_preferences.htm"><b>12</b></a> <a href="../mesh_preferences.htm"><b>13</b></a> <a href="../kernel/using_registry.htm"><b>14</b></a> <a href="../kernel/using_object_browser.htm"><b>15</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>16</b></a> <a href="../kernel/using_catalog_generator.htm"><b>17</b></a> <a href="../kernel/setting_preferences.htm"><b>18</b></a> <a href="../kernel/saving_a_study.htm"><b>19</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>20</b></a> </nobr><br><a href="../kernel/navigating_topics.htm"><b>clickable</b></a> <br><a href="../kernel/navigating_topics.htm"><b>clicked</b></a> <br><nobr>clicking <a href="../kernel/readme.html"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> <a href="../kernel/using_object_browser.htm"><b>3</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>client</b></a> <br><a href="../post-pro_preferences.htm"><b>clip</b></a> <br><nobr>close <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../setting_preferences.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> </nobr><br><nobr>closed <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><nobr>closes <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><nobr>closing <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>clusters</b></a> <br><nobr><a name="bms_CO"></a><a name="subkey_CO"></a>code <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../mesh_preferences.htm"><b>coef</b></a> <br><a href="../kernel/readme.html"><b>coincide</b></a> <br><a href="../kernel/readme.html"><b>collect</b></a> <br><a href="../kernel/readme.html"><b>collected</b></a> <br><a href="../kernel/readme.html"><b>collects</b></a> <br><nobr>color <a href="../geom_preferences.htm"><b>1</b></a> <a href="../select_color_and_font.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../mesh_preferences.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> </nobr><br><nobr>colored <a href="../geom_preferences.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><nobr>colors <a href="../select_color_and_font.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/setting_preferences.htm"><b>column</b></a> <br><nobr>columns <a href="../kernel/using_registry.htm"><b>1</b></a> <a href="../kernel/using_object_browser.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>combined</b></a> <br><a href="../kernel/introduction_to_salome_pro.htm"><b>combines</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>comfortable</b></a> <br><a href="../kernel/readme.html"><b>comma</b></a> <br><nobr>command <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><nobr>commands <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><nobr>common <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../setting_preferences.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>compared <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>compatible</b></a> <br><a href="../kernel/readme.html"><b>compiled</b></a> <br><a href="../kernel/readme.html"><b>compiling</b></a> <br><nobr>complete <a href="../kernel/getting_properties_of_the_study.htm"><b>1</b></a> <a href="../kernel/using_registry.htm"><b>2</b></a> </nobr><br><nobr>completed <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><nobr>complex <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><nobr>component <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/editing_studies.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../introduction_to_gui.htm"><b>5</b></a> <a href="../dump_study.htm"><b>6</b></a> <a href="../post-pro_preferences.htm"><b>7</b></a> <a href="../kernel/using_registry.htm"><b>8</b></a> <a href="../kernel/using_object_browser.htm"><b>9</b></a> <a href="../kernel/using_catalog_generator.htm"><b>10</b></a> <a href="../kernel/setting_preferences.htm"><b>11</b></a> <a href="../kernel/saving_a_study.htm"><b>12</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>13</b></a> </nobr><br><nobr>components <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> <a href="../kernel/introduction.htm"><b>4</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>5</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>6</b></a> <a href="../introduction_to_gui.htm"><b>7</b></a> <a href="../dump_study.htm"><b>8</b></a> <a href="../kernel/using_registry.htm"><b>9</b></a> <a href="../kernel/using_object_browser.htm"><b>10</b></a> <a href="../kernel/using_catalog_generator.htm"><b>11</b></a> <a href="../kernel/saving_a_study.htm"><b>12</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>13</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>compose</b></a> <br><nobr>computation <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>computational</b></a> <br><a href="../kernel/introduction.htm"><b>computations</b></a> <br><nobr>computer <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>concept <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>concerning</b></a> <br><a href="../kernel/readme.html"><b>concerns</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>conclusion</b></a> <br><a href="../kernel/readme.html"><b>config</b></a> <br><a href="../kernel/readme.html"><b>config_files</b></a> <br><a href="../kernel/readme.html"><b>config_mandrake10_1</b></a> <br><a href="../kernel/introduction_to_salome_pro.htm"><b>configurable</b></a> <br><a href="../kernel/readme.html"><b>configuration</b></a> <br><nobr>configure <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><nobr>confirm <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/opening_studies.htm"><b>connect</b></a> <br><nobr>connected <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><a href="../kernel/salome_pro_desktop.htm"><b>consists</b></a> <br><nobr>console <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/displaying_studies.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>constant</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>constantly</b></a> <br><nobr>construction <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><a href="../dump_study.htm"><b>consuming</b></a> <br><nobr>contain <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/using_object_browser.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><a href="../kernel/salome_pro_desktop.htm"><b>container</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>containers</b></a> <br><nobr>containing <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../setting_preferences.htm"><b>3</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> </nobr><br><nobr>contains <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/creating_a_new_study.htm"><b>4</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>5</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>6</b></a> <a href="../kernel/using_registry.htm"><b>7</b></a> <a href="../kernel/using_object_browser.htm"><b>8</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>9</b></a> </nobr><br><nobr>content <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>3</b></a> </nobr><br><nobr>contents <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><nobr>context <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_object_browser.htm"><b>2</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>continue</b></a> <br><nobr>control <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/creating_a_new_study.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../mesh_preferences.htm"><b>4</b></a> </nobr><br><nobr>controls <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><nobr>convert <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction_to_salome_pro.htm"><b>cooperate</b></a> <br><a href="../kernel/setting_preferences.htm"><b>coordinate</b></a> <br><a href="../kernel/setting_preferences.htm"><b>coordinates</b></a> <br><a href="../post-pro_preferences.htm"><b>copies</b></a> <br><nobr>copy <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/editing_studies.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><a href="../kernel/salome_pro_desktop.htm"><b>copying</b></a> <br><a href="../kernel/readme.html"><b>copyright</b></a> <br><nobr>corba <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/creating_a_new_study.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> </nobr><br><nobr>corner <a href="../select_color_and_font.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> </nobr><br><a href="../kernel/salome_pro_desktop.htm"><b>correcting</b></a> <br><nobr>corresponding <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../mesh_preferences.htm"><b>4</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>5</b></a> </nobr><br><a href="../kernel/readme.html"><b>correspondingly</b></a> <br><nobr>corresponds <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>costs</b></a> <br><nobr>coupling <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><br><br></p><p class="ftsbody" align="center"><a href="whlstf2.htm" target="_self" title="previous search group"><b>>></b></a>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" align="center"><a href="whlstf9.htm" target="_self" title="previous search group"><b><<</b></a><br><br></p>\r
-<p class="ftsbody" >\r
-<nobr><a name="bms_SU"></a><a name="subkey_SU"></a>sub <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><nobr>submenu <a href="../kernel/creating_a_new_study.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>3</b></a> </nobr><br><a href="../select_color_and_font.htm"><b>subsets</b></a> <br><a href="../post-pro_preferences.htm"><b>substituted</b></a> <br><a href="../kernel/readme.html"><b>successfully</b></a> <br><a href="../introduction_to_gui.htm"><b>suit</b></a> <br><a href="../kernel/readme.html"><b>summarizes</b></a> <br><a href="../post-pro_preferences.htm"><b>superposition</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>superv</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>supervcontainer</b></a> <br><nobr>supervision <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><nobr>supervisor <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> </nobr><br><nobr>supplementary <a href="../kernel/using_registry.htm"><b>1</b></a> <a href="../kernel/using_object_browser.htm"><b>2</b></a> </nobr><br><nobr>support <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>supported</b></a> <br><a href="../kernel/readme.html"><b>supported_installation_modes</b></a> <br><a href="../kernel/introduction.htm"><b>supports</b></a> <br><a href="../kernel/readme.html"><b>sure</b></a> <br><a href="../mesh_preferences.htm"><b>surface</b></a> <br><a name="bms_SW"></a><a name="subkey_SW"></a><a href="../post-pro_preferences.htm"><b>sweep</b></a> <br><a href="../post-pro_preferences.htm"><b>sweeping</b></a> <br><a href="../kernel/readme.html"><b>swig</b></a> <br><nobr>switch <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>switched</b></a> <br><a href="../introduction_to_gui.htm"><b>switching</b></a> <br><nobr><a name="bms_SY"></a><a name="subkey_SY"></a>system <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../post-pro_preferences.htm"><b>5</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>6</b></a> </nobr><br><nobr>systems <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br>\r
-<br><br>\r
-<nobr><a name="bm_T"></a><a name="subkey_T{"></a>t <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/editing_studies.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/setting_preferences.htm"><b>6</b></a> <a href="../kernel/saving_a_study.htm"><b>7</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>8</b></a> </nobr><br><nobr><a name="bms_TA"></a><a name="subkey_TA"></a>tab <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../kernel/using_registry.htm"><b>2</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>3</b></a> </nobr><br><nobr>table <a href="../kernel/readme.html"><b>1</b></a> <a href="../select_color_and_font.htm"><b>2</b></a> </nobr><br><nobr>tabs <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>tag</b></a> <br><a href="../kernel/readme.html"><b>tags</b></a> <br><a href="../kernel/introduction.htm"><b>tailored</b></a> <br><a href="../kernel/readme.html"><b>take</b></a> <br><nobr>taken <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>takes</b></a> <br><a href="../kernel/readme.html"><b>target</b></a> <br><a href="../kernel/readme.html"><b>target_directory</b></a> <br><a href="../kernel/readme.html"><b>target_platform</b></a> <br><a href="../kernel/readme.html"><b>targetdir</b></a> <br><a href="../dump_study.htm"><b>tasks</b></a> <br><a name="bms_TC"></a><a name="subkey_TC"></a><a href="../kernel/readme.html"><b>tcl</b></a> <br><a href="../kernel/readme.html"><b>tclhome</b></a> <br><a href="../kernel/readme.html"><b>tclsh8</b></a> <br><a name="bms_TE"></a><a name="subkey_TE"></a><a href="../kernel/introduction.htm"><b>technological</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>technologies</b></a> <br><nobr>technology <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>temp</b></a> <br><a href="../kernel/readme.html"><b>temp_directory</b></a> <br><a href="../kernel/readme.html"><b>temp_folder</b></a> <br><a href="../kernel/readme.html"><b>tempdir</b></a> <br><a href="../kernel/readme.html"><b>temporary</b></a> <br><a href="../kernel/readme.html"><b>temporarydiskspace</b></a> <br><a href="../post-pro_preferences.htm"><b>tensor</b></a> <br><nobr>term <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><nobr>terminal <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>terms</b></a> <br><nobr>test <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>tests</b></a> <br><nobr>text <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>3</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>texture</b></a> <br><nobr><a name="bms_TH"></a><a name="subkey_TH"></a>them <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/displaying_studies.htm"><b>4</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>5</b></a> <a href="../select_color_and_font.htm"><b>6</b></a> <a href="../mesh_preferences.htm"><b>7</b></a> <a href="../kernel/using_registry.htm"><b>8</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>9</b></a> </nobr><br><a href="../kernel/readme.html"><b>therefore</b></a> <br><a href="../kernel/introduction_to_salome_pro.htm"><b>third</b></a> <br><nobr>those <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>three</b></a> <br><a href="../post-pro_preferences.htm"><b>threshold</b></a> <br><nobr>thus <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><nobr><a name="bms_TI"></a><a name="subkey_TI"></a>time <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>4</b></a> <a href="../kernel/displaying_studies.htm"><b>5</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>6</b></a> <a href="../dump_study.htm"><b>7</b></a> <a href="../setting_preferences.htm"><b>8</b></a> <a href="../post-pro_preferences.htm"><b>9</b></a> <a href="../kernel/using_registry.htm"><b>10</b></a> <a href="../kernel/using_catalog_generator.htm"><b>11</b></a> <a href="../kernel/saving_a_study.htm"><b>12</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>times</b></a> <br><nobr>title <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a name="bms_TK"></a><a name="subkey_TK"></a><a href="../kernel/readme.html"><b>tk</b></a> <br><a name="bms_TM"></a><a name="subkey_TM"></a><a href="../kernel/readme.html"><b>tmp</b></a> <br><a href="../kernel/readme.html"><b>tmp_disk_space</b></a> <br><a name="bms_TO"></a><a name="subkey_TO"></a><a href="../kernel/readme.html"><b>together</b></a> <br><a href="../mesh_preferences.htm"><b>toggle</b></a> <br><a href="../post-pro_preferences.htm"><b>toggles</b></a> <br><a href="../kernel/using_object_browser.htm"><b>toggling</b></a> <br><a href="../post-pro_preferences.htm"><b>tolerance</b></a> <br><nobr>tool <a href="../kernel/readme.html"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../kernel/using_registry.htm"><b>3</b></a> <a href="../kernel/using_catalog_generator.htm"><b>4</b></a> </nobr><br><nobr>toolbar <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/editing_studies.htm"><b>2</b></a> <a href="../kernel/creating_a_new_study.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../introduction_to_gui.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><nobr>toolbars <a href="../introduction_to_gui.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><a href="../introduction_to_gui.htm"><b>toolkit</b></a> <br><nobr>tools <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../kernel/using_registry.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>top <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/creating_a_new_study.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>topic <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><nobr>topics <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>2</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>topmost</b></a> <br><a href="../kernel/readme.html"><b>total</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>totality</b></a> <br><a href="../dump_study.htm"><b>touching</b></a> <br><a name="bms_TR"></a><a name="subkey_TR"></a><a href="../kernel/readme.html"><b>tr</b></a> <br><a href="../kernel/introduction.htm"><b>training</b></a> <br><a href="../post-pro_preferences.htm"><b>translate</b></a> <br><a href="../post-pro_preferences.htm"><b>translation</b></a> <br><a href="../post-pro_preferences.htm"><b>transparency</b></a> <br><a href="../post-pro_preferences.htm"><b>transparent</b></a> <br><nobr>tree <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/creating_a_new_study.htm"><b>2</b></a> <a href="../kernel/using_object_browser.htm"><b>3</b></a> <a href="../kernel/using_catalog_generator.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> </nobr><br><a href="../kernel/readme.html"><b>tries</b></a> <br><a href="../kernel/setting_preferences.htm"><b>trihedron</b></a> <br><a href="../kernel/readme.html"><b>trolltech</b></a> <br><a href="../kernel/readme.html"><b>true</b></a> <br><nobr>try <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><a href="../kernel/readme.html"><b>try_existing</b></a> <br><a href="../kernel/readme.html"><b>try_native</b></a> <br><a href="../kernel/readme.html"><b>try_preinstalled</b></a> <br><a name="bms_TW"></a><a name="subkey_TW"></a><a href="../post-pro_preferences.htm"><b>twice</b></a> <br><nobr>two <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> </nobr><br><nobr><a name="bms_TY"></a><a name="subkey_TY"></a>type <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../mesh_preferences.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/setting_preferences.htm"><b>6</b></a> </nobr><br><a href="../kernel/using_catalog_generator.htm"><b>typical</b></a> <br><nobr>typing <a href="../kernel/readme.html"><b>1</b></a> <a href="../select_color_and_font.htm"><b>2</b></a> </nobr><br>\r
-<br><br>\r
-<a name="bm_U"></a><a name="subkey_U{"></a><a href="../kernel/setting_preferences.htm"><b>u</b></a> <br><a name="bms_UL"></a><a name="subkey_UL"></a><a href="../kernel/about_salome_pro_architecture.htm"><b>ultimate</b></a> <br><a name="bms_UN"></a><a name="subkey_UN"></a><a href="../kernel/salome_pro_desktop.htm"><b>uncheck</b></a> <br><a href="../post-pro_preferences.htm"><b>unchecked</b></a> <br><a href="../select_color_and_font.htm"><b>underlined</b></a> <br><a href="../kernel/readme.html"><b>unfortunately</b></a> <br><a href="../kernel/readme.html"><b>unique</b></a> <br><a href="../post-pro_preferences.htm"><b>units</b></a> <br><a href="../kernel/about_salome_pro_help_system.htm"><b>unix</b></a> <br><a href="../kernel/saving_a_study.htm"><b>unload</b></a> <br><nobr>unloaded <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>unnecessary</b></a> <br><a href="../kernel/readme.html"><b>unselect</b></a> <br><a href="../kernel/readme.html"><b>unselecting</b></a> <br><a href="../dump_study.htm"><b>unused</b></a> <br><nobr><a name="bms_UP"></a><a name="subkey_UP"></a>up <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/navigating_topics.htm"><b>3</b></a> <a href="../kernel/introduction.htm"><b>4</b></a> <a href="../kernel/using_object_browser.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>update <a href="../mesh_preferences.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><nobr>updated <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><nobr>uploading <a href="../introduction_to_gui.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><nobr>upper <a href="../select_color_and_font.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a name="bms_US"></a><a name="subkey_US"></a><a href="../introduction_to_gui.htm"><b>usability</b></a> <br><nobr>usage <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><nobr>used <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../geom_preferences.htm"><b>4</b></a> <a href="../select_color_and_font.htm"><b>5</b></a> <a href="../post-pro_preferences.htm"><b>6</b></a> <a href="../mesh_preferences.htm"><b>7</b></a> <a href="../kernel/using_catalog_generator.htm"><b>8</b></a> <a href="../kernel/setting_preferences.htm"><b>9</b></a> <a href="../kernel/saving_a_study.htm"><b>10</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>11</b></a> </nobr><br><nobr>user <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../introduction_to_gui.htm"><b>5</b></a> <a href="../dump_study.htm"><b>6</b></a> <a href="../setting_preferences.htm"><b>7</b></a> <a href="../post-pro_preferences.htm"><b>8</b></a> <a href="../kernel/using_registry.htm"><b>9</b></a> <a href="../kernel/using_catalog_generator.htm"><b>10</b></a> </nobr><br><nobr>users <a href="../kernel/getting_properties_of_the_study.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><nobr>uses <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><nobr>using <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> <a href="../kernel/introduction.htm"><b>4</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>5</b></a> <a href="../dump_study.htm"><b>6</b></a> <a href="../post-pro_preferences.htm"><b>7</b></a> <a href="../kernel/using_registry.htm"><b>8</b></a> <a href="../kernel/using_object_browser.htm"><b>9</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>10</b></a> <a href="../kernel/using_catalog_generator.htm"><b>11</b></a> </nobr><br><a href="../kernel/readme.html"><b>usr</b></a> <br><a href="../kernel/readme.html"><b>usually</b></a> <br><br><br></p><p class="ftsbody" align="center"><a href="whlstf11.htm" target="_self" title="previous search group"><b>>></b></a>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" align="center"><a href="whlstf10.htm" target="_self" title="previous search group"><b><<</b></a><br><br></p>\r
-<p class="ftsbody" >\r
-<a name="bms_UT"></a><a name="subkey_UT"></a><a href="../kernel/about_salome_pro_help_system.htm"><b>utilities</b></a> <br>\r
-<br><br>\r
-<nobr><a name="bm_V"></a><a name="subkey_V{"></a>v <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a name="bms_VA"></a><a name="subkey_VA"></a><a href="../kernel/setting_preferences.htm"><b>valid</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>validation</b></a> <br><nobr>value <a href="../kernel/readme.html"><b>1</b></a> <a href="../geom_preferences.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../mesh_preferences.htm"><b>4</b></a> <a href="../kernel/using_object_browser.htm"><b>5</b></a> <a href="../kernel/setting_preferences.htm"><b>6</b></a> </nobr><br><nobr>values <a href="../kernel/readme.html"><b>1</b></a> <a href="../geom_preferences.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>variable</b></a> <br><nobr>variables <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><nobr>variety <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>2</b></a> </nobr><br><nobr>various <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> </nobr><br><nobr><a name="bms_VE"></a><a name="subkey_VE"></a>ve <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>vector</b></a> <br><a href="../kernel/readme.html"><b>ver</b></a> <br><a href="../kernel/readme.html"><b>ver_major</b></a> <br><a href="../kernel/readme.html"><b>ver_minor</b></a> <br><nobr>version <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../setting_preferences.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><a href="../kernel/readme.html"><b>versions</b></a> <br><nobr>vertical <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a href="../kernel/displaying_studies.htm"><b>vertically</b></a> <br><nobr>very <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><nobr><a name="bms_VI"></a><a name="subkey_VI"></a>view <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../post-pro_preferences.htm"><b>5</b></a> <a href="../kernel/using_registry.htm"><b>6</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>7</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>8</b></a> </nobr><br><nobr>viewer <a href="../kernel/creating_a_new_study.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../mesh_preferences.htm"><b>4</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>5</b></a> <a href="../kernel/setting_preferences.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><nobr>viewers <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../kernel/creating_a_new_study.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><nobr>viewing <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction_to_salome_pro.htm"><b>visual</b></a> <br><nobr>visualisation <a href="../geom_preferences.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><nobr>visualization <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/getting_started2.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><nobr>visualize <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><nobr><a name="bms_VT"></a><a name="subkey_VT"></a>vtk <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../kernel/creating_a_new_study.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> </nobr><br><a href="../kernel/readme.html"><b>vtkhome</b></a> <br>\r
-<br><br>\r
-<a name="bm_W"></a><a name="subkey_WA"></a><a href="../kernel/readme.html"><b>wait</b></a> <br><a href="../kernel/readme.html"><b>waiting</b></a> <br><nobr>want <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>warned</b></a> <br><nobr>warning <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> </nobr><br><nobr>way <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><a name="bms_WE"></a><a name="subkey_WE"></a><a href="../kernel/about_salome_pro_help_system.htm"><b>web</b></a> <br><nobr>welcome <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>2</b></a> </nobr><br><nobr><a name="bms_WH"></a><a name="subkey_WH"></a>what <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../setting_preferences.htm"><b>5</b></a> <a href="../kernel/using_object_browser.htm"><b>6</b></a> </nobr><br><nobr>whenever <a href="../mesh_preferences.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/displaying_studies.htm"><b>wherever</b></a> <br><a href="../kernel/readme.html"><b>whether</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>while</b></a> <br><nobr>whole <a href="../setting_preferences.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> </nobr><br><a href="../mesh_preferences.htm"><b>whose</b></a> <br><nobr><a name="bms_WI"></a><a name="subkey_WI"></a>wide <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>2</b></a> <a href="../select_color_and_font.htm"><b>3</b></a> </nobr><br><a href="../kernel/introduction_to_salome_pro.htm"><b>widgets</b></a> <br><nobr>width <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><nobr>will <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>4</b></a> <a href="../kernel/creating_a_new_study.htm"><b>5</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>6</b></a> <a href="../dump_study.htm"><b>7</b></a> <a href="../setting_preferences.htm"><b>8</b></a> <a href="../select_color_and_font.htm"><b>9</b></a> <a href="../post-pro_preferences.htm"><b>10</b></a> <a href="../mesh_preferences.htm"><b>11</b></a> <a href="../kernel/using_registry.htm"><b>12</b></a> <a href="../kernel/using_object_browser.htm"><b>13</b></a> <a href="../kernel/using_catalog_generator.htm"><b>14</b></a> <a href="../kernel/setting_preferences.htm"><b>15</b></a> <a href="../kernel/saving_a_study.htm"><b>16</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>17</b></a> </nobr><br><nobr>window <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/navigating_topics.htm"><b>3</b></a> <a href="../kernel/getting_started2.htm"><b>4</b></a> <a href="../kernel/displaying_studies.htm"><b>5</b></a> <a href="../kernel/creating_a_new_study.htm"><b>6</b></a> <a href="../introduction_to_gui.htm"><b>7</b></a> <a href="../select_color_and_font.htm"><b>8</b></a> <a href="../post-pro_preferences.htm"><b>9</b></a> <a href="../kernel/using_registry.htm"><b>10</b></a> <a href="../kernel/saving_a_study.htm"><b>11</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>12</b></a> </nobr><br><a href="../introduction_to_gui.htm"><b>windowed</b></a> <br><nobr>windows <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../kernel/creating_a_new_study.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>4</b></a> <a href="../introduction_to_gui.htm"><b>5</b></a> <a href="../kernel/setting_preferences.htm"><b>6</b></a> <a href="../kernel/saving_a_study.htm"><b>7</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>8</b></a> </nobr><br><nobr>wireframe <a href="../geom_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/displaying_studies.htm"><b>wish</b></a> <br><a href="../kernel/readme.html"><b>wish8</b></a> <br><nobr>within <a href="../kernel/editing_studies.htm"><b>1</b></a> <a href="../kernel/creating_a_new_study.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../kernel/using_registry.htm"><b>4</b></a> </nobr><br><nobr>without <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> <a href="../setting_preferences.htm"><b>5</b></a> <a href="../post-pro_preferences.htm"><b>6</b></a> </nobr><br><a href="../kernel/readme.html"><b>wizard</b></a> <br><a href="../kernel/readme.html"><b>wizards</b></a> <br><nobr><a name="bms_WO"></a><a name="subkey_WO"></a>won <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/editing_studies.htm"><b>3</b></a> </nobr><br><a href="../kernel/using_left-hand_tabs.htm"><b>word</b></a> <br><a href="../kernel/using_left-hand_tabs.htm"><b>words</b></a> <br><nobr>work <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/getting_started2.htm"><b>3</b></a> <a href="../kernel/displaying_studies.htm"><b>4</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>5</b></a> <a href="../post-pro_preferences.htm"><b>6</b></a> </nobr><br><nobr>working <a href="../kernel/getting_started2.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>would <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><nobr><a name="bms_WR"></a><a name="subkey_WR"></a>write <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><nobr>written <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>wrong</b></a> <br><a name="bms_WW"></a><a name="subkey_WW"></a><a href="../kernel/about_salome_pro_architecture.htm"><b>www</b></a> <br>\r
-<br><br>\r
-<nobr><a name="bm_X"></a><a name="subkey_X{"></a>x <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><nobr><a name="bms_XM"></a><a name="subkey_XM"></a>xml <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><a name="bms_XT"></a><a name="subkey_XT"></a><a href="../kernel/running_salome_pro.htm"><b>xterm</b></a> <br><a name="bms_XX"></a><a name="subkey_XX"></a><a href="../kernel/readme.html"><b>xxxxx</b></a> <br>\r
-<br><br>\r
-<nobr><a name="bm_Y"></a><a name="subkey_Y{"></a>y <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><a name="bms_YE"></a><a name="subkey_YE"></a><a href="../kernel/introduction.htm"><b>year</b></a> <br><nobr>yes <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> </nobr><br><nobr>yet <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr><a name="bms_YO"></a><a name="subkey_YO"></a>your <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/editing_studies.htm"><b>4</b></a> <a href="../kernel/displaying_studies.htm"><b>5</b></a> <a href="../kernel/creating_a_new_study.htm"><b>6</b></a> <a href="../dump_study.htm"><b>7</b></a> <a href="../setting_preferences.htm"><b>8</b></a> <a href="../post-pro_preferences.htm"><b>9</b></a> <a href="../mesh_preferences.htm"><b>10</b></a> <a href="../kernel/using_catalog_generator.htm"><b>11</b></a> <a href="../kernel/setting_preferences.htm"><b>12</b></a> <a href="../kernel/saving_a_study.htm"><b>13</b></a> </nobr><br><a href="../select_color_and_font.htm"><b>yourselves</b></a> <br>\r
-<br><br>\r
-<a name="bm_Z"></a><a name="subkey_Z{"></a><a href="../kernel/running_salome_pro.htm"><b>z</b></a> <br><nobr><a name="bms_ZO"></a><a name="subkey_ZO"></a>zone <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../kernel/creating_a_new_study.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>zones</b></a> <br><a href="../post-pro_preferences.htm"><b>zoom</b></a> <br><a href="../post-pro_preferences.htm"><b>zoomed</b></a> <br><a href="../kernel/saving_a_study.htm"><b>zooming</b></a> <br><br><br></p>\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" align="center"><a href="whlstf1.htm" target="_self" title="previous search group"><b><<</b></a><br><br></p>\r
-<p class="ftsbody" >\r
-<a name="bms_CP"></a><a name="subkey_CP"></a><a href="../kernel/running_salome_pro.htm"><b>cpp</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>cppcontainer</b></a> <br><nobr><a name="bms_CR"></a><a name="subkey_CR"></a>create <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/getting_started2.htm"><b>4</b></a> <a href="../kernel/displaying_studies.htm"><b>5</b></a> <a href="../kernel/creating_a_new_study.htm"><b>6</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>7</b></a> <a href="../introduction_to_gui.htm"><b>8</b></a> <a href="../dump_study.htm"><b>9</b></a> <a href="../mesh_preferences.htm"><b>10</b></a> <a href="../kernel/using_catalog_generator.htm"><b>11</b></a> <a href="../kernel/setting_preferences.htm"><b>12</b></a> <a href="../kernel/saving_a_study.htm"><b>13</b></a> </nobr><br><nobr>created <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> <a href="../kernel/creating_a_new_study.htm"><b>4</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>5</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>6</b></a> <a href="../introduction_to_gui.htm"><b>7</b></a> <a href="../dump_study.htm"><b>8</b></a> <a href="../kernel/using_object_browser.htm"><b>9</b></a> <a href="../kernel/setting_preferences.htm"><b>10</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>11</b></a> </nobr><br><nobr>creates <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><nobr>creating <a href="../kernel/creating_a_new_study.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><nobr>creation <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> </nobr><br><nobr>cross <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><nobr><a name="bms_CS"></a><a name="subkey_CS"></a>csh <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><a href="../kernel/running_salome_pro.htm"><b>cshell</b></a> <br><a name="bms_CT"></a><a name="subkey_CT"></a><a href="../post-pro_preferences.htm"><b>ctrl</b></a> <br><nobr><a name="bms_CU"></a><a name="subkey_CU"></a>current <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/displaying_studies.htm"><b>4</b></a> <a href="../dump_study.htm"><b>5</b></a> <a href="../setting_preferences.htm"><b>6</b></a> <a href="../post-pro_preferences.htm"><b>7</b></a> <a href="../kernel/using_registry.htm"><b>8</b></a> <a href="../kernel/using_object_browser.htm"><b>9</b></a> <a href="../kernel/setting_preferences.htm"><b>10</b></a> <a href="../kernel/saving_a_study.htm"><b>11</b></a> </nobr><br><nobr>currently <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/using_registry.htm"><b>3</b></a> <a href="../kernel/using_object_browser.htm"><b>4</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>cursor</b></a> <br><a href="../kernel/setting_preferences.htm"><b>curve</b></a> <br><nobr>custom <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../select_color_and_font.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>customer</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>customization</b></a> <br><a name="bms_CY"></a><a name="subkey_CY"></a><a href="../post-pro_preferences.htm"><b>cycles</b></a> <br><a href="../select_color_and_font.htm"><b>cyrillic</b></a> <br>\r
-<br><br>\r
-<a name="bm_D"></a><a name="subkey_D{"></a><a href="../kernel/readme.html"><b>d</b></a> <br><nobr><a name="bms_DA"></a><a name="subkey_DA"></a>data <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/getting_started2.htm"><b>4</b></a> <a href="../kernel/creating_a_new_study.htm"><b>5</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>6</b></a> <a href="../introduction_to_gui.htm"><b>7</b></a> <a href="../dump_study.htm"><b>8</b></a> <a href="../kernel/using_catalog_generator.htm"><b>9</b></a> <a href="../kernel/setting_preferences.htm"><b>10</b></a> <a href="../kernel/saving_a_study.htm"><b>11</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>database</b></a> <br><nobr>date <a href="../kernel/getting_properties_of_the_study.htm"><b>1</b></a> <a href="../kernel/using_registry.htm"><b>2</b></a> </nobr><br><a name="bms_DE"></a><a name="subkey_DE"></a><a href="../kernel/using_object_browser.htm"><b>debugging</b></a> <br><a href="../post-pro_preferences.htm"><b>decrease</b></a> <br><a href="../post-pro_preferences.htm"><b>decreases</b></a> <br><nobr>default <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/creating_a_new_study.htm"><b>3</b></a> <a href="../geom_preferences.htm"><b>4</b></a> <a href="../setting_preferences.htm"><b>5</b></a> <a href="../post-pro_preferences.htm"><b>6</b></a> <a href="../mesh_preferences.htm"><b>7</b></a> <a href="../kernel/using_object_browser.htm"><b>8</b></a> <a href="../kernel/setting_preferences.htm"><b>9</b></a> <a href="../kernel/saving_a_study.htm"><b>10</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>11</b></a> </nobr><br><nobr>defaults <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>define <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../geom_preferences.htm"><b>4</b></a> <a href="../dump_study.htm"><b>5</b></a> <a href="../select_color_and_font.htm"><b>6</b></a> <a href="../post-pro_preferences.htm"><b>7</b></a> <a href="../mesh_preferences.htm"><b>8</b></a> </nobr><br><nobr>defined <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../mesh_preferences.htm"><b>4</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>defines</b></a> <br><nobr>definite <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/editing_studies.htm"><b>2</b></a> <a href="../kernel/creating_a_new_study.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../kernel/using_registry.htm"><b>5</b></a> <a href="../kernel/using_object_browser.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><nobr>definition <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>3</b></a> </nobr><br><a href="../kernel/using_left-hand_tabs.htm"><b>definitions</b></a> <br><a href="../kernel/introduction.htm"><b>delays</b></a> <br><a href="../kernel/saving_a_study.htm"><b>deleted</b></a> <br><nobr>demand <a href="../introduction_to_gui.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>demands</b></a> <br><a href="../kernel/readme.html"><b>dependancies</b></a> <br><a href="../kernel/readme.html"><b>dependencies</b></a> <br><a href="../kernel/readme.html"><b>depending</b></a> <br><nobr>depends <a href="../kernel/editing_studies.htm"><b>1</b></a> <a href="../kernel/using_object_browser.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>derived</b></a> <br><nobr>described <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>describes</b></a> <br><nobr>describing <a href="../kernel/about_salome_pro_help_system.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><nobr>description <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><nobr>descriptions <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>design</b></a> <br><a href="../post-pro_preferences.htm"><b>designed</b></a> <br><a href="../kernel/using_catalog_generator.htm"><b>desired</b></a> <br><nobr>desktop <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><a href="../kernel/navigating_topics.htm"><b>destination</b></a> <br><nobr>destined <a href="../kernel/getting_started2.htm"><b>1</b></a> <a href="../kernel/using_registry.htm"><b>2</b></a> <a href="../kernel/using_object_browser.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><a href="../kernel/setting_preferences.htm"><b>detailed</b></a> <br><a href="../kernel/readme.html"><b>details</b></a> <br><a href="../kernel/readme.html"><b>dev</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>developer</b></a> <br><nobr>development <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>developments</b></a> <br><a href="../post-pro_preferences.htm"><b>device</b></a> <br><a name="bms_DI"></a><a name="subkey_DI"></a><a href="../mesh_preferences.htm"><b>diagrams</b></a> <br><nobr>dialog <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../geom_preferences.htm"><b>4</b></a> <a href="../dump_study.htm"><b>5</b></a> <a href="../setting_preferences.htm"><b>6</b></a> <a href="../select_color_and_font.htm"><b>7</b></a> <a href="../post-pro_preferences.htm"><b>8</b></a> <a href="../mesh_preferences.htm"><b>9</b></a> <a href="../kernel/using_registry.htm"><b>10</b></a> <a href="../kernel/using_catalog_generator.htm"><b>11</b></a> <a href="../kernel/setting_preferences.htm"><b>12</b></a> <a href="../kernel/saving_a_study.htm"><b>13</b></a> </nobr><br><a href="../kernel/salome_pro_desktop.htm"><b>dialogs</b></a> <br><a href="../kernel/readme.html"><b>differ</b></a> <br><nobr>difference <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><nobr>different <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../kernel/getting_started2.htm"><b>4</b></a> <a href="../kernel/creating_a_new_study.htm"><b>5</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>6</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>7</b></a> <a href="../kernel/using_object_browser.htm"><b>8</b></a> <a href="../kernel/saving_a_study.htm"><b>9</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>10</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>differently</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>differs</b></a> <br><a href="../kernel/introduction.htm"><b>digital</b></a> <br><a href="../mesh_preferences.htm"><b>digits</b></a> <br><a href="../kernel/readme.html"><b>dir</b></a> <br><nobr>direction <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><nobr>directories <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>directory <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../setting_preferences.htm"><b>3</b></a> <a href="../kernel/using_catalog_generator.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> </nobr><br><nobr>disable <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>disable_flag</b></a> <br><a href="../post-pro_preferences.htm"><b>disabled</b></a> <br><nobr>disk <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><nobr>display <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../geom_preferences.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../mesh_preferences.htm"><b>5</b></a> <a href="../kernel/using_registry.htm"><b>6</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>7</b></a> <a href="../kernel/setting_preferences.htm"><b>8</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>9</b></a> </nobr><br><nobr>displayed <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../mesh_preferences.htm"><b>5</b></a> <a href="../kernel/using_object_browser.htm"><b>6</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>7</b></a> <a href="../kernel/setting_preferences.htm"><b>8</b></a> <a href="../kernel/saving_a_study.htm"><b>9</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>10</b></a> </nobr><br><nobr>displaying <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../kernel/using_object_browser.htm"><b>2</b></a> </nobr><br><nobr>displays <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/using_registry.htm"><b>3</b></a> <a href="../kernel/using_object_browser.htm"><b>4</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>5</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>distance</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>distinction</b></a> <br><a href="../kernel/readme.html"><b>distribute</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>distributed</b></a> <br><a href="../kernel/readme.html"><b>distribution</b></a> <br><nobr>divided <a href="../kernel/about_salome_pro_help_system.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../kernel/using_registry.htm"><b>3</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>divides</b></a> <br><nobr><a name="bms_DO"></a><a name="subkey_DO"></a>dockable <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><nobr>document <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/creating_a_new_study.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><nobr>does <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/editing_studies.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>doesn</b></a> <br><a href="../kernel/readme.html"><b>doing</b></a> <br><nobr>domain <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>dominant</b></a> <br><a href="../kernel/using_catalog_generator.htm"><b>don</b></a> <br><nobr>done <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>dot</b></a> <br><a href="../kernel/using_registry.htm"><b>double</b></a> <br><nobr>down <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>doxygen</b></a> <br><a href="../kernel/readme.html"><b>doxytag</b></a> <br><a href="../kernel/readme.html"><b>doxywizard</b></a> <br><a name="bms_DR"></a><a name="subkey_DR"></a><a href="../kernel/salome_pro_desktop.htm"><b>dragging</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>dramatically</b></a> <br><a href="../kernel/readme.html"><b>drive</b></a> <br><a href="../kernel/navigating_topics.htm"><b>drop</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>dropping</b></a> <br><a name="bms_DU"></a><a name="subkey_DU"></a><a href="../dump_study.htm"><b>dump</b></a> <br><a href="../kernel/readme.html"><b>dumpversion</b></a> <br><a name="bms_DY"></a><a name="subkey_DY"></a><a href="../introduction_to_gui.htm"><b>dynamic</b></a> <br><nobr>dynamically <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br>\r
-<br><br>\r
-<nobr><a name="bm_E"></a><a name="subkey_E{"></a>e <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><a name="bms_EA"></a><a name="subkey_EA"></a><a href="../kernel/introduction.htm"><b>easier</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>easily</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>easy</b></a> <br><a name="bms_EC"></a><a name="subkey_EC"></a><a href="../kernel/about_salome_pro_architecture.htm"><b>economically</b></a> <br><a name="bms_ED"></a><a name="subkey_ED"></a><a href="../mesh_preferences.htm"><b>edges</b></a> <br><nobr>edit <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/editing_studies.htm"><b>4</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>editable</b></a> <br><nobr>editing <a href="../kernel/editing_studies.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>edition</b></a> <br><a href="../setting_preferences.htm"><b>editor</b></a> <br><br><br></p><p class="ftsbody" align="center"><a href="whlstf3.htm" target="_self" title="previous search group"><b>>></b></a>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" align="center"><a href="whlstf2.htm" target="_self" title="previous search group"><b><<</b></a><br><br></p>\r
-<p class="ftsbody" >\r
-<a name="bms_EF"></a><a name="subkey_EF"></a><a href="../kernel/introduction.htm"><b>efficient</b></a> <br><a name="bms_EG"></a><a name="subkey_EG"></a><a href="../kernel/readme.html"><b>egrep</b></a> <br><nobr><a name="bms_EI"></a><a name="subkey_EI"></a>either <a href="../select_color_and_font.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a name="bms_EL"></a><a name="subkey_EL"></a><a href="../kernel/introduction.htm"><b>electrical</b></a> <br><a href="../kernel/introduction.htm"><b>electronic</b></a> <br><nobr>element <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><a href="../mesh_preferences.htm"><b>elements</b></a> <br><a name="bms_EM"></a><a name="subkey_EM"></a><a href="../kernel/running_salome_pro.htm"><b>embedded</b></a> <br><a href="../kernel/displaying_studies.htm"><b>empty</b></a> <br><nobr><a name="bms_EN"></a><a name="subkey_EN"></a>enables <a href="../kernel/using_left-hand_tabs.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>encouraging</b></a> <br><nobr>end <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../setting_preferences.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>enforcing</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>engine</b></a> <br><a href="../kernel/readme.html"><b>enough</b></a> <br><a href="../kernel/introduction.htm"><b>ensure</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>ensuring</b></a> <br><nobr>enter <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><a href="../kernel/readme.html"><b>entered</b></a> <br><a href="../mesh_preferences.htm"><b>entity</b></a> <br><nobr>entry <a href="../kernel/using_object_browser.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>env_</b></a> <br><a href="../kernel/readme.html"><b>env_for_launch</b></a> <br><a href="../kernel/readme.html"><b>env_products</b></a> <br><a href="../kernel/readme.html"><b>env_vtk</b></a> <br><nobr>environment <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/getting_started2.htm"><b>4</b></a> <a href="../kernel/displaying_studies.htm"><b>5</b></a> <a href="../introduction_to_gui.htm"><b>6</b></a> </nobr><br><nobr>environments <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a name="bms_EQ"></a><a name="subkey_EQ"></a><a href="../kernel/readme.html"><b>equal</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>equally</b></a> <br><a href="../kernel/introduction.htm"><b>equipment</b></a> <br><nobr><a name="bms_ER"></a><a name="subkey_ER"></a>error <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><nobr><a name="bms_ET"></a><a name="subkey_ET"></a>etc <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> <a href="../post-pro_preferences.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr><a name="bms_EV"></a><a name="subkey_EV"></a>even <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><a href="../kernel/using_registry.htm"><b>ever</b></a> <br><nobr>every <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>everything</b></a> <br><a href="../kernel/introduction.htm"><b>evolutions</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>evolve</b></a> <br><a name="bms_EX"></a><a name="subkey_EX"></a><a href="../kernel/running_salome_pro.htm"><b>ex</b></a> <br><a href="../kernel/readme.html"><b>exact</b></a> <br><nobr>exactly <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><nobr>example <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../kernel/using_catalog_generator.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>exceeds</b></a> <br><nobr>exception <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>exchanges</b></a> <br><nobr>execution <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>exist</b></a> <br><a href="../kernel/readme.html"><b>existence</b></a> <br><nobr>existing <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../setting_preferences.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> </nobr><br><nobr>exists <a href="../kernel/readme.html"><b>1</b></a> <a href="../setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>expandability</b></a> <br><a href="../kernel/navigating_topics.htm"><b>expanding</b></a> <br><a href="../kernel/introduction.htm"><b>expectations</b></a> <br><a href="../dump_study.htm"><b>expert</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>exploits</b></a> <br><a href="../kernel/about_salome_pro_help_system.htm"><b>explorer</b></a> <br><nobr>export <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>exposes</b></a> <br><a href="../select_color_and_font.htm"><b>extended</b></a> <br><a href="../setting_preferences.htm"><b>extension</b></a> <br><a href="../kernel/saving_a_study.htm"><b>extensions</b></a> <br><a href="../kernel/setting_preferences.htm"><b>external</b></a> <br><a href="../kernel/readme.html"><b>extracting</b></a> <br><a href="../kernel/introduction.htm"><b>extremely</b></a> <br>\r
-<br><br>\r
-<nobr><a name="bm_F"></a><a name="subkey_F{"></a>f <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><nobr><a name="bms_FA"></a><a name="subkey_FA"></a>face <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> </nobr><br><nobr>faces <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>facilitated</b></a> <br><a href="../kernel/introduction_to_salome_pro.htm"><b>facilitates</b></a> <br><nobr>fact <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><a href="../kernel/using_catalog_generator.htm"><b>factory</b></a> <br><a href="../kernel/readme.html"><b>fail</b></a> <br><a href="../kernel/readme.html"><b>fails</b></a> <br><a href="../kernel/readme.html"><b>false</b></a> <br><a href="../post-pro_preferences.htm"><b>families</b></a> <br><nobr><a name="bms_FE"></a><a name="subkey_FE"></a>feature <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_help_system.htm"><b>features</b></a> <br><nobr><a name="bms_FI"></a><a name="subkey_FI"></a>field <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> <a href="../select_color_and_font.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../mesh_preferences.htm"><b>5</b></a> </nobr><br><nobr>fields <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>fig</b></a> <br><a href="../kernel/readme.html"><b>figure</b></a> <br><a href="../geom_preferences.htm"><b>figures</b></a> <br><nobr>file <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>4</b></a> <a href="../kernel/creating_a_new_study.htm"><b>5</b></a> <a href="../dump_study.htm"><b>6</b></a> <a href="../setting_preferences.htm"><b>7</b></a> <a href="../post-pro_preferences.htm"><b>8</b></a> <a href="../kernel/using_catalog_generator.htm"><b>9</b></a> <a href="../kernel/setting_preferences.htm"><b>10</b></a> <a href="../kernel/saving_a_study.htm"><b>11</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>12</b></a> </nobr><br><nobr>files <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/using_catalog_generator.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> </nobr><br><a href="../mesh_preferences.htm"><b>fill</b></a> <br><nobr>find <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>find_in_path</b></a> <br><a href="../kernel/readme.html"><b>finds</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>finely</b></a> <br><nobr>finish <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>finishes</b></a> <br><a href="../kernel/introduction.htm"><b>finite</b></a> <br><nobr>first <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/using_object_browser.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> </nobr><br><a href="../kernel/setting_preferences.htm"><b>fit</b></a> <br><a name="bms_FL"></a><a name="subkey_FL"></a><a href="../kernel/readme.html"><b>flag</b></a> <br><nobr>flexibility <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><nobr>flexible <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> </nobr><br><a name="bms_FO"></a><a name="subkey_FO"></a><a href="../post-pro_preferences.htm"><b>focal</b></a> <br><a href="../kernel/navigating_topics.htm"><b>focus</b></a> <br><nobr>folder <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_object_browser.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> </nobr><br><nobr>follow <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../setting_preferences.htm"><b>followed</b></a> <br><nobr>following <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../kernel/navigating_topics.htm"><b>4</b></a> <a href="../kernel/getting_started2.htm"><b>5</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>6</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>7</b></a> <a href="../dump_study.htm"><b>8</b></a> <a href="../kernel/using_registry.htm"><b>9</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>10</b></a> <a href="../kernel/using_catalog_generator.htm"><b>11</b></a> <a href="../kernel/setting_preferences.htm"><b>12</b></a> <a href="../kernel/saving_a_study.htm"><b>13</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>14</b></a> </nobr><br><nobr>font <a href="../select_color_and_font.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a href="../select_color_and_font.htm"><b>fonts</b></a> <br><a href="../kernel/using_catalog_generator.htm"><b>forget</b></a> <br><nobr>format <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>formats</b></a> <br><a href="../post-pro_preferences.htm"><b>forth</b></a> <br><a name="bms_FP"></a><a name="subkey_FP"></a><a href="../post-pro_preferences.htm"><b>fps</b></a> <br><a name="bms_FR"></a><a name="subkey_FR"></a><a href="../kernel/readme.html"><b>frame</b></a> <br><a href="../post-pro_preferences.htm"><b>frames</b></a> <br><a href="../introduction_to_gui.htm"><b>framework</b></a> <br><nobr>free <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>friendly</b></a> <br><a name="bms_FU"></a><a name="subkey_FU"></a><a href="../dump_study.htm"><b>fulfill</b></a> <br><nobr>full <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>fully</b></a> <br><nobr>function <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>function_name</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>functional</b></a> <br><a href="../kernel/introduction.htm"><b>functionalities</b></a> <br><nobr>functionality <a href="../kernel/getting_started2.htm"><b>1</b></a> <a href="../kernel/editing_studies.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><a href="../kernel/saving_a_study.htm"><b>functioning</b></a> <br><nobr>functions <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>fundamental</b></a> <br><a href="../kernel/readme.html"><b>further</b></a> <br>\r
-<br><br>\r
-<nobr><a name="bm_G"></a><a name="subkey_G{"></a>g <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><a name="bms_GA"></a><a name="subkey_GA"></a><a href="../mesh_preferences.htm"><b>gaps</b></a> <br><nobr>gauss <a href="../introduction_to_gui.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a name="bms_GC"></a><a name="subkey_GC"></a><a href="../kernel/readme.html"><b>gcc</b></a> <br><nobr><a name="bms_GE"></a><a name="subkey_GE"></a>general <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><nobr>generate <a href="../dump_study.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><nobr>generated <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><nobr>generates <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> </nobr><br><nobr>generator <a href="../introduction_to_gui.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>generators</b></a> <br><nobr>generic <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><nobr>geom <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> </nobr><br><nobr>geometrical <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../geom_preferences.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> </nobr><br><nobr>geometry <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../geom_preferences.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><nobr>get <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>2</b></a> </nobr><br><nobr>getting <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/using_object_browser.htm"><b>3</b></a> </nobr><br><br><br></p><p class="ftsbody" align="center"><a href="whlstf4.htm" target="_self" title="previous search group"><b>>></b></a>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" align="center"><a href="whlstf3.htm" target="_self" title="previous search group"><b><<</b></a><br><br></p>\r
-<p class="ftsbody" >\r
-<a name="bms_GI"></a><a name="subkey_GI"></a><a href="../kernel/readme.html"><b>give</b></a> <br><nobr>given <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><nobr>gives <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> <a href="../select_color_and_font.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><a name="bms_GL"></a><a name="subkey_GL"></a><a href="../post-pro_preferences.htm"><b>gl</b></a> <br><a href="../post-pro_preferences.htm"><b>global</b></a> <br><a href="../kernel/using_left-hand_tabs.htm"><b>glossary</b></a> <br><nobr><a name="bms_GO"></a><a name="subkey_GO"></a>go <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> </nobr><br><a name="bms_GR"></a><a name="subkey_GR"></a><a href="../kernel/setting_preferences.htm"><b>graph</b></a> <br><a href="../post-pro_preferences.htm"><b>graphic</b></a> <br><nobr>graphical <a href="../introduction_to_gui.htm"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><nobr>graphs <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>graphviz</b></a> <br><a href="../dump_study.htm"><b>great</b></a> <br><a href="../post-pro_preferences.htm"><b>greater</b></a> <br><a href="../dump_study.htm"><b>greatly</b></a> <br><a href="../select_color_and_font.htm"><b>greek</b></a> <br><a href="../kernel/readme.html"><b>grep</b></a> <br><a href="../select_color_and_font.htm"><b>grouped</b></a> <br><nobr>groups <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><nobr><a name="bms_GU"></a><a name="subkey_GU"></a>gui <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> <a href="../kernel/creating_a_new_study.htm"><b>4</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>5</b></a> <a href="../introduction_to_gui.htm"><b>6</b></a> <a href="../dump_study.htm"><b>7</b></a> <a href="../setting_preferences.htm"><b>8</b></a> <a href="../kernel/setting_preferences.htm"><b>9</b></a> <a href="../kernel/saving_a_study.htm"><b>10</b></a> </nobr><br>\r
-<br><br>\r
-<nobr><a name="bm_H"></a><a name="subkey_H{"></a>h <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><a name="bms_HA"></a><a name="subkey_HA"></a><a href="../post-pro_preferences.htm"><b>half</b></a> <br><nobr>hand <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>3</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>handle</b></a> <br><a href="../kernel/introduction.htm"><b>handled</b></a> <br><a href="../kernel/readme.html"><b>handler</b></a> <br><nobr>handling <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> </nobr><br><nobr>hard <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><a href="../kernel/saving_a_study.htm"><b>hasn</b></a> <br><a href="../kernel/setting_preferences.htm"><b>haven</b></a> <br><nobr>having <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/using_object_browser.htm"><b>3</b></a> </nobr><br><nobr><a name="bms_HD"></a><a name="subkey_HD"></a>hdf <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><a href="../kernel/readme.html"><b>hdf5</b></a> <br><a href="../kernel/readme.html"><b>hdf5home</b></a> <br><a name="bms_HE"></a><a name="subkey_HE"></a><a href="../kernel/introduction.htm"><b>healing</b></a> <br><nobr>height <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/using_registry.htm"><b>hello</b></a> <br><nobr>help <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../kernel/navigating_topics.htm"><b>4</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>5</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>6</b></a> <a href="../kernel/using_object_browser.htm"><b>7</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>8</b></a> <a href="../kernel/setting_preferences.htm"><b>9</b></a> </nobr><br><a href="../kernel/readme.html"><b>helpful</b></a> <br><nobr>helps <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><nobr>here <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>heterogeneous</b></a> <br><nobr><a name="bms_HI"></a><a name="subkey_HI"></a>hide <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>3</b></a> </nobr><br><a href="../kernel/using_object_browser.htm"><b>hiding</b></a> <br><a href="../kernel/introduction.htm"><b>high</b></a> <br><a href="../kernel/readme.html"><b>higher</b></a> <br><a href="../mesh_preferences.htm"><b>highlight</b></a> <br><nobr>highlighted <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_object_browser.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>hints</b></a> <br><a href="../kernel/using_registry.htm"><b>history</b></a> <br><nobr><a name="bms_HO"></a><a name="subkey_HO"></a>home <a href="../kernel/readme.html"><b>1</b></a> <a href="../setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>horizontal <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a href="../kernel/displaying_studies.htm"><b>horizontally</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>host</b></a> <br><a href="../kernel/navigating_topics.htm"><b>hotspot</b></a> <br><a href="../kernel/navigating_topics.htm"><b>hotspots</b></a> <br><nobr>how <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a name="bms_HP"></a><a name="subkey_HP"></a><a href="../kernel/readme.html"><b>hpp</b></a> <br><nobr><a name="bms_HT"></a><a name="subkey_HT"></a>html <a href="../kernel/about_salome_pro_help_system.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><a name="bms_HX"></a><a name="subkey_HX"></a><a href="../kernel/readme.html"><b>hxx</b></a> <br>\r
-<br><br>\r
-<nobr><a name="bm_I"></a><a name="subkey_I{"></a>i <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><nobr><a name="bms_IC"></a><a name="subkey_IC"></a>icon <a href="../kernel/creating_a_new_study.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><nobr>icons <a href="../kernel/editing_studies.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><a name="bms_ID"></a><a name="subkey_ID"></a><a href="../kernel/readme.html"><b>idea</b></a> <br><nobr>identification <a href="../kernel/using_registry.htm"><b>1</b></a> <a href="../kernel/using_object_browser.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>identify</b></a> <br><nobr>idl <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><a name="bms_IE"></a><a name="subkey_IE"></a><a href="../kernel/setting_preferences.htm"><b>ie</b></a> <br><nobr><a name="bms_IF"></a><a name="subkey_IF"></a>if <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../kernel/editing_studies.htm"><b>4</b></a> <a href="../kernel/displaying_studies.htm"><b>5</b></a> <a href="../kernel/creating_a_new_study.htm"><b>6</b></a> <a href="../dump_study.htm"><b>7</b></a> <a href="../post-pro_preferences.htm"><b>8</b></a> <a href="../mesh_preferences.htm"><b>9</b></a> <a href="../kernel/using_object_browser.htm"><b>10</b></a> <a href="../kernel/using_catalog_generator.htm"><b>11</b></a> <a href="../kernel/setting_preferences.htm"><b>12</b></a> <a href="../kernel/saving_a_study.htm"><b>13</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>14</b></a> </nobr><br><a name="bms_IG"></a><a name="subkey_IG"></a><a href="../kernel/introduction.htm"><b>iges</b></a> <br><a href="../kernel/readme.html"><b>ignored</b></a> <br><a name="bms_IM"></a><a name="subkey_IM"></a><a href="../post-pro_preferences.htm"><b>image</b></a> <br><nobr>images <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/navigating_topics.htm"><b>immediately</b></a> <br><nobr>implement <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><nobr>implementation <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>implementing</b></a> <br><a href="../kernel/readme.html"><b>implied</b></a> <br><nobr>import <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../setting_preferences.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> </nobr><br><a href="../kernel/readme.html"><b>important</b></a> <br><nobr>imported <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>imposed</b></a> <br><a href="../introduction_to_gui.htm"><b>improves</b></a> <br><a name="bms_IN"></a><a name="subkey_IN"></a><a href="../kernel/readme.html"><b>inc</b></a> <br><a href="../kernel/readme.html"><b>included</b></a> <br><nobr>includes <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><nobr>including <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>inclusive</b></a> <br><a href="../post-pro_preferences.htm"><b>increase</b></a> <br><nobr>increases <a href="../dump_study.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>increasingly</b></a> <br><nobr>increment <a href="../geom_preferences.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>incrementally</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>independence</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>independent</b></a> <br><a href="../kernel/using_object_browser.htm"><b>index</b></a> <br><a href="../mesh_preferences.htm"><b>indexing</b></a> <br><nobr>indicate <a href="../kernel/saving_a_study.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><nobr>information <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../post-pro_preferences.htm"><b>5</b></a> <a href="../kernel/using_registry.htm"><b>6</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>7</b></a> <a href="../kernel/saving_a_study.htm"><b>8</b></a> </nobr><br><a href="../kernel/getting_started2.htm"><b>initial</b></a> <br><nobr>input <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>insert</b></a> <br><nobr>inside <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> </nobr><br><a href="../kernel/readme.html"><b>inspect</b></a> <br><a href="../post-pro_preferences.htm"><b>inspected</b></a> <br><a href="../kernel/readme.html"><b>instalation</b></a> <br><nobr>install <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>install_binary</b></a> <br><a href="../kernel/readme.html"><b>install_disk_space</b></a> <br><a href="../kernel/readme.html"><b>install_source</b></a> <br><a href="../kernel/readme.html"><b>install_wizard_caption</b></a> <br><a href="../kernel/readme.html"><b>install_wizard_copyright</b></a> <br><a href="../kernel/readme.html"><b>install_wizard_license_info</b></a> <br><a href="../kernel/readme.html"><b>install_wizard_root_directory</b></a> <br><a href="../kernel/readme.html"><b>install_wizard_version</b></a> <br><nobr>installation <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>installation_mode</b></a> <br><a href="../kernel/readme.html"><b>installation_script_name</b></a> <br><a href="../kernel/readme.html"><b>installdiskspace</b></a> <br><nobr>installed <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>installing</b></a> <br><a href="../kernel/readme.html"><b>installwizard_root_directory</b></a> <br><a href="../kernel/readme.html"><b>installworkxxxxx</b></a> <br><a href="../kernel/creating_a_new_study.htm"><b>instances</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>instrumental</b></a> <br><a href="../kernel/readme.html"><b>integer</b></a> <br><a href="../mesh_preferences.htm"><b>integers</b></a> <br><a href="../kernel/introduction_to_salome_pro.htm"><b>integrate</b></a> <br><nobr>integrated <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> </nobr><br><a href="../kernel/introduction_to_salome_pro.htm"><b>integrates</b></a> <br><nobr>integration <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../kernel/using_catalog_generator.htm"><b>4</b></a> </nobr><br><a href="../kernel/readme.html"><b>intend</b></a> <br><a href="../introduction_to_gui.htm"><b>interaction</b></a> <br><nobr>interface <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>interfaces <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../kernel/using_catalog_generator.htm"><b>4</b></a> </nobr><br><a href="../mesh_preferences.htm"><b>interior</b></a> <br><nobr>internal <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_help_system.htm"><b>internet</b></a> <br><a href="../kernel/introduction.htm"><b>interoperability</b></a> <br><a href="../kernel/using_object_browser.htm"><b>interoperable</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>interp</b></a> <br><nobr>interpreter <a href="../introduction_to_gui.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><nobr>interval <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/using_registry.htm"><b>2</b></a> </nobr><br><nobr>introduction <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> </nobr><br><a href="../kernel/saving_a_study.htm"><b>invalid</b></a> <br><a href="../kernel/readme.html"><b>invoke</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>invoked</b></a> <br><br><br></p><p class="ftsbody" align="center"><a href="whlstf5.htm" target="_self" title="previous search group"><b>>></b></a>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" align="center"><a href="whlstf4.htm" target="_self" title="previous search group"><b><<</b></a><br><br></p>\r
-<p class="ftsbody" >\r
-<nobr><a name="bms_IO"></a><a name="subkey_IO"></a>ior <a href="../kernel/using_object_browser.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a name="bms_IS"></a><a name="subkey_IS"></a><a href="../kernel/setting_preferences.htm"><b>isolines</b></a> <br><a href="../kernel/readme.html"><b>ispython</b></a> <br><a name="bms_IT"></a><a name="subkey_IT"></a><a href="../kernel/getting_properties_of_the_study.htm"><b>item</b></a> <br><nobr>items <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>iterations</b></a> <br><a href="../kernel/readme.html"><b>itself</b></a> <br>\r
-<br><br>\r
-<a name="bm_J"></a><a name="subkey_JA"></a><a href="../kernel/about_salome_pro_help_system.htm"><b>java</b></a> <br><nobr><a name="bms_JU"></a><a name="subkey_JU"></a>just <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br>\r
-<br><br>\r
-<a name="bm_K"></a><a name="subkey_K{"></a><a href="../kernel/running_salome_pro.htm"><b>k</b></a> <br><a name="bms_KB"></a><a name="subkey_KB"></a><a href="../kernel/readme.html"><b>kbytes</b></a> <br><nobr><a name="bms_KE"></a><a name="subkey_KE"></a>kernel <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> </nobr><br><nobr>key <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>keyboard</b></a> <br><a name="bms_KI"></a><a name="subkey_KI"></a><a href="../kernel/running_salome_pro.htm"><b>kill</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>killall</b></a> <br><nobr>kind <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> </nobr><br><a name="bms_KN"></a><a name="subkey_KN"></a><a href="../kernel/using_catalog_generator.htm"><b>know</b></a> <br><a href="../dump_study.htm"><b>knowledge</b></a> <br>\r
-<br><br>\r
-<a name="bm_L"></a><a name="subkey_L{"></a><a href="../kernel/running_salome_pro.htm"><b>l</b></a> <br><nobr><a name="bms_LA"></a><a name="subkey_LA"></a>labels <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>language</b></a> <br><a href="../kernel/readme.html"><b>larger</b></a> <br><a href="../post-pro_preferences.htm"><b>largest</b></a> <br><nobr>last <a href="../kernel/using_registry.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>latest</b></a> <br><a href="../select_color_and_font.htm"><b>latin</b></a> <br><nobr>launch <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../setting_preferences.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> </nobr><br><nobr>launched <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> <a href="../kernel/using_registry.htm"><b>5</b></a> </nobr><br><a href="../kernel/readme.html"><b>launches</b></a> <br><nobr>launching <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/using_registry.htm"><b>3</b></a> <a href="../kernel/using_catalog_generator.htm"><b>4</b></a> </nobr><br><a href="../kernel/creating_a_new_study.htm"><b>layer</b></a> <br><nobr>layout <a href="../dump_study.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a name="bms_LD"></a><a name="subkey_LD"></a><a href="../kernel/readme.html"><b>ld_library_path</b></a> <br><a name="bms_LE"></a><a name="subkey_LE"></a><a href="../kernel/saving_a_study.htm"><b>lead</b></a> <br><a href="../kernel/readme.html"><b>learn</b></a> <br><a href="../kernel/introduction.htm"><b>learning</b></a> <br><nobr>left <a href="../kernel/readme.html"><b>1</b></a> <a href="../select_color_and_font.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../mesh_preferences.htm"><b>4</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>5</b></a> <a href="../kernel/setting_preferences.htm"><b>6</b></a> </nobr><br><a href="../kernel/setting_preferences.htm"><b>legend</b></a> <br><a href="../post-pro_preferences.htm"><b>length</b></a> <br><a href="../post-pro_preferences.htm"><b>less</b></a> <br><nobr>level <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><a name="bms_LI"></a><a name="subkey_LI"></a><a href="../kernel/readme.html"><b>lib</b></a> <br><a href="../kernel/readme.html"><b>libcosnotify4</b></a> <br><a href="../kernel/readme.html"><b>libhdf5</b></a> <br><a href="../kernel/readme.html"><b>libmed</b></a> <br><a href="../kernel/readme.html"><b>libomniorb4</b></a> <br><a href="../kernel/readme.html"><b>libqwt</b></a> <br><a href="../kernel/readme.html"><b>libraries</b></a> <br><nobr>library <a href="../kernel/readme.html"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>libstdplugin</b></a> <br><a href="../kernel/readme.html"><b>libtcl8</b></a> <br><a href="../kernel/readme.html"><b>libtk8</b></a> <br><a href="../kernel/readme.html"><b>libvtkcommon</b></a> <br><a href="../kernel/readme.html"><b>license</b></a> <br><nobr>like <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../post-pro_preferences.htm"><b>5</b></a> <a href="../kernel/using_object_browser.htm"><b>6</b></a> <a href="../kernel/using_catalog_generator.htm"><b>7</b></a> <a href="../kernel/saving_a_study.htm"><b>8</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>9</b></a> </nobr><br><a href="../kernel/readme.html"><b>likely</b></a> <br><a href="../post-pro_preferences.htm"><b>limitation</b></a> <br><a href="../post-pro_preferences.htm"><b>limits</b></a> <br><nobr>line <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>3</b></a> <a href="../geom_preferences.htm"><b>4</b></a> <a href="../post-pro_preferences.htm"><b>5</b></a> <a href="../mesh_preferences.htm"><b>6</b></a> <a href="../kernel/setting_preferences.htm"><b>7</b></a> </nobr><br><a href="../kernel/setting_preferences.htm"><b>linear</b></a> <br><nobr>lines <a href="../mesh_preferences.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>link <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><nobr>links <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><nobr>linux <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>2</b></a> </nobr><br><nobr>list <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/navigating_topics.htm"><b>3</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>4</b></a> <a href="../kernel/using_registry.htm"><b>5</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>6</b></a> <a href="../kernel/setting_preferences.htm"><b>7</b></a> </nobr><br><a href="../kernel/readme.html"><b>list_of_prerequisites</b></a> <br><a href="../post-pro_preferences.htm"><b>listed</b></a> <br><a name="bms_LL"></a><a name="subkey_LL"></a><a href="../kernel/setting_preferences.htm"><b>ll</b></a> <br><nobr><a name="bms_LO"></a><a name="subkey_LO"></a>load <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../setting_preferences.htm"><b>3</b></a> </nobr><br><nobr>loaded <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/using_object_browser.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>loading <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>local</b></a> <br><a href="../kernel/using_left-hand_tabs.htm"><b>locate</b></a> <br><nobr>located <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/using_object_browser.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>location <a href="../dump_study.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><a href="../kernel/getting_properties_of_the_study.htm"><b>lock</b></a> <br><nobr>locked <a href="../kernel/getting_properties_of_the_study.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>locking</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>log</b></a> <br><nobr>logarithmic <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/running_salome_pro.htm"><b>logger</b></a> <br><nobr>long <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../kernel/using_catalog_generator.htm"><b>look</b></a> <br><nobr>lookout <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><nobr>looks <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><a href="../kernel/saving_a_study.htm"><b>lost</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>lot</b></a> <br><nobr>lower <a href="../kernel/readme.html"><b>1</b></a> <a href="../select_color_and_font.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>4</b></a> </nobr><br>\r
-<br><br>\r
-<a name="bm_M"></a><a name="subkey_M{"></a><a href="../kernel/running_salome_pro.htm"><b>m</b></a> <br><nobr><a name="bms_MA"></a><a name="subkey_MA"></a>machine <a href="../kernel/using_registry.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>machines</b></a> <br><a href="../kernel/about_salome_pro_help_system.htm"><b>macintosh</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>macro</b></a> <br><a href="../post-pro_preferences.htm"><b>magnification</b></a> <br><nobr>main <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>4</b></a> <a href="../kernel/editing_studies.htm"><b>5</b></a> <a href="../kernel/creating_a_new_study.htm"><b>6</b></a> <a href="../dump_study.htm"><b>7</b></a> <a href="../post-pro_preferences.htm"><b>8</b></a> <a href="../kernel/using_registry.htm"><b>9</b></a> <a href="../kernel/using_catalog_generator.htm"><b>10</b></a> <a href="../kernel/setting_preferences.htm"><b>11</b></a> <a href="../kernel/saving_a_study.htm"><b>12</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>13</b></a> </nobr><br><a href="../kernel/readme.html"><b>major</b></a> <br><nobr>make <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/creating_a_new_study.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>make_dir</b></a> <br><a href="../kernel/readme.html"><b>make_env</b></a> <br><a href="../kernel/introduction.htm"><b>makes</b></a> <br><nobr>manage <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>management <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>mandrake</b></a> <br><a href="../kernel/readme.html"><b>mandrake10</b></a> <br><a href="../post-pro_preferences.htm"><b>manipulate</b></a> <br><a href="../post-pro_preferences.htm"><b>manipulator</b></a> <br><nobr>manual <a href="../kernel/about_salome_pro_help_system.htm"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>manually</b></a> <br><a href="../kernel/setting_preferences.htm"><b>manuals</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>mapped</b></a> <br><a href="../kernel/readme.html"><b>mark</b></a> <br><a href="../kernel/readme.html"><b>marked</b></a> <br><a href="../kernel/setting_preferences.htm"><b>marker</b></a> <br><a href="../kernel/setting_preferences.htm"><b>markers</b></a> <br><a href="../kernel/introduction.htm"><b>market</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>massively</b></a> <br><a href="../kernel/readme.html"><b>master</b></a> <br><a href="../kernel/using_left-hand_tabs.htm"><b>matches</b></a> <br><a href="../post-pro_preferences.htm"><b>matrix</b></a> <br><a href="../post-pro_preferences.htm"><b>max</b></a> <br><a href="../kernel/creating_a_new_study.htm"><b>maximize</b></a> <br><a href="../post-pro_preferences.htm"><b>maximum</b></a> <br><a name="bms_ME"></a><a name="subkey_ME"></a><a href="../post-pro_preferences.htm"><b>mean</b></a> <br><nobr>means <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>mechanism <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><a href="../introduction_to_gui.htm"><b>mechanisms</b></a> <br><a href="../kernel/readme.html"><b>med2home</b></a> <br><a href="../kernel/introduction.htm"><b>meet</b></a> <br><a href="../post-pro_preferences.htm"><b>memory</b></a> <br><a href="../kernel/readme.html"><b>mentioned</b></a> <br><nobr>menu <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/editing_studies.htm"><b>4</b></a> <a href="../kernel/creating_a_new_study.htm"><b>5</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>6</b></a> <a href="../introduction_to_gui.htm"><b>7</b></a> <a href="../dump_study.htm"><b>8</b></a> <a href="../setting_preferences.htm"><b>9</b></a> <a href="../select_color_and_font.htm"><b>10</b></a> <a href="../post-pro_preferences.htm"><b>11</b></a> <a href="../mesh_preferences.htm"><b>12</b></a> <a href="../kernel/using_registry.htm"><b>13</b></a> <a href="../kernel/using_object_browser.htm"><b>14</b></a> <a href="../kernel/using_catalog_generator.htm"><b>15</b></a> <a href="../kernel/setting_preferences.htm"><b>16</b></a> <a href="../kernel/saving_a_study.htm"><b>17</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>18</b></a> </nobr><br><a href="../kernel/salome_pro_desktop.htm"><b>menubar</b></a> <br><nobr>menus <a href="../introduction_to_gui.htm"><b>1</b></a> <a href="../select_color_and_font.htm"><b>2</b></a> <a href="../kernel/using_object_browser.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><nobr>mesh <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../mesh_preferences.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>meshes <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><nobr>meshing <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><nobr>message <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> </nobr><br><nobr>messages <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> </nobr><br><a name="bms_MI"></a><a name="subkey_MI"></a><a href="../kernel/readme.html"><b>middle</b></a> <br><a href="../post-pro_preferences.htm"><b>min</b></a> <br><a href="../kernel/creating_a_new_study.htm"><b>minimized</b></a> <br><a href="../post-pro_preferences.htm"><b>minimum</b></a> <br><a href="../kernel/readme.html"><b>minor</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>mistakes</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>mix</b></a> <br><br><br></p><p class="ftsbody" align="center"><a href="whlstf6.htm" target="_self" title="previous search group"><b>>></b></a>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" align="center"><a href="whlstf5.htm" target="_self" title="previous search group"><b><<</b></a><br><br></p>\r
-<p class="ftsbody" >\r
-<nobr><a name="bms_MO"></a><a name="subkey_MO"></a>mode <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../geom_preferences.htm"><b>4</b></a> <a href="../dump_study.htm"><b>5</b></a> <a href="../post-pro_preferences.htm"><b>6</b></a> <a href="../mesh_preferences.htm"><b>7</b></a> </nobr><br><nobr>model <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><nobr>modeling <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><nobr>models <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>modern</b></a> <br><nobr>modes <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><nobr>modification <a href="../kernel/getting_properties_of_the_study.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> </nobr><br><a href="../kernel/getting_properties_of_the_study.htm"><b>modifications</b></a> <br><nobr>modify <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>modifying</b></a> <br><nobr>module <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/editing_studies.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> <a href="../geom_preferences.htm"><b>5</b></a> <a href="../setting_preferences.htm"><b>6</b></a> <a href="../post-pro_preferences.htm"><b>7</b></a> <a href="../mesh_preferences.htm"><b>8</b></a> <a href="../kernel/using_catalog_generator.htm"><b>9</b></a> <a href="../kernel/saving_a_study.htm"><b>10</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>11</b></a> </nobr><br><a href="../kernel/readme.html"><b>module_root_dir</b></a> <br><a href="../kernel/readme.html"><b>module_src_dir</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>module1</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>module2</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>modulecatalog</b></a> <br><nobr>modules <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>4</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>5</b></a> <a href="../introduction_to_gui.htm"><b>6</b></a> <a href="../kernel/using_catalog_generator.htm"><b>7</b></a> <a href="../kernel/setting_preferences.htm"><b>8</b></a> <a href="../kernel/saving_a_study.htm"><b>9</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>10</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>modulus</b></a> <br><nobr>moment <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>momentarily</b></a> <br><nobr>mouse <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>3</b></a> </nobr><br><a href="../kernel/displaying_studies.htm"><b>move</b></a> <br><a href="../post-pro_preferences.htm"><b>movement</b></a> <br><a href="../post-pro_preferences.htm"><b>movements</b></a> <br><a href="../kernel/setting_preferences.htm"><b>mozilla</b></a> <br><a name="bms_MS"></a><a name="subkey_MS"></a><a href="../kernel/readme.html"><b>msg2qm</b></a> <br><a href="../kernel/readme.html"><b>msg2qm_root</b></a> <br><a name="bms_MU"></a><a name="subkey_MU"></a><a href="../kernel/readme.html"><b>much</b></a> <br><nobr>multi <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>multifile <a href="../kernel/setting_preferences.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/saving_a_study.htm"><b>multiple</b></a> <br><a href="../post-pro_preferences.htm"><b>multiplied</b></a> <br><a href="../post-pro_preferences.htm"><b>multiplies</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>multitier</b></a> <br><nobr>must <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> </nobr><br>\r
-<br><br>\r
-<nobr><a name="bm_N"></a><a name="subkey_N{"></a>n <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><nobr><a name="bms_NA"></a><a name="subkey_NA"></a>name <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> <a href="../kernel/creating_a_new_study.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> <a href="../kernel/using_registry.htm"><b>5</b></a> <a href="../kernel/using_object_browser.htm"><b>6</b></a> <a href="../kernel/using_catalog_generator.htm"><b>7</b></a> <a href="../kernel/saving_a_study.htm"><b>8</b></a> </nobr><br><nobr>named <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><nobr>names <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>native</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>natural</b></a> <br><a href="../kernel/editing_studies.htm"><b>nature</b></a> <br><nobr>navigate <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> </nobr><br><a href="../kernel/navigating_topics.htm"><b>navigating</b></a> <br><nobr>navigation <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/about_salome_pro_help_system.htm"><b>navigator</b></a> <br><nobr><a name="bms_NE"></a><a name="subkey_NE"></a>necessary <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> <a href="../mesh_preferences.htm"><b>4</b></a> <a href="../kernel/using_object_browser.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><nobr>need <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../select_color_and_font.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>needed</b></a> <br><a href="../post-pro_preferences.htm"><b>negative</b></a> <br><a href="../kernel/readme.html"><b>netgen</b></a> <br><a href="../kernel/readme.html"><b>netgenroot</b></a> <br><nobr>netscape <a href="../kernel/about_salome_pro_help_system.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>nevertheless</b></a> <br><nobr>new <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/getting_started2.htm"><b>3</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>4</b></a> <a href="../kernel/creating_a_new_study.htm"><b>5</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>6</b></a> <a href="../setting_preferences.htm"><b>7</b></a> <a href="../kernel/using_catalog_generator.htm"><b>8</b></a> <a href="../kernel/setting_preferences.htm"><b>9</b></a> <a href="../kernel/saving_a_study.htm"><b>10</b></a> </nobr><br><a href="../kernel/readme.html"><b>newer</b></a> <br><nobr>next <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../setting_preferences.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> </nobr><br><a name="bms_NF"></a><a name="subkey_NF"></a><a href="../kernel/readme.html"><b>nf</b></a> <br><nobr><a name="bms_NO"></a><a name="subkey_NO"></a>nodes <a href="../mesh_preferences.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><a href="../kernel/displaying_studies.htm"><b>normal</b></a> <br><a href="../kernel/readme.html"><b>notation</b></a> <br><nobr>note <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>notes</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>noticeably</b></a> <br><a href="../kernel/readme.html"><b>notifd</b></a> <br><a href="../setting_preferences.htm"><b>notification</b></a> <br><a href="../post-pro_preferences.htm"><b>notify</b></a> <br><a href="../kernel/getting_started2.htm"><b>notion</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>now</b></a> <br><a name="bms_NT"></a><a name="subkey_NT"></a><a href="../post-pro_preferences.htm"><b>nth</b></a> <br><nobr><a name="bms_NU"></a><a name="subkey_NU"></a>null <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><nobr>number <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> <a href="../setting_preferences.htm"><b>4</b></a> <a href="../post-pro_preferences.htm"><b>5</b></a> <a href="../mesh_preferences.htm"><b>6</b></a> <a href="../kernel/using_registry.htm"><b>7</b></a> <a href="../kernel/setting_preferences.htm"><b>8</b></a> </nobr><br><nobr>numbers <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><nobr>numeric <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../select_color_and_font.htm"><b>4</b></a> </nobr><br><nobr>numerical <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> </nobr><br><a href="../kernel/running_salome_pro.htm"><b>numerous</b></a> <br>\r
-<br><br>\r
-<nobr><a name="bm_O"></a><a name="subkey_OB"></a>object <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/editing_studies.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> <a href="../kernel/creating_a_new_study.htm"><b>4</b></a> <a href="../introduction_to_gui.htm"><b>5</b></a> <a href="../post-pro_preferences.htm"><b>6</b></a> <a href="../mesh_preferences.htm"><b>7</b></a> <a href="../kernel/using_object_browser.htm"><b>8</b></a> <a href="../kernel/setting_preferences.htm"><b>9</b></a> <a href="../kernel/saving_a_study.htm"><b>10</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>11</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>objectives</b></a> <br><nobr>objects <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> <a href="../setting_preferences.htm"><b>5</b></a> <a href="../post-pro_preferences.htm"><b>6</b></a> <a href="../kernel/using_object_browser.htm"><b>7</b></a> <a href="../kernel/saving_a_study.htm"><b>8</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>9</b></a> </nobr><br><a href="../kernel/readme.html"><b>obligatory</b></a> <br><nobr><a name="bms_OC"></a><a name="subkey_OC"></a>occ <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../kernel/creating_a_new_study.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a href="../kernel/readme.html"><b>occ_version_major</b></a> <br><a href="../kernel/readme.html"><b>occ_version_minor</b></a> <br><a href="../kernel/readme.html"><b>occupies</b></a> <br><a name="bms_OF"></a><a name="subkey_OF"></a><a href="../kernel/readme.html"><b>off</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>offered</b></a> <br><a href="../kernel/readme.html"><b>officially</b></a> <br><a href="../kernel/introduction.htm"><b>often</b></a> <br><nobr><a name="bms_OK"></a><a name="subkey_OK"></a>ok <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../setting_preferences.htm"><b>3</b></a> </nobr><br><a name="bms_OM"></a><a name="subkey_OM"></a><a href="../kernel/about_salome_pro_architecture.htm"><b>omg</b></a> <br><a href="../kernel/readme.html"><b>omit</b></a> <br><a href="../kernel/readme.html"><b>omni</b></a> <br><a href="../kernel/readme.html"><b>omninotify</b></a> <br><a href="../kernel/readme.html"><b>omniorb</b></a> <br><a href="../kernel/readme.html"><b>omniorbdir</b></a> <br><a href="../kernel/readme.html"><b>omniorbpy</b></a> <br><a name="bms_ON"></a><a name="subkey_ON"></a><a href="../post-pro_preferences.htm"><b>once</b></a> <br><nobr>one <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../kernel/navigating_topics.htm"><b>4</b></a> <a href="../kernel/editing_studies.htm"><b>5</b></a> <a href="../kernel/displaying_studies.htm"><b>6</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>7</b></a> <a href="../introduction_to_gui.htm"><b>8</b></a> <a href="../dump_study.htm"><b>9</b></a> <a href="../setting_preferences.htm"><b>10</b></a> <a href="../select_color_and_font.htm"><b>11</b></a> <a href="../post-pro_preferences.htm"><b>12</b></a> <a href="../kernel/using_catalog_generator.htm"><b>13</b></a> <a href="../kernel/setting_preferences.htm"><b>14</b></a> <a href="../kernel/saving_a_study.htm"><b>15</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>16</b></a> </nobr><br><a href="../kernel/readme.html"><b>ones</b></a> <br><a href="../kernel/using_left-hand_tabs.htm"><b>online</b></a> <br><a name="bms_OP"></a><a name="subkey_OP"></a><a href="../post-pro_preferences.htm"><b>opaque</b></a> <br><nobr>open <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../kernel/navigating_topics.htm"><b>4</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>5</b></a> <a href="../kernel/introduction.htm"><b>6</b></a> <a href="../kernel/getting_started2.htm"><b>7</b></a> <a href="../kernel/displaying_studies.htm"><b>8</b></a> <a href="../dump_study.htm"><b>9</b></a> <a href="../post-pro_preferences.htm"><b>10</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>11</b></a> <a href="../kernel/using_catalog_generator.htm"><b>12</b></a> <a href="../kernel/saving_a_study.htm"><b>13</b></a> </nobr><br><a href="../kernel/readme.html"><b>opencascade</b></a> <br><nobr>opening <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><nobr>opens <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><a href="../dump_study.htm"><b>operated</b></a> <br><nobr>operation <a href="../kernel/editing_studies.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> </nobr><br><nobr>operations <a href="../kernel/getting_started2.htm"><b>1</b></a> <a href="../kernel/editing_studies.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/introduction_to_salome_pro.htm"><b>optimization</b></a> <br><nobr>optimize <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>optimized</b></a> <br><nobr>option <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/editing_studies.htm"><b>4</b></a> <a href="../post-pro_preferences.htm"><b>5</b></a> <a href="../kernel/setting_preferences.htm"><b>6</b></a> <a href="../kernel/saving_a_study.htm"><b>7</b></a> </nobr><br><a href="../kernel/readme.html"><b>optional</b></a> <br><nobr>optionally <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><nobr>options <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/using_object_browser.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><a name="bms_OR"></a><a name="subkey_OR"></a><a href="../kernel/readme.html"><b>order</b></a> <br><nobr>ordinate <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>org</b></a> <br><nobr>orientation <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><nobr>origin <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><a href="../dump_study.htm"><b>original</b></a> <br><a href="../kernel/introduction_to_salome_pro.htm"><b>originality</b></a> <br><a name="bms_OS"></a><a name="subkey_OS"></a><a href="../kernel/readme.html"><b>os</b></a> <br><a href="../kernel/readme.html"><b>os_version</b></a> <br><nobr><a name="bms_OT"></a><a name="subkey_OT"></a>others <a href="../kernel/about_salome_pro_help_system.htm"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><nobr>otherwise <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><br><br></p><p class="ftsbody" align="center"><a href="whlstf7.htm" target="_self" title="previous search group"><b>>></b></a>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" align="center"><a href="whlstf6.htm" target="_self" title="previous search group"><b><<</b></a><br><br></p>\r
-<p class="ftsbody" >\r
-<nobr><a name="bms_OU"></a><a name="subkey_OU"></a>out <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../select_color_and_font.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><a href="../mesh_preferences.htm"><b>outline</b></a> <br><nobr>output <a href="../kernel/readme.html"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> </nobr><br><nobr>outside <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><a name="bms_OV"></a><a name="subkey_OV"></a><a href="../kernel/readme.html"><b>overrides</b></a> <br><nobr><a name="bms_OW"></a><a name="subkey_OW"></a>own <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../introduction_to_gui.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br>\r
-<br><br>\r
-<a name="bm_P"></a><a name="subkey_P{"></a><a href="../kernel/running_salome_pro.htm"><b>p</b></a> <br><nobr><a name="bms_PA"></a><a name="subkey_PA"></a>package <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>packages</b></a> <br><a href="../kernel/readme.html"><b>page</b></a> <br><nobr>pages <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><nobr>pane <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><a href="../kernel/saving_a_study.htm"><b>panning</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>parallel</b></a> <br><nobr>parameter <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><nobr>parameters <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../select_color_and_font.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/setting_preferences.htm"><b>6</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>parent</b></a> <br><nobr>part <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> </nobr><br><a href="../kernel/saving_a_study.htm"><b>particular</b></a> <br><a href="../kernel/introduction.htm"><b>particularly</b></a> <br><nobr>parts <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction_to_salome_pro.htm"><b>party</b></a> <br><a href="../kernel/readme.html"><b>pass</b></a> <br><nobr>paste <a href="../kernel/editing_studies.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><a href="../kernel/salome_pro_desktop.htm"><b>pasting</b></a> <br><a href="../kernel/readme.html"><b>patched</b></a> <br><a href="../post-pro_preferences.htm"><b>patent</b></a> <br><nobr>path <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a name="bms_PC"></a><a name="subkey_PC"></a><a href="../kernel/about_salome_pro_architecture.htm"><b>pc</b></a> <br><a name="bms_PE"></a><a name="subkey_PE"></a><a href="../post-pro_preferences.htm"><b>per</b></a> <br><nobr>perform <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><nobr>performance <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> </nobr><br><nobr>performed <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/introduction_to_salome_pro.htm"><b>performs</b></a> <br><a href="../kernel/readme.html"><b>permission</b></a> <br><a name="bms_PH"></a><a name="subkey_PH"></a><a href="../kernel/about_salome_pro_architecture.htm"><b>phenomena</b></a> <br><a href="../kernel/using_left-hand_tabs.htm"><b>phrases</b></a> <br><nobr>physical <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>physics</b></a> <br><a name="bms_PI"></a><a name="subkey_PI"></a><a href="../kernel/readme.html"><b>pick</b></a> <br><a href="../post-pro_preferences.htm"><b>picking</b></a> <br><a href="../kernel/readme.html"><b>picks</b></a> <br><a href="../kernel/readme.html"><b>pickup</b></a> <br><a href="../kernel/readme.html"><b>pickup_env</b></a> <br><a href="../kernel/readme.html"><b>pickup_env_flag</b></a> <br><a href="../kernel/readme.html"><b>pickupenv</b></a> <br><a href="../kernel/getting_properties_of_the_study.htm"><b>picture</b></a> <br><a href="../kernel/using_registry.htm"><b>pid</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>piece</b></a> <br><a href="../post-pro_preferences.htm"><b>pixels</b></a> <br><nobr><a name="bms_PL"></a><a name="subkey_PL"></a>place <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>3</b></a> </nobr><br><nobr>placed <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>3</b></a> </nobr><br><nobr>placement <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><nobr>platform <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> <a href="../kernel/introduction.htm"><b>4</b></a> <a href="../kernel/getting_started2.htm"><b>5</b></a> <a href="../kernel/displaying_studies.htm"><b>6</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>7</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>8</b></a> <a href="../introduction_to_gui.htm"><b>9</b></a> <a href="../dump_study.htm"><b>10</b></a> <a href="../kernel/using_registry.htm"><b>11</b></a> <a href="../kernel/using_catalog_generator.htm"><b>12</b></a> <a href="../kernel/saving_a_study.htm"><b>13</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>14</b></a> </nobr><br><a href="../kernel/readme.html"><b>platforms</b></a> <br><a href="../dump_study.htm"><b>played</b></a> <br><a href="../kernel/readme.html"><b>please</b></a> <br><nobr>plot <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> </nobr><br><nobr>plot2d <a href="../kernel/creating_a_new_study.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../introduction_to_gui.htm"><b>plug</b></a> <br><a name="bms_PO"></a><a name="subkey_PO"></a><a href="../kernel/readme.html"><b>po</b></a> <br><nobr>point <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><nobr>points <a href="../kernel/readme.html"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><nobr>pop <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/using_object_browser.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><a href="../kernel/navigating_topics.htm"><b>popup</b></a> <br><a href="../kernel/navigating_topics.htm"><b>popups</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>port</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>portkill</b></a> <br><nobr>position <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><nobr>positions <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><a href="../kernel/salome_pro_desktop.htm"><b>positively</b></a> <br><nobr>possibility <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> <a href="../select_color_and_font.htm"><b>5</b></a> <a href="../kernel/using_catalog_generator.htm"><b>6</b></a> </nobr><br><nobr>possible <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> <a href="../select_color_and_font.htm"><b>4</b></a> <a href="../kernel/using_object_browser.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><nobr>post <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><a href="../introduction_to_gui.htm"><b>powerful</b></a> <br><nobr><a name="bms_PR"></a><a name="subkey_PR"></a>pre <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><a href="../mesh_preferences.htm"><b>precision</b></a> <br><a href="../kernel/readme.html"><b>precompiled</b></a> <br><nobr>predefined <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../select_color_and_font.htm"><b>3</b></a> </nobr><br><a href="../kernel/running_salome_pro.htm"><b>preferable</b></a> <br><nobr>preferences <a href="../geom_preferences.htm"><b>1</b></a> <a href="../setting_preferences.htm"><b>2</b></a> <a href="../select_color_and_font.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../mesh_preferences.htm"><b>5</b></a> <a href="../kernel/using_object_browser.htm"><b>6</b></a> <a href="../kernel/setting_preferences.htm"><b>7</b></a> </nobr><br><a href="../kernel/readme.html"><b>prefix</b></a> <br><a href="../kernel/readme.html"><b>preinstalled</b></a> <br><a href="../kernel/readme.html"><b>preliminary</b></a> <br><a href="../kernel/readme.html"><b>prerequisite</b></a> <br><a href="../kernel/readme.html"><b>prerequisites</b></a> <br><a href="../mesh_preferences.htm"><b>preselected</b></a> <br><a href="../mesh_preferences.htm"><b>preselection</b></a> <br><a href="../post-pro_preferences.htm"><b>present</b></a> <br><nobr>presentation <a href="../kernel/creating_a_new_study.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><nobr>presentations <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>3</b></a> </nobr><br><a href="../mesh_preferences.htm"><b>presented</b></a> <br><nobr>press <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>pressed</b></a> <br><nobr>pressing <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>prevents</b></a> <br><a href="../select_color_and_font.htm"><b>preview</b></a> <br><nobr>previous <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> </nobr><br><nobr>previously <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>primitive</b></a> <br><a href="../post-pro_preferences.htm"><b>primitives</b></a> <br><nobr>print <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>print_env</b></a> <br><a href="../kernel/readme.html"><b>printed</b></a> <br><a href="../kernel/readme.html"><b>prints</b></a> <br><a href="../kernel/introduction.htm"><b>priority</b></a> <br><nobr>pro <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>5</b></a> </nobr><br><a href="../kernel/creating_a_new_study.htm"><b>probably</b></a> <br><nobr>problem <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>problems</b></a> <br><nobr>procedure <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> </nobr><br><nobr>proceed <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> </nobr><br><nobr>process <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> <a href="../kernel/using_registry.htm"><b>5</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>processed</b></a> <br><a href="../kernel/using_registry.htm"><b>processes</b></a> <br><nobr>processing <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> </nobr><br><nobr>processors <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>produces</b></a> <br><a href="../kernel/readme.html"><b>product</b></a> <br><a href="../kernel/readme.html"><b>product_context</b></a> <br><a href="../kernel/readme.html"><b>product_description</b></a> <br><a href="../kernel/readme.html"><b>product_name</b></a> <br><a href="../kernel/readme.html"><b>product_script_name</b></a> <br><a href="../kernel/readme.html"><b>product_version</b></a> <br><nobr>productivity <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><nobr>products <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>products_directory</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>profile</b></a> <br><a href="../kernel/readme.html"><b>program</b></a> <br><a href="../kernel/introduction.htm"><b>programmatic</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>programming</b></a> <br><nobr>progress <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>progressive</b></a> <br><a href="../kernel/readme.html"><b>prompted</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>prompting</b></a> <br><a href="../dump_study.htm"><b>prone</b></a> <br><a href="../kernel/readme.html"><b>proper</b></a> <br><a href="../kernel/readme.html"><b>properly</b></a> <br><nobr>properties <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> </nobr><br><a href="../kernel/readme.html"><b>proposed</b></a> <br><a href="../introduction_to_gui.htm"><b>proposes</b></a> <br><nobr>provide <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/editing_studies.htm"><b>2</b></a> </nobr><br><nobr>provided <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> </nobr><br><nobr>provides <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../introduction_to_gui.htm"><b>5</b></a> <a href="../select_color_and_font.htm"><b>6</b></a> <a href="../post-pro_preferences.htm"><b>7</b></a> <a href="../kernel/using_catalog_generator.htm"><b>8</b></a> </nobr><br><nobr>providing <a href="../kernel/using_registry.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><br><br></p><p class="ftsbody" align="center"><a href="whlstf8.htm" target="_self" title="previous search group"><b>>></b></a>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" align="center"><a href="whlstf7.htm" target="_self" title="previous search group"><b><<</b></a><br><br></p>\r
-<p class="ftsbody" >\r
-<a name="bms_PU"></a><a name="subkey_PU"></a><a href="../dump_study.htm"><b>publish</b></a> <br><nobr>published <a href="../dump_study.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>pure</b></a> <br><a href="../kernel/getting_started2.htm"><b>purpose</b></a> <br><a href="../kernel/using_object_browser.htm"><b>purposes</b></a> <br><a name="bms_PY"></a><a name="subkey_PY"></a><a href="../kernel/running_salome_pro.htm"><b>py</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>pycontainer</b></a> <br><a href="../kernel/readme.html"><b>pyqt</b></a> <br><a href="../kernel/readme.html"><b>pyqtdir</b></a> <br><a href="../post-pro_preferences.htm"><b>pyramids</b></a> <br><nobr>python <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/displaying_studies.htm"><b>4</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>5</b></a> <a href="../introduction_to_gui.htm"><b>6</b></a> <a href="../dump_study.htm"><b>7</b></a> <a href="../kernel/setting_preferences.htm"><b>8</b></a> <a href="../kernel/saving_a_study.htm"><b>9</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>10</b></a> </nobr><br><a href="../kernel/readme.html"><b>pythonhome</b></a> <br>\r
-<br><br>\r
-<a name="bm_Q"></a><a name="subkey_QG"></a><a href="../kernel/readme.html"><b>qglobal</b></a> <br><a name="bms_QM"></a><a name="subkey_QM"></a><a href="../kernel/readme.html"><b>qm</b></a> <br><a name="bms_QT"></a><a name="subkey_QT"></a><a href="../kernel/readme.html"><b>qt</b></a> <br><a href="../kernel/readme.html"><b>qt_version_str</b></a> <br><a href="../kernel/readme.html"><b>qtdir</b></a> <br><nobr><a name="bms_QU"></a><a name="subkey_QU"></a>quality <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>quantities</b></a> <br><a href="../kernel/readme.html"><b>question</b></a> <br><nobr>quick <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_object_browser.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> </nobr><br><nobr>quickly <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>quit <a href="../setting_preferences.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> </nobr><br><a href="../dump_study.htm"><b>quite</b></a> <br><a href="../kernel/readme.html"><b>quits</b></a> <br><a href="../kernel/readme.html"><b>quoted</b></a> <br><a name="bms_QW"></a><a name="subkey_QW"></a><a href="../kernel/readme.html"><b>qwt</b></a> <br><a href="../kernel/readme.html"><b>qwthome</b></a> <br>\r
-<br><br>\r
-<a name="bm_R"></a><a name="subkey_R{"></a><a href="../kernel/running_salome_pro.htm"><b>r</b></a> <br><a name="bms_RA"></a><a name="subkey_RA"></a><a href="../kernel/readme.html"><b>radio</b></a> <br><a href="../post-pro_preferences.htm"><b>rainbow</b></a> <br><nobr>range <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>ranges</b></a> <br><a href="../post-pro_preferences.htm"><b>ranging</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>rapidly</b></a> <br><a href="../post-pro_preferences.htm"><b>rate</b></a> <br><a href="../dump_study.htm"><b>rather</b></a> <br><a href="../post-pro_preferences.htm"><b>ratio</b></a> <br><nobr><a name="bms_RE"></a><a name="subkey_RE"></a>re <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>reactivity</b></a> <br><nobr>read <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/navigating_topics.htm"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> </nobr><br><a href="../kernel/navigating_topics.htm"><b>reading</b></a> <br><a href="../kernel/readme.html"><b>readme</b></a> <br><a href="../post-pro_preferences.htm"><b>real</b></a> <br><a href="../kernel/getting_started2.htm"><b>realize</b></a> <br><a href="../post-pro_preferences.htm"><b>reassign</b></a> <br><a href="../setting_preferences.htm"><b>receives</b></a> <br><nobr>recommended <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><nobr>record <a href="../kernel/getting_properties_of_the_study.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>recorded</b></a> <br><a href="../post-pro_preferences.htm"><b>recorder</b></a> <br><a href="../post-pro_preferences.htm"><b>recording</b></a> <br><a href="../post-pro_preferences.htm"><b>records</b></a> <br><a href="../kernel/using_object_browser.htm"><b>red</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>redirects</b></a> <br><a href="../kernel/introduction.htm"><b>reduce</b></a> <br><a href="../kernel/introduction.htm"><b>reduces</b></a> <br><nobr>refer <a href="../setting_preferences.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>reference <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/using_object_browser.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> </nobr><br><a href="../kernel/using_object_browser.htm"><b>references</b></a> <br><a href="../kernel/readme.html"><b>refers</b></a> <br><a href="../kernel/introduction.htm"><b>refined</b></a> <br><a href="../post-pro_preferences.htm"><b>refining</b></a> <br><a href="../kernel/using_registry.htm"><b>refresh</b></a> <br><a href="../kernel/using_registry.htm"><b>refreshment</b></a> <br><a href="../post-pro_preferences.htm"><b>regimes</b></a> <br><nobr>registry <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../kernel/using_registry.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>reinstall</b></a> <br><a href="../kernel/readme.html"><b>reinstallation</b></a> <br><a href="../kernel/readme.html"><b>reinstalling</b></a> <br><nobr>related <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><nobr>relative <a href="../kernel/readme.html"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>release</b></a> <br><a href="../kernel/navigating_topics.htm"><b>relevant</b></a> <br><a href="../kernel/introduction.htm"><b>reliability</b></a> <br><a href="../kernel/saving_a_study.htm"><b>reload</b></a> <br><a href="../kernel/salome_pro_desktop.htm"><b>relocate</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>remains</b></a> <br><a href="../kernel/creating_a_new_study.htm"><b>remote</b></a> <br><a href="../kernel/setting_preferences.htm"><b>remove</b></a> <br><a href="../kernel/readme.html"><b>removed</b></a> <br><a href="../kernel/readme.html"><b>removing</b></a> <br><a href="../kernel/saving_a_study.htm"><b>renamed</b></a> <br><a href="../post-pro_preferences.htm"><b>rendering</b></a> <br><a href="../kernel/setting_preferences.htm"><b>reopened</b></a> <br><a href="../post-pro_preferences.htm"><b>repeated</b></a> <br><nobr>represent <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><nobr>representation <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>representative</b></a> <br><nobr>represents <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/getting_started2.htm"><b>3</b></a> </nobr><br><nobr>required <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> </nobr><br><nobr>requirements <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> </nobr><br><nobr>requires <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>reset</b></a> <br><a href="../kernel/setting_preferences.htm"><b>resizing</b></a> <br><a href="../post-pro_preferences.htm"><b>resolution</b></a> <br><a href="../dump_study.htm"><b>resolved</b></a> <br><a href="../kernel/readme.html"><b>resource</b></a> <br><nobr>resources <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><nobr>respective <a href="../setting_preferences.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>respectively</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>responds</b></a> <br><a href="../kernel/readme.html"><b>responsible</b></a> <br><a href="../kernel/setting_preferences.htm"><b>rest</b></a> <br><nobr>restore <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../setting_preferences.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><nobr>restored <a href="../setting_preferences.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>result</b></a> <br><a href="../kernel/getting_started2.htm"><b>resulting</b></a> <br><nobr>results <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../setting_preferences.htm"><b>retroactive</b></a> <br><a href="../kernel/introduction.htm"><b>reusable</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>reuse</b></a> <br><nobr>reversibly <a href="../dump_study.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><nobr><a name="bms_RI"></a><a name="subkey_RI"></a>right <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/navigating_topics.htm"><b>3</b></a> <a href="../kernel/displaying_studies.htm"><b>4</b></a> <a href="../select_color_and_font.htm"><b>5</b></a> <a href="../post-pro_preferences.htm"><b>6</b></a> <a href="../kernel/using_object_browser.htm"><b>7</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>8</b></a> <a href="../kernel/setting_preferences.htm"><b>9</b></a> <a href="../kernel/saving_a_study.htm"><b>10</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>11</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>risks</b></a> <br><a name="bms_RO"></a><a name="subkey_RO"></a><a href="../kernel/introduction.htm"><b>robustness</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>roles</b></a> <br><a href="../kernel/readme.html"><b>root</b></a> <br><a href="../post-pro_preferences.htm"><b>rotate</b></a> <br><a href="../post-pro_preferences.htm"><b>rotation</b></a> <br><a name="bms_RU"></a><a name="subkey_RU"></a><a href="../kernel/readme.html"><b>rules</b></a> <br><nobr>run <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> </nobr><br><a href="../select_color_and_font.htm"><b>runic</b></a> <br><a href="../kernel/readme.html"><b>runinstall</b></a> <br><nobr>running <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/using_registry.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>runs</b></a> <br><nobr>runsalome <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><a href="../kernel/using_catalog_generator.htm"><b>runsalomewithport</b></a> <br>\r
-<br><br>\r
-<nobr><a name="bm_S"></a><a name="subkey_S{"></a>s <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/navigating_topics.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> </nobr><br><a name="bms_SA"></a><a name="subkey_SA"></a><a href="../introduction_to_gui.htm"><b>safe</b></a> <br><nobr>salome <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../kernel/navigating_topics.htm"><b>4</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>5</b></a> <a href="../kernel/introduction.htm"><b>6</b></a> <a href="../kernel/getting_started2.htm"><b>7</b></a> <a href="../kernel/editing_studies.htm"><b>8</b></a> <a href="../kernel/displaying_studies.htm"><b>9</b></a> <a href="../kernel/creating_a_new_study.htm"><b>10</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>11</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>12</b></a> <a href="../introduction_to_gui.htm"><b>13</b></a> <a href="../dump_study.htm"><b>14</b></a> <a href="../setting_preferences.htm"><b>15</b></a> <a href="../post-pro_preferences.htm"><b>16</b></a> <a href="../kernel/using_registry.htm"><b>17</b></a> <a href="../kernel/using_object_browser.htm"><b>18</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>19</b></a> <a href="../kernel/using_catalog_generator.htm"><b>20</b></a> <a href="../kernel/setting_preferences.htm"><b>21</b></a> <a href="../kernel/saving_a_study.htm"><b>22</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>23</b></a> </nobr><br><a href="../kernel/readme.html"><b>salome_</b></a> <br><a href="../kernel/using_catalog_generator.htm"><b>salome_modulecatalog_server</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>salomeapp</b></a> <br><a href="../setting_preferences.htm"><b>salomeapprc</b></a> <br><a href="../dump_study.htm"><b>salomeds</b></a> <br><nobr>same <a href="../kernel/navigating_topics.htm"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/using_registry.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><a href="../select_color_and_font.htm"><b>sample</b></a> <br><nobr>save <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> </nobr><br><nobr>saved <a href="../dump_study.htm"><b>1</b></a> <a href="../setting_preferences.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><nobr>saves <a href="../kernel/saving_a_study.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><nobr>saving <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><nobr><a name="bms_SC"></a><a name="subkey_SC"></a>scalar <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><nobr>scale <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>scaling</b></a> <br><a href="../kernel/introduction.htm"><b>schemas</b></a> <br><a href="../kernel/readme.html"><b>scheme</b></a> <br><nobr>schemes <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>scientific</b></a> <br><nobr>screen <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> </nobr><br><nobr>script <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> <a href="../select_color_and_font.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> </nobr><br><a href="../dump_study.htm"><b>scripting</b></a> <br><nobr>scripts <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> <a href="../dump_study.htm"><b>3</b></a> <a href="../kernel/using_catalog_generator.htm"><b>4</b></a> </nobr><br><a href="../kernel/getting_properties_of_the_study.htm"><b>scroll</b></a> <br><br><br></p><p class="ftsbody" align="center"><a href="whlstf9.htm" target="_self" title="previous search group"><b>>></b></a>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words List</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsbody" align="center"><a href="whlstf8.htm" target="_self" title="previous search group"><b><<</b></a><br><br></p>\r
-<p class="ftsbody" >\r
-<nobr><a name="bms_SE"></a><a name="subkey_SE"></a>search <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>3</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> </nobr><br><a href="../kernel/using_left-hand_tabs.htm"><b>searching</b></a> <br><nobr>second <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>seconds</b></a> <br><nobr>section <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> </nobr><br><nobr>sections <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>sectionthis</b></a> <br><a href="../kernel/readme.html"><b>sed</b></a> <br><nobr>see <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/displaying_studies.htm"><b>4</b></a> <a href="../kernel/using_object_browser.htm"><b>5</b></a> <a href="../kernel/using_catalog_generator.htm"><b>6</b></a> <a href="../kernel/setting_preferences.htm"><b>7</b></a> <a href="../kernel/saving_a_study.htm"><b>8</b></a> </nobr><br><a href="../mesh_preferences.htm"><b>seen</b></a> <br><nobr>select <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>3</b></a> <a href="../kernel/displaying_studies.htm"><b>4</b></a> <a href="../kernel/creating_a_new_study.htm"><b>5</b></a> <a href="../geom_preferences.htm"><b>6</b></a> <a href="../dump_study.htm"><b>7</b></a> <a href="../select_color_and_font.htm"><b>8</b></a> <a href="../post-pro_preferences.htm"><b>9</b></a> <a href="../mesh_preferences.htm"><b>10</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>11</b></a> <a href="../kernel/setting_preferences.htm"><b>12</b></a> <a href="../kernel/saving_a_study.htm"><b>13</b></a> </nobr><br><a href="../kernel/salome_pro_desktop.htm"><b>selectall</b></a> <br><nobr>selected <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> </nobr><br><nobr>selecting <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> </nobr><br><nobr>selection <a href="../introduction_to_gui.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><a href="../kernel/readme.html"><b>sends</b></a> <br><nobr>sensitive <a href="../kernel/using_object_browser.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><nobr>separate <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>2</b></a> </nobr><br><nobr>separated <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../kernel/about_salome_pro_architecture.htm"><b>server</b></a> <br><nobr>servers <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>2</b></a> </nobr><br><a href="../kernel/using_catalog_generator.htm"><b>serves</b></a> <br><a href="../kernel/readme.html"><b>service</b></a> <br><nobr>services <a href="../kernel/about_salome_pro_architecture.htm"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> </nobr><br><nobr>session <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../setting_preferences.htm"><b>3</b></a> <a href="../post-pro_preferences.htm"><b>4</b></a> <a href="../kernel/using_registry.htm"><b>5</b></a> <a href="../kernel/using_object_browser.htm"><b>6</b></a> <a href="../kernel/setting_preferences.htm"><b>7</b></a> <a href="../kernel/saving_a_study.htm"><b>8</b></a> </nobr><br><nobr>sessions <a href="../geom_preferences.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><nobr>set <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/about_salome_pro_help_system.htm"><b>3</b></a> <a href="../geom_preferences.htm"><b>4</b></a> <a href="../dump_study.htm"><b>5</b></a> <a href="../setting_preferences.htm"><b>6</b></a> <a href="../post-pro_preferences.htm"><b>7</b></a> <a href="../mesh_preferences.htm"><b>8</b></a> <a href="../kernel/using_registry.htm"><b>9</b></a> <a href="../kernel/setting_preferences.htm"><b>10</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>11</b></a> </nobr><br><nobr>sets <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><nobr>setting <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> <a href="../setting_preferences.htm"><b>3</b></a> <a href="../kernel/using_object_browser.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> </nobr><br><nobr>settings <a href="../kernel/readme.html"><b>1</b></a> <a href="../setting_preferences.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>severe</b></a> <br><a name="bms_SH"></a><a name="subkey_SH"></a><a href="../kernel/readme.html"><b>sh</b></a> <br><nobr>shading <a href="../geom_preferences.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>shape</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>share</b></a> <br><nobr>shell <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> </nobr><br><nobr>short <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>2</b></a> </nobr><br><a href="../kernel/displaying_studies.htm"><b>shot</b></a> <br><nobr>should <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/using_catalog_generator.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><nobr>shown <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>shows</b></a> <br><a href="../mesh_preferences.htm"><b>shrink</b></a> <br><nobr><a name="bms_SI"></a><a name="subkey_SI"></a>side <a href="../post-pro_preferences.htm"><b>1</b></a> <a href="../mesh_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>signal</b></a> <br><a href="../introduction_to_gui.htm"><b>signals</b></a> <br><a href="../kernel/readme.html"><b>signature</b></a> <br><a href="../kernel/readme.html"><b>sigterm</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>simple</b></a> <br><a href="../kernel/readme.html"><b>simplify</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>simulate</b></a> <br><a href="../kernel/introduction.htm"><b>simulation</b></a> <br><nobr>simulations <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><nobr>simultaneously <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/displaying_studies.htm"><b>3</b></a> </nobr><br><a href="../introduction_to_gui.htm"><b>since</b></a> <br><a href="../kernel/readme.html"><b>single</b></a> <br><a href="../kernel/readme.html"><b>sip</b></a> <br><a href="../kernel/readme.html"><b>sipdir</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>situations</b></a> <br><nobr>size <a href="../kernel/displaying_studies.htm"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> <a href="../kernel/setting_preferences.htm"><b>4</b></a> <a href="../kernel/saving_a_study.htm"><b>5</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>6</b></a> </nobr><br><nobr>sizes <a href="../select_color_and_font.htm"><b>1</b></a> <a href="../kernel/saving_a_study.htm"><b>2</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>3</b></a> </nobr><br><a name="bms_SK"></a><a name="subkey_SK"></a><a href="../kernel/readme.html"><b>skip</b></a> <br><a href="../kernel/readme.html"><b>skipped</b></a> <br><a name="bms_SL"></a><a name="subkey_SL"></a><a href="../kernel/readme.html"><b>slightly</b></a> <br><a href="../post-pro_preferences.htm"><b>slow</b></a> <br><a name="bms_SM"></a><a name="subkey_SM"></a><a href="../post-pro_preferences.htm"><b>smallest</b></a> <br><a href="../kernel/setting_preferences.htm"><b>smooth</b></a> <br><a href="../post-pro_preferences.htm"><b>smoothness</b></a> <br><nobr><a name="bms_SO"></a><a name="subkey_SO"></a>so <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/editing_studies.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../post-pro_preferences.htm"><b>5</b></a> <a href="../kernel/using_object_browser.htm"><b>6</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>7</b></a> </nobr><br><nobr>software <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>solution</b></a> <br><a href="../kernel/introduction.htm"><b>solutions</b></a> <br><a href="../kernel/introduction.htm"><b>solver</b></a> <br><nobr>solvers <a href="../kernel/introduction_to_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>something</b></a> <br><a href="../kernel/setting_preferences.htm"><b>sort</b></a> <br><a href="../kernel/readme.html"><b>sort_path</b></a> <br><nobr>source <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/introduction_to_salome_pro.htm"><b>3</b></a> <a href="../kernel/introduction.htm"><b>4</b></a> </nobr><br><a href="../kernel/readme.html"><b>sources</b></a> <br><nobr><a name="bms_SP"></a><a name="subkey_SP"></a>space <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> <a href="../mesh_preferences.htm"><b>3</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>spacemouse</b></a> <br><a href="../kernel/readme.html"><b>spaces</b></a> <br><a href="../post-pro_preferences.htm"><b>spacing</b></a> <br><nobr>special <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/readme.html"><b>2</b></a> <a href="../kernel/opening_studies.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>specially</b></a> <br><nobr>specific <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> <a href="../setting_preferences.htm"><b>5</b></a> <a href="../kernel/using_left-hand_tabs.htm"><b>6</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>7</b></a> </nobr><br><a href="../kernel/introduction_to_salome_pro.htm"><b>specification</b></a> <br><a href="../post-pro_preferences.htm"><b>specified</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>specifies</b></a> <br><nobr>specify <a href="../kernel/using_catalog_generator.htm"><b>1</b></a> <a href="../kernel/setting_preferences.htm"><b>2</b></a> <a href="../kernel/saving_a_study.htm"><b>3</b></a> </nobr><br><a href="../post-pro_preferences.htm"><b>speed</b></a> <br><a href="../post-pro_preferences.htm"><b>sphere</b></a> <br><a href="../post-pro_preferences.htm"><b>spheres</b></a> <br><a href="../geom_preferences.htm"><b>spin</b></a> <br><a href="../kernel/running_salome_pro.htm"><b>splash</b></a> <br><a href="../kernel/setting_preferences.htm"><b>splines</b></a> <br><a href="../kernel/displaying_studies.htm"><b>split</b></a> <br><a href="../post-pro_preferences.htm"><b>sprite</b></a> <br><a href="../post-pro_preferences.htm"><b>sprites</b></a> <br><a name="bms_ST"></a><a name="subkey_ST"></a><a href="../post-pro_preferences.htm"><b>stamps</b></a> <br><nobr>standalone <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../introduction_to_gui.htm"><b>2</b></a> </nobr><br><nobr>standard <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/creating_a_new_study.htm"><b>3</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>4</b></a> <a href="../introduction_to_gui.htm"><b>5</b></a> <a href="../setting_preferences.htm"><b>6</b></a> <a href="../post-pro_preferences.htm"><b>7</b></a> <a href="../kernel/using_catalog_generator.htm"><b>8</b></a> <a href="../kernel/saving_a_study.htm"><b>9</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>10</b></a> </nobr><br><a href="../kernel/readme.html"><b>standard_version</b></a> <br><nobr>start <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> </nobr><br><nobr>started <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/getting_started2.htm"><b>2</b></a> <a href="../kernel/using_registry.htm"><b>3</b></a> <a href="../kernel/using_catalog_generator.htm"><b>4</b></a> <a href="../kernel/setting_preferences.htm"><b>5</b></a> </nobr><br><nobr>starting <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/displaying_studies.htm"><b>2</b></a> <a href="../kernel/using_registry.htm"><b>3</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>4</b></a> </nobr><br><a href="../setting_preferences.htm"><b>starts</b></a> <br><nobr>state <a href="../kernel/readme.html"><b>1</b></a> <a href="../dump_study.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><a href="../kernel/saving_a_study.htm"><b>states</b></a> <br><a href="../kernel/about_salome_pro_architecture.htm"><b>stations</b></a> <br><a href="../kernel/readme.html"><b>status</b></a> <br><nobr>step <a href="../kernel/introduction.htm"><b>1</b></a> <a href="../geom_preferences.htm"><b>2</b></a> <a href="../post-pro_preferences.htm"><b>3</b></a> </nobr><br><nobr>steps <a href="../kernel/readme.html"><b>1</b></a> <a href="../post-pro_preferences.htm"><b>2</b></a> </nobr><br><a href="../kernel/readme.html"><b>still</b></a> <br><nobr>store <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/using_catalog_generator.htm"><b>2</b></a> <a href="../kernel/setting_preferences.htm"><b>3</b></a> <a href="../kernel/saving_a_study.htm"><b>4</b></a> </nobr><br><nobr>stored <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../dump_study.htm"><b>4</b></a> <a href="../kernel/using_catalog_generator.htm"><b>5</b></a> <a href="../kernel/saving_a_study.htm"><b>6</b></a> </nobr><br><a href="../kernel/saving_a_study.htm"><b>storing</b></a> <br><a href="../kernel/readme.html"><b>strict</b></a> <br><a href="../kernel/readme.html"><b>string</b></a> <br><a href="../kernel/readme.html"><b>strongly</b></a> <br><a href="../select_color_and_font.htm"><b>struck</b></a> <br><a href="../kernel/introduction.htm"><b>structural</b></a> <br><nobr>structure <a href="../kernel/readme.html"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>3</b></a> <a href="../introduction_to_gui.htm"><b>4</b></a> <a href="../kernel/using_object_browser.htm"><b>5</b></a> </nobr><br><a href="../kernel/introduction.htm"><b>structures</b></a> <br><nobr>studies <a href="../kernel/opening_studies.htm"><b>1</b></a> <a href="../kernel/introduction.htm"><b>2</b></a> <a href="../kernel/getting_started2.htm"><b>3</b></a> <a href="../kernel/editing_studies.htm"><b>4</b></a> <a href="../kernel/displaying_studies.htm"><b>5</b></a> <a href="../kernel/creating_a_new_study.htm"><b>6</b></a> <a href="../introduction_to_gui.htm"><b>7</b></a> <a href="../kernel/saving_a_study.htm"><b>8</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>9</b></a> </nobr><br><nobr>study <a href="../kernel/running_salome_pro.htm"><b>1</b></a> <a href="../kernel/opening_studies.htm"><b>2</b></a> <a href="../kernel/introduction.htm"><b>3</b></a> <a href="../kernel/getting_started2.htm"><b>4</b></a> <a href="../kernel/getting_properties_of_the_study.htm"><b>5</b></a> <a href="../kernel/editing_studies.htm"><b>6</b></a> <a href="../kernel/displaying_studies.htm"><b>7</b></a> <a href="../kernel/creating_a_new_study.htm"><b>8</b></a> <a href="../kernel/about_salome_pro_architecture.htm"><b>9</b></a> <a href="../introduction_to_gui.htm"><b>10</b></a> <a href="../dump_study.htm"><b>11</b></a> <a href="../setting_preferences.htm"><b>12</b></a> <a href="../post-pro_preferences.htm"><b>13</b></a> <a href="../kernel/using_registry.htm"><b>14</b></a> <a href="../kernel/using_object_browser.htm"><b>15</b></a> <a href="../kernel/using_catalog_generator.htm"><b>16</b></a> <a href="../kernel/setting_preferences.htm"><b>17</b></a> <a href="../kernel/saving_a_study.htm"><b>18</b></a> <a href="../kernel/salome_pro_desktop.htm"><b>19</b></a> </nobr><br><a href="../kernel/creating_a_new_study.htm"><b>study1</b></a> <br><a href="../kernel/setting_preferences.htm"><b>style</b></a> <br><a href="../select_color_and_font.htm"><b>styles</b></a> <br><br><br></p><p class="ftsbody" align="center"><a href="whlstf10.htm" target="_self" title="previous search group"><b>>></b></a>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_{"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf0.htm#bm_{" target="ftslist" title="search letter { "><b>{ </b></a> <a href="whlstf0.htm#bms_{O" target="ftslist" title="search letter {O"><b>{O</b></a> <a href="whlstf0.htm#bms_{{" target="ftslist" title="search letter { "><b>{ </b></a> <a href="whlstf0.htm#bms_{D" target="ftslist" title="search letter {D"><b>{D</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_A"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf0.htm#bm_A" target="ftslist" title="search letter AB"><b>AB</b></a> <a href="whlstf0.htm#bms_AC" target="ftslist" title="search letter AC"><b>AC</b></a> <a href="whlstf0.htm#bms_AD" target="ftslist" title="search letter AD"><b>AD</b></a> <a href="whlstf0.htm#bms_AF" target="ftslist" title="search letter AF"><b>AF</b></a> <a href="whlstf0.htm#bms_AG" target="ftslist" title="search letter AG"><b>AG</b></a> <a href="whlstf0.htm#bms_AL" target="ftslist" title="search letter AL"><b>AL</b></a> <a href="whlstf0.htm#bms_AM" target="ftslist" title="search letter AM"><b>AM</b></a> <a href="whlstf0.htm#bms_AN" target="ftslist" title="search letter AN"><b>AN</b></a> <a href="whlstf0.htm#bms_AP" target="ftslist" title="search letter AP"><b>AP</b></a> <a href="whlstf0.htm#bms_AR" target="ftslist" title="search letter AR"><b>AR</b></a> <a href="whlstf0.htm#bms_AS" target="ftslist" title="search letter AS"><b>AS</b></a> <a href="whlstf0.htm#bms_AT" target="ftslist" title="search letter AT"><b>AT</b></a> <a href="whlstf0.htm#bms_AU" target="ftslist" title="search letter AU"><b>AU</b></a> <a href="whlstf0.htm#bms_AV" target="ftslist" title="search letter AV"><b>AV</b></a> <a href="whlstf0.htm#bms_AW" target="ftslist" title="search letter AW"><b>AW</b></a> <a href="whlstf0.htm#bms_AX" target="ftslist" title="search letter AX"><b>AX</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_J"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf5.htm#bm_J" target="ftslist" title="search letter JA"><b>JA</b></a> <a href="whlstf5.htm#bms_JU" target="ftslist" title="search letter JU"><b>JU</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_K"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf5.htm#bm_K" target="ftslist" title="search letter K "><b>K </b></a> <a href="whlstf5.htm#bms_KB" target="ftslist" title="search letter KB"><b>KB</b></a> <a href="whlstf5.htm#bms_KE" target="ftslist" title="search letter KE"><b>KE</b></a> <a href="whlstf5.htm#bms_KI" target="ftslist" title="search letter KI"><b>KI</b></a> <a href="whlstf5.htm#bms_KN" target="ftslist" title="search letter KN"><b>KN</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_L"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf5.htm#bm_L" target="ftslist" title="search letter L "><b>L </b></a> <a href="whlstf5.htm#bms_LA" target="ftslist" title="search letter LA"><b>LA</b></a> <a href="whlstf5.htm#bms_LD" target="ftslist" title="search letter LD"><b>LD</b></a> <a href="whlstf5.htm#bms_LE" target="ftslist" title="search letter LE"><b>LE</b></a> <a href="whlstf5.htm#bms_LI" target="ftslist" title="search letter LI"><b>LI</b></a> <a href="whlstf5.htm#bms_LL" target="ftslist" title="search letter LL"><b>LL</b></a> <a href="whlstf5.htm#bms_LO" target="ftslist" title="search letter LO"><b>LO</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_M"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf5.htm#bm_M" target="ftslist" title="search letter M "><b>M </b></a> <a href="whlstf5.htm#bms_MA" target="ftslist" title="search letter MA"><b>MA</b></a> <a href="whlstf5.htm#bms_ME" target="ftslist" title="search letter ME"><b>ME</b></a> <a href="whlstf5.htm#bms_MI" target="ftslist" title="search letter MI"><b>MI</b></a> <a href="whlstf6.htm#bms_MO" target="ftslist" title="search letter MO"><b>MO</b></a> <a href="whlstf6.htm#bms_MS" target="ftslist" title="search letter MS"><b>MS</b></a> <a href="whlstf6.htm#bms_MU" target="ftslist" title="search letter MU"><b>MU</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_N"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf6.htm#bm_N" target="ftslist" title="search letter N "><b>N </b></a> <a href="whlstf6.htm#bms_NA" target="ftslist" title="search letter NA"><b>NA</b></a> <a href="whlstf6.htm#bms_NE" target="ftslist" title="search letter NE"><b>NE</b></a> <a href="whlstf6.htm#bms_NF" target="ftslist" title="search letter NF"><b>NF</b></a> <a href="whlstf6.htm#bms_NO" target="ftslist" title="search letter NO"><b>NO</b></a> <a href="whlstf6.htm#bms_NT" target="ftslist" title="search letter NT"><b>NT</b></a> <a href="whlstf6.htm#bms_NU" target="ftslist" title="search letter NU"><b>NU</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_O"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf6.htm#bm_O" target="ftslist" title="search letter OB"><b>OB</b></a> <a href="whlstf6.htm#bms_OC" target="ftslist" title="search letter OC"><b>OC</b></a> <a href="whlstf6.htm#bms_OF" target="ftslist" title="search letter OF"><b>OF</b></a> <a href="whlstf6.htm#bms_OK" target="ftslist" title="search letter OK"><b>OK</b></a> <a href="whlstf6.htm#bms_OM" target="ftslist" title="search letter OM"><b>OM</b></a> <a href="whlstf6.htm#bms_ON" target="ftslist" title="search letter ON"><b>ON</b></a> <a href="whlstf6.htm#bms_OP" target="ftslist" title="search letter OP"><b>OP</b></a> <a href="whlstf6.htm#bms_OR" target="ftslist" title="search letter OR"><b>OR</b></a> <a href="whlstf6.htm#bms_OS" target="ftslist" title="search letter OS"><b>OS</b></a> <a href="whlstf6.htm#bms_OT" target="ftslist" title="search letter OT"><b>OT</b></a> <a href="whlstf7.htm#bms_OU" target="ftslist" title="search letter OU"><b>OU</b></a> <a href="whlstf7.htm#bms_OV" target="ftslist" title="search letter OV"><b>OV</b></a> <a href="whlstf7.htm#bms_OW" target="ftslist" title="search letter OW"><b>OW</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_P"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf7.htm#bm_P" target="ftslist" title="search letter P "><b>P </b></a> <a href="whlstf7.htm#bms_PA" target="ftslist" title="search letter PA"><b>PA</b></a> <a href="whlstf7.htm#bms_PC" target="ftslist" title="search letter PC"><b>PC</b></a> <a href="whlstf7.htm#bms_PE" target="ftslist" title="search letter PE"><b>PE</b></a> <a href="whlstf7.htm#bms_PH" target="ftslist" title="search letter PH"><b>PH</b></a> <a href="whlstf7.htm#bms_PI" target="ftslist" title="search letter PI"><b>PI</b></a> <a href="whlstf7.htm#bms_PL" target="ftslist" title="search letter PL"><b>PL</b></a> <a href="whlstf7.htm#bms_PO" target="ftslist" title="search letter PO"><b>PO</b></a> <a href="whlstf7.htm#bms_PR" target="ftslist" title="search letter PR"><b>PR</b></a> <a href="whlstf8.htm#bms_PU" target="ftslist" title="search letter PU"><b>PU</b></a> <a href="whlstf8.htm#bms_PY" target="ftslist" title="search letter PY"><b>PY</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_Q"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf8.htm#bm_Q" target="ftslist" title="search letter QG"><b>QG</b></a> <a href="whlstf8.htm#bms_QM" target="ftslist" title="search letter QM"><b>QM</b></a> <a href="whlstf8.htm#bms_QT" target="ftslist" title="search letter QT"><b>QT</b></a> <a href="whlstf8.htm#bms_QU" target="ftslist" title="search letter QU"><b>QU</b></a> <a href="whlstf8.htm#bms_QW" target="ftslist" title="search letter QW"><b>QW</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_R"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf8.htm#bm_R" target="ftslist" title="search letter R "><b>R </b></a> <a href="whlstf8.htm#bms_RA" target="ftslist" title="search letter RA"><b>RA</b></a> <a href="whlstf8.htm#bms_RE" target="ftslist" title="search letter RE"><b>RE</b></a> <a href="whlstf8.htm#bms_RI" target="ftslist" title="search letter RI"><b>RI</b></a> <a href="whlstf8.htm#bms_RO" target="ftslist" title="search letter RO"><b>RO</b></a> <a href="whlstf8.htm#bms_RU" target="ftslist" title="search letter RU"><b>RU</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_S"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf8.htm#bm_S" target="ftslist" title="search letter S "><b>S </b></a> <a href="whlstf8.htm#bms_SA" target="ftslist" title="search letter SA"><b>SA</b></a> <a href="whlstf8.htm#bms_SC" target="ftslist" title="search letter SC"><b>SC</b></a> <a href="whlstf9.htm#bms_SE" target="ftslist" title="search letter SE"><b>SE</b></a> <a href="whlstf9.htm#bms_SH" target="ftslist" title="search letter SH"><b>SH</b></a> <a href="whlstf9.htm#bms_SI" target="ftslist" title="search letter SI"><b>SI</b></a> <a href="whlstf9.htm#bms_SK" target="ftslist" title="search letter SK"><b>SK</b></a> <a href="whlstf9.htm#bms_SL" target="ftslist" title="search letter SL"><b>SL</b></a> <a href="whlstf9.htm#bms_SM" target="ftslist" title="search letter SM"><b>SM</b></a> <a href="whlstf9.htm#bms_SO" target="ftslist" title="search letter SO"><b>SO</b></a> <a href="whlstf9.htm#bms_SP" target="ftslist" title="search letter SP"><b>SP</b></a> <a href="whlstf9.htm#bms_ST" target="ftslist" title="search letter ST"><b>ST</b></a> <a href="whlstf10.htm#bms_SU" target="ftslist" title="search letter SU"><b>SU</b></a> <a href="whlstf10.htm#bms_SW" target="ftslist" title="search letter SW"><b>SW</b></a> <a href="whlstf10.htm#bms_SY" target="ftslist" title="search letter SY"><b>SY</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_B"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf0.htm#bm_B" target="ftslist" title="search letter B "><b>B </b></a> <a href="whlstf0.htm#bms_BA" target="ftslist" title="search letter BA"><b>BA</b></a> <a href="whlstf0.htm#bms_BE" target="ftslist" title="search letter BE"><b>BE</b></a> <a href="whlstf0.htm#bms_BI" target="ftslist" title="search letter BI"><b>BI</b></a> <a href="whlstf0.htm#bms_BL" target="ftslist" title="search letter BL"><b>BL</b></a> <a href="whlstf0.htm#bms_BO" target="ftslist" title="search letter BO"><b>BO</b></a> <a href="whlstf1.htm#bms_BR" target="ftslist" title="search letter BR"><b>BR</b></a> <a href="whlstf1.htm#bms_BU" target="ftslist" title="search letter BU"><b>BU</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_T"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf10.htm#bm_T" target="ftslist" title="search letter T "><b>T </b></a> <a href="whlstf10.htm#bms_TA" target="ftslist" title="search letter TA"><b>TA</b></a> <a href="whlstf10.htm#bms_TC" target="ftslist" title="search letter TC"><b>TC</b></a> <a href="whlstf10.htm#bms_TE" target="ftslist" title="search letter TE"><b>TE</b></a> <a href="whlstf10.htm#bms_TH" target="ftslist" title="search letter TH"><b>TH</b></a> <a href="whlstf10.htm#bms_TI" target="ftslist" title="search letter TI"><b>TI</b></a> <a href="whlstf10.htm#bms_TK" target="ftslist" title="search letter TK"><b>TK</b></a> <a href="whlstf10.htm#bms_TM" target="ftslist" title="search letter TM"><b>TM</b></a> <a href="whlstf10.htm#bms_TO" target="ftslist" title="search letter TO"><b>TO</b></a> <a href="whlstf10.htm#bms_TR" target="ftslist" title="search letter TR"><b>TR</b></a> <a href="whlstf10.htm#bms_TW" target="ftslist" title="search letter TW"><b>TW</b></a> <a href="whlstf10.htm#bms_TY" target="ftslist" title="search letter TY"><b>TY</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_U"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf10.htm#bm_U" target="ftslist" title="search letter U "><b>U </b></a> <a href="whlstf10.htm#bms_UL" target="ftslist" title="search letter UL"><b>UL</b></a> <a href="whlstf10.htm#bms_UN" target="ftslist" title="search letter UN"><b>UN</b></a> <a href="whlstf10.htm#bms_UP" target="ftslist" title="search letter UP"><b>UP</b></a> <a href="whlstf10.htm#bms_US" target="ftslist" title="search letter US"><b>US</b></a> <a href="whlstf11.htm#bms_UT" target="ftslist" title="search letter UT"><b>UT</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_V"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf11.htm#bm_V" target="ftslist" title="search letter V "><b>V </b></a> <a href="whlstf11.htm#bms_VA" target="ftslist" title="search letter VA"><b>VA</b></a> <a href="whlstf11.htm#bms_VE" target="ftslist" title="search letter VE"><b>VE</b></a> <a href="whlstf11.htm#bms_VI" target="ftslist" title="search letter VI"><b>VI</b></a> <a href="whlstf11.htm#bms_VT" target="ftslist" title="search letter VT"><b>VT</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_W"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf11.htm#bm_W" target="ftslist" title="search letter WA"><b>WA</b></a> <a href="whlstf11.htm#bms_WE" target="ftslist" title="search letter WE"><b>WE</b></a> <a href="whlstf11.htm#bms_WH" target="ftslist" title="search letter WH"><b>WH</b></a> <a href="whlstf11.htm#bms_WI" target="ftslist" title="search letter WI"><b>WI</b></a> <a href="whlstf11.htm#bms_WO" target="ftslist" title="search letter WO"><b>WO</b></a> <a href="whlstf11.htm#bms_WR" target="ftslist" title="search letter WR"><b>WR</b></a> <a href="whlstf11.htm#bms_WW" target="ftslist" title="search letter WW"><b>WW</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_X"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf11.htm#bm_X" target="ftslist" title="search letter X "><b>X </b></a> <a href="whlstf11.htm#bms_XM" target="ftslist" title="search letter XM"><b>XM</b></a> <a href="whlstf11.htm#bms_XT" target="ftslist" title="search letter XT"><b>XT</b></a> <a href="whlstf11.htm#bms_XX" target="ftslist" title="search letter XX"><b>XX</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_Y"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf11.htm#bm_Y" target="ftslist" title="search letter Y "><b>Y </b></a> <a href="whlstf11.htm#bms_YE" target="ftslist" title="search letter YE"><b>YE</b></a> <a href="whlstf11.htm#bms_YO" target="ftslist" title="search letter YO"><b>YO</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_Z"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf11.htm#bm_Z" target="ftslist" title="search letter Z "><b>Z </b></a> <a href="whlstf11.htm#bms_ZO" target="ftslist" title="search letter ZO"><b>ZO</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_C"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf1.htm#bm_C" target="ftslist" title="search letter C "><b>C </b></a> <a href="whlstf1.htm#bms_CA" target="ftslist" title="search letter CA"><b>CA</b></a> <a href="whlstf1.htm#bms_CD" target="ftslist" title="search letter CD"><b>CD</b></a> <a href="whlstf1.htm#bms_CE" target="ftslist" title="search letter CE"><b>CE</b></a> <a href="whlstf1.htm#bms_CH" target="ftslist" title="search letter CH"><b>CH</b></a> <a href="whlstf1.htm#bms_CL" target="ftslist" title="search letter CL"><b>CL</b></a> <a href="whlstf1.htm#bms_CO" target="ftslist" title="search letter CO"><b>CO</b></a> <a href="whlstf2.htm#bms_CP" target="ftslist" title="search letter CP"><b>CP</b></a> <a href="whlstf2.htm#bms_CR" target="ftslist" title="search letter CR"><b>CR</b></a> <a href="whlstf2.htm#bms_CS" target="ftslist" title="search letter CS"><b>CS</b></a> <a href="whlstf2.htm#bms_CT" target="ftslist" title="search letter CT"><b>CT</b></a> <a href="whlstf2.htm#bms_CU" target="ftslist" title="search letter CU"><b>CU</b></a> <a href="whlstf2.htm#bms_CY" target="ftslist" title="search letter CY"><b>CY</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_D"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf2.htm#bm_D" target="ftslist" title="search letter D "><b>D </b></a> <a href="whlstf2.htm#bms_DA" target="ftslist" title="search letter DA"><b>DA</b></a> <a href="whlstf2.htm#bms_DE" target="ftslist" title="search letter DE"><b>DE</b></a> <a href="whlstf2.htm#bms_DI" target="ftslist" title="search letter DI"><b>DI</b></a> <a href="whlstf2.htm#bms_DO" target="ftslist" title="search letter DO"><b>DO</b></a> <a href="whlstf2.htm#bms_DR" target="ftslist" title="search letter DR"><b>DR</b></a> <a href="whlstf2.htm#bms_DU" target="ftslist" title="search letter DU"><b>DU</b></a> <a href="whlstf2.htm#bms_DY" target="ftslist" title="search letter DY"><b>DY</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_E"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf2.htm#bm_E" target="ftslist" title="search letter E "><b>E </b></a> <a href="whlstf2.htm#bms_EA" target="ftslist" title="search letter EA"><b>EA</b></a> <a href="whlstf2.htm#bms_EC" target="ftslist" title="search letter EC"><b>EC</b></a> <a href="whlstf2.htm#bms_ED" target="ftslist" title="search letter ED"><b>ED</b></a> <a href="whlstf3.htm#bms_EF" target="ftslist" title="search letter EF"><b>EF</b></a> <a href="whlstf3.htm#bms_EG" target="ftslist" title="search letter EG"><b>EG</b></a> <a href="whlstf3.htm#bms_EI" target="ftslist" title="search letter EI"><b>EI</b></a> <a href="whlstf3.htm#bms_EL" target="ftslist" title="search letter EL"><b>EL</b></a> <a href="whlstf3.htm#bms_EM" target="ftslist" title="search letter EM"><b>EM</b></a> <a href="whlstf3.htm#bms_EN" target="ftslist" title="search letter EN"><b>EN</b></a> <a href="whlstf3.htm#bms_EQ" target="ftslist" title="search letter EQ"><b>EQ</b></a> <a href="whlstf3.htm#bms_ER" target="ftslist" title="search letter ER"><b>ER</b></a> <a href="whlstf3.htm#bms_ET" target="ftslist" title="search letter ET"><b>ET</b></a> <a href="whlstf3.htm#bms_EV" target="ftslist" title="search letter EV"><b>EV</b></a> <a href="whlstf3.htm#bms_EX" target="ftslist" title="search letter EX"><b>EX</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_F"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf3.htm#bm_F" target="ftslist" title="search letter F "><b>F </b></a> <a href="whlstf3.htm#bms_FA" target="ftslist" title="search letter FA"><b>FA</b></a> <a href="whlstf3.htm#bms_FE" target="ftslist" title="search letter FE"><b>FE</b></a> <a href="whlstf3.htm#bms_FI" target="ftslist" title="search letter FI"><b>FI</b></a> <a href="whlstf3.htm#bms_FL" target="ftslist" title="search letter FL"><b>FL</b></a> <a href="whlstf3.htm#bms_FO" target="ftslist" title="search letter FO"><b>FO</b></a> <a href="whlstf3.htm#bms_FP" target="ftslist" title="search letter FP"><b>FP</b></a> <a href="whlstf3.htm#bms_FR" target="ftslist" title="search letter FR"><b>FR</b></a> <a href="whlstf3.htm#bms_FU" target="ftslist" title="search letter FU"><b>FU</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_G"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf3.htm#bm_G" target="ftslist" title="search letter G "><b>G </b></a> <a href="whlstf3.htm#bms_GA" target="ftslist" title="search letter GA"><b>GA</b></a> <a href="whlstf3.htm#bms_GC" target="ftslist" title="search letter GC"><b>GC</b></a> <a href="whlstf3.htm#bms_GE" target="ftslist" title="search letter GE"><b>GE</b></a> <a href="whlstf4.htm#bms_GI" target="ftslist" title="search letter GI"><b>GI</b></a> <a href="whlstf4.htm#bms_GL" target="ftslist" title="search letter GL"><b>GL</b></a> <a href="whlstf4.htm#bms_GO" target="ftslist" title="search letter GO"><b>GO</b></a> <a href="whlstf4.htm#bms_GR" target="ftslist" title="search letter GR"><b>GR</b></a> <a href="whlstf4.htm#bms_GU" target="ftslist" title="search letter GU"><b>GU</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_H"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf4.htm#bm_H" target="ftslist" title="search letter H "><b>H </b></a> <a href="whlstf4.htm#bms_HA" target="ftslist" title="search letter HA"><b>HA</b></a> <a href="whlstf4.htm#bms_HD" target="ftslist" title="search letter HD"><b>HD</b></a> <a href="whlstf4.htm#bms_HE" target="ftslist" title="search letter HE"><b>HE</b></a> <a href="whlstf4.htm#bms_HI" target="ftslist" title="search letter HI"><b>HI</b></a> <a href="whlstf4.htm#bms_HO" target="ftslist" title="search letter HO"><b>HO</b></a> <a href="whlstf4.htm#bms_HP" target="ftslist" title="search letter HP"><b>HP</b></a> <a href="whlstf4.htm#bms_HT" target="ftslist" title="search letter HT"><b>HT</b></a> <a href="whlstf4.htm#bms_HX" target="ftslist" title="search letter HX"><b>HX</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Search Words letter</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<p class="ftsheader"><a name="subkey_I"></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a> <a href="whlstf4.htm#bm_I" target="ftslist" title="search letter I "><b>I </b></a> <a href="whlstf4.htm#bms_IC" target="ftslist" title="search letter IC"><b>IC</b></a> <a href="whlstf4.htm#bms_ID" target="ftslist" title="search letter ID"><b>ID</b></a> <a href="whlstf4.htm#bms_IE" target="ftslist" title="search letter IE"><b>IE</b></a> <a href="whlstf4.htm#bms_IF" target="ftslist" title="search letter IF"><b>IF</b></a> <a href="whlstf4.htm#bms_IG" target="ftslist" title="search letter IG"><b>IG</b></a> <a href="whlstf4.htm#bms_IM" target="ftslist" title="search letter IM"><b>IM</b></a> <a href="whlstf4.htm#bms_IN" target="ftslist" title="search letter IN"><b>IN</b></a> <a href="whlstf5.htm#bms_IO" target="ftslist" title="search letter IO"><b>IO</b></a> <a href="whlstf5.htm#bms_IS" target="ftslist" title="search letter IS"><b>IS</b></a> <a href="whlstf5.htm#bms_IT" target="ftslist" title="search letter IT"><b>IT</b></a> <a href="whnvl32.htm#home" target="_self" title="back to top level"><b>^</b></a></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<title>Glossary words list</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<base target="bsscright">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.glsheader {margin-left:10pt; margin-top:0pt;}\r
-.glsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.glsheader {margin-top:0pt; } .glsheader {margin-bottom:0pt; } .glsheader {margin-left:9pt; } \r
-\r
-.glsbody {margin-top:0pt; } .glsbody {margin-bottom:0pt; } .glsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; }A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="glsbody" style="margin-bottom:1pt;"><a name="bm_C"></a><nobr><b>Cell</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Element of a mesh. Cells are determined by their connectivity. They can have 0,1,2 or 3 dimension.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><nobr><b>Component</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">One integer or real value can correspond to each component of a field and to each entity of a mesh<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><a name="bm_D"></a><nobr><b>Descendant connectivity</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">It is a description of the entities of the mesh with dimension N. This description is made by an ordered list of geometrical entities (nodes, edges, or faces) with dimension N-1.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><a name="bm_E"></a><nobr><b>Edge</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">An edge of a volumetric or surface mesh. It is composed of 2 or 3 nodes (2 vertex nodes and optionally one middle node).<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><nobr><b>Entity of a mesh</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Geometrical component of the mesh: node, cell, face and edge. Faces and edges are only intermediate entities allowing to define the cells in descendant connectivity.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><nobr><b>Equivalence</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Equivalence represents a list of correspondance 2 by 2 of the entities of the same dimension.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><a name="bm_F"></a><nobr><b>Face</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Face of a volumetrical cell (triangle, quadrangle).<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><nobr><b>Family</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Entities of a mesh are described by a certain number of characteristics (boundary conditions, groups membership). Families represent classes equivalent to these characteristics (two entities of a mesh can belong to the same family if they have the same characteristics). Every family is determined by a set of attributes and a list of groups membership.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><nobr><b>Field</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Field consists of one or several scalar components. One definite type is associated to the given field and the values corresponding to different components are all of the same type.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><nobr><b>Field profile</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Fields can be defined only on one part of the mesh. Profile of the field or profile of the component of a field indicates which entities of the mesh contain values.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><a name="bm_G"></a><nobr><b>Group</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Unordered set of entities of a mesh. One entity can belong to several groups.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><a name="bm_M"></a><nobr><b>Mesh</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Mesh is described by its geometry: list of nodes and list of cells which constitute this mesh. Supplementary information is added with the help of families (initial, boundary conditions).<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><a name="bm_N"></a><nobr><b>Nodal connectivity</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">It is a description of an entity of the mesh by an ordered list of nodes constituting this entity.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><nobr><b>Node</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Node can be an isolated node of a mesh, a vertex or middle node of an edge. A node is associated to a point.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><a name="bm_P"></a><nobr><b>Point</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Geometrical entity determined by its coordinates in the space.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><a name="bm_R"></a><nobr><b>Reference connectivity</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">For each type of entity of a mesh, reference connectivity define the topology of an entity.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><nobr><b>Result</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">List of fields referring to one mesh.<p>\r
-<p class="glsbody" style="margin-bottom:1pt;"><a name="bm_S"></a><nobr><b>Study</b></nobr></p>\r
-<p class="glsbody" style="margin-top:1pt;">Study represents a chain of sequences of calculations.<p>\r
-<p class="glsbody"><br><br></p>\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Index words list</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ndxheader {margin-left:10pt; margin-top:0pt;}\r
-.ndxbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ndxheader {margin-top:0pt; } .ndxheader {margin-bottom:0pt; } .ndxheader {margin-left:9pt; } \r
-\r
-.ndxbody {margin-top:0pt; } .ndxbody {margin-bottom:0pt; } .ndxbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Content</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.tocbody {margin-left:10pt; margin-top:0pt;}\r
-.bo {}\r
-.bc {}\r
-.pn {}\r
-.pr {}\r
-\r
-.tocbody {margin-top:0pt; } .tocbody {margin-bottom:0pt; } .tocbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-img {vertial-align:middle;}\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<table border=0>\r
-<tr><td>\r
-<p class="tocbody">\r
-<nobr><a href="../kernel/introduction.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Welcome to SALOME</a></nobr><br>\r
-<nobr><a name="1"></a><a href="whlstt1.htm#1" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> Using this reference manual</a></nobr><br>\r
-<nobr><a name="2"></a><a href="whlstt2.htm#2" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> About SALOME</a></nobr><br>\r
-<nobr><a name="3"></a><a href="whlstt3.htm#3" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> GUI module</a></nobr><br>\r
-</p>\r
-\r
-</td></tr>\r
-<tr><td>\r
-<p><img src="whexpbar.gif" > <p>\r
-</td></tr>\r
-</table>\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Content</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.tocbody {margin-left:10pt; margin-top:0pt;}\r
-.bo {}\r
-.bc {}\r
-.pn {}\r
-.pr {}\r
-\r
-.tocbody {margin-top:0pt; } .tocbody {margin-bottom:0pt; } .tocbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-img {vertial-align:middle;}\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<table border=0>\r
-<tr><td>\r
-<p class="tocbody">\r
-<nobr><a href="../kernel/introduction.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Welcome to SALOME</a></nobr><br>\r
-<nobr><a name="1"></a><a href="whlstt0.htm#1" target="_self"><img src="../whd_toc2.gif" border="0" align="absmiddle"> Using this reference manual</a></nobr><br>\r
- <nobr><a href="../kernel/about_salome_pro_help_system.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> About SALOME help system</a></nobr><br>\r
- <nobr><a href="../kernel/navigating_topics.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Navigating topics</a></nobr><br>\r
- <nobr><a href="../kernel/using_left-hand_tabs.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Using left-hand tabs</a></nobr><br>\r
-<nobr><a name="2"></a><a href="whlstt2.htm#2" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> About SALOME</a></nobr><br>\r
-<nobr><a name="3"></a><a href="whlstt3.htm#3" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> GUI module</a></nobr><br>\r
-</p>\r
-\r
-</td></tr>\r
-<tr><td>\r
-<p><img src="whexpbar.gif" > <p>\r
-</td></tr>\r
-</table>\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Content</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.tocbody {margin-left:10pt; margin-top:0pt;}\r
-.bo {}\r
-.bc {}\r
-.pn {}\r
-.pr {}\r
-\r
-.tocbody {margin-top:0pt; } .tocbody {margin-bottom:0pt; } .tocbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-img {vertial-align:middle;}\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<table border=0>\r
-<tr><td>\r
-<p class="tocbody">\r
-<nobr><a href="../kernel/introduction.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Welcome to SALOME</a></nobr><br>\r
-<nobr><a name="1"></a><a href="whlstt1.htm#1" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> Using this reference manual</a></nobr><br>\r
-<nobr><a name="2"></a><a href="whlstt0.htm#2" target="_self"><img src="../whd_toc2.gif" border="0" align="absmiddle"> About SALOME</a></nobr><br>\r
- <nobr><a href="../kernel/introduction_to_salome_pro.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Introduction to SALOME</a></nobr><br>\r
- <nobr><a href="../kernel/about_salome_pro_architecture.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> SALOME architecture</a></nobr><br>\r
- <nobr><a href="../kernel/readme.html"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Installing SALOME</a></nobr><br>\r
- <nobr><a href="../kernel/running_salome_pro.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Running SALOME</a></nobr><br>\r
-<nobr><a name="3"></a><a href="whlstt3.htm#3" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> GUI module</a></nobr><br>\r
-</p>\r
-\r
-</td></tr>\r
-<tr><td>\r
-<p><img src="whexpbar.gif" > <p>\r
-</td></tr>\r
-</table>\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Content</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.tocbody {margin-left:10pt; margin-top:0pt;}\r
-.bo {}\r
-.bc {}\r
-.pn {}\r
-.pr {}\r
-\r
-.tocbody {margin-top:0pt; } .tocbody {margin-bottom:0pt; } .tocbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-img {vertial-align:middle;}\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<table border=0>\r
-<tr><td>\r
-<p class="tocbody">\r
-<nobr><a href="../kernel/introduction.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Welcome to SALOME</a></nobr><br>\r
-<nobr><a name="1"></a><a href="whlstt1.htm#1" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> Using this reference manual</a></nobr><br>\r
-<nobr><a name="2"></a><a href="whlstt2.htm#2" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> About SALOME</a></nobr><br>\r
-<nobr><a name="3"></a><a href="whlstt0.htm#3" target="_self"><img src="../whd_toc2.gif" border="0" align="absmiddle"> GUI module</a></nobr><br>\r
- <nobr><a href="../introduction_to_gui.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Introduction to GUI</a></nobr><br>\r
- <nobr><a href="../kernel/getting_started2.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Getting started</a></nobr><br>\r
- <nobr><a href="../kernel/salome_pro_desktop.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> SALOME desktop</a></nobr><br>\r
- <nobr><a name="4"></a><a href="whlstt4.htm#4" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> Study management</a></nobr><br>\r
- <nobr><a href="../kernel/using_object_browser.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Using Object Browser</a></nobr><br>\r
- <nobr><a href="../kernel/using_registry.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Using Registry tool</a></nobr><br>\r
- <nobr><a href="../kernel/using_catalog_generator.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Using Catalog Generator</a></nobr><br>\r
- <nobr><a name="5"></a><a href="whlstt5.htm#5" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> Setting Preferences</a></nobr><br>\r
-</p>\r
-\r
-</td></tr>\r
-<tr><td>\r
-<p><img src="whexpbar.gif" > <p>\r
-</td></tr>\r
-</table>\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Content</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.tocbody {margin-left:10pt; margin-top:0pt;}\r
-.bo {}\r
-.bc {}\r
-.pn {}\r
-.pr {}\r
-\r
-.tocbody {margin-top:0pt; } .tocbody {margin-bottom:0pt; } .tocbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-img {vertial-align:middle;}\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<table border=0>\r
-<tr><td>\r
-<p class="tocbody">\r
-<nobr><a href="../kernel/introduction.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Welcome to SALOME</a></nobr><br>\r
-<nobr><a name="1"></a><a href="whlstt1.htm#1" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> Using this reference manual</a></nobr><br>\r
-<nobr><a name="2"></a><a href="whlstt2.htm#2" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> About SALOME</a></nobr><br>\r
-<nobr><a name="3"></a><a href="whlstt0.htm#3" target="_self"><img src="../whd_toc2.gif" border="0" align="absmiddle"> GUI module</a></nobr><br>\r
- <nobr><a href="../introduction_to_gui.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Introduction to GUI</a></nobr><br>\r
- <nobr><a href="../kernel/getting_started2.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Getting started</a></nobr><br>\r
- <nobr><a href="../kernel/salome_pro_desktop.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> SALOME desktop</a></nobr><br>\r
- <nobr><a name="4"></a><a href="whlstt3.htm#4" target="_self"><img src="../whd_toc2.gif" border="0" align="absmiddle"> Study management</a></nobr><br>\r
- <nobr><a href="../kernel/creating_a_new_study.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Creating a new study</a></nobr><br>\r
- <nobr><a href="../kernel/opening_studies.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Opening studies</a></nobr><br>\r
- <nobr><a href="../kernel/saving_a_study.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Saving and closing studies</a></nobr><br>\r
- <nobr><a href="../kernel/editing_studies.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Editing studies</a></nobr><br>\r
- <nobr><a href="../kernel/displaying_studies.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Displaying studies</a></nobr><br>\r
- <nobr><a href="../dump_study.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Working with Python Scripts</a></nobr><br>\r
- <nobr><a href="../kernel/getting_properties_of_the_study.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Setting study properties</a></nobr><br>\r
- <nobr><a href="../kernel/using_object_browser.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Using Object Browser</a></nobr><br>\r
- <nobr><a href="../kernel/using_registry.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Using Registry tool</a></nobr><br>\r
- <nobr><a href="../kernel/using_catalog_generator.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Using Catalog Generator</a></nobr><br>\r
- <nobr><a name="5"></a><a href="whlstt5.htm#5" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> Setting Preferences</a></nobr><br>\r
-</p>\r
-\r
-</td></tr>\r
-<tr><td>\r
-<p><img src="whexpbar.gif" > <p>\r
-</td></tr>\r
-</table>\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Content</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.tocbody {margin-left:10pt; margin-top:0pt;}\r
-.bo {}\r
-.bc {}\r
-.pn {}\r
-.pr {}\r
-\r
-.tocbody {margin-top:0pt; } .tocbody {margin-bottom:0pt; } .tocbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-img {vertial-align:middle;}\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<table border=0>\r
-<tr><td>\r
-<p class="tocbody">\r
-<nobr><a href="../kernel/introduction.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Welcome to SALOME</a></nobr><br>\r
-<nobr><a name="1"></a><a href="whlstt1.htm#1" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> Using this reference manual</a></nobr><br>\r
-<nobr><a name="2"></a><a href="whlstt2.htm#2" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> About SALOME</a></nobr><br>\r
-<nobr><a name="3"></a><a href="whlstt0.htm#3" target="_self"><img src="../whd_toc2.gif" border="0" align="absmiddle"> GUI module</a></nobr><br>\r
- <nobr><a href="../introduction_to_gui.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Introduction to GUI</a></nobr><br>\r
- <nobr><a href="../kernel/getting_started2.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Getting started</a></nobr><br>\r
- <nobr><a href="../kernel/salome_pro_desktop.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> SALOME desktop</a></nobr><br>\r
- <nobr><a name="4"></a><a href="whlstt4.htm#4" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> Study management</a></nobr><br>\r
- <nobr><a href="../kernel/using_object_browser.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Using Object Browser</a></nobr><br>\r
- <nobr><a href="../kernel/using_registry.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Using Registry tool</a></nobr><br>\r
- <nobr><a href="../kernel/using_catalog_generator.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Using Catalog Generator</a></nobr><br>\r
- <nobr><a name="5"></a><a href="whlstt3.htm#5" target="_self"><img src="../whd_toc2.gif" border="0" align="absmiddle"> Setting Preferences</a></nobr><br>\r
- <nobr><a href="../setting_preferences.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Setting Preferences</a></nobr><br>\r
- <nobr><a href="../select_color_and_font.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Select Color and Font</a></nobr><br>\r
- <nobr><a href="../kernel/setting_preferences.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> SALOME preferences</a></nobr><br>\r
- <nobr><a href="../geom_preferences.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Geometry preferences</a></nobr><br>\r
- <nobr><a href="../mesh_preferences.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Mesh preferences</a></nobr><br>\r
- <nobr><a href="../post-pro_preferences.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Post-Pro Preferences</a></nobr><br>\r
-</p>\r
-\r
-</td></tr>\r
-<tr><td>\r
-<p><img src="whexpbar.gif" > <p>\r
-</td></tr>\r
-</table>\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>toc frame</title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<frameset rows="100%, *" border="0" frameborder="0">\r
- <frame name="toctree" title="toc tree frame" src="whlstt0.htm"></frame>\r
-</frameset>\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Index frame</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<frameset rows="40, *" border="0" frameborder="0">\r
- <frame name="ndxletter" title="index letter frame" src="whnvl31.htm" noresize frameborder="1" scrolling="no" border="0" marginheight="0" marginwidth="0" ></frame>\r
- <frame name="ndxlist" title="index list frame" src="whlsti0.htm"></frame>\r
-</frameset>\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>search frame</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<frameset rows="40, *" border="0" frameborder="0">\r
- <frame name="ftsletter" title="search letter frame" src="whnvl32.htm" noresize frameborder="1" scrolling="no" border="0" marginheight="0" marginwidth="0" ></frame>\r
- <frame name="ftslist" title="seach word frame" src="whlstf0.htm"></frame>\r
-</frameset>\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Glossary frame</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-</head>\r
-<frameset rows="40, *" border="0" frameborder="0">\r
- <frame name="glsletter" title="glossary letter frame" src="whnvl33.htm" noresize frameborder="1" scrolling="no" border="0" marginheight="0" marginwidth="0" ></frame>\r
- <frame name="glslist" title="glossary defination frame" src="whlstg0.htm"></frame>\r
-</frameset>\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Index Letters</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ndxheader {margin-left:10pt; margin-top:0pt;}\r
-.ndxbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ndxheader {margin-top:0pt; } .ndxheader {margin-bottom:0pt; } .ndxheader {margin-left:9pt; } \r
-\r
-.ndxbody {margin-top:0pt; } .ndxbody {margin-bottom:0pt; } .ndxbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-\r
-<body>\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Search Letters</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="ftsheader">\r
-<a name="home"></a> <a href="whlstfl0.htm#subkey_{" target="_self"title="search non-alphabet letter"><b>#</b></a> \r
- <a href="whlstfl1.htm#subkey_A" target="_self"title="search letter A"><b>A</b></a> \r
- <a href="whlstfl2.htm#subkey_B" target="_self"title="search letter B"><b>B</b></a> \r
- <a href="whlstfl3.htm#subkey_C" target="_self"title="search letter C"><b>C</b></a> \r
- <a href="whlstfl4.htm#subkey_D" target="_self"title="search letter D"><b>D</b></a> \r
- <a href="whlstfl5.htm#subkey_E" target="_self"title="search letter E"><b>E</b></a> \r
- <a href="whlstfl6.htm#subkey_F" target="_self"title="search letter F"><b>F</b></a> \r
- <a href="whlstfl7.htm#subkey_G" target="_self"title="search letter G"><b>G</b></a> \r
- <a href="whlstfl8.htm#subkey_H" target="_self"title="search letter H"><b>H</b></a> \r
- <a href="whlstfl9.htm#subkey_I" target="_self"title="search letter I"><b>I</b></a> \r
- <a href="whlstfl10.htm#subkey_J" target="_self"title="search letter J"><b>J</b></a> \r
- <a href="whlstfl11.htm#subkey_K" target="_self"title="search letter K"><b>K</b></a> \r
- <a href="whlstfl12.htm#subkey_L" target="_self"title="search letter L"><b>L</b></a> \r
- <a href="whlstfl13.htm#subkey_M" target="_self"title="search letter M"><b>M</b></a> \r
- <a href="whlstfl14.htm#subkey_N" target="_self"title="search letter N"><b>N</b></a> \r
- <a href="whlstfl15.htm#subkey_O" target="_self"title="search letter O"><b>O</b></a> \r
- <a href="whlstfl16.htm#subkey_P" target="_self"title="search letter P"><b>P</b></a> \r
- <a href="whlstfl17.htm#subkey_Q" target="_self"title="search letter Q"><b>Q</b></a> \r
- <a href="whlstfl18.htm#subkey_R" target="_self"title="search letter R"><b>R</b></a> \r
- <a href="whlstfl19.htm#subkey_S" target="_self"title="search letter S"><b>S</b></a> \r
- <a href="whlstfl20.htm#subkey_T" target="_self"title="search letter T"><b>T</b></a> \r
- <a href="whlstfl21.htm#subkey_U" target="_self"title="search letter U"><b>U</b></a> \r
- <a href="whlstfl22.htm#subkey_V" target="_self"title="search letter V"><b>V</b></a> \r
- <a href="whlstfl23.htm#subkey_W" target="_self"title="search letter W"><b>W</b></a> \r
- <a href="whlstfl24.htm#subkey_X" target="_self"title="search letter X"><b>X</b></a> \r
- <a href="whlstfl25.htm#subkey_Y" target="_self"title="search letter Y"><b>Y</b></a> \r
- <a href="whlstfl26.htm#subkey_Z" target="_self"title="search letter Z"><b>Z</b></a> \r
-</p>\r
-\r
-<body>\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Glossary Letters</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.glsheader {margin-left:10pt; margin-top:0pt;}\r
-.glsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.glsheader {margin-top:0pt; } .glsheader {margin-bottom:0pt; } .glsheader {margin-left:9pt; } \r
-\r
-.glsbody {margin-top:0pt; } .glsbody {margin-bottom:0pt; } .glsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; }A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-<style>\r
-<!--\r
-\r
--->\r
-</style>\r
-</head>\r
-<body marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<p class="glsheader">\r
- <font class="inactive">#</font> \r
- <font class="inactive">A</font> \r
- <font class="inactive">B</font> \r
- <a href="whlstg0.htm#bm_C" target="glslist"title="glossary letter C"><b>C</b></a> \r
- <a href="whlstg0.htm#bm_D" target="glslist"title="glossary letter D"><b>D</b></a> \r
- <a href="whlstg0.htm#bm_E" target="glslist"title="glossary letter E"><b>E</b></a> \r
- <a href="whlstg0.htm#bm_F" target="glslist"title="glossary letter F"><b>F</b></a> \r
- <a href="whlstg0.htm#bm_G" target="glslist"title="glossary letter G"><b>G</b></a> \r
- <font class="inactive">H</font> \r
- <font class="inactive">I</font> \r
- <font class="inactive">J</font> \r
- <font class="inactive">K</font> \r
- <font class="inactive">L</font> \r
- <a href="whlstg0.htm#bm_M" target="glslist"title="glossary letter M"><b>M</b></a> \r
- <a href="whlstg0.htm#bm_N" target="glslist"title="glossary letter N"><b>N</b></a> \r
- <font class="inactive">O</font> \r
- <a href="whlstg0.htm#bm_P" target="glslist"title="glossary letter P"><b>P</b></a> \r
- <font class="inactive">Q</font> \r
- <a href="whlstg0.htm#bm_R" target="glslist"title="glossary letter R"><b>R</b></a> \r
- <a href="whlstg0.htm#bm_S" target="glslist"title="glossary letter S"><b>S</b></a> \r
- <font class="inactive">T</font> \r
- <font class="inactive">U</font> \r
- <font class="inactive">V</font> \r
- <font class="inactive">W</font> \r
- <font class="inactive">X</font> \r
- <font class="inactive">Y</font> \r
- <font class="inactive">Z</font> \r
-</p>\r
-\r
-<body>\r
-</html>\r
-\r
+++ /dev/null
-<!-- WebHelp version 5.10 -->\r
-<html>\r
-<head>\r
-<title> Content Navigation Pane </title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-\r
-</style>\r
-</head>\r
-<frameset rows="36, *" border="0" frameborder="0">\r
- <frame name="toctabs" title="tab selection frame" src="whnvt30.htm" noresize frameborder="no" scrolling="no" border="0" marginheight="0" marginwidth="0" ></frame>\r
- <frame name="toclist" title="content frame" src="whlstt0.htm"></frame>\r
-</frameset>\r
-</html>
\ No newline at end of file
+++ /dev/null
-<!-- WebHelp version 5.10 -->\r
-<html>\r
-<head>\r
-<title> Index Navigation Pane </title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-\r
-</style>\r
-</head>\r
-<frameset rows="36, *" border="0" frameborder="0">\r
- <frame name="ndxtabs" title="tab selection frame" src="whnvt31.htm" noresize frameborder="no" scrolling="no" border="0" marginheight="0" marginwidth="0" ></frame>\r
- <frame name="ndxdata" title="index frame" src="whnvf31.htm"></frame>\r
-</frameset>\r
-</html>
\ No newline at end of file
+++ /dev/null
-<!-- WebHelp version 5.10 -->\r
-<html>\r
-<head>\r
-<title> Search Navigation Pane </title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-\r
-</style>\r
-</head>\r
-<frameset rows="36, *" border="0" frameborder="0">\r
- <frame name="ftstabs" title="tab selection frame" src="whnvt32.htm" noresize frameborder="no" scrolling="no" border="0" marginheight="0" marginwidth="0" ></frame>\r
- <frame name="ftsdata" title="search frame" src="whnvf32.htm"></frame>\r
-</frameset>\r
-</html>
\ No newline at end of file
+++ /dev/null
-<!-- WebHelp version 5.10 -->\r
-<html>\r
-<head>\r
-<title> Glossary Navigation Pane </title>\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-\r
-</style>\r
-</head>\r
-<frameset rows="36, *" border="0" frameborder="0">\r
- <frame name="glstabs" title="tab selection frame" src="whnvt33.htm" noresize frameborder="no" scrolling="no" border="0" marginheight="0" marginwidth="0" ></frame>\r
- <frame name="glsdata" title="glossary frame" src="whnvf33.htm"></frame>\r
-</frameset>\r
-</html>
\ No newline at end of file
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Content Navigation Tab</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.tocbody {margin-left:10pt; margin-top:0pt;}\r
-.bo {}\r
-.bc {}\r
-.pn {}\r
-.pr {}\r
-\r
-.tocbody {margin-top:0pt; } .tocbody {margin-bottom:0pt; } .tocbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-img {vertial-align:middle;}\r
--->\r
-</style>\r
-</head>\r
-<body class="tabs" marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<table class="tabs" width="100%">\r
- <tr> \r
- <td class="tabs">\r
- <nobr><a href="javascript:void(0)" title="Contents"><img src="../whd_tab1.gif" border="0"></a><a href="whnvp32.htm" target="_parent" title="Search"><img src="../whd_tab6.gif" border="0"></a><a href="whnvp33.htm" target="_parent" title="Glossary"><img src="../whd_tab8.gif" border="0"></a></nobr>\r
- </td>\r
- </tr>\r
-</table>\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Index Navigation Tab</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ndxheader {margin-left:10pt; margin-top:0pt;}\r
-.ndxbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ndxheader {margin-top:0pt; } .ndxheader {margin-bottom:0pt; } .ndxheader {margin-left:9pt; } \r
-\r
-.ndxbody {margin-top:0pt; } .ndxbody {margin-bottom:0pt; } .ndxbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body class="tabs" marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<table class="tabs" width="100%">\r
- <tr> \r
- <td class="tabs">\r
- <nobr><a href="whnvp30.htm" target="_parent" title="Contents"><img src="../whd_tab2.gif" border="0"></a><a href="whnvp32.htm" target="_parent" title="Search"><img src="../whd_tab6.gif" border="0"></a><a href="whnvp33.htm" target="_parent" title="Glossary"><img src="../whd_tab8.gif" border="0"></a></nobr>\r
- </td>\r
- </tr>\r
-</table>\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Search Navigation Tab</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.ftsheader {margin-left:10pt; margin-top:0pt;}\r
-.ftsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.ftsheader {margin-top:0pt; } .ftsheader {margin-bottom:0pt; } .ftsheader {margin-left:9pt; } \r
-\r
-.ftsbody {margin-top:0pt; } .ftsbody {margin-bottom:0pt; } .ftsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; } A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body class="tabs" marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<table class="tabs" width="100%">\r
- <tr> \r
- <td class="tabs">\r
- <nobr><a href="whnvp30.htm" target="_parent" title="Contents"><img src="../whd_tab2.gif" border="0"></a><a href="javascript:void(0)" title="Search"><img src="../whd_tab5.gif" border="0"></a><a href="whnvp33.htm" target="_parent" title="Glossary"><img src="../whd_tab8.gif" border="0"></a></nobr>\r
- </td>\r
- </tr>\r
-</table>\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<html>\r
-<head>\r
-<!-- WebHelp version 5.10 -->\r
-<title>Glossary Navigation Tab</title>\r
-<base target="bsscright">\r
-\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<meta name="description" content="WebHelp 5.50">\r
-<style>\r
-<!--\r
-body {margin-left:1pt; margin-top:1pt; margin-right:1pt;font-family:Arial; font-size:9pt;}\r
-\r
-A:link {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:visited {font-family:Arial; font-size:9pt; color:#000000; font-style:normal; text-decoration:none; }\r
-A:active {background-color:#cccccc;}\r
-A:hover {font-family:Arial; font-size:9pt; color:#007f00; font-style:normal; text-decoration:underline; }\r
-\r
-.tabs {background-color:#c0c0c0;}\r
-.glsheader {margin-left:10pt; margin-top:0pt;}\r
-.glsbody {margin-left:10pt; margin-top:0pt;}\r
-.inactive {color:#666666;}\r
-.glsheader {margin-top:0pt; } .glsheader {margin-bottom:0pt; } .glsheader {margin-left:9pt; } \r
-\r
-.glsbody {margin-top:0pt; } .glsbody {margin-bottom:0pt; } .glsbody {margin-left:9pt; } \r
-p {color:#000000; } p {font-family:Arial; } p {font-size:9pt; } p {font-style:normal; } p {text-decoration:none; } \r
-A:link {color:#000000; } A:link {font-family:Arial; } A:link {font-size:9pt; } A:link {font-style:normal; } A:link {text-decoration:none; } \r
-A:visited {color:#000000; } A:visited {font-family:Arial; }A:visited {font-size:9pt; } A:visited {font-style:normal; } A:visited {text-decoration:none; } \r
-A:active {background-color:#cccccc; } \r
-A:hover {color:#007f00; } A:hover {font-family:Arial; } A:hover {font-size:9pt; } A:hover {font-style:normal; } A:hover {text-decoration:underline; } \r
-\r
--->\r
-</style>\r
-</head>\r
-<body class="tabs" marginheight="0" marginwidth="0" bgproperties="fixed">\r
-<table class="tabs" width="100%">\r
- <tr> \r
- <td class="tabs">\r
- <nobr><a href="whnvp30.htm" target="_parent" title="Contents"><img src="../whd_tab2.gif" border="0"></a><a href="whnvp32.htm" target="_parent" title="Search"><img src="../whd_tab6.gif" border="0"></a><a href="javascript:void(0)" title="Glossary"><img src="../whd_tab7.gif" border="0"></a></nobr>\r
- </td>\r
- </tr>\r
-</table>\r
-</body>\r
-\r
-</html>\r
-\r
+++ /dev/null
-<?xml version='1.0' encoding='windows-1252' ?>\r
-<ftstdata>\r
-<topic name="Dump Study" url="dump_study.htm" />\r
-<topic name="GEOM preferences" url="geom_preferences.htm" />\r
-<topic name="Introduction to GUI" url="introduction_to_gui.htm" />\r
-<topic name="About SALOME architecture" url="kernel/about_salome_pro_architecture.htm" />\r
-<topic name="About SALOME help system" url="kernel/about_salome_pro_help_system.htm" />\r
-<topic name="Creating a new study" url="kernel/creating_a_new_study.htm" />\r
-<topic name="Displaying studies" url="kernel/displaying_studies.htm" />\r
-<topic name="Editing studies" url="kernel/editing_studies.htm" />\r
-<topic name="Getting properties of the study" url="kernel/getting_properties_of_the_study.htm" />\r
-<topic name="Getting started2" url="kernel/getting_started2.htm" />\r
-<topic name="Introduction" url="kernel/introduction.htm" />\r
-<topic name="Introduction to SALOME" url="kernel/introduction_to_salome_pro.htm" />\r
-<topic name="Navigating topics" url="kernel/navigating_topics.htm" />\r
-<topic name="Opening studies" url="kernel/opening_studies.htm" />\r
-<topic name="SALOME Installation Wizard Help" url="kernel/readme.html" />\r
-<topic name="Running SALOME" url="kernel/running_salome_pro.htm" />\r
-<topic name="SALOME desktop" url="kernel/salome_pro_desktop.htm" />\r
-<topic name="Saving a study" url="kernel/saving_a_study.htm" />\r
-<topic name="Setting preferences" url="kernel/setting_preferences.htm" />\r
-<topic name="Using Catalog Generator" url="kernel/using_catalog_generator.htm" />\r
-<topic name="Using left-hand tabs" url="kernel/using_left-hand_tabs.htm" />\r
-<topic name="Using Object Browser" url="kernel/using_object_browser.htm" />\r
-<topic name="Using Registry tool" url="kernel/using_registry.htm" />\r
-<topic name="MESH preferences" url="mesh_preferences.htm" />\r
-<topic name="OCC 3D Viewer" url="occ_3d_viewer.htm" />\r
-<topic name="Post-Pro Preferences" url="post-pro_preferences.htm" />\r
-<topic name="Select Color and Font" url="select_color_and_font.htm" />\r
-<topic name="Setting Preferences" url="setting_preferences.htm" />\r
-<topic name="VTK 3D Viewer" url="vtk_3d_viewer.htm" />\r
-\r
-</ftstdata> \r
+++ /dev/null
-<?xml version='1.0' encoding='windows-1252' ?>\r
-<fts>\r
-<chunkinfo url="whfwdata0.xml" first="__version__" last="zoom"/>\r
-\r
-<tchunkinfo first="0" last="26" url="whftdata0.xml" />\r
-\r
-</fts>\r
+++ /dev/null
-<?xml version='1.0' encoding='windows-1252' ?>\r
-<ftswdata>\r
-<key name="__version__"> 14, </key>\r
-<key name="_omnipymodul"> 14, </key>\r
-<key name="_root_dir"> 14, </key>\r
-<key name="_src_dir"> 14, </key>\r
-<key name="0"> 6,2,25,16,14, </key>\r
-<key name="001"> 25, </key>\r
-<key name="01"> 25, </key>\r
-<key name="1"> 5,25,15,14, </key>\r
-<key name="10"> 25,14, </key>\r
-<key name="100"> 25, </key>\r
-<key name="103100"> 14, </key>\r
-<key name="13"> 14, </key>\r
-<key name="16"> 25, </key>\r
-<key name="16x16"> 25, </key>\r
-<key name="2"> 5,25,15,14, </key>\r
-<key name="200"> 25, </key>\r
-<key name="23"> 14, </key>\r
-<key name="24"> 14, </key>\r
-<key name="256"> 25, </key>\r
-<key name="2a2"> 14, </key>\r
-<key name="2d"> 6,10,2,25, </key>\r
-<key name="3"> 6,2,15,16,14, </key>\r
-<key name="31"> 14, </key>\r
-<key name="33"> 25, </key>\r
-<key name="3d"> 10,2,24,25,14,18,28, </key>\r
-<key name="4"> 14, </key>\r
-<key name="5"> 14, </key>\r
-<key name="50"> 25, </key>\r
-<key name="512"> 25, </key>\r
-<key name="6"> 14, </key>\r
-<key name="7"> 14, </key>\r
-<key name="8"> 14, </key>\r
-<key name="9"> 14, </key>\r
-<key name="abl"> 3,6,24,14,18,28, </key>\r
-<key name="abort"> 14, </key>\r
-<key name="abov"> 8,14, </key>\r
-<key name="abscissa"> 23,25, </key>\r
-<key name="absolut"> 25, </key>\r
-<key name="abstraction"> 5, </key>\r
-<key name="ac"> 14, </key>\r
-<key name="acceptabl"> 25, </key>\r
-<key name="acces"> 3,1,23,24,25,16,18,21,28, </key>\r
-<key name="accessibl"> 10,27, </key>\r
-<key name="accord"> 25,15,16,14, </key>\r
-<key name="account"> 14, </key>\r
-<key name="achiev"> 3, </key>\r
-<key name="acquaint"> 4, </key>\r
-<key name="action"> 25,14, </key>\r
-<key name="activ"> 5,6,25,16,17, </key>\r
-<key name="activat"> 5,16,17, </key>\r
-<key name="activity"> 25, </key>\r
-<key name="actual"> 5,14, </key>\r
-<key name="ad"> 0,14,26,19, </key>\r
-<key name="adapt"> 3, </key>\r
-<key name="add"> 15,16,14,26,18,19, </key>\r
-<key name="addition"> 5,14, </key>\r
-<key name="additional"> 3,2,25,15,16,14,21, </key>\r
-<key name="addres"> 25, </key>\r
-<key name="adjust"> 25, </key>\r
-<key name="advanc"> 14,19, </key>\r
-<key name="affect"> 3, </key>\r
-<key name="again"> 6,12,14,17, </key>\r
-<key name="algorithm"> 3,11,14, </key>\r
-<key name="allow"> 3,0,7,1,11,23,24,25,15,16,14,17,26,18,27,19,22,28, </key>\r
-<key name="almost"> 17, </key>\r
-<key name="along"> 11,18,28, </key>\r
-<key name="alongsid"> 19, </key>\r
-<key name="alpha"> 25, </key>\r
-<key name="already"> 14, </key>\r
-<key name="alway"> 11, </key>\r
-<key name="amount"> 14, </key>\r
-<key name="animation"> 25, </key>\r
-<key name="anoth"> 3,17, </key>\r
-<key name="any"> 3,4,6,1,8,11,12,25,15,16,14,17,27, </key>\r
-<key name="anyth"> 14, </key>\r
-<key name="ap"> 27, </key>\r
-<key name="api"> 0,25, </key>\r
-<key name="appear"> 0,8,9,14,18,19,22, </key>\r
-<key name="appearanc"> 23, </key>\r
-<key name="applet"> 4, </key>\r
-<key name="appli"> 1, </key>\r
-<key name="application"> 3,6,0,10,2,15,16,14,17,18,27,19, </key>\r
-<key name="approach"> 11,16,14, </key>\r
-<key name="appropriat"> 10,14, </key>\r
-<key name="approximat"> 14, </key>\r
-<key name="arabic"> 26, </key>\r
-<key name="architectur"> 3,0,10, </key>\r
-<key name="area"> 6,24,16,18,28, </key>\r
-<key name="argument"> 14, </key>\r
-<key name="around"> 24,28, </key>\r
-<key name="arrang"> 25, </key>\r
-<key name="ascii"> 17,18, </key>\r
-<key name="assign"> 25, </key>\r
-<key name="associat"> 13,25,21, </key>\r
-<key name="attach"> 10,14, </key>\r
-<key name="attribut"> 14,21, </key>\r
-<key name="author"> 8,19, </key>\r
-<key name="auto"> 18, </key>\r
-<key name="automatic"> 23,14,18, </key>\r
-<key name="automatical"> 0,23,13,25,15,16,14,17,27, </key>\r
-<key name="availability"> 7, </key>\r
-<key name="availabl"> 3,5,7,10,24,14,28, </key>\r
-<key name="averag"> 25, </key>\r
-<key name="avi"> 25, </key>\r
-<key name="avoid"> 0,14, </key>\r
-<key name="awar"> 14, </key>\r
-<key name="ax"> 24,18,28, </key>\r
-<key name="axi"> 18,28, </key>\r
-<key name="b"> 14, </key>\r
-<key name="back"> 23,14, </key>\r
-<key name="background"> 25,18, </key>\r
-<key name="bar"> 23,25,21, </key>\r
-<key name="bas"> 3,10,2,24,14,17, </key>\r
-<key name="bash"> 14, </key>\r
-<key name="basi"> 3,24,25, </key>\r
-<key name="basic"> 3,11,16,14,26, </key>\r
-<key name="batch"> 3,0,15,14, </key>\r
-<key name="be"> 1,14, </key>\r
-<key name="becom"> 6,25,14, </key>\r
-<key name="befor"> 14, </key>\r
-<key name="begin"> 14,18,22, </key>\r
-<key name="behav"> 3, </key>\r
-<key name="behavior"> 10,14, </key>\r
-<key name="behaviour"> 25, </key>\r
-<key name="below"> 12,25,14, </key>\r
-<key name="bet"> 25, </key>\r
-<key name="bicolor"> 25, </key>\r
-<key name="big"> 25, </key>\r
-<key name="bin"> 15,14,19, </key>\r
-<key name="binari"> 14, </key>\r
-<key name="binary"> 17, </key>\r
-<key name="blu"> 14, </key>\r
-<key name="blur"> 3, </key>\r
-<key name="bmp"> 24,28, </key>\r
-<key name="bold"> 14, </key>\r
-<key name="book"> 20, </key>\r
-<key name="boost"> 14, </key>\r
-<key name="boost_version"> 14, </key>\r
-<key name="boostdir"> 14, </key>\r
-<key name="border"> 23,16, </key>\r
-<key name="both"> 2,23,25,14, </key>\r
-<key name="bottom"> 10,23,25,14,18, </key>\r
-<key name="bound"> 24,28, </key>\r
-<key name="boundari"> 1, </key>\r
-<key name="box"> 0,1,8,23,24,13,25,14,17,26,18,27,19,22,28, </key>\r
-<key name="bracket"> 14, </key>\r
-<key name="break"> 14, </key>\r
-<key name="brep"> 10, </key>\r
-<key name="brief"> 6,12, </key>\r
-<key name="bring"> 2, </key>\r
-<key name="brows"> 4,5,6,0,2,13,25,16,14,17,18,19,21, </key>\r
-<key name="build"> 25,14,19, </key>\r
-<key name="built"> 11,25,14, </key>\r
-<key name="button"> 2,12,24,13,25,14,17,26,18,27,19,22,28, </key>\r
-<key name="button_label"> 14, </key>\r
-<key name="button_script"> 14, </key>\r
-<key name="button_tooltip"> 14, </key>\r
-<key name="c"> 3,15,14, </key>\r
-<key name="ca"> 10, </key>\r
-<key name="cad"> 10,11, </key>\r
-<key name="cal"> 3,0,14, </key>\r
-<key name="calculation"> 9,10,11, </key>\r
-<key name="call"> 14,17,19,22, </key>\r
-<key name="cam"> 3, </key>\r
-<key name="camera"> 25, </key>\r
-<key name="cancel"> 14, </key>\r
-<key name="capability"> 19, </key>\r
-<key name="caption"> 14, </key>\r
-<key name="car"> 10, </key>\r
-<key name="careful"> 14, </key>\r
-<key name="carri"> 23, </key>\r
-<key name="carry"> 10, </key>\r
-<key name="cas"> 3,8,11,25,16,14,17, </key>\r
-<key name="cascad"> 24,14, </key>\r
-<key name="casroot"> 14, </key>\r
-<key name="catalog"> 19, </key>\r
-<key name="catalogmodulegeneral"> 19, </key>\r
-<key name="catalogmodulepersonnel"> 19, </key>\r
-<key name="catalogu"> 2,15, </key>\r
-<key name="categori"> 20, </key>\r
-<key name="cd"> 14, </key>\r
-<key name="cel"> 25,26, </key>\r
-<key name="cent"> 24,28, </key>\r
-<key name="center"> 25, </key>\r
-<key name="centr"> 25, </key>\r
-<key name="central"> 25, </key>\r
-<key name="centraliz"> 15, </key>\r
-<key name="chang"> 3,6,8,23,24,25,16,14,17,18,27,28, </key>\r
-<key name="channel"> 25, </key>\r
-<key name="chapter"> 4, </key>\r
-<key name="character"> 26, </key>\r
-<key name="charg"> 14, </key>\r
-<key name="check"> 0,25,16,14,18,28, </key>\r
-<key name="check_enabl"> 14, </key>\r
-<key name="check_version"> 14, </key>\r
-<key name="checkbox"> 23,25,14,18, </key>\r
-<key name="choic"> 0,25,14,26, </key>\r
-<key name="choos"> 5,7,1,8,23,24,13,25,16,14,26,19,22,28, </key>\r
-<key name="chosen"> 25,26,19, </key>\r
-<key name="clamp"> 25, </key>\r
-<key name="classic"> 16, </key>\r
-<key name="clean"> 25, </key>\r
-<key name="clear"> 14, </key>\r
-<key name="clearall"> 16, </key>\r
-<key name="click"> 5,6,0,7,1,8,23,12,24,13,25,16,14,17,26,18,27,19,20,21,22,28, </key>\r
-<key name="clickabl"> 12, </key>\r
-<key name="client"> 3, </key>\r
-<key name="clip"> 24,25, </key>\r
-<key name="clon"> 24, </key>\r
-<key name="clos"> 3,12,25,14,17,27,20, </key>\r
-<key name="cluster"> 3, </key>\r
-<key name="cod"> 3,14, </key>\r
-<key name="coef"> 23, </key>\r
-<key name="coincid"> 14, </key>\r
-<key name="collect"> 14, </key>\r
-<key name="color"> 1,23,25,26,18,28, </key>\r
-<key name="column"> 18,21,22, </key>\r
-<key name="combin"> 11,25, </key>\r
-<key name="comfortabl"> 16, </key>\r
-<key name="comma"> 14, </key>\r
-<key name="command"> 3,0,15,14, </key>\r
-<key name="common"> 2,11,16,14,17,27, </key>\r
-<key name="compar"> 3,23, </key>\r
-<key name="compil"> 14, </key>\r
-<key name="complet"> 8,14,20,22, </key>\r
-<key name="complex"> 3,10, </key>\r
-<key name="component"> 3,4,0,7,10,2,11,12,13,25,16,17,18,19,21,22, </key>\r
-<key name="compos"> 25, </key>\r
-<key name="comput"> 14,18, </key>\r
-<key name="computation"> 3,10, </key>\r
-<key name="computational"> 10, </key>\r
-<key name="concept"> 3,12, </key>\r
-<key name="concern"> 10,14, </key>\r
-<key name="conclusion"> 3, </key>\r
-<key name="config"> 14, </key>\r
-<key name="config_fil"> 14, </key>\r
-<key name="config_mandrake_10"> 14, </key>\r
-<key name="configur"> 10,14, </key>\r
-<key name="configurabl"> 11, </key>\r
-<key name="configuration"> 14, </key>\r
-<key name="confirm"> 0,14, </key>\r
-<key name="confirmation"> 14, </key>\r
-<key name="conflict"> 14, </key>\r
-<key name="connect"> 9,11,13,16,18, </key>\r
-<key name="consist"> 16, </key>\r
-<key name="consol"> 6,10,15,16,14,17,18, </key>\r
-<key name="constant"> 3,15, </key>\r
-<key name="construction"> 10,11,24, </key>\r
-<key name="consum"> 0,14, </key>\r
-<key name="contain"> 3,4,5,0,8,13,15,16,14,27,19,20,21,22, </key>\r
-<key name="container"> 15, </key>\r
-<key name="content"> 0,24,25,14,20,28, </key>\r
-<key name="context"> 16,14,21, </key>\r
-<key name="continu"> 14, </key>\r
-<key name="control"> 5,23,25, </key>\r
-<key name="convert"> 0,14, </key>\r
-<key name="cooperat"> 11, </key>\r
-<key name="coordinat"> 24,18,28, </key>\r
-<key name="copi"> 25, </key>\r
-<key name="copy"> 7,16,14,17, </key>\r
-<key name="copyright"> 14, </key>\r
-<key name="corba"> 3,5,2,15, </key>\r
-<key name="corn"> 25,17,26, </key>\r
-<key name="correct"> 16, </key>\r
-<key name="correspond"> 23,13,25,15,14,20, </key>\r
-<key name="cost"> 10, </key>\r
-<key name="coupl"> 3,10, </key>\r
-<key name="cpp"> 15, </key>\r
-<key name="cppcontain"> 15, </key>\r
-<key name="creat"> 3,4,5,6,0,9,10,2,11,23,24,13,25,15,16,14,17,18,19,21, </key>\r
-<key name="creation"> 3,2,25,14, </key>\r
-<key name="cros"> 12,24,17, </key>\r
-<key name="csh"> 15,14, </key>\r
-<key name="cshell"> 15, </key>\r
-<key name="ctrl"> 25, </key>\r
-<key name="current"> 6,0,8,12,24,25,15,14,17,18,27,21,22, </key>\r
-<key name="cursor"> 25, </key>\r
-<key name="curv"> 25,18, </key>\r
-<key name="custom"> 10,15,26,18,19, </key>\r
-<key name="customiz"> 14, </key>\r
-<key name="customization"> 3,14, </key>\r
-<key name="cut"> 25, </key>\r
-<key name="cutlin"> 25, </key>\r
-<key name="cycl"> 25, </key>\r
-<key name="cyrillic"> 26, </key>\r
-<key name="d"> 14, </key>\r
-<key name="dat"> 8,22, </key>\r
-<key name="data"> 3,5,0,9,10,2,11,25,17,18,19, </key>\r
-<key name="databas"> 3, </key>\r
-<key name="debug"> 21, </key>\r
-<key name="decreas"> 25, </key>\r
-<key name="default"> 5,1,23,24,25,15,16,14,17,18,27,21,28, </key>\r
-<key name="defin"> 3,0,1,10,23,24,25,14,26,28, </key>\r
-<key name="definit"> 3,5,7,15,16,21,22, </key>\r
-<key name="definition"> 3,1,10,20, </key>\r
-<key name="deform"> 28, </key>\r
-<key name="delay"> 10, </key>\r
-<key name="delet"> 17, </key>\r
-<key name="demand"> 10,2,25, </key>\r
-<key name="depend"> 7,25,14,21, </key>\r
-<key name="dependanci"> 14, </key>\r
-<key name="dependenci"> 14, </key>\r
-<key name="deriv"> 3, </key>\r
-<key name="describ"> 3,4,14,19, </key>\r
-<key name="description"> 15,14,19, </key>\r
-<key name="design"> 10,25, </key>\r
-<key name="desir"> 19, </key>\r
-<key name="desktop"> 6,9,2,16,14,17, </key>\r
-<key name="destin"> 9,16,21,22, </key>\r
-<key name="destination"> 12,14, </key>\r
-<key name="detail"> 14,18, </key>\r
-<key name="develop"> 3,24,14, </key>\r
-<key name="development"> 3,10, </key>\r
-<key name="devic"> 25, </key>\r
-<key name="diagram"> 23, </key>\r
-<key name="dialog"> 0,1,8,23,13,25,16,14,17,26,18,27,19,22, </key>\r
-<key name="dif"> 14, </key>\r
-<key name="differ"> 16, </key>\r
-<key name="differenc"> 3,16,14,17, </key>\r
-<key name="different"> 3,4,5,9,13,25,15,16,14,17,21, </key>\r
-<key name="digit"> 23, </key>\r
-<key name="digital"> 10, </key>\r
-<key name="dir"> 14, </key>\r
-<key name="direct"> 14, </key>\r
-<key name="direction"> 6,24,25, </key>\r
-<key name="directori"> 14,18, </key>\r
-<key name="directory"> 15,14,17,18,27,19, </key>\r
-<key name="disabl"> 25,15,14, </key>\r
-<key name="disable_flag"> 14, </key>\r
-<key name="disk"> 15,14, </key>\r
-<key name="display"> 6,1,23,12,24,25,15,16,14,17,18,20,21,22,28, </key>\r
-<key name="distanc"> 25,28, </key>\r
-<key name="distinction"> 3, </key>\r
-<key name="distribut"> 3, </key>\r
-<key name="distribution"> 14, </key>\r
-<key name="divid"> 4,25,22, </key>\r
-<key name="do"> 7,14, </key>\r
-<key name="dockabl"> 6,2,16,17, </key>\r
-<key name="document"> 5,0,9,16,14, </key>\r
-<key name="doesn"> 24, </key>\r
-<key name="domain"> 3,11, </key>\r
-<key name="dominant"> 25, </key>\r
-<key name="don"> 24,25,14,19,28, </key>\r
-<key name="dot"> 14, </key>\r
-<key name="doubl"> 22, </key>\r
-<key name="down"> 8,12, </key>\r
-<key name="downward"> 24,28, </key>\r
-<key name="doxygen"> 14, </key>\r
-<key name="drag"> 24,16,28, </key>\r
-<key name="dramatical"> 3, </key>\r
-<key name="drawn"> 24,28, </key>\r
-<key name="driv"> 14, </key>\r
-<key name="drop"> 12,16, </key>\r
-<key name="dump"> 0,24,28, </key>\r
-<key name="dumpversion"> 14, </key>\r
-<key name="duplicat"> 24, </key>\r
-<key name="dynamic"> 2, </key>\r
-<key name="dynamical"> 11,25, </key>\r
-<key name="e"> 2,15,16,14,17, </key>\r
-<key name="easi"> 3,10, </key>\r
-<key name="easy"> 3, </key>\r
-<key name="economical"> 3, </key>\r
-<key name="edg"> 1,23, </key>\r
-<key name="edit"> 7,8,2,25,15,14, </key>\r
-<key name="editabl"> 25, </key>\r
-<key name="edition"> 25, </key>\r
-<key name="editor"> 27, </key>\r
-<key name="efficient"> 10, </key>\r
-<key name="eith"> 25,14,26,18,19, </key>\r
-<key name="electrical"> 10, </key>\r
-<key name="electronic"> 10, </key>\r
-<key name="element"> 10,23,25, </key>\r
-<key name="embed"> 15, </key>\r
-<key name="empty"> 6, </key>\r
-<key name="enabl"> 14,18,20, </key>\r
-<key name="encourag"> 3, </key>\r
-<key name="end"> 3,25,14,18,27, </key>\r
-<key name="enforc"> 3, </key>\r
-<key name="engin"> 3, </key>\r
-<key name="enough"> 14, </key>\r
-<key name="ensur"> 3,10, </key>\r
-<key name="ent"> 8,15,14,17, </key>\r
-<key name="enter"> 14, </key>\r
-<key name="entity"> 23, </key>\r
-<key name="entry"> 18,21, </key>\r
-<key name="env_"> 14, </key>\r
-<key name="env_build"> 14, </key>\r
-<key name="env_for_launch"> 14, </key>\r
-<key name="env_product"> 14, </key>\r
-<key name="env_vtk"> 14, </key>\r
-<key name="environment"> 3,6,9,10,2,15,14, </key>\r
-<key name="environmentpleas"> 14, </key>\r
-<key name="equal"> 3,14, </key>\r
-<key name="equipment"> 10, </key>\r
-<key name="error"> 0,14, </key>\r
-<key name="etc"> 3,2,11,25,16,14, </key>\r
-<key name="ev"> 22, </key>\r
-<key name="even"> 3,16,14, </key>\r
-<key name="every"> 10,25,20, </key>\r
-<key name="everyth"> 14, </key>\r
-<key name="evolution"> 10, </key>\r
-<key name="evolv"> 3, </key>\r
-<key name="ex"> 15, </key>\r
-<key name="exact"> 25,14, </key>\r
-<key name="examl"> 14, </key>\r
-<key name="exampl"> 6,10,16,14,17,19, </key>\r
-<key name="exceed"> 25, </key>\r
-<key name="except"> 14,28, </key>\r
-<key name="exception"> 2,15,14, </key>\r
-<key name="exchang"> 3, </key>\r
-<key name="execut"> 14, </key>\r
-<key name="executabl"> 14, </key>\r
-<key name="execution"> 10,11, </key>\r
-<key name="exist"> 3,11,13,14,17,27,19, </key>\r
-<key name="existenc"> 14, </key>\r
-<key name="expand"> 12, </key>\r
-<key name="expandability"> 3, </key>\r
-<key name="expectation"> 10, </key>\r
-<key name="experienc"> 14, </key>\r
-<key name="expert"> 0, </key>\r
-<key name="exploit"> 3, </key>\r
-<key name="explor"> 4, </key>\r
-<key name="export"> 10,23,24,28, </key>\r
-<key name="expos"> 3, </key>\r
-<key name="extend"> 24,26,28, </key>\r
-<key name="extension"> 17,27, </key>\r
-<key name="external"> 14,18, </key>\r
-<key name="extract"> 14, </key>\r
-<key name="extreme"> 10, </key>\r
-<key name="f"> 15,14, </key>\r
-<key name="fac"> 23,25,18, </key>\r
-<key name="facilitat"> 3,11, </key>\r
-<key name="fact"> 16, </key>\r
-<key name="factory"> 19, </key>\r
-<key name="fail"> 14, </key>\r
-<key name="fals"> 14, </key>\r
-<key name="famili"> 25, </key>\r
-<key name="featur"> 4,25,14, </key>\r
-<key name="feel"> 14, </key>\r
-<key name="field"> 8,10,23,25,14,26, </key>\r
-<key name="fig"> 14, </key>\r
-<key name="figur"> 1,14, </key>\r
-<key name="fil"> 5,0,8,11,13,25,15,16,14,17,18,27,19, </key>\r
-<key name="fill"> 23, </key>\r
-<key name="final"> 14, </key>\r
-<key name="find"> 14,19,20, </key>\r
-<key name="find_in_path"> 14, </key>\r
-<key name="fine"> 3, </key>\r
-<key name="finish"> 12,25,14, </key>\r
-<key name="finit"> 10, </key>\r
-<key name="first"> 0,25,14,18,21, </key>\r
-<key name="fit"> 24,18,28, </key>\r
-<key name="flag"> 14, </key>\r
-<key name="flexibility"> 3,0, </key>\r
-<key name="flexibl"> 10,2,14, </key>\r
-<key name="focal"> 25, </key>\r
-<key name="focu"> 12, </key>\r
-<key name="fold"> 14,17,21, </key>\r
-<key name="folder"> 14, </key>\r
-<key name="follow"> 3,0,8,9,12,13,15,16,14,17,18,27,19,20,22, </key>\r
-<key name="font"> 23,25,14,26,18,28, </key>\r
-<key name="forc"> 14, </key>\r
-<key name="forget"> 19, </key>\r
-<key name="formal"> 14, </key>\r
-<key name="format"> 4,10,24,13,18,28, </key>\r
-<key name="forth"> 25, </key>\r
-<key name="fp"> 25, </key>\r
-<key name="fram"> 24,25,14,28, </key>\r
-<key name="framework"> 2, </key>\r
-<key name="fre"> 1,10,25, </key>\r
-<key name="friend"> 10, </key>\r
-<key name="ful"> 25, </key>\r
-<key name="fulfill"> 0, </key>\r
-<key name="full"> 25,20, </key>\r
-<key name="function"> 0,10,11,16,14,17, </key>\r
-<key name="function_nam"> 14, </key>\r
-<key name="functional"> 16, </key>\r
-<key name="functionaliti"> 10,24,28, </key>\r
-<key name="functionality"> 3,4,7,9,24,16,19,28, </key>\r
-<key name="fundamental"> 3, </key>\r
-<key name="furth"> 14, </key>\r
-<key name="g"> 15,14, </key>\r
-<key name="gap"> 23, </key>\r
-<key name="gaus"> 2,25,28, </key>\r
-<key name="gcc"> 14, </key>\r
-<key name="general"> 9,23,16,14,18, </key>\r
-<key name="generat"> 0,11,25,14,19, </key>\r
-<key name="generator"> 10,2,19, </key>\r
-<key name="generic"> 10,11, </key>\r
-<key name="geom"> 11,14, </key>\r
-<key name="geometrical"> 1,10,11,24,25, </key>\r
-<key name="geometry"> 3,1,11,24,25,16, </key>\r
-<key name="get"> 4,9,10,14,21, </key>\r
-<key name="giv"> 0,8,16,14,26, </key>\r
-<key name="given"> 11,25,14, </key>\r
-<key name="gl"> 25, </key>\r
-<key name="global"> 24,25,28, </key>\r
-<key name="glossary"> 20, </key>\r
-<key name="go"> 12,14, </key>\r
-<key name="good"> 24, </key>\r
-<key name="graduat"> 28, </key>\r
-<key name="graph"> 6,11,18, </key>\r
-<key name="graphic"> 25, </key>\r
-<key name="graphical"> 0,2, </key>\r
-<key name="graphviz"> 14, </key>\r
-<key name="great"> 0,24,25,28, </key>\r
-<key name="greek"> 26, </key>\r
-<key name="group"> 23,24,25,26, </key>\r
-<key name="gui"> 3,5,0,2,11,15,14,17,18,27, </key>\r
-<key name="guid"> 14, </key>\r
-<key name="h"> 15,14, </key>\r
-<key name="half"> 25, </key>\r
-<key name="hand"> 3,12,20, </key>\r
-<key name="handl"> 10,2,15, </key>\r
-<key name="hard"> 15,14, </key>\r
-<key name="hasn"> 17, </key>\r
-<key name="hav"> 11,12,21, </key>\r
-<key name="haven"> 18, </key>\r
-<key name="hdf"> 13,14,17,18, </key>\r
-<key name="hdf5"> 14, </key>\r
-<key name="hdf5hom"> 14, </key>\r
-<key name="heal"> 10, </key>\r
-<key name="height"> 23,25, </key>\r
-<key name="hello"> 22, </key>\r
-<key name="help"> 3,4,10,12,13,15,14,18,20,21, </key>\r
-<key name="helpful"> 14, </key>\r
-<key name="her"> 23,25,14,18, </key>\r
-<key name="heterogeneou"> 10, </key>\r
-<key name="hid"> 24,25,16,18,21,28, </key>\r
-<key name="high"> 10, </key>\r
-<key name="highlight"> 23,14,21, </key>\r
-<key name="history"> 22, </key>\r
-<key name="hom"> 14,27, </key>\r
-<key name="hop"> 14, </key>\r
-<key name="horizontal"> 6,23,25,18, </key>\r
-<key name="host"> 3, </key>\r
-<key name="hotspot"> 12, </key>\r
-<key name="hour"> 14, </key>\r
-<key name="how"> 3,14, </key>\r
-<key name="hpp"> 14, </key>\r
-<key name="html"> 4,20, </key>\r
-<key name="hxx"> 14, </key>\r
-<key name="i"> 2,15,16,17, </key>\r
-<key name="icon"> 5,7,16,19, </key>\r
-<key name="idea"> 14, </key>\r
-<key name="identification"> 21,22, </key>\r
-<key name="identify"> 14, </key>\r
-<key name="idl"> 3,19, </key>\r
-<key name="ie"> 18, </key>\r
-<key name="if"> 5,6,0,7,23,24,13,25,15,16,14,17,18,19,21,28, </key>\r
-<key name="ig"> 10, </key>\r
-<key name="ignor"> 14, </key>\r
-<key name="imag"> 10,24,25,28, </key>\r
-<key name="immediate"> 12, </key>\r
-<key name="implement"> 3,14, </key>\r
-<key name="implementation"> 3,14,19, </key>\r
-<key name="import"> 0,10,2,11,25,16,14,27, </key>\r
-<key name="important"> 14, </key>\r
-<key name="impos"> 25, </key>\r
-<key name="improv"> 2,14, </key>\r
-<key name="includ"> 12,25,14,20, </key>\r
-<key name="inclusiv"> 3, </key>\r
-<key name="increas"> 0,10,25, </key>\r
-<key name="increment"> 1,25, </key>\r
-<key name="incremental"> 3, </key>\r
-<key name="independenc"> 3, </key>\r
-<key name="independent"> 3, </key>\r
-<key name="index"> 23,21, </key>\r
-<key name="indicat"> 16,17, </key>\r
-<key name="information"> 3,8,12,25,14,17,20,22, </key>\r
-<key name="initial"> 9, </key>\r
-<key name="input"> 10,19, </key>\r
-<key name="insid"> 3,6,12,25,19, </key>\r
-<key name="inspect"> 25,14, </key>\r
-<key name="instal"> 14,19, </key>\r
-<key name="instalation"> 14, </key>\r
-<key name="install"> 15,14, </key>\r
-<key name="install_binary"> 14, </key>\r
-<key name="install_disk_spac"> 14, </key>\r
-<key name="install_sourc"> 14, </key>\r
-<key name="install_source_and_build"> 14, </key>\r
-<key name="install_wizard_caption"> 14, </key>\r
-<key name="install_wizard_copyright"> 14, </key>\r
-<key name="install_wizard_license_info"> 14, </key>\r
-<key name="install_wizard_root_directory"> 14, </key>\r
-<key name="install_wizard_version"> 14, </key>\r
-<key name="installation"> 15,14, </key>\r
-<key name="installation_mod"> 14, </key>\r
-<key name="installation_script_nam"> 14, </key>\r
-<key name="installdiskspac"> 14, </key>\r
-<key name="installwizard_root_directory"> 14, </key>\r
-<key name="installworkxxxxx"> 14, </key>\r
-<key name="instanc"> 5, </key>\r
-<key name="instruction"> 14, </key>\r
-<key name="instrumental"> 3, </key>\r
-<key name="integ"> 14, </key>\r
-<key name="integer"> 23, </key>\r
-<key name="integrat"> 3,10,2,11, </key>\r
-<key name="integration"> 3,10,2,19, </key>\r
-<key name="interaction"> 2, </key>\r
-<key name="interfac"> 3,0,10,2,16,19, </key>\r
-<key name="interior"> 23, </key>\r
-<key name="internal"> 3,14, </key>\r
-<key name="internet"> 4, </key>\r
-<key name="interoperability"> 10, </key>\r
-<key name="interoperabl"> 21, </key>\r
-<key name="interp"> 15, </key>\r
-<key name="interpret"> 2,16, </key>\r
-<key name="interval"> 25,22, </key>\r
-<key name="introduction"> 10,2,11,14, </key>\r
-<key name="invalid"> 17, </key>\r
-<key name="invert"> 24,25, </key>\r
-<key name="invok"> 16,14, </key>\r
-<key name="ior"> 18,21, </key>\r
-<key name="isolat"> 1, </key>\r
-<key name="isolin"> 1,18, </key>\r
-<key name="isometric"> 24,28, </key>\r
-<key name="item"> 8,10,2, </key>\r
-<key name="iteration"> 25, </key>\r
-<key name="itself"> 14, </key>\r
-<key name="java"> 4, </key>\r
-<key name="jpeg"> 24,28, </key>\r
-<key name="jpg"> 24,28, </key>\r
-<key name="just"> 14,18, </key>\r
-<key name="k"> 15, </key>\r
-<key name="kbyt"> 14, </key>\r
-<key name="kernel"> 11,15,14, </key>\r
-<key name="key"> 25,14, </key>\r
-<key name="keyboard"> 25, </key>\r
-<key name="kill"> 15, </key>\r
-<key name="killall"> 15, </key>\r
-<key name="kind"> 8,12, </key>\r
-<key name="know"> 19, </key>\r
-<key name="knowledg"> 0, </key>\r
-<key name="l"> 15, </key>\r
-<key name="label"> 23,25,14,28, </key>\r
-<key name="languag"> 3, </key>\r
-<key name="larg"> 14, </key>\r
-<key name="largest"> 25, </key>\r
-<key name="last"> 14,18,22, </key>\r
-<key name="latest"> 25, </key>\r
-<key name="latin"> 26, </key>\r
-<key name="launch"> 4,0,13,15,14,27,19,22, </key>\r
-<key name="lay"> 5, </key>\r
-<key name="layout"> 0,17, </key>\r
-<key name="ld_library_path"> 14, </key>\r
-<key name="lead"> 17, </key>\r
-<key name="learn"> 10,14, </key>\r
-<key name="left"> 23,24,25,14,26,18,20,28, </key>\r
-<key name="legend"> 18, </key>\r
-<key name="length"> 25,28, </key>\r
-<key name="les"> 25, </key>\r
-<key name="level"> 3,23,25, </key>\r
-<key name="lib"> 14, </key>\r
-<key name="libcosnotify4"> 14, </key>\r
-<key name="libhdf5"> 14, </key>\r
-<key name="libm"> 14, </key>\r
-<key name="libomniorb4"> 14, </key>\r
-<key name="librari"> 14, </key>\r
-<key name="library"> 2,14, </key>\r
-<key name="libvtkcommon"> 14, </key>\r
-<key name="licens"> 14, </key>\r
-<key name="lik"> 3,6,12,25,16,14,17,19,21, </key>\r
-<key name="like"> 14, </key>\r
-<key name="limit"> 25, </key>\r
-<key name="limitation"> 25, </key>\r
-<key name="lin"> 4,1,23,25,15,14,18, </key>\r
-<key name="linear"> 18, </key>\r
-<key name="link"> 3,10,12, </key>\r
-<key name="linux"> 4,14, </key>\r
-<key name="list"> 8,12,25,15,14,18,20,22, </key>\r
-<key name="list_of_prerequisit"> 14, </key>\r
-<key name="ll"> 24,18,28, </key>\r
-<key name="load"> 3,0,2,13,25,15,16,18,27,21, </key>\r
-<key name="local"> 25, </key>\r
-<key name="locat"> 3,24,25,15,16,18,20,21,28, </key>\r
-<key name="location"> 0,19, </key>\r
-<key name="lock"> 8,24,25,28, </key>\r
-<key name="log"> 15,14, </key>\r
-<key name="logarithmic"> 25,18, </key>\r
-<key name="long"> 3,14, </key>\r
-<key name="look"> 14,19,20, </key>\r
-<key name="lookout"> 23,25, </key>\r
-<key name="lost"> 17, </key>\r
-<key name="lot"> 16, </key>\r
-<key name="low"> 25,14,26,20, </key>\r
-<key name="m"> 15, </key>\r
-<key name="machin"> 3,17,22, </key>\r
-<key name="macintosh"> 4, </key>\r
-<key name="macro"> 3,14, </key>\r
-<key name="magnification"> 25, </key>\r
-<key name="main"> 5,0,7,8,10,13,25,16,14,17,18,19,22, </key>\r
-<key name="major"> 14, </key>\r
-<key name="mak"> 5,10,23,14, </key>\r
-<key name="make_dir"> 14, </key>\r
-<key name="make_env"> 14, </key>\r
-<key name="manag"> 10,18, </key>\r
-<key name="management"> 10,2,16, </key>\r
-<key name="mandrak"> 14, </key>\r
-<key name="mandrake10"> 14, </key>\r
-<key name="manipulat"> 25, </key>\r
-<key name="manipulator"> 25, </key>\r
-<key name="manual"> 4,0,24,14,18,28, </key>\r
-<key name="map"> 3, </key>\r
-<key name="mark"> 24,25,14,18,28, </key>\r
-<key name="marker"> 18, </key>\r
-<key name="market"> 10, </key>\r
-<key name="massive"> 3, </key>\r
-<key name="mast"> 14, </key>\r
-<key name="match"> 20, </key>\r
-<key name="matrix"> 25, </key>\r
-<key name="max"> 25, </key>\r
-<key name="maximiz"> 5, </key>\r
-<key name="maximum"> 25, </key>\r
-<key name="mean"> 6,9,25,16,14,17, </key>\r
-<key name="mechanism"> 0,2,15, </key>\r
-<key name="med2hom"> 14, </key>\r
-<key name="meet"> 10, </key>\r
-<key name="memoris"> 24, </key>\r
-<key name="memory"> 25, </key>\r
-<key name="mention"> 14, </key>\r
-<key name="menu"> 3,5,0,7,8,2,23,12,13,25,16,17,26,18,27,19,21,22, </key>\r
-<key name="menubar"> 16, </key>\r
-<key name="mesh"> 3,10,11,23,24,25,16,14,28, </key>\r
-<key name="messag"> 8,2,15,14, </key>\r
-<key name="min"> 25, </key>\r
-<key name="minimiz"> 5, </key>\r
-<key name="minimum"> 25, </key>\r
-<key name="minor"> 14, </key>\r
-<key name="mistak"> 16, </key>\r
-<key name="mix"> 16, </key>\r
-<key name="mod"> 3,0,1,23,25,15,14, </key>\r
-<key name="model"> 3,10,11,23, </key>\r
-<key name="modern"> 10, </key>\r
-<key name="modifi"> 14, </key>\r
-<key name="modification"> 3,0,8, </key>\r
-<key name="modify"> 0,10,14, </key>\r
-<key name="modul"> 3,4,7,1,2,11,23,24,25,15,16,14,17,18,27,19,28, </key>\r
-<key name="module1"> 15, </key>\r
-<key name="module2"> 15, </key>\r
-<key name="modulecatalog"> 15, </key>\r
-<key name="modulu"> 25, </key>\r
-<key name="moment"> 25,14, </key>\r
-<key name="momentari"> 25, </key>\r
-<key name="mous"> 23,24,25,16,28, </key>\r
-<key name="mov"> 6, </key>\r
-<key name="movement"> 25, </key>\r
-<key name="mozilla"> 18, </key>\r
-<key name="msg2qm"> 14, </key>\r
-<key name="msg2qm_root"> 14, </key>\r
-<key name="much"> 14, </key>\r
-<key name="multi"> 6,9,10,2,16,19, </key>\r
-<key name="multifil"> 17,18, </key>\r
-<key name="multipl"> 17, </key>\r
-<key name="multipli"> 25, </key>\r
-<key name="multiti"> 3, </key>\r
-<key name="must"> 3,10,11, </key>\r
-<key name="n"> 25,15,14, </key>\r
-<key name="nam"> 3,5,0,8,14,17,19,21,22,28, </key>\r
-<key name="nativ"> 14, </key>\r
-<key name="natur"> 7, </key>\r
-<key name="natural"> 3, </key>\r
-<key name="navigat"> 12,14, </key>\r
-<key name="navigation"> 4,12,25, </key>\r
-<key name="navigator"> 4, </key>\r
-<key name="ne"> 6,12,14,26,18, </key>\r
-<key name="necessary"> 0,23,15,16,14,17,21, </key>\r
-<key name="need"> 25, </key>\r
-<key name="negativ"> 25, </key>\r
-<key name="netgen"> 14, </key>\r
-<key name="netgenroot"> 14, </key>\r
-<key name="netscap"> 4,18, </key>\r
-<key name="new"> 3,5,8,9,10,24,25,14,17,18,27,19, </key>\r
-<key name="next"> 8,15,14,27,19, </key>\r
-<key name="nod"> 23,19, </key>\r
-<key name="normal"> 6, </key>\r
-<key name="not"> 15,14, </key>\r
-<key name="notation"> 14, </key>\r
-<key name="noticeab"> 3, </key>\r
-<key name="notifd"> 14, </key>\r
-<key name="notification"> 27, </key>\r
-<key name="notify"> 25, </key>\r
-<key name="notion"> 9, </key>\r
-<key name="now"> 16, </key>\r
-<key name="nth"> 25, </key>\r
-<key name="null"> 25, </key>\r
-<key name="numb"> 11,23,25,15,14,18,27,22,28, </key>\r
-<key name="number"> 23,25,14, </key>\r
-<key name="numeric"> 10,11,14,26, </key>\r
-<key name="numerical"> 3,9,10, </key>\r
-<key name="numerou"> 15, </key>\r
-<key name="object"> 3,5,6,0,7,2,23,24,13,25,16,17,18,27,21,28, </key>\r
-<key name="objectiv"> 3, </key>\r
-<key name="obligatory"> 14, </key>\r
-<key name="observ"> 25, </key>\r
-<key name="occ"> 5,6,2,24,18, </key>\r
-<key name="occ_version_maintenanc"> 14, </key>\r
-<key name="occ_version_major"> 14, </key>\r
-<key name="occ_version_minor"> 14, </key>\r
-<key name="occupi"> 14, </key>\r
-<key name="occur"> 14, </key>\r
-<key name="off"> 14, </key>\r
-<key name="offer"> 3, </key>\r
-<key name="offic"> 14, </key>\r
-<key name="official"> 14, </key>\r
-<key name="offset"> 28, </key>\r
-<key name="often"> 10, </key>\r
-<key name="ok"> 13,14,27, </key>\r
-<key name="omg"> 3, </key>\r
-<key name="omninotify"> 14, </key>\r
-<key name="omniorb"> 14, </key>\r
-<key name="omniorbdir"> 14, </key>\r
-<key name="omniorbpy"> 14, </key>\r
-<key name="on"> 3,6,0,7,2,12,13,25,15,16,14,17,26,18,27,19, </key>\r
-<key name="onc"> 25, </key>\r
-<key name="onlin"> 20, </key>\r
-<key name="opaqu"> 25, </key>\r
-<key name="open"> 6,0,9,10,11,12,24,13,25,15,14,17,19,20, </key>\r
-<key name="operat"> 0, </key>\r
-<key name="operation"> 7,9,23,25,14,17, </key>\r
-<key name="optimiz"> 10,25,14, </key>\r
-<key name="optimization"> 11, </key>\r
-<key name="option"> 7,8,13,25,15,16,14,17,18,21, </key>\r
-<key name="optional"> 10,11,14, </key>\r
-<key name="ord"> 14, </key>\r
-<key name="ordinat"> 23,25, </key>\r
-<key name="org"> 3, </key>\r
-<key name="orientat"> 24,28, </key>\r
-<key name="orientation"> 23,24,25, </key>\r
-<key name="origin"> 23,24,25,28, </key>\r
-<key name="original"> 0, </key>\r
-<key name="originality"> 11, </key>\r
-<key name="os"> 14, </key>\r
-<key name="os_version"> 14, </key>\r
-<key name="other"> 4,0, </key>\r
-<key name="otherwis"> 0,25,14,17, </key>\r
-<key name="out"> 10,23,24,26,28, </key>\r
-<key name="outlin"> 23, </key>\r
-<key name="output"> 2,14, </key>\r
-<key name="outsid"> 25,16, </key>\r
-<key name="overrid"> 14, </key>\r
-<key name="overridden"> 14, </key>\r
-<key name="own"> 2,11,16,14, </key>\r
-<key name="p"> 15, </key>\r
-<key name="packag"> 15,14,19, </key>\r
-<key name="pag"> 14,20, </key>\r
-<key name="pan"> 12,24,17,20,28, </key>\r
-<key name="parallel"> 3, </key>\r
-<key name="paramet"> 14,19, </key>\r
-<key name="parameter"> 3,25,26,18,19,28, </key>\r
-<key name="parent"> 25, </key>\r
-<key name="part"> 6,24,16,14,28, </key>\r
-<key name="particular"> 10,17, </key>\r
-<key name="party"> 11,14, </key>\r
-<key name="past"> 7,16, </key>\r
-<key name="patch"> 14, </key>\r
-<key name="patent"> 25, </key>\r
-<key name="path"> 25,14, </key>\r
-<key name="pc"> 3, </key>\r
-<key name="per"> 25, </key>\r
-<key name="perform"> 10,11,23,24,25,14,28, </key>\r
-<key name="performanc"> 3,9,10,25,14, </key>\r
-<key name="period"> 25, </key>\r
-<key name="permission"> 14, </key>\r
-<key name="phenomena"> 3, </key>\r
-<key name="phras"> 20, </key>\r
-<key name="physic"> 10, </key>\r
-<key name="physical"> 3,10,11, </key>\r
-<key name="pick"> 25,14, </key>\r
-<key name="pickup"> 14, </key>\r
-<key name="pickup_env"> 14, </key>\r
-<key name="pickup_env_flag"> 14, </key>\r
-<key name="pickupenv"> 14, </key>\r
-<key name="pictur"> 8, </key>\r
-<key name="pid"> 22, </key>\r
-<key name="piec"> 3, </key>\r
-<key name="pixel"> 25, </key>\r
-<key name="plac"> 6,2,24,16,14,28, </key>\r
-<key name="placement"> 23,25, </key>\r
-<key name="plan"> 24,14, </key>\r
-<key name="platform"> 3,4,6,0,9,10,2,11,15,16,14,17,19,22, </key>\r
-<key name="play"> 0, </key>\r
-<key name="pleas"> 14, </key>\r
-<key name="plot"> 6,2,25, </key>\r
-<key name="plot2d"> 5,18, </key>\r
-<key name="plug"> 2, </key>\r
-<key name="png"> 24,28, </key>\r
-<key name="po"> 14, </key>\r
-<key name="point"> 3,1,2,23,24,25,14,18,28, </key>\r
-<key name="pop"> 12,13,16,21, </key>\r
-<key name="popup"> 12, </key>\r
-<key name="port"> 15, </key>\r
-<key name="portkill"> 15, </key>\r
-<key name="position"> 24,25,16,17,18,28, </key>\r
-<key name="positive"> 16, </key>\r
-<key name="possibility"> 3,0,15,14,26,19, </key>\r
-<key name="possibl"> 3,0,16,14,17,26,21, </key>\r
-<key name="post"> 3,10,11,25,16,17,28, </key>\r
-<key name="powerful"> 2, </key>\r
-<key name="pr"> 10,11,14, </key>\r
-<key name="precision"> 23, </key>\r
-<key name="precompil"> 14, </key>\r
-<key name="predefin"> 3,14,26, </key>\r
-<key name="preferabl"> 15, </key>\r
-<key name="preferenc"> 1,23,25,26,18,27,21, </key>\r
-<key name="preinstal"> 14, </key>\r
-<key name="prerequisit"> 14, </key>\r
-<key name="pres"> 24,25,14,18,28, </key>\r
-<key name="preselect"> 23, </key>\r
-<key name="preselection"> 23, </key>\r
-<key name="present"> 23,25, </key>\r
-<key name="presentation"> 5,23,25,16,18,28, </key>\r
-<key name="prevent"> 25, </key>\r
-<key name="preview"> 24,25,26, </key>\r
-<key name="previou"> 13,14, </key>\r
-<key name="previous"> 11,13,25,14,17, </key>\r
-<key name="primitiv"> 25, </key>\r
-<key name="print"> 15,14, </key>\r
-<key name="print_env"> 14, </key>\r
-<key name="priority"> 10, </key>\r
-<key name="pro"> 3,11,25,16,17,28, </key>\r
-<key name="probab"> 5, </key>\r
-<key name="problem"> 0,10,14, </key>\r
-<key name="proce"> 9,14, </key>\r
-<key name="procedur"> 15,14, </key>\r
-<key name="proces"> 3,0,10,2,11,25,14,22, </key>\r
-<key name="processor"> 3,10, </key>\r
-<key name="produc"> 25, </key>\r
-<key name="product"> 10,15,14, </key>\r
-<key name="product_context"> 14, </key>\r
-<key name="product_description"> 14, </key>\r
-<key name="product_nam"> 14, </key>\r
-<key name="product_script_nam"> 14, </key>\r
-<key name="product_version"> 14, </key>\r
-<key name="productivity"> 3,0, </key>\r
-<key name="products_directory"> 14, </key>\r
-<key name="profil"> 15, </key>\r
-<key name="program"> 3,14, </key>\r
-<key name="programmatic"> 10, </key>\r
-<key name="progres"> 25,14, </key>\r
-<key name="progressiv"> 25, </key>\r
-<key name="prompt"> 15,14, </key>\r
-<key name="pron"> 0, </key>\r
-<key name="proper"> 14, </key>\r
-<key name="properti"> 8,10,11,25,18,28, </key>\r
-<key name="proportional"> 25, </key>\r
-<key name="propos"> 2,14, </key>\r
-<key name="provid"> 3,7,10,2,11,24,25,15,14,26,19,20,22, </key>\r
-<key name="publish"> 0,17, </key>\r
-<key name="pur"> 3, </key>\r
-<key name="purpos"> 9,21, </key>\r
-<key name="put"> 14, </key>\r
-<key name="py"> 15,14, </key>\r
-<key name="pycontain"> 15, </key>\r
-<key name="pyqt"> 14, </key>\r
-<key name="pyqtconfig"> 14, </key>\r
-<key name="pyqtdir"> 14, </key>\r
-<key name="pyramid"> 25, </key>\r
-<key name="python"> 3,6,0,10,2,15,16,14,17,18, </key>\r
-<key name="pythonhom"> 14, </key>\r
-<key name="pythonpath"> 14, </key>\r
-<key name="qglobal"> 14, </key>\r
-<key name="qm"> 14, </key>\r
-<key name="qt"> 14, </key>\r
-<key name="qt_version_str"> 14, </key>\r
-<key name="qtdir"> 14, </key>\r
-<key name="quality"> 10,23,25, </key>\r
-<key name="quantiti"> 10, </key>\r
-<key name="quick"> 14,18,21, </key>\r
-<key name="quit"> 0,14,17,27, </key>\r
-<key name="quot"> 14, </key>\r
-<key name="qwt"> 14, </key>\r
-<key name="qwt_global"> 14, </key>\r
-<key name="qwt_version_str"> 14, </key>\r
-<key name="qwthom"> 14, </key>\r
-<key name="r"> 15, </key>\r
-<key name="radio"> 14, </key>\r
-<key name="rainbow"> 25, </key>\r
-<key name="rang"> 11,25, </key>\r
-<key name="rapid"> 3, </key>\r
-<key name="rat"> 25, </key>\r
-<key name="rath"> 0, </key>\r
-<key name="ratio"> 25, </key>\r
-<key name="re"> 0,12,14, </key>\r
-<key name="reactivity"> 10, </key>\r
-<key name="read"> 10,12,14, </key>\r
-<key name="readm"> 14, </key>\r
-<key name="real"> 25, </key>\r
-<key name="realiz"> 9, </key>\r
-<key name="reason"> 14, </key>\r
-<key name="reassign"> 25, </key>\r
-<key name="receiv"> 27, </key>\r
-<key name="recommend"> 25,14, </key>\r
-<key name="record"> 8,25, </key>\r
-<key name="red"> 14,21, </key>\r
-<key name="redefin"> 28, </key>\r
-<key name="redirect"> 15, </key>\r
-<key name="reduc"> 10, </key>\r
-<key name="ref"> 14,18,27, </key>\r
-<key name="refer"> 14, </key>\r
-<key name="referenc"> 4,12,25,18,21, </key>\r
-<key name="refin"> 10,25, </key>\r
-<key name="refresh"> 22, </key>\r
-<key name="refreshment"> 22, </key>\r
-<key name="regim"> 25, </key>\r
-<key name="registry"> 2,15,22, </key>\r
-<key name="reinstal"> 14, </key>\r
-<key name="reinstall"> 14, </key>\r
-<key name="reinstallation"> 14, </key>\r
-<key name="relat"> 12,20, </key>\r
-<key name="relativ"> 23,14,18, </key>\r
-<key name="releas"> 14, </key>\r
-<key name="release_not"> 14, </key>\r
-<key name="relevant"> 12, </key>\r
-<key name="reliability"> 10, </key>\r
-<key name="reload"> 17, </key>\r
-<key name="relocat"> 16, </key>\r
-<key name="remain"> 3,24, </key>\r
-<key name="remot"> 5,24,28, </key>\r
-<key name="remov"> 24,25,14,18, </key>\r
-<key name="renam"> 17, </key>\r
-<key name="rend"> 25, </key>\r
-<key name="render"> 25, </key>\r
-<key name="reopen"> 18, </key>\r
-<key name="repeat"> 25, </key>\r
-<key name="represent"> 3,9,10,11,24,20,28, </key>\r
-<key name="representation"> 6,11,24,25,18, </key>\r
-<key name="representativ"> 25, </key>\r
-<key name="requir"> 10,13,25,14,17, </key>\r
-<key name="requirement"> 3,10,15, </key>\r
-<key name="requisit"> 14, </key>\r
-<key name="reset"> 24,14,28, </key>\r
-<key name="resiz"> 24,18,28, </key>\r
-<key name="resolution"> 25, </key>\r
-<key name="resolv"> 0, </key>\r
-<key name="resourc"> 2,25,15,14, </key>\r
-<key name="respectiv"> 1,25,27, </key>\r
-<key name="respective"> 25, </key>\r
-<key name="respond"> 3, </key>\r
-<key name="responsibl"> 14, </key>\r
-<key name="rest"> 18, </key>\r
-<key name="restart"> 14, </key>\r
-<key name="restor"> 10,24,25,17,18,27,28, </key>\r
-<key name="result"> 9,10,24,25, </key>\r
-<key name="resum"> 14, </key>\r
-<key name="retriev"> 14, </key>\r
-<key name="retroactiv"> 27, </key>\r
-<key name="return"> 24,14, </key>\r
-<key name="reus"> 3, </key>\r
-<key name="reusabl"> 10, </key>\r
-<key name="reversib"> 0,25, </key>\r
-<key name="right"> 6,12,13,25,16,14,17,26,18,20,21, </key>\r
-<key name="risk"> 10, </key>\r
-<key name="robustnes"> 10, </key>\r
-<key name="rol"> 3, </key>\r
-<key name="root"> 14, </key>\r
-<key name="rotat"> 24,25,28, </key>\r
-<key name="rotation"> 24,25,28, </key>\r
-<key name="rul"> 14, </key>\r
-<key name="run"> 3,15,14,19,22, </key>\r
-<key name="runic"> 26, </key>\r
-<key name="runinstall"> 14, </key>\r
-<key name="runsalom"> 15,19, </key>\r
-<key name="runsalomewithport"> 19, </key>\r
-<key name="s"> 3,12,15,14, </key>\r
-<key name="saf"> 2, </key>\r
-<key name="salom"> 3,4,5,6,0,7,9,10,2,11,12,13,25,15,16,14,17,18,27,19,20,21,22, </key>\r
-<key name="salome_"> 14, </key>\r
-<key name="salome_modulecatalog_serv"> 19, </key>\r
-<key name="salomeapp"> 15, </key>\r
-<key name="salomeapprc"> 27, </key>\r
-<key name="salomed"> 0, </key>\r
-<key name="sam"> 6,12,25,16,14,17,19,22, </key>\r
-<key name="sampl"> 14,26, </key>\r
-<key name="sav"> 3,0,10,2,24,16,14,17,18,27, </key>\r
-<key name="scal"> 3,25,18,28, </key>\r
-<key name="scalar"> 23,25, </key>\r
-<key name="scen"> 24,28, </key>\r
-<key name="schem"> 3,10,14, </key>\r
-<key name="schema"> 10, </key>\r
-<key name="scientific"> 3, </key>\r
-<key name="screen"> 6,15, </key>\r
-<key name="script"> 3,0,15,14,26,19, </key>\r
-<key name="scroll"> 8, </key>\r
-<key name="se"> 6,8,24,13,14,17,18,19,21,28, </key>\r
-<key name="search"> 4,13,14,17,20, </key>\r
-<key name="second"> 0,25,14, </key>\r
-<key name="section"> 24,16,14,18, </key>\r
-<key name="seen"> 23, </key>\r
-<key name="select"> 5,6,0,1,8,23,24,13,25,14,17,26,18,20,28, </key>\r
-<key name="selectall"> 16, </key>\r
-<key name="selection"> 2,23,25, </key>\r
-<key name="send"> 14, </key>\r
-<key name="sensitiv"> 16,21, </key>\r
-<key name="separat"> 3,25,16,14, </key>\r
-<key name="serv"> 3,19, </key>\r
-<key name="server"> 3,15, </key>\r
-<key name="servic"> 3,14,19, </key>\r
-<key name="session"> 1,23,13,25,15,17,18,27,21,22, </key>\r
-<key name="set"> 4,0,1,8,10,23,24,25,15,16,14,17,18,27,21,22,28, </key>\r
-<key name="setting"> 25,16,14,17,18,27, </key>\r
-<key name="sever"> 10, </key>\r
-<key name="sh"> 14, </key>\r
-<key name="shad"> 1,23,25, </key>\r
-<key name="shap"> 24,25, </key>\r
-<key name="shar"> 15, </key>\r
-<key name="shel"> 14, </key>\r
-<key name="shell"> 2,11,15,14, </key>\r
-<key name="short"> 14,20, </key>\r
-<key name="shot"> 6, </key>\r
-<key name="should"> 9,14,17,19, </key>\r
-<key name="show"> 24,25,14,28, </key>\r
-<key name="shown"> 8,14, </key>\r
-<key name="shrink"> 23, </key>\r
-<key name="sid"> 23,25,14, </key>\r
-<key name="signal"> 2,14, </key>\r
-<key name="signatur"> 14, </key>\r
-<key name="sigterm"> 14, </key>\r
-<key name="silent"> 14, </key>\r
-<key name="simp"> 14, </key>\r
-<key name="simpl"> 3, </key>\r
-<key name="simplify"> 14, </key>\r
-<key name="simulat"> 3, </key>\r
-<key name="simulation"> 10,11, </key>\r
-<key name="simultaneous"> 6,9,25,14, </key>\r
-<key name="sinc"> 2, </key>\r
-<key name="singl"> 14, </key>\r
-<key name="sip"> 14, </key>\r
-<key name="sipdir"> 14, </key>\r
-<key name="situation"> 3, </key>\r
-<key name="siz"> 6,23,25,16,17,26,18, </key>\r
-<key name="skip"> 14, </key>\r
-<key name="slow"> 25, </key>\r
-<key name="small"> 24,28, </key>\r
-<key name="smallest"> 25, </key>\r
-<key name="smooth"> 18, </key>\r
-<key name="smoothnes"> 25, </key>\r
-<key name="so"> 3,7,25,15,14,20,21, </key>\r
-<key name="softwar"> 3,10,11, </key>\r
-<key name="solution"> 10, </key>\r
-<key name="solv"> 10, </key>\r
-<key name="solver"> 10,11, </key>\r
-<key name="someth"> 14, </key>\r
-<key name="sort"> 18, </key>\r
-<key name="sort_path"> 14, </key>\r
-<key name="sourc"> 10,11,15,14, </key>\r
-<key name="spac"> 23,25,14, </key>\r
-<key name="spacemous"> 25, </key>\r
-<key name="spe"> 25, </key>\r
-<key name="special"> 3,13,25,15,16,14,17,18, </key>\r
-<key name="specifi"> 3,25, </key>\r
-<key name="specific"> 3,0,10,15,16,14,27,20, </key>\r
-<key name="specification"> 11, </key>\r
-<key name="specify"> 17,18,19, </key>\r
-<key name="spher"> 25, </key>\r
-<key name="spin"> 1, </key>\r
-<key name="splash"> 15, </key>\r
-<key name="splin"> 18, </key>\r
-<key name="split"> 6, </key>\r
-<key name="sprit"> 25, </key>\r
-<key name="stamp"> 25, </key>\r
-<key name="standalon"> 2,15, </key>\r
-<key name="standard"> 3,5,2,13,25,16,14,17,27,19, </key>\r
-<key name="standard_version"> 14, </key>\r
-<key name="start"> 6,9,25,16,14,18,27,19,22, </key>\r
-<key name="start_salom"> 14, </key>\r
-<key name="stat"> 0,14,17,18, </key>\r
-<key name="station"> 3, </key>\r
-<key name="statu"> 14, </key>\r
-<key name="step"> 1,10,25,14, </key>\r
-<key name="stop"> 14, </key>\r
-<key name="stor"> 3,0,13,14,17,18,19, </key>\r
-<key name="str"> 14, </key>\r
-<key name="stretch"> 28, </key>\r
-<key name="strict"> 24,14,28, </key>\r
-<key name="strong"> 14, </key>\r
-<key name="struck"> 26, </key>\r
-<key name="structur"> 3,10,2,13,25,14,21, </key>\r
-<key name="structural"> 10, </key>\r
-<key name="studi"> 5,6,7,9,10,2,13,16,17, </key>\r
-<key name="study"> 3,5,6,0,7,8,9,10,2,13,25,15,16,17,18,27,19,21,22, </key>\r
-<key name="study1"> 5, </key>\r
-<key name="stuf"> 28, </key>\r
-<key name="styl"> 26,18, </key>\r
-<key name="sub"> 24,14,20, </key>\r
-<key name="submenu"> 5,16,18, </key>\r
-<key name="subsequent"> 14, </key>\r
-<key name="subset"> 26, </key>\r
-<key name="substitut"> 25, </key>\r
-<key name="successful"> 14, </key>\r
-<key name="suit"> 2, </key>\r
-<key name="summariz"> 14, </key>\r
-<key name="superposition"> 25, </key>\r
-<key name="superv"> 15, </key>\r
-<key name="supervcontain"> 15, </key>\r
-<key name="supervision"> 2,15,19, </key>\r
-<key name="supervisor"> 11,18,19, </key>\r
-<key name="supplementary"> 21,22, </key>\r
-<key name="suppli"> 14, </key>\r
-<key name="support"> 10,14,19, </key>\r
-<key name="supported_installation_mod"> 14, </key>\r
-<key name="sur"> 14, </key>\r
-<key name="surfac"> 23, </key>\r
-<key name="sweep"> 25, </key>\r
-<key name="swig"> 14, </key>\r
-<key name="switch"> 6,2,25,14, </key>\r
-<key name="symbol"> 14, </key>\r
-<key name="system"> 3,4,10,12,25,14,20, </key>\r
-<key name="t"> 7,24,25,15,16,14,17,18,19,28, </key>\r
-<key name="tab"> 6,20,22, </key>\r
-<key name="tabl"> 25,26, </key>\r
-<key name="tag"> 14, </key>\r
-<key name="tailor"> 10, </key>\r
-<key name="tak"> 3,14, </key>\r
-<key name="taken"> 25,15,14, </key>\r
-<key name="target"> 14, </key>\r
-<key name="target_directory"> 14, </key>\r
-<key name="target_platform"> 14, </key>\r
-<key name="targetdir"> 14, </key>\r
-<key name="task"> 0, </key>\r
-<key name="tcl"> 14, </key>\r
-<key name="tcl_version"> 14, </key>\r
-<key name="tclconfig"> 14, </key>\r
-<key name="tclhom"> 14, </key>\r
-<key name="technologi"> 3, </key>\r
-<key name="technological"> 10, </key>\r
-<key name="technology"> 3,24, </key>\r
-<key name="temp_directory"> 14, </key>\r
-<key name="temp_fold"> 14, </key>\r
-<key name="tempdir"> 14, </key>\r
-<key name="temporary"> 14, </key>\r
-<key name="temporarydiskspac"> 14, </key>\r
-<key name="tensor"> 25, </key>\r
-<key name="term"> 10,12,20, </key>\r
-<key name="terminal"> 15,14, </key>\r
-<key name="test"> 3,14,19, </key>\r
-<key name="text"> 12,14,20, </key>\r
-<key name="textur"> 25, </key>\r
-<key name="them"> 3,6,10,23,24,15,16,14,26,22,28, </key>\r
-<key name="therefor"> 14, </key>\r
-<key name="third"> 11, </key>\r
-<key name="thos"> 14,18,20, </key>\r
-<key name="thre"> 14, </key>\r
-<key name="threshold"> 25, </key>\r
-<key name="thu"> 3,0,14, </key>\r
-<key name="tick"> 28, </key>\r
-<key name="tim"> 3,6,0,8,10,25,15,14,17,27,19,22, </key>\r
-<key name="tip"> 14, </key>\r
-<key name="titl"> 23,25,14,18, </key>\r
-<key name="tk"> 14, </key>\r
-<key name="tk_version"> 14, </key>\r
-<key name="tkconfig"> 14, </key>\r
-<key name="tmp"> 14, </key>\r
-<key name="tmp_disk_spac"> 14, </key>\r
-<key name="toggl"> 23,25,21, </key>\r
-<key name="toleranc"> 25, </key>\r
-<key name="tool"> 3,2,11,16,14,19,22, </key>\r
-<key name="toolbar"> 3,5,7,2,24,13,16,17,28, </key>\r
-<key name="toolkit"> 2,14, </key>\r
-<key name="tooltip"> 14, </key>\r
-<key name="top"> 5,2,25,16,14,18, </key>\r
-<key name="topic"> 4,12,20, </key>\r
-<key name="topmost"> 14, </key>\r
-<key name="total"> 14, </key>\r
-<key name="totality"> 3, </key>\r
-<key name="touch"> 0, </key>\r
-<key name="train"> 10, </key>\r
-<key name="transformation"> 24, </key>\r
-<key name="translat"> 25, </key>\r
-<key name="translation"> 25, </key>\r
-<key name="transparency"> 25, </key>\r
-<key name="transparent"> 25, </key>\r
-<key name="tre"> 5,14,18,19,21, </key>\r
-<key name="tri"> 14, </key>\r
-<key name="triangl"> 24,28, </key>\r
-<key name="trihedron"> 24,18,28, </key>\r
-<key name="trolltech"> 14, </key>\r
-<key name="troubl"> 14, </key>\r
-<key name="tru"> 14, </key>\r
-<key name="try"> 8,14,17,19, </key>\r
-<key name="try_exist"> 14, </key>\r
-<key name="try_nativ"> 14, </key>\r
-<key name="try_preinstal"> 14, </key>\r
-<key name="turn"> 14, </key>\r
-<key name="twic"> 25, </key>\r
-<key name="two"> 6,12,25,14,17,19, </key>\r
-<key name="typ"> 0,23,25,14,26,18,19, </key>\r
-<key name="typical"> 19, </key>\r
-<key name="u"> 18, </key>\r
-<key name="ultimat"> 3, </key>\r
-<key name="uncheck"> 24,25,16,28, </key>\r
-<key name="underlin"> 26, </key>\r
-<key name="unfortunare"> 14, </key>\r
-<key name="unfortunate"> 14, </key>\r
-<key name="uniqu"> 14, </key>\r
-<key name="unit"> 25, </key>\r
-<key name="unix"> 4, </key>\r
-<key name="unload"> 13,17, </key>\r
-<key name="unnecessary"> 14, </key>\r
-<key name="unpack"> 14, </key>\r
-<key name="unselect"> 14, </key>\r
-<key name="unus"> 0, </key>\r
-<key name="up"> 10,12,13,16,14,17,26,21, </key>\r
-<key name="updat"> 23,25,16,17,19, </key>\r
-<key name="upload"> 2,16, </key>\r
-<key name="us"> 3,0,1,8,9,10,2,11,23,24,25,15,16,14,17,26,18,27,19,20,21,22,28, </key>\r
-<key name="usability"> 2, </key>\r
-<key name="usag"> 25,14, </key>\r
-<key name="user"> 8,19, </key>\r
-<key name="usr"> 14, </key>\r
-<key name="usual"> 14, </key>\r
-<key name="utiliti"> 4, </key>\r
-<key name="v"> 14,18, </key>\r
-<key name="valid"> 18, </key>\r
-<key name="validation"> 3, </key>\r
-<key name="valu"> 1,23,25,14,18,21, </key>\r
-<key name="variabl"> 15,14, </key>\r
-<key name="variety"> 4,12, </key>\r
-<key name="variou"> 11,14, </key>\r
-<key name="ve"> 14,18, </key>\r
-<key name="vector"> 1,25, </key>\r
-<key name="version"> 6,2,16,14,27,19, </key>\r
-<key name="vertic"> 1, </key>\r
-<key name="vertical"> 6,23,25,18, </key>\r
-<key name="very"> 10,2,25,16,14, </key>\r
-<key name="via"> 24,14,28, </key>\r
-<key name="view"> 3,5,8,2,23,12,24,25,16,14,18,20,22,28, </key>\r
-<key name="viewer"> 5,6,2,11,16,17,18, </key>\r
-<key name="visibl"> 24,28, </key>\r
-<key name="visual"> 11, </key>\r
-<key name="visualisation"> 1,25, </key>\r
-<key name="visualiz"> 10,24,25,28, </key>\r
-<key name="visualization"> 9,10,2,11,16, </key>\r
-<key name="vtk"> 5,6,2,14,18,28, </key>\r
-<key name="vtkhom"> 14, </key>\r
-<key name="wait"> 14, </key>\r
-<key name="want"> 6,12,14, </key>\r
-<key name="warn"> 8,25,14, </key>\r
-<key name="way"> 11,14,19, </key>\r
-<key name="web"> 4, </key>\r
-<key name="welcom"> 4,10, </key>\r
-<key name="what"> 3,10,12,14,27,21, </key>\r
-<key name="whenev"> 23,18, </key>\r
-<key name="wherev"> 6, </key>\r
-<key name="whil"> 3, </key>\r
-<key name="whol"> 25,18,27, </key>\r
-<key name="whos"> 23, </key>\r
-<key name="why"> 14, </key>\r
-<key name="wid"> 4,11,26, </key>\r
-<key name="widget"> 11, </key>\r
-<key name="width"> 23,25, </key>\r
-<key name="will"> 4,5,0,8,23,24,13,25,15,16,14,17,26,18,27,19,21,22, </key>\r
-<key name="window"> 4,5,6,9,2,12,25,15,16,14,17,26,18,22, </key>\r
-<key name="wir"> 1, </key>\r
-<key name="wirefram"> 1,23, </key>\r
-<key name="wish"> 6,24,14,28, </key>\r
-<key name="within"> 3,5,7,22, </key>\r
-<key name="without"> 3,0,25,15,14,27, </key>\r
-<key name="wizard"> 14, </key>\r
-<key name="won"> 7,15, </key>\r
-<key name="word"> 20, </key>\r
-<key name="work"> 3,6,0,9,11,24,25,16,14,17, </key>\r
-<key name="would"> 16,17,19, </key>\r
-<key name="writ"> 10,14,17, </key>\r
-<key name="written"> 3,17, </key>\r
-<key name="wrong"> 14, </key>\r
-<key name="www"> 3, </key>\r
-<key name="x"> 23,25,15, </key>\r
-<key name="xml"> 15,14,19, </key>\r
-<key name="xterm"> 15, </key>\r
-<key name="xxxxx"> 14, </key>\r
-<key name="xy"> 25, </key>\r
-<key name="y"> 23,25, </key>\r
-<key name="year"> 10, </key>\r
-<key name="yes"> 8,14, </key>\r
-<key name="yet"> 14,18, </key>\r
-<key name="your"> 5,6,0,7,8,23,25,15,14,17,18,27,19, </key>\r
-<key name="yourselv"> 26, </key>\r
-<key name="z"> 15, </key>\r
-<key name="zon"> 5,6,25, </key>\r
-<key name="zoom"> 24,25,17,28, </key>\r
-\r
-</ftswdata> \r
+++ /dev/null
-<?xml version='1.0' encoding='windows-1252' ?>\r
-<glossarydata>\r
- <entry name="Cell" value="Element of a mesh. Cells are determined by their connectivity. They can have 0,1,2 or 3 dimension." />\r
- <entry name="Component" value="One integer or real value can correspond to each component of a field and to each entity of a mesh" />\r
- <entry name="Descendant connectivity" value="It is a description of the entities of the mesh with dimension N. This description is made by an ordered list of geometrical entities (nodes, edges, or faces) with dimension N-1." />\r
- <entry name="Edge" value="An edge of a volumetric or surface mesh. It is composed of 2 or 3 nodes (2 vertex nodes and optionally one middle node)." />\r
- <entry name="Entity of a mesh" value="Geometrical component of the mesh: node, cell, face and edge. Faces and edges are only intermediate entities allowing to define the cells in descendant connectivity." />\r
- <entry name="Equivalence" value="Equivalence represents a list of correspondance 2 by 2 of the entities of the same dimension." />\r
- <entry name="Face" value="Face of a volumetrical cell (triangle, quadrangle)." />\r
- <entry name="Family" value="Entities of a mesh are described by a certain number of characteristics (boundary conditions, groups membership). Families represent classes equivalent to these characteristics (two entities of a mesh can belong to the same family if they have the same characteristics). Every family is determined by a set of attributes and a list of groups membership." />\r
- <entry name="Field" value="Field consists of one or several scalar components. One definite type is associated to the given field and the values corresponding to different components are all of the same type." />\r
- <entry name="Field profile" value="Fields can be defined only on one part of the mesh. Profile of the field or profile of the component of a field indicates which entities of the mesh contain values." />\r
- <entry name="Group" value="Unordered set of entities of a mesh. One entity can belong to several groups." />\r
- <entry name="Mesh" value="Mesh is described by its geometry: list of nodes and list of cells which constitute this mesh. Supplementary information is added with the help of families (initial, boundary conditions)." />\r
- <entry name="Nodal connectivity" value="It is a description of an entity of the mesh by an ordered list of nodes constituting this entity." />\r
- <entry name="Node" value="Node can be an isolated node of a mesh, a vertex or middle node of an edge. A node is associated to a point." />\r
- <entry name="Point" value="Geometrical entity determined by its coordinates in the space." />\r
- <entry name="Reference connectivity" value="For each type of entity of a mesh, reference connectivity define the topology of an entity." />\r
- <entry name="Result" value="List of fields referring to one mesh." />\r
- <entry name="Study" value="Study represents a chain of sequences of calculations." />\r
-\r
-</glossarydata>\r
+++ /dev/null
-<?xml version='1.0' encoding='windows-1252' ?>\r
-<glossary>\r
-<chunkinfo url="whgdata0.xml" first="Cell" last="Study" num="18" />\r
-\r
-</glossary>
\ No newline at end of file
+++ /dev/null
-<?xml version='1.0' encoding='windows-1252' ?>\r
-<index>\r
-\r
-</index>\r
+++ /dev/null
-<?xml version='1.0' encoding='windows-1252' ?>\r
-<tocdata>\r
-<item name="Welcome to SALOME" url="kernel/introduction.htm" />\r
-<book name="Using this reference manual" >\r
- <item name="About SALOME help system" url="kernel/about_salome_pro_help_system.htm" />\r
- <item name="Navigating topics" url="kernel/navigating_topics.htm" />\r
- <item name="Using left-hand tabs" url="kernel/using_left-hand_tabs.htm" />\r
-</book>\r
-<book name="About SALOME" >\r
- <item name="Introduction to SALOME" url="kernel/introduction_to_salome_pro.htm" />\r
- <item name="SALOME architecture" url="kernel/about_salome_pro_architecture.htm" />\r
- <item name="Installing SALOME" url="kernel/readme.html" />\r
- <item name="Running SALOME" url="kernel/running_salome_pro.htm" />\r
-</book>\r
-<book name="GUI module" >\r
- <item name="Introduction to GUI" url="introduction_to_gui.htm" />\r
- <item name="Getting started" url="kernel/getting_started2.htm" />\r
- <item name="SALOME desktop" url="kernel/salome_pro_desktop.htm" />\r
- <book name="Study management" >\r
- <item name="Creating a new study" url="kernel/creating_a_new_study.htm" />\r
- <item name="Opening studies" url="kernel/opening_studies.htm" />\r
- <item name="Saving and closing studies" url="kernel/saving_a_study.htm" />\r
- <item name="Editing studies" url="kernel/editing_studies.htm" />\r
- <item name="Displaying studies" url="kernel/displaying_studies.htm" />\r
- <item name="Working with Python Scripts" url="dump_study.htm" />\r
- <item name="Setting study properties" url="kernel/getting_properties_of_the_study.htm" />\r
- </book>\r
- <item name="Using Object Browser" url="kernel/using_object_browser.htm" />\r
- <item name="Using Registry tool" url="kernel/using_registry.htm" />\r
- <item name="Using Catalog Generator" url="kernel/using_catalog_generator.htm" />\r
- <book name="Viewers" >\r
- <item name="OCC 3D Viewer" url="occ_3d_viewer.htm" />\r
- <item name="VTK 3D Viewer" url="vtk_3d_viewer.htm" />\r
- </book>\r
- <book name="Setting Preferences" >\r
- <item name="Setting Preferences" url="setting_preferences.htm" />\r
- <item name="Select Color and Font" url="select_color_and_font.htm" />\r
- <item name="SALOME preferences" url="kernel/setting_preferences.htm" />\r
- <item name="Geometry preferences" url="geom_preferences.htm" />\r
- <item name="Mesh preferences" url="mesh_preferences.htm" />\r
- <item name="Post-Pro Preferences" url="post-pro_preferences.htm" />\r
- </book>\r
-</book>\r
-\r
-</tocdata>\r
+++ /dev/null
-<?xml version='1.0' encoding='windows-1252' ?>\r
-<toc root="whtdata0.xml">\r
-\r
-</toc>\r
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vasily Rusyaev (Open Cascade NN)
-# Module : doc
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-EXTRA_DIST+=GUI
-
-doxygen=@DOXYGEN@
-
-usr_docs:
- cd ./GUI; \
- echo "Running doxygen in directory: "`pwd`; \
- $(doxygen) ./doxyfile;
-
-docs: usr_docs
-
-clean-local:
- cd ./GUI; \
- rm -fr `ls | grep -v "doxyfile"`
- rm -fr `ls | grep -vE "Makefile|GUI"`
-
-install-data-local: usr_docs
- mkdir -p $(docdir)/gui
- cp -rf GUI $(docdir)/gui
- -find $(PWD) -name CVS -prune -exec rm -rf {} \;
-
-uninstall-local:
- rm -rf $(docdir)/gui/GUI
-
-docguidir=$(docdir)/gui/GUI
-
-nodist_docgui_DATA= GUI/doxyfile
-GUI/doxyfile: GUI/doxyfile.in
-EXTRA_DIST+= GUI/doxyfile.in
\ No newline at end of file
+++ /dev/null
-# Doxyfile 1.4.6
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "SALOME - GUI - v.@VERSION@"
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = ../
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = NO
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = YES
-INLINE_INHERITED_MEMB = YES
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = ../../../share/salome \
- ../../../build/salome
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = YES
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
-INHERIT_DOCS = NO
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 5
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = YES
-OPTIMIZE_OUTPUT_JAVA = YES
-BUILTIN_STL_SUPPORT = NO
-DISTRIBUTE_GROUP_DOC = NO
-SUBGROUPING = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = YES
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = NO
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 25
-SHOW_USED_FILES = NO
-SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE = log.txt
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../../../share/salome/src \
- ../../../share/salome/bin \
- ../../../share/salome/idl \
- ../../../build/salome/bin
-FILE_PATTERNS = *.idl *.hxx *.cxx *.h *.c *.hh *.cc python_extension_must_be_here
-RECURSIVE = YES
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = YES
-IMAGE_PATH = sources/
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION = YES
-USE_HTAGS = NO
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = YES
-COLS_IN_ALPHA_INDEX = 3
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = GUI
-HTML_FILE_EXTENSION = .html
-HTML_HEADER = sources/myheader.html
-HTML_FOOTER = sources/footer.html
-HTML_STYLESHEET = sources/doxygen.css
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = YES
-TOC_EXPAND = YES
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT = rtf
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = NO
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HIDE_UNDOC_RELATIONS = NO
-HAVE_DOT = YES
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = NO
-GROUP_GRAPHS = NO
-UML_LOOK = NO
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = NO
-CALL_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = jpg
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1200
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = NO
-DOT_CLEANUP = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
+++ /dev/null
-H1 {
- text-align: center;
-}
-
-CAPTION {
- font-weight: bold
-}
-
-/* Link in the top navbar */
-A.qindex {}
-
-A.qindexRef {}
-
-/* Link to any cross-referenced Doxygen element */
-A.el {
- text-decoration: none;
- font-weight: bold
-}
-
-A.elRef {
- font-weight: bold
-}
-
-/* Link to any cross-referenced Doxygen element inside a code section
- (ex: header)
-*/
-A.code {
- text-decoration: none;
- font-weight: normal;
- color: #4444ee
-}
-
-A.codeRef {
- font-weight: normal;
- color: #4444ee
-}
-
-A:hover {
- text-decoration: none;
- background-color: lightblue
-}
-
-DL.el {
- margin-left: -1cm
-}
-
-/* A code fragment (ex: header) */
-DIV.fragment {
- width: 100%;
- border: none;
- background-color: #CCCCCC
-}
-
-/* In the alpha list (coumpound index), style of an alphabetical index letter */
-DIV.ah {
- background-color: #CCCCCC;
- font-weight: bold;
- color: #ffffff;
- margin-bottom: 3px;
- margin-top: 3px
-}
-
-/* Method name (+ type) */
-TD.md {
- background-color: lightblue;
- font-weight: bold;
-}
-
-/* Method parameter (some of them) */
-TD.mdname1 {
- background-color: lightblue;
- font-weight: bold; color: #602020;
-}
-
-/* Method parameter (some of them) */
-TD.mdname {
- background-color: lightblue;
- font-weight: bold;
- color: #602020;
- width: 600px;
-}
-
-/* Separator between methods group (usually empty, seems not supported by IE) */
-DIV.groupHeader {
- margin-left: 16px;
- margin-top: 12px;
- margin-bottom: 6px;
- font-weight: bold
-}
-
-DIV.groupText {
- margin-left: 16px;
- font-style: italic;
- font-size: smaller
-}
-
-BODY { background: #FFFFFF
-}
-
-/* BODY {
- background: url(sources/bg_salome.gif)
-} */
-
-div.tabs {
- text-align: justify;
- font-weight: bold;
- color: #FFFFFF;
-}
-
-DIV.div-footer {
- margin-left: 1em;
- margin-right: 1em;
- margin-bottom: 0.2em;
- text-align: right;
- font-size: 9pt;
-}
-
-/* In File List, Coumpound List, etc, 1st column of the index */
-TD.indexkey {
- background-color: #CCCCCC;
- font-weight: bold;
- padding-right : 10px;
- padding-top : 2px;
- padding-left : 10px;
- padding-bottom : 2px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 2px;
- margin-bottom : 2px
-}
-
-/* In File List, Coumpound List, etc, 2nd column of the index */
-TD.indexvalue {
- background-color: #CCCCCC;
- font-style: italic;
- padding-right : 10px;
- padding-top : 2px;
- padding-left : 10px;
- padding-bottom : 2px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 2px;
- margin-bottom : 2px
-}
-
-span.keyword { color: #008000 }
-span.keywordtype { color: #604020 }
-span.keywordflow { color: #e08000 }
-span.comment { color: #800000 }
-span.preprocessor { color: #806020 }
-span.stringliteral { color: #002080 }
-span.charliteral { color: #008080 }
+++ /dev/null
-</DIV>
-<DIV class="div-footer">
-Generated on $datetime for $projectname by <A href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></A> $doxygenversion</DIV>
-</BODY>
-</HTML>
+++ /dev/null
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
- <title>Main Page</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head>
-<body>
-
-</body>
-</html>
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vasily Rusyaev (Open Cascade NN)
-# Module : doc
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-EXTRA_DIST+=GUI
-
-dev_docs:
- cp -fr $(srcdir)/GUI ./INPUT; \
- cp -f ./GUI/doxyfile ./INPUT; \
- cd INPUT; \
- sed 's|../../../share/salome|$(top_srcdir)|' ./doxyfile > ./doxyfile1; \
- sed 's|../../build/salome|$(top_builddir)|' ./doxyfile1 > ./doxyfile2; \
- mv -f doxyfile2 doxyfile1; \
- echo "DOXYGEN SUPPORT PYTHON - @DOXYGEN_WITH_PYTHON@"; \
- if( test "x@DOXYGEN_WITH_PYTHON@" = "xyes"); then \
- sed 's|python_extension_must_be_here|*.py|' ./doxyfile1 > ./doxyfile2; \
- mv -f doxyfile2 doxyfile1; \
- $(DOXYGEN) -u ./doxyfile1; \
- else \
- sed 's|python_extension_must_be_here||' ./doxyfile1 > ./doxyfile2; \
- mv -f doxyfile2 doxyfile1; \
- fi; \
- if( test "x@DOXYGEN_WITH_STL@" = "xyes"); then \
- sed -e 's|BUILTIN_STL_SUPPORT = NO|BUILTIN_STL_SUPPORT = YES|' ./doxyfile1 > ./doxyfile2; \
- mv -f doxyfile2 doxyfile1; \
- fi; \
- mv -f doxyfile1 doxyfile; \
- echo "Running doxygen in directory:"`pwd`; \
- $(DOXYGEN) ./doxyfile; \
- cd ../; \
- cp -fr $(srcdir)/GUI/sources/ GUI/ ; \
- rm -fr INPUT
-
-doctuidir=$(docdir)/tui/GUI
-
-nodist_doctui_DATA= GUI/doxyfile
-EXTRA_DIST+= GUI/doxyfile.in
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
-# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
-# 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
-#
-
-#
-# This Makefile is responsible of generating the client and server
-# implementation of IDL interfaces for both C++ and python usage.
-# The building process of the C++ files is in charge of each source
-# package and then is not manage here.
-#
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-BASEIDL_FILES= SalomeApp_Engine.idl
-
-EXTRA_DIST+= $(BASEIDL_FILES)
-
-# This variable defines the files to be installed
-salomeidl_DATA = $(BASEIDL_FILES)
-
-# GUI idl common library
-lib_LTLIBRARIES = libSalomeIDLGUI.la
-
-# Sources built from idl files
-nodist_libSalomeIDLGUI_la_SOURCES= SalomeApp_EngineSK.cc
-
-# header files must be exported: other modules have to use this library
-nodist_salomeinclude_HEADERS= $(BASEIDL_FILES:%.idl=%.hh)
-
-libSalomeIDLGUI_la_CPPFLAGS =\
- -I$(top_builddir)/salome_adm/unix \
- -I$(top_builddir)/idl \
- @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @KERNEL_CXXFLAGS@
-libSalomeIDLGUI_la_LDFLAGS = -no-undefined -version-info=0:0:0
-libSalomeIDLGUI_la_LIBADD = @CORBA_LIBS@
-
-# These variables defines the building process of CORBA files
-OMNIORB_IDL = @OMNIORB_IDL@
-OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
-OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_builddir)/idl/salome -I$(KERNEL_ROOT_DIR)/idl/salome
-IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_builddir)/idl/salome -I$(KERNEL_ROOT_DIR)/idl/salome -I$(top_builddir)/salome_adm/unix
-IDLPYFLAGS = @IDLPYFLAGS@ -I$(KERNEL_ROOT_DIR)/idl/salome
-
-# potential problem on parallel make on the following - multiple outputs
-SUFFIXES = .idl .hh SK.cc
-.idlSK.cc:
- $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
-.idl.hh:
- $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
-
-install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
- $(INSTALL) -d $(pkgpythondir)
- ls $^ | while read file; do \
- $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(pkgpythondir) $$file ; \
- done
-
-# uninstall-local removes too much, but it works in distcheck
-uninstall-local:
- rm -rf $(pkgpythondir)/*
-
-mostlyclean-local:
- -rm -f *.hh *.cc .depidl
-
-# we use cpp to generate dependencies between idl files.
-# option x c tells the preprocessor to consider idl as a c file.
-# if an idl is modified, all idl dependencies are rebuilt
-
-.depidl: $(BASEIDL_FILES)
- @echo "" > $@
- @for dep in $^ dummy; do \
- if [ $$dep != "dummy" ]; then \
- echo Building dependencies for $$dep; \
- $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome $$dep 2>/dev/null | \
- sed 's/\.o/\SK.cc/' >>$@; \
- fi; \
- done ;
-
--include .depidl
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : SalomeApp_Engine.idl
-// Author : Alexander SLADKOV
-
-#ifndef __SalomeApp_Engine__
-#define __SalomeApp_Engine__
-
-#include "SALOME_Component.idl"
-#include "SALOMEDS.idl"
-
-module SalomeApp
-{
-
- /*!
- * SalomeApp::Engine: special CORBA pseudo-engine for persistance needs of components
- * with no CORBA-based Engine.
- */
- interface Engine : Engines::Component,
- SALOMEDS::Driver
- {
- };
-};
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
-# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
-# 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
-#
-# -* Makefile *-
-#
-# Author : Guillaume Boulant (CSSI)
-# Module : KERNEL
-# $Header$
-#
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-#
-# ===============================================================
-# Files to be installed
-# ===============================================================
-#
-
-DEPRECATED_FILES=\
-plot2d_settings.png \
-view_fitall.png \
-cascade.png \
-plot2d_fitarea.png \
-view_reset.png \
-save.png \
-view_back.png \
-plot2d_linear_y.png \
-plot2d_legend.png \
-paste.png \
-plot2d_fitall.png \
-view_bottom.png \
-plot2d_log_y.png \
-plot2d_log.png \
-view_triedre.png \
-view_glpan.png \
-new.png \
-copy.png \
-plot2d_linear.png \
-reset.png \
-plot2d_points.png \
-view_front.png \
-view_rotate.png \
-open.png \
-close.png \
-view_fitarea.png \
-view_top.png \
-view_camera_dump.png \
-plot2d_pan.png \
-view_left.png \
-view_zoom.png \
-view_right.png \
-plot2d_lines.png \
-plot2d_splines.png \
-plot2d_zoom.png \
-view_pan.png \
-print.png \
-help.png
-
-dist_salomeres_DATA=\
-default.png \
-uc_new.png \
-uc_add.png \
-select1.png \
-dl_delete.png \
-dl_moveup.png \
-home.xpm \
-forward.xpm \
-Tools_en.xml \
-plot2d_dump.png \
-uc_clear.png \
-dl_movedown.png \
-back.xpm \
-uc_del.png \
-uc_current.png \
-tile.png \
-dl_insert.png \
-channel.cfg \
-$(DEPRECATED_FILES)
-
-EXTRA_DIST+= Tools_fr.xml
+++ /dev/null
-<?xml version='1.0' encoding='us-ascii'?>
-<!DOCTYPE application PUBLIC "" "desktop.dtd">
-
-<!-- GUI customization -->
-
-<application
- title="SALOMEGUI Application "
- date="14 novembre 2001"
- author="Nicolas REJNERI"
- appId=""
- >
- <desktop>
- <menubar>
- <menu-item label-id="Tools" item-id="5" pos-id="">
- <popup-item item-id="5101" pos-id="2" label-id="Registry" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action="onDispatchTools" chaine="libRegistryDisplay.so"/>
- <popup-item item-id="5102" pos-id="3" label-id="Catalog Generator" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action="onDispatchTools" chaine=""/>
- </menu-item>
- </menubar>
- </desktop>
-</application>
-
+++ /dev/null
-<?xml version='1.0' encoding='us-ascii'?>
-<!DOCTYPE application PUBLIC "" "desktop.dtd">
-
-<!-- GUI customization -->
-
-<application
- title="SALOMEGUI Application "
- date="14 novembre 2001"
- author="Nicolas REJNERI"
- appId=""
- >
- <desktop>
- <menubar>
- <menu-item label-id="Tools" item-id="5" pos-id="">
- <popup-item item-id="5101" pos-id="2" label-id="Registry" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action="onDispatchTools" chaine="libRegistryDisplay.so"/>
- <popup-item item-id="5102" pos-id="3" label-id="Catalog Generator" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action="onDispatchTools" chaine=""/>
- </menu-item>
- </menubar>
- </desktop>
-</application>
-
+++ /dev/null
-/* XPM */
-/* Drawn by Mark Donohoe for the K Desktop Environment */
-/* See http://www.kde.org */
-static char*back[]={
-"16 16 5 1",
-"# c #000000",
-"a c #ffffff",
-"c c #808080",
-"b c #c0c0c0",
-". c None",
-"................",
-".......#........",
-"......##........",
-".....#a#........",
-"....#aa########.",
-"...#aabaaaaaaa#.",
-"..#aabbbbbbbbb#.",
-"...#abbbbbbbbb#.",
-"...c#ab########.",
-"....c#a#ccccccc.",
-".....c##c.......",
-"......c#c.......",
-".......cc.......",
-"........c.......",
-"................",
-"......................"};
-
+++ /dev/null
-# =================================================================
-# PARAM SETTINGS
-#
-# ** standard.cfg :
-# sets up the daemon with default params as given
-# in the CosNotification specification.
-#
-# ** channel.cfg :
-# sets up daemon with default params which we prefer.
-#
-# You can choose which one to use, or copy one and edit it
-# to suit your needs.
-#
-# There are only a couple of differences:
-#
-# standard.cfg channel.cfg
-#
-# PacingInterval 0 1000 (1 second)
-# MaximumBatchSize 1 8
-#
-
-# =================================================================
-# omniNotify Configuration (Startup) Properties
-#
-# You can modify startup properties in one of 3 ways
-#
-# 1. copy this file to create your own .cfg file and edit it. Use
-# promp> notifd -i -c myconfig.cfg
-# to start notifd using the config file myconfig.cfg
-#
-# 2. set an environment variable; this will override any
-# config file settings. e.g., for tcsh,
-# promp> setenv LocalClockTDF 0
-# promp> notifd -i -c channel.cfg
-# This uses channel.cfg but changes the time zone to GMT
-#
-# 3. use explicit command-line param definitions
-# these override both the config file and any env variable settings
-# promp> setenv LocalClockTDF 0
-# promp> notifd -i -c channel.cfg -DLocalClockTDF=-60
-# This would set the time zone to 1 hour earlier than GMT
-#
-# omniNotify manages 3 kinds of properties
-#
-# * ServerQOS properties are properties that all channels share;
-# they cannot be changed on a per-channel basis.
-#
-# * AdminQoS properties are properties that can only be
-# set at the channel factory / channel level.
-#
-# * NotifQoS properties are properties that can be set at
-# many levels: channel factory, channel, admin, proxy;
-# some of these can also be changed on a per-event basis.
-#
-# The channel factory's AdminQoS and NotifQoS property settings
-# are used as defaults: when creating a channel these property
-# values are used unless specific overrides are provided in
-# with the channel creation request. Once a channel is created,
-# its AdminQoS and NotifQoS properties can be modified; the
-# factory's properties can also be modified. Note that once a
-# channel is created, its properties are independent of the
-# factory -- modifications to the channel properties do not affect
-# the factory defaults, and modifications to the factory defaults
-# do not affect the properties of already-created channels.
-#
-# The settings specified in config files, environment
-# variables and/or command line param definitions are used to
-# set the initial values for the server's ServerQoS properties and
-# for the channel factory's AdminQoS and NotifQoS
-# default properties. Since the default channel is created on startup,
-# it also takes its AdminQoS and NotifQoS properties from
-# these initial settings.
-#
-#==================================================================
-
-#==================================================================
-# Misc Startup Properties
-# -- these are essentially ServerQoS properties,
-# but are not currently implemented that way
-#==================================================================
-
-# Names to be assigned to the channel factory and channel created by
-# the notifd channel daemon
-
-ChannelFactoryName ChannelFactory
-DefaultChannelName EventChannel
-
-# Path names of the files used to store the string representation of
-# the above channel factory IOR and channel object IOR
-
-FactoryIORFileName /tmp/rdifact.ior
-ChannelIORFileName /tmp/rdichan.ior
-
-# If a file path is given for the following parameter, the file is
-# used for storing debugging information. 'stderr' and 'stdout' can be
-# used to direct output to standard error / standard output.
-
-#DebugLogFile ./debug.log
-DebugLogFile stderr
-
-# If a file path is given for the following parameter, the file is
-# used for storing report information. 'stderr' and 'stdout' can be
-# used to direct output to standard error / standard output.
-
-#ReportLogFile ./report.log
-ReportLogFile stdout
-
-# debug flags -- 0 is "off", 1 is "on"
-DebugDaemon 0
-DebugChannelFactory 0
-DebugFilter 0
-DebugChannel 0
-DebugConsumerAdmin 0
-DebugSupplireAdmin 0
-DebugConsumerProxy 0
-DebugSupplierProxy 0
-DebugEventQueue 0
-DebugRDIEvent 0
-DebugFilterAdmin 0
-DebugFilterEval 0
-DebugCosConsumerProxies 0
-DebugCosSupplierProxies 0
-DebugNotifQoS 0
-DebugAdminQoS 0
-DebugNotifQueue 0
-
-# report flags -- 0 is "off", 1 is "on"
-ReportChannelStats 1
-ReportQueueSizeStats 1
-ReportConnectedConsumers 1
-ReportConnectedSuppliers 1
-ReportConnectedFilters 1
-ReportUnconnectedFilters 1
-ReportEventRejections 1
-ReportEventDrops 1
-ReportNotifQoS 1
-ReportAdminQoS 1
-ReportServerQoS 1
-
-#==================================================================
-# Initial ServerQoS Properties
-#==================================================================
-
-# Each ConsumerAdmin and SupplierAdmin object is assigned to a group
-# and each group is processed by only one thread. The number of such
-# groups and the number of threads that handle the groups have to be
-# at least 1. In addition, the number of threads should not exceed
-# the number of groups
-
-NumAdminGroups 2
-NumAdminThreads 2
-
-# notifd may split the filter evaluation processing in two stages. In
-# this case, a second thread pool is used for evaluating proxy-level
-# filters. The size of the pool is controled by the following
-
-NumProxyThreads 0
-
-# The following variables control the number of threads created for
-# pushing matched events to push-style consumers and pulling events
-# from pull-style suppliers. If these values are 0, each consumer
-# and supplier is assigned its own thread.
-
-NumPushThreads 4
-NumPullThreads 2
-
-# The following variables control the number of threads created for
-# notifying suppliers of subscription changes (using subscription_change)
-# and for notifying consumers of offer changes (using offer_change).
-# CAREFUL: Setting NumSChangeThreads to zero DISABLES
-# the sending of subscription_change messages!
-# CAREFUL: Setting NumOChangeThreads to zero DISABLES
-# the sending of offer_change messages
-
-NumOChangeThreads 1
-NumSChangeThreads 1
-
-# For pull style suppliers, the time period (milliseconds) between
-# pulls is controlled by the following variable.
-# A value of 0 corresponds to continuous pulling
-
-PullEventPeriod 100
-
-# Period in seconds used by the garbage collector of the event queue
-# The minimum number that can be used is 1
-
-QueueGCPeriod 300
-
-# The next entry specifies the time period (in seconds) between
-# each 'report' (the Report.. flags above control what gets reported).
-# The channel may have a built-in minimum, e.g, even if you say 0,
-# the channel may choose a 10 second period. (300 seconds = 5 mins)
-
-ReportingInterval 300
-
-# Description of local clock values returned from omnithread::get_time.
-# These values are here because we do not know a portable way to get
-# the clock accuracy and the time zone across all Unix flavors and
-# Windows. Let us know if you have a portable approach.
-#
-# LocalClockInaccLo/Hi: local clock inaccuracy in units of 100ns
-# (must fit in 48 bits, 32 for Lo, 16 for Hi)
-# LocalClockTDF: local time zone expressed in minutes west of
-# greenwhich meridian; 300=Eastern time zone, USA
-LocalClockInaccLo 0
-LocalClockInaccHi 0
-LocalClockTDF 300
-
-#==================================================================
-# Initial Default AdminQoS Properties
-#==================================================================
-
-# Maximum number of events that will be queued by the Channel before
-# before it begins discarding events or rejecting new ones. A value
-# of 0 does not place any upper limit.
-
-MaxQueueLength 0
-
-# The maximum number of Consumers that can be connected to a Channel
-# at any given time. A value of 0 does not place any upper limit.
-
-MaxConsumers 0
-
-# The maximum number of Suppliers that can be connected to a Channel
-# at any given time. A value of 0 does not place any upper limit.
-
-MaxSuppliers 0
-
-# If 1, newly announced events will be discarded when the number of
-# undelivered events in a Channel is equal to 'MaxQueueLength'. If
-# 0, newly announced events cause existing events to be discarded
-# according to the 'DiscardPolicy' QoS.
-
-RejectNewEvents 1
-
-#==================================================================
-# Initial Default NotifQoS Properties
-#==================================================================
-
-# EventReliability and ConnectionReliability can take the values:
-# 0 --> CosNotification::BestEffort
-# 1 --> CosNotification::Persistent
-# OrderPolicy can take the values:
-# 0 --> CosNotification::AnyOrder
-# 1 --> CosNotification::FifoOrder
-# 2 --> CosNotification::PriorityOrder
-# 3 --> CosNotification::DeadlineOrder
-# DiscardPolicy can take any of the above values and, in addition,
-# 4 --> CosNotification::LifoOrder
-# StartTimeSupported and StopTimeSupported are boolean and can take
-# the values
-# 0 --> FALSE
-# 1 --> TRUE
-#
-# NOTE: the current notifd implementation does NOT support all QoS
-# settings. In particular, it only supports the following:
-# EventReliability 0
-# ConnectionReliability 0
-# StartTimeSupported 0
-# StopTimeSupported 0
-
-# Note -- PacingInterval can be set programmatically to any
-# TimeBase::TimeT value (units = 100s of nanoseconds). Here you
-# set number of MILLISECONDS, e.g., a value of 1000 means send a batch
-# roughly every 1 second (or when MaxBatchSize is reached).
-
-EventReliability 0
-ConnectionReliability 0
-Priority 0
-Timeout 0
-StartTimeSupported 0
-StopTimeSupported 0
-OrderPolicy 0
-DiscardPolicy 0
-PacingInterval 1000
-MaxEventsPerConsumer 0
-MaximumBatchSize 8
-
+++ /dev/null
-/* XPM */
-/* Drawn by Mark Donohoe for the K Desktop Environment */
-/* See http://www.kde.org */
-static char*forward[]={
-"16 16 5 1",
-"# c #000000",
-"a c #ffffff",
-"c c #808080",
-"b c #c0c0c0",
-". c None",
-"................",
-"................",
-".........#......",
-".........##.....",
-".........#a#....",
-"..########aa#...",
-"..#aaaaaaabaa#..",
-"..#bbbbbbbbbaa#.",
-"..#bbbbbbbbba#..",
-"..########ba#c..",
-"..ccccccc#a#c...",
-"........c##c....",
-"........c#c.....",
-"........cc......",
-"........c.......",
-"................",
-"................"};
-
+++ /dev/null
-/* XPM */
-/* Drawn by Mark Donohoe for the K Desktop Environment */
-/* See http://www.kde.org */
-static char*home[]={
-"16 16 4 1",
-"# c #000000",
-"a c #ffffff",
-"b c #c0c0c0",
-". c None",
-"........... ....",
-" ....##.......",
-"..#...####......",
-"..#..#aabb#.....",
-"..#.#aaaabb#....",
-"..##aaaaaabb#...",
-"..#aaaaaaaabb#..",
-".#aaaaaaaaabbb#.",
-"###aaaaaaaabb###",
-"..#aaaaaaaabb#..",
-"..#aaa###aabb#..",
-"..#aaa#.#aabb#..",
-"..#aaa#.#aabb#..",
-"..#aaa#.#aabb#..",
-"..#aaa#.#aabb#..",
-"..#####.######..",
-"................"};
-
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : caf
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libcaf.la
-
-salomeinclude_HEADERS= \
- CAF.h \
- CAF_Application.h \
- CAF_Operation.h \
- CAF_Study.h \
- CAF_Tools.h
-
-dist_libcaf_la_SOURCES= \
- CAF_Application.cxx \
- CAF_Operation.cxx \
- CAF_Study.cxx \
- CAF_Tools.cxx
-
-MOC_FILES= \
- CAF_Application_moc.cxx \
- CAF_Operation_moc.cxx \
- CAF_Study_moc.cxx
-nodist_libcaf_la_SOURCES= $(MOC_FILES)
-
-dist_salomeres_DATA = \
- resources/redo.png \
- resources/undo.png
-
-nodist_salomeres_DATA = \
- CAF_images.qm \
- CAF_msg_en.qm
-
-libcaf_la_CPPFLAGS=$(QT_INCLUDES) $(CAS_CPPFLAGS) -I${QTDIR}/src/kernel -I$(QTDIR)/mkspecs/linux-g++ \
- -I$(srcdir)/../STD -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
-libcaf_la_LDFLAGS=$(QT_MT_LIBS) $(CAS_OCAF) $(CAS_OCAFVIS)
-libcaf_la_LIBADD=../STD/libstd.la ../SUIT/libsuit.la
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 CAM_H
-#define CAM_H
-
-#if defined CAM_EXPORTS
-#if defined WNT
-#define CAM_EXPORT __declspec( dllexport )
-#else
-#define CAM_EXPORT
-#endif
-#else
-#if defined WNT
-#define CAM_EXPORT __declspec( dllimport )
-#else
-#define CAM_EXPORT
-#endif
-#endif
-
-#if defined SOLARIS
-#define bool int
-#define false 0
-#define true 1
-#endif
-
-#if defined WNT
-#pragma warning ( disable: 4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "CAM_Application.h"
-
-#include "CAM_Study.h"
-#include "CAM_Module.h"
-
-#include <SUIT_Tools.h>
-#include <SUIT_Session.h>
-#include <SUIT_MessageBox.h>
-
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qlabel.h>
-#include <qfont.h>
-#include <qapplication.h>
-#include <qregexp.h>
-
-#ifdef WIN32
-#include <windows.h>
-#else
-#include <dlfcn.h>
-#endif
-
-/*!Create new instance of CAM_Application*/
-extern "C" CAM_EXPORT SUIT_Application* createApplication()
-{
- return new CAM_Application();
-}
-
-/*!Constructor. read module list.
- * \param autoLoad - auto load flag.
- */
-CAM_Application::CAM_Application( const bool autoLoad )
-: STD_Application(),
-myModule( 0 ),
-myAutoLoad( autoLoad )
-{
- readModuleList();
-}
-
-/*!Destructor. Do nothing.*/
-CAM_Application::~CAM_Application()
-{
-}
-
-/*! Load modules, if \a myAutoLoad flag is true.\n
- * Start application - call start() method from parent class.
- */
-void CAM_Application::start()
-{
- if ( myAutoLoad )
- loadModules();
-
- STD_Application::start();
-}
-
-/*!Get active module.
- * \retval CAM_Module - active module.
- */
-CAM_Module* CAM_Application::activeModule() const
-{
- return myModule;
-}
-
-/*!Get module with name \a modName from modules list.
- * \retval CAM_Module pointer - module.
- */
-CAM_Module* CAM_Application::module( const QString& modName ) const
-{
- CAM_Module* mod = 0;
- for ( ModuleListIterator it( myModules ); it.current() && !mod; ++it )
- if ( it.current()->moduleName() == modName )
- mod = it.current();
- return mod;
-}
-
-/*!Gets modules iterator.*/
-CAM_Application::ModuleListIterator CAM_Application::modules() const
-{
- return ModuleListIterator( myModules );
-}
-
-/*!Gets modules list.
- * \param out - output list of modules.
- */
-void CAM_Application::modules( CAM_Application::ModuleList& out ) const
-{
- out.setAutoDelete( false );
- out.clear();
-
- for ( ModuleListIterator it( myModules ); it.current(); ++it )
- out.append( it.current() );
-}
-
-/*!Gets list of names for modules.\n
- * Get loaded modules names, if \a loaded is true, else \n
- * get names from information list.
- * \param lst - output list of names.
- * \param loaded - boolean flag.
- */
-void CAM_Application::modules( QStringList& lst, const bool loaded ) const
-{
- lst.clear();
-
- if ( loaded )
- for ( ModuleListIterator it( myModules ); it.current(); ++it )
- lst.append( it.current()->moduleName() );
- else
- for ( ModuleInfoList::const_iterator it = myInfoList.begin(); it != myInfoList.end(); ++it )
- lst.append( (*it).title );
-}
-
-/*!Adding module \a mod to list.
- *\param mod - module.
- */
-void CAM_Application::addModule( CAM_Module* mod )
-{
- if ( !mod || myModules.contains( mod ) )
- return;
-
- mod->initialize( this );
-
- QMap<CAM_Module*, int> map;
-
- ModuleList newList;
- for ( ModuleInfoList::const_iterator it = myInfoList.begin(); it != myInfoList.end(); ++it )
- {
- if ( (*it).title == mod->moduleName() )
- newList.append( mod );
- else
- {
- CAM_Module* curMod = module( (*it).title );
- if ( curMod )
- newList.append( curMod );
- }
- if ( !newList.isEmpty() )
- map.insert( newList.getLast(), 0 );
- }
-
- for ( ModuleListIterator itr( myModules ); itr.current(); ++itr )
- {
- if ( !map.contains( itr.current() ) )
- newList.append( itr.current() );
- }
-
- if ( !map.contains( mod ) )
- newList.append( mod );
-
- myModules = newList;
-
- moduleAdded( mod );
-}
-
-/*!Load modules from information list.
- * \warning If some of modules not loaded, error message appear on desktop.
- */
-void CAM_Application::loadModules()
-{
- for ( ModuleInfoList::const_iterator it = myInfoList.begin(); it != myInfoList.end(); ++it )
- {
- CAM_Module* mod = loadModule( (*it).title );
- if ( mod )
- addModule( mod );
- else {
- if ( desktop() && desktop()->isShown() )
- SUIT_MessageBox::error1( desktop(), tr( "Loading modules" ),
- tr( "Can not load module %1" ).arg( (*it).title ), tr( "Ok" ) );
- else
- qWarning( tr( "Can not load module %1" ).arg( (*it).title ).latin1() );
- }
- }
-}
-
-/*!Load module with name \a modName.
- *\param modName - module name for loading.
- *\warning If information list is empty.
- *\warning If module library (for module with \a modName) is empty.
- *\warning If module library is not loaded.
- */
-CAM_Module* CAM_Application::loadModule( const QString& modName )
-{
- if ( myInfoList.isEmpty() )
- {
- qWarning( tr( "Modules configuration is not defined." ) );
- return 0;
- }
-
- QString libName = moduleLibrary( modName );
- if ( libName.isEmpty() )
- {
- qWarning( tr( "Information about module \"%1\" doesn't exist." ).arg( modName ) );
- return 0;
- }
-
- QString err;
- GET_MODULE_FUNC crtInst = 0;
-
-#ifdef WIN32
- HINSTANCE modLib = ::LoadLibrary( libName );
- if ( !modLib )
- {
- LPVOID lpMsgBuf;
- ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS, 0, ::GetLastError(), 0, (LPTSTR)&lpMsgBuf, 0, 0 );
- err = QString( "Failed to load %1. %2" ).arg( libName ).arg( (LPTSTR)lpMsgBuf );
- ::LocalFree( lpMsgBuf );
- }
- else
- {
- crtInst = (GET_MODULE_FUNC)::GetProcAddress( modLib, GET_MODULE_NAME );
- if ( !crtInst )
- {
- LPVOID lpMsgBuf;
- ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS, 0, ::GetLastError(), 0, (LPTSTR)&lpMsgBuf, 0, 0 );
- err = QString( "Failed to find %1 function. %2" ).arg( GET_MODULE_NAME ).arg( (LPTSTR)lpMsgBuf );
- ::LocalFree( lpMsgBuf );
- }
- }
-#else
- void* modLib = dlopen( (char*)libName.latin1(), RTLD_LAZY );
- if ( !modLib )
- err = QString( "Can not load library %1. %2" ).arg( libName ).arg( dlerror() );
- else
- {
- crtInst = (GET_MODULE_FUNC)dlsym( modLib, GET_MODULE_NAME );
- if ( !crtInst )
- err = QString( "Failed to find function %1. %2" ).arg( GET_MODULE_NAME ).arg( dlerror() );
- }
-#endif
-
- CAM_Module* module = crtInst ? crtInst() : 0;
- if ( module )
- {
- module->setModuleName( modName );
- module->setName( moduleName( modName ) );
- }
-
- if ( !err.isEmpty() ) {
- if ( desktop() && desktop()->isShown() )
- SUIT_MessageBox::warn1( desktop(), tr( "Error" ), err, tr( "Ok" ) );
- else
- qWarning( err.latin1() );
- }
-
- return module;
-}
-
-/*! @name Activate module group. */
-//@{
-/*!Activate module with name \a modName.
- *\param modName - module name.
- *\ratval true, if module loaded and activated successful, else false.
- */
-bool CAM_Application::activateModule( const QString& modName )
-{
- if ( !modName.isEmpty() && !activeStudy() )
- return false;
-
- bool res = false;
- if ( !modName.isEmpty() )
- {
- CAM_Module* mod = module( modName );
- if ( !mod && !moduleLibrary( modName ).isEmpty() )
- {
- mod = loadModule( modName );
- addModule( mod );
- }
-
- if ( mod )
- res = activateModule( mod );
- }
- else
- res = activateModule( 0 );
-
- return res;
-}
-
-/*!Activate module \a mod
- *\param mod - module for activation.
- *\retval true - if all sucessful.
- *\warning Error message if module not activated in active study.
- */
-bool CAM_Application::activateModule( CAM_Module* mod )
-{
- if ( mod && !activeStudy() )
- return false;
-
- if ( myModule == mod )
- return true;
-
- if ( myModule )
- {
- if ( !myModule->deactivateModule( activeStudy() ) )
- {
- // ....
- }
- }
- myModule = mod;
-
- if ( myModule ){
- // Connect the module to the active study
- myModule->connectToStudy( dynamic_cast<CAM_Study*>( activeStudy() ) );
- if ( !myModule->activateModule( activeStudy() ) )
- {
- myModule->setMenuShown( false );
- myModule->setToolShown( false );
- if ( desktop() && desktop()->isShown() )
- SUIT_MessageBox::error1( desktop(), tr( "ERROR_TLT" ), tr( "ERROR_ACTIVATE_MODULE_MSG" ).arg( myModule->moduleName() ), tr( "BUT_OK" ) );
- else
- qWarning( tr( "ERROR_ACTIVATE_MODULE_MSG" ).arg( myModule->moduleName() ).latin1() );
- myModule = 0;
- return false;
- }
- }
-
- updateCommandsStatus();
-
- return true;
-}
-//@}
-
-/*!Create new study for current application.
- *\retval study pointer.
- */
-SUIT_Study* CAM_Application::createNewStudy()
-{
- return new CAM_Study( this );
-}
-
-/*!Update commands status for parent class and for current class(if module is active)*/
-void CAM_Application::updateCommandsStatus()
-{
- STD_Application::updateCommandsStatus();
-
- if ( activeModule() )
- activeModule()->updateCommandsStatus();
-}
-
-/*!Close all modules in study \a theDoc.
- *\param theDoc - study
- */
-void CAM_Application::beforeCloseDoc( SUIT_Study* theDoc )
-{
- for ( ModuleListIterator it( myModules ); it.current(); ++it )
- it.current()->studyClosed( theDoc );
-}
-
-/*!Sets active study for parent class.
- *\param study - study.
- */
-void CAM_Application::setActiveStudy( SUIT_Study* study )
-{
- STD_Application::setActiveStudy( study );
-}
-
-/*!Do nothing.*/
-void CAM_Application::moduleAdded( CAM_Module* mod )
-{
-// CAM_Study* study = dynamic_cast<CAM_Study*>( activeStudy() );
-// if ( !study )
-// return;
-
-// study->insertDataModel( mod->dataModel() );
-}
-
-/*!Gets module name by title \a title
- *\param title - title name
- *\retval QString module name.
- */
-QString CAM_Application::moduleName( const QString& title ) const
-{
- QString res;
- for ( ModuleInfoList::const_iterator it = myInfoList.begin(); it != myInfoList.end() && res.isEmpty(); ++it )
- {
- if ( (*it).title == title )
- res = (*it).name;
- }
- return res;
-}
-
-/*!Gets module title by module name \a name
- *\param name - module name
- *\retval QString module title.
- */
-QString CAM_Application::moduleTitle( const QString& name ) const
-{
- QString res;
- for ( ModuleInfoList::const_iterator it = myInfoList.begin(); it != myInfoList.end() && res.isEmpty(); ++it )
- {
- if ( (*it).name == name )
- res = (*it).title;
- }
- return res;
-}
-
-/*!Get library name for module with title \a title.
- *\param title - module title name.
- *\param full - boolean flag (if true - return full library name, else internal name)
- *\retval QString - library name.
- */
-QString CAM_Application::moduleLibrary( const QString& title, const bool full ) const
-{
- QString res;
- for ( ModuleInfoList::const_iterator it = myInfoList.begin(); it != myInfoList.end() && res.isEmpty(); ++it )
- {
- if ( (*it).title == title )
- res = (*it).internal;
- }
- if ( !res.isEmpty() && full )
- res = SUIT_Tools::library( res );
- return res;
-}
-
-/*!Read modules list*/
-void CAM_Application::readModuleList()
-{
- if ( !myInfoList.isEmpty() )
- return;
-
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-
- QStringList modList;
-
- QStringList args;
- for (int i = 1; i < qApp->argc(); i++)
- args.append( qApp->argv()[i] );
-
- QRegExp rx("--modules\\s+\\(\\s*(.*)\\s*\\)");
- rx.setMinimal( true );
- if ( rx.search( args.join(" ") ) >= 0 && rx.capturedTexts().count() > 0 ) {
- QString modules = rx.capturedTexts()[1];
- QStringList mods = QStringList::split(":",modules,false);
- for ( uint i = 0; i < mods.count(); i++ ) {
- if ( !mods[i].stripWhiteSpace().isEmpty() )
- modList.append( mods[i].stripWhiteSpace() );
- }
- }
- if ( modList.isEmpty() ) {
- QString mods = resMgr->stringValue( "launch", "modules", QString::null );
- modList = QStringList::split( ",", mods );
- }
-
- for ( QStringList::const_iterator it = modList.begin(); it != modList.end(); ++it )
- {
- QString modName = (*it).stripWhiteSpace();
- if ( modName.isEmpty() )
- continue;
-
- QString modTitle = resMgr->stringValue( *it, QString( "name" ), QString::null );
- if ( modTitle.isEmpty() )
- {
- printf( "****************************************************************\n" );
- printf( "* Warning: %s not found in resources.\n", (*it).latin1() );
- printf( "* Module will not be available\n" );
- printf( "****************************************************************\n" );
- continue;
- }
-
- QString modLibrary = resMgr->stringValue( *it, QString( "library" ), QString::null ).stripWhiteSpace();
- if ( !modLibrary.isEmpty() )
- {
- QString libExt;
- modLibrary = SUIT_Tools::file( modLibrary.stripWhiteSpace() );
- libExt = QString( "so" );
- if ( SUIT_Tools::extension( modLibrary ).lower() == libExt )
- modLibrary = modLibrary.mid( 0, modLibrary.length() - libExt.length() - 1 );
- libExt = QString( "dll" );
- if ( SUIT_Tools::extension( modLibrary ).lower() == libExt )
- modLibrary = modLibrary.mid( 0, modLibrary.length() - libExt.length() - 1 );
-#ifndef WIN32
- if ( modLibrary.startsWith( "lib" ) )
- modLibrary = modLibrary.mid( 3 );
-#endif
- }
- else
- modLibrary = modName;
-
- ModuleInfo inf;
- inf.name = modName;
- inf.title = modTitle;
- inf.internal = modLibrary;
- myInfoList.append( inf );
- }
-
- if ( myInfoList.isEmpty() ) {
- if ( desktop() && desktop()->isShown() )
- SUIT_MessageBox::warn1( desktop(), tr( "Warning" ), tr( "Modules list is empty" ), tr( "&OK" ) );
- else
- {
- printf( "****************************************************************\n" );
- printf( "* Warning: modules list is empty.\n" );
- printf( "****************************************************************\n" );
- }
- }
-}
-
-/*!Add common items for popup menu ( if they are exist )
- *\param type - type of popup menu
- *\param thePopup - popup menu
- *\param title - title of popup menu
- */
-void CAM_Application::contextMenuPopup( const QString& type, QPopupMenu* thePopup, QString& title )
-{
- // to do : add common items for popup menu ( if they are exist )
- if ( activeModule() )
- activeModule()->contextMenuPopup( type, thePopup, title );
-}
-
-/*!Create empty study.*/
-void CAM_Application::createEmptyStudy()
-{
- /*SUIT_Study* study = */activeStudy();
- STD_Application::createEmptyStudy();
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 CAM_APPLICATION_H
-#define CAM_APPLICATION_H
-
-#include "STD_Application.h"
-
-#include "CAM_Module.h"
-
-#include <qptrlist.h>
-
-class QPopupMenu;
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- \class CAM_Application
- Defines application configuration and behaviour for application with modules.
- Every module has own data model, necessary windows and viewers, etc.
- Application provides all necessary functionality for module management
- (loading of modules/activation/deactivation, etc)
-*/
-class CAM_EXPORT CAM_Application : public STD_Application
-{
- Q_OBJECT
-
-public:
- typedef QPtrList<CAM_Module> ModuleList;
- typedef QPtrListIterator<CAM_Module> ModuleListIterator;
-
-public:
- CAM_Application( const bool = true );
- virtual ~CAM_Application();
-
- virtual void start();
-
- CAM_Module* activeModule() const;
- CAM_Module* module( const QString& ) const;
-
- /** @name Modules lists.*/
- //@{
- ModuleListIterator modules() const;
- void modules( ModuleList& ) const;
- void modules( QStringList&, const bool loaded = true ) const;
- //@}
-
- virtual void addModule( CAM_Module* );
-
- virtual void loadModules();
- virtual CAM_Module* loadModule( const QString& );
-
- virtual bool activateModule( const QString& );
-
- virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
-
- QString moduleName( const QString& ) const;
- QString moduleTitle( const QString& ) const;
-
- virtual void createEmptyStudy();
-
-protected:
- virtual SUIT_Study* createNewStudy();
- virtual void updateCommandsStatus();
-
- virtual void moduleAdded( CAM_Module* );
- virtual void beforeCloseDoc( SUIT_Study* );
- virtual bool activateModule( CAM_Module* = 0 );
-
- virtual void setActiveStudy( SUIT_Study* );
-
- QString moduleLibrary( const QString&, const bool = true ) const;
-
-private:
- void readModuleList();
-
-private:
- typedef struct { QString name, title, internal; } ModuleInfo;
- typedef QValueList<ModuleInfo> ModuleInfoList;
-
-private:
- CAM_Module* myModule;
- ModuleList myModules;
- ModuleInfoList myInfoList;
- bool myAutoLoad;
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "CAM_DataModel.h"
-
-#include "CAM_Module.h"
-#include "CAM_RootObject.h"
-
-/*!Constructor. Initialise module by \a module.*/
-CAM_DataModel::CAM_DataModel( CAM_Module* module )
-: myRoot( 0 ),
-myModule( module )
-{
-}
-
-/*!Destructor. Do nothing.*/
-CAM_DataModel::~CAM_DataModel()
-{
-}
-
-/*!
- Default implementation, does nothing.
- Can be used for creation of root object.
-*/
-void CAM_DataModel::initialize()
-{
-}
-
-/*!Get root object.
- *\retval CAM_DataObject pointer - root object.
- */
-CAM_DataObject* CAM_DataModel::root() const
-{
- return myRoot;
-}
-
-/*!Sets root object to \a newRoot.\n
- *Emit root changed, if it was.
- *\param newRoot - new root object
- */
-void CAM_DataModel::setRoot( const CAM_DataObject* newRoot )
-{
- if ( myRoot == newRoot )
- return;
-
- if ( myRoot )
- myRoot->disconnect( this, SLOT( onDestroyed( SUIT_DataObject* ) ) );
-
- myRoot = (CAM_DataObject*)newRoot;
-
- if ( myRoot )
- myRoot->connect( this, SLOT( onDestroyed( SUIT_DataObject* ) ) );
-
- emit rootChanged( this );
-}
-
-/*!Gets module.
- *\retval CAM_Module pointer - module.
- */
-CAM_Module* CAM_DataModel::module() const
-{
- return myModule;
-}
-
-/*!Nullify root, if \a obj equal root.*/
-void CAM_DataModel::onDestroyed( SUIT_DataObject* obj )
-{
- if ( myRoot == obj )
- myRoot = 0;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 CAM_DATAMODEL_H
-#define CAM_DATAMODEL_H
-
-#include "CAM.h"
-
-#include <qobject.h>
-#include <qstringlist.h>
-
-class CAM_Module;
-class CAM_DataObject;
-class CAM_Study;
-class SUIT_DataObject;
-
-/*!
- \class CAM_DataModel
- Base class for all data models used in CAM-based applications.
- Represents data model of CAM module. Provides necessary interface (default implementation is empty)
-*/
-class CAM_EXPORT CAM_DataModel : public QObject
-{
- Q_OBJECT
-
-public:
- CAM_DataModel( CAM_Module* );
- virtual ~CAM_DataModel();
-
- virtual void initialize();
-
- CAM_DataObject* root() const;
- CAM_Module* module() const;
-
- /** @name These methods should be redefined in successors.*/
- //@{
- virtual bool open( const QString&, CAM_Study*, QStringList ) { return true; }//!< return true
- virtual bool save( QStringList& ) { return true; };
- virtual bool saveAs( const QString&, CAM_Study*, QStringList& ) { return true; };
- virtual bool close() { return true; };
- virtual bool create( CAM_Study* ) { return true; }
- //@}
-
-protected:
- /*! setRoot() should be used to specify custom root object instance.\n
- * Such an object can be created in several ways, depending on application or module needs:\n
- * \li by initialize()
- * \li while the model is being loaded
- * \li when the model is updated and becomes non-empty
- */
- virtual void setRoot( const CAM_DataObject* );
-
-private slots:
- void onDestroyed( SUIT_DataObject* );
-
-signals:
- void rootChanged( const CAM_DataModel* );
-
-private:
- CAM_DataObject* myRoot;
- CAM_Module* myModule;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "CAM_DataObject.h"
-
-#include "CAM_Module.h"
-#include "CAM_DataModel.h"
-
-/*!Constructor. Sets parent object.*/
-CAM_DataObject::CAM_DataObject( SUIT_DataObject* parent )
-: SUIT_DataObject( parent )
-{
-}
-
-/*!Destructor.Do nothing*/
-CAM_DataObject::~CAM_DataObject()
-{
-}
-
-/*!Get module.
- *\retval const CAM_Module pointer - module
- */
-CAM_Module* CAM_DataObject::module() const
-{
- CAM_Module* mod = 0;
-
- CAM_DataModel* data = dataModel();
- if ( data )
- mod = data->module();
-
- return mod;
-}
-
-/*!Get data model.
- *Return 0 - if no parent obbject.
- *\retval const CAM_DataModel pointer - data model
- */
-CAM_DataModel* CAM_DataObject::dataModel() const
-{
- CAM_DataObject* parentObj = dynamic_cast<CAM_DataObject*>( parent() );
-
- if ( !parentObj )
- return 0;
-
- return parentObj->dataModel();
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 CAM_DATAOBJECT_H
-#define CAM_DATAOBJECT_H
-
-#include "CAM.h"
-
-#include <SUIT_DataObject.h>
-
-class CAM_Module;
-class CAM_DataModel;
-
-/*!
- \class CAM_DataObject
- Provides only additional link to CAM_DataModel
-*/
-class CAM_EXPORT CAM_DataObject : public SUIT_DataObject
-{
-public:
- CAM_DataObject( SUIT_DataObject* = 0 );
- virtual ~CAM_DataObject();
-
- CAM_Module* module() const;
- virtual CAM_DataModel* dataModel() const;
-};
-
-#endif
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "CAM_Module.h"
-
-#include "CAM_DataModel.h"
-#include "CAM_Application.h"
-#include "CAM_Study.h"
-
-#include <QtxAction.h>
-#include <QtxActionMenuMgr.h>
-#include <QtxActionToolMgr.h>
-
-#include <SUIT_Session.h>
-#include <SUIT_Application.h>
-
-/*!Icon.*/
-static const char* ModuleIcon[] = {
-"20 20 2 1",
-" c None",
-". c #000000",
-" ",
-" ",
-" ",
-" .................. ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" .................. ",
-" . . . ",
-" . . . ",
-" ... ... ... ",
-" .. .. .. .. .. .. ",
-" . . . . . . ",
-" .. .. .. .. .. .. ",
-" ... ... ... "};
-
-QPixmap MYPixmap( ModuleIcon );
-
-/*!Constructor.*/
-CAM_Module::CAM_Module()
-: QObject(),
-myApp( 0 ),
-myIcon( MYPixmap ),
-myDataModel( 0 )
-{
-}
-
-/*!Constructor. initialize \a name.*/
-CAM_Module::CAM_Module( const QString& name )
-: QObject(),
-myApp( 0 ),
-myName( name ),
-myIcon( MYPixmap ),
-myDataModel( 0 )
-{
-}
-
-/*!Destructor. Remove data model.*/
-CAM_Module::~CAM_Module()
-{
- delete myDataModel;
- myDataModel = 0;
-}
-
-/*!Initialize application.*/
-void CAM_Module::initialize( CAM_Application* app )
-{
- myApp = app;
- if ( myApp )
- {
- SUIT_Session* aSession = SUIT_Session::session();
- connect( aSession, SIGNAL( applicationClosed( SUIT_Application* ) ),
- this, SLOT( onApplicationClosed( SUIT_Application* ) ) );
-
- connect( myApp, SIGNAL( infoChanged( QString ) ), this, SLOT( onInfoChanged( QString ) ) );
- }
-}
-
-/*!\retval Module icon.*/
-QPixmap CAM_Module::moduleIcon() const
-{
- return myIcon;
-}
-
-/*!\retval Module icon name.*/
-QString CAM_Module::iconName() const
-{
- return "";
-}
-
-/*!\retval Module name.*/
-QString CAM_Module::moduleName() const
-{
- return myName;
-}
-
-/*! \brief Return data model.
- * Create data model, if it was't created before.
- */
-CAM_DataModel* CAM_Module::dataModel() const
-{
- if ( !myDataModel )
- {
- CAM_Module* that = (CAM_Module*)this;
- that->myDataModel = that->createDataModel();
- that->myDataModel->initialize();
- }
- return myDataModel;
-}
-
-/*!\retval CAM_Application pointer - application.*/
-CAM_Application* CAM_Module::application() const
-{
- return myApp;
-}
-
-/*!Public slot
- * \retval true.
- */
-bool CAM_Module::activateModule( SUIT_Study* study )
-{
- return true;
-}
-
-/*!Public slot
- * \retval true.
- */
-bool CAM_Module::deactivateModule( SUIT_Study* )
-{
- return true;
-}
-
-/*!Public slot, remove data model from \a study.*/
-void CAM_Module::studyClosed( SUIT_Study* study )
-{
- CAM_Study* camDoc = dynamic_cast<CAM_Study*>( study );
- if ( !camDoc )
- return;
-
- CAM_DataModel* dm = dataModel();
- if ( dm && camDoc->containsDataModel( dm ) ) {
- dm->close();
- camDoc->removeDataModel( dm );
- }
-}
-
-/*!Public slot, do nothing.*/
-void CAM_Module::studyChanged( SUIT_Study* , SUIT_Study* )
-{
-}
-
-/*!Return true if module is active.*/
-bool CAM_Module::isActiveModule() const
-{
- return application() ? application()->activeModule() == this : false;
-}
-
-/*!
- Put the message into the status bar of the desktop. Message will be displayed
- during specified \amscec milliseconds. If parameter \amsec is negative then
- message will be persistently displayed when module is active.
-*/
-void CAM_Module::putInfo( const QString& msg, const int msec )
-{
- if ( application() )
- application()->putInfo( msg, msec );
-
- if ( msec < 0 )
- myInfo = msg;
-}
-
-/*!
- Restore persistently displayed info string when previos information status string erasing
- if module is active.
-*/
-void CAM_Module::onInfoChanged( QString txt )
-{
- if ( txt.isEmpty() && isActiveModule() && !myInfo.isEmpty() && application() )
- application()->putInfo( myInfo );
-}
-
-
-
-/*!Public slot, nullify application pointer if the application was closed.*/
-void CAM_Module::onApplicationClosed( SUIT_Application* theApp )
-{
- if (myApp == theApp)
- myApp = NULL;
-}
-
-/*!Create and return new instance of CAM_DataModel.*/
-CAM_DataModel* CAM_Module::createDataModel()
-{
- return new CAM_DataModel( this );
-}
-
-/*!Sets module name to \a name.
- * \param name - new name for module.
- */
-void CAM_Module::setModuleName( const QString& name )
-{
- myName = name;
-}
-
-/*!Sets module icon to \a icon.
- * \param icon - new icon for module.
- */
-void CAM_Module::setModuleIcon( const QPixmap& icon )
-{
- myIcon = icon;
-}
-
-/*! Return menu manager pointer.
- * \retval QtxActionMenuMgr pointer - menu manager.
- */
-QtxActionMenuMgr* CAM_Module::menuMgr() const
-{
- QtxActionMenuMgr* mgr = 0;
- if ( application() && application()->desktop() )
- mgr = application()->desktop()->menuMgr();
- return mgr;
-}
-
-/*! Return tool manager pointer.
- * \retval QtxActionToolMgr pointer - tool manager.
- */
-QtxActionToolMgr* CAM_Module::toolMgr() const
-{
- QtxActionToolMgr* mgr = 0;
- if ( application() && application()->desktop() )
- mgr = application()->desktop()->toolMgr();
- return mgr;
-}
-
-/*! Create tool bar with name \a name, if it was't created before.
- * \retval -1 - if tool manager was't be created.
- */
-int CAM_Module::createTool( const QString& name )
-{
- if ( !toolMgr() )
- return -1;
-
- return toolMgr()->createToolBar( name );
-}
-
-/*! Create tool. Register action \a a with id \a id.
- * Insert QAction to tool manager.
- *\param a - QAction
- *\param tBar - integer
- *\param id - integer
- *\param idx - integer
- *\retval integer id of new action in tool manager.
- *\retval Return -1 if something wrong.
- */
-int CAM_Module::createTool( QAction* a, const int tBar, const int id, const int idx )
-{
- if ( !toolMgr() )
- return -1;
-
- int regId = registerAction( id, a );
- int intId = toolMgr()->insert( a, tBar, idx );
- return intId != -1 ? regId : -1;
-}
-
-/*! Create tool. Register action \a a with id \a id.
- * Insert QAction to tool manager.
- *\param a - QAction
- *\param tBar - QString&
- *\param id - integer
- *\param idx - integer
- *\retval integer id of new action in tool manager.
- *\retval Return -1 if something wrong.
- */
-int CAM_Module::createTool( QAction* a, const QString& tBar, const int id, const int idx )
-{
- if ( !toolMgr() )
- return -1;
-
- int regId = registerAction( id, a );
- int intId = toolMgr()->insert( a, tBar, idx );
- return intId != -1 ? regId : -1;
-}
-
-/*! Create tool.
- * Insert QAction with id \a id from action map(myActionMap) to tool manager.
- *\param id - integer
- *\param tBar - integer
- *\param idx - integer
- *\retval integer id of new action in tool manager.
- *\retval Return -1 if something wrong.
- */
-int CAM_Module::createTool( const int id, const int tBar, const int idx )
-{
- if ( !toolMgr() )
- return -1;
-
- int intId = toolMgr()->insert( action( id ), tBar, idx );
- return intId != -1 ? id : -1;
-}
-
-/*! Create tool.
- * Insert QAction with id \a id from action map(myActionMap) to tool manager.
- *\param id - integer
- *\param tBar - QString&
- *\param idx - integer
- *\retval integer id of new action in tool manager.
- *\retval Return -1 if something wrong.
- */
-int CAM_Module::createTool( const int id, const QString& tBar, const int idx )
-{
- if ( !toolMgr() )
- return -1;
-
- int intId = toolMgr()->insert( action( id ), tBar, idx );
- return intId != -1 ? id : -1;
-}
-
-/*! Create menu.
- * Insert submenu \a subMenu to menu manager.
- *\param subMenu - QString&
- *\param menu - integer
- *\param id - integer
- *\param group - integer
- *\param index - integer
- *\retval integer id of new menu in tool manager.
- *\retval Return -1 if something wrong.
- */
-int CAM_Module::createMenu( const QString& subMenu, const int menu,
- const int id, const int group, const int index,
- const bool enableEmpty )
-{
- if ( !menuMgr() )
- return -1;
-
- return menuMgr()->insert( subMenu, menu, group, id, index, enableEmpty );
-}
-
-/*! Create menu.
- * Insert submenu \a subMenu to menu manager.
- *\param subMenu - QString&
- *\param menu - QString&
- *\param id - integer
- *\param group - integer
- *\param index - integer
- *\retval integer id of new menu in tool manager.
- *\retval Return -1 if something wrong.
- */
-int CAM_Module::createMenu( const QString& subMenu, const QString& menu,
- const int id, const int group, const int index,
- const bool enableEmpty )
-{
- if ( !menuMgr() )
- return -1;
-
- return menuMgr()->insert( subMenu, menu, group, id, index, enableEmpty );
-}
-
-
-/*! Create menu. Register action \a a with id \a id.
- * Insert QAction to menu manager.
- *\param a - Qaction
- *\param menu - integer
- *\param id - integer
- *\param group - integer
- *\param index - integer
- *\retval integer id of new menu in tool manager.
- *\retval Return -1 if something wrong.
- */
-int CAM_Module::createMenu( QAction* a, const int menu, const int id, const int group, const int index )
-{
- if ( !a || !menuMgr() )
- return -1;
-
- int regId = registerAction( id, a );
- int intId = menuMgr()->insert( a, menu, group, index );
- return intId != -1 ? regId : -1;
-}
-
-/*! Create menu. Register action \a a with id \a id.
- * Insert QAction to menu manager.
- *\param a - Qaction
- *\param menu - QString&
- *\param id - integer
- *\param group - integer
- *\param index - integer
- *\retval integer id of new menu in tool manager.
- *\retval Return -1 if something wrong.
- */
-int CAM_Module::createMenu( QAction* a, const QString& menu, const int id, const int group, const int index )
-{
- if ( !a || !menuMgr() )
- return -1;
-
- int regId = registerAction( id, a );
- int intId = menuMgr()->insert( a, menu, group, index );
- return intId != -1 ? regId : -1;
-}
-
-/*! Create menu.
- * Insert QAction with id \a id from action map(myActionMap) to menu manager.
- *\param menu - integer
- *\param id - integer
- *\param group - integer
- *\param index - integer
- *\retval integer id of new menu in tool manager.
- *\retval Return -1 if something wrong.
- */
-int CAM_Module::createMenu( const int id, const int menu, const int group, const int index )
-{
- if ( !menuMgr() )
- return -1;
-
- int intId = menuMgr()->insert( action( id ), menu, group, index );
- return intId != -1 ? id : -1;
-}
-
-/*! Create menu.
- * Insert QAction with id \a id from action map(myActionMap) to menu manager.
- *\param menu - QString&
- *\param id - integer
- *\param group - integer
- *\param index - integer
- *\retval integer id of new menu in tool manager.
- *\retval Return -1 if something wrong.
- */
-int CAM_Module::createMenu( const int id, const QString& menu, const int group, const int index )
-{
- if ( !menuMgr() )
- return -1;
-
- int intId = menuMgr()->insert( action( id ), menu, group, index );
- return intId != -1 ? id : -1;
-}
-
-/*!Sets menus shown to \a on floag.
- *\param on - flag.
- */
-void CAM_Module::setMenuShown( const bool on )
-{
- QtxActionMenuMgr* mMgr = menuMgr();
- if ( !mMgr )
- return;
-
- bool upd = mMgr->isUpdatesEnabled();
- mMgr->setUpdatesEnabled( false );
-
- QAction* sep = separator();
- for ( QMap<int, QAction*>::Iterator it = myActionMap.begin(); it != myActionMap.end(); ++it )
- {
- if ( it.data() != sep )
- mMgr->setShown( mMgr->actionId( it.data() ), on );
- }
-
- mMgr->setUpdatesEnabled( upd );
- if ( upd )
- mMgr->update();
-}
-
-/*!Sets menu shown for QAction \a a to \a on flag.
- * \param a - QAction
- * \param on - flag
- */
-void CAM_Module::setMenuShown( QAction* a, const bool on )
-{
- if ( menuMgr() )
- menuMgr()->setShown( menuMgr()->actionId( a ), on );
-}
-
-/*!Sets menu shown for action with id=\a id to \a on flag.
- * \param id - id of action
- * \param on - flag
- */
-void CAM_Module::setMenuShown( const int id, const bool on )
-{
- setMenuShown( action( id ), on );
-}
-
-/*!Set tools shown to \a on flag.
- *\param on - boolean flag.
- */
-void CAM_Module::setToolShown( const bool on )
-{
- QtxActionToolMgr* tMgr = toolMgr();
- if ( !tMgr )
- return;
-
- bool upd = tMgr->isUpdatesEnabled();
- tMgr->setUpdatesEnabled( false );
-
- QAction* sep = separator();
- for ( QMap<int, QAction*>::Iterator it = myActionMap.begin(); it != myActionMap.end(); ++it )
- {
- if ( it.data() != sep )
- tMgr->setShown( tMgr->actionId( it.data() ), on );
- }
-
- tMgr->setUpdatesEnabled( upd );
- if ( upd )
- tMgr->update();
-}
-
-/*!Set tools shown for QAction \a a to \a on flag.
- * \param a - QAction
- * \param on - boolean flag
- */
-void CAM_Module::setToolShown( QAction* a, const bool on )
-{
- if ( toolMgr() )
- toolMgr()->setShown( toolMgr()->actionId( a ), on );
-}
-
-/*!Set tools shown for action with id=\a id to \a on flag.
- * \param id - integer action id
- * \param on - boolean flag
- */
-void CAM_Module::setToolShown( const int id, const bool on )
-{
- setToolShown( action( id ), on );
-}
-
-/*! Return action by id.
- * \param id - id of action.
- * \retval QAction.
- */
-QAction* CAM_Module::action( const int id ) const
-{
- QAction* a = 0;
- if ( myActionMap.contains( id ) )
- a = myActionMap[id];
- return a;
-}
-
-/*! Return id by action.
- * \param a - QAction.
- * \retval id of action.
- */
-int CAM_Module::actionId( const QAction* a ) const
-{
- int id = -1;
- for ( QMap<int, QAction*>::ConstIterator it = myActionMap.begin(); it != myActionMap.end() && id == -1; ++it )
- {
- if ( it.data() == a )
- id = it.key();
- }
- return id;
-}
-
-/*! Create new instance of QtxAction and register action with \a id.
- * \param id - id for new action.
- * \param text - parameter for creation QtxAction
- * \param icon - parameter for creation QtxAction
- * \param menu - parameter for creation QtxAction
- * \param tip - tip status for QtxAction action.
- * \param key - parameter for creation QtxAction
- * \param parent - parent for action
- * \param toggle - parameter for creation QtxAction
- * \param reciever -
- * \param member -
- */
-QAction* CAM_Module::createAction( const int id, const QString& text, const QIconSet& icon,
- const QString& menu, const QString& tip, const int key,
- QObject* parent, const bool toggle, QObject* reciever, const char* member )
-{
- QtxAction* a = new QtxAction( text, icon, menu, key, parent, 0, toggle );
- a->setStatusTip( tip );
-
- if ( reciever && member )
- connect( a, SIGNAL( activated() ), reciever, member );
-
- registerAction( id, a );
-
- return a;
-}
-
-/*! Register action in action map.
- * \param id - id for action.
- * \param a - action
- * \retval new id for action.
- */
-int CAM_Module::registerAction( const int id, QAction* a )
-{
- int ident = -1;
- for ( QMap<int, QAction*>::ConstIterator it = myActionMap.begin(); it != myActionMap.end() && ident == -1; ++it )
- if ( it.data() == a )
- ident = it.key();
-
- if ( ident != -1 )
- return ident;
-
- static int generatedId = -1;
- ident = id < 0 ? --generatedId : id;
-
- myActionMap.insert( ident, a );
-
- if ( menuMgr() )
- menuMgr()->registerAction( a );
-
- if ( toolMgr() )
- toolMgr()->registerAction( a );
-
- return ident;
-}
-
-/*! Unregister an action.
- * \param id - id for action.
- * \retval true if succeded, false if action is used
- */
-bool CAM_Module::unregisterAction( const int id )
-{
- return unregisterAction( action( id ) );
-}
-
-/*! Unregister an action.
- * \param a - action
- * \retval true if succeded, false if action is used
- */
-bool CAM_Module::unregisterAction( QAction* a )
-{
- if ( !a )
- return false;
- if ( menuMgr() ) {
- int id = menuMgr()->actionId( a );
- if ( id != -1 && menuMgr()->containsMenu( id, -1 ) )
- return false;
- }
- if ( toolMgr() ) {
- int id = toolMgr()->actionId( a );
- if ( id != -1 && toolMgr()->containsAction( id ) )
- return false;
- }
- if ( menuMgr() )
- menuMgr()->unRegisterAction( menuMgr()->actionId( a ) );
- if ( toolMgr() )
- toolMgr()->unRegisterAction( toolMgr()->actionId( a ) );
- return true;
-}
-
-/*! Return qt action manager separator.*/
-QAction* CAM_Module::separator()
-{
- return QtxActionMgr::separator();
-}
-
-/*! Connect data model of module with active study */
-void CAM_Module::connectToStudy( CAM_Study* camStudy )
-{
- CAM_Application* app = camStudy ? dynamic_cast<CAM_Application*>( camStudy->application() ) : 0;
- if( !app )
- return;
-
- CAM_DataModel* prev = 0;
- for( CAM_Application::ModuleListIterator it = app->modules(); it.current(); ++it )
- {
- CAM_DataModel* dm = it.current()->dataModel();
- if( it.current() == this && !camStudy->containsDataModel( dm ) )
- {
- if ( prev )
- camStudy->insertDataModel( it.current()->dataModel(), prev );
- else
- camStudy->insertDataModel( it.current()->dataModel(), 0 );
- }
- prev = dm;
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 CAM_MODULE_H
-#define CAM_MODULE_H
-
-#include "CAM.h"
-
-#include <qpixmap.h>
-#include <qobject.h>
-#include <qpopupmenu.h>
-#include <qstring.h>
-
-class QAction;
-class SUIT_Study;
-class SUIT_Application;
-class CAM_Study;
-class CAM_DataModel;
-class CAM_Application;
-class QtxActionMenuMgr;
-class QtxActionToolMgr;
-
-#ifdef WIN32
-#pragma warning( disable: 4251 )
-#endif
-
-/*!
- * Class provide support of tool and menu managers.
- */
-class CAM_EXPORT CAM_Module : public QObject
-{
- Q_OBJECT
-
-public:
- CAM_Module();
- CAM_Module( const QString& );
- virtual ~CAM_Module();
-
- virtual void initialize( CAM_Application* );
-
- QString moduleName() const;
- QPixmap moduleIcon() const;
-
- CAM_DataModel* dataModel() const;
- CAM_Application* application() const;
-
- virtual QString iconName() const;
-
- virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& title ) {};
- virtual void updateCommandsStatus() {};
-
- virtual void putInfo( const QString&, const int = -1 );
-
- bool isActiveModule() const;
-
- /** @name Set Menu Shown*/
- //@{
- virtual void setMenuShown( const bool );
- void setMenuShown( QAction*, const bool );
- void setMenuShown( const int, const bool );
- //@}
-
- /** @name Set Tool Shown*/
- //@{
- virtual void setToolShown( const bool );
- void setToolShown( QAction*, const bool );
- void setToolShown( const int, const bool );
- //@}
-
-public slots:
- virtual bool activateModule( SUIT_Study* );
- virtual bool deactivateModule( SUIT_Study* );
-
- virtual void connectToStudy( CAM_Study* );
-
- virtual void studyClosed( SUIT_Study* );
- virtual void studyChanged( SUIT_Study*, SUIT_Study* );
-
- virtual void onApplicationClosed( SUIT_Application* );
-
-private slots:
- void onInfoChanged( QString );
-
-protected:
- virtual CAM_DataModel* createDataModel();
-
- virtual void setModuleName( const QString& );
- virtual void setModuleIcon( const QPixmap& );
-
- QtxActionMenuMgr* menuMgr() const;
- QtxActionToolMgr* toolMgr() const;
-
- /** @name Create tool methods.*/
- //@{
- int createTool( const QString& );
- int createTool( const int, const int, const int = -1 );
- int createTool( const int, const QString&, const int = -1 );
- int createTool( QAction*, const int, const int = -1, const int = -1 );
- int createTool( QAction*, const QString&, const int = -1, const int = -1 );
- //@}
-
- /** @name Create menu methods.*/
- //@{
- int createMenu( const QString&, const int, const int = -1, const int = -1, const int = -1, const bool = false );
- int createMenu( const QString&, const QString&, const int = -1, const int = -1, const int = -1, const bool = false );
- int createMenu( const int, const int, const int = -1, const int = -1 );
- int createMenu( const int, const QString&, const int = -1, const int = -1 );
- int createMenu( QAction*, const int, const int = -1, const int = -1, const int = -1 );
- int createMenu( QAction*, const QString&, const int = -1, const int = -1, const int = -1 );
- //@}
-
- static QAction* separator();
-
- /**Action ids methods.*/
- //@{
- QAction* action( const int ) const;
- int actionId( const QAction* ) const;
- //@}
-
- int registerAction( const int, QAction* );
- bool unregisterAction( const int );
- bool unregisterAction( QAction* );
- QAction* createAction( const int, const QString&, const QIconSet&, const QString&,
- const QString&, const int, QObject* = 0,
- const bool = false, QObject* = 0, const char* = 0 );
-
-private:
- CAM_Application* myApp;
- QString myName;
- QPixmap myIcon;
- QString myInfo;
- CAM_DataModel* myDataModel;
- QMap<int, QAction*> myActionMap;
-
- friend class CAM_Application;
-};
-
-#ifdef WIN32
-#pragma warning( default: 4251 )
-#endif
-
-extern "C"
-{
- typedef CAM_Module* (*GET_MODULE_FUNC)();
-}
-
-#define GET_MODULE_NAME "createModule"
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "CAM_RootObject.h"
-
-#include "CAM_DataModel.h"
-#include "CAM_Module.h"
-
-/*!Constructor. Initialize by \a parent.
- * Set data model to 0.
- */
-CAM_RootObject::CAM_RootObject( SUIT_DataObject* parent )
-: CAM_DataObject( parent ),
-myDataModel( 0 )
-{
-}
-
-/*!Constructor. Initialize by \a parent and \a data - data object
- *\param data - data object
- *\param parent - parent data object
- */
-CAM_RootObject::CAM_RootObject( CAM_DataModel* data, SUIT_DataObject* parent )
-: CAM_DataObject( parent ),
-myDataModel( data )
-{
-}
-
-/*!Destructor. Do nothing.*/
-CAM_RootObject::~CAM_RootObject()
-{
-}
-
-/*!
- Returns module name
-*/
-QString CAM_RootObject::name() const
-{
- QString aName = "";
- if (myDataModel)
- aName = myDataModel->module()->moduleName();
- return aName;
-}
-
-/*!Get data model
- *\retval const CAM_DataModel pointer to data model.
- */
-CAM_DataModel* CAM_RootObject::dataModel() const
-{
- return myDataModel;
-}
-
-/*!Set data model.
- *\param dm - data model to set.
- */
-void CAM_RootObject::setDataModel( CAM_DataModel* dm )
-{
- myDataModel = dm;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 CAM_ROOTOBJECT_H
-#define CAM_ROOTOBJECT_H
-
-#include "CAM_DataObject.h"
-
-/*!
- CAM_RootObject - class intended for optimized access to CAM_DataModel instance
- from CAM_DataObject instances.
-
- To take advantage of this class in a specific application,
- custom data model root object class should be derived from both CAM_RootObject
- and application-specific DataObject implementation using virtual inheritance.
- */
-class CAM_EXPORT CAM_RootObject : public virtual CAM_DataObject
-{
-public:
- CAM_RootObject( SUIT_DataObject* = 0 );
- CAM_RootObject( CAM_DataModel*, SUIT_DataObject* = 0 );
- virtual ~CAM_RootObject();
-
- virtual QString name() const;
-
- virtual CAM_DataModel* dataModel() const;
- virtual void setDataModel( CAM_DataModel* );
-
-private:
- CAM_DataModel* myDataModel;
-};
-
-#endif
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "CAM_Study.h"
-
-#include "CAM_DataModel.h"
-#include "CAM_DataObject.h"
-#include "CAM_RootObject.h"
-#include "CAM_Module.h"
-
-/*!Constructor.*/
-CAM_Study::CAM_Study( SUIT_Application* app )
-: SUIT_Study( app )
-{
-}
-
-/*!Destructor*/
-CAM_Study::~CAM_Study()
-{
-}
-
-/*!Closing all data models and close document permanently(if \a permanently = true.)
- * \param permanently - flag
- */
-void CAM_Study::closeDocument(bool permanently)
-{
- for ( ModelListIterator it( myDataModels ); it.current(); ++it )
- it.current()->close();
-
- SUIT_Study::closeDocument(permanently);
-}
-
-/*!Append data model to list.
- * \param dm - data model for adding
- */
-bool CAM_Study::appendDataModel( const CAM_DataModel* dm )
-{
- return insertDataModel( dm, myDataModels.count() );
-}
-
-/*!Insert data model \a dm after \a other
- * \param dm - data model for adding
- * \param other - previus data model for \a dm
- */
-bool CAM_Study::insertDataModel( const CAM_DataModel* dm, const CAM_DataModel* other )
-{
- int idx = myDataModels.findRef( other );
- return insertDataModel( dm, idx < 0 ? idx : idx + 1 );
-}
-
-/*!Insert data model with index \a idx. \n
- * \param dm - data model
- * \param idx - index for inserting(must be no less zero)
- * \retval true - if model added successful, else false.
- */
-bool CAM_Study::insertDataModel( const CAM_DataModel* dm, const int idx )
-{
- if ( !dm || myDataModels.findRef( dm ) != -1 )
- return false;
-
- int pos = idx < 0 ? myDataModels.count() : idx;
- myDataModels.insert( QMIN( pos, (int)myDataModels.count() ), dm );
-
- connect( dm, SIGNAL( rootChanged( const CAM_DataModel* ) ), SLOT( updateModelRoot( const CAM_DataModel* ) ) );
-
- dataModelInserted( dm );
-
- return true;
-}
-
-/*! Remove data model from list
- * \param dm data model
- * \retval true - if all ok, else false.
- */
-bool CAM_Study::removeDataModel( const CAM_DataModel* dm )
-{
- if ( !dm )
- return true;
-
- CAM_RootObject* aModelRoot = dynamic_cast<CAM_RootObject*>( dm->root() );
- if ( aModelRoot )
- aModelRoot->setDataModel( 0 );
-
- return myDataModels.remove( dm );
-}
-
-/*!Check data model contains in list.
- * \param dm - data model
- * \retval true - if data model in list, else false.
- */
-bool CAM_Study::containsDataModel( const CAM_DataModel* dm ) const
-{
- return myDataModels.contains( dm );
-}
-
-/*!Gets list of all data models.
- * \param lst - output data model list.
- */
-void CAM_Study::dataModels( ModelList& lst ) const
-{
- lst.clear();
- for ( ModelListIterator it( myDataModels ); it.current(); ++it )
- lst.append( it.current() );
-}
-
-/*! Open data model \a dModel, if it saved*/
-void CAM_Study::dataModelInserted( const CAM_DataModel* dModel )
-{
- CAM_DataModel* dm = (CAM_DataModel*)dModel;
-
- if ( isSaved() ) // need to load data model from an exisitng file?
- openDataModel( studyName(), dm );
- else // no, just need to update data model's connection to study tree
- //(some application may want to show model's root in a study tree even if a model is empty)
- dm->create( this );
- updateModelRoot( dm );
-}
-
-/*! \retval false*/
-bool CAM_Study::openDataModel( const QString&, CAM_DataModel* )
-{
- return false;
-}
-
-/*! \retval false*/
-bool CAM_Study::saveDataModel( const QString&, CAM_DataModel* )
-{
- return false;
-}
-
-/*! Public slot. Update model root.*/
-void CAM_Study::updateModelRoot( const CAM_DataModel* dm )
-{
- if ( !root() )
- return;
-
- DataObjectList childList;
- root()->children( childList );
- CAM_DataObject* curRoot = 0;
- QString aName = dm->root() ? dm->root()->name() : dm->module()->moduleName();
- int i = 0;
- for ( int n = childList.count(); i < n; i++ ) {
- if ( childList.at( i )->name() == aName ) {
- curRoot = dynamic_cast<CAM_DataObject*>( childList.at( i ) );
- break;
- }
- }
-
- if ( curRoot == dm->root() )
- return;
-
- // replacing old data model root with a new one - old root deleted here !
- if ( curRoot )
- root()->replaceChild( curRoot, dm->root(), true );
- else {
- int idx = myDataModels.findRef( dm );
- if ( idx != -1 )
- root()->insertChild( dm->root(), idx );
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 CAM_STUDY_H
-#define CAM_STUDY_H
-
-#include "CAM.h"
-
-#include "CAM_DataModel.h"
-
-#include <SUIT_Study.h>
-
-#include <qptrlist.h>
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- \class CAM_Study
- Represents study for using in CAM, contains list of
- data model references from all modules. Provides
- necessary functionality for data models management.
-*/
-class CAM_EXPORT CAM_Study : public SUIT_Study
-{
- Q_OBJECT
-
-public:
- typedef QPtrList<CAM_DataModel> ModelList;
- typedef QPtrListIterator<CAM_DataModel> ModelListIterator;
-
-public:
- CAM_Study( SUIT_Application* );
- virtual ~CAM_Study();
-
- virtual void closeDocument(bool permanently = true);
-
- /** @name Insert data model methods.*/
- //@{
- bool appendDataModel( const CAM_DataModel* );
- virtual bool insertDataModel( const CAM_DataModel*, const int = -1 );
- bool insertDataModel( const CAM_DataModel*, const CAM_DataModel* );
- //@}
-
- virtual bool removeDataModel( const CAM_DataModel* );
-
- bool containsDataModel( const CAM_DataModel* ) const;
-
- void dataModels( ModelList& ) const;
-
-protected:
- virtual void dataModelInserted( const CAM_DataModel* );
- virtual bool openDataModel( const QString&, CAM_DataModel* );
- virtual bool saveDataModel( const QString&, CAM_DataModel* );
-
-protected slots:
- virtual void updateModelRoot( const CAM_DataModel* );
-
-private:
- //! Data model list
- ModelList myDataModels;
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : CAM
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libCAM.la
-
-salomeinclude_HEADERS= \
- CAM_Application.h \
- CAM_DataModel.h \
- CAM_DataObject.h \
- CAM.h \
- CAM_Module.h \
- CAM_Study.h \
- CAM_RootObject.h
-
-dist_libCAM_la_SOURCES= \
- CAM_Application.cxx \
- CAM_DataModel.cxx \
- CAM_DataObject.cxx \
- CAM_Module.cxx \
- CAM_Study.cxx \
- CAM_RootObject.cxx
-
-MOC_FILES= \
- CAM_Application_moc.cxx \
- CAM_Module_moc.cxx \
- CAM_Study_moc.cxx \
- CAM_DataModel_moc.cxx
-nodist_libCAM_la_SOURCES= $(MOC_FILES)
-
-nodist_salomeres_DATA=CAM_msg_en.qm
-
-libCAM_la_CPPFLAGS=$(QT_INCLUDES) -I$(srcdir)/../SUIT -I$(srcdir)/../STD -I$(srcdir)/../Qtx
-libCAM_la_LDFLAGS=$(QT_MT_LIBS)
-libCAM_la_LIBS=../SUIT/libsuit.la ../STD/libstd.la
-
-# what is that?
-#LDFLAGSFORBIN= -lSUITApp
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# This is a Qt message file in .po format. Each msgid starts with
-# a scope. This scope should *NOT* be translated - eg. "Foo::Bar"
-# would be translated to "Pub", not "Foo::Pub".
-msgid ""
-msgstr ""
-"Project-Id-Version: example-Qt-message-extraction\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 1999-02-23 15:38+0200\n"
-"Last-Translator: \n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-msgid "ERROR_TLT"
-msgstr "Error"
-
-msgid "ERROR_ACTIVATE_MODULE_MSG"
-msgstr "Failed to activate module %1"
+++ /dev/null
-// Copyright (C) 2005 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 _CASCatch_HeaderFile
-#define _CASCatch_HeaderFile
-
-#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
-
-
-#ifdef try
-# undef try
-#endif
-
-#ifdef catch
-# undef catch
-#endif
-
-#ifdef NO_CXX_EXCEPTION
-# if defined(DO_ABORT)
-# define CASCatch_TRY \
- Standard_ErrorHandler _Function; \
- K_SETJMP = 1 ; \
- if(DoesNotAbort(_Function))
-# else //If DO_ABORT is not defined
-# define CASCatch_TRY \
- Standard_ErrorHandler _Function; \
- if(DoesNotAbort(_Function))
-# endif //DO_ABORT
-# define CASCatch_CATCH(Error) \
- else if(_Function.Catches(STANDARD_TYPE(Error)))
-#else
-# define CASCatch_TRY try
-# define CASCatch_CATCH catch
-#endif //NO_CXX_EXCEPTION
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 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 "CASCatch_CatchSignals.hxx"
-
-#include "CASCatch_Failure.hxx"
-#include "CASCatch_ErrorHandler.hxx"
-#include <TCollection_AsciiString.hxx>
-
-#define MAX_HANDLER_NUMBER 6
-
-
-//================================================================================
-/*! Public -
- * \brief creates a CASCatch_CatchSignals
- */
-//================================================================================
-CASCatch_CatchSignals::CASCatch_CatchSignals()
- :myIsActivated(Standard_False)
-{
-
- Standard_Integer i = 0;
- for(; i<=MAX_HANDLER_NUMBER; i++)
- mySigStates[i] = NULL;
-}
-
-#ifndef WNT
-
-//================================ UNIX part ==================================================
-
-#include <OSD.hxx>
-#include <OSD_WhoAmI.hxx>
-#include <OSD_SIGHUP.hxx>
-#include <OSD_SIGINT.hxx>
-#include <OSD_SIGQUIT.hxx>
-#include <OSD_SIGILL.hxx>
-#include <OSD_SIGKILL.hxx>
-#include <OSD_SIGBUS.hxx>
-#include <OSD_SIGSEGV.hxx>
-#include <OSD_SIGSYS.hxx>
-#ifndef LIN
-#include <exception.h>
-#endif
-
-//==============================
-typedef void (ACT_SIGIO_HANDLER)(void) ;
-
-ACT_SIGIO_HANDLER *ADR_ACT_SIGIO_HANDLER = NULL ;
-
-typedef void (* SIG_PFV) (int);
-
-#ifdef SUN
-# include <floatingpoint.h>
-#endif
-
-#ifdef SOLARIS
-# include <floatingpoint.h>
-# include <sys/machsig.h>
-# include <stdlib.h>
-# include <stdio.h>
-#endif
-
-#include <signal.h>
-#include <sys/signal.h>
-
-#ifdef LIN
-# include <stdlib.h>
-# include <stdio.h>
-#else
-# ifdef SA_SIGINFO
-# ifndef AIX
-# include <sys/siginfo.h>
-# endif
-# endif
-#endif
-
-
-#ifdef IRIX
-# include <sigfpe.h>
-# include <sys/siginfo.h>
-#endif
-
-
-//================================================================================
-/*! Private -
- * \brief universal handler for signals
- */
-//================================================================================
-static void Handler(const OSD_Signals theSig, const OSD_Signals)
-{
- sigset_t set;
- sigemptyset(&set);
- sigaddset(&set, theSig);
- sigprocmask(SIG_UNBLOCK, &set, NULL) ;
-
- TCollection_AsciiString aMessage(theSig);
- aMessage+=" signal detected";
-
- CASCatch_Failure::Raise(aMessage.ToCString());
-}
-
-
-#ifdef SA_SIGINFO
-//================================================================================
-/*! Private -
- * \brief handler for SIGSEGV signal
- */
-//================================================================================
-static void SegvHandler(const OSD_Signals, const Standard_Address, const Standard_Address)
-{
- sigset_t set;
- sigemptyset(&set);
- sigaddset(&set, SIGSEGV);
- sigprocmask (SIG_UNBLOCK, &set, NULL);
-
- CASCatch_Failure::Raise("SIGSEGV detected");
-}
-#endif
-
-
-//================================================================================
-/*! Public -
- * \brief activates a signals handling
- */
-//================================================================================
-void CASCatch_CatchSignals::Activate()
-{
- if(myIsActivated) return;
-
- struct sigaction act;
-
- Standard_Integer i = 0;
- for(; i<=MAX_HANDLER_NUMBER; i++)
- mySigStates[i] = new struct sigaction(); //Initialize structures
-
- int stat;
- act.sa_handler = (SIG_PFV) &Handler ;
- sigemptyset(&act.sa_mask) ;
-
-
- stat = sigaction(SIGHUP,&act,(struct sigaction*)mySigStates[0]); // ...... hangup
- stat = sigaction(SIGFPE,&act,(struct sigaction*) mySigStates[1]); // ...... floating point exception
- stat = sigaction(SIGINT,&act,(struct sigaction*)mySigStates[2]); // ...... interrupt
- stat = sigaction(SIGQUIT,&act,(struct sigaction*)mySigStates[3]); // ...... quit
- stat = sigaction(SIGBUS,&act,(struct sigaction*)mySigStates[4]); // ...... bus error
- stat = sigaction(SIGILL,&act,(struct sigaction*)mySigStates[5]); // ...... illegal instruction
-
-#ifdef SA_RESTART
- act.sa_flags = SA_RESTART ;
-#else
- act.sa_flags = 0 ;
-#endif
- act.sa_handler = (SIG_PFV) &SegvHandler ;
-
-#ifdef SA_SIGINFO // OSF,SOLARIS,IRIX
- act.sa_flags = act.sa_flags | SA_SIGINFO ;
-# ifdef SOLARIS
- act.sa_sigaction = (void(*)(int, siginfo_t *, void*)) &SegvHandler ;
-# endif
-#endif
-
- stat = sigaction( SIGSEGV , &act , (struct sigaction*)mySigStates[6]); // ...... segmentation violation
-
- myIsActivated = Standard_True;
-}
-
-
-//================================================================================
-/*! Public -
- * \brief deactivates a signals handling
- */
-//================================================================================
-void CASCatch_CatchSignals::Deactivate()
-{
- if(!myIsActivated) return;
-
- struct sigaction oact;
- int stat;
-
- stat = sigaction(SIGHUP,(struct sigaction*)mySigStates[0],&oact); // ...... hangup
- stat = sigaction(SIGFPE,(struct sigaction*)mySigStates[1],&oact); // ...... floating point exception
- stat = sigaction(SIGINT,(struct sigaction*)mySigStates[2],&oact); // ...... interrupt
- stat = sigaction(SIGQUIT,(struct sigaction*)mySigStates[3],&oact); // ...... quit
- stat = sigaction(SIGBUS,(struct sigaction*)mySigStates[4],&oact); // ...... bus error
- stat = sigaction(SIGILL,(struct sigaction*)mySigStates[5],&oact); // ...... illegal instruction
- stat = sigaction(SIGSEGV,(struct sigaction*)mySigStates[6],&oact); // ...... segmentation violation
-
-
- Standard_Integer i = 0;
- for(; i<=MAX_HANDLER_NUMBER; i++)
- delete (struct sigaction*)mySigStates[i];
-
- myIsActivated = Standard_False;
-}
-
-
-
-#else
-//====================================== WNT part ====================================================
-#include <OSD_WNT_1.hxx>
-
-#include <process.h>
-#include <signal.h>
-#include <float.h>
-
-#define _OSD_FPX ( _EM_DENORMAL | _EM_INEXACT | _EM_UNDERFLOW | _EM_ZERODIVIDE | _EM_OVERFLOW) //Mask these exceptions
-
-//================================================================================
-/*! Private -
- * \brief handler for unexpected exceptions
- */
-//================================================================================
-static Standard_Integer WntHandler(const Standard_Address theExceptionInfo)
-{
- LPEXCEPTION_POINTERS lpXP = ( LPEXCEPTION_POINTERS )theExceptionInfo;
- DWORD dwExceptionCode = lpXP -> ExceptionRecord -> ExceptionCode;
-
- TCollection_AsciiString aMessage((Standard_Integer)dwExceptionCode);
- aMessage+=" Exception code - unexpected exception";
-
- CASCatch_Failure::Raise(aMessage.ToCString());
-
- return EXCEPTION_EXECUTE_HANDLER;
-}
-
-void SIGWntHandler(int , int ) ;
-static void (*SIGWNTHANDLER)(int) = ( void (*)(int) ) ( &SIGWntHandler ) ;
-
-
-//================================================================================
-/*! Private -
- * \brief handler for signals
- */
-//================================================================================
-static void SIGWntHandler(const int signum , const int theCode)
-{
-
- void (*OLDSIGWNTHANDLER)(int) ;
- switch( signum ) {
- case SIGFPE :
- _fpreset() ;
- _clearfp() ;
- _controlfp ( _OSD_FPX, _MCW_EM );
- OLDSIGWNTHANDLER = signal( signum , SIGWNTHANDLER );
-
- if(theCode == _FPE_UNDERFLOW || theCode == _FPE_INEXACT) return;
- CASCatch_Failure::Raise ("Floating point error");
- break;
- case SIGSEGV :
- OLDSIGWNTHANDLER = signal( signum , SIGWNTHANDLER );
- CASCatch_Failure::Raise("Access violation");
- break;
- case SIGILL :
- OLDSIGWNTHANDLER = signal( signum , SIGWNTHANDLER );
- CASCatch_Failure::Raise("Illegal instruction" );
- break;
- }
-}
-
-
-//================================================================================
-/*! Public -
- * \brief activates a signals handling
- */
-//================================================================================
-void CASCatch_CatchSignals::Activate()
-{
- if(myIsActivated) return;
-
- mySigStates[0] = SetUnhandledExceptionFilter (( LPTOP_LEVEL_EXCEPTION_FILTER )&WntHandler);
-
- myFloatOpWord = _controlfp(0, 0);
- _controlfp ( _OSD_FPX, _MCW_EM ); //Enable floating point exceptions
-
- mySigStates[1] = signal( SIGSEGV , SIGWNTHANDLER );
- mySigStates[2] = signal( SIGFPE , SIGWNTHANDLER );
- mySigStates[3] = signal( SIGILL , SIGWNTHANDLER );
-
- myIsActivated = Standard_True;
-}
-
-//================================================================================
-/*! Public -
- * \brief deactivates a signals handling
- */
-//================================================================================
-void CASCatch_CatchSignals::Deactivate()
-{
- if(!myIsActivated) return;
-
- SetUnhandledExceptionFilter (( LPTOP_LEVEL_EXCEPTION_FILTER )mySigStates[0]);
-
- _controlfp ( myFloatOpWord, _MCW_EM );
-
- signal( SIGSEGV , ( void (*)(int) )mySigStates[1]);
- signal( SIGFPE , ( void (*)(int) )mySigStates[2]);
- signal( SIGILL , ( void (*)(int) )mySigStates[3]);
-
- Standard_Integer i = 0;
- for(; i<=MAX_HANDLER_NUMBER; i++)
- mySigStates[i] = NULL;
-
- myIsActivated = Standard_False;
-}
-
-#endif
-
-//================================================================================
-/*! Private -
- * \brief deactivates a signals handling
- */
-//================================================================================
-void CASCatch_CatchSignals::Destroy()
-{
- if(myIsActivated) Deactivate();
-}
-
+++ /dev/null
-// Copyright (C) 2005 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 _CASCatch_CatchSignals_HeaderFile
-#define _CASCatch_CatchSignals_HeaderFile
-
-#include <Standard.hxx>
-
-/*!
- * \class CASCatch_CatchSignals
- * \brief This class controls an exception handling
- *
- */
-class CASCatch_CatchSignals {
-
-public:
-
- // Methods PUBLIC
- //
-Standard_EXPORT CASCatch_CatchSignals();
-Standard_EXPORT void Destroy() ;
-~CASCatch_CatchSignals() { Destroy(); }
-Standard_EXPORT void Activate() ;
-Standard_EXPORT void Deactivate() ;
-
-private:
-
-/*!\var mySigStates[7], private
- * \brief stores signals' handler functions
- */
-Standard_Address mySigStates[7];
-
-/*!\var myFloatOpWord
- * \brief stores a float operation word, private
- */
-Standard_Integer myFloatOpWord;
-
-/*!\var myIsActivated
- * \brief stores a flag whether a catcher is activated, private]
- */
-Standard_Boolean myIsActivated;
-
-};
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 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
-//
-
-#ifdef NO_CXX_EXCEPTION
-
-#include "CASCatch_ErrorHandler.hxx"
-
-// During setjmp()/longjmp() K_SETJMP_CASCatch is non zero (try)
-// So if there is an abort request and if K_SETJMP_CASCatch is non zero, the abort
-// request will be ignored. If the abort request do a raise during a setjmp
-// or a longjmp, there will be a "terminating SEGV" impossible to handle.
-
-
-Standard_EXPORT int K_SETJMP_CASCatch = 0 ;
-
-static Handle(CASCatch_Failure) GlbError; //Last caught Error, Null if there is no error
-
-static CASCatch_ErrorHandler* Top = 0; //The top of the Errors Stack
-
-//=======================================================================
-//function : CASCatch_ErrorHandler
-//purpose : Constructor
-//=======================================================================
-CASCatch_ErrorHandler::CASCatch_ErrorHandler ()
-{
- Previous = Top;
- Top = this;
- CaughtError.Nullify();
- GlbError.Nullify();
-}
-
-//=======================================================================
-//function : ~CASCatch_ErrorHandler
-//purpose : Destructor : Delete the ErrorHandler and Abort if there is a 'Error'.
-//=======================================================================
-CASCatch_ErrorHandler::~CASCatch_ErrorHandler()
-{
- Top = Top->Previous;
- if( !GlbError.IsNull() ) Abort();
-}
-
-//=======================================================================
-//function : Abort: make a longjmp to the saved Context.
-//purpose : Abort if there is a non null 'Error'
-//=======================================================================
-void CASCatch_ErrorHandler::Abort ()
-{
- //==== Check if can do the "longjmp" =======================================
- if(Top == NULL || Top->Label == NULL) {
- cout << "*** Abort *** an exception was raised, but no catch was found." << endl;
- cout << "\t... The exception is:" << GlbError;
- exit(1);
- }
-
-#ifdef DO_ABORT
- if ( K_SETJMP_CASCatch )
- cout << "Recursive abort ===> Terminating SEGV ..." << endl ;
- K_SETJMP_CASCatch = 1 ;
-#endif
-
- longjmp(Top->Label, Standard_True);
-}
-
-//=======================================================================
-//function : Catches
-//purpose : If there is a 'Error', and it is in good type
-// returns True and clean 'Error', else returns False.
-//=======================================================================
-Standard_Boolean CASCatch_ErrorHandler::Catches
- (const Handle(Standard_Type)& AType)
-{
-#ifdef DO_ABORT
- K_SETJMP_CASCatch = 0 ;
-#endif
- if(GlbError.IsNull())
- return Standard_False;
-
- if(GlbError->IsKind(AType)){
- CaughtError = GlbError;
- GlbError.Nullify();
- return Standard_True;
- } else {
- return Standard_False;
- }
-}
-
-//=======================================================================
-//function : LastCaughtError
-//purpose :
-//=======================================================================
-Handle(CASCatch_Failure) CASCatch_ErrorHandler::LastCaughtError()
-{
- return Top->CaughtError;
-}
-
-//=======================================================================
-//function : Error
-//purpose :
-//=======================================================================
-void CASCatch_ErrorHandler::Error(const Handle(CASCatch_Failure)& aError)
-{
- GlbError = aError;
-}
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 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 _CASCatch_ErrorHandler_HeaderFile
-#define _CASCatch_ErrorHandler_HeaderFile
-
-#include "CASCatch_Failure.hxx"
-
-#include <stdlib.h>
-#include <setjmp.h>
-
-
-extern int K_SETJMP_CASCatch ;
-
-/*!
- * \class CASCatch_ErrorHandler
- * \brief This class is an exception handler, private
- *
- */
-class CASCatch_ErrorHandler
-{
- friend class CASCatch_Failure; // To execute the raise exception.
-
- public:
-
- Standard_EXPORT CASCatch_ErrorHandler();
- Standard_EXPORT ~CASCatch_ErrorHandler();
- Standard_EXPORT Standard_Boolean Catches (const Handle(Standard_Type)&);
-
- private:
- Standard_EXPORT static void Abort();
- Standard_EXPORT static void Error(const Handle(CASCatch_Failure)&);
- Standard_EXPORT static Handle(CASCatch_Failure) LastCaughtError();
-
- //==== The fields ===========================================================
- private:
- CASCatch_ErrorHandler* Previous;
- Handle(CASCatch_Failure) CaughtError;
-
- public:
- jmp_buf Label;
-
-};
-
-#undef CASCatch_TRY
-#define CASCatch_TRY try
-
-#undef CASCatch_CATCH
-#define CASCatch_CATCH catch
-
-
-#ifdef NO_CXX_EXCEPTION
-# undef CASCatch_TRY
-# undef CASCatch_CATCH
-
-# if defined(DO_ABORT)
-
-# define DoesNotAbort_CASCatch(aHandler) !(K_SETJMP_CASCatch = setjmp(aHandler.Label))
-
-# define CASCatch_TRY CASCatch_ErrorHandler _Function; \
- K_SETJMP_CASCatch = 1 ; \
- if(DoesNotAbort_CASCatch(_Function))
-
-# else //If DO_ABORT is not defined
-# define DoesNotAbort_CASCatch(aHandler) !setjmp(aHandler.Label)
-
-# define CASCatch_TRY CASCatch_ErrorHandler _Function; \
- if(DoesNotAbort_CASCatch(_Function))
-# endif //DO_ABORT
-
-
-# define CASCatch_CATCH(Error) else if(_Function.Catches(STANDARD_TYPE(Error)))
-#endif //NO_CXX_EXCEPTION
-
-#endif //_CASCatch_ErrorHandler_HeaderFile
+++ /dev/null
-// Copyright (C) 2005 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 "CASCatch_Failure.hxx"
-#include "CASCatch_ErrorHandler.hxx"
-#include <Standard_TypeMismatch.hxx>
-#include <Standard_Type.hxx>
-#include <string.h>
-
-IMPLEMENT_STANDARD_HANDLE( CASCatch_Failure, Standard_Transient )
-IMPLEMENT_STANDARD_RTTIEXT( CASCatch_Failure, Standard_Transient )
-
-
-#ifndef NO_CXX_EXCEPTION
-static Handle(CASCatch_Failure) RaisedError;
-#endif
-
-//================================================================================
-/*! Public -
- * \brief creates a CASCatch_Failure
- */
-//================================================================================
-CASCatch_Failure::CASCatch_Failure () { myMessage = "Signal detected";}
-
-
-//================================================================================
-/*! Public -
- * \brief creates a CASCatch_Failure with a message
- * \param an exception message
- */
-//================================================================================
-CASCatch_Failure::CASCatch_Failure (const Standard_CString AString)
-{
- if(AString) {
- myMessage = new Standard_Character[strlen(AString) + 1];
- strcpy(myMessage,AString);
- }
-}
-
-//================================================================================
-/*! Public -
- * \brief returns the last caught exception
- */
-//================================================================================
-Handle(CASCatch_Failure) CASCatch_Failure::Caught()
-{
-#ifdef NO_CXX_EXCEPTION
- return CASCatch_ErrorHandler::LastCaughtError();
-#else
- return RaisedError ;
-#endif
-}
-
-//================================================================================
-/*! Public -
- * \brief raises a CASCatch_Failure exception
- * \param an exception message
- */
-//================================================================================
-void CASCatch_Failure::Raise (const Standard_CString AString)
-{
- Handle(CASCatch_Failure) E = new CASCatch_Failure() ;
- E->Reraise (AString) ;
-}
-
-
-//================================================================================
-/*! Public -
- * \brief re-raises a CASCatch_Failure exception
- * \param an exception message
- */
-//================================================================================
-void CASCatch_Failure::Reraise (const Standard_CString AString)
-{
- if(AString){
- myMessage = new Standard_Character[strlen(AString) + 1];
- strcpy(myMessage,AString);
- }
-
-#ifdef NO_CXX_EXCEPTION
- CASCatch_ErrorHandler::Error(this) ;
- CASCatch_ErrorHandler::Abort();
-#else
- RaisedError = this ;
- Throw() ;
-#endif
-}
-
-//================================================================================
-/*! Public -
- * \brief returns an exception message
- */
-//================================================================================
-Standard_CString CASCatch_Failure::GetError() const
-{
- return myMessage;
-}
-
-//================================================================================
-/*! Public -
- * \brief Is called when using standard C++ exceptions
- */
-//================================================================================
-void CASCatch_Failure::Throw() const
-{
-#ifndef NO_CXX_EXCEPTION
- throw CASCatch_Failure() ;
-#endif
-}
-
+++ /dev/null
-// Copyright (C) 2005 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 _CASCATCH_FAILURE_HeaderFile
-#define _CASCATCH_FAILURE_HeaderFile
-
-#include <Standard_Transient.hxx>
-#include <Standard_DefineHandle.hxx>
-DEFINE_STANDARD_HANDLE( CASCatch_Failure, Standard_Transient )
-
-#include <Standard.hxx>
-
-/*!
- * \class CASCatch_Failure
- * \brief This class presents an exception to be thrown
- *
- */
-class CASCatch_Failure : public Standard_Transient
-{
-
-public:
-
-Standard_EXPORT CASCatch_Failure();
-Standard_EXPORT CASCatch_Failure(const Standard_CString aString);
-Standard_EXPORT void Reraise(const Standard_CString aMessage) ;
-Standard_EXPORT Standard_CString GetError() const;
-Standard_EXPORT static Handle_CASCatch_Failure Caught() ;
-Standard_EXPORT static void Raise(const Standard_CString aMessage = "") ;
-Standard_EXPORT virtual void Throw() const;public:
-
-public:
-
-DEFINE_STANDARD_RTTI( CASCatch_Failure )
-
-private:
-/*!\var myMessage
- * \brief stores an exception message
- */
-Standard_CString myMessage;
-
-};
-
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
-# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
-# 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
-#
-# File : Makefile.in
-# Author : Sergey RUIN (OCN)
-# Module : SALOME
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-
-salomeinclude_HEADERS = CASCatch.hxx \
- CASCatch_CatchSignals.hxx \
- CASCatch_ErrorHandler.hxx \
- CASCatch_Failure.hxx
-
-lib_LTLIBRARIES = libCASCatch.la
-libCASCatch_la_SOURCES = \
- CASCatch_CatchSignals.cxx \
- CASCatch_ErrorHandler.cxx \
- CASCatch_Failure.cxx
-
-COMMON_CPPFLAGS = \
- @CAS_CPPFLAGS@ @CAS_CXXFLAGS@
-
-libCASCatch_la_CPPFLAGS = $(COMMON_CPPFLAGS)
-libCASCatch_la_LIBADD = $(CAS_KERNEL)
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 DDS_H
-#define DDS_H
-
-#include <TCollection_AsciiString.hxx>
-
-#include <NCollection_DefineDataMap.hxx>
-#include <NCollection_DefineBaseCollection.hxx>
-
-#define UNIT_SYSTEM_SI "SI"
-
-typedef enum { DDS_MT_OK, DDS_MT_WARNING,
- DDS_MT_ERROR, DDS_MT_ALARM,
- DDS_MT_INFO, DDS_MT_NONE } DDS_MsgType;
-
-DEFINE_BASECOLLECTION(DDS_BaseColOfAsciiString,TCollection_AsciiString)
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "DDS_DicGroup.h"
-
-#include "DDS_Dictionary.h"
-
-#include <LDOMString.hxx>
-#include <LDOM_Element.hxx>
-
-#include <UnitsAPI.hxx>
-
-#include <TColStd_SequenceOfAsciiString.hxx>
-
-#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
-
-IMPLEMENT_STANDARD_HANDLE(DDS_DicGroup, MMgt_TShared)
-IMPLEMENT_STANDARD_RTTIEXT(DDS_DicGroup, MMgt_TShared)
-
-/*!
- \class DDS_DicGroup
-
- This class to provide set of DDS_DicItem objects from one component.
-*/
-
-/*!
- Constructor. Create the group with name \aname.
-*/
-DDS_DicGroup::DDS_DicGroup( const TCollection_AsciiString& name )
-: MMgt_TShared(),
-myName( name ),
-myActiveSystem( UNIT_SYSTEM_SI )
-{
-}
-
-/*!
- Copy constructor.
-*/
-DDS_DicGroup::DDS_DicGroup( const DDS_DicGroup& )
-{
-}
-
-/*!
- Get the name of group (component).
-*/
-TCollection_AsciiString DDS_DicGroup::GetName() const
-{
- return myName;
-}
-
-/*!
- Returns the names list of defined unit systems.
- Parameter \atheSystems will contains the sequence of string names.
-*/
-void DDS_DicGroup::GetUnitSystems( TColStd_SequenceOfAsciiString& theSystemSeq ) const
-{
- theSystemSeq.Clear();
- for ( UnitSystemMap::Iterator it( myUnitSystem ); it.More(); it.Next() )
- {
- if ( it.Key() == TCollection_AsciiString( UNIT_SYSTEM_SI ) )
- theSystemSeq.Prepend( it.Key() );
- else
- theSystemSeq.Append( it.Key() );
- }
-}
-
-/*!
- Returns the label of unit system \aname. If unit system not found then empty string returned.
-*/
-TCollection_ExtendedString DDS_DicGroup::GetUnitSystemLabel( const TCollection_AsciiString& name ) const
-{
- TCollection_ExtendedString aLabel;
- if ( myUnitSystem.IsBound( name ) )
- aLabel = myUnitSystem.Find( name );
- return aLabel;
-}
-
-/*!
- Gets the name of active unit system.
-*/
-TCollection_AsciiString DDS_DicGroup::GetActiveUnitSystem() const
-{
- return myActiveSystem;
-}
-
-/*!
- Sets the name of active unit system.
-*/
-void DDS_DicGroup::SetActiveUnitSystem( const TCollection_AsciiString& theSystem )
-{
- if ( myUnitSystem.IsBound( theSystem ) )
- myActiveSystem = theSystem;
-}
-
-/*!
- Assignment operator.
-*/
-void DDS_DicGroup::operator=( const DDS_DicGroup& )
-{
-}
-
-/*!
- Fill the internal data structures from XML parsed structures. Internal.
-*/
-void DDS_DicGroup::FillDataMap( const LDOM_Element& theComponentData, const LDOM_Element& theDocElement )
-{
- TCollection_AsciiString aCompName = theComponentData.getAttribute( DDS_Dictionary::KeyWord( "COMPONENT_NAME" ) );
-
- LDOM_Element systems = theComponentData.GetChildByTagName( DDS_Dictionary::KeyWord( "UNIT_SYSTEMS" ) );
- if ( !systems.isNull() )
- {
- LDOM_NodeList systemList = systems.getElementsByTagName( DDS_Dictionary::KeyWord( "UNIT_SYSTEM" ) );
- for ( Standard_Integer i = 0; i < systemList.getLength(); i++ )
- {
- //const LDOM_Element& aSystem = (const LDOM_Element &)systemList.item( i );
- LDOM_Node aNode = systemList.item( i );
- const LDOM_Element& anElem = (const LDOM_Element&) aNode;
- LDOM_Element aSystem(anElem);
- TCollection_AsciiString aName = aSystem.getAttribute( DDS_Dictionary::KeyWord( "UNIT_SYSTEM_NAME" ) );
- TCollection_ExtendedString aLabel = aSystem.getAttribute( DDS_Dictionary::KeyWord( "UNIT_SYSTEM_LABEL" ) );
-
- if ( aName.IsEmpty() )
- continue;
-
- if ( !myUnitSystem.IsBound( aName ) )
- myUnitSystem.Bind( aName, aLabel );
- }
- }
-
- if ( !myUnitSystem.IsBound( UNIT_SYSTEM_SI ) )
- {
- printf( "Warning: Mandatory unit system SI not defined in component: \"%s\". Added automaticaly", aCompName.ToCString() );
- myUnitSystem.Bind( UNIT_SYSTEM_SI, TCollection_ExtendedString( "System international" ) );
- }
-
- TColStd_SequenceOfAsciiString unitSystems;
- GetUnitSystems( unitSystems );
-
- LDOM_NodeList aData = theComponentData.getElementsByTagName( DDS_Dictionary::KeyWord( "DATUM" ) );
- if ( !aData.getLength() )
- return;
-
- for ( Standard_Integer i = 0; i < aData.getLength(); i++ )
- {
- //LDOM_Element aQuantity = (const LDOM_Element&)aData.item( i );
- LDOM_Node aNode = aData.item( i );
- const LDOM_Element& anElem = (const LDOM_Element&) aNode;
- LDOM_Element aQuantity(anElem);
-
- // 1. Attributes (id,label,units?,format?,required?)
- TCollection_AsciiString anID = aQuantity.getAttribute( DDS_Dictionary::KeyWord( "DATUM_ID" ) );
- Handle(DDS_DicItem) aDicItem = new DDS_DicItem();
-
- aDicItem->myComponent = this;
- aDicItem->FillDataMap( anID, aQuantity, theComponentData, theDocElement, unitSystems );
- myDataMap.Add( anID, aDicItem );
- }
-}
-
-/*!
- Gets dictionary item with specified identifier \atheID.
- If dictionary item not found then null handle returned.
-*/
-Handle(DDS_DicItem) DDS_DicGroup::GetDicItem( const TCollection_AsciiString& theID ) const
-{
- Handle(DDS_DicItem) aDicItem;
- // get dictionary item by id
- if ( myDataMap.Contains( theID ) )
- aDicItem = myDataMap.FindFromKey( theID );
-
- return aDicItem;
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 DDS_DICGROUP_H
-#define DDS_DICGROUP_H
-
-#include "DDS.h"
-
-#include "DDS_DicItem.h"
-
-#include <MMgt_TShared.hxx>
-
-#include <TCollection_AsciiString.hxx>
-
-#include <NCollection_List.hxx>
-
-class LDOM_Element;
-class TColStd_SequenceOfAsciiString;
-
-DEFINE_STANDARD_HANDLE(DDS_DicGroup, MMgt_TShared)
-
-class DDS_DicGroup : public MMgt_TShared
-{
-public:
- DDS_DicGroup( const TCollection_AsciiString& );
-
- TCollection_AsciiString GetName() const;
-
- Standard_EXPORT Handle(DDS_DicItem) GetDicItem( const TCollection_AsciiString& ) const;
-
- Standard_EXPORT void GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
- Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
-
- Standard_EXPORT TCollection_AsciiString GetActiveUnitSystem() const;
- Standard_EXPORT void SetActiveUnitSystem( const TCollection_AsciiString& );
-
-private:
- DDS_DicGroup( const DDS_DicGroup& );
-
- void operator=( const DDS_DicGroup& );
-
- void FillDataMap( const LDOM_Element&, const LDOM_Element& );
-
-private:
- typedef NCollection_DataMap<TCollection_AsciiString,
- TCollection_ExtendedString> UnitSystemMap;
-
-private:
- TCollection_AsciiString myName;
- DDS_IndexedDataMapOfDicItems myDataMap;
- UnitSystemMap myUnitSystem;
- TCollection_AsciiString myActiveSystem;
-
- friend class DDS_Dictionary;
-
-public:
- DEFINE_STANDARD_RTTI(DDS_DicGroup)
-};
-
-DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicGroups, Handle(DDS_DicGroup))
-DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicGroups, DDS_BaseCollectionOfDicGroups,
- TCollection_AsciiString, Handle(DDS_DicGroup))
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "DDS_DicItem.h"
-#include "DDS_Dictionary.h"
-
-#include <TColStd_SequenceOfInteger.hxx>
-#include <TColStd_SequenceOfExtendedString.hxx>
-
-#include <LDOM_Text.hxx>
-#include <LDOMString.hxx>
-#include <LDOM_Element.hxx>
-
-#include <UnitsAPI.hxx>
-#include <Units_Dimensions.hxx>
-
-#include <TColStd_MapOfReal.hxx>
-#include <TColStd_SequenceOfAsciiString.hxx>
-
-IMPLEMENT_STANDARD_HANDLE(DDS_DicItem, MMgt_TShared)
-IMPLEMENT_STANDARD_RTTIEXT(DDS_DicItem, MMgt_TShared)
-
-/*!
- \class DDS_DicItem
-
- This class to provide information about datum (phisical characteristic parameter).
-*/
-
-/*!
- Constructor. Creates the instance of empty dictionary item.
-*/
-DDS_DicItem::DDS_DicItem()
-: myType( 0 ),
-myDefValue( 0 ),
-myMax( 0 ),
-myMin( 0 ),
-myMinZoom( 0.1 ),
-myMaxZoom( 10 ),
-myZoomOrder( 2 )
-{
-}
-
-/*!
- Copy constructor. Internal.
-*/
-DDS_DicItem::DDS_DicItem( const DDS_DicItem& )
-{
-}
-
-/*!
- Assignment operator. Internal.
-*/
-void DDS_DicItem::operator=( const DDS_DicItem& )
-{
-}
-
-/*!
- Gets the identifier of parameter.
-*/
-TCollection_AsciiString DDS_DicItem::GetId() const
-{
- return myId;
-}
-
-/*!
- Gets the type of parameter.
-*/
-DDS_DicItem::Type DDS_DicItem::GetType() const
-{
- return (DDS_DicItem::Type)myType;
-}
-
-/*!
- Gets the label of the parameter.
-*/
-TCollection_ExtendedString DDS_DicItem::GetLabel() const
-{
- return myLabel;
-}
-
-/*!
- Gets the filter (regular expression) for the parameter values.
-*/
-TCollection_ExtendedString DDS_DicItem::GetFilter() const
-{
- return myFilter;
-}
-
-/*!
- Gets the Required attribute of the parameter.
-*/
-TCollection_ExtendedString DDS_DicItem::GetRequired() const
-{
- return myRequired;
-}
-
-/*!
- Gets the wrong value warning level of the parameter.
-*/
-DDS_MsgType DDS_DicItem::GetWarningLevel() const
-{
- return (DDS_MsgType)myWarnLevel;
-}
-
-/*!
- Gets the long description of the parameter.
-*/
-TCollection_ExtendedString DDS_DicItem::GetLongDescription() const
-{
- return myLongDescr;
-}
-
-/*!
- Gets the short description of the parameter.
-*/
-TCollection_ExtendedString DDS_DicItem::GetShortDescription() const
-{
- return myShortDescr;
-}
-
-/*!
- Gets the name of component - owner of parameter.
-*/
-TCollection_AsciiString DDS_DicItem::GetComponent() const
-{
- TCollection_AsciiString aCompName;
- Handle(DDS_DicGroup) aComponent = Handle(DDS_DicGroup)::DownCast(myComponent);
- if ( !aComponent.IsNull() )
- aCompName = aComponent->GetName();
- return aCompName;
-}
-
-/*!
- Gets the parameter unit of measure for active unit system.
-*/
-TCollection_AsciiString DDS_DicItem::GetUnits() const
-{
- return GetUnits( GetActiveUnitSystem() );
-}
-
-/*!
- Gets the parameter unit of measure for specified unit system \atheSystem.
- If specified unit system doesn't exist then empty string returned.
-*/
-TCollection_AsciiString DDS_DicItem::GetUnits( const UnitSystem& theSystem ) const
-{
- TCollection_AsciiString anUnits;
- UnitData* unitData = GetUnitData( theSystem );
- if ( unitData )
- anUnits = unitData->myUnits;
- return anUnits;
-}
-
-/*!
- Gets the minimum value of parameter for active unit system.
- Returned value converted to SI.
-*/
-Standard_Real DDS_DicItem::GetMinValue() const
-{
- return GetMinValue( GetActiveUnitSystem() );
-}
-
-/*!
- Gets the minimum value of parameter for specified unit system \atheSystem.
- Returned value converted to SI.
-*/
-Standard_Real DDS_DicItem::GetMinValue( const UnitSystem& theUnitsSystem ) const
-{
- return FromSI( myMin, theUnitsSystem );
-}
-
-/*!
- Gets the maximum value of parameter for active unit system.
- Returned value converted to SI.
-*/
-Standard_Real DDS_DicItem::GetMaxValue() const
-{
- return GetMaxValue( GetActiveUnitSystem() );
-}
-
-/*!
- Gets the maximum value of parameter for specified unit system \atheSystem.
- Returned value converted to SI.
-*/
-Standard_Real DDS_DicItem::GetMaxValue( const UnitSystem& theUnitsSystem ) const
-{
- return FromSI( myMax, theUnitsSystem );
-}
-
-/*!
- Gets the precision (number of digit after decimal point) of parameter for active unit system.
-*/
-Standard_Integer DDS_DicItem::GetPrecision() const
-{
- return GetPrecision( GetActiveUnitSystem() );
-}
-
-/*!
- Gets the precision (number of digit after decimal point) of parameter for specified
- unit system \atheSystem. If specified unit system doesn't exist then zero returned.
-*/
-Standard_Integer DDS_DicItem::GetPrecision( const UnitSystem& theSystem ) const
-{
- Standard_Integer aRes = 0;
- UnitData* unitData = GetUnitData( theSystem );
- if ( unitData )
- aRes = unitData->myPrecision;
- return aRes;
-}
-
-/*!
- Gets the default value of parameter for active unit system. Default value returned as string.
- If type of value is numeric (Float or Integer) and default value defined then returned number
- converted to SI.
-*/
-TCollection_ExtendedString DDS_DicItem::GetDefaultValue() const
-{
- return GetDefaultValue( GetActiveUnitSystem() );
-}
-
-/*!
- Gets the default value of parameter for specified unit system \atheSystem. Default value returned
- as string. If type of value is numeric (Float or Integer) and default value defined then returned
- number converted to SI.
-*/
-TCollection_ExtendedString DDS_DicItem::GetDefaultValue( const UnitSystem& theSystem ) const
-{
- if ( !myDefString.Length() )
- return myDefString;
-
- TCollection_ExtendedString aStr;
-
- switch ( myType )
- {
- case Float:
- case Integer:
- aStr = FromSI( myDefValue, theSystem );
- break;
- case List:
- case String:
- aStr = myDefString;
- break;
- default:
- break;
- }
- return aStr;
-}
-
-/*!
- Gets the format string of parameter for active unit system. If argument \atheCanonical
- is true then format string will be reduced to sprintf() specification (without extra
- non standard qualifiers).
-*/
-TCollection_AsciiString DDS_DicItem::GetFormat( const Standard_Boolean theCanonical ) const
-{
- return GetFormat( GetActiveUnitSystem(), theCanonical );
-}
-
-/*!
- Gets the format string of parameter for specified unit system \atheSystem. If argument
- \atheCanonical is true then format string will be reduced to sprintf() specification
- (without extra non standard qualifiers).
-*/
-TCollection_AsciiString DDS_DicItem::GetFormat( const UnitSystem& theSystem,
- const Standard_Boolean theCanonical ) const
-{
- TCollection_AsciiString aFormat;
- UnitData* unitData = GetUnitData( theSystem );
- if ( unitData )
- aFormat = unitData->myFormat;
-
- if ( theCanonical && aFormat.Length() > 1 )
- {
- static TCollection_AsciiString f;
- f = aFormat;
- Standard_Boolean isRemoved = false;
- while ( !isRemoved )
- {
- char ch = f.Value( f.Length() - 1 );
- if ( ( ch != '%' && ch != '.' && !IsDigit( ch ) ) && f.Length() > 1 )
- f.Remove( f.Length() - 1 );
- else
- isRemoved = true;
- }
- aFormat = f;
- }
-
- return aFormat;
-}
-
-/*!
- Gets name of a list referenced by the parameter. This string is empty if the list
- refernce is not defined - then use other properties: Type, DefaultValue, MaxValue, MinValue
-*/
-TCollection_ExtendedString DDS_DicItem::GetNameOfValues() const
-{
- return myListName;
-}
-
-/*!
- Gets item names and item ids of a list referenced by the parameter. This sequences is empty if
- the list reference is not defined - then use other properties: Type, DefaultValue, MaxValue, MinValue
-*/
-Standard_Boolean DDS_DicItem::GetListOfValues( Handle(TColStd_HArray1OfExtendedString)& theStrings,
- Handle(TColStd_HArray1OfInteger)& theIntegers ) const
-{
- theStrings = myListRef;
- theIntegers = myListRefID;
- return !theIntegers.IsNull() && !theStrings.IsNull();
-}
-
-/*!
- Gets item names, item ids and item icons of a list referenced by the parameter. This sequences is empty
- if the list reference is not defined - then use other properties: Type, DefaultValue, MaxValue, MinValue
-*/
-Standard_Boolean DDS_DicItem::GetListOfValues( Handle(TColStd_HArray1OfExtendedString)& theStrings,
- Handle(TColStd_HArray1OfInteger)& theIntegers,
- Handle(TColStd_HArray1OfExtendedString)& theIcons ) const
-{
- theStrings = myListRef;
- theIntegers = myListRefID;
- theIcons = myListRefIcons;
- return !theIntegers.IsNull() && !theStrings.IsNull() && !theIcons.IsNull();
-}
-
-
-/*!
- Gets special values of the parameter.
-*/
-Standard_Boolean DDS_DicItem::GetSpecialValues( TColStd_MapOfReal& theMap ) const
-{
- theMap.Clear();
- if ( !myListRef.IsNull() )
- {
- for ( Standard_Integer i = myListRef->Lower(); i <= myListRef->Upper(); i++ )
- {
- if ( myListRef->Value( i ).IsAscii() )
- {
- TCollection_AsciiString aStr( myListRef->Value( i ) );
- if ( aStr.IsRealValue() )
- theMap.Add( aStr.RealValue() );
- }
- }
- }
-
- return theMap.Extent() > 0;
-}
-
-/*!
- Gets minimum value of lateral zooming
-*/
-Standard_Real DDS_DicItem::GetMinZoom() const
-{
- return myMinZoom;
-}
-
-/*!
- Gets maximum value of lateral zooming
-*/
-Standard_Real DDS_DicItem::GetMaxZoom() const
-{
- return myMaxZoom;
-}
-
-/*!
- Gets order of lateral zooming
-*/
-Standard_Real DDS_DicItem::GetZoomOrder() const
-{
- return myZoomOrder;
-}
-
-/*!
- Convert value \atheVal to default SI units according to active unit system.
-*/
-Standard_Real DDS_DicItem::ToSI( const Standard_Real theVal ) const
-{
- return ToSI( theVal, GetActiveUnitSystem() );
-}
-
-/*!
- Convert value \atheVal from default SI units according to active unit system.
-*/
-Standard_Real DDS_DicItem::FromSI( const Standard_Real theVal ) const
-{
- return FromSI( theVal, GetActiveUnitSystem() );
-}
-
-/*!
- Convert value to default SI units according to unit system \atheUnitsSystem.
-*/
-Standard_Real DDS_DicItem::ToSI( const Standard_Real theVal, const UnitSystem& theUnitsSystem ) const
-{
- Standard_Real aRes = theVal;
- UnitData* anUnitData = GetUnitData( theUnitsSystem );
- if ( anUnitData )
- aRes = anUnitData->myZero + aRes * anUnitData->myScale;
- return aRes;
-}
-
-/*!
- Convert value from default SI units according to unit system \atheUnitsSystem.
-*/
-Standard_Real DDS_DicItem::FromSI( const Standard_Real theVal, const UnitSystem& theUnitsSystem ) const
-{
- Standard_Real aRes = theVal;
- UnitData* anUnitData = GetUnitData( theUnitsSystem );
- if ( anUnitData )
- aRes = ( aRes - anUnitData->myZero ) / anUnitData->myScale;
- return aRes;
-}
-
-/*!
- Returns 'true' if data specified by \aflag exist.
-*/
-Standard_Boolean DDS_DicItem::HasData( const Standard_Integer flag ) const
-{
- return ( myData & flag ) == flag;
-}
-
-/*!
- Returns options for specified name \aname. If option not found then empty string returned.
-*/
-TCollection_ExtendedString DDS_DicItem::GetOption( const TCollection_AsciiString& name ) const
-{
- TCollection_ExtendedString res;
- if ( myOptions.IsBound( name ) )
- res = myOptions.Find( name );
- return res;
-}
-
-/*!
- Returns names list of existing options in the specified sequence \anames.
- If list not empty retunrs 'true' otherwise 'false'.
-*/
-Standard_Boolean DDS_DicItem::GetOptionNames( TColStd_SequenceOfAsciiString& names ) const
-{
- names.Clear();
-
- for ( OptionsMap::Iterator it( myOptions ); it.More(); it.Next() )
- names.Append( it.Key() );
-
- return !names.IsEmpty();
-}
-
-
-/*!
- Parse record in XML file and retrieve information relevant for this dictionary item
-*/
-void DDS_DicItem::FillDataMap( TCollection_AsciiString theID, const LDOM_Element& theDatum,
- const LDOM_Element& theCompElement, const LDOM_Element& theDocElement,
- const TColStd_SequenceOfAsciiString& theSystems )
-{
- TCollection_AsciiString aLabel = theDatum.getAttribute( DDS_Dictionary::KeyWord( "DATUM_LABEL" ) );
- TCollection_AsciiString aFormat = theDatum.getAttribute( DDS_Dictionary::KeyWord( "DATUM_FORMAT" ) );
- TCollection_AsciiString aFilter = theDatum.getAttribute( DDS_Dictionary::KeyWord( "DATUM_FILTER" ) );
- TCollection_AsciiString aRequired = theDatum.getAttribute( DDS_Dictionary::KeyWord( "DATUM_REQUIRED" ) );
-
- TCollection_AsciiString aBaseKeyWord = DDS_Dictionary::KeyWord( "DATUM_UNITS" );
-
- for ( Standard_Integer j = 1; j <= theSystems.Length(); j++ )
- {
- UnitSystem anUnitSystem = theSystems.Value( j );
- if ( !anUnitSystem.Length() )
- continue;
-
- TCollection_AsciiString aUnitKeyword = anUnitSystem + aBaseKeyWord;
-
- if ( !myUnitData.IsBound( anUnitSystem ) )
- myUnitData.Bind( anUnitSystem, UnitData() );
-
- UnitData& anUnitData = myUnitData.ChangeFind( anUnitSystem );
- anUnitData.myUnits = theDatum.getAttribute( LDOMString( aUnitKeyword.ToCString() ) );
- }
-
- if ( theSystems.Length() && myUnitData.IsBound( theSystems.First() ) &&
- !myUnitData.Find( theSystems.First() ).myUnits.Length() )
- {
- TCollection_AsciiString units = theDatum.getAttribute( LDOMString( aBaseKeyWord.ToCString() ) );
- if ( units.Length() )
- myUnitData.ChangeFind( theSystems.First() ).myUnits = units;
- }
-
- TCollection_AsciiString units;
- for ( NCollection_DataMap<UnitSystem, UnitData>::Iterator iter( myUnitData ); iter.More() && units.IsEmpty(); iter.Next() )
- units = iter.Value().myUnits;
-
- for ( NCollection_DataMap<UnitSystem, UnitData>::Iterator itr( myUnitData ); itr.More(); itr.Next() )
- {
- UnitData& dataUnits = itr.ChangeValue();
- if ( dataUnits.myUnits.IsEmpty() )
- dataUnits.myUnits = units;
- }
-
- // 2. Elements ( domain, description )
- Standard_Real aRealMinV = 0;
- Standard_Real aRealMaxV = 0;
- Standard_Real aRealDefV = 0;
-
- TCollection_AsciiString aType;
-
- DDS_MsgType aWrongValue = DDS_MT_NONE;
- DDS_DicItem::Type aEnumType = DDS_DicItem::Unknown;
-
- TCollection_AsciiString aMinV;
- TCollection_AsciiString aMaxV;
- TCollection_AsciiString aDefV;
- TCollection_AsciiString aListName;
-
- TCollection_AsciiString aLongD;
- TCollection_AsciiString aShortD;
-
- TColStd_SequenceOfInteger aSeqOfValueID;
- TColStd_SequenceOfExtendedString aSeqOfValue;
- TColStd_SequenceOfExtendedString aSeqOfValueIconName;
-
- // Presentation
- Standard_Real aMinZoom = 0;
- Standard_Real aMaxZoom = 0;
- Standard_Real aZoomOrder = 0;
-
- // Datum::Reports tags (if any)
- LDOM_Element aWLev = theDatum.GetChildByTagName( DDS_Dictionary::KeyWord( "WARNING_LEVEL" ) );
- if ( !aWLev.isNull() )
- {
- TCollection_AsciiString aWrongValWL = aWLev.getAttribute( DDS_Dictionary::KeyWord( "WRONG_VALUE" ) );
- if ( aWrongValWL.IsEqual( "Info" ) )
- aWrongValue = DDS_MT_INFO;
- else if ( aWrongValWL.IsEqual( "Warning" ) )
- aWrongValue = DDS_MT_WARNING;
- else if ( aWrongValWL.IsEqual( "Alarm" ) )
- aWrongValue = DDS_MT_ALARM;
- else if ( aWrongValWL.IsEqual( "Error" ) )
- aWrongValue = DDS_MT_ERROR;
- }
-
- // Datum::Presentation
- LDOM_Element aPrs = theDatum.GetChildByTagName( DDS_Dictionary::KeyWord( "PRS" ) );
- if ( !aPrs.isNull() )
- {
- LDOM_Element aLateralZoom = aPrs.GetChildByTagName( DDS_Dictionary::KeyWord( "LATERAL_ZOOM" ) );
- if ( !aLateralZoom.isNull() )
- {
- TCollection_AsciiString aMinZoomStr = aLateralZoom.getAttribute( DDS_Dictionary::KeyWord( "LZ_MINV" ) );
- TCollection_AsciiString aMaxZoomStr = aLateralZoom.getAttribute( DDS_Dictionary::KeyWord( "LZ_MAXV" ) );
- TCollection_AsciiString aZoomOrderStr = aLateralZoom.getAttribute( DDS_Dictionary::KeyWord( "LZ_ORDER" ) );
-
- aMinZoomStr.RemoveAll( ' ' );
- if ( aMinZoomStr.IsRealValue() )
- aMinZoom = aMinZoomStr.RealValue();
-
- aMaxZoomStr.RemoveAll( ' ' );
- if ( aMaxZoomStr.IsRealValue() )
- aMaxZoom = aMaxZoomStr.RealValue();
-
- aZoomOrderStr.RemoveAll( ' ' );
- if ( aZoomOrderStr.IsRealValue() )
- aZoomOrder = aZoomOrderStr.RealValue();
- }
- }
-
- // Quantity::Domain record as the only child of that tag name
- LDOM_Element aDomain = theDatum.GetChildByTagName( DDS_Dictionary::KeyWord( "DY_DOMAIN" ) );
- if ( !aDomain.isNull() )
- {
- LDOM_Element aValueDescr = aDomain.GetChildByTagName( DDS_Dictionary::KeyWord( "VALUE_DESCR" ) );
- if ( !aValueDescr.isNull() )
- {
- // read: valueDescr? (type?,min?,max?,default?)
- aType = aValueDescr.getAttribute( DDS_Dictionary::KeyWord( "VD_TYPE" ) );
- if ( aType.IsEqual( "String" ) )
- aEnumType = String;
- else if ( aType.IsEqual( "Float" ) )
- aEnumType = Float;
- else if ( aType.IsEqual( "Integer" ) )
- aEnumType = Integer;
-
- if ( !aValueDescr.getAttributeNode( DDS_Dictionary::KeyWord( "VD_MINV" ) ).isNull() )
- myData |= MinValue;
- aMinV = aValueDescr.getAttribute( DDS_Dictionary::KeyWord( "VD_MINV" ) );
- aMinV.RemoveAll( ' ' );
- if ( aMinV.IsRealValue() )
- aRealMinV = aMinV.RealValue();
- if ( !aValueDescr.getAttributeNode( DDS_Dictionary::KeyWord( "VD_MAXV" ) ).isNull() )
- myData |= MaxValue;
- aMaxV = aValueDescr.getAttribute( DDS_Dictionary::KeyWord( "VD_MAXV" ) );
- aMaxV.RemoveAll( ' ' );
- if ( aMaxV.IsRealValue() )
- aRealMaxV = aMaxV.RealValue();
- aDefV = aValueDescr.getAttribute( DDS_Dictionary::KeyWord( "VD_DEFV" ) );
- if ( !aValueDescr.getAttributeNode( DDS_Dictionary::KeyWord( "VD_DEFV" ) ).isNull() )
- myData |= DefaultValue;
-
- aDefV.RemoveAll( ' ' );
- if ( aDefV.IsRealValue() )
- aRealDefV = aDefV.RealValue();
-
- TCollection_AsciiString aSpecVal = aValueDescr.getAttribute( DDS_Dictionary::KeyWord( "VD_SPEC" ) );
- Split( aSpecVal, myListRef );
- }
- else
- {
- // read: listRef? (list?)
- LDOM_Element aListRef = aDomain.GetChildByTagName( DDS_Dictionary::KeyWord( "VALUE_LIST_REF" ) );
- if ( !aListRef.isNull() )
- {
- aType = "List";
- aEnumType = List;
- LDOMString aListId = aListRef.getAttribute( DDS_Dictionary::KeyWord( "VLR_LIST" ) );
- aDefV = aListRef.getAttribute( DDS_Dictionary::KeyWord( "VD_DEFV" ) );
- aDefV.RemoveAll( ' ' );
- LDOM_Element foundListItem;
- for ( LDOM_Element aListItem = theCompElement.GetChildByTagName( DDS_Dictionary::KeyWord( "VALUE_LIST" ) );
- aListItem != NULL && foundListItem == NULL; aListItem = aListItem.GetSiblingByTagName() )
- {
- if ( aListItem.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_ID" ) ).equals( aListId ) )
- foundListItem = aListItem;
-
- }
- for ( LDOM_Element aLstItem = theDocElement.GetChildByTagName( DDS_Dictionary::KeyWord( "VALUE_LIST" ) );
- aLstItem != NULL && foundListItem == NULL; aLstItem = aLstItem.GetSiblingByTagName() )
- {
- if ( aLstItem.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_ID" ) ).equals( aListId ) )
- foundListItem = aLstItem;
- }
-
- if ( foundListItem != NULL )
- {
- // The appropriate list of values is found: store the list name
- aListName = foundListItem.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_NAME" ) );
- // Iteration through the list of values
- LDOM_Element aListItemValue = foundListItem.GetChildByTagName( DDS_Dictionary::KeyWord( "VALUE_LIST_VALUE" ) );
- while ( aListItemValue != NULL )
- {
- // read value ID
- TCollection_AsciiString aListValueID = aListItemValue.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_VALUEID" ) );
- if ( aListValueID.IsIntegerValue() )
- {
- // Read the text in the element "value"
- //LDOM_Text aListItemTxt = (const LDOM_Text&)aListItemValue.getFirstChild();
- LDOM_Node aNode = aListItemValue.getFirstChild();
- const LDOM_Text& aText = (const LDOM_Text&) aNode;
- LDOM_Text aListItemTxt(aText);
- if ( !aListItemTxt.isNull() )
- {
- // adding ID and text value to sequence
- aSeqOfValueID.Append( aListValueID.IntegerValue() );
- aSeqOfValue.Append( aListItemTxt.getData() );
- // adding icon file name (optional) to sequence
- TCollection_ExtendedString aListValueIcon = aListItemValue.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_VALUEICON" ) );
- aSeqOfValueIconName.Append( aListValueIcon );
- }
- aListItemValue = aListItemValue.GetSiblingByTagName();
- }
- }
- }
- }
- }
- }
-
- // Quantity::Description record as the only child of that tag name
- LDOM_Element aDescr = theDatum.GetChildByTagName( DDS_Dictionary::KeyWord( "DESCR" ) );
- if ( !aDescr.isNull() )
- {
- // short description (#PCDATA)*
- LDOM_Element aShDescr = aDescr.GetChildByTagName( DDS_Dictionary::KeyWord( "SHORT_D" ) );
- if ( !aShDescr.isNull() )
- {
- // text is always a sub-node of element, containing it
- //LDOM_Text aShDescrTxt = (const LDOM_Text&)aShDescr.getFirstChild();
- LDOM_Node aNode = aShDescr.getFirstChild();
- const LDOM_Text& aText = (const LDOM_Text&) aNode;
- LDOM_Text aShDescrTxt(aText);
- if ( !aShDescrTxt.isNull() )
- aShortD = aShDescrTxt.getData();
- }
-
- // long description (#PCDATA)*
- LDOM_Element aLDescr = aDescr.GetChildByTagName( DDS_Dictionary::KeyWord( "LONG_D" ) );
- if ( !aLDescr.isNull() )
- {
- // text is always a sub-node of element, containing it
- //LDOM_Text aLDescrTxt = (const LDOM_Text&)aLDescr.getFirstChild();
- LDOM_Node aNode = aLDescr.getFirstChild();
- const LDOM_Text& aText = (const LDOM_Text&) aNode;
- LDOM_Text aLDescrTxt(aText);
- if ( !aLDescrTxt.isNull() )
- aLongD = aLDescrTxt.getData();
- }
- }
-
- // Quantity::Options
- LDOM_Element anOpt = theDatum.GetChildByTagName( DDS_Dictionary::KeyWord( "OPTIONS" ) );
- if ( !anOpt.isNull() )
- {
- LDOM_NodeList anOptions = anOpt.getElementsByTagName( DDS_Dictionary::KeyWord( "OPTION" ) );
- for ( Standard_Integer oi = 0; oi < anOptions.getLength(); oi++ )
- {
- LDOM_Node node = anOptions.item( oi );
- if ( node.getNodeType() != LDOM_Node::ELEMENT_NODE )
- continue;
-
- LDOM_Element& elem = (LDOM_Element&)node;
- TCollection_AsciiString name = elem.getAttribute( DDS_Dictionary::KeyWord( "OPTION_NAME" ) );
-
- TCollection_ExtendedString value;
- const LDOM_Node aNode = elem.getFirstChild();
- LDOM_Text anOptTxt( (const LDOM_Text&)(aNode) );
- if ( !anOptTxt.isNull() )
- value = anOptTxt.getData();
-
- if ( !name.IsEmpty() && value.Length() && !myOptions.IsBound( name ) )
- myOptions.Bind( name, value );
- }
- }
-
- NCollection_DataMap<UnitSystem, Handle(Units_Dimensions)> aDimMap;
-
- for ( NCollection_DataMap<UnitSystem, UnitData>::Iterator it( myUnitData ); it.More(); it.Next() )
- {
- UnitData& anUnitData = it.ChangeValue();
-
- // check units
- anUnitData.myZero = 0.;
- anUnitData.myScale = 1.;
- try {
- Standard_CString aUnitDataStr;
- aUnitDataStr = (Standard_CString)anUnitData.myUnits.ToCString();
- if ( anUnitData.myUnits.ToCString()[0] && strcmp( anUnitData.myUnits.ToCString(), "%" ) )
- {
- Handle(Units_Dimensions) aDim;
- anUnitData.myZero = UnitsAPI::AnyToSI( 0.0, aUnitDataStr, aDim );
- anUnitData.myScale = UnitsAPI::AnyToSI( 1.0, aUnitDataStr, aDim ) - anUnitData.myZero;
- UnitsAPI::AnyFromSI( 1.0, aUnitDataStr );
- if ( !aDimMap.IsBound( it.Key() ) )
- aDimMap.Bind( it.Key(), aDim );
- }
- else if ( anUnitData.myUnits.ToCString()[0] ) // treat '%' as unit with scale 100
- anUnitData.myScale = 0.01;
- }
- catch( Standard_Failure ) {
- anUnitData.myUnits.Clear();
- }
-
- Handle(Units_Dimensions) aPrev;
- Standard_Boolean aStatus = Standard_True;
- for ( NCollection_DataMap<UnitSystem, Handle(Units_Dimensions)>::Iterator itr( aDimMap );
- itr.More() && aStatus; itr.Next() )
- {
- if ( itr.Value().IsNull() )
- continue;
-
- if ( aPrev.IsNull() )
- aPrev = itr.Value();
-
- aStatus = aPrev->IsEqual( itr.Value() );
- }
-
- if ( !aStatus )
- printf( "Error in DataDictionary: Different dimensions for %s item", theID.ToCString() );
- }
-
- myId = theID;
- myType = aEnumType;
- myWarnLevel = aWrongValue;
- myLabel = aLabel.ToCString();
- myFilter = aFilter.ToCString();
- myLongDescr = aLongD.ToCString();
- myShortDescr = aShortD.ToCString();
- myMin = aRealMinV;
- myMax = aRealMaxV;
- myDefValue = aRealDefV;
- myDefString = aDefV.ToCString();
- myRequired = aRequired.ToCString();
- myListName = aListName.ToCString();
- myMinZoom = aMinZoom;
- myMaxZoom = aMaxZoom;
- myZoomOrder = aZoomOrder;
-
- // prepare formats
- PrepareFormats( aFormat );
-
- const Standard_Integer aLength = aSeqOfValue.Length();
- if ( aLength > 0 )
- {
- myListRef = new TColStd_HArray1OfExtendedString( 1, aLength );
- myListRefID = new TColStd_HArray1OfInteger( 1, aLength );
- myListRefIcons = new TColStd_HArray1OfExtendedString( 1, aLength );
- for ( Standard_Integer i = aLength; i > 0; i-- )
- {
- myListRef->ChangeValue( i ) = aSeqOfValue.Value( i );
- myListRefID->ChangeValue( i ) = aSeqOfValueID.Value( i );
- myListRefIcons->ChangeValue( i ) = aSeqOfValueIconName.Value( i );
- }
- }
-
- if ( myType == List && myDefString == "" && !myListRef.IsNull() && myListRef->Length() > 0 )
- myDefString = myListRef->Value( myListRef->Lower() );
-}
-
-/*!
- Returns default formats for each unit systems
-*/
-void DDS_DicItem::GetDefaultFormat()
-{
- for ( NCollection_DataMap<UnitSystem, UnitData>::Iterator it( myUnitData ); it.More(); it.Next() )
- {
- UnitData& anUnitData = it.ChangeValue();
-
- switch ( myType )
- {
- case Integer:
- anUnitData.myFormat = "%d";
- break;
- case Float:
- anUnitData.myFormat = "%g";
- break;
- case String:
- default:
- anUnitData.myFormat.Clear();
- break;;
- }
- }
-}
-
-/*!
- Returns format for the string
-*/
-void DDS_DicItem::GetStringFormat( const TCollection_AsciiString& theFlags,
- const TCollection_AsciiString& theWidth,
- const TCollection_AsciiString& thePrecision,
- const TCollection_AsciiString& theTypePrefix,
- TCollection_AsciiString& theFormat )
-{
- theFormat = "%";
- theFormat += theFlags;
- theFormat += theWidth;
-
- if ( !thePrecision.IsEmpty() )
- {
- theFormat += ".";
- theFormat += thePrecision;
- }
-
- theFormat += theTypePrefix;
- theFormat += "s";
-}
-
-/*!
- Returns format for the integer
-*/
-void DDS_DicItem::GetIntegerFormat( const TCollection_AsciiString& theFlags,
- const TCollection_AsciiString& theWidth,
- const TCollection_AsciiString& thePrecision,
- const TCollection_AsciiString& theTypePrefix,
- const Standard_Character theType,
- TCollection_AsciiString& theFormat )
-{
- Standard_Integer aPrecision = 0;
- if ( !thePrecision.IsEmpty() )
- aPrecision = thePrecision.IntegerValue();
- Standard_Integer aWidth = 0;
-
- if ( !theWidth.IsEmpty() )
- aWidth = theWidth.IntegerValue();
-
- if ( !thePrecision.IsEmpty() && aPrecision < 0 )
- {
- // possible value 0.1 will be 10.0
- aWidth -= aPrecision;
- aPrecision = 0;
- }
-
- if ( !thePrecision.IsEmpty() && aPrecision > ( aWidth - 2 ) )
- aWidth = aPrecision + 2;
-
- theFormat = "%";
-
- theFormat += theFlags;
- if ( !theWidth.IsEmpty() )
- theFormat += aWidth;
-
- theFormat += theTypePrefix;
- theFormat += theType;
-}
-
-/*!
- Returns format for the float
-*/
-void DDS_DicItem::GetFloatFormat( const TCollection_AsciiString& theFlags,
- const TCollection_AsciiString& theWidth,
- const TCollection_AsciiString& thePrecision,
- const TCollection_AsciiString& theTypePrefix,
- const Standard_Character theType,
- TCollection_AsciiString& theFormat )
-{
- Standard_Integer aPrecision = 0;
- if ( !thePrecision.IsEmpty() )
- aPrecision = thePrecision.IntegerValue();
- Standard_Integer aWidth = 0;
-
- if (!theWidth.IsEmpty() )
- aWidth = theWidth.IntegerValue();
-
- if (!thePrecision.IsEmpty() && aPrecision < 0 )
- {
- // possible value 0.1 will be 10.0
- aWidth -= aPrecision;
- aPrecision = 0;
- }
-
- if ( !thePrecision.IsEmpty() && aPrecision > ( aWidth - 2 ) )
- {
- aWidth = aPrecision + 2;
- }
-
- theFormat = "%";
- theFormat += theFlags;
-
- if ( !theWidth.IsEmpty() )
- theFormat += aWidth;
-
- if ( !thePrecision.IsEmpty() )
- {
- theFormat += ".";
- theFormat += aPrecision;
- }
-
- theFormat += theTypePrefix;
- theFormat += theType;
-}
-
-/*!
- Prepares formats for each unit systems
-*/
-void DDS_DicItem::PrepareFormats( const TCollection_AsciiString& theFormat )
-{
- for ( NCollection_DataMap<UnitSystem, UnitData>::Iterator it( myUnitData ); it.More(); it.Next() )
- {
- UnitData& anUnitData = it.ChangeValue();
-
- anUnitData.myFormat = theFormat;
- anUnitData.myPrecision = 0;
- }
-
- TCollection_AsciiString aPrecisionStr;
- if ( theFormat.IsEmpty() && myType == List )
- return;
-
- // checking % presenting
- if ( *theFormat.ToCString() != '%' )
- {
- GetDefaultFormat();
- return;
- }
-
- TCollection_AsciiString aStr = ( theFormat.ToCString() + 1 );
- Standard_Character aType = aStr.Value( aStr.Length() );
-
- if ( ( aType != 's' && myType == String ) ||
- ( aType != 'd' && myType == Integer ) ||
- ( aType != 'f' && aType != 'g' && aType != 'e' && aType != 'G' && aType != 'E' && myType == Float ) )
- {
- GetDefaultFormat();
- return;
- }
-
- // removing type character
- aStr.Trunc( aStr.Length() - 1 );
-
- TCollection_AsciiString aFlags;
- while ( !aStr.IsEmpty() && aStr.Value( 1 ) != '.' && ( aStr.Value( 1 ) < '0' || aStr.Value( 1 ) > '9' ) )
- {
- aFlags = aFlags + aStr.Value( 1 );
- aStr.Remove( 1 );
- }
-
- Standard_Integer aPos = 1;
- while ( aPos <= aStr.Length() && ( aStr.Value( aPos ) == '.' ||
- ( aStr.Value( aPos ) >= '0' && aStr.Value( aPos ) <= '9' ) ) )
- aPos++;
-
- TCollection_AsciiString aTypePrefix;
- if ( aPos <= aStr.Length() )
- {
- aTypePrefix = aStr.SubString( aPos, aStr.Length() );
- aStr.Trunc( aPos - 1 );
- }
-
- Standard_Integer aBasePrecision = 0;
-
- // taking width and precision
- TCollection_AsciiString aPrecision;
-
- aPos = aStr.Search( "." );
- if ( aPos >= 0 )
- {
- // aPrecision is defined
- aPrecision = aStr.Split( aPos );
- aStr.Remove( aStr.Length() );
- if ( !aPrecision.IsEmpty() )
- {
- if ( !aPrecision.IsIntegerValue() )
- {
- GetDefaultFormat();
- return;
- }
- else
- {
- aPrecisionStr = aPrecision;
- aBasePrecision = aPrecision.IntegerValue();
- }
- }
- }
-
- if ( !aStr.IsEmpty() && !aStr.IsIntegerValue() )
- {
- GetDefaultFormat();
- return;
- }
-
- NCollection_DataMap<UnitSystem, UnitData>::Iterator itr;
-
- switch ( myType )
- {
- case String:
- for ( itr.Initialize( myUnitData ); itr.More(); itr.Next() )
- {
- if ( aType != 'f' && aType != 'g' && aType != 'e' && aType != 'G' && aType != 'E' )
- GetStringFormat( aFlags, aStr, aPrecisionStr, aTypePrefix, itr.ChangeValue().myFormat );
- }
- break;
- case Float:
- case Integer:
- for ( itr.Initialize( myUnitData ); itr.More(); itr.Next() )
- {
- UnitData& anUnitData = itr.ChangeValue();
- Standard_Integer aAmendment =
- (Standard_Integer)log10( 10.0 / DDS_Dictionary::FromSI( 10.0, anUnitData.myUnits.ToCString() ) );
- anUnitData.myPrecision = aBasePrecision + aAmendment;
- aPrecisionStr = TCollection_AsciiString( anUnitData.myPrecision );
-
- // create a formats
- if ( myType == Integer )
- GetIntegerFormat( aFlags, aStr, aPrecisionStr, aTypePrefix, aType, anUnitData.myFormat );
- else
- GetFloatFormat( aFlags, aStr, aPrecisionStr, aTypePrefix, aType, anUnitData.myFormat );
- }
- break;
- default:;
- GetDefaultFormat();
- break;
- }
-}
-
-/*!
- Split the string \atheStr by spaces and returns substrings in array \aaRes.
-*/
-void DDS_DicItem::Split( const TCollection_AsciiString& theStr, Handle(TColStd_HArray1OfExtendedString)& aRes )
-{
- aRes.Nullify();
-
- if ( theStr.Length() > 0 )
- {
- TCollection_AsciiString aStr = theStr;
- TColStd_SequenceOfAsciiString aSeq;
- Standard_Integer anIndex = aStr.SearchFromEnd( (Standard_CString)" " );
- while( anIndex > 1 )
- {
- TCollection_AsciiString tmpStr = aStr.Split( anIndex - 1 );
- tmpStr.RemoveAll( ( Standard_Character )' ' );
- if ( tmpStr.Length() > 0 )
- aSeq.Append( tmpStr );
- anIndex = aStr.SearchFromEnd( (Standard_CString)" " );
- }
-
- aStr.RemoveAll( ( Standard_Character )' ' );
- if ( aStr.Length() > 0 )
- aSeq.Append( aStr );
-
- if ( aSeq.Length() > 0 )
- {
- aRes = new TColStd_HArray1OfExtendedString( 1, aSeq.Length() );
- for ( int i = 1, n = aSeq.Length(); i <= n; i++ )
- aRes->ChangeValue( i ) = aSeq( i );
- }
- }
-}
-
-/*!
- Returns unit structure for given unit system \asys.
-*/
-DDS_DicItem::UnitData* DDS_DicItem::GetUnitData( const UnitSystem& sys ) const
-{
- UnitData* unit = 0;
-
- if ( myUnitData.IsBound( sys ) )
- unit = (UnitData*)&myUnitData.Find( sys );
-
- return unit;
-}
-
-/*!
- Gets the active unit system.
-*/
-DDS_DicItem::UnitSystem DDS_DicItem::GetActiveUnitSystem() const
-{
- UnitSystem aSystem;
- Handle(DDS_DicGroup) aComponent = Handle(DDS_DicGroup)::DownCast(myComponent);
- if ( !aComponent.IsNull() )
- aSystem = aComponent->GetActiveUnitSystem();
- return aSystem;
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 DDS_DICITEM_H
-#define DDS_DICITEM_H
-
-#include "DDS.h"
-
-#include <MMgt_TShared.hxx>
-
-#include <TCollection_AsciiString.hxx>
-
-#include <TColStd_HArray1OfInteger.hxx>
-#include <TColStd_HArray1OfExtendedString.hxx>
-
-#include <NCollection_DataMap.hxx>
-#include <NCollection_DefineIndexedDataMap.hxx>
-
-class LDOM_Element;
-class DDS_Dictionary;
-class TColStd_MapOfReal;
-class TColStd_SequenceOfInteger;
-class TColStd_SequenceOfAsciiString;
-class TColStd_SequenceOfExtendedString;
-
-// Class, containing all information about one parameter:
-// unique : id
-// obligative: label, type, short description, required
-// optional : format, units,
-// min value, max value, default value.
-
-class DDS_DicItem : public MMgt_TShared
-{
-public:
- /*! Enum describes type of datum value */
- enum Type
- {
- String, //!< String type of value
- Float, //!< Real (double) numeric type of value
- Integer, //!< Integer (int) numeric type of value
- List, //!< List type of enumerable value
- Unknown //!< Unknown or undefined type of value
- };
-
- /*! Enum describes the flags for existance of domain data */
- enum Data
- {
- MinValue = 0x01, //!< Flag of minimum value definition existence
- MaxValue = 0x02, //!< Flag of maximum value definition existence
- DefaultValue = 0x04 //!< Flag of default value definition existence
- };
-
- // This struct is intended for map of Format, Units, Precision and Scale
- struct UnitData
- {
- Standard_Real myZero;
- Standard_Real myScale;
- TCollection_AsciiString myUnits;
- TCollection_AsciiString myFormat;
- Standard_Integer myPrecision;
- };
-
- typedef TCollection_AsciiString UnitSystem;
-
-public:
- DDS_DicItem();
-
- Standard_EXPORT TCollection_AsciiString GetId() const;
- Standard_EXPORT DDS_DicItem::Type GetType() const;
- Standard_EXPORT TCollection_ExtendedString GetLabel() const;
- Standard_EXPORT TCollection_ExtendedString GetFilter() const;
- Standard_EXPORT TCollection_ExtendedString GetRequired() const;
- Standard_EXPORT DDS_MsgType GetWarningLevel() const;
- Standard_EXPORT TCollection_ExtendedString GetLongDescription() const;
- Standard_EXPORT TCollection_ExtendedString GetShortDescription() const;
- Standard_EXPORT TCollection_AsciiString GetComponent() const;
-
- Standard_EXPORT TCollection_AsciiString GetUnits() const;
- Standard_EXPORT TCollection_AsciiString GetUnits( const UnitSystem& ) const;
-
- Standard_EXPORT TCollection_ExtendedString GetDefaultValue() const;
- Standard_EXPORT TCollection_ExtendedString GetDefaultValue( const UnitSystem& ) const;
-
- Standard_EXPORT Standard_Real GetMinValue() const;
- Standard_EXPORT Standard_Real GetMinValue( const UnitSystem& ) const;
-
- Standard_EXPORT Standard_Real GetMaxValue() const;
- Standard_EXPORT Standard_Real GetMaxValue( const UnitSystem& ) const;
-
- Standard_EXPORT Standard_Integer GetPrecision() const;
- Standard_EXPORT Standard_Integer GetPrecision( const UnitSystem& ) const;
-
- Standard_EXPORT TCollection_AsciiString GetFormat( const Standard_Boolean = Standard_True ) const;
- Standard_EXPORT TCollection_AsciiString GetFormat( const UnitSystem&,
- const Standard_Boolean = Standard_True ) const;
- Standard_EXPORT TCollection_ExtendedString GetNameOfValues() const;
- Standard_EXPORT Standard_Boolean GetListOfValues( Handle(TColStd_HArray1OfExtendedString)&,
- Handle(TColStd_HArray1OfInteger)& ) const;
- Standard_EXPORT Standard_Boolean GetListOfValues( Handle(TColStd_HArray1OfExtendedString)&,
- Handle(TColStd_HArray1OfInteger)&,
- Handle(TColStd_HArray1OfExtendedString)& ) const;
- Standard_EXPORT Standard_Boolean GetSpecialValues( TColStd_MapOfReal& ) const;
-
- Standard_EXPORT Standard_Real GetMinZoom() const;
- Standard_EXPORT Standard_Real GetMaxZoom() const;
- Standard_EXPORT Standard_Real GetZoomOrder() const;
-
- Standard_EXPORT Standard_Real ToSI( const Standard_Real ) const;
- Standard_EXPORT Standard_Real FromSI( const Standard_Real ) const;
-
- Standard_EXPORT Standard_Real ToSI( const Standard_Real, const UnitSystem& ) const;
- Standard_EXPORT Standard_Real FromSI( const Standard_Real, const UnitSystem& ) const;
-
- Standard_EXPORT Standard_Boolean HasData( const Standard_Integer ) const;
-
- Standard_EXPORT TCollection_ExtendedString GetOption( const TCollection_AsciiString& ) const;
- Standard_EXPORT Standard_Boolean GetOptionNames( TColStd_SequenceOfAsciiString& ) const;
-
-private:
- DDS_DicItem( const DDS_DicItem& );
- void operator=( const DDS_DicItem& );
- void FillDataMap( TCollection_AsciiString, const LDOM_Element&,
- const LDOM_Element&, const LDOM_Element&,
- const TColStd_SequenceOfAsciiString& );
- void PrepareFormats( const TCollection_AsciiString& );
- void GetDefaultFormat();
- UnitSystem GetActiveUnitSystem() const;
-
- void GetStringFormat( const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- TCollection_AsciiString& );
- void GetIntegerFormat( const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const Standard_Character,
- TCollection_AsciiString& );
- void GetFloatFormat( const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const Standard_Character,
- TCollection_AsciiString& );
- void Split( const TCollection_AsciiString&,
- Handle(TColStd_HArray1OfExtendedString)& );
-
- UnitData* GetUnitData( const UnitSystem& ) const;
-
-private:
- typedef NCollection_DataMap<TCollection_AsciiString, TCollection_ExtendedString> OptionsMap;
-
-private:
- TCollection_AsciiString myId;
- TCollection_ExtendedString myLabel;
- TCollection_ExtendedString myFilter;
- TCollection_ExtendedString myRequired;
-
- Standard_Integer myType;
- Standard_Integer myWarnLevel;
-
- TCollection_ExtendedString myLongDescr;
- TCollection_ExtendedString myShortDescr;
-
- Standard_Real myMax;
- Standard_Real myMin;
- Standard_Real myDefValue;
- TCollection_ExtendedString myDefString;
-
- Standard_Integer myData;
-
- // valueList
- TCollection_ExtendedString myListName;
-
- Handle(TColStd_HArray1OfExtendedString) myListRef;
- Handle(TColStd_HArray1OfInteger) myListRefID;
- Handle(TColStd_HArray1OfExtendedString) myListRefIcons;
-
- // presentation
- Standard_Real myMinZoom;
- Standard_Real myMaxZoom;
- Standard_Real myZoomOrder;
-
- Handle(Standard_Transient) myComponent;
-
- OptionsMap myOptions;
- // unitData
- NCollection_DataMap<UnitSystem, UnitData> myUnitData;
-
- friend class DDS_DicGroup;
-
-public:
- // Declaration of CASCADE RTTI
- DEFINE_STANDARD_RTTI(DDS_DicItem)
-};
-
-DEFINE_STANDARD_HANDLE(DDS_DicItem, MMgt_TShared)
-
-DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicItems, Handle(DDS_DicItem))
-DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicItems, DDS_BaseCollectionOfDicItems,
- TCollection_AsciiString, Handle(DDS_DicItem))
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "DDS_Dictionary.h"
-
-#include "DDS_KeyWords.h"
-
-#include <LDOMString.hxx>
-#include <LDOMParser.hxx>
-
-#include <UnitsAPI.hxx>
-
-#include <TColStd_SequenceOfInteger.hxx>
-#include <TColStd_SequenceOfAsciiString.hxx>
-#include <TColStd_SequenceOfExtendedString.hxx>
-
-#include <NCollection_Map.hxx>
-
-#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
-
-IMPLEMENT_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared)
-IMPLEMENT_STANDARD_RTTIEXT(DDS_Dictionary, MMgt_TShared)
-
-/*!
- \class DDS_Dictionary
-
- This class to provide information about used datums, reading them from 'xml' file
-
- Datum is the set of parameters described a phisical characteristic. These parameters loaded from
- special XML which has following format:
-
- \hr
-
- <D_URI>
- <COMPONENT COMPONENT_NAME="component_name">
- <UNIT_SYSTEMS>
- <UNIT_SYSTEM UNIT_SYSTEM_NAME="[system_internal_name]" UNIT_SYSTEM_LABEL="[system_label]">
- <UNIT_SYSTEM UNIT_SYSTEM_NAME="[system_internal_name]" UNIT_SYSTEM_LABEL="[system_label]">
- ...
- <UNIT_SYSTEM UNIT_SYSTEM_NAME="[system_internal_name]" UNIT_SYSTEM_LABEL="[system_label]">
- </UNIT_SYSTEMS>
-
- <DATUM DATUM_UNITS="[base_system_internal_name]" DATUM_FORMAT="[sprintf_format_specification]"
- DATUM_ID="[datum_id]" DATUM_LABEL="[datum_label]" DATUM_REQUIRED="[requred_value]"
- DATUM_FILTER="[string_regular_expression]">
- <DY_DOMAIN>
- <VALUE_DESCR VD_DEFV="[default_value]" VD_MAXV="[max_value]" VD_MINV="[min_value]" VD_TYPE="[value_type]"/>
- <VALUE_LIST_REF VLR_LIST="[referenced_list_id]"/>
- </DY_DOMAIN>
- <DESCR>
- <SHORT_D>[brief_desription_text]</SHORT_D>
- <LONG_D>[full_description_text]</LONG_D>
- </DESCR>
- <OPTIONS>
- <OPTION OPTION_NAME="[option_name_1]">[option_value_1]</OPTION>
- <OPTION OPTION_NAME="[option_name_2]">[option_value_2]</OPTION>
- ...
- <OPTION OPTION_NAME="[option_name_n]">[option_value_n]</OPTION>
- </OPTIONS>
- </DATUM>
-
- ...
-
- <VALUE_LIST VALUE_LIST_ID="[list_id]" VALUE_LIST_NAME="[list_name]">
- <VALUE_LIST_VALUE VALUE_LIST_VALUEID="[list_element_id]" VALUE_LIST_VALUEICON="[list_element_icon_file]">[list_element_name]</VALUE_LIST_VALUE>
- <VALUE_LIST_VALUE VALUE_LIST_VALUEID="[list_element_id]" VALUE_LIST_VALUEICON="[list_element_icon_file]">[list_element_name]</VALUE_LIST_VALUE>
- ...
- <VALUE_LIST_VALUE VALUE_LIST_VALUEID="[list_element_id]" VALUE_LIST_VALUEICON="[list_element_icon_file]">[list_element_name]</VALUE_LIST_VALUE>
- </VALUE_LIST>
-
- ...
-
- </COMPONENT>
- </D_URI>
-
- \hr
-
- In description of datum file format used internal keys as XML tag and attributes names.
- Concrete XML keywords defined by DDS_KeyWords class.
-
- Describe datum file format more detailed. XML file should have one main tag named as "dictionary" (key "D_URI").
- This tag should contains one or several components. Component is a independent set of datums and unit systems.
- Components defined as XML tag named "component" (key "COMPONENT") with attribute "name" (key COMPONENT_NAME).
- Component name used as component identifier and should be unique. Component tag can contains:
-
- \li Tag "unit_systems" (key UNIT_SYSTEMS) defines set of used unit systems. Should exist at least one unit
- system named SI ("System International"). If this system not exist then it will be defined automatically.
- Each unit system defined by XML tag "unit system" (key UNIT_SYSTEM) under tag "unit_systems" with attributes
- "name" (key UNIT_SYSTEM_NAME) and "label" (key UNIT_SYSTEM_LABEL). Name is identifier of unit system. Label is
- human readable description.
-
- \li One or several tag "datum" (key DATUM). For this tag can be defined following attributes:
-
- \lo Identifier (key DATUM_ID) specify the unique id string for the datum.
- \lo Label (key DATUM_LABEL) specify human readable name of the datum.
- \lo Units of measure (key DATUM_UNITS) for given unit system. Attribute name consist of a name
- of unit system and a keyword got from DDS_KeyWords by key DATUM_UNITS. For example for unit system
- named SI and default keyword attribute name will be "SIunits". This attribute should be specified
- for each deaclared unit system. Value of this attribute should be string describs units of measure.
- Possible designations for units of measure and their multiple prefixes see in package UnitsAPI of
- library OpenCascade (files Units.dat and Lexi_Expr.dat). Units of measure will be used for numeric
- value conversion from one unit system to another one.
- \lo Format (key DATUM_FORMAT) specify the format string which will be used during initial formatting
- of value. This string should be specified in sprintf() format.
- \lo Filter (key DATUM_FILTER) specify the regualr expression. Each user entered string will be checked up
- on matching to this expression (if it defined). Non matched strings will be rejected.
- \lo Required value (key DATUM_REQUIRED). If this attributed defined and value is true then user can't
- leave a input filed blank (parameter must be always entered).
-
- Tag "description" (key DESCR) can be defined under the tag "datum". This tag contains two sub tags:
- \lo "short description" (key SHORT_D) specify a brief datum description text
- \lo "long description" (key LONG_D) specify a detailed description text
-
- Tag "options" (key OPTIONS) can be defined under the tag "datum". This tag contains one or more sub
- tags "option" (key OPTION). Each of these XML elements should contain text option value and attribute
- "name" (key OPTION_NAME) which specified option name.
-
- Each tag "datum" define most common parameters of phisical characteristic.
- This parameters placed in two groups:
- \lo Domain parameters under tag "domain" (key DY_DOMAIN). This tag can contains value description tag
- (key VALUE_DESCR) for discrete data or list reference tag (key VALUE_LIST_REF) for enumerable data.
- Discrete data described following parameters:
- default value (key VD_DEFV)
- maximum value (key VD_MAXV)
- minimum value (key VD_MINV)
- type of value (key VD_TYPE) - possible values: String, Integer, Float, List
- Enumerable data described by "list reference" attribute (key VLR_LIST) which reference on
- list (see "list definition" tag) by list id.
-
- \li One or several tag "list definition" (key VALUE_LIST). This tag define the list of items for enumerable
- data. Attribute "list id" (key VALUE_LIST_ID) specify the identifier string for the list and attribute
- "list name" (key VALUE_LIST_NAME) define a list name string. Each list item described by tag "list value"
- (key VALUE_LIST_VALUE) under tag "list definition". Each this tag contains item string text and have
- following attributes:
- \lo "list item id" (key VALUE_LIST_VALUEID) - integer numerical identifier for item
- \lo "list item icon" (key VALUE_LIST_VALUEICON) - icon file name for item
-
- Below the example of a XML file with use default keywords.
-
- <datadictionary version="1.0">
- <component name="My Component">
-
- <!-- specify two unit systems -->
-
- <unitSystems>
- <system name="SI" label="System international">
- <system name="AS" label="Anglo - sacson system">
- </unitSystems>
-
- <!-- specify datum -->
- <!-- units of measure for SI - meters (m), for AS - inches (in) -->
- <datum SIunits="m" ASunits="in" format="%.25f" id="X" label="X coordinate" required="">
- <domain>
- <!-- default value not specified -->
- <valueDescr default="" max="999999999.999" min="0.000" type="Float"/>
- </domain>
- <description>
- <shortDescr>X coordinate for object</shortDescr>
- <longDescr>X multiplier of object coordinates. Describe position of object in direction of X axis</longDescr>
- </description>
- </datum>
-
- <datum SIunits="m" ASunits="in" format="%.25f" id="Y" label="Y coordinate" required="">
- <domain>
- <valueDescr default="" max="999999999.999" min="0.000" type="Float"/>
- </domain>
- <description>
- <shortDescr>Y coordinate for object</shortDescr>
- <longDescr>Y multiplier of object coordinates. Describe position of object in direction of Y axis</longDescr>
- </description>
- </datum>
-
- <!-- datum for object name with filter which not allow to input more that 8 letters,
- numbers or unerscores with first letter only -->
- <datum format="%.8us" id="ObjectName" label="Name" required="yes"
- filter="^([A-Z]+)([A-Z,0-9,_]*)$">
- <domain>
- <!-- limits and default not specified, type is string -->
- <valueDescr default="" max="" min="" type="String" />
- </domain>
- <description>
- <!-- long description not specified -->
- <shortDescr>Name of object</shortDescr>
- </description>
- </datum>
-
-
- <!-- datum for enumeration of side -->
- <datum format="" id="Side" label="Side" required="">
- <domain>
- <!-- default list item is item with id 0 -->
- <valueDescr default="0" type="List"/>
- <!-- list reference on list named "side_list" -->
- <listRef list="side_list"/>
- </domain>
- <description>
- <shortDescr>Side of object</shortDescr>
- </description>
- </datum>
-
- <!-- list definition for enumeration of side -->
- <valueList listid="side_list" name="Side">
- <value id="1">left</value>
- <value id="2">right</value>
- <value id="3">top</value>
- <value id="4">bottom</value>
- <value id="0">undefined</value>
- </valueList>
-
- </component>
- </datadictionary>
-
-
-*/
-
-/*!
- Constructor. Creates the instance of dictionary. Private method. Use DDS_Dictionary::Get() instead.
-*/
-DDS_Dictionary::DDS_Dictionary()
-: MMgt_TShared()
-{
-}
-
-/*!
- Copy constructor. Internal.
-*/
-DDS_Dictionary::DDS_Dictionary( const DDS_Dictionary& )
-{
-}
-
-/*!
- Assigment operator. Internal.
-*/
-void DDS_Dictionary::operator=( const DDS_Dictionary& )
-{
-}
-
-/*!
- Returns the names list of defined unit systems from all components.
- Parameter \atheSystems will contains the sequence of string names.
-*/
-void DDS_Dictionary::GetUnitSystems( TColStd_SequenceOfAsciiString& theSystems ) const
-{
- theSystems.Clear();
-
- NCollection_Map<TCollection_AsciiString> aMap;
- for ( Standard_Integer i = 1; i <= myGroupMap.Extent(); i++ )
- {
- TColStd_SequenceOfAsciiString theSeq;
- myGroupMap.FindFromIndex( i )->GetUnitSystems( theSeq );
- for ( Standard_Integer s = 1; s <= theSeq.Length(); s++ )
- {
- if ( aMap.Contains( theSeq.Value( s ) ) )
- continue;
-
- theSystems.Append( theSeq.Value( s ) );
- aMap.Add( theSeq.Value( s ) );
- }
- }
-
-}
-
-/*!
- Returns the names list of defined unit systems from the specified component \atheComponent.
- Parameter \atheSystems will contains the sequence of string names. If component not found then
- empty list returned.
-*/
-void DDS_Dictionary::GetUnitSystems( TColStd_SequenceOfAsciiString& theSystems,
- const TCollection_AsciiString& theComponent ) const
-{
- theSystems.Clear();
- if ( myGroupMap.Contains( theComponent ) )
- myGroupMap.FindFromKey( theComponent )->GetUnitSystems( theSystems );
-}
-
-/*!
- Returns the label of unit system \atheSystem. Function find the given unit system in
- all components. If unit system not found in any component then empty string returned.
-*/
-TCollection_ExtendedString DDS_Dictionary::GetUnitSystemLabel( const TCollection_AsciiString& theSystem ) const
-{
- TCollection_ExtendedString aLabel;
- for ( Standard_Integer i = 1; i <= myGroupMap.Extent() && !aLabel.Length(); i++ )
- aLabel = myGroupMap.FindFromIndex( i )->GetUnitSystemLabel( theSystem );
- return aLabel;
-}
-
-/*!
- Returns the label of unit system \atheSystem from component \atheComponent. Function find
- the given unit system in the specified component only. If unit system not found in the
- component then empty string returned.
-*/
-TCollection_ExtendedString DDS_Dictionary::GetUnitSystemLabel( const TCollection_AsciiString& theSystem,
- const TCollection_AsciiString& theComponent ) const
-{
- TCollection_ExtendedString aLabel;
- if ( myGroupMap.Contains( theComponent ) )
- aLabel = myGroupMap.FindFromKey( theComponent )->GetUnitSystemLabel( theSystem );
- return aLabel;
-}
-
-/*!
- Gets the name of active unit system from first got component. If any component exist then
- active unit system name returned or empty string otherwise.
-*/
-TCollection_AsciiString DDS_Dictionary::GetActiveUnitSystem() const
-{
- TCollection_AsciiString aSystem;
- if ( myGroupMap.Extent() )
- aSystem = myGroupMap.FindFromIndex( 1 )->GetActiveUnitSystem();
- return aSystem;
-}
-
-/*!
- Gets the name of active unit system from component \atheComponent. If this component exist
- active unit system name returned or empty string otherwise.
-*/
-TCollection_AsciiString DDS_Dictionary::GetActiveUnitSystem( const TCollection_AsciiString& theComponent ) const
-{
- TCollection_AsciiString aSystem;
- if ( myGroupMap.Contains( theComponent ) )
- aSystem = myGroupMap.FindFromKey( theComponent )->GetActiveUnitSystem();
- return aSystem;
-}
-
-/*!
- Sets the active unit system named \atheSystem. This unit system will be activated in all
- existing components if component have it.
-*/
-void DDS_Dictionary::SetActiveUnitSystem( const TCollection_AsciiString& theSystem )
-{
- for ( Standard_Integer i = 1; i <= myGroupMap.Extent(); i++ )
- myGroupMap.FindFromIndex( i )->SetActiveUnitSystem( theSystem );
-}
-
-/*!
- Sets the active unit system named \atheSystem for component \atheComponent. If specified unit
- system doesn't exist in the component then function do nothing.
-*/
-void DDS_Dictionary::SetActiveUnitSystem( const TCollection_AsciiString& theSystem,
- const TCollection_AsciiString& theComponent )
-{
- if ( myGroupMap.Contains( theComponent ) )
- myGroupMap.FindFromKey( theComponent )->SetActiveUnitSystem( theSystem );
-}
-
-/*!
- Returns the instance of dictionary. Create instance if it is NULL.
-*/
-Handle(DDS_Dictionary) DDS_Dictionary::Get()
-{
- static Handle(DDS_Dictionary) sDictionary;
-
- if ( sDictionary.IsNull() )
- sDictionary = new DDS_Dictionary();
-
- return sDictionary;
-}
-
-/*!
- Load datum definitions in the dictionary from XML file \atheFileName. Returns true if load
- successed or false otherwise.
-*/
-Standard_Boolean DDS_Dictionary::Load( const TCollection_AsciiString theFileName )
-{
- static NCollection_Map<TCollection_AsciiString> _LoadMap;
-
- if ( _LoadMap.Contains( theFileName ) )
- return Standard_True;
-
- Handle(DDS_Dictionary) aDic = Get();
- if ( aDic.IsNull() )
- return Standard_False;
-
- LDOMParser aParser;
- if ( aParser.parse( theFileName.ToCString() ) )
- return Standard_False;
-
- LDOM_Document aDoc = aParser.getDocument();
- LDOM_Element aDocElement = aDoc.getDocumentElement();
- for ( LDOM_Element aComponentElem = aDocElement.GetChildByTagName( KeyWord( "COMPONENT" ) );
- !aComponentElem.isNull(); aComponentElem = aComponentElem.GetSiblingByTagName() )
- aDic->FillDataMap( aComponentElem, aDocElement );
-
- _LoadMap.Add( theFileName );
-
- return Standard_True;
-}
-
-/*!
- Gets XML keyword as LDOMString by specified \akey. If key doesn't exist then empty string
- returned. This function provided for convenience.
-*/
-LDOMString DDS_Dictionary::KeyWord( const TCollection_AsciiString& key )
-{
- LDOMString keyWord;
- Handle(DDS_KeyWords) aKeyWords = DDS_KeyWords::Get();
- if ( !aKeyWords.IsNull() )
- {
- TCollection_AsciiString aStr = aKeyWords->GetKeyWord( key );
- if ( aStr.Length() )
- keyWord = LDOMString( aStr.ToCString() );
- }
- return keyWord;
-}
-
-/*!
- Gets dictionary item with specified identifier \atheID from specified component \atheComponent.
- If component or item not found then null handle returned.
-*/
-Handle(DDS_DicItem) DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID,
- const TCollection_AsciiString& theComponent ) const
-{
- Handle(DDS_DicItem) aDicItem;
- Handle(DDS_DicGroup) aDicGroup;
- if ( myGroupMap.Contains( theComponent ) )
- aDicGroup = myGroupMap.FindFromKey( theComponent );
- if ( !aDicGroup.IsNull() )
- aDicItem = aDicGroup->GetDicItem( theID );
- return aDicItem;
-}
-
-/*!
- Gets dictionary item with specified identifier \atheID. Function find the item in all components.
- If item not found in any component then null handle returned.
-*/
-Handle(DDS_DicItem) DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID ) const
-{
- Handle(DDS_DicItem) aDicItem;
- for ( Standard_Integer i = 1; i <= myGroupMap.Extent() && aDicItem.IsNull(); i++ )
- aDicItem = myGroupMap.FindFromIndex( i )->GetDicItem( theID );
- return aDicItem;
-}
-
-/*!
- Fill the internal data structures from XML parsed structures. Internal.
-*/
-void DDS_Dictionary::FillDataMap( const LDOM_Element& theComponentData, const LDOM_Element& theDocElement )
-{
- TCollection_AsciiString aCompName = theComponentData.getAttribute( KeyWord( "COMPONENT_NAME" ) );
- if ( !myGroupMap.Contains( aCompName ) )
- myGroupMap.Add( aCompName, new DDS_DicGroup( aCompName ) );
- Handle(DDS_DicGroup) aDicGroup = myGroupMap.FindFromKey( aCompName );
- aDicGroup->FillDataMap( theComponentData, theDocElement );
- myGroupMap.Add( aCompName, aDicGroup );
-}
-
-/*!
- Convert numeric value \atheValue from specified unit of measure \atheUnits to SI unit of measure
- (mm for Length, radians for Angles, etc). Converted value returned.
-*/
-Standard_Real DDS_Dictionary::ToSI( const Standard_Real theValue, const Standard_CString theUnits )
-{
- Standard_Real aRetValue = theValue;
- if ( theUnits && *theUnits && strcmp( theUnits, "%" ) )
- {
- try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
- OCC_CATCH_SIGNALS;
-#endif
- aRetValue = UnitsAPI::AnyToSI( theValue, theUnits );
- }
- catch( Standard_Failure ) {
- }
- }
- else if ( theUnits && *theUnits )
- aRetValue = theValue / 100.0;
-
- return aRetValue;
-}
-
-/*!
- Convert numeric value \atheValue to specified unit of measure \atheUnits from SI unit of measure
- (mm for Length, radians for Angles, etc). Converted value returned.
-*/
-Standard_Real DDS_Dictionary::FromSI( const Standard_Real theValue, const Standard_CString theUnits )
-{
- Standard_Real aRetValue = theValue;
- if ( theUnits && *theUnits && strcmp( theUnits, "%" ) )
- {
- try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
- OCC_CATCH_SIGNALS;
-#endif
- aRetValue = UnitsAPI::AnyFromSI( theValue, theUnits );
- }
- catch( Standard_Failure ) {
- }
- }
- else if ( theUnits && *theUnits )
- aRetValue = theValue * 100.0;
-
- return aRetValue;
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 DDS_DICTIONARY_H
-#define DDS_DICTIONARY_H
-
-#include "DDS_DicGroup.h"
-
-#include <LDOMString.hxx>
-
-#include <MMgt_TShared.hxx>
-
-class LDOM_Element;
-class TCollection_AsciiString;
-
-DEFINE_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared)
-
-class DDS_Dictionary : public MMgt_TShared
-{
-public:
- Standard_EXPORT static Handle(DDS_Dictionary) Get();
-
- // Return instance of data dictionary. Create instance if it is NULL.
-
- Standard_EXPORT Handle(DDS_DicItem) GetDicItem( const TCollection_AsciiString& ) const;
- Standard_EXPORT Handle(DDS_DicItem) GetDicItem( const TCollection_AsciiString&,
- const TCollection_AsciiString& ) const;
-
- Standard_EXPORT void GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
- Standard_EXPORT void GetUnitSystems( TColStd_SequenceOfAsciiString&,
- const TCollection_AsciiString& ) const;
- Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
- Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString&,
- const TCollection_AsciiString& ) const;
- Standard_EXPORT TCollection_AsciiString GetActiveUnitSystem() const;
- Standard_EXPORT TCollection_AsciiString GetActiveUnitSystem( const TCollection_AsciiString& ) const;
- Standard_EXPORT void SetActiveUnitSystem( const TCollection_AsciiString& );
- Standard_EXPORT void SetActiveUnitSystem( const TCollection_AsciiString&,
- const TCollection_AsciiString& );
-
-
- static Standard_EXPORT Standard_Boolean Load( const TCollection_AsciiString );
-
- static Standard_EXPORT Standard_Real ToSI( const Standard_Real, const Standard_CString );
- static Standard_EXPORT Standard_Real FromSI( const Standard_Real, const Standard_CString );
-
- static Standard_EXPORT LDOMString KeyWord( const TCollection_AsciiString& );
-
-private:
- DDS_Dictionary();
- DDS_Dictionary( const DDS_Dictionary& );
-
- void operator=( const DDS_Dictionary& );
-
- void FillDataMap( const LDOM_Element&, const LDOM_Element& );
-
-private:
- DDS_IndexedDataMapOfDicGroups myGroupMap;
-
-public:
- DEFINE_STANDARD_RTTI(DDS_Dictionary)
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "DDS_KeyWords.h"
-
-IMPLEMENT_STANDARD_HANDLE(DDS_KeyWords, MMgt_TShared)
-IMPLEMENT_STANDARD_RTTIEXT(DDS_KeyWords, MMgt_TShared)
-
-/*!
- \class DDS_KeyWords
-
- This object contains the pairs of internal keys and XML tag or attribute names. This class allow to user
- define set of XML keywords used in datums definition file.
-
- Default keywords table:
- \li D_URI - dictionary
- \li COMPONENT - component
- \li COMPONENT_NAME - name
- \li UNIT_SYSTEMS - unitSystems
- \li UNIT_SYSTEM - system
- \li UNIT_SYSTEM_NAME - name
- \li UNIT_SYSTEM_LABEL - label
- \li DATUM - datum
- \li DATUM_ID - id
- \li DATUM_LABEL - label
- \li DATUM_UNITS - units
- \li DATUM_FORMAT - format
- \li DATUM_FILTER - filter
- \li DATUM_REQUIRED - required
- \li VALUE_LIST - valueList
- \li VALUE_LIST_ID - listid
- \li VALUE_LIST_NAME - name
- \li VALUE_LIST_TYPE - type
- \li VALUE_LIST_VALUE - value
- \li VALUE_LIST_VALUEID - id
- \li VALUE_LIST_VALUEICON - icon
- \li DY_DOMAIN - domain
- \li WARNING_LEVEL - warningLevel
- \li WRONG_VALUE - wrongValue
- \li VALUE_DESCR - valueDescr
- \li VALUE_LIST_REF - listRef
- \li DESCR - description
- \li LONG_D - longDescr
- \li SHORT_D - shortDescr
- \li VD_TYPE - type
- \li VD_DEFV - default
- \li VD_MAXV - max
- \li VD_MINV - min
- \li VD_SPEC - specVal
- \li VLR_LIST - list
- \li PRS - presentation
- \li LATERAL_ZOOM - lateralZoom
- \li LZ_MINV - min
- \li LZ_MAXV - max
- \li LZ_ORDER - order
- \li OPTIONS - options
- \li OPTION - option
- \li OPTION_NAME - name
-*/
-
-/*!
- Constructor
-*/
-
-DDS_KeyWords::DDS_KeyWords()
-: MMgt_TShared()
-{
- SetKeyWord( "D_URI", "dictionary" );
-
- SetKeyWord( "COMPONENT", "component" );
- SetKeyWord( "COMPONENT_NAME", "name" );
-
- SetKeyWord( "UNIT_SYSTEMS", "unitSystems" );
- SetKeyWord( "UNIT_SYSTEM", "system" );
- SetKeyWord( "UNIT_SYSTEM_NAME", "name" );
- SetKeyWord( "UNIT_SYSTEM_LABEL", "label" );
-
- SetKeyWord( "DATUM", "datum" );
- SetKeyWord( "DATUM_ID", "id" );
- SetKeyWord( "DATUM_LABEL", "label" );
- SetKeyWord( "DATUM_UNITS", "units" );
- SetKeyWord( "DATUM_FORMAT", "format" );
- SetKeyWord( "DATUM_FILTER", "filter" );
- SetKeyWord( "DATUM_REQUIRED", "required" );
-
- SetKeyWord( "VALUE_LIST", "valueList" );
- SetKeyWord( "VALUE_LIST_ID", "listid" );
- SetKeyWord( "VALUE_LIST_NAME", "name" );
- SetKeyWord( "VALUE_LIST_TYPE", "type" );
- SetKeyWord( "VALUE_LIST_VALUE", "value" );
- SetKeyWord( "VALUE_LIST_VALUEID", "id" );
- SetKeyWord( "VALUE_LIST_VALUEICON", "icon" );
-
- SetKeyWord( "DY_DOMAIN", "domain" );
- SetKeyWord( "WARNING_LEVEL", "warningLevel" );
- SetKeyWord( "WRONG_VALUE", "wrongValue" );
- SetKeyWord( "VALUE_DESCR", "valueDescr" );
- SetKeyWord( "VALUE_LIST_REF", "listRef" );
-
- SetKeyWord( "DESCR", "description" );
- SetKeyWord( "LONG_D", "longDescr" );
- SetKeyWord( "SHORT_D", "shortDescr" );
-
- SetKeyWord( "VD_TYPE", "type" );
- SetKeyWord( "VD_DEFV", "default" );
- SetKeyWord( "VD_MAXV", "max" );
- SetKeyWord( "VD_MINV", "min" );
- SetKeyWord( "VD_SPEC", "specVal" );
- SetKeyWord( "VLR_LIST", "list" );
- SetKeyWord( "PRS", "presentation" );
- SetKeyWord( "LATERAL_ZOOM", "lateralZoom" );
- SetKeyWord( "LZ_MINV", "min" );
- SetKeyWord( "LZ_MAXV", "max" );
- SetKeyWord( "LZ_ORDER", "order" );
-
- SetKeyWord( "OPTIONS", "options" );
- SetKeyWord( "OPTION", "option" );
- SetKeyWord( "OPTION_NAME", "name" );
-}
-
-/*!
- Returns the static instance of the class DDS_KeyWords
-*/
-
-Handle(DDS_KeyWords) DDS_KeyWords::Get()
-{
- static Handle(DDS_KeyWords) keyWords;
-
- if ( keyWords.IsNull() )
- keyWords = new DDS_KeyWords();
-
- return keyWords;
-}
-
-/*!
- Returns the XML keyword by specified internal key \a key. If the internal key isn't registered
- then empty string will be returned.
-*/
-
-TCollection_AsciiString DDS_KeyWords::GetKeyWord( const TCollection_AsciiString& key ) const
-{
- TCollection_AsciiString keyWord;
- if ( myKeyWord.IsBound( key ) )
- keyWord = myKeyWord.Find( key );
- return keyWord;
-}
-
-/*!
- Register the pair of the internal key \a key and XML keyword \a keyWord.
-*/
-
-void DDS_KeyWords::SetKeyWord( const TCollection_AsciiString& key,
- const TCollection_AsciiString& keyWord )
-{
- if ( myKeyWord.IsBound( key ) )
- myKeyWord.UnBind( key );
-
- myKeyWord.Bind( key, keyWord );
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 DDS_KEYWORDS_H
-#define DDS_KEYWORDS_H
-
-#include "DDS.h"
-
-#include <MMgt_TShared.hxx>
-
-#include <NCollection_DataMap.hxx>
-
-DEFINE_STANDARD_HANDLE(DDS_KeyWords, MMgt_TShared)
-
-class TCollection_AsciiString;
-
-class DDS_KeyWords : public MMgt_TShared
-{
-public:
- Standard_EXPORT static Handle(DDS_KeyWords) Get();
-
- Standard_EXPORT TCollection_AsciiString GetKeyWord( const TCollection_AsciiString& ) const;
- Standard_EXPORT void SetKeyWord( const TCollection_AsciiString&,
- const TCollection_AsciiString& );
-
-private:
- DDS_KeyWords();
-
-private:
- typedef NCollection_DataMap<TCollection_AsciiString,
- TCollection_AsciiString> KeyWordMap;
-
-private:
- KeyWordMap myKeyWord;
-
-public:
- DEFINE_STANDARD_RTTI(DDS_KeyWords)
-};
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Alexander SOLOVYOV (OCN)
-# Module : DDS
-# $Header: /home/server/cvs/GUI/GUI_SRC/src/DDS/Makefile.in
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libDDS.la
-
-salomeinclude_HEADERS = DDS.h \
- DDS_DicGroup.h \
- DDS_DicItem.h \
- DDS_Dictionary.h \
- DDS_KeyWords.h
-
-dist_libDDS_la_SOURCES = DDS_DicGroup.cxx \
- DDS_DicItem.cxx \
- DDS_Dictionary.cxx \
- DDS_KeyWords.cxx
-
-libDDS_la_CPPFLAGS=$(CAS_CPPFLAGS)
-
-libDDS_la_LDFLAGS= $(CAS_KERNEL) $(CAS_OCAF)
-
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-//
-//
-// File: SalomeApp.h
-// Created: November, 2004
-// Author: OCC team
-// Copyright (C) CEA 2004
-
-
-// The following ifdef block is the standard way of creating macros which make exporting
-// from a DLL simpler. All files within this DLL are compiled with the SalomeApp_EXPORTS
-// symbol defined on the command line. this symbol should not be defined on any project
-// that uses this DLL. This way any other project whose source files include this file see
-// SalomeApp_API functions as being imported from a DLL, wheras this DLL sees symbols
-// defined with this macro as being exported.
-#ifdef WNT
-
-#ifdef EVENT_EXPORTS
-#define EVENT_EXPORT __declspec(dllexport)
-#else
-#define EVENT_EXPORT __declspec(dllimport)
-#endif
-
-#else
-#define EVENT_EXPORT
-#endif //WNT
-
-#define APP_VERSION "0.1"
-
-#if defined WNT
-#pragma warning ( disable: 4251 )
-#endif
-
+++ /dev/null
-# SALOME Utils : general SALOME's definitions and tools
-#
-# Copyright (C) 2003 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
-#
-#
-#
-# File : Makefile.in
-# Author : Marc Tajchman (CEA)
-# Module : SALOME
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libEvent.la
-
-salomeinclude_HEADERS= \
- Event.h \
- SALOME_Event.hxx
-
-dist_libEvent_la_SOURCES = SALOME_Event.cxx
-
-libEvent_la_CPPFLAGS=$(QT_INCLUDES) @KERNEL_CXXFLAGS@
-libEvent_la_LDFLAGS=$(QT_MT_LIBS)
-
-
+++ /dev/null
-// KERNEL SALOME_Event : Define event posting mechanism
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SALOME_Event.cxx
-// Author : Sergey ANIKIN
-// Module : KERNEL
-// $Header$
-
-#include "SALOME_Event.hxx"
-
-//#include "utilities.h"
-
-#include <qsemaphore.h>
-#include <qapplication.h>
-#include <qthread.h>
-
-// asv 21.02.05 : introducing multi-platform approach of thread comparison
-// on Unix using pthread_t type for storing ThreadId
-// on Win32 using integer type for storing ThreadId
-// NOT using integer ThreadId on both Unix and Win32 because (from documentation):
-// "...Do not allow your program to rely on the internal structure or size of the pthread_t..."
-
-#ifdef WIN32
-#include <windows.h>
-
-static DWORD myThread;
-#else
-#include <qthread.h>
-#include <pthread.h>
-
-static pthread_t myThread;
-#endif
-
-/*!
- \return thread id
-*/
-void SALOME_Event::GetSessionThread(){
-#ifdef WIN32
- myThread = ::GetCurrentThreadId();
-#else
- myThread = pthread_self();
-#endif
-}
-
-/*!
- \return true if it is session thread
-*/
-bool SALOME_Event::IsSessionThread(){
- bool aResult = false;
-#ifdef WIN32
- aResult = myThread == ::GetCurrentThreadId();
-#else
- aResult = myThread == pthread_self();
-#endif
-// if(MYDEBUG) INFOS("IsSessionThread() - "<<aResult);
- return aResult;
-}
-
-
-/*!
- Constructor
-*/
-SALOME_Event::SALOME_Event(){
-// if(MYDEBUG) MESSAGE( "SALOME_Event::SALOME_Event(): this = "<<this );
- // Prepare the semaphore
- mySemaphore = new QSemaphore( 2 );
- *mySemaphore += 2;
-}
-
-/*!
- Destructor
-*/
-SALOME_Event::~SALOME_Event(){
-// if(MYDEBUG) MESSAGE( "SALOME_Event::~SALOME_Event(): this = "<<this );
- if ( mySemaphore->available() < mySemaphore->total() )
- *mySemaphore -= mySemaphore->total() - mySemaphore->available();
- delete mySemaphore;
-}
-
-/*!
- Posts the event and optionally waits for its completion
-*/
-void SALOME_Event::process()
-{
- QThread::postEvent( qApp, new QCustomEvent( SALOME_EVENT, (void*)this ) );
-// if(MYDEBUG) MESSAGE( "SALOME_Event::process(): this = "<<this<<", *mySemaphore += 1 " );
- *mySemaphore += 1;
-// if(MYDEBUG) MESSAGE( "SALOME_Event::process(): this = "<<this<<" - COMPLETED" );
-}
-
-/*!
- Signals that this event has been processed
-*/
-void SALOME_Event::processed()
-{
-// if(MYDEBUG) MESSAGE( "SALOME_Event::processed(): this = "<<this );
- // process() takes control over mySemaphore after the next line is executed
- *mySemaphore -= 1;
-}
+++ /dev/null
-// KERNEL SALOME_Event : Define event posting mechanism
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SALOME_Event.hxx
-// Author : Sergey ANIKIN
-// Module : KERNEL
-// $Header$
-
-
-#ifndef SALOME_Event_HeaderFile
-#define SALOME_Event_HeaderFile
-
-#include <qevent.h>
-
-#define SALOME_EVENT QEvent::Type( QEvent::User + 10000 )
-
-class QSemaphore;
-
-/*!
- * \class SALOME_Event
- * Description:
- * This class encapsulates data and functionality required for
- * posting component-specific events to perform arbitrary operations in main GUI thread.
- * SALOME_Event objects can be posted by any thread belonging to the GUI process.
- *
- * It is necessary to derive a custom event class from SALOME_Event and
- * re-implement virtual Execute() method. This method should actually perform
- * the desirable operation. To pass all the required data to Execute() and store a return value,
- * arbitrary data fields can be added to the custom event class. There is
- * no need to protect such fields with a mutex, for only one thread working with
- * a SALOME_Event object is active at any moment.
- *
- * Usage:
- * - create SALOME_Event.
- * Components can derive their own event class from SALOME_Event
- * in order to pass custom data to the event handler.
- * - call process() method to post the event. After process() execution
- * it is possible to examine fields of your custom event object.
- * - perform delete operator on the event to wake up the desktop (you can also set <autoRelease>
- * parameter to TRUE to automatically wake up desktop after process()
- *
- * processed() method is used by the desktop to signal that event processing
- * has been completed.
- *
- * Caveats:
- * There is no.
- */
-
-#include <Event.h>
-
-class EVENT_EXPORT SALOME_Event{
-public:
- SALOME_Event();
- virtual ~SALOME_Event();
-
- // To do real work
- virtual void Execute() = 0;
-
- static bool IsSessionThread();
- void process();
-
-protected:
- void processed();
- friend class SalomeApp_EventFilter;
-
- static void GetSessionThread();
- friend int main(int, char **);
-
-private:
- QSemaphore* mySemaphore;
-};
-
-
-/*!
- \class TMemFunEvent
- \brief Template class for member function
-*/
-template<class TObject, typename TRes> class /*EVENT_EXPORT */TMemFunEvent: public SALOME_Event{
-public:
- typedef TRes TResult;
- TResult myResult;
- typedef TResult (TObject::* TAction)();
- TMemFunEvent(TObject* theObject, TAction theAction,
- TResult theResult = TResult()):
- myObject(theObject),
- myAction(theAction),
- myResult(theResult)
- {}
- virtual void Execute(){
- myResult = (myObject->*myAction)();
- }
-private:
- TObject* myObject;
- TAction myAction;
-};
-
-
-/*!
- \class TVoidMemFunEvent
- \brief Template class for member function
-*/
-template<class TObject> class /*EVENT_EXPORT */TVoidMemFunEvent: public SALOME_Event{
-public:
- typedef void (TObject::* TAction)();
- TVoidMemFunEvent(TObject* theObject, TAction theAction):
- myObject(theObject),
- myAction(theAction)
- {}
- virtual void Execute(){
- (myObject->*myAction)();
- }
-private:
- TObject* myObject;
- TAction myAction;
-};
-
-
-/*!
- \class TMemFun1ArgEvent
- \brief Template for member function with one argument
-*/
-template<class TObject, typename TRes, typename TArg, typename TStoreArg = TArg> class/* EVENT_EXPORT */TMemFun1ArgEvent:
-public SALOME_Event{
-public:
- typedef TRes TResult;
- TResult myResult;
- typedef TResult (TObject::* TAction)(TArg);
- TMemFun1ArgEvent(TObject* theObject, TAction theAction, TArg theArg,
- TResult theResult = TResult()):
- myObject(theObject),
- myAction(theAction),
- myResult(theResult),
- myArg(theArg)
- {}
- virtual void Execute(){
- myResult = (myObject->*myAction)(myArg);
- }
-private:
- TObject* myObject;
- TAction myAction;
- TStoreArg myArg;
-};
-
-
-/*!
- \class TVoidMemFun1ArgEvent
- \brief Template for member function with one argument
-*/
-template<class TObject, typename TArg, typename TStoreArg = TArg> class /*EVENT_EXPORT */TVoidMemFun1ArgEvent: public SALOME_Event{
-public:
- typedef void (TObject::* TAction)(TArg);
- TVoidMemFun1ArgEvent(TObject* theObject, TAction theAction, TArg theArg):
- myObject(theObject),
- myAction(theAction),
- myArg(theArg)
- {}
- virtual void Execute(){
- (myObject->*myAction)(myArg);
- }
-private:
- TObject* myObject;
- TAction myAction;
- TStoreArg myArg;
-};
-
-
-/*!
- \class TMemFun2ArgEvent
- \brief Template for member function with two arguments
-*/
-template<class TObject, typename TRes, typename TArg, typename TArg1, typename TStoreArg = TArg, typename TStoreArg1 = TArg1> class
-/*EVENT_EXPORT */TMemFun2ArgEvent: public SALOME_Event{
-public:
- typedef TRes TResult;
- TResult myResult;
- typedef TResult (TObject::* TAction)(TArg,TArg1);
- TMemFun2ArgEvent(TObject* theObject, TAction theAction,
- TArg theArg, TArg1 theArg1,
- TResult theResult = TResult()):
- myObject(theObject),
- myAction(theAction),
- myResult(theResult),
- myArg(theArg),
- myArg1(theArg1)
- {}
- virtual void Execute(){
- myResult = (myObject->*myAction)(myArg,myArg1);
- }
-private:
- TObject* myObject;
- TAction myAction;
- TStoreArg myArg;
- TStoreArg1 myArg1;
-};
-
-
-/*!
- \class TVoidMemFun2ArgEvent
- \brief Template for member function with two arguments
-*/
-template<class TObject, typename TArg, typename TArg1, typename TStoreArg = TArg, typename TStoreArg1 = TArg1> class
-/*EVENT_EXPORT*/ TVoidMemFun2ArgEvent: public SALOME_Event{
-public:
- typedef void (TObject::* TAction)(TArg,TArg1);
- TVoidMemFun2ArgEvent(TObject* theObject, TAction theAction, TArg theArg, TArg1 theArg1):
- myObject(theObject),
- myAction(theAction),
- myArg(theArg),
- myArg1(theArg1)
- {}
- virtual void Execute(){
- (myObject->*myAction)(myArg,myArg1);
- }
-private:
- TObject* myObject;
- TAction myAction;
- TStoreArg myArg;
- TStoreArg1 myArg1;
-};
-
-
-/*!
- \fn ProcessEvent
- \brief Template function for processing events with result returing
-*/
-template<class TEvent> inline typename TEvent::TResult ProcessEvent(TEvent* theEvent){
- typename TEvent::TResult aResult;
- if(SALOME_Event::IsSessionThread()){
- theEvent->Execute();
- aResult = theEvent->myResult;
- }else{
- theEvent->process();
- aResult = theEvent->myResult;
- }
- delete theEvent;
- return aResult;
-}
-
-
-/*!
- \fn ProcessEvent
- \brief Template function for processing events without result
-*/
-inline void ProcessVoidEvent(SALOME_Event* theEvent){
- if(SALOME_Event::IsSessionThread()){
- theEvent->Execute();
- }else{
- theEvent->process();
- }
- delete theEvent;
-}
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer.h
-// Created: November, 2004
-
-//! Macro for exports
-#ifdef WNT
-
-#ifdef GLVIEWER_EXPORTS
-#define GLVIEWER_API __declspec(dllexport)
-#else
-#define GLVIEWER_API __declspec(dllimport)
-#endif
-
-#else
-#define GLVIEWER_API
-#endif // WNT
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_AspectLine.cxx
-// Created: 26/05/2005 3:17:00 PM
-
-#include "GLViewer_AspectLine.h"
-
-/*!
- Default constructor
-*/
-GLViewer_AspectLine::GLViewer_AspectLine()
-{
- myNColor = QColor( 255, 255, 255 );
- myHColor = QColor( 0, 255, 255 );
- mySColor = QColor( 255, 0, 0 );
-
- myLineWidth = 1.0;
- myLineType = 0;
-}
-
-/*!
- Constructor
- \param type: 0 for normal line and 1 for strip line
- \param width - width of line
-*/
-GLViewer_AspectLine::GLViewer_AspectLine( int type, float width )
-{
- myNColor = QColor( 255, 255, 255 );
- myHColor = QColor( 0, 255, 255 );
- mySColor = QColor( 255, 0, 0 );
-
- myLineWidth = width;
- if( type == 1 || type == 0 )
- myLineType = type;
- else
- myLineType = 0;
-}
-
-/*!
- Destructor
-*/
-GLViewer_AspectLine::~GLViewer_AspectLine()
-{
-}
-
-/*!
- Sets line color
- \param nc - normal color
- \param hc - hilighting color
- \param sc - selection color
-*/
-void GLViewer_AspectLine::setLineColors( QColor nc, QColor hc, QColor sc )
-{
- myNColor = nc;
- myHColor = hc;
- mySColor = sc;
-}
-
-/*!
- Sets type of line
- \param type: 0 for normal line and 1 for strip line
-*/
-int GLViewer_AspectLine::setLineType( const int type )
-{
- if( type == 1 || type == 0 )
- {
- myLineType = type;
- return 0;
- }
- return 1;
-}
-
-/*!
- Sets width of line
- \param width - new width of line
-*/
-int GLViewer_AspectLine::setLineWidth( const float width )
-{
- if( width > 0 )
- {
- myLineWidth = width;
- return 0;
- }
- return 1;
-}
-
-/*!
- \return colors of line
- \param nc - variable for normal color
- \param hc - variable for hilighting color
- \param sc - variable for selection color
-*/
-void GLViewer_AspectLine::getLineColors( QColor& nc, QColor& hc, QColor& sc ) const
-{
- nc = myNColor;
- hc = myHColor;
- sc = mySColor;
-}
-
-/*!
- \return binary representation of line aspect
-*/
-QByteArray GLViewer_AspectLine::getByteCopy() const
-{
- int anISize = sizeof( int );
- int aFSize = sizeof( float );
- int aNR = myNColor.red(), aNG = myNColor.green(), aNB = myNColor.blue();
- int aHR = myHColor.red(), aHG = myHColor.green(), aHB = myHColor.blue();
- int aSR = mySColor.red(), aSG = mySColor.green(), aSB = mySColor.blue();
-
- QByteArray aResult( anISize * 10 + aFSize );
-
- int i = 0;
-
- char* aPointer = (char*)&aNR;
- for( i = 0; i < anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)&aNG;
- for( ; i < 2*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)&aNB;
- for( ; i < 3*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- aPointer = (char*)&aHR;
- for( ; i < 4*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)&aHG;
- for( ; i < 5*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)&aHB;
- for( ; i < 6*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- aPointer = (char*)&aSR;
- for( ; i < 7*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)&aSG;
- for( ; i < 8*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)&aSB;
- for( ; i < 9*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- aPointer = (char*)&myLineWidth;
- for( ; i < 9*anISize + aFSize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- aPointer = (char*)&myLineType;
- for( ; i < 10*anISize + aFSize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- return aResult;
-}
-
-/*!
- Sets line aspect from binary representation
-*/
-GLViewer_AspectLine* GLViewer_AspectLine::fromByteCopy( QByteArray theBytes )
-{
-
- int anISize = sizeof( int );
- int aFSize = sizeof( float );
- int aNR = 0, aNG = 0, aNB = 0;
- int aHR = 0, aHG = 0, aHB = 0;
- int aSR = 0, aSG = 0, aSB = 0;
- int aLineType = 0;
- float aLineWidth = 0;
-
- int i = 0;
-
- char* aPointer = (char*)&aNR;
- for( i = 0; i < anISize; i++, aPointer++ )
- *aPointer = theBytes[i];
- aPointer = (char*)&aNG;
- for( ; i < 2*anISize; i++, aPointer++ )
- *aPointer = theBytes[i];
- aPointer = (char*)&aNB;
- for( ; i < 3*anISize; i++, aPointer++ )
- *aPointer = theBytes[i];
-
- aPointer = (char*)&aHR;
- for( ; i < 4*anISize; i++, aPointer++ )
- *aPointer = theBytes[i];
- aPointer = (char*)&aHG;
- for( ; i < 5*anISize; i++, aPointer++ )
- *aPointer = theBytes[i];
- aPointer = (char*)&aHB;
- for( ; i < 6*anISize; i++, aPointer++ )
- *aPointer = theBytes[i];
-
- aPointer = (char*)&aSR;
- for( ; i < 7*anISize; i++, aPointer++ )
- *aPointer = theBytes[i];
- aPointer = (char*)&aSG;
- for( ; i < 8*anISize; i++, aPointer++ )
- *aPointer = theBytes[i];
- aPointer = (char*)&aSB;
- for( ; i < 9*anISize; i++, aPointer++ )
- *aPointer = theBytes[i];
-
- aPointer = (char*)&aLineWidth;
- for( ; i < 9*anISize + aFSize; i++, aPointer++ )
- *aPointer = theBytes[i];
-
- aPointer = (char*)&aLineType;
- for( ; i < 10*anISize + aFSize; i++, aPointer++ )
- *aPointer = theBytes[i];
-
- GLViewer_AspectLine* anAspect = new GLViewer_AspectLine( aLineType, aLineWidth );
- anAspect->setLineColors( QColor( aNR, aNG, aNB ),
- QColor( aHR, aHG, aHB ),
- QColor( aSR, aSG, aSB ) );
- return anAspect;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_AspectLine.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_ASPECTLINE_H
-#define GLVIEWER_ASPECTLINE_H
-
-#include "GLViewer.h"
-
-#include <qcolor.h>
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- \Class GLViewer_AspectLine
- Substitution of Prs2d_AspectLine for OpenGL
-*/
-
-class GLVIEWER_API GLViewer_AspectLine
-{
-public:
- //! A default constructor
- /* Line is Non strip
- * Normal color is white
- * Highlight color is cyan
- * Select color is red
- */
- GLViewer_AspectLine();
- //! A conctructor by type and width of line
- /*!
- \param theType equals 0 for normal line and 1 for strip line
- \param theWidth is a width of new line
- */
- GLViewer_AspectLine( int theType, float theWidth );
-
- //! A destructor
- ~GLViewer_AspectLine();
-
- //! A function for installing the line colors
- /*!
- \param nc is normal color
- \param hc is highlight color
- \param sc is select color
- */
- void setLineColors( QColor nc = Qt::black,
- QColor hc = Qt::cyan,
- QColor sc = Qt::red );
- //! A function for installing the line width
- int setLineWidth( const float theWidth );
- //! A function for installing the line type
- /*!
- \param theType equals 0 for normal line and 1 for strip line
- */
- int setLineType( const int theType );
-
- //! A function for getting line colors information
- /*!
- \param theNC is normal color
- \param theHC is highlight color
- \param theSC is select color
- */
- void getLineColors( QColor& theNC, QColor& theHC, QColor& theSC ) const;
- //! A function for getting information about line width
- float getLineWidth() const { return myLineWidth; };
- //! A function for getting information about line type
- int getLineType() const { return myLineType; };
-
- //! A function for coding object to the byte copy
- /*!
- A function is used for copy-past technollogy in copy method
- */
- QByteArray getByteCopy() const;
-
- //! A function for decoding object from the byte copy
- /*!
- A function is used for copy-past technollogy in past method
- */
- static GLViewer_AspectLine* fromByteCopy( QByteArray );
-
-protected:
- //! A normal color
- QColor myNColor;
- //! A highlight color
- QColor myHColor;
- //! A select color
- QColor mySColor;
- //! A line width
- float myLineWidth;
- //! A line type
- /*! equals 0 for normal line and 1 for strip line */
- int myLineType;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_BaseDrawers.cxx
-// Created: November, 2004
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_BaseDrawers.h"
-#include "GLViewer_Object.h"
-#include "GLViewer_Text.h"
-#include "GLViewer_AspectLine.h"
-#include "GLViewer_BaseObjects.h"
-
-#ifndef WIN32
-#include <GL/glx.h>
-#endif
-
-GLfloat sin_table[SEGMENTS];
-GLfloat cos_table[SEGMENTS];
-
-/*!
- Default constructor
-*/
-GLViewer_MarkerDrawer::GLViewer_MarkerDrawer()
-: GLViewer_Drawer()
-{
- GLfloat angle = 0.0;
- for ( int i = 0; i < SEGMENTS; i++ )
- {
- sin_table[i] = sin( angle );
- cos_table[i] = cos( angle );
- angle += float( STEP );
- }
- myObjectType = "GLViewer_MarkerSet";
-}
-
-/*!
- Destructor
-*/
-GLViewer_MarkerDrawer::~GLViewer_MarkerDrawer()
-{
-}
-
-/*! Draws object in GLViewer
- \param xScale - current scale along X-direction
- \param yScale - current scale along Y-direction
- \param onlyUpdate - = true if only update highlight-select information
-*/
-void GLViewer_MarkerDrawer::create( float xScale, float yScale, bool onlyUpdate )
-{
- QValueList<int>::Iterator it;
- QValueList<int>::Iterator EndIt;
- QValueList<GLViewer_Object*>::Iterator anObjectIt = myObjects.begin();
- QValueList<GLViewer_Object*>::Iterator anEndObjectIt = myObjects.end();
-
- myXScale = xScale;
- myYScale = yScale;
-
- QColor colorN, colorH, colorS;
-
- GLViewer_MarkerSet* aMarkerSet = NULL;
- GLViewer_AspectLine* anAspectLine = NULL;
-
- for( ; anObjectIt != anEndObjectIt; anObjectIt++ )
- {
- aMarkerSet = ( GLViewer_MarkerSet* )(*anObjectIt);
- anAspectLine = aMarkerSet->getAspectLine();
- anAspectLine->getLineColors( colorN, colorH, colorS );
-
- float* aXCoord = aMarkerSet->getXCoord();
- float* anYCoord = aMarkerSet->getYCoord();
- float aRadius = aMarkerSet->getMarkerSize();
-
- QValueList<int> aHNumbers, anUHNumbers, aSelNumbers, anUSelNumbers;
- aMarkerSet->exportNumbers( aHNumbers, anUHNumbers, aSelNumbers, anUSelNumbers );
-
- if( onlyUpdate )
- {
- EndIt = anUHNumbers.end();
- for( it = anUHNumbers.begin(); it != EndIt; ++it )
- {
- drawMarker( aXCoord[*it], anYCoord[*it], aRadius, colorN, anAspectLine );
- }
-
- EndIt = anUSelNumbers.end();
- for( it = anUSelNumbers.begin(); it != EndIt; ++it )
- drawMarker( aXCoord[*it], anYCoord[*it], aRadius, colorN, anAspectLine );
-
- EndIt = aSelNumbers.end();
- for( it = aSelNumbers.begin(); it != EndIt; ++it )
- drawMarker( aXCoord[*it], anYCoord[*it], aRadius, colorS, anAspectLine );
-
- EndIt = aHNumbers.end();
- for( it = aHNumbers.begin(); it != EndIt; ++it )
- {
- drawMarker( aXCoord[*it], anYCoord[*it], aRadius, colorH, anAspectLine );
- }
- }
- else
- {
- int aNumber = aMarkerSet->getNumMarkers();
- for( int i = 0; i < aNumber; i++ )
- drawMarker( aXCoord[i], anYCoord[i], aRadius, colorN, anAspectLine );
-
- EndIt = anUSelNumbers.end();
- for( it = anUSelNumbers.begin(); it != EndIt; ++it )
- drawMarker( aXCoord[*it], anYCoord[*it], aRadius, colorN, anAspectLine );
-
- EndIt = aSelNumbers.end();
- for( it = aSelNumbers.begin(); it != EndIt; ++it )
- drawMarker( aXCoord[*it], anYCoord[*it], aRadius, colorS, anAspectLine );
- }
- if( aMarkerSet->getGLText()->getText() != "" )
- {
- //float aXPos = 0, anYPos = 0;
- //aMarkerSet->getGLText()->getPosition( aXPos, anYPos );
- //drawText( aMarkerSet->getGLText()->getText(), aXPos, anYPos, colorN, &aMarkerSet->getGLText()->getFont(), aMarkerSet->getGLText()->getSeparator() );
- drawText( aMarkerSet );
- }
- }
-}
-
-/*! Draws marker
- \param theXCoord - X position
- \param theYCoord - Y position
- \param theRadius - radius
- \param theColor - color
- \param theAspectLine - line aspect
-*/
-void GLViewer_MarkerDrawer::drawMarker( float& theXCoord, float& theYCoord,
- float& theRadius, QColor& theColor, GLViewer_AspectLine* theAspectLine )
-{
- glColor3f( ( GLfloat )theColor.red() / 255,
- ( GLfloat )theColor.green() / 255,
- ( GLfloat )theColor.blue() / 255 );
-
- glLineWidth( theAspectLine->getLineWidth() );
-
- if ( theAspectLine->getLineType() == 0 )
- glBegin( GL_LINE_LOOP );
- else
- glBegin( GL_LINE_STRIP);
-
- for ( int i = 0; i < SEGMENTS; i++ )
- glVertex2f( theXCoord + cos_table[i] * theRadius / myXScale,
- theYCoord + sin_table[i] * theRadius / myYScale );
- glEnd();
-}
-
-
-/*!
- Default constructor
-*/
-GLViewer_PolylineDrawer::GLViewer_PolylineDrawer()
-:GLViewer_Drawer()
-{
- myObjectType = "GLViewer_Polyline";
-}
-
-/*!
- Destructor
-*/
-GLViewer_PolylineDrawer::~GLViewer_PolylineDrawer()
-{
-}
-
-/*! Draws object in GLViewer
- \param xScale - current scale along X-direction
- \param yScale - current scale along Y-direction
- \param onlyUpdate - = true if only update highlight-select information
-*/
-void GLViewer_PolylineDrawer::create( float xScale, float yScale, bool onlyUpdate )
-{
- QValueList<GLViewer_Object*>::Iterator aObjectIt = myObjects.begin();
- QValueList<GLViewer_Object*>::Iterator aObjectEndIt = myObjects.end();
-
- myXScale = xScale;
- myYScale = yScale;
-
- QColor color, colorN, colorH, colorS;
- GLViewer_AspectLine* anAspect = NULL;
- GLViewer_Polyline* aPolyline = NULL;
- for( ; aObjectIt != aObjectEndIt; aObjectIt++ )
- {
- anAspect = (*aObjectIt)->getAspectLine();
- aPolyline = (GLViewer_Polyline*)(*aObjectIt);
-
-
- anAspect->getLineColors( colorN, colorH, colorS );
- if( onlyUpdate )
- {
- if( aPolyline->isHighlighted() )
- color = colorH;
- else if( aPolyline->isSelected() )
- color = colorS;
- else
- color = colorN;
- }
- else
- {
- if( aPolyline->isSelected() )
- color = colorS;
- else
- color = colorN;
- }
-
- float* aXCoord = aPolyline->getXCoord();
- float* anYCoord = aPolyline->getYCoord();
- int aSize = aPolyline->getNumber();
-
- glColor3f( ( GLfloat )color.red() / 255,
- ( GLfloat )color.green() / 255,
- ( GLfloat )color.blue() / 255 );
-
- glLineWidth( anAspect->getLineWidth() );
-
- if ( anAspect->getLineType() == 0 )
- glBegin( GL_LINE_LOOP );
- else
- glBegin( GL_LINE_STRIP);
-
- for( int i = 0; i < aSize ; i++ )
- glVertex2f( aXCoord[ i ], anYCoord[ i ] );
-
- if( aPolyline->isClosed() )
- glVertex2f( aXCoord[ 0 ], anYCoord[ 0 ] );
-
- glEnd();
-
- if( aPolyline->getGLText()->getText() != "" )
- {
- //float aXPos = 0, anYPos = 0;
- //aPolyline->getGLText()->getPosition( aXPos, anYPos );
- //drawText( aPolyline->getGLText()->getText(), aXPos, anYPos, color, &aPolyline->getGLText()->getFont(), aPolyline->getGLText()->getSeparator() );
- drawText( aPolyline );
- }
- }
-}
-
-/*!
- Default constructor
-*/
-GLViewer_TextDrawer::GLViewer_TextDrawer()
-: GLViewer_Drawer()
-{
- myObjectType = "GLViewer_TextObject";
-}
-
-/*!
- Destructor
-*/
-GLViewer_TextDrawer::~GLViewer_TextDrawer()
-{
-}
-
-/*! Draws object in GLViewer
- \param xScale - current scale along X-direction
- \param yScale - current scale along Y-direction
- \param onlyUpdate - = true if only update highlight-select information
-*/
-void GLViewer_TextDrawer::create( float xScale, float yScale, bool onlyUpdate )
-{
- QValueList<GLViewer_Object*>::Iterator aObjectIt = myObjects.begin();
- QValueList<GLViewer_Object*>::Iterator aObjectEndIt = myObjects.end();
-
- myXScale = xScale;
- myYScale = yScale;
-
- QColor color, colorN, colorH, colorS;
- GLViewer_AspectLine* anAspect = NULL;
- GLViewer_TextObject* anObject = NULL;
- //float aXPos = 0, anYPos = 0;
- for( ; aObjectIt != aObjectEndIt; aObjectIt++ )
- {
- anObject = (GLViewer_TextObject*)(*aObjectIt);
- anAspect = anObject->getAspectLine();
-
- anAspect->getLineColors( colorN, colorH, colorS );
- if( onlyUpdate )
- {
- if( anObject->isHighlighted() )
- color = colorH;
- else if( anObject->isSelected() )
- color = colorS;
- else
- color = colorN;
- }
- else
- {
- if( anObject->isSelected() )
- color = colorS;
- else
- color = colorN;
- }
-
- //anObject->getGLText()->getPosition( aXPos, anYPos );
- //drawText( anObject->getGLText()->getText(), aXPos, anYPos, color, &(anObject->getGLText()->getFont()), anObject->getGLText()->getSeparator() );
- drawText( anObject );
- }
-}
-
-/*!
- Updates objects after updating font
-*/
-void GLViewer_TextDrawer::updateObjects()
-{
- QValueList<GLViewer_Object*>::Iterator aObjectIt = myObjects.begin();
- QValueList<GLViewer_Object*>::Iterator aObjectEndIt = myObjects.end();
- for( ; aObjectIt != aObjectEndIt; aObjectIt++ )
- (*aObjectIt)->compute();
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_BaseDrawers.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_BASEDRAWERS_H
-#define GLVIEWER_BASEDRAWERS_H
-
-#include <qcolor.h>
-#include <qobject.h>
-#include <qfile.h>
-#include <qfont.h>
-#include <qgl.h>
-
-#include "GLViewer.h"
-#include "GLViewer_Drawer.h"
-
-class GLViewer_AspectLine;
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- \class GLViewer_MarkerDrawer
- Drawer for GLViewer_MarkerSet
-*/
-
-class GLVIEWER_API GLViewer_MarkerDrawer : public GLViewer_Drawer
-{
-public:
- GLViewer_MarkerDrawer();
- ~GLViewer_MarkerDrawer();
-
- //! Redefined method
- virtual void create( float, float, bool );
-
-private:
- //! Draws marker in point (x,y) of \param radius with \param color and \param aspect
- void drawMarker( float& x, float& y, float& radius, QColor& color, GLViewer_AspectLine* aspect );
-};
-
-/*!
- \class GLViewer_PolylineDrawer
- Drawer for GLViewer_Polyline
-*/
-
-class GLVIEWER_API GLViewer_PolylineDrawer : public GLViewer_Drawer
-{
-public:
- GLViewer_PolylineDrawer();
- ~GLViewer_PolylineDrawer();
- //! Redefined method
- virtual void create( float, float, bool );
-};
-
-/*!
- \class GLViewer_TextDrawer
- Drawer for GLViewer_Text
-*/
-
-class GLVIEWER_API GLViewer_TextDrawer: public GLViewer_Drawer
-{
-
-public:
- GLViewer_TextDrawer();
- ~GLViewer_TextDrawer();
-
- //! Redefined method
- virtual void create( float, float, bool );
- //! Updates objects after updating font
- void updateObjects();
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_BaseObjects.h"
-#include "GLViewer_BaseDrawers.h"
-#include "GLViewer_AspectLine.h"
-#include "GLViewer_CoordSystem.h"
-#include "GLViewer_Text.h"
-#include "GLViewer_Group.h"
-
-#include "GLViewer_Drawer.h"
-
-//#include <cmath>
-//using namespace std;
-
-/*!
- Constructor
-*/
-GLViewer_MarkerSet::GLViewer_MarkerSet( int number, float size, const QString& toolTip ) :
- GLViewer_Object(),
- myNumber( 0 ),
- myXCoord( 0 ),
- myYCoord( 0 )
-{
-
- myMarkerSize = size;
- myHNumbers.clear();
- myUHNumbers.clear();
- mySelNumbers.clear();
- myUSelNumbers.clear();
- myCurSelNumbers.clear();
- myPrevHNumbers.clear();
-
- myType = "GLViewer_MarkerSet";
- myToolTipText = toolTip;
-
- setNumMarkers( number );
-}
-
-/*!
- Destructor
-*/
-GLViewer_MarkerSet::~GLViewer_MarkerSet()
-{
- if ( myXCoord )
- delete[] myXCoord;
- if ( myYCoord )
- delete[] myYCoord;
-}
-
-/*!
- Adds coords to text buffer in HPGL format
- \param buffer - text buffer
- \param command - command to be added with coords
- \param aViewerCS - viewer co-ordinates system
- \param aPaperCS - paper co-ordinates system
- \param x - x co-ordinate
- \param y - y co-ordinate
- \param NewLine - adds new line to buffer
-*/
-void AddCoordsToHPGL( QString& buffer, QString command, GLViewer_CoordSystem* aViewerCS,
- GLViewer_CoordSystem* aPaperCS, double x, double y, bool NewLine = true )
-{
- if( aViewerCS && aPaperCS )
- aViewerCS->transform( *aPaperCS, x, y );
-
- QString temp = command + "%1, %2;";
- buffer += temp.arg( x ).arg( y );
- if( NewLine )
- buffer += ";\n";
-}
-
-/*!
- Adds coords to text buffer in PostScript format
- \param buffer - text buffer
- \param command - command to be added with coords
- \param aViewerCS - viewer co-ordinates system
- \param aPaperCS - paper co-ordinates system
- \param x - x co-ordinate
- \param y - y co-ordinate
- \param NewLine - adds new line to buffer
-*/
-void AddCoordsToPS( QString& buffer, QString command, GLViewer_CoordSystem* aViewerCS,
- GLViewer_CoordSystem* aPaperCS, double x, double y, bool NewLine = true )
-{
- if( aViewerCS && aPaperCS )
- aViewerCS->transform( *aPaperCS, x, y );
-
- QString temp = "%1 %2 "+command;
- buffer += temp.arg( x ).arg( y );
- if( NewLine )
- buffer += "\n";
-}
-
-/*!
- Adds line aspect description to text buffer in PostScript format
- \param buffer - text buffer
- \param anAspect - line aspect
- \param aViewerCS - viewer co-ordinates system
- \param aPaperCS - paper co-ordinates system
-*/
-void AddLineAspectToPS( QString& buffer, GLViewer_AspectLine* anAspect,
- GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPaperCS )
-{
- if( anAspect )
- {
- QColor col1, col2, col3;
- anAspect->getLineColors( col1, col2, col3 );
-
- float aWidth = anAspect->getLineWidth();
- int aLineType = anAspect->getLineType();
-
- QString temp = "%1 %2 %3 setrgbcolor\n";
- double rr = 1 - double( col1.red() ) / 255.0, //color inverting
- gg = 1 - double( col1.green() ) / 255.0,
- bb = 1 - double( col1.blue() ) / 255.0;
-
- buffer += temp.arg( rr ).arg( gg ).arg( bb );
-
- double x_stretch, y_stretch;
- aViewerCS->getStretching( *aPaperCS, x_stretch, y_stretch );
- buffer += temp.arg( x_stretch * aWidth )+" setlinewidth\n";
-
- if( aLineType==0 ) //solid
- buffer += "[] 0 setdash\n";
- else if( aLineType==1 ) //strip
- buffer += "[2] 0 setdash\n";
- }
-}
-
-#ifdef WIN32
-/*!
- Adds line aspect description EMF image
- \param hDC - descriptor of EMF
- \param anAspect - line aspect
- \param aViewerCS - viewer co-ordinates system
- \param aPaperCS - paper co-ordinates system
-*/
-HPEN AddLineAspectToEMF( HDC hDC, GLViewer_AspectLine* anAspect,
- GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPaperCS )
-{
- if( anAspect )
- {
- QColor col1, col2, col3;
- anAspect->getLineColors( col1, col2, col3 );
-
- double x_stretch, y_stretch;
- aViewerCS->getStretching( *aPaperCS, x_stretch, y_stretch );
-
- double aWidth = anAspect->getLineWidth()*x_stretch;
- int aLineType = anAspect->getLineType();
-
- return CreatePen( PS_SOLID, aWidth, RGB( 255-col1.red(), 255-col1.green(), 255-col1.blue() ) );
- }
- else
- return NULL;
-}
-#endif
-
-/*!
- Saves to file PostScript set of markers
- \param hFile - file instance
- \param aViewerCS - viewer co-ordinates system
- \param aPSCS - paper co-ordinates system
-*/
-bool GLViewer_MarkerSet::translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS )
-{
- int noPoints = 20;
-
- QString aBuffer = "newpath\n";
-
- AddLineAspectToPS( aBuffer, getAspectLine(), aViewerCS, aPSCS );
-
- for( int i=0; i<myNumber; i++ )
- {
- aBuffer += "\n";
-
- double x_stretch, y_stretch;
- aViewerCS->getStretching( *aPSCS, x_stretch, y_stretch );
-
- double x0 = myXCoord[i],
- y0 = myYCoord[i],
- r = myMarkerSize,
- x, y;
-
- for( int j=0; j<=noPoints; j++ )
- {
- x = x0 + r*cos( double(j)*2*PI/double(noPoints) );
- y = y0 + r*sin( double(j)*2*PI/double(noPoints) );
- if( j==0 )
- AddCoordsToPS( aBuffer, "moveto", aViewerCS, aPSCS, x, y, true );
- else
- AddCoordsToPS( aBuffer, "lineto", aViewerCS, aPSCS, x, y, true );
- }
- }
- aBuffer+="closepath\nstroke\n";
-
- hFile.writeBlock( aBuffer.ascii(), aBuffer.length() );
-
- return true;
-}
-
-/*!
- Saves to file HPGL set of markers
- \param hFile - file instance
- \param aViewerCS - viewer co-ordinates system
- \param aHPGLCS - paper co-ordinates system
-*/
-bool GLViewer_MarkerSet::translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS,
- GLViewer_CoordSystem* aHPGLCS )
-{
- int noPoints = 20;
- QString aBuffer;
- for( int i=0; i<myNumber; i++ )
- {
- aBuffer = "";
-
- double x_stretch, y_stretch;
- aViewerCS->getStretching( *aHPGLCS, x_stretch, y_stretch );
-
- double x0 = myXCoord[i],
- y0 = myYCoord[i],
- r = myMarkerSize,
- x, y;
-
- AddCoordsToHPGL( aBuffer, "PA", aViewerCS, aHPGLCS, x0+r, y0 );
- aBuffer+="PD;\n";
- for( int j=1; j<=noPoints; j++ )
- {
- x = x0 + r*cos( double(j)*2*PI/double(noPoints) );
- y = y0 + r*sin( double(j)*2*PI/double(noPoints) );
- AddCoordsToHPGL( aBuffer, "PD", aViewerCS, aHPGLCS, x, y );
- }
- aBuffer+="PU;\n";
-
- hFile.writeBlock( aBuffer.ascii(), aBuffer.length() );
- }
-
- return true;
-}
-
-#ifdef WIN32
-/*!
- Saves to EMF image set of markers
- \param dc - EMF image descriptor
- \param aViewerCS - viewer co-ordinates system
- \param aEMFCS - paper co-ordinates system
-*/
-bool GLViewer_MarkerSet::translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS )
-{
- int noPoints = 20;
- if( !aViewerCS || !aEMFCS )
- return false;
-
- HPEN pen = AddLineAspectToEMF( dc, getAspectLine(), aViewerCS, aEMFCS );
- HGDIOBJ old = SelectObject( dc, pen );
-
- for( int i=0; i<myNumber; i++ )
- {
- double x0 = myXCoord[i],
- y0 = myYCoord[i],
- r = myMarkerSize,
- x, y;
-
- for( int j=0; j<=noPoints; j++ )
- {
- x = x0 + r*cos( double(j)*2*PI/double(noPoints) );
- y = y0 + r*sin( double(j)*2*PI/double(noPoints) );
- aViewerCS->transform( *aEMFCS, x, y );
- if( j==0 )
- MoveToEx( dc, x, y, NULL );
- else
- LineTo( dc, x, y );
- }
- }
-
- SelectObject( dc, old );
- if( pen )
- DeleteObject( pen );
- return true;
-}
-#endif
-
-/*!
- Computes all necessary information about object for presentation in drawer
-*/
-void GLViewer_MarkerSet::compute()
-{
-// cout << "GLViewer_MarkerSet::compute" << endl;
- GLfloat xa = myXCoord[0];
- GLfloat xb = myXCoord[0];
- GLfloat ya = myYCoord[0];
- GLfloat yb = myYCoord[0];
-
- for ( int i = 0; i < myNumber; i++ )
- {
- xa = QMIN( xa, myXCoord[i] );
- xb = QMAX( xb, myXCoord[i] );
- ya = QMIN( ya, myYCoord[i] );
- yb = QMAX( yb, myYCoord[i] );
- }
-
- myXGap = ( xb - xa ) / 10;
- myYGap = ( yb - ya ) / 10;
-
- myRect->setLeft( xa - myXGap );
- myRect->setTop( yb + myYGap );
- myRect->setRight( xb + myXGap );
- myRect->setBottom( ya - myYGap );
-}
-
-/*!
- Creates corresponding drawer
-*/
-GLViewer_Drawer* GLViewer_MarkerSet::createDrawer()
-{
-// cout << "GLViewer_MarkerSet::createDrawer" << endl;
- return myDrawer = new GLViewer_MarkerDrawer();
-}
-
-/*!
- Computes highlight presentation
- \param x - x coord
- \param y - y coord
- \param tol - tolerance of detecting
- \param isCircle - true if sensitive area of detection is round
- \return true if highlight status is changed
-*/
-GLboolean GLViewer_MarkerSet::highlight( GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle )
-{
- if( !myIsVisible )
- return false;
-// cout << "GLViewer_MarkerSet::highlight " << x <<" " << y << " " << tol << endl;
- int count = 0;
- GLfloat xdist, ydist, radius;
- QValueList<int>::Iterator it;
- QValueList<int> curHNumbers;
- bool isFound;
- GLboolean update;
- int cnt = 0;
-
- radius = tol - myMarkerSize / 2.;
-
- myUHNumbers += myHNumbers;
- myHNumbers.clear();
-
- for ( int i = 0; i < myNumber; i++ )
- {
- xdist = ( myXCoord[i] - x ) * myXScale;
- ydist = ( myYCoord[i] - y ) * myYScale;
-
-// if ( isCircle && ( xdist * xdist + ydist * ydist <= radius * radius ) ||
- if ( isCircle && ( xdist * xdist + ydist * ydist <= myMarkerSize * myMarkerSize ) ||
- !isCircle && ( fabs( xdist ) <= radius && fabs( ydist ) <= radius ) )
- {
- isFound = FALSE;
- count++;
- for ( it = myCurSelNumbers.begin(); it != myCurSelNumbers.end(); ++it )
- if( i == *it )
- {
- isFound = TRUE;
- curHNumbers.append( i );
- }
-
- if( !isFound )
- myHNumbers.append( i );
- else
- cnt++;
- }
- }
- myCurSelNumbers = curHNumbers;
-
- myIsHigh = ( GLboolean )count;
- update = ( GLboolean )( myHNumbers != myPrevHNumbers );
-
- myPrevHNumbers = myHNumbers;
-
- //cout << "GLViewer_MarkerSet::highlight complete with " << (int)myIsHigh << endl;
- return update;
-}
-
-/*!
- Unhilights object
-*/
-GLboolean GLViewer_MarkerSet::unhighlight()
-{
- if( !myHNumbers.isEmpty() )
- {
- myUHNumbers += myHNumbers;
- myPrevHNumbers.clear();
- myHNumbers.clear();
- //??? myCurSelNumbers.clear();
- return GL_TRUE;
- }
-
- return GL_FALSE;
-}
-
-/*!
- Selects marker set
- /param x, y - co-ordinates of mouse
- /param tol - tolerance
- /param rect - rectangle (in case of rectangular selection)
- /param isFull - if it is true, then object may selected only if it lays whole in selection zone
- \param isCircle - true if sensitive area of detection is round
- \param isShift - true if selection exec with append option
-*/
-GLboolean GLViewer_MarkerSet::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull,
- GLboolean isCircle, GLboolean isShift )
-{
- if( !myIsVisible )
- return false;
-// cout << "GLViewer_MarkerSet::select " << x << " " << y << endl;
- int count = 0;
- GLfloat xdist, ydist, radius;
- QValueList<int>::Iterator it;
- QValueList<int>::Iterator it1;
- QValueList<int>::Iterator remIt;
- QValueList<int>::Iterator curIt;
-
- radius = tol - myMarkerSize / 2.;
-
- if( radius < myMarkerSize / 2.)
- radius = myMarkerSize / 2.;
-
- count = isShift ? mySelNumbers.count() : 0;
-
- myUSelNumbers = mySelNumbers;
-
- if ( !isShift )
- {
- mySelNumbers.clear();
- myCurSelNumbers.clear();
- }
-
- for ( int i = 0; i < myNumber; i++ )
- {
- xdist = ( myXCoord[i] - x ) * myXScale;
- ydist = ( myYCoord[i] - y ) * myYScale;
-
- //if ( isCircle && ( xdist * xdist + ydist * ydist <= radius * radius ) ||
- if ( isCircle && ( xdist * xdist + ydist * ydist <= myMarkerSize * myMarkerSize ) ||
- !isCircle && ( fabs( xdist ) <= radius && fabs( ydist ) <= radius ) )
- {
- count++;
- if ( isShift )
- {
- bool isFound = FALSE;
- for( it = mySelNumbers.begin(); it != mySelNumbers.end(); ++it )
- if ( *it == i )
- {
- myUSelNumbers.append( *it );
- remIt = it;
- isFound = TRUE;
- break;
- }
-
- if ( !isFound )
- {
- mySelNumbers.append( i );
- myCurSelNumbers.append( i );
- for ( it1 = myHNumbers.begin(); it1 != myHNumbers.end(); ++it1 )
- if( i == *it1 )
- {
- myHNumbers.remove( it1 );
- break;
- }
- for ( it1 = myUHNumbers.begin(); it1 != myUHNumbers.end(); ++it1 )
- if( i == *it1 )
- {
- myUHNumbers.remove( it1 );
- break;
- }
- }
- else
- {
- mySelNumbers.remove( remIt );
- for ( curIt = myCurSelNumbers.begin(); curIt != myCurSelNumbers.end(); ++curIt )
- if( *curIt == *remIt)
- {
- myCurSelNumbers.remove( curIt );
- break;
- }
- for ( it1 = myHNumbers.begin(); it1 != myHNumbers.end(); ++it1 )
- if( i == *it1 )
- {
- myHNumbers.remove( it1 );
- break;
- }
- for ( it1 = myUHNumbers.begin(); it1 != myUHNumbers.end(); ++it1 )
- if( i == *it1 )
- {
- myUHNumbers.remove( it1 );
- break;
- }
- }
- }
- else
- {
- mySelNumbers.append( i );
- myCurSelNumbers.append( i );
- for ( it1 = myHNumbers.begin(); it1 != myHNumbers.end(); ++it1 )
- if( i == *it1 )
- {
- myHNumbers.remove( it1 );
- break;
- }
- for ( it1 = myUHNumbers.begin(); it1 != myUHNumbers.end(); ++it1 )
- if( i == *it1 )
- {
- myUHNumbers.remove( it1 );
- break;
- }
- }
- }
- }
-
- for( it = mySelNumbers.begin(); it != mySelNumbers.end(); ++it )
- for( it1 = myUSelNumbers.begin(); it1 != myUSelNumbers.end(); ++it1 )
- if( *it == *it1 )
- {
- it1 = myUSelNumbers.remove( it1 );
- it1--;
- }
-
- myIsSel = (GLboolean)count;
-
-// cout << "GLViewer_MarkerSet::select complete with " << (int)myIsSel << endl;
- return myIsSel;
-}
-
-/*!
- Unselects marker set
-*/
-GLboolean GLViewer_MarkerSet::unselect()
-{
- if( !mySelNumbers.isEmpty() )
- {
- myUSelNumbers = mySelNumbers;
- mySelNumbers.clear();
- myCurSelNumbers.clear();
- return GL_TRUE;
- }
-
- return GL_FALSE;
-}
-
-/*!
- \return update object rectangle
- Does not equal getRect() if object have a persistence to some viewer transformations
-*/
-GLViewer_Rect* GLViewer_MarkerSet::getUpdateRect()
-{
- GLViewer_Rect* rect = new GLViewer_Rect();
-
- rect->setLeft( myRect->left() + myXGap - myMarkerSize / myXScale );
- rect->setTop( myRect->top() + myYGap + myMarkerSize / myYScale );
- rect->setRight( myRect->right() - myXGap + myMarkerSize / myXScale );
- rect->setBottom( myRect->bottom() - myYGap - myMarkerSize / myYScale );
- //cout << " Additional tolerance " << myMarkerSize / myYScale << endl;
- //rect->setLeft( myRect->left() - myMarkerSize / myXScale );
- //rect->setTop( myRect->top() - myMarkerSize / myYScale );
- //rect->setRight( myRect->right() + myMarkerSize / myXScale );
- //rect->setBottom( myRect->bottom() + myMarkerSize / myYScale );
-
- return rect;
-}
-
-/*!
- Sets array of x coords of points
- \param xCoord - array of co-ordinates
- \param size - array size
-*/
-void GLViewer_MarkerSet::setXCoord( GLfloat* xCoord, int size )
-{
- myXCoord = new GLfloat[ size ];
- for( int i = 0; i < size; i++ )
- myXCoord[i] = xCoord[i];
-}
-
-/*!
- Sets array of y coords of points
- \param yCoord - array of co-ordinates
- \param size - array size
-*/
-void GLViewer_MarkerSet::setYCoord( GLfloat* yCoord, int size )
-{
- myYCoord = new GLfloat[ size ];
- for( int i = 0; i < size; i++ )
- myYCoord[i] = yCoord[i];
-}
-
-/*!
- Sets number of markers
- \param number - new number of markers
-*/
-void GLViewer_MarkerSet::setNumMarkers( GLint number )
-{
- if ( myNumber == number )
- return;
-
- if ( myXCoord && myYCoord )
- {
- delete[] myXCoord;
- delete[] myYCoord;
- }
-
- myNumber = number;
- myXCoord = new GLfloat[ myNumber ];
- myYCoord = new GLfloat[ myNumber ];
-}
-
-
-/*!
- Export numbers of highlighted/selected lines
-*/
-void GLViewer_MarkerSet::exportNumbers( QValueList<int>& highlight,
- QValueList<int>& unhighlight,
- QValueList<int>& select,
- QValueList<int>& unselect )
-{
- highlight = myHNumbers;
- unhighlight = myUHNumbers;
- select = mySelNumbers;
- unselect = myUSelNumbers;
-
- myUHNumbers = myHNumbers;
-}
-
-/*!
- Adds or remove selected number
- \param index - selected index
-*/
-bool GLViewer_MarkerSet::addOrRemoveSelected( int index )
-{
- if( index < 0 || index > myNumber )
- return FALSE;
-
- int n = mySelNumbers.findIndex( index );
- if( n == -1 )
- mySelNumbers.append( index );
- else
- {
- QValueList<int>::Iterator it;
- it = mySelNumbers.at( n );
- mySelNumbers.remove( it );
- myUSelNumbers.append( index );
- }
- return TRUE;
-}
-
-/*!
- Adds some selected numbers
- \param seq - sequence of indices
-*/
-void GLViewer_MarkerSet::addSelected( const TColStd_SequenceOfInteger& seq )
-{
- for ( int i = 1; i <= seq.Length(); i++ )
- if( mySelNumbers.findIndex( seq.Value( i ) ) == -1 )
- mySelNumbers.append( seq.Value( i ) - 1 );
-}
-
-/*!
- Sets some numbers as selected
- \param seq - sequence of indices
-*/
-void GLViewer_MarkerSet::setSelected( const TColStd_SequenceOfInteger& seq )
-{
-// for( QValueList<int>::Iterator it = mySelNumbers.begin(); it != mySelNumbers.end(); ++it )
-// if( myUSelNumbers.findIndex( *it ) == -1 )
-// myUSelNumbers.append( *it );
-
- myUSelNumbers = mySelNumbers;
- mySelNumbers.clear();
-
- for ( int i = 1; i <= seq.Length(); i++ )
- mySelNumbers.append( seq.Value( i ) - 1 );
-}
-
-/*! Moves object by recomputing
- \param dx - moving along X coord
- \param dy - moving along Y coord
- \param fromGroup - is true if this method called from group
-*/
-void GLViewer_MarkerSet::moveObject( float theX, float theY, bool fromGroup )
-{
- if( !fromGroup && myGroup)
- {
- myGroup->dragingObjects( theX, theY );
- return;
- }
- for( int i = 0; i < myNumber; i++ )
- {
- myXCoord[i] = myXCoord[i] + theX;
- myYCoord[i] = myYCoord[i] + theY;
- }
- compute();
-}
-
-/*!
- Codes marker set as byte copy
- \return byte array
-*/
-QByteArray GLViewer_MarkerSet::getByteCopy()
-{
- int i = 0;
- int anISize = sizeof( GLint );
- int aFSize = sizeof( GLfloat );
-
- QByteArray aObject = GLViewer_Object::getByteCopy();
-
- QByteArray aResult( anISize + 2*aFSize*myNumber + aFSize + aObject.size());
-
- char* aPointer = (char*)&myNumber;
- for( i = 0; i < anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- aPointer = (char*)myXCoord;
- for( ; i < anISize + aFSize*myNumber; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)myYCoord;
- for( ; i < anISize + 2*aFSize*myNumber; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- aPointer = (char*)&myMarkerSize;
- for( ; i < anISize + 2*aFSize*myNumber + aFSize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
-
- for ( ; i < (int)aResult.size(); i++ )
- aResult[i] = aObject[i - anISize - 2*aFSize*myNumber - aFSize];
-
- return aResult;
-}
-
-/*!
- Initialize marker set by byte array
- \param theArray - byte array
-*/
-bool GLViewer_MarkerSet::initializeFromByteCopy( QByteArray theArray )
-{
- int i = 0;
- int anISize = sizeof( GLint );
- int aFSize = sizeof( GLfloat );
-
- char* aPointer = (char*)&myNumber;
- for( i = 0; i < anISize; i++, aPointer++ )
- *aPointer = theArray[i];
-
- int aSize = theArray.size();
- if( aSize < anISize + 2*aFSize*myNumber + aFSize)
- return false;
-
- myXCoord = new GLfloat[myNumber];
- myYCoord = new GLfloat[myNumber];
- aPointer = (char*)myXCoord;
- for( ; i < anISize + aFSize*myNumber; i++, aPointer++ )
- *aPointer = theArray[i];
- aPointer = (char*)myYCoord;
- for( ; i < anISize + 2*aFSize*myNumber; i++, aPointer++ )
- *aPointer = theArray[i];
-
- aPointer = (char*)&myMarkerSize;
- for( ; i < anISize + 2*aFSize*myNumber + aFSize; i++, aPointer++ )
- *aPointer = theArray[i];
-
- int aCurIndex = anISize + 2*aFSize*myNumber + aFSize;
- QByteArray aObject( aSize - aCurIndex );
- for( ; i < aSize; i++ )
- aObject[i - aCurIndex] = theArray[i];
-
-
- if( !GLViewer_Object::initializeFromByteCopy( aObject ) || myType != "GLViewer_MarkerSet" )
- return false;
-
- myHNumbers.clear();
- myUHNumbers.clear();
- mySelNumbers.clear();
- myUSelNumbers.clear();
- myCurSelNumbers.clear();
- myPrevHNumbers.clear();
-
- return true;
-}
-
-/*!
- \class GLViewer_Polyline
- OpenGL Polyline
-*/
-
-#define SECTIONS 100
-#define DISTANTION 5
-
-/*!
- Constructor
- \param number - number of segments
- \param size - size of polyline
- \param toolTip - tool tip of polyline
-*/
-GLViewer_Polyline::GLViewer_Polyline( int number, float size, const QString& toolTip ):
- GLViewer_Object(),
- myNumber( 0 ),
- myXCoord( 0 ),
- myYCoord( 0 )
-{
- myHighFlag = GL_TRUE;
-
- myHNumbers.clear();
- myUHNumbers.clear();
- mySelNumbers.clear();
- myUSelNumbers.clear();
- myCurSelNumbers.clear();
- myPrevHNumbers.clear();
-
- setNumber( number );
-
- myType = "GLViewer_Polyline";
- myToolTipText = toolTip;
-}
-
-/*!
- Destructor, destroys internal arrays of co-ordinates
-*/
-GLViewer_Polyline::~GLViewer_Polyline()
-{
- if ( myXCoord )
- delete[] myXCoord;
- if ( myYCoord )
- delete[] myYCoord;
-}
-
-/*!
- Saves polyline to file PostScript
- \param hFile - file instance
- \param aViewerCS - viewer co-ordinates system
- \param aPSCS - paper co-ordinates system
-*/
-bool GLViewer_Polyline::translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS )
-{
- QString aBuffer = "newpath\n";
-
- AddLineAspectToPS( aBuffer, getAspectLine(), aViewerCS, aPSCS );
-
- for( int i=0; i<myNumber; i++ )
- if( i==0 )
- AddCoordsToPS( aBuffer, "moveto", aViewerCS, aPSCS, myXCoord[i], myYCoord[i] );
- else
- AddCoordsToPS( aBuffer, "lineto", aViewerCS, aPSCS, myXCoord[i], myYCoord[i] );
-
- if( myIsClosed )
- AddCoordsToPS( aBuffer, "lineto", aViewerCS, aPSCS, myXCoord[0], myYCoord[0] );
-
- aBuffer+="closepath\nstroke\n";
-
- hFile.writeBlock( aBuffer.ascii(), aBuffer.length() );
-
- return true;
-}
-
-/*!
- Saves polyline to file HPGL
- \param hFile - file instance
- \param aViewerCS - viewer co-ordinates system
- \param aHPGLCS - paper co-ordinates system
-*/
-bool GLViewer_Polyline::translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS )
-{
- QString aBuffer = "";
- for( int i=0; i<myNumber; i++ )
- {
- AddCoordsToHPGL( aBuffer, "PA", aViewerCS, aHPGLCS, myXCoord[i], myYCoord[i] );
- if( i==0 )
- aBuffer+="PD;\n";
- }
-
- if( myIsClosed )
- AddCoordsToHPGL( aBuffer, "PA", aViewerCS, aHPGLCS, myXCoord[0], myYCoord[0] );
-
- aBuffer+="PU;\n";
-
- hFile.writeBlock( aBuffer.ascii(), aBuffer.length() );
-
- return true;
-}
-
-#ifdef WIN32
-/*!
- Saves polyline to EMF image
- \param dc - EMF image descriptor
- \param aViewerCS - viewer co-ordinates system
- \param aEMFCS - paper co-ordinates system
-*/
-bool GLViewer_Polyline::translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS )
-{
- if( !aViewerCS || !aEMFCS )
- return false;
-
- HPEN pen = AddLineAspectToEMF( dc, getAspectLine(), aViewerCS, aEMFCS );
- HGDIOBJ old = SelectObject( dc, pen );
-
- double x, y;
- for( int i=0; i<myNumber; i++ )
- {
- x = myXCoord[i];
- y = myYCoord[i];
- aViewerCS->transform( *aEMFCS, x, y );
- if( i==0 )
- MoveToEx( dc, x, y, NULL );
- else
- LineTo( dc, x, y );
- }
-
- if( myIsClosed )
- {
- x = myXCoord[0];
- y = myYCoord[0];
- aViewerCS->transform( *aEMFCS, x, y );
- LineTo( dc, x, y );
- }
-
- SelectObject( dc, old );
- if( pen )
- DeleteObject( pen );
-
- return true;
-}
-#endif
-
-/*!
- Computes all necessary information about object for presentation in drawer
-*/
-void GLViewer_Polyline::compute()
-{
-// cout << "GLViewer_MarkerSet::compute" << endl;
- GLfloat xa = myXCoord[0];
- GLfloat xb = myXCoord[0];
- GLfloat ya = myYCoord[0];
- GLfloat yb = myYCoord[0];
-
- for ( int i = 0; i < myNumber; i++ )
- {
- xa = QMIN( xa, myXCoord[i] );
- xb = QMAX( xb, myXCoord[i] );
- ya = QMIN( ya, myYCoord[i] );
- yb = QMAX( yb, myYCoord[i] );
- }
-
- GLfloat xGap = ( xb - xa ) / 10;
- GLfloat yGap = ( yb - ya ) / 10;
-
- myRect->setLeft( xa - xGap );
- myRect->setTop( yb + yGap );
- myRect->setRight( xb + xGap );
- myRect->setBottom( ya - yGap );
-}
-
-/*!
- \return update object rectangle
- Does not equal getRect() if object have a persistence to some viewer transformations
-*/
-GLViewer_Rect* GLViewer_Polyline::getUpdateRect()
-{
- GLViewer_Rect* rect = new GLViewer_Rect();
-
- rect->setLeft( myRect->left() - myXGap );
- rect->setTop( myRect->top() + myYGap );
- rect->setRight( myRect->right() + myXGap );
- rect->setBottom( myRect->bottom() - myYGap );
-
- return rect;
-}
-
-/*!
- Creates corresponding drawer
-*/
-GLViewer_Drawer* GLViewer_Polyline::createDrawer()
-{
-// cout << "GLViewer_MarkerSet::createDrawer" << endl;
- return myDrawer = new GLViewer_PolylineDrawer();
-}
-
-/*!
- Computes highlight presentation
- \param x - x coord
- \param y - y coord
- \param tol - tolerance of detecting
- \param isCircle - true if sensitive area of detection is round
- \return true if highlight status is changed
-*/
-GLboolean GLViewer_Polyline::highlight( GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle )
-{
- if( !myIsVisible )
- return false;
- GLfloat xa, xb, ya, yb, l;
- GLfloat rsin, rcos, r, ra, rb;
- GLboolean update;
- GLboolean highlighted = myIsHigh;
-
- myIsHigh = GL_FALSE;
-
- int c = 0;
- if( myIsClosed )
- c = 1;
-
- for( int i = 0; i < myNumber-1+c; i++ )
- {
- xa = myXCoord[i];
- ya = myYCoord[i];
- if( i != myNumber-1 )
- {
- xb = myXCoord[i+1];
- yb = myYCoord[i+1];
- }
- else
- {
- xb = myXCoord[0];
- yb = myYCoord[0];
- }
-
- l = sqrt( (xb-xa)*(xb-xa) + (yb-ya)*(yb-ya) );
- rsin = (yb-ya) / l;
- rcos = (xb-xa) / l;
- r = ( (x-xa)*(y-yb) - (x-xb)*(y-ya) ) / ( rsin*(ya-yb) + rcos*(xa-xb) );
- ra = sqrt( (x-xa)*(x-xa) + (y-ya)*(y-ya) );
- rb = sqrt( (x-xb)*(x-xb) + (y-yb)*(y-yb) );
- if( fabs( r ) * myXScale <= DISTANTION && ra <= l + DISTANTION && rb <= l + DISTANTION )
- {
- myIsHigh = GL_TRUE;
- break;
- }
- }
-
- if( !myHighFlag && myIsHigh )
- myIsHigh = GL_FALSE;
- else
- myHighFlag = GL_TRUE;
-
- update = ( GLboolean )( myIsHigh != highlighted );
-
-// cout << "GLViewer_Polyline::highlight complete with " << (int)myIsHigh << endl;
- return update;
-}
-
-/*!
- Unhilights object
-*/
-GLboolean GLViewer_Polyline::unhighlight()
-{
-// if( !myHNumbers.isEmpty() )
-// {
-// myUHNumbers = myHNumbers;
-// myHNumbers.clear();
-// return GL_TRUE;
-// }
-
- if( myIsHigh )
- {
- myIsHigh = GL_FALSE;
- return GL_TRUE;
- }
-
- return GL_FALSE;
-}
-
-/*!
- Selects polyline
- /param x, y - co-ordinates of mouse
- /param tol - tolerance
- /param rect - rectangle (in case of rectangular selection)
- /param isFull - if it is true, then object may selected only if it lays whole in selection zone
- \param isCircle - true if sensitive area of detection is round
- \param isShift - true if selection exec with append option
-*/
-GLboolean GLViewer_Polyline::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull,
- GLboolean isCircle, GLboolean isShift )
-{
- if( !myIsVisible )
- return false;
- GLfloat xa, xb, ya, yb, l;
- GLfloat rsin, rcos, r, ra, rb;
- GLboolean update;
- GLboolean selected = myIsSel;
-
- myIsSel = GL_FALSE;
-
- int c = 0;
- if( myIsClosed )
- c = 1;
-
- for( int i = 0; i < myNumber-1+c; i++ )
- {
- xa = myXCoord[i];
- ya = myYCoord[i];
- if( i != myNumber-1 )
- {
- xb = myXCoord[i+1];
- yb = myYCoord[i+1];
- }
- else
- {
- xb = myXCoord[0];
- yb = myYCoord[0];
- }
-
- l = sqrt( (xb-xa)*(xb-xa) + (yb-ya)*(yb-ya) );
- rsin = (yb-ya) / l;
- rcos = (xb-xa) / l;
- r = ( (x-xa)*(y-yb) - (x-xb)*(y-ya) ) / ( rsin*(ya-yb) + rcos*(xa-xb) );
- ra = sqrt( (x-xa)*(x-xa) + (y-ya)*(y-ya) );
- rb = sqrt( (x-xb)*(x-xb) + (y-yb)*(y-yb) );
- if( fabs( r ) * myXScale <= DISTANTION && ra <= l + DISTANTION && rb <= l + DISTANTION )
- {
- myIsSel = GL_TRUE;
- break;
- }
- }
-
- if ( myIsSel )
- {
- myHighFlag = GL_FALSE;
- myIsHigh = GL_FALSE;
- }
- else
- myHighFlag = GL_TRUE;
-
- update = ( GLboolean )( myIsSel != selected );
-
- // cout << "GLViewer_Polyline::select complete with " << (int)myIsSel << endl;
-
- // return update; !!!!!!!!!!!!!!!!!!!!!!!!!!! no here
- return myIsSel;
-}
-
-/*!
- Unselects polyline
-*/
-GLboolean GLViewer_Polyline::unselect()
-{
-// if( !mySelNumbers.isEmpty() )
-// {
-// myUSelNumbers = mySelNumbers;
-// mySelNumbers.clear();
-// myCurSelNumbers.clear();
-// return GL_TRUE;
-// }
-
- if( myIsSel )
- {
- myIsSel = GL_FALSE;
- return GL_TRUE;
- }
-
- return GL_FALSE;
-}
-
-/*!
- Sets array of abscisses for points of polyline
- \param xCoord - array of of abscisses
- \param size - size of array
-*/
-void GLViewer_Polyline::setXCoord( GLfloat* xCoord, int size )
-{
- myXCoord = new GLfloat[ size ];
- for( int i = 0; i < size; i++ )
- myXCoord[i] = xCoord[i];
-}
-
-/*!
- Sets array of ordinates for points of polyline
- \param xCoord - array of of ordinates
- \param size - size of array
-*/
-void GLViewer_Polyline::setYCoord( GLfloat* yCoord, int size )
-{
- myYCoord = new GLfloat[ size ];
- for( int i = 0; i < size; i++ )
- myYCoord[i] = yCoord[i];
-}
-
-/*!
- Sets number of points
- \param number - new number of points
-*/
-void GLViewer_Polyline::setNumber( GLint number )
-{
- if ( myNumber == number )
- return;
-
- if ( myXCoord && myYCoord )
- {
- delete[] myXCoord;
- delete[] myYCoord;
- }
-
- myNumber = number;
- myXCoord = new GLfloat[ myNumber ];
- myYCoord = new GLfloat[ myNumber ];
-}
-
-/*!
- Export numbers of highlighted/selected lines
-*/
-void GLViewer_Polyline::exportNumbers( QValueList<int>& highlight,
- QValueList<int>& unhighlight,
- QValueList<int>& select,
- QValueList<int>& unselect )
-{
- highlight = myHNumbers;
- unhighlight = myUHNumbers;
- select = mySelNumbers;
- unselect = myUSelNumbers;
-}
-
-/*!
- Moves object by recomputing
- \param dx - moving along X coord
- \param dy - moving along Y coord
- \param fromGroup - is true if this method called from group
-*/
-void GLViewer_Polyline::moveObject( float theX, float theY, bool fromGroup )
-{
- if( !fromGroup && myGroup)
- {
- myGroup->dragingObjects( theX, theY );
- return;
- }
- for( int i = 0; i < myNumber; i++ )
- {
- myXCoord[i] = myXCoord[i] + theX;
- myYCoord[i] = myYCoord[i] + theY;
- }
- compute();
-}
-
-/*!
- Codes polyline as byte copy
- \return byte array
-*/
-QByteArray GLViewer_Polyline::getByteCopy()
-{
- int i = 0;
- int anISize = sizeof( GLint );
- int aFSize = sizeof( GLfloat );
- int aBSize = sizeof( GLboolean );
-
- QByteArray aObject = GLViewer_Object::getByteCopy();
-
- QByteArray aResult( aFSize*myNumber*2 + anISize + 2*aBSize + aObject.size());
-
- char* aPointer = (char*)&myNumber;
- for( i = 0; i < anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- aPointer = (char*)myXCoord;
- for( ; i < anISize + aFSize*myNumber; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)myYCoord;
- for( ; i < anISize + 2*aFSize*myNumber; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- aPointer = (char*)&myIsClosed;
- for( ; i < anISize + 2*aFSize*myNumber + aBSize; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)&myHighSelAll;
- for( ; i < anISize + 2*aFSize*myNumber + 2*aBSize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- for ( ; i < (int)aResult.size(); i++ )
- aResult[i] = aObject[i - anISize - 2*aFSize*myNumber - 2*aBSize];
-
- return aResult;
-}
-
-
-/*!
- Initialize polyline by byte array
- \param theArray - byte array
-*/
-bool GLViewer_Polyline::initializeFromByteCopy( QByteArray theArray )
-{
- int i = 0;
- int anISize = sizeof( GLint );
- int aFSize = sizeof( GLfloat );
- int aBSize = sizeof( GLboolean );
-
- char* aPointer = (char*)&myNumber;
- for( i = 0; i < anISize; i++, aPointer++ )
- *aPointer = theArray[i];
-
- int aSize = theArray.size();
- if( aSize < aFSize*myNumber*2 + anISize + 2*aBSize )
- return false;
-
- myXCoord = new GLfloat[myNumber];
- myYCoord = new GLfloat[myNumber];
- aPointer = (char*)myXCoord;
- for( ; i < anISize + aFSize*myNumber; i++, aPointer++ )
- *aPointer = theArray[i];
- aPointer = (char*)myYCoord;
- for( ; i < anISize + 2*aFSize*myNumber; i++, aPointer++ )
- *aPointer = theArray[i];
-
- aPointer = (char*)&myIsClosed;
- for( ; i < anISize + 2*aFSize*myNumber + aBSize; i++, aPointer++ )
- *aPointer = theArray[i];
- aPointer = (char*)&myHighSelAll;
- for( ; i < anISize + 2*aFSize*myNumber + 2*aBSize; i++, aPointer++ )
- *aPointer = theArray[i];
-
- int aCurIndex = anISize + 2*aFSize*myNumber + 2*aBSize;
- QByteArray aObject( aSize - aCurIndex );
- for( ; i < aSize; i++ )
- aObject[i - aCurIndex] = theArray[i];
-
- if( !GLViewer_Object::initializeFromByteCopy( aObject ) || myType != "GLViewer_Polyline" )
- return false;
-
- myHNumbers.clear();
- myUHNumbers.clear();
- mySelNumbers.clear();
- myUSelNumbers.clear();
- myCurSelNumbers.clear();
- myPrevHNumbers.clear();
-
- return true;
-}
-
-
-
-/*!
- Constructor
- \param theStr - text string
- \param xPos - x position
- \param yPos - y position
- \param color - color of text
- \param toolTip - tooltip of text object
-*/
-GLViewer_TextObject::GLViewer_TextObject( const QString& theStr, float xPos, float yPos,
- const QColor& color, const QString& toolTip )
- : GLViewer_Object()
-{
- myGLText = new GLViewer_Text( theStr, xPos, yPos, color );
- myWidth = 0;
- myHeight = 0;
-
- myHighFlag = GL_TRUE;
-
- myToolTipText = toolTip;
-}
-
-/*!
- Destructor
-*/
-GLViewer_TextObject::~GLViewer_TextObject()
-{
- if ( myGLText )
- delete myGLText;
-}
-
-/*!
- Saves text object to file PostScript
- \param hFile - file instance
- \param aViewerCS - viewer co-ordinates system
- \param aPSCS - paper co-ordinates system
-*/
-bool GLViewer_TextObject::translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS )
-{
- QString aText = myGLText->getText();
- float xPos, yPos;
- myGLText->getPosition( xPos, yPos );
-
- QString aBuffer = "/Times-Roman findfont\n";
- aBuffer += "12 scalefont setfont\n";
-
- AddCoordsToPS( aBuffer, "moveto", aViewerCS, aPSCS, double(xPos), double(yPos) );
- aBuffer += "(" + aText + ") show\n";
-
- hFile.writeBlock( aBuffer.ascii(), aBuffer.length() );
-
- return true;
-}
-
-/*!
- Saves text object to file HPGL
- \param hFile - file instance
- \param aViewerCS - viewer co-ordinates system
- \param aHPGLCS - paper co-ordinates system
-*/
-bool GLViewer_TextObject::translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS )
-{
- QString aText = myGLText->getText();
- float xPos, yPos;
- myGLText->getPosition( xPos, yPos );
-
- QString aBuffer = "";
- AddCoordsToHPGL( aBuffer, "PA", aViewerCS, aHPGLCS, double(xPos), double(yPos) );
-
- aBuffer = "LB" + aText + "#;";
-
- hFile.writeBlock( aBuffer.ascii(), aBuffer.length() );
-
- return true;
-}
-
-#ifdef WIN32
-/*!
- Saves text object to EMF image
- \param dc - EMF image descriptor
- \param aViewerCS - viewer co-ordinates system
- \param aEMFCS - paper co-ordinates system
-*/
-bool GLViewer_TextObject::translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS )
-{
- QString aText = myGLText->getText();
- float xPos, yPos;
- myGLText->getPosition( xPos, yPos );
-
- double x = double( xPos ),
- y = double( yPos );
-
- aViewerCS->transform( *aEMFCS, x, y );
- const char* str = aText.ascii();
-
- int nHeight = 35*14; // height of font
- int nWidth = 35*12; // average character width
- int nEscapement = 0; // angle of escapement
- int nOrientation = 0; // base-line orientation angle
- int fnWeight = FW_NORMAL; // font weight
- DWORD fdwItalic = FALSE; // italic attribute option
- DWORD fdwUnderline = FALSE; // underline attribute option
- DWORD fdwStrikeOut = FALSE; // strikeout attribute option
- DWORD fdwCharSet = ANSI_CHARSET; // character set identifier
- DWORD fdwOutputPrecision = OUT_DEFAULT_PRECIS; // output precision
- DWORD fdwClipPrecision = CLIP_DEFAULT_PRECIS; // clipping precision
- DWORD fdwQuality = PROOF_QUALITY; // output quality
- DWORD fdwPitchAndFamily = FIXED_PITCH | FF_DONTCARE; // pitch and family
- LPCTSTR lpszFace = NULL; // typeface name
-
-
- HFONT aFont = CreateFont( nHeight, nWidth, nEscapement, nOrientation, fnWeight, fdwItalic,
- fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision,
- fdwClipPrecision, fdwQuality, fdwPitchAndFamily, lpszFace );
- LOGBRUSH aBrushData;
- aBrushData.lbStyle = BS_HOLLOW;
-
- HBRUSH aBrush = CreateBrushIndirect( &aBrushData );
-
- HGDIOBJ old1 = SelectObject( dc, aFont );
- HGDIOBJ old2 = SelectObject( dc, aBrush );
-
- TextOut( dc, x, y, str, aText.length() );
-
- SelectObject ( dc, old1 );
- SelectObject ( dc, old2 );
-
- DeleteObject( aFont );
-
- return true;
-}
-#endif
-
-/*!
- Creates corresponding drawer
-*/
-GLViewer_Drawer* GLViewer_TextObject::createDrawer()
-{
- myDrawer = new GLViewer_TextDrawer();
- compute();
- return myDrawer;
-}
-
-/*!
- Computes all necessary information about object for presentation in drawer
-*/
-void GLViewer_TextObject::compute()
-{
- float xPos, yPos;
- QString aStr = myGLText->getText();
- myGLText->getPosition( xPos, yPos );
-
- myWidth = myGLText->getWidth();
- myHeight = myGLText->getHeight();
- myRect->setLeft( xPos );
- myRect->setTop( yPos + myHeight );
- myRect->setRight( xPos + myWidth );
- myRect->setBottom( yPos );
-}
-
-/*!
- Installing already exist drawer with same type
- \param theDrawer - new drawer
-*/
-void GLViewer_TextObject::setDrawer( GLViewer_Drawer* theDrawer )
-{
- myDrawer = theDrawer;
- //compute();
-}
-
-/*!
- \return update object rectangle
- Does not equal getRect() if object have a persistence to some viewer transformations
-*/
-GLViewer_Rect* GLViewer_TextObject::getUpdateRect()
-{
- GLViewer_Rect* rect = new GLViewer_Rect();
-
- float xPos, yPos;
- QString aStr = myGLText->getText();
- myGLText->getPosition( xPos, yPos );
-
- rect->setLeft( myRect->left() + myXGap - myWidth / myXScale );
- rect->setTop( myRect->top() + myYGap + myHeight / myYScale );
- rect->setRight( myRect->right() - myXGap + myWidth / myXScale );
- rect->setBottom( myRect->bottom() - myYGap - myHeight / myYScale );
-
- return rect;
-}
-
-/*!
- Computes highlight presentation
- \param x - x coord
- \param y - y coord
- \param tol - tolerance of detecting
- \param isCircle - true if sensitive area of detection is round
- \return true if highlight status is changed
-*/
-GLboolean GLViewer_TextObject::highlight( GLfloat theX, GLfloat theY, GLfloat theTol, GLboolean isCircle )
-{
- if( !myIsVisible )
- return false;
-
- float xPos, yPos;
- myGLText->getPosition( xPos, yPos );
-
- QRect aRect;
- aRect.setLeft( (int)xPos );
- aRect.setRight( (int)(xPos + myWidth / myXScale) );
- aRect.setTop( (int)yPos );// - myHeight / myYScale );
- aRect.setBottom( (int)(yPos + myHeight / myYScale) );
-
- //cout << "theX: " << theX << " theY: " << theY << endl;
- //cout << "aRect.left(): " << aRect.left() << " aRect.right(): " << aRect.right() << endl;
- //cout << "aRect.top(): " << aRect.top() << " aRect.bottom(): " << aRect.bottom() << endl;
-
- QRegion obj( aRect );
- QRegion intersection;
- QRect region;
-
- region.setLeft( (int)(theX - theTol) );
- region.setRight( (int)(theX + theTol) );
- region.setTop( (int)(theY - theTol) );
- region.setBottom( (int)(theY + theTol) );
-
- QRegion circle( (int)(theX - theTol), (int)(theY - theTol),
- (int)(2 * theTol), (int)(2 * theTol), QRegion::Ellipse );
- if( isCircle )
- intersection = obj.intersect( circle );
- else
- intersection = obj.intersect( region );
-
- if( intersection.isEmpty() )
- myIsHigh = false;
- else
- myIsHigh = true;
-
- if( !myHighFlag && myIsHigh )
- myIsHigh = GL_FALSE;
- else
- myHighFlag = GL_TRUE;
-
- return myIsHigh;
-}
-
-/*!
- Unhilights object
-*/
-GLboolean GLViewer_TextObject::unhighlight()
-{
- if( myIsHigh )
- {
- myIsHigh = GL_FALSE;
- return GL_TRUE;
- }
-
- return GL_FALSE;
-}
-
-/*!
- Selects text object
- /param x, y - co-ordinates of mouse
- /param tol - tolerance
- /param rect - rectangle (in case of rectangular selection)
- /param isFull - if it is true, then object may selected only if it lays whole in selection zone
- \param isCircle - true if sensitive area of detection is round
- \param isShift - true if selection exec with append option
-*/
-GLboolean GLViewer_TextObject::select( GLfloat theX, GLfloat theY, GLfloat theTol, GLViewer_Rect rect,
- GLboolean isFull, GLboolean isCircle, GLboolean isShift )
-{
- if( !myIsVisible )
- return false;
-
- QRegion obj( myRect->toQRect() );
- QRegion intersection;
- QRect region;
-
- region.setLeft( (int)(theX - theTol) );
- region.setRight( (int)(theX + theTol) );
- region.setTop( (int)(theY - theTol) );
- region.setBottom( (int)(theY + theTol) );
-
- QRegion circle( (int)(theX - theTol), (int)(theY - theTol),
- (int)(2 * theTol), (int)(2 * theTol), QRegion::Ellipse );
- if( isCircle )
- intersection = obj.intersect( circle );
- else
- intersection = obj.intersect( region );
-
- if( intersection.isEmpty() )
- myIsSel = false;
- else
- myIsSel = true;
-
- if ( myIsSel )
- {
- myHighFlag = GL_FALSE;
- myIsHigh = GL_FALSE;
- }
- else
- myHighFlag = GL_TRUE;
-
- return myIsSel;
-}
-
-/*!
- Unselects text object
-*/
-GLboolean GLViewer_TextObject::unselect()
-{
- if( myIsSel )
- {
- myIsSel = GL_FALSE;
- return GL_TRUE;
- }
-
- return GL_FALSE;
-}
-
-/*!
- Moves object by recomputing
- \param dx - moving along X coord
- \param dy - moving along Y coord
- \param fromGroup - is true if this method called from group
-*/
-void GLViewer_TextObject::moveObject( float theX, float theY, bool fromGroup )
-{
- if( !fromGroup && myGroup)
- {
- myGroup->dragingObjects( theX, theY );
- return;
- }
- float aX, anY;
- myGLText->getPosition( aX, anY );
- aX += theX;
- anY += theY;
- myGLText->setPosition( aX, anY );
- compute();
-}
-
-/*!
- Codes text object as byte copy
- \return byte array
-*/
-QByteArray GLViewer_TextObject::getByteCopy()
-{
- QByteArray aObject = GLViewer_Object::getByteCopy();
-
- return aObject;
-}
-
-/*!
- Initialize text object by byte array
- \param theArray - byte array
-*/
-bool GLViewer_TextObject::initializeFromByteCopy( QByteArray theArray )
-{
- if( !GLViewer_Object::initializeFromByteCopy( theArray ) || myType != "GLViewer_TextObject" )
- return false;
-
- myHighFlag = true;
- return true;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_BaseObjects.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_BASEOBJECTS_H
-#define GLVIEWER_BASEOBJECTS_H
-
-#include "GLViewer.h"
-#include "GLViewer_Object.h"
-
-#include <qcolor.h>
-#include <qvaluelist.h>
-
-#include <TColStd_SequenceOfInteger.hxx>
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- \class GLViewer_MarkerSet
- OpenGL MarkerSet
-*/
-class GLVIEWER_API GLViewer_MarkerSet : public GLViewer_Object
-{
-public:
- //! A constructor
- GLViewer_MarkerSet( int number = 1, float size = 5.0, const QString& toolTip = "GLMarker" );
- //! A destructor
- ~GLViewer_MarkerSet();
-
- // redefined methods
- virtual void compute();
- virtual GLViewer_Drawer* createDrawer();
-
- virtual GLboolean highlight( GLfloat x, GLfloat y, GLfloat tol = 15.0, GLboolean isCircle = GL_FALSE );
- virtual GLboolean unhighlight();
- virtual GLboolean select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull = GL_FALSE,
- GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
- virtual GLboolean unselect();
-
- virtual GLViewer_Rect* getUpdateRect();
-
- virtual void moveObject( float, float, bool fromGroup = false );
-
- virtual QByteArray getByteCopy();
- virtual bool initializeFromByteCopy( QByteArray );
-
- virtual bool translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS );
- virtual bool translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS );
-
-#ifdef WIN32
- virtual bool translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS );
-#endif
-
- //! Sets array of x coords of markers
- void setXCoord( GLfloat* xCoord, int size );
- //! Sets array of y coords of markers
- void setYCoord( GLfloat* yCoord, int size );
- //! Returns x coords
- GLfloat* getXCoord() const { return myXCoord; }
- //! Returns y coords
- GLfloat* getYCoord() const { return myYCoord; }
-
- //! Sets markers number
- void setNumMarkers( GLint );
- //! returns markers number
- GLint getNumMarkers() const { return myNumber; };
- //! Sets merker radius
- void setMarkerSize( const float size ) { myMarkerSize = size; }
- //! Returns merker radius
- float getMarkerSize() const { return myMarkerSize; }
-
- //! Export numbers of heghlighted/selected markers
- void exportNumbers( QValueList<int>& high, QValueList<int>& unhigh,
- QValueList<int>& sel, QValueList<int>& unsel );
-
- //! Returns selected numbers
- QValueList<int> getSelectedElements() { return mySelNumbers; }
- //! Adds or remove selected number
- bool addOrRemoveSelected( int index );
- //! Adds selected numbers
- void addSelected( const TColStd_SequenceOfInteger& );
- //! Sets selected nembers
- void setSelected( const TColStd_SequenceOfInteger& );
-
-protected:
- GLint myNumber;
- GLfloat* myXCoord;
- GLfloat* myYCoord;
- GLfloat myMarkerSize;
- QValueList<int> myHNumbers;
- QValueList<int> myUHNumbers;
- QValueList<int> mySelNumbers;
- QValueList<int> myCurSelNumbers;
- QValueList<int> myUSelNumbers;
- QValueList<int> myPrevHNumbers;
- TColStd_SequenceOfInteger mySelectedIndexes;
-};
-
-/*!
- \class GLViewer_Polyline
- OpenGL Polyline
-*/
-class GLVIEWER_API GLViewer_Polyline: public GLViewer_Object
-{
-public:
- GLViewer_Polyline( int number = 1, float size = 5.0, const QString& toolTip = "GLPolyline" );
- ~GLViewer_Polyline();
-
- // redefined methods
- virtual void compute();
- virtual GLViewer_Drawer* createDrawer();
-
- virtual GLboolean highlight( GLfloat x, GLfloat y, GLfloat tol = 15.0, GLboolean isCircle = GL_FALSE );
- virtual GLboolean unhighlight();
- virtual GLboolean select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull = GL_FALSE,
- GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
- virtual GLboolean unselect();
-
- virtual GLViewer_Rect* getUpdateRect();
-
- virtual void moveObject( float, float, bool fromGroup = false );
-
- virtual QByteArray getByteCopy();
- virtual bool initializeFromByteCopy( QByteArray );
-
- virtual bool translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS );
- virtual bool translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS );
-
-#ifdef WIN32
- virtual bool translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS );
-#endif
-
- //! Sets array of x coords of points
- void setXCoord( GLfloat* xCoord, int size );
- //! Sets array of y coords of points
- void setYCoord( GLfloat* yCoord, int size );
- //! Returns x coords
- GLfloat* getXCoord() const { return myXCoord; }
- //! Returns y coords
- GLfloat* getYCoord() const { return myYCoord; }
-
- //! SetS number of points
- void setNumber( GLint );
- //! Returns number of points
- GLint getNumber() const { return myNumber; };
-
- //! On/off closed status of polyline
- void setClosed( GLboolean closed ) { myIsClosed = closed; }
- //! Checks closed status of polyline
- GLboolean isClosed() const { return myIsClosed; }
-
- //! On/off highlight as whole object status
- void setHighSelAll( GLboolean highSelAll ) { myHighSelAll = highSelAll; }
- //! Checks highlight as whole object status
- GLboolean isHighSelAll() const { return myHighSelAll; }
-
- //! Export numbers of highlighted/selected lines
- void exportNumbers( QValueList<int>& high, QValueList<int>& unhigh,
- QValueList<int>& sel, QValueList<int>& unsel );
-
- //! Returns numbers of selected lines
- QValueList<int> getSelectedElements() { return mySelNumbers; }
-
-protected:
- GLfloat* myXCoord;
- GLfloat* myYCoord;
- GLint myNumber;
- GLboolean myIsClosed;
- GLboolean myHighSelAll;
-
- QValueList<int> myHNumbers;
- QValueList<int> myUHNumbers;
- QValueList<int> mySelNumbers;
- QValueList<int> myUSelNumbers;
- QValueList<int> myCurSelNumbers;
- QValueList<int> myPrevHNumbers;
- TColStd_SequenceOfInteger mySelectedIndexes;
-
- GLboolean myHighFlag;
-};
-
-/*!
- \class GLViewer_TextObject
- Text as Object for OpenGL
-*/
-class GLVIEWER_API GLViewer_TextObject : public GLViewer_Object
-{
-public:
- GLViewer_TextObject( const QString&, float xPos = 0, float yPos = 0,
- const QColor& color = QColor( 0, 255, 0 ), const QString& toolTip = "GLText" );
- ~GLViewer_TextObject();
-
- virtual void compute();
- virtual GLViewer_Drawer* createDrawer();
-
- virtual void setDrawer( GLViewer_Drawer* theDrawer );
-
- virtual GLboolean highlight( GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle = GL_FALSE );
- virtual GLboolean unhighlight();
- virtual GLboolean select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull = GL_FALSE,
- GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
- virtual GLboolean unselect();
-
- virtual GLViewer_Rect* getUpdateRect();
-
- virtual void moveObject( float, float, bool fromGroup = false );
-
- virtual QByteArray getByteCopy();
- virtual bool initializeFromByteCopy( QByteArray );
-
- virtual bool translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS );
- virtual bool translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS );
-
-#ifdef WIN32
- virtual bool translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS );
-#endif
-
- int getWidth(){ return myWidth; }
- int getHeight(){ return myWidth; }
- void setWidth( int w ){ myWidth=w; }
- void setHeight( int h ){ myHeight=h; }
-
-protected:
- bool myHighFlag;
- int myWidth;
- int myHeight;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Compass.cxx
-// Created: November, 2004
-
-#include "GLViewer_Compass.h"
-#include "GLViewer_Drawer.h"
-
-/*!
- Constructor
- \param color - a color of compass
- \param size - a diameter of compass
- \param pos - a position
- \param WidthTop - width of wide part of arrow
- \param WidthBottom - width of base part of arrow
- \param HeightTop - height of arrow header
- \param HeightBottom - height of arrow cut on bottom
-*/
-GLViewer_Compass::GLViewer_Compass ( const QColor& color, const int size, const Position pos,
- const int WidthTop, const int WidthBottom, const int HeightTop,
- const int HeightBottom )
-{
- myCol = color;
- mySize = size;
- myPos = pos;
- myArrowWidthTop = WidthTop;
- myArrowWidthBottom = WidthBottom;
- myArrowHeightTop = HeightTop;
- myArrowHeightBottom = HeightBottom;
- myIsVisible = true;
- QFont* aFont = new QFont("Times",16);
- myFont = new GLViewer_TexFont( aFont );
- isGenereted = false;
- //myFont->generateTexture();
-}
-
-/*!
- Destructor
-*/
-GLViewer_Compass::~GLViewer_Compass()
-{
- delete myFont;
-}
-
-/*!
- Sets parameters of compass
- \param color - a color of compass
- \param size - a diameter of compass
- \param pos - a position
-*/
-void GLViewer_Compass::setCompass( const QColor& color, const int size, const Position pos )
-{
- myCol = color;
- mySize = size;
- myPos = pos;
-}
-
-/*!
- Sets visibility of compass
- \param vis - new visibility state
-*/
-void GLViewer_Compass::setVisible( const bool vis )
-{
- myIsVisible = vis;
-}
-
-/*!
- Sets size of compass
- \param size - new size
-*/
-void GLViewer_Compass::setSize( const int size )
-{
- if( size > 0 )
- mySize=size;
-}
-
-/*!
- Sets arrow width top
- \param WidthTop - new arrow width top
-*/
-void GLViewer_Compass::setArrowWidthTop( const int WidthTop )
-{
- if( WidthTop < myArrowWidthBottom || WidthTop > mySize )
- return;
- myArrowWidthTop=WidthTop;
-}
-
-/*!
- Sets arrow width bottom
- \param WidthBot - new arrow width bottom
-*/
-void GLViewer_Compass::setArrowWidthBottom( const int WidthBot )
-{
- if( WidthBot > myArrowWidthTop || WidthBot < 1 )
- return;
- myArrowWidthBottom=WidthBot;
-}
-
-/*!
- Sets arrow height top
- \param HeightTop - new arrow height top
-*/
-void GLViewer_Compass::setArrowHeightTop( const int HeightTop )
-{
- if( HeightTop > (2*mySize-myArrowHeightBottom ) || HeightTop < 1 )
- return;
- myArrowHeightTop=HeightTop;
-}
-
-/*!
- Sets arrow height bottom
- \param HeightBot - new arrow height bottom
-*/
-void GLViewer_Compass::setArrowHeightBottom( const int HeightBot )
-{
- if( HeightBot > ( 2*mySize-myArrowHeightTop ) || HeightBot < 1)
- return;
- myArrowHeightBottom=HeightBot;
-}
-
-/*!
- \return font of compass
-*/
-GLViewer_TexFont* GLViewer_Compass::getFont()
-{
- if(!isGenereted)
- {
- myFont->generateTexture();
- isGenereted = true;
- }
- return myFont;
-}
-
-/*!
- Sets font of compass
- \param theFont - new font
-*/
-void GLViewer_Compass::setFont( QFont theFont )
-{
- delete myFont;
- myFont = new GLViewer_TexFont( &theFont );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Compass.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_COMPASS_H
-#define GLVIEWER_COMPASS_H
-
-#include "GLViewer.h"
-
-#include <qcolor.h>
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-class GLViewer_TexFont;
-
-/*! Class GLViewer_Compass
- * Class implement representatiof of compass in one of corner in GLViewer.
- * Compass it's a some round visual pointer rotated with view window and
- * located in fixed place (in one fixed corner)
- */
-class GLVIEWER_API GLViewer_Compass
-{
-public:
- //! Position of compass
- enum Position
- {
- TopLeft,
- TopRight,
- BottomLeft,
- BottomRight
- };
-
- //! A constructor
- /*!
- *\param color - a color of compass
- *\param size - a diameter of compass
- *\param pos - a position
- *\param WidthTop - width of wide part of arrow
- *\param WidthBottom - width of base part of arrow
- *\param HeightTop - height of arrow header
- *\param HeightBottom - height of arrow cut on bottom
- */
- GLViewer_Compass( const QColor& color = QColor ( 0, 255, 0 ),
- const int size = 60,
- const Position pos = TopRight,
- const int WidthTop = 20,
- const int WidthBottom = 10,
- const int HeightTop = 25,
- const int HeightBottom = 7 );
- //! A destructor
- ~GLViewer_Compass();
-
- //! A function installing main parameters of compass
- void setCompass( const QColor& color, const int size, const Position pos );
- //! A function installing a visible status
- void setVisible( const bool vis = true );
- //! Returns visible status
- bool getVisible(){ return myIsVisible; };
-
- //! A function installing diameter
- void setSize( const int size );
- //! Returns diameter
- int getSize(){ return mySize; }
-
- //! A function installing position
- void setPos( const Position pos ){ myPos = pos; }
- //! Returns position
- int getPos(){ return myPos; }
-
- //! A function installing color
- void setColor( const QColor& color ){ myCol = color; }
- //! Returns color
- QColor getColor(){ return myCol; }
-
- //! A function installing width of wide part of arrow
- void setArrowWidthTop( const int WidthTop );
- //! Returns width of wide part of arrow
- int getArrowWidthTop(){ return myArrowWidthTop; }
-
- //! A function installing width of base part of arrow
- void setArrowWidthBottom( const int WidthBot );
- //! Returns width of base part of arrow
- int getArrowWidthBottom(){return myArrowWidthBottom;};
-
- //! A function installing height of arrow header
- void setArrowHeightTop( const int HeightTop );
- //! Returns height of arrow header
- int getArrowHeightTop(){return myArrowHeightTop;};
-
- //! A function installing height of arrow cut on bottom
- void setArrowHeightBottom( const int HeightBot );
- //! Returns height of arrow cut on bottom
- int getArrowHeightBottom(){return myArrowHeightBottom;};
-
- //! A function installing
- void setFont( QFont theFont );
- //! Returns
- GLViewer_TexFont* getFont();
-
-protected:
- //! Compass color
- QColor myCol;
- //! Compass diameter
- int mySize;
- //! Compass position
- int myPos;
- //! Compass invisible status
- bool myIsVisible;
- //! Width of wide part of arrow
- int myArrowWidthTop;
- //! Width of base part of arrow
- int myArrowWidthBottom;
- //! Height of arrow header
- int myArrowHeightTop;
- //! Height of arrow cut on bottom
- int myArrowHeightBottom;
- //! Compass font
- GLViewer_TexFont* myFont;
- //! Status of generated font
- bool isGenereted;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Context.cxx
-// Created: November, 2004
-
-/*!
- \class GLViewer_AspectLine
- \brief Class for manage of presentations in GLViewer
-*/
-
-#include "GLViewer_Context.h"
-
-#include "GLViewer_Group.h"
-#include "GLViewer_Object.h"
-#include "GLViewer_Viewer2d.h"
-#include "GLViewer_ViewPort2d.h"
-
-#include <TColStd_SequenceOfInteger.hxx>
-
-#define TOLERANCE 12
-
-/*!
- Constructor
-*/
-GLViewer_Context::GLViewer_Context( GLViewer_Viewer2d* v ) :
- myGLViewer2d( v ),
- myHighlightColor( Quantity_NOC_CYAN1 ),
- mySelectionColor( Quantity_NOC_RED ),
- myTolerance( TOLERANCE )
-{
- myUpdateAll = true;
-
- myLastPicked = 0;
- myLastPickedChanged = false;
-
- myHFlag = GL_TRUE;
- mySFlag = GL_TRUE;
-
- mySelCurIndex = 0;
-}
-
-/*!
- Destructor
-*/
-GLViewer_Context::~GLViewer_Context()
-{
- myActiveObjects.clear();
- myInactiveObjects.clear();
- mySelectedObjects.clear();
-}
-
-/*!
- Hiilights objects under cursor
- \param x - X coord of mouse cursor
- \param y - Y coord of mouse cursor
- \param byCircle - true if needs round sensitive area around mouse cursor, else rectangle
- function search object rectangle which intersect with sensitive area and call object highlight method
-*/
-int GLViewer_Context::MoveTo( int xi, int yi, bool byCircle )
-{
- GLfloat x = (GLfloat)xi;
- GLfloat y = (GLfloat)yi;
- myGLViewer2d->transPoint( x, y );
-
- myXhigh = x;
- myYhigh = y;
-
- GLboolean isHigh = GL_FALSE;
- GLboolean onObject = GL_FALSE;
-
- GLViewer_Object* aPrevLastPicked = myLastPicked;
- GLViewer_Object* lastPicked = 0;
-
- ObjList anUpdatedObjects;
-
- if( myActiveObjects.isEmpty() )
- return -1;
-
- ObjList::iterator it = myActiveObjects.end();
- ObjList::iterator itEnd = myActiveObjects.begin();
- for( it--; ; --it )
- {
- GLViewer_Object* object = *it;
-
- GLViewer_Rect* rect = object->getUpdateRect();
- if( rect->contains( GLViewer_Pnt( x, y ) ) )
- {
- onObject = GL_TRUE;
- object->highlight( x, y, myTolerance, GL_FALSE );
- isHigh = object->isHighlighted();
- }
-
- if( isHigh )
- {
- lastPicked = object;
- break;
- }
-
- if( it == itEnd )
- break;
- }
-
- if( !myHFlag )
- {
- myLastPicked = lastPicked;
- return -1;
- }
-
- if ( !onObject )
- {
- //cout << 0 << endl;
- it = myActiveObjects.begin();
- itEnd = myActiveObjects.end();
-
- for( ; it != itEnd; ++it )
- (*it)->unhighlight();
-
- anUpdatedObjects.append( (*it) );
-
- myLastPicked = 0;
- myLastPickedChanged = aPrevLastPicked != myLastPicked;
-
- if( myLastPickedChanged )
- myGLViewer2d->updateAll();
-
- return 0;
- }
-
- if( !myLastPicked && isHigh )
- {
- //cout << 1 << endl;
- myLastPicked = lastPicked;
- anUpdatedObjects.append( myLastPicked );
- }
- else if( myLastPicked && !isHigh )
- {
- //cout << 2 << endl;
- myLastPicked->unhighlight();
- anUpdatedObjects.append( myLastPicked );
- myLastPicked = 0;
- }
- else if( myLastPicked && isHigh )
- {
- //cout << 3 << endl;
- myLastPicked->highlight( x, y, myTolerance, byCircle );
- anUpdatedObjects.append( myLastPicked );
- if( myLastPicked != lastPicked )
- {
- myLastPicked->unhighlight();
- myLastPicked = lastPicked;
- anUpdatedObjects.append( myLastPicked );
- }
- }
-
- myLastPickedChanged = ( aPrevLastPicked != myLastPicked );
-
- if( myLastPickedChanged || myUpdateAll )
- myGLViewer2d->updateAll();
- else
- myGLViewer2d->activateDrawers( anUpdatedObjects, TRUE, TRUE );
-
- return 0;
-}
-
-/*! Selects already highlighting object by calling object method select
- \param Append - true if new selection will be append to existing selection, false - another
- \param byCircle - true if needs round selection area in complex object
-*/
-int GLViewer_Context::Select( bool Append, bool byCircle )
-{
- ObjList::Iterator it, itEnd, oit, oitEnd;
- SelectionStatus status = SS_Invalid;
-
- bool updateAll = false;
-
- ObjList aList;
-
- if ( !mySFlag )
- return status;//invalid
-
- if( myHFlag && myLastPicked )
- {
- if( mySelectedObjects.count() == 1 && mySelectedObjects.first() == myLastPicked )
- status = SS_LocalChanged;
-
- if ( !Append )
- {
- for( it = mySelectedObjects.begin(), itEnd = mySelectedObjects.end() ; it != itEnd; ++it )
- if( myLastPicked != *it )
- {
- updateAll = (*it)->unselect() || updateAll;
- aList.append( *it );
- }
-
- if( updateAll || myUpdateAll )
- myGLViewer2d->updateAll();
- else
- myGLViewer2d->activateDrawers( aList, TRUE, TRUE );
-
- if( mySelectedObjects.count() != 0 && status == SS_Invalid )
- status = SS_GlobalChanged;
- mySelectedObjects.clear();
- }
- else if( myLastPicked->isSelected() && status != SS_LocalChanged )
- {
- mySelectedObjects.remove( myLastPicked );
- myLastPicked->unselect();
- myGLViewer2d->updateAll();
-
- if( mySelectedObjects.count() != 0 && status == SS_Invalid )
- status = SS_GlobalChanged;
-
- return status;
- }
-
- if ( myLastPicked->select( myXhigh, myYhigh, myTolerance, GLViewer_Rect(), false, byCircle, Append )
- && mySelectedObjects.findIndex( myLastPicked ) == -1 )
- {
- mySelectedObjects.append( myLastPicked );
- myGLViewer2d->activateDrawer( myLastPicked, TRUE, TRUE );
-
- if( status == SS_Invalid )
- status = SS_GlobalChanged;
- }
- else if( status == SS_LocalChanged )
- status = SS_GlobalChanged;
-
- return status;
- }
-
- if( myHFlag && !myLastPicked )
- {
- if ( !Append )
- {
- for( it = mySelectedObjects.begin(), itEnd = mySelectedObjects.end() ; it != itEnd; ++it )
- if ( myLastPicked != *it )
- {
- updateAll = (*it)->unselect() || updateAll;
- aList.append( *it );
- }
-
- if( updateAll || myUpdateAll )
- myGLViewer2d->updateAll();
- else
- myGLViewer2d->activateDrawers( aList, TRUE, TRUE );
-
- if( mySelectedObjects.count() != 0 )
- status = SS_GlobalChanged;
-
- mySelectedObjects.clear();
- }
- return status;
- }
-
- if( !myHFlag )
- {
- bool isSel = false;
- GLfloat aXScale;
- GLfloat aYScale;
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )myGLViewer2d->getActiveView()->getViewPort();
- vp->getScale( aXScale, aYScale );
-
- if ( !Append )
- {
- for( it = mySelectedObjects.begin(), itEnd = mySelectedObjects.end() ; it != itEnd; ++it )
- if( myLastPicked != *it )
- {
- updateAll = (*it)->unselect() || updateAll;
- aList.append( *it );
- }
-
- if( updateAll || myUpdateAll )
- myGLViewer2d->updateAll();
- else
- myGLViewer2d->activateDrawers( aList, TRUE, TRUE );
-
- if( mySelectedObjects.count() != 0 )
- status = SS_GlobalChanged;
-
- mySelectedObjects.clear();
- }
-
- for( oit = myActiveObjects.begin(), oitEnd = myActiveObjects.end(); oit != oitEnd; ++oit )
- {
- (*oit)->setScale( aXScale, aYScale );
- GLViewer_Rect* rect = (*oit)->getUpdateRect();
-
- if( rect->contains( GLViewer_Pnt( myXhigh, myXhigh ) ) )
- {
- (*oit)->select( myXhigh, myYhigh, myTolerance, GLViewer_Rect(), false, byCircle, Append );
- isSel = (*oit)->isSelected();
- }
- if( isSel )
- {
- myLastPicked = *oit;
- mySelectedObjects.append( myLastPicked );
- myGLViewer2d->activateDrawer( myLastPicked, TRUE, TRUE );
- status = SS_GlobalChanged;
- return status;
- }
- }
- }
-
- return SS_NoChanged;
-}
-
-/*! Selects objects on scene by rectangle
- \param theRect - rectangle of selection
- \param Append - true if new selection will be append to existing selection, false - another
- function search object rectangle which intersect with theRect and call object select method
-*/
-int GLViewer_Context::SelectByRect( const QRect& theRect, bool Append )
-{
- GLfloat aXScale;
- GLfloat aYScale;
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )myGLViewer2d->getActiveView()->getViewPort();
- vp->getScale( aXScale, aYScale );
-
- SelectionStatus status = SS_NoChanged;
-
- ObjList aList;
- ObjList::Iterator it, itEnd;
-
- if ( !mySFlag || myActiveObjects.empty() )
- return SS_Invalid;
-
- bool updateAll = false;
- if( !Append )
- {
- if( mySelectedObjects.count() != 0 )
- status = SS_GlobalChanged;
-
- for( it = mySelectedObjects.begin(), itEnd = mySelectedObjects.end(); it != itEnd; ++it )
- {
- updateAll = (*it)->unselect() || updateAll;
- aList.append( *it );
- }
- mySelectedObjects.clear();
- }
-
- for( it = myActiveObjects.begin(), itEnd = myActiveObjects.end(); it != itEnd; ++it )
- {
- bool isSel = false;
- (*it)->setScale( aXScale, aYScale );
- QRect rect = myGLViewer2d->getQRect( *( (*it)->getRect() ) );
-
- if( rect.intersects( theRect ) )
- {
- GLViewer_Rect aRect = myGLViewer2d->getGLVRect( theRect );
- (*it)->select( myXhigh, myYhigh, myTolerance, aRect, false, false, Append );
- isSel = (*it)->isSelected();
- }
-
- if( isSel && mySelectedObjects.findIndex( *it ) == -1 )
- {
- aList.append( *it );
- mySelectedObjects.append( *it );
- status = SS_GlobalChanged;
- }
- }
-
- if( updateAll || myUpdateAll )
- myGLViewer2d->updateAll();
- else
- myGLViewer2d->activateDrawers( aList, TRUE, TRUE );
-
- return status;
-}
-
-/*!
- Sets color of hilighting
- \param aCol - new color of highlighting
-*/
-void GLViewer_Context::SetHighlightColor( Quantity_NameOfColor aCol )
-{
- myHighlightColor = aCol;
-
- Quantity_Color colorH( aCol );
- int redH = 255 * (int)colorH.Red();
- int greenH = 255 * (int)colorH.Green();
- int blueH = 255 * (int)colorH.Blue();
- QColor colH = QColor( redH, greenH, blueH );
-
- Quantity_Color colorS( mySelectionColor );
- int redS = 255 * (int)colorS.Red();
- int greenS = 255 * (int)colorS.Green();
- int blueS = 255 * (int)colorS.Blue();
- QColor colS = QColor( redS, greenS, blueS );
-
- myGLViewer2d->updateColors( colH, colS);
-}
-
-/*!
- Sets color of selection
- \param aCol - new color of selection
-*/
-void GLViewer_Context::SetSelectionColor( Quantity_NameOfColor aCol )
-{
- mySelectionColor = aCol;
-
- Quantity_Color colorH( myHighlightColor );
- int redH = 255 * (int)colorH.Red();
- int greenH = 255 * (int)colorH.Green();
- int blueH = 255 * (int)colorH.Blue();
- QColor colH = QColor( redH, greenH, blueH );
-
- Quantity_Color colorS( aCol );
- int redS = 255 * (int)colorS.Red();
- int greenS = 255 * (int)colorS.Green();
- int blueS = 255 * (int)colorS.Blue();
- QColor colS = QColor( redS, greenS, blueS );
-
- myGLViewer2d->updateColors( colH, colS);
-}
-
-/*!
- \return number of selected objects
-*/
-int GLViewer_Context::NbSelected()
-{
- return mySelectedObjects.count();
-}
-
-/*!
- Inits iteration through selected objects
-*/
-void GLViewer_Context::InitSelected()
-{
- mySelCurIndex = 0;
-}
-
-/*!
- Checks if iteration through selected objects may be continued
-*/
-bool GLViewer_Context::MoreSelected()
-{
- return ( mySelCurIndex < NbSelected() );
-}
-
-/*!
- Iterates to next selected object
-*/
-bool GLViewer_Context::NextSelected()
-{
- if ( mySelCurIndex >= 0 && mySelCurIndex < NbSelected() )
- {
- mySelCurIndex++;
- return TRUE;
- }
-
- return FALSE;
-}
-
-/*!
- \return current selected object (must be used only in cycle as "for( InitSelected(); MoreSelected(); NextSelected() ) {...}" )
-*/
-GLViewer_Object* GLViewer_Context::SelectedObject()
-{
- return mySelectedObjects[ mySelCurIndex ];
-}
-
-/*!
- \return true if object is selected
- \param theObj - object to be checked
-*/
-bool GLViewer_Context::isSelected( GLViewer_Object* theObj )
-{
- return mySelectedObjects.contains( theObj );
-}
-
-/*! Inserts new object in context
- \param theObject - object to be inserted
- \param display - true if needs display object immediatly after inserting, else false
- \param isActive - true if needs inserting object in active list
-*/
-int GLViewer_Context::insertObject( GLViewer_Object* object, bool display, bool isActive )
-{
-// cout << "GLViewer_Context::insertObject" << endl;
-
- if( !object )
- return -1;
-
- if( isActive )
- {
- myActiveObjects.append( object );
- if( display )
- {
- //QRect* rect = object->getRect()->toQRect();
- //myGLViewer2d->updateBorders( *rect );
- myGLViewer2d->activateDrawer( object, FALSE );
- }
- }
- else
- myInactiveObjects.append( object );
-
- return myActiveObjects.count() + myInactiveObjects.count();
-}
-
-/*!
- Replaces object in context
- \param oldObject - object to be replaced
- \param newObject - object for replacing
-*/
-bool GLViewer_Context::replaceObject( GLViewer_Object* oldObject, GLViewer_Object* newObject )
-{
- if( !oldObject || !newObject )
- return false;
-
- if( myActiveObjects.contains( oldObject ) )
- {
- myActiveObjects.remove( oldObject );
- myActiveObjects.append( newObject );
- return true;
- }
-
- if( myInactiveObjects.contains( oldObject ) )
- {
- myInactiveObjects.remove( oldObject );
- myInactiveObjects.append( newObject );
- return true;
- }
-
- return false;
-}
-
-/*!
- Updates scales of all objects in context
-*/
-void GLViewer_Context::updateScales( GLfloat scX, GLfloat scY )
-{
- if( scX <= 0 || scY <= 0 )
- return;
-
- ObjList::iterator it, itEnd;
-
- for( it = myActiveObjects.begin(), itEnd = myActiveObjects.end(); it != itEnd; ++it )
- (*it)->setScale( scX, scY );
-
- for( it = myInactiveObjects.begin(), itEnd = myInactiveObjects.end(); it != itEnd; ++it )
- (*it)->setScale( scX, scY );
-}
-
-/*!
- Clears hilighting of objects
- \param updateViewer - if it is true, viewer must be updated
-*/
-void GLViewer_Context::clearHighlighted( bool updateViewer )
-{
- if( myHFlag && myLastPicked )
- {
- myLastPicked->unhighlight();
- myLastPicked = 0;
-
- if( updateViewer )
- myGLViewer2d->updateAll();
- }
-}
-
-/*!
- Clears selection of objects
- \param updateViewer - if it is true, viewer must be updated
-*/
-void GLViewer_Context::clearSelected( bool updateViewer )
-{
- if( !mySFlag )
- return;
-
- ObjList::Iterator it, itEnd;
- ObjList aList;
-
- for( it = mySelectedObjects.begin(), itEnd = mySelectedObjects.end(); it != itEnd; ++it )
- {
- (*it)->unselect();
- aList.append( *it );
- }
-
- if( updateViewer )
- myGLViewer2d->activateDrawers( aList, TRUE );
- mySelectedObjects.clear();
-}
-
-/*!
- Selects object, other selected objects are left as selected
- \param updateViewer - if it is true, viewer must be updated
-*/
-void GLViewer_Context::setSelected( GLViewer_Object* object, bool updateViewer )
-{
- if( !object )
- return;
-
- if( myActiveObjects.contains( object ) && !mySelectedObjects.contains( object ) )
- {
- object->setSelected( TRUE );
- mySelectedObjects.append( object );
- }
-
- if( updateViewer )
- myGLViewer2d->activateDrawer( object, TRUE, TRUE );
-}
-
-/*!
- Unselects object, other selected objects are left as selected
- \param updateViewer - if it is true, viewer must be updated
-*/
-void GLViewer_Context::remSelected( GLViewer_Object* object, bool updateViewer )
-{
- if( !object || !mySelectedObjects.contains( object ) )
- return;
-
- mySelectedObjects.remove( object );
- object->unselect();
-
- if( updateViewer )
- myGLViewer2d->activateDrawer( object, TRUE, TRUE );
-}
-
-/*!
- Erases object in viewer
- \param theUpdateViewer - if it is true, viewer must be updated
-*/
-void GLViewer_Context::eraseObject( GLViewer_Object* theObject, bool theUpdateViewer )
-{
- if( !theObject || !myActiveObjects.contains( theObject ) )
- return;
-
- theObject->unhighlight();
- theObject->unselect();
- theObject->setVisible( false );
-
- if( theUpdateViewer )
- myGLViewer2d->updateAll();
-}
-
-/*!
- Deletes object in
- \param updateViewer - if it is true, viewer must be updated
-*/
-void GLViewer_Context::deleteObject( GLViewer_Object* theObject, bool updateViewer )
-{
- if( !theObject ||
- ( !myActiveObjects.contains( theObject ) && !myInactiveObjects.contains( theObject ) ) )
- return;
-
- if( myActiveObjects.contains( theObject ) )
- myActiveObjects.remove( theObject );
- else if( myInactiveObjects.contains( theObject ) )
- myInactiveObjects.remove( theObject );
- else
- return;
-
- if( mySelectedObjects.contains( theObject ) )
- mySelectedObjects.remove( theObject );
-
- GLViewer_Group* aGroup = theObject->getGroup();
- if( aGroup )
- aGroup->removeObject( theObject );
-
- if( myLastPicked == theObject )
- myLastPicked = 0;
-
- if ( updateViewer )
- myGLViewer2d->updateAll();
-}
-
-/*!
- Installs active status to object
- \param theObject
-*/
-bool GLViewer_Context::setActive( GLViewer_Object* theObject )
-{
- if( !theObject || !myInactiveObjects.contains( theObject ) )
- return false;
-
- myInactiveObjects.remove( theObject );
- myActiveObjects.append( theObject );
- return true;
-}
-
-/*!
- Installs inactive status to object
- \param theObject
-*/
-bool GLViewer_Context::setInactive( GLViewer_Object* theObject )
-{
- if( !theObject || !myActiveObjects.contains( theObject ) )
- return false;
-
- myActiveObjects.remove( theObject );
- myInactiveObjects.append( theObject );
- return true;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Context.h
-// Created: November, 2004
-
-
-#ifndef GLVIEWER_CONTEXT_H
-#define GLVIEWER_CONTEXT_H
-
-#ifdef WNT
-#include "windows.h"
-#endif
-
-#include "GLViewer_Defs.h"
-#include "GLViewer_Object.h"
-
-#include <qrect.h>
-#include <qobject.h>
-#include <qregion.h>
-
-#include <Quantity_NameOfColor.hxx>
-#include <Quantity_Color.hxx>
-
-#include <GL/gl.h>
-
-class GLViewer_Viewer2d;
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-/*! \class GLViewer_Context
- * Class for manage of presentations in GLViewer
- */
-class GLVIEWER_API GLViewer_Context
-{
-public:
- //! A constructor
- GLViewer_Context( GLViewer_Viewer2d* );
- //! A desructor
- ~GLViewer_Context();
-
- //! A function installing update flag in highlighting technology
- void setUpdateAll( bool on ) { myUpdateAll = on; }
- //! Returns update flag in highlighting technology
- bool isUpdateAll() const { return myUpdateAll; }
-
- //! Main interactive method. Trace mouse in viewer window
- /*!
- *\param x - X coord of mouse cursor
- *\param y - Y coord of mouse cursor
- *\paran byCircle - true if needs round sensitive area around mouse cursor, else rectangle
- *function search object rectangle which intersect with sensitive area and call object highlight method
- */
- int MoveTo( int x, int y, bool byCircle = FALSE );
- /*! A function selecting already highlighting object by calling object method select
- *\param Append - true if new selection will be append to existing selection, false - another
- *\param byCircle - true if needs round selection area in complex object
- */
- int Select( bool Append = FALSE, bool byCircle = FALSE );
- /*! A function selecting objects on scene by rectangle
- *\param theRect - rectangle of selection
- *\param Append - true if new selection will be append to existing selection, false - another
- *function search object rectangle which intersect with theRect and call object select method
- */
- int SelectByRect( const QRect& theRect, bool Append = FALSE );
-
- //! A function installing highlight color for all presentation (does not work)
- void SetHighlightColor( Quantity_NameOfColor aCol );
- //! A function installing select color for all presentation (does not work)
- void SetSelectionColor( Quantity_NameOfColor aCol );
- //! Returns highlight color
- Quantity_NameOfColor HighlightColor() { return myHighlightColor; }
- //! Returns select color
- Quantity_NameOfColor SelectionColor() { return mySelectionColor; }
-
- //! Returns number of objects in current selection
- int NbSelected();
- //! A function set iterator of selected objects on first object
- void InitSelected();
- //! Retuns true if iterator of selected objects is not set on last object
- bool MoreSelected();
- //! Increment of iterator of selected objects
- bool NextSelected();
- //! Returns object corresponding the current iterator of selected objects
- GLViewer_Object* SelectedObject();
-
- //! Returns true if theObject is selected
- bool isSelected( GLViewer_Object* theObject );
-
- //! Insert new object in context
- /*!
- *\param theObject - inserting object
- *\param display - true if needs display object immediatly after inserting, else false
- *\param isActive - true if needs inserting object in active list
- */
- int insertObject( GLViewer_Object* theObject, bool display = false, bool isActive = true );
- //! Replacing objects in context
- /*!
- * Function search active and incative objects
- */
- bool replaceObject( GLViewer_Object* oldObject, GLViewer_Object* newObject );
- //! A function updating scales of all objects in context
- void updateScales( GLfloat theX, GLfloat theY );
- //! A function installing tolerance in window pixels for highlghting and selection methods
- void setTolerance( int tol ) { myTolerance = tol; }
-
- //! Returns list of context objects
- /*!
- * \return active objects if isActive = true, else inactive objects
- */
- const ObjList& getObjects( bool isActive = true )
- { return isActive ? myActiveObjects : myInactiveObjects; }
-
- //! Returns first active object
- GLViewer_Object* getFirstObject() { return *( myActiveObjects.begin() ); }
-
- //! A function clear highlighted object information
- void clearHighlighted( bool updateViewer );
- //! A function clear selection object information
- void clearSelected( bool updateViewer );
- //! A function make theObject as selected object and update viewer if updateViewer = true
- void setSelected( GLViewer_Object* theObject, bool updateViewer );
- //! A function make theObject as unselected object and update viewer if updateViewer = true
- void remSelected( GLViewer_Object* theObject, bool updateViewer );
-
- //! Returns highlighted object
- GLViewer_Object* getCurrentObject() { return myLastPicked; }
- //! Returns true if after last MoveTo method calling highlight object is changed
- bool currentObjectIsChanged() { return myLastPickedChanged; }
-
- //! A function installing to theObject invisible status and update viewer if updateViewer = true
- void eraseObject( GLViewer_Object* theObject, bool updateViewer = true );
- //! A function remove theObject from context and update viewer if updateViewer = true
- void deleteObject( GLViewer_Object* theObject, bool updateViewer = true );
-
- //! A function installing to theObject active status
- bool setActive( GLViewer_Object* theObject );
- //! A function installing to theObject inactive status
- bool setInactive( GLViewer_Object* theObject );
-
-protected:
- //! Flag of updating viewer after highlight
- /*!
- * if = true, the viewer update all objects after change of highlight object,
- * else - only highlight object
- */
- bool myUpdateAll;
-
- GLViewer_Viewer2d* myGLViewer2d;
- //! Highlighted object
- GLViewer_Object* myLastPicked;
- //! = true if after last MoveTo method calling highlight object is changed
- bool myLastPickedChanged;
-
- //! List of active object
- /*!Active objects if consider in highlight and select methods*/
- ObjList myActiveObjects;
- //! List of inactive object
- /*!Active objects isn't consider in highlight and select methods*/
- ObjList myInactiveObjects;
-
- //! List of selected objects
- ObjList mySelectedObjects;
- //! Selected object iterator
- int mySelCurIndex;
-
- //! X coordinate of mouse cursor
- GLfloat myXhigh;
- //! Y coordinate of mouse cursor
- GLfloat myYhigh;
-
- //! Color for highlight
- Quantity_NameOfColor myHighlightColor;
- //! Color for selection
- Quantity_NameOfColor mySelectionColor;
- //! If = false - moveTo method is not any highlighting
- GLboolean myHFlag;
- //! If = false - select method is not any select
- GLboolean mySFlag;
- //! Tolerance in window pixels for highlghting and selection methods
- int myTolerance;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Context.cxx
-// Created: November, 2004
-
-#include "GLViewer_CoordSystem.h"
-#include <math.h>
-
-/*!
- Constructor
- \param aType - type of CS
- \param X0 - X of origin in reference CS
- \param Y0 - Y of origin in reference CS
- \param XUnit - X unit in reference CS
- \param YUnit - Y unit in reference CS
- \param Rotation - rotation relative reference CS
-*/
-GLViewer_CoordSystem::GLViewer_CoordSystem( CSType aType, double X0, double Y0,
- double XUnit, double YUnit, double Rotation )
-{
- setType( aType );
- setOrigin( X0, Y0 );
- setUnits( XUnit, YUnit );
- setRotation( Rotation );
-}
-
-/*!
- \return origin in reference CS
-*/
-void GLViewer_CoordSystem::getOrigin( double& x, double& y ) const
-{
- x = myX0;
- y = myY0;
-}
-
-/*!
- Sets origin in reference CS
-*/
-void GLViewer_CoordSystem::setOrigin( double x, double y )
-{
- myX0 = x;
- myY0 = y;
-}
-
-/*!
- \return units
-*/
-void GLViewer_CoordSystem::getUnits( double& x, double& y ) const
-{
- x = myXUnit;
- y = myYUnit;
-}
-
-/*!
- Sets units
-*/
-void GLViewer_CoordSystem::setUnits( double x, double y )
-{
- if( x>0 )
- myXUnit = x;
- else
- myXUnit = 1.0;
-
- if( y>0 )
- myYUnit = y;
- else
- myYUnit = 1.0;
-}
-
-/*!
- \return rotation
-*/
-double GLViewer_CoordSystem::getRotation() const
-{
- return myRotation;
-}
-
-/*!
- Sets rotation
-*/
-void GLViewer_CoordSystem::setRotation( double rotation )
-{
- myRotation = rotation;
-}
-
-/*!
- \return type
-*/
-GLViewer_CoordSystem::CSType GLViewer_CoordSystem::getType() const
-{
- return myType;
-}
-
-/*!
- Sets type
-*/
-void GLViewer_CoordSystem::setType( CSType type )
-{
- myType = type;
-}
-
-/*!
- Recalculate co-ordinates to reference co-ordinates
- \param x, y - co-ordinates
-*/
-void GLViewer_CoordSystem::toReference( double& x, double& y )
-{
- if( myType==Cartesian )
- {
- double newx = myX0 + myXUnit*x*cos(myRotation) - myYUnit*y*sin(myRotation),
- newy = myY0 + myXUnit*x*sin(myRotation) + myYUnit*y*cos(myRotation);
- x = newx;
- y = newy;
- }
- else if( myType==Polar )
- {
- double r = x, phi = y;
- x = myX0 + myXUnit*r*cos(phi+myRotation);
- y = myY0 + myXUnit*r*sin(phi+myRotation);
- }
-}
-
-/*!
- Recalculate co-ordinates from reference co-ordinates
- \param x, y - co-ordinates
-*/
-void GLViewer_CoordSystem::fromReference( double& x, double& y )
-{
- x = (x - myX0) / myXUnit;
- y = (y - myY0) / myYUnit;
-
- if( myType==Cartesian )
- {
- double newx = x*cos(myRotation) + y*sin(myRotation),
- newy = -x*sin(myRotation) + y*cos(myRotation);
- x = newx;
- y = newy;
- }
- else if( myType==Polar )
- {
- double r = sqrt( x*x+y*y );
- double phi = 0.0;
- double eps = 1E-8, pi = 3.14159265;
-
- if( r>eps )
- if( fabs(x)>eps )
- {
- double arg = y/x;
- phi = atan(arg);
- if( x<0 ) // 2-nd or 4-rd quarter
- phi+=pi;
- }
- else if( y>0 )
- phi = pi/2.0;
- else
- phi = 3*pi/2.0;
-
- x = r;
- y = phi-myRotation;
- }
-}
-
-/*!
- Recalculate co-ordinates to co-ordinates of other CS
- \param aSystem - other CS
- \param x, y - co-ordinates
-*/
-void GLViewer_CoordSystem::transform( GLViewer_CoordSystem& aSystem, double& x, double& y )
-{
- toReference( x, y );
- aSystem.fromReference( x, y );
-}
-
-/*!
- \return stretching of CS along X and Y axis
-*/
-void GLViewer_CoordSystem::getStretching( GLViewer_CoordSystem& aSystem, double& theX, double& theY )
-{
- theX = myXUnit / aSystem.myXUnit;
- theY = myYUnit / aSystem.myYUnit;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_CoordSystem.h
-// Created: November, 2004
-
-/*! Class GLViewer_CoordSystem
- * Class implementing mathematical model of 2D coordinate system
- */
-
-#ifndef GLVIEWER_COORDSYSTEM_H
-#define GLVIEWER_COORDSYSTEM_H
-
-#include "GLViewer.h"
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- \class GLViewer_CoordSystem
- \brief Class implementing mathematical model of 2D coordinate system
-*/
-class GLVIEWER_API GLViewer_CoordSystem
-{
-public:
- //! A type of coordinate system
- enum CSType
- {
- Cartesian,
- Polar
- };
-
-private:
- //! The coordinates of origin in the reference CS
- double myX0, myY0;
- //! The lengths of axis units in the reference unit
- double myXUnit, myYUnit;
- //! The rotation in radians relative to reference CS
- double myRotation;
-
- //! In the polar CS myYUnit is ignored, but myXUnit is the unit of polar radius
- CSType myType;
-
-public:
- //! A constructor ( by default new system is identical to reference )
- GLViewer_CoordSystem( CSType aType, double X0 = 0.0, double Y0 = 0.0,
- double XUnit = 1.0, double YUnit = 1.0, double Rotation = 0.0 );
-
- //! Returns the origin in reference system
- void getOrigin( double& x, double& y ) const;
- //! A function installing the origin in reference system
- void setOrigin( double x, double y );
-
- //! Returns units along axes
- void getUnits( double& x, double& y ) const;
- //! A function installing units along axes
- void setUnits( double x, double y );
-
- //! Returns rotation angle of axes in reference system
- double getRotation() const;
- //! A function installing rotation angle of axes in reference system
- void setRotation( double rotation );
-
- //! Returns type of system
- CSType getType() const;
- //! A function installing type of system
- void setType( CSType type );
-
- //! Transform the coordinates x, y from current CS to aSystem
- void transform( GLViewer_CoordSystem& aSystem, double& x, double& y );
-
-
- //! Return how many times line width in aSystem system bigger than in current
- virtual void getStretching( GLViewer_CoordSystem& aSystem, double& theX, double& theY );
-
-
-protected:
- //! A function transforms system coords to coords in reference system
- virtual void toReference( double& x, double& y );
- //! A function transforms from coords in reference system to system coords
- virtual void fromReference( double& x, double& y );
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Defs.h
-// Created: March, 2005
-
-#ifndef GLVIEWER_DEFS_H
-#define GLVIEWER_DEFS_H
-
-#include <qmap.h>
-#include <qvaluelist.h>
-
-class GLViewer_Object;
-//Selection staus
-enum SelectionChangeStatus
-{
- SCS_Invalid,
- SCS_Local,
- SCS_Global
-};
-
-//! Fit Selection Rectangle
-static const int SELECTION_RECT_GAP = 50;
-
-//! Display Text Format of Objects
-enum DisplayTextFormat
-{
- DTF_TEXTURE = 0,
- DTF_TEXTURE_SCALABLE = 1,
- DTF_BITMAP = 2
-};
-
-enum SelectionStatus
-{
- SS_Invalid,
- SS_LocalChanged,
- SS_GlobalChanged,
- SS_NoChanged
-};
-
-typedef QMap<GLViewer_Object*,int> ObjectMap;
-typedef QValueList<GLViewer_Object*> ObjList;
-
-#define SEGMENTS 32
-#define PI 3.14159265359
-#define STEP ( float )( 2 * PI / SEGMENTS )
-
-#endif// GLVIEWER_DEFS_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Drawer.cxx
-// Created: November, 2004
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_Drawer.h"
-#include "GLViewer_Object.h"
-#include "GLViewer_Text.h"
-#include "GLViewer_ViewFrame.h"
-#include "GLViewer_ViewPort2d.h"
-
-#ifndef WIN32
-#include <GL/glx.h>
-#endif
-
-#include <gp_Pnt2d.hxx>
-
-#include <qimage.h>
-#include <qpainter.h>
-
-#define TEXT_GAP 5
-// Two texture components for texmapped fonts: luminance and alpha
-#define NB_TEX_COMP 2
-// A font is split into rows each containing 32 characters
-#define TEX_ROW_LEN 32
-// Gap in pixels between two character rows in a font texture
-#define TEX_ROW_GAP 2
-
-GLfloat modelMatrix[16];
-
-
-//! code of first font symbol
-static int FirstSymbolNumber = 32;
-//! code of last font symbol
-static int LastSymbolNumber = 127;
-
-QMap<GLViewer_TexFindId,GLViewer_TexIdStored> GLViewer_TexFont::TexFontBase;
-QMap<GLViewer_TexFindId,GLuint> GLViewer_TexFont::BitmapFontCache;
-
-/*!
- Clears all generated fonts
-*/
-void GLViewer_TexFont::clearTextBases()
-{
- //cout << "Clear font map" << endl;
- TexFontBase.clear();
- BitmapFontCache.clear();
-}
-
-/*!
- Default constructor
-*/
-GLViewer_TexFont::GLViewer_TexFont()
-: myMaxRowWidth( 0 ), myFontHeight( 0 )
-{
- myQFont = QFont::defaultFont();
- mySeparator = 2;
- myIsResizeable = false;
- myMinMagFilter = GL_LINEAR;
-
- init();
-}
-
-/*!
- Constructor
- \param theFont - a base font
- \param theSeparator - separator between letters
- \param theIsResizeable - specifies whether text drawn by this object can be scaled along with the scene
- \param theMinMagFilter - min/mag filter, affects text sharpness
-*/
-GLViewer_TexFont::GLViewer_TexFont( QFont* theFont, int theSeparator, bool theIsResizeable, GLuint theMinMagFilter )
-: myMaxRowWidth( 0 ), myFontHeight( 0 )
-{
- myQFont = *theFont;
- mySeparator = theSeparator;
- myIsResizeable = theIsResizeable;
- myMinMagFilter = theMinMagFilter;
-
- init();
-}
-
-/*!
- Destructor
-*/
-GLViewer_TexFont::~GLViewer_TexFont()
-{
- delete[] myWidths;
- delete[] myPositions;
-}
-
-/*!
- Initializes font parameters
-*/
-void GLViewer_TexFont::init()
-{
- myNbSymbols = LastSymbolNumber - FirstSymbolNumber + 1;
-
- // It is unsafe to draw all characters in a single row -
- // this leads to problems on some graphic cards with small GL_MAX_TEXTURE_SIZE.
- // So splitting the characters into rows each containing 32 characters (or less).
- // Assuming contant height of each row (64 pixels) to simplify texture mapping.
- // However, this can be improved if necessary.
- QFontMetrics aFM( myQFont );
- myFontHeight = aFM.height();
-
- myWidths = new int[myNbSymbols];
- myPositions = new int[myNbSymbols];
-
- for( int i = 0, k = FirstSymbolNumber, aWidth = 0; i < myNbSymbols; i++, k++ )
- {
- // is it time to start a new row?
- if ( !( i % TEX_ROW_LEN ) )
- {
- if( aWidth > myMaxRowWidth )
- myMaxRowWidth = aWidth;
- aWidth = 0;
- }
- myWidths[i] = aFM.width( k );
- myPositions[i] = aWidth;
- aWidth += myWidths[i] + 2;
- }
-
- myTexFontWidth = 0;
- myTexFontHeight = 0;
-}
-
-/*!
- Generating font texture
-*/
-bool GLViewer_TexFont::generateTexture()
-{
- GLViewer_TexFindId aFindFont;
- aFindFont.myFontFamily = myQFont.family();//myQFont.toString();
- aFindFont.myIsBold = myQFont.bold();
- aFindFont.myIsItal = myQFont.italic();
- aFindFont.myIsUndl = myQFont.underline();
- aFindFont.myPointSize = myQFont.pointSize();
- aFindFont.myViewPortId = size_t(QGLContext::currentContext());
-
- if( TexFontBase.contains( aFindFont ) )
- {
- GLViewer_TexIdStored aTexture = TexFontBase[ aFindFont ];
- myTexFont = aTexture.myTexFontId;
- myTexFontWidth = aTexture.myTexFontWidth;
- myTexFontHeight = aTexture.myTexFontHeight;
- }
- else
- {
- // Adding some pixels to have a gap between rows
- int aRowPixelHeight = myFontHeight + TEX_ROW_GAP;
- int aDescent = QFontMetrics( myQFont ).descent();
-
- int aNumRows = myNbSymbols / TEX_ROW_LEN;
- if ( myNbSymbols % TEX_ROW_LEN )
- aNumRows++;
- int pixelsHight = aNumRows * aRowPixelHeight;
-
- myTexFontWidth = 64;
- myTexFontHeight = 64;
-
- while( myTexFontWidth < myMaxRowWidth )
- myTexFontWidth <<= 1;
- while( myTexFontHeight < pixelsHight )
- myTexFontHeight <<= 1;
-
- // Checking whether the texture dimensions for the requested font
- // do not exceed the maximum size supported by the OpenGL implementation
- int maxSize;
- glGetIntegerv( GL_MAX_TEXTURE_SIZE, &maxSize );
- if ( myTexFontWidth > maxSize || myTexFontHeight > maxSize )
- return false;
-
- QPixmap aPixmap( myTexFontWidth, myTexFontHeight );
- aPixmap.fill( QColor( 0, 0, 0) );
- QPainter aPainter( &aPixmap );
- aPainter.setFont( myQFont );
- int row;
- for( int l = 0; l < myNbSymbols; l++ )
- {
- row = l / TEX_ROW_LEN;
- QString aLetter;
- aLetter += (char)(FirstSymbolNumber + l);
- aPainter.setPen( QColor( 255,255,255) );
- aPainter.drawText( myPositions[l], ( row + 1 ) * aRowPixelHeight - aDescent, aLetter );
- }
-
- QImage aImage = aPixmap.convertToImage();
-
- //int qqq = 0;
- //if (qqq)
- // aImage.save("w:\\work\\CATHARE\\texture.png", "PNG");
-
- char* pixels = new char[myTexFontWidth * myTexFontHeight * NB_TEX_COMP];
-
- for( int i = 0; i < myTexFontHeight; i++ )
- {
- for( int j = 0; j < myTexFontWidth; j++ )
- {
- int aRed = qRed( aImage.pixel( j, myTexFontHeight - i - 1 ) );
- int aGreen = qGreen( aImage.pixel( j, myTexFontHeight - i - 1 ) );
- int aBlue = qBlue( aImage.pixel( j, myTexFontHeight - i - 1 ) );
-
- if( aRed != 0 || aGreen != 0 || aBlue != 0 )
- {
- pixels[i * myTexFontWidth * NB_TEX_COMP + j * NB_TEX_COMP] = (GLubyte)( (aRed + aGreen + aBlue)/3 );
- pixels[i * myTexFontWidth * NB_TEX_COMP + j * NB_TEX_COMP + 1]= (GLubyte) 255;
- }
- else
- {
- pixels[i * myTexFontWidth * NB_TEX_COMP + j * NB_TEX_COMP] = (GLubyte) 0;
- pixels[i * myTexFontWidth * NB_TEX_COMP + j * NB_TEX_COMP + 1]= (GLubyte) 0;
- }
- }
- }
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glGenTextures(1, &myTexFont);
- glBindTexture(GL_TEXTURE_2D, myTexFont);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, myMinMagFilter);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myMinMagFilter);
- glTexImage2D(GL_TEXTURE_2D,
- 0,
- GL_INTENSITY,
- myTexFontWidth,
- myTexFontHeight,
- 0,
- GL_LUMINANCE_ALPHA,
- GL_UNSIGNED_BYTE,
- pixels);
-
- delete[] pixels;
-
- GLViewer_TexIdStored aTexture;
- aTexture.myTexFontId = myTexFont;
- aTexture.myTexFontWidth = myTexFontWidth;
- aTexture.myTexFontHeight = myTexFontHeight;
-
- TexFontBase.insert( aFindFont, aTexture );
- }
- return true;
-}
-
-/*!
- Drawing string in viewer
- \param theStr - string to be drawn
- \param theX - X position
- \param theY - Y position
- \param theScale - scale coefficient
-*/
-void GLViewer_TexFont::drawString( QString theStr, GLdouble theX , GLdouble theY, GLfloat theScale )
-{
- // Adding some pixels to have a gap between rows
- int aRowPixelHeight = myFontHeight + TEX_ROW_GAP;
-
- float aXScale = 1.f, aYScale = 1.f;
- if ( !myIsResizeable )
- {
- glGetFloatv (GL_MODELVIEW_MATRIX, modelMatrix);
- aXScale = modelMatrix[0];
- aYScale = modelMatrix[5];
- }
- else if ( theScale > 0.f )
- {
- aXScale = aXScale / theScale;
- aYScale = aYScale / theScale;
- }
-
- // store attributes
- glPushAttrib( GL_ENABLE_BIT | GL_TEXTURE_BIT );
-
- glEnable(GL_TEXTURE_2D);
- glPixelTransferi(GL_MAP_COLOR, 0);
-
- glAlphaFunc(GL_GEQUAL, 0.05F);
- glEnable(GL_ALPHA_TEST);
-
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
-
- glBindTexture(GL_TEXTURE_2D, myTexFont);
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
- glBegin(GL_QUADS);
-
- float aLettBeginS, aLettEndS, aLettBeginT, aLettEndT;
- float aDY = ( aRowPixelHeight - 1 ) / aYScale, aDX;
- char aLetter;
- int aLettIndex, row;
- for ( int i = 0; i < (int)theStr.length(); i++ )
- {
- aLetter = theStr.data()[i];
- aLettIndex = (int)aLetter - FirstSymbolNumber;
- row = aLettIndex / TEX_ROW_LEN;
-
- aLettBeginS = (float)myPositions[aLettIndex] / ( (float)myTexFontWidth - 1.f );
- aLettEndS = aLettBeginS + ( (float)myWidths[aLettIndex] - 1.f ) / ( (float)myTexFontWidth - 1.f );
- aLettBeginT = ( myTexFontHeight - ( row + 1 ) * aRowPixelHeight ) / ( (float)myTexFontHeight - 1.f );
- aLettEndT = aLettBeginT + ( (float)aRowPixelHeight - 1.f ) / ( (float)myTexFontHeight - 1.f );
-
- aDX = ( (float)myWidths[aLettIndex] - 1.f ) / aXScale;
-
- glTexCoord2f( aLettBeginS, aLettBeginT ); glVertex3f( theX, theY, 1.f );
- glTexCoord2f( aLettBeginS, aLettEndT ); glVertex3f( theX, theY + aDY, 1.f );
- glTexCoord2f( aLettEndS, aLettEndT ); glVertex3f( theX + aDX, theY + aDY, 1.f );
- glTexCoord2f( aLettEndS, aLettBeginT ); glVertex3f( theX + aDX, theY, 1.f );
-
- theX += aDX + mySeparator / aXScale;
- }
-
- glEnd();
- // restore attributes
- glPopAttrib();
-}
-
-/*!
- \return width of string in pixels
-*/
-int GLViewer_TexFont::getStringWidth( QString theStr )
-{
- int aWidth = 0;
- for ( int i = 0; i < (int)theStr.length(); i ++ )
- {
- char aLetter = theStr.data()[i];
- int aLettIndex = (int)aLetter - FirstSymbolNumber;
- aWidth += myWidths[aLettIndex] + mySeparator;
- }
-
- return aWidth;
-}
-
-/*!
- \return height of string in pixels
-*/
-int GLViewer_TexFont::getStringHeight()
-{
- QFontMetrics aFM( myQFont );
- return aFM.height();
-}
-
-/*!
- Generates list base for bitmap fonts
-*/
-static GLuint displayListBase( QFont* theFont )
-{
- if ( !theFont )
- return 0;
- GLuint aList = 0;
- //static QMap<GLViewer_TexFindId, GLuint> fontCache;
- GLViewer_TexFindId aFindFont;
- aFindFont.myFontFamily = theFont->family();//theFont->toString();
- aFindFont.myIsBold = theFont->bold();
- aFindFont.myIsItal = theFont->italic();
- aFindFont.myIsUndl = theFont->underline();
- aFindFont.myPointSize = theFont->pointSize();
-
-#ifdef WIN32
- HGLRC ctx = ::wglGetCurrentContext();
- if ( !ctx )
- return aList;
-
- aFindFont.myViewPortId = (int)ctx;
-
- if ( GLViewer_TexFont::BitmapFontCache.contains( aFindFont ) )
- aList = GLViewer_TexFont::BitmapFontCache[aFindFont];
- else
- {
- GLuint listBase = 0;
- QMap<GLViewer_TexFindId, GLuint>::iterator it = GLViewer_TexFont::BitmapFontCache.begin();
- for ( ; it != GLViewer_TexFont::BitmapFontCache.end(); ++it )
- {
- if ( it.key().myViewPortId == (int)ctx && it.data() > listBase )
- listBase = it.data();
- }
- listBase += 256;
-
- HDC glHdc = ::wglGetCurrentDC();
- ::SelectObject( glHdc, theFont->handle() );
- if ( !::wglUseFontBitmaps( glHdc, 0, 256, listBase ) )
- listBase = 0;
- aList = listBase;
- GLViewer_TexFont::BitmapFontCache[aFindFont] = aList;
- }
-#else //X Window
- Display* aDisp = glXGetCurrentDisplay();
- if( !aDisp )
- {
-#ifdef _DEBUG_
- printf( "Can't find current dislay\n" );
-#endif
- return aList;
- }
-
- GLXContext aCont = glXGetCurrentContext();
- if( !aCont )
- {
-#ifdef _DEBUG_
- printf( "Can't find current context\n" );
-#endif
- return aList;
- }
-
- aFindFont.myViewPortId = size_t(aCont);
-
- if ( GLViewer_TexFont::BitmapFontCache.contains( aFindFont ) )
- aList = GLViewer_TexFont::BitmapFontCache[aFindFont];
- else
- {
- GLuint listBase = 0;
- QMap<GLViewer_TexFindId, GLuint>::iterator it = GLViewer_TexFont::BitmapFontCache.begin();
- for ( ; it != GLViewer_TexFont::BitmapFontCache.end(); ++it )
- {
- if ( it.key().myViewPortId == size_t(aCont) && it.data() > listBase )
- listBase = it.data();
- }
- listBase += 256;
-
- //glXUseXFont( (Font)(theFont->handle()), 0, 256, listBase );
- int aFontCont = 0;
- QString aFontDef = theFont->toString();
- char** xFontList = XListFonts( aDisp, aFontDef.latin1()/*aFindFont.myFontString.data()*/, 1, &aFontCont );
- if( !theFont->handle() )
- {
-#ifdef _DEBUG_
- printf( "Can't load font %s. loading default font....\n", aFontDef.latin1()/*aFindFont.myFontString.data()*/ );
-#endif
- QString aFontMask ("-*-*-*-r-*-*-");
- aFontMask += aFontDef/*aFindFont.myFontString*/.section( ',', 1, 1 );
-#ifdef _DEBUG_
- printf( "Height of Default font: %s\n", aFontDef/*aFindFont.myFontString*/.section( ',', 1, 1 ).data() );
-#endif
- aFontMask += "-*-*-*-m-*-*-*";
- xFontList = XListFonts( aDisp, aFontMask.data()/*"-*-*-*-r-*-*-12-*-*-*-m-*-*-*"*/, 1, &aFontCont );
- if( aFontCont == 0 )
- {
-#ifdef _DEBUG_
- printf( "Can't load default font\n" );
-#endif
- return 0;
- }
- glXUseXFont( (Font)(XLoadFont( aDisp,xFontList[0] )), 0, 256, listBase );
- }
- else
- glXUseXFont( (Font)(theFont->handle()), 0, 256, listBase );
-
- aList = listBase;
- GLViewer_TexFont::BitmapFontCache[aFindFont] = aList;
- }
-
-#endif
-
- return aList;
-}
-
-/*!
- Default constructor
-*/
-GLViewer_Drawer::GLViewer_Drawer()
-: myFont( "Helvetica", 10, QFont::Bold )
-{
- myXScale = myYScale = 0.0;
- myObjects.clear();
- myTextList = 0/*-1*/;
- myObjectType = "GLViewer_Object";
- myPriority = 0;
- myTextFormat = DTF_BITMAP;
- myTextScale = 0.125;
-}
-
-/*!
- Destructor
-*/
-GLViewer_Drawer::~GLViewer_Drawer()
-{
- myObjects.clear();
- glDeleteLists( myTextList, 1 );
-}
-
-/*!
- Clears all generated textures
-*/
-void GLViewer_Drawer::destroyAllTextures()
-{
- QMap<GLViewer_TexFindId,GLViewer_TexIdStored>::Iterator anIt= GLViewer_TexFont::TexFontBase.begin();
- QMap<GLViewer_TexFindId,GLViewer_TexIdStored>::Iterator anEndIt= GLViewer_TexFont::TexFontBase.end();
-
- for( ; anIt != anEndIt; anIt++ )
- glDeleteTextures( 1, &(anIt.data().myTexFontId) );
-}
-
-/*!
- Enables and disables antialiasing in Open GL (for points, lines and polygons).
- \param on - if it is true, antialiasing is enabled
-*/
-void GLViewer_Drawer::setAntialiasing(const bool on)
-{
- if (on)
- {
- glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
- glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
-
- glEnable(GL_POINT_SMOOTH);
- glEnable(GL_LINE_SMOOTH);
- glEnable(GL_POLYGON_SMOOTH);
- glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glEnable (GL_BLEND);
- }
- else
- {
- glDisable(GL_POINT_SMOOTH);
- glDisable(GL_LINE_SMOOTH);
- glDisable(GL_POLYGON_SMOOTH);
- glBlendFunc (GL_ONE, GL_ZERO);
- glDisable (GL_BLEND);
- }
-}
-
-/*! Loads texture from file
- \param fileName - the name of texture file
- \param x_size - the horizontal size of picture ( less or equal texture horizontal size )
- \param y_size - the vertical size of picture ( less or equal texture vertical size )
- \param t_size - the size of texture ( texture vertical size equals texture horizontal size )
-*/
-GLuint GLViewer_Drawer::loadTexture( const QString& fileName,
- GLint* x_size,
- GLint* y_size,
- GLint* t_size )
-{
- QImage buf;
- if ( fileName.isEmpty() || !buf.load( fileName ) )
- return 0;
-
- int w = buf.width();
- int h = buf.height();
-
- int size = 16;
- while( size < w || size < h )
- size = size * 2;
-
- GLuint texture;
- GLubyte* pixels = new GLubyte[ size * size * 4 ];
-
- for( int i = 0; i < size; i++ )
- {
- for( int j = 0; j < size; j++ )
- {
- GLubyte r, g, b, a;
- if( j < w && i < h )
- {
- QRgb pixel = buf.pixel( j, h - i - 1 );
- r = (GLubyte)qRed( pixel );
- g = (GLubyte)qGreen( pixel );
- b = (GLubyte)qBlue( pixel );
- a = (GLubyte)qAlpha( pixel );
- }
- else
- {
- r = (GLubyte)255;
- g = (GLubyte)255;
- b = (GLubyte)255;
- a = (GLubyte)255;
- }
-
- int index = 4 * ( i * size + j );
- pixels[ index ] = r;
- pixels[ index + 1 ] = g;
- pixels[ index + 2 ] = b;
- pixels[ index + 3 ] = a;
- }
- }
-
- //initialize texture
- glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
- glGenTextures( 1, &texture );
- glBindTexture( GL_TEXTURE_2D, texture );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, pixels );
-
- delete[] pixels;
-
- if ( x_size )
- *(x_size) = w;
-
- if ( y_size )
- *(y_size) = h;
-
- if ( t_size )
- *(t_size) = size;
-
- return texture;
-}
-
-/*! Draw square texture
- \param texture - the texture ID
- \param size - the size of square texture
- \param x - x coord
- \param y - y coord
-*/
-void GLViewer_Drawer::drawTexture( GLuint texture, GLint size, GLfloat x, GLfloat y )
-{
- /*float xScale = myXScale;
- float yScale = myYScale;
-
- glColor4f( 1.0, 1.0, 1.0, 1.0 );
-
- glEnable( GL_TEXTURE_2D );
- glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
- glAlphaFunc( GL_GREATER, 0.95F );
- glEnable( GL_ALPHA_TEST );
-
- glBindTexture( GL_TEXTURE_2D, texture );
- glBegin( GL_QUADS );
-
- glTexCoord2f( 0.0, 0.0 );
- glVertex3f( x-size/2./xScale, y-size/2./yScale, 0.0 );
-
- glTexCoord2f( 0.0, 1.0 );
- glVertex3f( x-size/2./xScale, y+size/2./yScale, 0.0 );
-
- glTexCoord2f( 1.0, 1.0 );
- glVertex3f( x+size/2./xScale, y+size/2./yScale, 0.0 );
-
- glTexCoord2f( 1.0, 0.0 );
- glVertex3f( x+size/2./xScale, y-size/2./yScale, 0.0 );
-
- glEnd();
- glFlush();
-
- glDisable( GL_ALPHA_TEST );
- glDisable( GL_TEXTURE_2D );*/
-
- drawTexture( texture, size, size, x, y );
-}
-
-/*! Draw texture
- \param texture - the texture ID
- \param x_size - the horizontal size of texture
- \param y_size - the vertical size of texture
- \param x - x coord
- \param y - y coord
-*/
-void GLViewer_Drawer::drawTexture( GLuint texture, GLint x_size, GLint y_size, GLfloat x, GLfloat y )
-{
- /*float xScale = myXScale;
- float yScale = myYScale;
-
- glColor4f( 1.0, 1.0, 1.0, 1.0 );
-
- glEnable( GL_TEXTURE_2D );
- glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
- glAlphaFunc( GL_GREATER, 0.95F );
- glEnable( GL_ALPHA_TEST );
-
- glBindTexture( GL_TEXTURE_2D, texture );
- glBegin( GL_QUADS );
-
- glTexCoord2f( 0.0, 0.0 );
- glVertex3f( x-x_size/2./xScale, y-y_size/2./yScale, 0.0 );
-
- glTexCoord2f( 0.0, 1.0 );
- glVertex3f( x-x_size/2./xScale, y+y_size/2./yScale, 0.0 );
-
- glTexCoord2f( 1.0, 1.0 );
- glVertex3f( x+x_size/2./xScale, y+y_size/2./yScale, 0.0 );
-
- glTexCoord2f( 1.0, 0.0 );
- glVertex3f( x+x_size/2./xScale, y-y_size/2./yScale, 0.0 );
-
- glEnd();
- glFlush();
-
- glDisable( GL_ALPHA_TEST );
- glDisable( GL_TEXTURE_2D );*/
- drawTexturePart( texture, 1.0, 1.0, x_size, y_size, x, y );
-}
-
-/*! Draw texture part
- \param texture - the texture ID
- \param x_ratio - the horizontal ratio of texture part
- \param y_ratio - the vertical ratio of texture part
- \param x_size - the horizontal size of texture
- \param y_size - the vertical size of texture
- \param x - x coord
- \param y - y coord
- \param scale - common scale factor ( if = 0, use drawer scales )
-*/
-void GLViewer_Drawer::drawTexturePart( GLuint texture,
- GLfloat x_ratio,
- GLfloat y_ratio,
- GLfloat x_size,
- GLfloat y_size,
- GLfloat x,
- GLfloat y,
- GLfloat scale )
-{
- if( !texture )
- return;
-
- float xScale = scale > 0. ? 1./scale : myXScale;
- float yScale = scale > 0. ? 1./scale : myYScale;
-
- glColor4f( 1.0, 1.0, 1.0, 1.0 );
-
-
- glEnable( GL_TEXTURE_2D );
- glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
- bool hasAlpha = glIsEnabled( GL_ALPHA_TEST );
- glDisable( GL_ALPHA_TEST );
-
- glBindTexture( GL_TEXTURE_2D, texture );
- glBegin( GL_QUADS );
-
- glTexCoord2f( 0.0, 0.0 );
- glVertex3f( x-x_size/2./xScale, y-y_size/2./yScale, 0.0 );
-
- glTexCoord2f( 0.0, y_ratio );
- glVertex3f( x-x_size/2./xScale, y+y_size/2./yScale, 0.0 );
-
- glTexCoord2f( x_ratio, y_ratio );
- glVertex3f( x+x_size/2./xScale, y+y_size/2./yScale, 0.0 );
-
- glTexCoord2f( x_ratio, 0.0 );
- glVertex3f( x+x_size/2./xScale, y-y_size/2./yScale, 0.0 );
-
- glEnd();
- glFlush();
-
- if ( hasAlpha )
- glEnable( GL_ALPHA_TEST );
-
- glDisable( GL_TEXTURE_2D );
-}
-
-/*!
- Draw text
- \param text - text to be drawn
- \param xPos - x position
- \param yPos - y position
- \param color - color of text
- \param theFont - font of text
- \param theSeparator - letter separator
- \param theFormat - text format (by default DTF_BITMAP)
-*/
-void GLViewer_Drawer::drawText( const QString& text, GLfloat xPos, GLfloat yPos,
- const QColor& color, QFont* theFont, int theSeparator, DisplayTextFormat theFormat )
-{
- glColor3f( ( GLfloat )color.red() / 255,
- ( GLfloat )color.green() / 255,
- ( GLfloat )color.blue() / 255 );
-
- if( theFormat != DTF_BITMAP )
- {
- GLViewer_TexFont aTexFont( theFont, theSeparator, theFormat == DTF_TEXTURE_SCALABLE, GL_LINEAR );
- // Font texture was not found or generated --> cannot draw text
- if ( !aTexFont.generateTexture() )
- return;
-
- if ( theFormat == DTF_TEXTURE_SCALABLE )
- aTexFont.drawString( text, xPos, yPos, textScale() );
- else
- aTexFont.drawString( text, xPos, yPos );
- }
- else
- {
- glRasterPos2f( xPos, yPos );
- glListBase( displayListBase( theFont ) );
- glCallLists( text.length(), GL_UNSIGNED_BYTE, text.local8Bit().data() );
- }
-}
-
-/*!
- Draws object-text
-*/
-void GLViewer_Drawer::drawText( GLViewer_Object* theObject )
-{
- if( !theObject )
- return;
-
- GLViewer_Text* aText = theObject->getGLText();
- if( !aText )
- return;
-
- GLfloat aPosX, aPosY;
- aText->getPosition( aPosX, aPosY );
- // get temporary copy of font
- QFont aTmpVarFont = aText->getFont();
- drawText( aText->getText(), aPosX, aPosY, aText->getColor(), &aTmpVarFont, aText->getSeparator(), aText->getDisplayTextFormat() );
-}
-
-/*! Draw text
- \param text - the text string
- \param x - x coord
- \param y - y coord
- \param hPosition - horizontal alignment
- \param vPosition - vertical alignment
- \param color - text color
- \param smallFont - font format
-*/
-void GLViewer_Drawer::drawGLText( QString text, float x, float y,
- int hPosition, int vPosition, QColor color, bool smallFont )
-{
- QFont aFont( myFont );
- if( smallFont )
- aFont.setPointSize( int(aFont.pointSize() * 0.8) );
-
- GLfloat scale = textScale() > 0. ? textScale() : 1.;
-
- QFontMetrics aFontMetrics( aFont );
- float width = myTextFormat == DTF_TEXTURE_SCALABLE ? aFontMetrics.width( text ) * scale : aFontMetrics.width( text ) / myXScale;
- float height = myTextFormat == DTF_TEXTURE_SCALABLE ? aFontMetrics.height() * scale : aFontMetrics.height() / myYScale;
- float gap = 5 / myXScale;
-
- switch( hPosition )
- {
- case GLText_Left : x -= ( gap + width ); break;
- case GLText_Center : x -= width / 2; break;
- case GLText_Right : x += gap; break;
- default : break;
- }
-
- switch( vPosition )
- {
- case GLText_Top : y += height * 0.5; break;
- case GLText_Center : y -= height * 0.5; break;
- case GLText_Bottom : y -= height * 1.5; break;
- default : break;
- }
-
- drawText( text, x, y, color, &aFont, 2, myTextFormat );
-}
-
-/*!
- \return a rectangle of text (without viewer scale)
-*/
-GLViewer_Rect GLViewer_Drawer::textRect( const QString& text ) const
-{
- GLfloat scale = textScale() > 0. ? textScale() : 1.;
-
- QFontMetrics aFontMetrics( myFont );
- float width = myTextFormat == DTF_TEXTURE_SCALABLE ? aFontMetrics.width( text ) * scale : aFontMetrics.width( text );
- float height = myTextFormat == DTF_TEXTURE_SCALABLE ? aFontMetrics.height() * scale : aFontMetrics.height();
-
- return GLViewer_Rect( 0, width, height, 0 );
-}
-
-/*!
- Draws rectangle
- \param rect - instance of primitive
- \param color - color of primitive
-*/
-void GLViewer_Drawer::drawRectangle( GLViewer_Rect* rect, QColor color )
-{
- if( !rect )
- return;
-
- float x1 = rect->left();
- float x2 = rect->right();
- float y1 = rect->bottom();
- float y2 = rect->top();
-
- glColor3f( ( GLfloat )color.red() / 255,
- ( GLfloat )color.green() / 255,
- ( GLfloat )color.blue() / 255 );
- glLineWidth( 1.0 );
-
- glBegin( GL_LINE_LOOP );
- glVertex2f( x1, y1 );
- glVertex2f( x1, y2 );
- glVertex2f( x2, y2 );
- glVertex2f( x2, y1 );
- glEnd();
-}
-
-/*!
- Saves object to file with format of HPGL
- \param hFile - file
- \param aViewerCS - viewer co-ordinate system
- \param aHPGLCS - paper co-ordinate system
-*/
-bool GLViewer_Drawer::translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS )
-{
- bool result = true;
- for( int i=0, n=myObjects.count(); i<n; i++ )
- result &= myObjects[i]->translateToHPGL( hFile, aViewerCS, aHPGLCS );
- return result;
-}
-
-/*!
- Saves object to file with format of PostScript
- \param hFile - file
- \param aViewerCS - viewer co-ordinate system
- \param aPSCS - paper co-ordinate system
-*/
-bool GLViewer_Drawer::translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS )
-{
- bool result = true;
- for( int i=0, n=myObjects.count(); i<n; i++ )
- result &= myObjects[i]->translateToPS( hFile, aViewerCS, aPSCS );
- return result;
-}
-
-#ifdef WIN32
-/*!
- Saves object to file with format of EMF
- \param hFile - file
- \param aViewerCS - viewer co-ordinate system
- \param aEMFCS - paper co-ordinate system
-*/
-bool GLViewer_Drawer::translateToEMF( HDC hDC, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS )
-{
- bool result = true;
- for( int i=0, n=myObjects.count(); i<n; i++ )
- result &= myObjects[i]->translateToEMF( hDC, aViewerCS, aEMFCS );
- return result;
-}
-#endif
-
-/*!
- Draws rectangle
- \param rect - instance of primitive
- \param lineWidth - width of line
- \param gap - gap of rectangle
- \param color - color of primitive
- \param filled - if it is true, then rectangle will be drawn filled with color "fillingColor"
- \param fillingColor - color of filling
-*/
-void GLViewer_Drawer::drawRectangle( GLViewer_Rect* rect, GLfloat lineWidth, GLfloat gap,
- QColor color, bool filled, QColor fillingColor )
-{
- if( !rect )
- return;
-
- float x1 = rect->left() - gap;
- float x2 = rect->right() + gap;
- float y1 = rect->bottom() - gap;
- float y2 = rect->top() + gap;
-
- if( filled )
- {
- glColor3f( ( GLfloat )fillingColor.red() / 255,
- ( GLfloat )fillingColor.green() / 255,
- ( GLfloat )fillingColor.blue() / 255 );
- glBegin( GL_POLYGON );
- glVertex2f( x1, y1 );
- glVertex2f( x1, y2 );
- glVertex2f( x2, y2 );
- glVertex2f( x2, y1 );
- glEnd();
- }
-
- glColor3f( ( GLfloat )color.red() / 255,
- ( GLfloat )color.green() / 255,
- ( GLfloat )color.blue() / 255 );
- glLineWidth( lineWidth );
-
- glBegin( GL_LINE_LOOP );
- glVertex2f( x1, y1 );
- glVertex2f( x1, y2 );
- glVertex2f( x2, y2 );
- glVertex2f( x2, y1 );
- glEnd();
-}
-
-/*!
- Draws contour
- \param pntList - list of points
- \param color - color of contour
- \param lineWidth - width of line
-*/
-void GLViewer_Drawer::drawContour( const GLViewer_PntList& pntList, QColor color, GLfloat lineWidth )
-{
- glColor3f( ( GLfloat )color.red() / 255,
- ( GLfloat )color.green() / 255,
- ( GLfloat )color.blue() / 255 );
- glLineWidth( lineWidth );
-
- glBegin( GL_LINES );
- QValueList<GLViewer_Pnt>::const_iterator it = pntList.begin();
- for( ; it != pntList.end(); ++it )
- glVertex2f( (*it).x(), (*it).y() );
- glEnd();
-}
-
-/*!
- Draws rectangular contour
- \param rect - instance of rectangle
- \param color - color of primitive
- \param lineWidth - width of line
- \param pattern - pattern of line
- \param isStripe - enables line stipple
-*/
-void GLViewer_Drawer::drawContour( GLViewer_Rect* rect, QColor color, GLfloat lineWidth,
- GLushort pattern, bool isStripe )
-{
- float x1 = rect->left();
- float x2 = rect->right();
- float y1 = rect->bottom();
- float y2 = rect->top();
-
- glColor3f( ( GLfloat )color.red() / 255,
- ( GLfloat )color.green() / 255,
- ( GLfloat )color.blue() / 255 );
- glLineWidth( lineWidth );
-
- if ( isStripe )
- {
- glEnable( GL_LINE_STIPPLE );
- glLineStipple( 1, pattern );
- }
-
- glBegin( GL_LINE_LOOP );
-
- glVertex2f( x1, y1 );
- glVertex2f( x1, y2 );
- glVertex2f( x2, y2 );
- glVertex2f( x2, y1 );
-
- glEnd();
- glDisable( GL_LINE_STIPPLE );
-}
-
-/*!
- Draws polygon
- \param pntList - list of points
- \param color - color of polygon
-*/
-void GLViewer_Drawer::drawPolygon( const GLViewer_PntList& pntList, QColor color )
-{
- glColor3f( ( GLfloat )color.red() / 255,
- ( GLfloat )color.green() / 255,
- ( GLfloat )color.blue() / 255 );
- glBegin( GL_POLYGON );
- QValueList<GLViewer_Pnt>::const_iterator it = pntList.begin();
- for( ; it != pntList.end(); ++it )
- glVertex2f( (*it).x(), (*it).y() );
- glEnd();
-}
-
-/*!
- Draws rectangle
- \param rect - instance of rectangle
- \param color - color of polygon
- \param pattern - pattern of line
- \param isStripe - enables line stipple
-*/
-void GLViewer_Drawer::drawPolygon( GLViewer_Rect* rect, QColor color,
- GLushort pattern, bool isStripe )
-{
- float x1 = rect->left();
- float x2 = rect->right();
- float y1 = rect->bottom();
- float y2 = rect->top();
- glColor3f( ( GLfloat )color.red() / 255,
- ( GLfloat )color.green() / 255,
- ( GLfloat )color.blue() / 255 );
-
- if ( isStripe )
- {
- glEnable( GL_LINE_STIPPLE );
- glLineStipple( 1, pattern );
- }
- glBegin( GL_POLYGON );
-
- glVertex2f( x1, y1 );
- glVertex2f( x1, y2 );
- glVertex2f( x2, y2 );
- glVertex2f( x2, y1 );
-
- glEnd();
- glDisable( GL_LINE_STIPPLE );
-}
-
-GLubyte rasterVertex[5] = { 0x70, 0xf8, 0xf8, 0xf8, 0x70 };
-
-/*!
- Draws vertex
- \param x - x position
- \param y - y position
- \param color - color of vertex
-*/
-void GLViewer_Drawer::drawVertex( GLfloat x, GLfloat y, QColor color )
-{
- glColor3f( ( GLfloat )color.red() / 255, ( GLfloat )color.green() / 255, ( GLfloat )color.blue() / 255 );
- glRasterPos2f( x, y );
- glBitmap( 5, 5, 2, 2, 0, 0, rasterVertex );
-}
-
-GLubyte rasterCross[7] = { 0x82, 0x44, 0x28, 0x10, 0x28, 0x44, 0x82 };
-
-/*!
- Draws cross
- \param x - x position
- \param y - y position
- \param color - color of cross
-*/
-void GLViewer_Drawer::drawCross( GLfloat x, GLfloat y, QColor color )
-{
- glColor3f( ( GLfloat )color.red() / 255, ( GLfloat )color.green() / 255, ( GLfloat )color.blue() / 255 );
- glRasterPos2f( x, y );
- glBitmap( 7, 7, 3, 3, 0, 0, rasterCross );
-}
-
-/*!
- Draws arrow
- \param red, green, blue - components of color
- \param lineWidth - width of line
- \param staff -
- \param length - length of arrow
- \param width - width of arrow
- \param x - x position
- \param y - y position
- \param angle - angle of arrow
- \param filled - drawn as filled
-*/
-void GLViewer_Drawer::drawArrow( const GLfloat red, const GLfloat green, const GLfloat blue,
- GLfloat lineWidth,
- GLfloat staff, GLfloat length, GLfloat width,
- GLfloat x, GLfloat y, GLfloat angle, GLboolean filled )
-{
- GLfloat vx1 = x;
- GLfloat vy1 = y + staff + length;
- GLfloat vx2 = vx1 - width / 2;
- GLfloat vy2 = vy1 - length;
- GLfloat vx3 = vx1 + width / 2;
- GLfloat vy3 = vy1 - length;
-
- gp_Pnt2d p0( x, y );
- gp_Pnt2d p1( vx1, vy1 );
- gp_Pnt2d p2( vx2, vy2 );
- gp_Pnt2d p3( vx3, vy3 );
-
- p1.Rotate( p0, angle );
- p2.Rotate( p0, angle );
- p3.Rotate( p0, angle );
-
- vx1 = p1.X(); vy1 = p1.Y();
- vx2 = p2.X(); vy2 = p2.Y();
- vx3 = p3.X(); vy3 = p3.Y();
-
- glColor3f( red, green, blue );
- glLineWidth( lineWidth );
-
- glBegin( GL_LINES );
- glVertex2f( x, y );
- glVertex2f( vx1, vy1 );
- glEnd();
-
- filled = true;
- if( !filled )
- {
- glBegin( GL_LINES );
- glVertex2f( vx1, vy1 );
- glVertex2f( vx2, vy2 );
- glVertex2f( vx1, vy1 );
- glVertex2f( vx3, vy3 );
- glEnd();
- }
- else
- {
- glBegin( GL_POLYGON );
- glVertex2f( vx1, vy1 );
- glVertex2f( vx2, vy2 );
- glVertex2f( vx3, vy3 );
- glEnd();
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Drawer.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_DRAWER_H
-#define GLVIEWER_DRAWER_H
-
-#ifdef WNT
-#include "windows.h"
-#endif
-
-#include <qcolor.h>
-#include <qobject.h>
-#include <qfile.h>
-#include <qfont.h>
-#include <qgl.h>
-
-#include <GL/gl.h>
-
-#include "GLViewer.h"
-#include "GLViewer_Defs.h"
-#include "GLViewer_Geom.h"
-
-class GLViewer_Object;
-class GLViewer_Rect;
-class GLViewer_CoordSystem;
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-/*!
- * Struct GLViewer_TexIdStored
- * Structure for store information about texture
- */
-struct GLVIEWER_API GLViewer_TexIdStored
-{
- //! Texture ID
- GLuint myTexFontId;
- //! Texture width
- int myTexFontWidth;
- //! texture height
- int myTexFontHeight;
-};
-
-/*!
- * Struct GLViewer_TexFindId
- * Structure for srorage information about texture font
- */
-struct GLVIEWER_API GLViewer_TexFindId
-{
- //! Font family description
- QString myFontFamily;
- //! Bold parameter
- bool myIsBold;
- //! Italic parameter
- bool myIsItal;
- //! Underline parameter
- bool myIsUndl;
- //! Font Size
- int myPointSize;
- //! View POrt ID
- int myViewPortId;
- //! Overloaded operator for using struct as MAP key
- bool operator < (const GLViewer_TexFindId theStruct) const
- {
- if ( myViewPortId != theStruct.myViewPortId )
- return myViewPortId < theStruct.myViewPortId;
- else if ( myPointSize != theStruct.myPointSize )
- return myPointSize < theStruct.myPointSize;
- else if ( myIsBold != theStruct.myIsBold )
- return myIsBold < theStruct.myIsBold;
- else if ( myIsItal != theStruct.myIsItal )
- return myIsItal < theStruct.myIsItal;
- else if ( myIsUndl != theStruct.myIsUndl )
- return myIsUndl < theStruct.myIsUndl;
- else
- return myFontFamily < theStruct.myFontFamily;
- }
-};
-
-/*!
- \class GLViewer_TexFont
- Font for GLViewer_Drawer, Drawing bitmap and texture fonts in GLViewer
-*/
-
-class GLVIEWER_API GLViewer_TexFont
-{
-public:
- //! A default constructor
- GLViewer_TexFont();
- //! A constructor
- /*
- * \param theFont - a base font
- * \param theSeparator - separator between letters
- * \param theIsResizeable - specifies whether text drawn by this object can be scaled along with the scene
- * \param theMinMagFilter - min/mag filter, affects text sharpness
- */
- GLViewer_TexFont( QFont* theFont,
- int theSeparator = 2,
- bool theIsResizeable = false,
- GLuint theMinMagFilter = GL_LINEAR/*_ATTENUATION*/ );
- //! A destructor
- ~GLViewer_TexFont();
-
- //! Generating font texture
- bool generateTexture();
- //! Drawing string theStr in point with coords theX and theY
- void drawString( QString theStr,
- GLdouble theX = 0.0,
- GLdouble theY = 0.0,
- GLfloat theScale = 1.0 );
-
- //! Returns separator between letters
- int getSeparator(){ return mySeparator; }
- //! Installing separator between letters
- void setSeparator( int theSeparator ){ mySeparator = theSeparator; }
-
- //! Returns width of string in pixels
- int getStringWidth( QString theString );
- //! Returns height of string in pixels
- int getStringHeight();
-
- //! Clears all generated fonts
- static void clearTextBases();
-
- //! Map for strorage generated texture fonts
- static QMap<GLViewer_TexFindId,GLViewer_TexIdStored> TexFontBase;
- //! Map for strorage generated bitmaps fonts
- static QMap<GLViewer_TexFindId,GLuint> BitmapFontCache;
-
-private:
- //! Initializes font parameters
- void init();
-
-private:
- //! Number of characters in the font texture
- int myNbSymbols;
- //! Array of letter width
- int* myWidths;
- //! Array of letter positions in texture
- int* myPositions;
- //! Pointer to base font
- QFont myQFont;
- //! Font texture ID
- GLuint myTexFont;
- //! Font texture width
- int myTexFontWidth;
- //! Font texture height
- int myTexFontHeight;
- //! Separator between letters
- int mySeparator;
- //! Flag controlling scalability of this texmapped font
- bool myIsResizeable;
- //! Min/mag filter
- GLuint myMinMagFilter;
- //! Font height
- int myFontHeight;
- //! Diagnostic information
- int myMaxRowWidth;
-};
-
-/*!
- \class GLViewer_Drawer
- Drawer for GLViewer_Objects.
- Drawer creates only one times per one type of object
-*/
-class GLVIEWER_API GLViewer_Drawer
-{
-public:
- //! Text position relatively object
- enum
- {
- GLText_Center = 0,
- GLText_Left,
- GLText_Right,
- GLText_Top,
- GLText_Bottom
- };
-
- // Objects status ( needs for change colors )
- //enum ObjectStatus
- //{
- // OS_Normal = 0,
- // OS_Highlighted,
- // OS_Selected
- //};
-
- //
- //enum ClosedStatus
- //{
- // CS_CLOSED = 0,
- // CS_OPEN = 1
- //};
-
- //! A constructor
- GLViewer_Drawer();
- //! A destructor
- virtual ~GLViewer_Drawer();
-
- //! Main method which drawing object in GLViewer
- /*
- *\param xScale - current scale along X-direction
- *\param yScale - current scale along Y-direction
- *\param onlyUpdate - = true if only update highlight-select information
- */
- virtual void create( float xScale, float yScale, bool onlyUpdate ) = 0;
-
- //! Adds object to drawer display list
- virtual void addObject( GLViewer_Object* theObject ){ myObjects.append( theObject ); }
- //! Clears drawer display list
- virtual void clear(){ myObjects.clear(); }
-
- //! Returns object type (needs for dynamic search of right drawer )
- QString getObjectType() const { return myObjectType; }
-
- //! Returns object priority
- int getPriority() const { return myPriority; }
-
- //! The function enables and disables antialiasing in Open GL (for points, lines and polygons).
- void setAntialiasing(const bool on);
-
- //! Clears all generated textures
- static void destroyAllTextures();
-
- //! A function translate object in to HPGL file on disk
- /*!
- *\param hFile the name of PostScript file chosen by user
- *\param aViewerCS the GLViewer_CoordSystem of window
- *\param aHPGLCS the GLViewer_CoordSystem of PostScript page
- */
- virtual bool translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS );
-
- //! A function translate object in to PostScript file on disk
- /*!
- *\param hFile the name of PostScript file chosen by user
- *\param aViewerCS the GLViewer_CoordSystem of window
- *\param aPSCS the GLViewer_CoordSystem of PostScript page
- */
- virtual bool translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS );
-
-#ifdef WIN32
- //! A function translate object in to EMF file on disk
- /*!
- *\warning WIN32 only
- *
- *\param dc the name of HDC associated with file chosen by user
- *\param aViewerCS the GLViewer_CoordSystem of window
- *\param aEMFCS the GLViewer_CoordSystem of EMF page
- */
- virtual bool translateToEMF( HDC hDC, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS );
-#endif
-
- //! Loads texture from file
- /*!
- *\param fileName - the name of texture file
- *\param x_size - the horizontal size of picture ( less or equal texture horizontal size )
- *\param y_size - the vertical size of picture ( less or equal texture vertical size )
- *\param t_size - the size of texture ( texture vertical size equals texture horizontal size )
- */
- static GLuint loadTexture( const QString& fileName,
- GLint* x_size = 0,
- GLint* y_size = 0,
- GLint* t_size = 0);
-
- //! Draw square texture
- /*!
- *\param texture - the texture ID
- *\param size - the size of square texture
- *\param x - x coord
- *\param y - y coord
- */
- void drawTexture( GLuint texture,
- GLint size,
- GLfloat x,
- GLfloat y );
-
- //! Draw texture
- /*!
- *\param texture - the texture ID
- *\param x_size - the horizontal size of texture
- *\param y_size - the vertical size of texture
- *\param x - x coord
- *\param y - y coord
- */
- void drawTexture( GLuint texture,
- GLint x_size,
- GLint y_size,
- GLfloat x,
- GLfloat y );
-
- //! Draw texture part
- /*!
- *\param texture - the texture ID
- *\param x_ratio - the horizontal ratio of texture part
- *\param y_ratio - the vertical ratio of texture part
- *\param x_size - the horizontal size of texture
- *\param y_size - the vertical size of texture
- *\param x - x coord
- *\param y - y coord
- *\param scale - common scale factor ( if = 0, use drawer scales )
- */
- void drawTexturePart( GLuint texture,
- GLfloat x_ratio,
- GLfloat y_ratio,
- GLfloat x_size,
- GLfloat y_size,
- GLfloat x,
- GLfloat y,
- GLfloat scale = 0 );
-
-
-
- //! Draw text string
- /*!
- *\param text - the text string
- *\param xPos - x coord
- *\param yPos - y coord
- *\param color - text color
- *\param aFont - base font of text
- *\param theSeparator - letter separator
- *\param DisplayTextFormat - text format
- */
- void drawText( const QString& text,
- GLfloat xPos,
- GLfloat yPos,
- const QColor& color,
- QFont* aFont,
- int theSeparator,
- DisplayTextFormat = DTF_BITMAP );
-
- //! Draw text string
- /*!
- *\param text - the text string
- *\param x - x coord
- *\param y - y coord
- *\param hPosition - horizontal alignment
- *\param vPosition - vertical alignment
- *\param color - text color
- *\param smallFont - font format
- */
- void drawGLText( QString text,
- float x,
- float y,
- int hPosition = GLText_Center,
- int vPosition = GLText_Center,
- QColor color = Qt::black,
- bool smallFont = false );
-
- //! Sets a default font to be used by drawGLText method
- /*!
- *\param font - the default font
- */
- inline void setFont( const QFont& font ) { myFont = font; }
-
- //! Returns a default font used by drawGLText method
- inline QFont font() const { return myFont; }
-
- //! Sets a default text displaying format to be used by drawGLText method
- /*!
- *\param format - the default text displaying format
- */
- inline void setTextFormat( const DisplayTextFormat format ) { myTextFormat = format; }
-
- //! Returns a default text displaying format used by drawGLText method
- inline DisplayTextFormat textFormat() const { return myTextFormat; }
-
- //! Sets a text string displaying scale factor (used only with text format DTF_TEXTURE_SCALABLE)
- /*!
- *\param factor - scale factor
- */
- inline void setTextScale( const GLfloat factor ) { myTextScale = factor; }
-
- //! Returns a text string displaying scale factor
- inline GLfloat textScale() const { return myTextScale; }
-
- //! Returns a rectangle of text (without viewer scale)
- GLViewer_Rect textRect( const QString& ) const;
-
-
- //! Draw rectangle with predefined color
- static void drawRectangle( GLViewer_Rect* theRect, QColor = Qt::black );
-
-protected:
- //! Draw basic primitives: rectangle, contour, polygon, vertex, cross, arrow
- //* with predefined color
- static void drawRectangle( GLViewer_Rect*, GLfloat, GLfloat = 0, QColor = Qt::black,
- bool = false, QColor = Qt::white );
- static void drawContour( GLViewer_Rect*, QColor, GLfloat, GLushort, bool );
- static void drawContour( const GLViewer_PntList&, QColor, GLfloat );
- static void drawPolygon( GLViewer_Rect*, QColor, GLushort, bool );
- static void drawPolygon( const GLViewer_PntList&, QColor );
- static void drawVertex( GLfloat, GLfloat, QColor );
- static void drawCross( GLfloat, GLfloat, QColor );
- static void drawArrow( const GLfloat red, const GLfloat green, const GLfloat blue,
- GLfloat, GLfloat, GLfloat, GLfloat,
- GLfloat, GLfloat, GLfloat, GLboolean = GL_FALSE );
-
- //! Draw object text
- virtual void drawText( GLViewer_Object* theObject );
-
- //! X Scale factor
- float myXScale;
- //! Y scale factor
- float myYScale;
-
- //! List of objects
- QValueList<GLViewer_Object*> myObjects;
- //! List generated textures
- GLuint myTextList;
-
- //! Type of supporting object
- QString myObjectType;
- //! Dislay priority
- int myPriority;
-
- //! Default font for drawGLText() method
- QFont myFont;
- //! Default text displaying format for drawGLText() method
- DisplayTextFormat myTextFormat;
-
- //! Scale factor for text string draw, by default 0.125
- //! (used only with text format DTF_TEXTURE_SCALABLE)
- GLfloat myTextScale;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif // GLVIEWER_DRAWER_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-//#include <GLViewerAfx.h>
-#include <GLViewer_Geom.h>
-
-#define FAR_POINT 1e10 // Value used as a "very distant" co-ordinate
-#define TOLERANCE 1e-3
-
-/*!
- constructs a real segment bounded by two points
-*/
-GLViewer_Segment::GLViewer_Segment( const GLViewer_Pnt& thePnt1,
- const GLViewer_Pnt& thePnt2 )
-: myPnt1( thePnt1 ),
- myPnt2( thePnt2 )
-{
- myA = myPnt1.y() - myPnt2.y();
- myB = myPnt2.x() - myPnt1.x();
- myC = myPnt1.x() * myPnt2.y() - myPnt2.x() * myPnt1.y();
-}
-
-/*!
- constructs a ray starting at <thePnt> and directed along positive X axis direction (or Y axis if vertical )
-*/
-GLViewer_Segment::GLViewer_Segment( const GLViewer_Pnt& thePnt,
- const GLfloat theA,
- const GLfloat theB,
- const GLfloat theC )
-: myPnt1( thePnt ),
- myA( theA ),
- myB( theB ),
- myC( theC )
-{
- if ( fabs( myB ) < TOLERANCE )
- myPnt2 = GLViewer_Pnt( myPnt1.x(), FAR_POINT );
- else
- myPnt2 = GLViewer_Pnt( FAR_POINT, - myA / myB * FAR_POINT - myC / myB );
-}
-
-/*!
- destructor, does nothing
-*/
-GLViewer_Segment::~GLViewer_Segment()
-{
-}
-
-/*!
- detects intersection with segment <theOther>
-*/
-bool GLViewer_Segment::HasIntersection( const GLViewer_Segment& theOther ) const
-{
- bool aRes = false;
- GLfloat aDiv = myA * theOther.myB - myB * theOther.myA;
- if ( fabs( aDiv ) > TOLERANCE )
- {
- GLfloat aX = ( myB * theOther.myC - theOther.myB * myC ) / aDiv;
- GLfloat aX11 = myPnt1.x() > myPnt2.x() ? myPnt2.x() : myPnt1.x();
- GLfloat aX12 = myPnt1.x() > myPnt2.x() ? myPnt1.x() : myPnt2.x();
- GLfloat aX21 = theOther.myPnt1.x() > theOther.myPnt2.x() ? theOther.myPnt2.x() : theOther.myPnt1.x();
- GLfloat aX22 = theOther.myPnt1.x() > theOther.myPnt2.x() ? theOther.myPnt1.x() : theOther.myPnt2.x();
-
- GLfloat aY = ( myC * theOther.myA - theOther.myC * myA ) / aDiv;
- GLfloat aY11 = myPnt1.y() > myPnt2.y() ? myPnt2.y() : myPnt1.y();
- GLfloat aY12 = myPnt1.y() > myPnt2.y() ? myPnt1.y() : myPnt2.y();
- GLfloat aY21 = theOther.myPnt1.y() > theOther.myPnt2.y() ? theOther.myPnt2.y() : theOther.myPnt1.y();
- GLfloat aY22 = theOther.myPnt1.y() > theOther.myPnt2.y() ? theOther.myPnt1.y() : theOther.myPnt2.y();
-
- if ( fabs( aX11 - aX12 ) > TOLERANCE )
- aRes = aX11 < aX && aX < aX12;
- else
- aRes = aY11 < aY && aY < aY12;
-
- if ( aRes )
- {
- if ( fabs( aX21 - aX22 ) > TOLERANCE )
- aRes = aX21 < aX && aX < aX22;
- else
- aRes = aY21 < aY && aY < aY22;
- }
- }
-
- return aRes;
-}
-
-/*!
- constructs a closed polygon from the given ordered list of points
-*/
-GLViewer_Poly::GLViewer_Poly( const GLViewer_PntList* thePoints )
-: myPoints( (GLViewer_PntList*)thePoints )
-{
-}
-
-/*!
- destructor, <myPoints> mustn't be deleted here!
-*/
-GLViewer_Poly::~GLViewer_Poly()
-{
-}
-
-/*!
- \return true if <thePnt> lies within this polygon
-*/
-bool GLViewer_Poly::IsIn( const GLViewer_Pnt& thePnt ) const
-{
- if ( !myPoints )
- return false;
-
- //cout << thePnt.x() << endl;
- //cout << thePnt.y() << endl << endl;
-
- int aNbInter = 0;
- GLViewer_Segment aRay( thePnt, 0., 1., -thePnt.y() );
-
- GLViewer_PntList::const_iterator it1 = myPoints->begin();
- GLViewer_PntList::const_iterator it2 = myPoints->begin();
- ++it2;
- for ( ; it1 != myPoints->end(); ++it1, ++it2 )
- {
- if ( it2 == myPoints->end() )
- it2 = myPoints->begin();
-
- if ( aRay.HasIntersection( GLViewer_Segment( *it1, *it2 ) ) )
- aNbInter++;
- }
-
- return ( aNbInter % 2 == 1 );
-}
-/*!
- \return true if <thePnt> lies within this polygon
-*/
-/*
-bool GLViewer_Poly::IsIn( const GLViewer_Pnt& thePnt, const float tolerance ) const
-{
- if ( !myPoints )
- return false;
-
- float x = thePnt.x();
- float y = thePnt.y();
- bool res = false;
-
- GLViewer_Pnt p1( x - tolerance, y - tolerance );
- GLViewer_Pnt p2( x - tolerance, y + tolerance );
- GLViewer_Pnt p3( x + tolerance, y - tolerance );
- GLViewer_Pnt p4( x + tolerance, y + tolerance );
-
- res = ( IsInPnt( thePnt ) ||
- IsInPnt( p1 ) || IsInPnt( p2 ) || IsInPnt( p3 ) || IsInPnt( p4 ) );
-
- return res;
-}
-*/
-/*!
- \return true if <thePoly> covers this polygon
-*/
-bool GLViewer_Poly::IsCovers( const GLViewer_Poly& thePoly ) const
-{
- if ( !myPoints || !thePoly.Count() )
- return false;
-
- GLViewer_PntList::const_iterator it = myPoints->begin();
-
- for ( ; it != myPoints->end(); ++it )
- {
- if( !thePoly.IsIn( *it ) )
- return false;
- }
-
- return true;
-}
-
-/*!
- \return true if <theRect> covers this polygon
-*/
-bool GLViewer_Poly::IsCovers( const GLViewer_Rect& theRect ) const
-{
- if ( !myPoints ) //needs check for <theRect>
- return false;
-
- GLViewer_PntList aList;
- GLViewer_PntList::iterator it = aList.begin();
-
- aList.insert( it, GLViewer_Pnt( theRect.left(), theRect.top() ) );
- aList.insert( it, GLViewer_Pnt( theRect.right(), theRect.top() ) );
- aList.insert( it, GLViewer_Pnt( theRect.right(), theRect.bottom() ) );
- aList.insert( it, GLViewer_Pnt( theRect.left(), theRect.bottom() ) );
-
- return IsCovers( GLViewer_Poly( &aList ) );
-}
-
-/*!
- \return true if polygon has intersection with segment or ray
- \param theSegment - segment to check intersection
-*/
-bool GLViewer_Poly::HasIntersection( const GLViewer_Segment& theSegment ) const
-{
- if ( !myPoints )
- return false;
-
- bool aRes = false;
- GLViewer_PntList::const_iterator it1 = myPoints->begin();
- GLViewer_PntList::const_iterator it2 = myPoints->begin();
- ++it2;
- for ( ; !aRes && it1 != myPoints->end(); ++it1, ++it2 )
- {
- if ( it2 == myPoints->end() )
- it2 = myPoints->begin();
-
- aRes = theSegment.HasIntersection( GLViewer_Segment( *it1, *it2 ) );
- }
-
- return aRes;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Geom.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_GEOM_H
-#define GLVIEWER_GEOM_H
-
-#include "GLViewer.h"
-
-#include <qrect.h>
-#include <qvaluelist.h>
-#include <qgl.h>
-#include <math.h>
-
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-/*! Struct GLViewer_Pnt
-* Substitution of QPoint for OpenGL
-*/
-
-struct GLVIEWER_API GLViewer_Pnt
-{
-public:
- GLViewer_Pnt() : myX( 0. ), myY( 0. ) {};
- GLViewer_Pnt( GLfloat theX, GLfloat theY ) : myX( theX ), myY( theY ) {}
-
- GLfloat x() const { return myX; }
- GLfloat y() const { return myY; }
- void setX( GLfloat theX ) { myX = theX; }
- void setY( GLfloat theY ) { myY = theY; }
- void setXY( GLfloat theX, GLfloat theY ) { myX = theX; myY = theY; }
- void move( GLfloat theDX, GLfloat theDY ) { myX += theDX; myY += theDY; }
-
-private:
- GLfloat myX;
- GLfloat myY;
-};
-
-typedef QValueList<GLViewer_Pnt> GLViewer_PntList;
-
-/*! Class GLViewer_Rect
-* Substitution of QRect for OpenGL
-*/
-
-class GLVIEWER_API GLViewer_Rect
-{
-public:
- GLViewer_Rect(): myLeft(0.0), myRight(0.0), myTop(0.0), myBottom(0.0){}
- GLViewer_Rect( float theLeft, float theRight, float theTop, float theBottom )
- : myLeft(theLeft), myRight(theRight), myTop(theTop), myBottom(theBottom) {}
- GLViewer_Rect( QRect theRect ) {
- myLeft = ( float )theRect.left(); myRight = ( float )theRect.right();
- myTop = ( float )theRect.top(); myBottom = ( float )theRect.bottom(); }
-
- float left() const { return myLeft; }
- float right() const { return myRight; }
- float top() const { return myTop; }
- float bottom() const { return myBottom; }
-
- float width() const { return fabs( myRight - myLeft ); }
- float height() const { return fabs( myTop - myBottom ); }
-
- void setLeft( float theLeft ) { myLeft = theLeft; }
- void setRight( float theRight ) { myRight = theRight; }
- void setTop( float theTop ) { myTop = theTop; }
- void setBottom( float theBottom ) { myBottom = theBottom; }
-
- void setCoords( float theLeft, float theRight, float theBottom, float theTop )
- { myLeft = theLeft; myRight = theRight; myBottom = theBottom; myTop = theTop; }
-
- //! \warning This method translate only rect format
- QRect toQRect() { return QRect( ( int )myLeft, ( int )myBottom,
- ( int )( myRight - myLeft ),
- ( int )( myTop - myBottom ) ); }
-
- //! On/off empty status
- void setIsEmpty( bool on ) { myIsEmpty = on; }
- //! Checks empty status
- bool isEmpty() const { return myIsEmpty; }
-
- //! Checks null status
- bool isNull() const { return myLeft == 0.0 && myRight == 0.0 && myBottom == 0.0 && myTop == 0.0; }
- //! Checks valid status
- bool isValid() const { return ( myLeft < myRight && myBottom < myTop ); }
-
- //! Checks staus of contains point
- bool contains( GLViewer_Pnt pnt ) { return ( pnt.x() > left() &&
- pnt.x() < right() &&
- pnt.y() > bottom() &&
- pnt.y() < top() ); }
-
- void move( const float x, const float y )
- {
- myLeft += x;
- myRight += x;
- myTop += y;
- myBottom += y;
- }
-
-protected:
- float myLeft;
- float myRight;
- float myTop;
- float myBottom;
-
- bool myIsEmpty;
-};
-
-/*! Class GLViewer_Segment
-* Segment for 2d detection
-*/
-
-class GLVIEWER_API GLViewer_Segment
-{
-public:
- GLViewer_Segment( const GLViewer_Pnt& thePnt1,
- const GLViewer_Pnt& thePnt2 );
-
- //! Ordinary segment construction
- /*!Construction of a ray with given equation Ax + By + C = 0 */
-
- GLViewer_Segment( const GLViewer_Pnt& thePnt,
- const GLfloat theA,
- const GLfloat theB,
- const GLfloat theC );
- ~GLViewer_Segment();
-
- bool HasIntersection( const GLViewer_Segment& theOther ) const;
- // Detects intersection with another segment or ray
-
-private:
- GLViewer_Pnt myPnt1;
- GLViewer_Pnt myPnt2;
- GLfloat myA;
- GLfloat myB;
- GLfloat myC;
-};
-
-/*! Class GLViewer_Poly
-* Polygon for 2d detection
-*/
-
-class GLVIEWER_API GLViewer_Poly
-{
-public:
- GLViewer_Poly( const GLViewer_PntList* thePoints );
- virtual ~GLViewer_Poly();
-
- //! Adds point to polygon
- void AddPoint( GLViewer_Pnt& pnt ) { myPoints->append( pnt ); }
-
- //! Returns number of point
- int Count() const { return myPoints->count(); }
-
- //! Returns true if a point lies inside this polygon
- virtual bool IsIn( const GLViewer_Pnt& thePnt ) const;
-
- //! Returns true if a other polygon covers this polygon
- virtual bool IsCovers( const GLViewer_Poly& thePoly ) const;
-
- //! Likes the above function
- virtual bool IsCovers( const GLViewer_Rect& theRect ) const;
-
- // Returns true if intersection of this polygon with a segment or a ray not empty
- virtual bool HasIntersection( const GLViewer_Segment& theSegment ) const;
-
-private:
- GLViewer_PntList* myPoints;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Grid.cxx
-// Created: November, 2004
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_Grid.h"
-#include "GLViewer_Defs.h"
-
-#include <Precision.hxx>
-#include <qglobal.h>
-
-/*!
- Default constructor
-*/
-GLViewer_Grid::GLViewer_Grid() :
- myGridList( 0 ), myGridHeight( (GLfloat)0.0 ), myGridWidth( (GLfloat)0.0 ),
- myWinW( (GLfloat)0.0 ), myWinH( (GLfloat)0.0 ), myXSize( (GLfloat)0.0 ), myYSize( (GLfloat)0.0 ),
- myXPan( (GLfloat)0.0 ), myYPan( (GLfloat)0.0 ), myXScale( (GLfloat)1.0 ), myYScale( (GLfloat)1.0 ),
- myLineWidth( (GLfloat)0.05 ), myCenterWidth( (GLfloat)1.5 ), myCenterRadius( (GLfloat)5.0 ),
- myScaleFactor( 10 ), myIsUpdate( GL_FALSE )
-{
- myGridColor[0] = 0.5;
- myGridColor[1] = 0.5;
- myGridColor[2] = 0.5;
- myAxisColor[0] = 0.75;
- myAxisColor[1] = 0.75;
- myAxisColor[2] = 0.75;
-}
-
-/*!
- Constructor
- \param width and \param height - width and height of grid
- \param winW and \param winH - width and height of window
- \param xSize and \param ySize - steps along x and y direction
- \param xPan and \param yPan - offsets along x and y direction
- \param xScale and \param yScal - scale factors along x and y direction
-*/
-GLViewer_Grid::GLViewer_Grid( GLfloat width, GLfloat height,
- GLfloat winW, GLfloat winH,
- GLfloat xSize, GLfloat ySize,
- GLfloat xPan, GLfloat yPan,
- GLfloat xScale, GLfloat yScale ) :
- myGridList( 0 ), myGridHeight( (GLfloat)0.0 ), myGridWidth( (GLfloat)0.0 ),
- myWinW( (GLfloat)0.0 ), myWinH( (GLfloat)0.0 ), myXSize( (GLfloat)0.0 ), myYSize( (GLfloat)0.0 ),
- myXPan( (GLfloat)0.0 ), myYPan( (GLfloat)0.0 ), myXScale( (GLfloat)1.0 ), myYScale( (GLfloat)1.0 ),
- myLineWidth( (GLfloat)0.05 ), myCenterWidth( (GLfloat)1.5 ), myCenterRadius( (GLfloat)5.0 ),
- myScaleFactor( 10 ), myIsUpdate( GL_FALSE )
-{
- myGridColor[0] = 0.5;
- myGridColor[1] = 0.5;
- myGridColor[2] = 0.5;
- myAxisColor[0] = 0.75;
- myAxisColor[1] = 0.75;
- myAxisColor[2] = 0.75;
-}
-
-/*!
- Destructor
-*/
-GLViewer_Grid::~GLViewer_Grid()
-{
-}
-
-/*!
- Performs OpenGL drawing
-*/
-void GLViewer_Grid::draw()
-{
- if ( myGridList == 0 || myIsUpdate )
- initList();
-
- glCallList( myGridList );
-}
-
-/*!
- Changes color of grid
- \param r, g, b - components of color
-*/
-void GLViewer_Grid::setGridColor( GLfloat r, GLfloat g, GLfloat b )
-{
- if( myGridColor[0] == r && myGridColor[1] == g && myGridColor[2] == b )
- return;
-
- myGridColor[0] = r;
- myGridColor[1] = g;
- myGridColor[2] = b;
- myIsUpdate = GL_TRUE;
-}
-
-/*!
- Changes color of axis
- \param r, g, b - components of color
-*/
-void GLViewer_Grid::setAxisColor( GLfloat r, GLfloat g, GLfloat b )
-{
- if( myAxisColor[0] == r && myAxisColor[1] == g && myAxisColor[2] == b )
- return;
-
- myAxisColor[0] = r;
- myAxisColor[1] = g;
- myAxisColor[2] = b;
- myIsUpdate = GL_TRUE;
-}
-
-/*!
- Changes grid width
- \param w - new grid width
-*/
-void GLViewer_Grid::setGridWidth( float w )
-{
- if( myGridWidth == w )
- return;
-
- myGridWidth = w;
- myIsUpdate = GL_TRUE;
-}
-
-/*!
- Sets Radius of center point( begin coords )
- \param r - new radius
-*/
-void GLViewer_Grid::setCenterRadius( int r )
-{
- if( myCenterRadius == r )
- return;
-
- myCenterRadius = r;
- myIsUpdate = GL_TRUE;
-}
-
-/*!
- Sets grid size along X and Y axis
- \param xSize - size along X axis
- \param ySize - size along Y axis
-*/
-void GLViewer_Grid::setSize( float xSize, float ySize )
-{
- if( myXSize == xSize && myYSize == ySize )
- return;
-
- myXSize = xSize;
- myYSize = ySize;
- myIsUpdate = GL_TRUE;
-}
-
-/*!
- Sets panning of grid
- \param xPan - panning along X axis
- \param yPan - panning along Y axis
-*/
-void GLViewer_Grid::setPan( float xPan, float yPan )
-{
- if( myXPan == xPan && myYPan == yPan )
- return;
-
- myXPan = xPan;
- myYPan = yPan;
- myIsUpdate = GL_TRUE;
-}
-
-/*!
- Sets zoom
- \param zoom - new coefficient of zooming
-*/
-bool GLViewer_Grid::setZoom( float zoom )
-{
- if( zoom == 1.0 )
- return true;
-
- //backup values
- float bXScale = myXScale;
- float bYScale = myYScale;
-
- myXScale /= zoom;
- myYScale /= zoom;
-
- if( fabs(myXScale) < Precision::Confusion() || fabs(myYScale) < Precision::Confusion() )
- { //undo
- myXScale = bXScale;
- myYScale = bYScale;
- return false;
- }
-
- myGridWidth /= zoom;
- myGridHeight /= zoom;
- myIsUpdate = GL_TRUE;
- return true;
-}
-
-/*!
- Sets parameters of grid by zoom coefficient and window size
- \param WinW - window width
- \param WinH - window height
- \param zoom - zoom coefficient
-*/
-void GLViewer_Grid::setResize( float WinW, float WinH, float zoom )
-{
- if( myWinW == WinW && myWinH == WinH && zoom == 1.0 )
- return;
-
- myGridWidth = myGridWidth + ( WinW - myWinW ) * myXScale;
- myGridHeight = myGridHeight + ( WinH - myWinH ) * myYScale;
- myWinW = WinW;
- myWinH = WinH;
- setZoom( zoom );
- myIsUpdate = GL_TRUE;
-}
-
-/*!
- \return grid size along x and y axis
- \param xSize - for size along x axis
- \param ySize - for size along y axis
-*/
-void GLViewer_Grid::getSize( float& xSize, float& ySize ) const
-{
- xSize = myXSize;
- ySize = myYSize;
-}
-
-/*!
- \return panning along x and y axis
- \param xPan - for panning along x axis
- \param yPan - for panning along y axis
-*/
-void GLViewer_Grid::getPan( float& xPan, float& yPan ) const
-{
- xPan = myXPan;
- yPan = myYPan;
-}
-
-/*!
- \return scaling along x and y axis
- \param xScale - for scaling along x axis
- \param yScale - for scaling along y axis
-*/
-void GLViewer_Grid::getScale( float& xScale, float& yScale ) const
-{
- xScale = myXScale;
- yScale = myYScale;
-}
-
-/*!
- Initialize grid display list
-*/
-bool GLViewer_Grid::initList()
-{
- myIsUpdate = GL_FALSE;
-
- if( myXSize == (GLfloat)0.0 )
- myXSize = (GLfloat)0.1;
- if( myYSize == (GLfloat)0.0 )
- myYSize = (GLfloat)0.1;
-
-label:
- if( ( myXSize >= myGridWidth/5 ) && ( myYSize >= myGridHeight/5 ) )
- { //zoom in
- myXSize /= myScaleFactor;
- myYSize /= myScaleFactor;
- goto label;
- }
- else if( ( myXSize * myScaleFactor < myGridWidth/5 )
- || ( myYSize * myScaleFactor < myGridHeight/5 ) )
- { //zoom out
- myXSize *= myScaleFactor;
- myYSize *= myScaleFactor;
- goto label;
- }
-
- //int n = myGridWidth / myXSize;
- //int m = myGridHeight / myYSize;
- // do not initialise integer by float
- //if( ( n != 0 ) || ( m != 0 ) )
- if( ( myGridWidth > 0.5 * myXSize ) || ( myGridHeight > 0.5 * myYSize ) )
- {
- if ( myGridList != 0 )
- {
- glDeleteLists( myGridList, 1 );
- if ( glGetError() != GL_NO_ERROR )
- return FALSE;
- }
-
- float xLoc = (int)(myXPan / myXSize) * myXSize;
- float yLoc = (int)(myYPan / myYSize) * myYSize;
-
- myGridList = glGenLists( 1 );
- glNewList( myGridList, GL_COMPILE );
-
- glColor3f( myGridColor[0], myGridColor[1], myGridColor[2] );
- glLineWidth( myLineWidth );
-
- glBegin( GL_LINES );
- for( int j = 0; ( j-1 ) * myXSize <= myGridWidth / 2 ; j++ )
- {
- glVertex2d( -myXSize * j - xLoc, -myGridHeight / 2 - myYSize - yLoc );
- glVertex2d( -myXSize * j - xLoc, myGridHeight / 2 + myYSize - yLoc );
- glVertex2d( myXSize * j - xLoc, -myGridHeight / 2 - myYSize - yLoc );
- glVertex2d( myXSize * j - xLoc, myGridHeight / 2 + myYSize - yLoc );
- }
- for( int i = 0; ( i-1 ) * myYSize <= myGridHeight / 2 ; i++)
- {
- glVertex2d( -myGridWidth / 2 - myXSize - xLoc, -myYSize * i - yLoc );
- glVertex2d( myGridWidth / 2 + myXSize - xLoc, -myYSize * i - yLoc );
- glVertex2d( -myGridWidth / 2 - myXSize - xLoc, myYSize * i - yLoc );
- glVertex2d( myGridWidth / 2 + myXSize - xLoc, myYSize * i - yLoc );
- }
- glEnd();
-
- glColor3f( myAxisColor[0], myAxisColor[1], myAxisColor[2] );
- glLineWidth( myCenterWidth );
-
- glBegin( GL_LINES );
- glVertex2d( myGridWidth / 2 + myXSize - xLoc, 0);
- glVertex2d( -myGridWidth / 2 - myXSize - xLoc, 0);
- glVertex2d( 0, myGridHeight / 2 + myYSize - yLoc );
- glVertex2d( 0, -myGridHeight / 2 - myYSize - yLoc );
- glEnd();
-
- glBegin( GL_LINE_LOOP );
- double angle = 0.0;
- for ( int k = 0; k < SEGMENTS; k++ )
- {
- glVertex2f( cos(angle) * myCenterRadius * myXScale,
- sin(angle) * myCenterRadius * myYScale );
- angle += STEP;
- }
- glEnd();
-
- glEndList();
- }
- return TRUE;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Grid.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_GRID_H
-#define GLVIEWER_GRID_H
-
-#ifdef WNT
-#include "windows.h"
-#endif
-
-#include "GLViewer.h"
-
-#include <GL/gl.h>
-#include <GL/glu.h>
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-/*! Class GLViewer_Grid
- 2D rectangular grid for GLViewer
- Grid is adapt cells for current view
-*/
-
-class GLVIEWER_API GLViewer_Grid
-{
-public:
- //! A default constructor
- GLViewer_Grid();
- //! A constructor
- /*
- * \param width and \param height - width and height of grid
- * \param winW and \param winH - width and height of window
- * \param xSize and \param ySize - steps along x and y direction
- * \param xPan and \param yPan - offsets along x and y direction
- * \param xScale and \param yScal - scale factors along x and y direction
- */
- GLViewer_Grid( GLfloat width, GLfloat height,
- GLfloat winW, GLfloat winH,
- GLfloat xSize, GLfloat ySize,
- GLfloat xPan, GLfloat yPan,
- GLfloat xScale, GLfloat yScale );
- ~GLViewer_Grid();
-
- //! Draws grid
- void draw();
-
- //! Sets color of grid in RGB format
- void setGridColor( GLfloat r, GLfloat g, GLfloat b );
- //! Sets color of grid axes in RGB format
- void setAxisColor( GLfloat r, GLfloat g, GLfloat b );
- void setGridWidth( float );
- //! Sets Radius of center point( begin coords )
- void setCenterRadius( int );
-
- //! Sets steps along x and y directions
- void setSize( float xs, float ys );
- //! Sets offset along x and y direction
- void setPan( float xp, float yp );
- //! Sets common scale factor along x and y direction
- bool setZoom( float zoom );
- //! Recomputes grid in new size and scale of view
- void setResize( float winW, float winH, float Zoom );
-
- void getSize( float&, float& ) const;
- void getPan( float&, float& ) const;
- void getScale( float&, float& ) const;
-
- //! Sets step of scale
- void setScaleFactor( int );
- int getScaleFactor();
-
-protected:
- //! Initialize grid display list
- bool initList();
-
- GLuint myGridList;
- GLfloat myGridColor[3];
- GLfloat myAxisColor[3];
- GLfloat myGridHeight;
- GLfloat myGridWidth;
- GLfloat myWinW;
- GLfloat myWinH;
- GLfloat myXSize;
- GLfloat myYSize;
- GLfloat myXPan;
- GLfloat myYPan;
- GLfloat myXScale;
- GLfloat myYScale;
- GLfloat myLineWidth;
- GLfloat myCenterWidth;
- GLint myCenterRadius;
- GLint myScaleFactor;
- GLboolean myIsUpdate;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Group.xx
-// Created: March, 2005
-
-//#include "GLViewerAfx.h"
-#include "GLViewer_Group.h"
-#include "GLViewer_Object.h"
-
-/*!
- constructor
-*/
-GLViewer_Group::GLViewer_Group()
-{
- mySelObjNum = 0;
-}
-
-/*!
- destructor
-*/
-GLViewer_Group::~GLViewer_Group()
-{
-}
-
-/*!
- detection of empty group
-*/
-bool GLViewer_Group::isEmpty()
-{
- return myList.empty();
-}
-
-/*!
- \return number of elements
-*/
-int GLViewer_Group::count()
-{
- return myList.size();
-}
-
-/*!
- \return the position of object if group contains it, else -1
-*/
-int GLViewer_Group::contains( GLViewer_Object* theObject )
-{
- if( !theObject )
- return -1;
-
- OGIterator it = myList.begin();
- OGIterator end_it = myList.end();
- for( int i = 0; it != end_it; ++it, i++ )
- if( *it == theObject )
- return i;
-
- return -1;
-}
-
-/*!
- adding object to group
-*/
-int GLViewer_Group::addObject( GLViewer_Object* theObject )
-{
- if( theObject && contains( theObject ) == -1 )
- {
- myList.push_back( theObject );
- theObject->setGroup( this );
- }
- return count();
-}
-
-/*!
- removing object from group
-*/
-int GLViewer_Group::removeObject( GLViewer_Object* theObject )
-{
- if( theObject )
- {
- myList.remove( theObject );
- //theObject->setGroup( NULL );
- }
-
-
- if( isEmpty() )
- {
- this->~GLViewer_Group();
- return -1;
- }
- else
- return count();
-}
-
-/*!
- Dragging operation
- \param Once is true, if this operation calls only one time for all object
- \param x, y - dragging position
-*/
-void GLViewer_Group::dragingObjects( float x, float y, bool once )
-{
- if( !once )
- {
- if( !mySelObjNum )
- {
- OGIterator it = myList.begin();
- OGIterator end_it = myList.end();
- for( int i = 0; it != end_it; ++it, i++ )
- if( (*it)->isSelected() )
- mySelObjNum++;
-
- if( mySelObjNum )
- mySelObjNum--;
- }
- else
- {
- mySelObjNum--;
- return;
- }
- }
-
- OGIterator it = myList.begin();
- OGIterator end_it = myList.end();
- for( int i = 0; it != end_it; ++it, i++ )
- (*it)->moveObject( x, y, true );
-}
-
-/*!
- Updates zoom of object
- \param sender - object to be updated
- \param zoom - zoom coefficient
-*/
-void GLViewer_Group::updateZoom( GLViewer_Object* sender, float zoom )
-{
- OGIterator it = myList.begin();
- OGIterator end_it = myList.end();
- for( int i = 0; it != end_it; ++it, i++ )
- {
- GLViewer_Object* anObject = *it;
- if( anObject != sender )
- anObject->setZoom( zoom, true, true );
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Group.h
-// Created: March, 2005
-
-#ifndef GLVIEWER_GROUP_H
-#define GLVIEWER_GROUP_H
-
-#include <list>
-#include "GLViewer.h"
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-class GLViewer_Object;
-
-typedef std::list<GLViewer_Object*> OGList;
-typedef std::list<GLViewer_Object*>::iterator OGIterator;
-
-/*! Class GLViewer_Group
-* Group of GLViewer_Objects for synchronized moving.
-* If you move one or more objects from group, than all objects from group is moved
-* If group is empty, it must be deleted
-*/
-
-class GLVIEWER_API GLViewer_Group
-{
-public:
- GLViewer_Group();
- ~GLViewer_Group();
-
- bool isEmpty();
- //! Returns number ob objects
- int count();
-
- //! Returns index of position, else -1
- int contains( GLViewer_Object* );
- int addObject( GLViewer_Object* );
- int removeObject( GLViewer_Object* );
-
- OGList getObjects() const { return myList; }
-
- //! Dragging operation
- /*! Once = true, if this operation calls only one time for all object*/
- void dragingObjects( float x, float y, bool once = false );
- //!\warning it is for ouv
- void updateZoom( GLViewer_Object* sender, float zoom );
-
-private:
- //! List of objects
- OGList myList;
- //! This number needs for synchranization group with viewport drag methods
- int mySelObjNum;
-};
-
-#endif //GLVIEWER_GROUP_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_MimeSource.h"
-#include "GLViewer_BaseObjects.h"
-
-//#include <cmath>
-//using namespace std;
-
-/*!
- Destructor
-*/
-GLViewer_MimeSource::~GLViewer_MimeSource()
-{
-}
-
-/*!
- Translate objects to byte array
- \param theObjects - list of objects
-*/
-bool GLViewer_MimeSource::setObjects( QValueList<GLViewer_Object*> theObjects )
-{
- if( !theObjects.empty() )
- {
- QStringList aObjectsType;
- QValueList<QByteArray> aObjects;
- QValueList<GLViewer_Object*>::const_iterator anIt = theObjects.begin();
- QValueList<GLViewer_Object*>::const_iterator anEndIt = theObjects.end();
-
- int aObjByteSize = 0;
- for( ; anIt != anEndIt; anIt++ )
- {
- aObjects.append( (*anIt)->getByteCopy() );
- aObjByteSize += aObjects.last().size();
- aObjectsType.append( (*anIt)->getObjectType() );
- }
-
- int anISize = sizeof( int );
- QString aTypes = aObjectsType.join("");
- int aStrByteSize = aTypes.length();
- int aObjNum = aObjects.count();
-
- myByteArray = QByteArray( anISize * (1 + 2*aObjNum) + aStrByteSize + aObjByteSize );
-
- int anIndex = 0, j = 0;
- char* aPointer = (char*)&aObjNum;
- for( anIndex = 0; anIndex < anISize; anIndex++, aPointer++ )
- myByteArray[anIndex] = *aPointer;
-
- QStringList::const_iterator aStrIt = aObjectsType.begin();
- QStringList::const_iterator aEndStrIt = aObjectsType.end();
- for( j = 1; aStrIt != aEndStrIt; aStrIt++, j++ )
- {
- int aStrLen = (*aStrIt).length();
- aPointer = (char*)&aStrLen;
- for( ; anIndex < anISize*( 1 + j ); anIndex++, aPointer++ )
- myByteArray[anIndex] = *aPointer;
- }
-
- int aCurIndex = anIndex;
- const char* aStr = aTypes.data();
-
- for( j = 0 ; anIndex < aCurIndex + aStrByteSize; aPointer++, anIndex++, j++ )
- myByteArray[anIndex] = aStr[j];
-
- aCurIndex = anIndex;
- QValueList<QByteArray>::iterator anObjIt = aObjects.begin();
- QValueList<QByteArray>::iterator anEndObjIt = aObjects.end();
- for( j = 1; anObjIt != anEndObjIt; anObjIt++, j++ )
- {
- int aObjLen = (int)((*anObjIt).size());
- aPointer = (char*)&aObjLen;
- for( ; anIndex < aCurIndex + anISize*j; anIndex++, aPointer++ )
- myByteArray[anIndex] = *aPointer;
- }
-
- aCurIndex = anIndex;
- anObjIt = aObjects.begin();
-
- for( ; anObjIt != anEndObjIt; anObjIt++ )
- {
- int aObjLen = (int)((*anObjIt).size());
- for( j = 0 ; anIndex < aCurIndex + aObjLen; anIndex++, aPointer++, j++ )
- myByteArray[anIndex] = (*anObjIt)[j];
- aCurIndex = anIndex;
- }
-
- return true;
- }
-
- return false;
-}
-
-/*!
- Creates object by it's representation (byte array)
- \param theArray - byte array
- \param theType - type of object
-*/
-GLViewer_Object* GLViewer_MimeSource::getObject( QByteArray theArray, QString theType )
-{
- if( !theArray.isEmpty() )
- {
- if( theType == "GLViewer_MarkerSet" )
- {
- GLViewer_MarkerSet* aObject = new GLViewer_MarkerSet( 0, (float)0.0, 0 );
- if( aObject->initializeFromByteCopy( theArray ) )
- return aObject;
- }
- else if ( theType == "GLViewer_Polyline" )
- {
- GLViewer_Polyline* aObject = new GLViewer_Polyline( 0, (float)0.0, 0 );
- if( aObject->initializeFromByteCopy( theArray ) )
- return aObject;
- }
- else if( theType == "GLViewer_TextObject" )
- {
- GLViewer_TextObject* aObject = new GLViewer_TextObject( 0, 0, 0, QColor(255,255,255), 0 );
- if( aObject->initializeFromByteCopy( theArray ) )
- return aObject;
- }
- }
-
- return NULL;
-}
-
-/*!
- Creates list of objects by its representation (byte array)
- \param theArray - byte array
- \param theType - type of object
-*/
-QValueList<GLViewer_Object*> GLViewer_MimeSource::getObjects( QByteArray theArray, QString theType )
-{
- if( !theArray.isEmpty() )
- {
- int anISize = sizeof( int );
- if( theType == "GLViewer_Objects" )
- {
- QStringList aTypeList;
- QValueList<QByteArray> aObjects;
- QValueList<GLViewer_Object*> aObjectList;
-
- QValueList<int> aTypeSizeList;
- QValueList<int> aObjSizeList;
- int aObjNum = 0;
- char* aPointer = (char*)&aObjNum;
-
- int anIndex = 0, j = 0;
- for( anIndex = 0; anIndex < anISize; anIndex++, aPointer++ )
- *aPointer = theArray[anIndex];
-
- for( j = 0; j < aObjNum; j++ )
- {
- int aTempVal = 0;
- aPointer = (char*)&aTempVal;
- for( ; anIndex < anISize*(j+2); anIndex++, aPointer++ )
- *aPointer = theArray[anIndex];
- aTypeSizeList.append( aTempVal );
- }
-
- int aCurIndex = anIndex;
- for( j = 0; j < aObjNum; j++ )
- {
- QString aTempStr;
- for( ; anIndex < aCurIndex + aTypeSizeList[j]; anIndex++ )
- {
- char aLetter = theArray[anIndex];
- aTempStr.append( aLetter );
- }
- aTypeList.append( aTempStr );
- aCurIndex = anIndex;
- }
-
- for( j = 0; j < aObjNum; j++ )
- {
- int aTempVal = 0;
- aPointer = (char*)&aTempVal;
- for( ; anIndex < aCurIndex + anISize*(j+1); anIndex++, aPointer++ )
- *aPointer = theArray[anIndex];
- aObjSizeList.append( aTempVal );
- }
-
- aCurIndex = anIndex;
- for( j = 0; j < aObjNum; j++ )
- {
- QByteArray aTempArray(aObjSizeList[j]);
- for( ; anIndex < aCurIndex + aObjSizeList[j]; anIndex++ )
- aTempArray[anIndex-aCurIndex] = theArray[anIndex];
- aObjects.append( aTempArray );
- aCurIndex = anIndex;
- }
-
- for( j = 0; j < aObjNum; j++ )
- aObjectList.append( getObject( aObjects[j], aTypeList[j] ) );
-
- return aObjectList;
- }
- }
-
- return QValueList<GLViewer_Object*>();
-}
-
-/*!
- \return format by index
- \param theIndex - index
-*/
-const char* GLViewer_MimeSource::format( int theIndex ) const
-{
- switch( theIndex )
- {
- case 0: return "GLViewer_Objects";
- //case 1: return "GLViewer_MarkerSet";
- //case 2: return "GLViewer_Polyline";
- //case 3: return "GLViewer_TextObject";
- default: return 0;
- }
-
-}
-
-/*!
- \return internal byte array
-*/
-QByteArray GLViewer_MimeSource::encodedData( const char* theObjectType ) const
-{
- if( theObjectType == "GLViewer_Objects" )
- return myByteArray;
-
- return QByteArray();
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_MimeSource.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_MIMESOURCE_H
-#define GLVIEWER_MIMESOURCE_H
-
-#ifdef WNT
-#include <windows.h>
-#endif
-
-#include "GLViewer.h"
-
-#include <qmime.h>
-#include <qvaluelist.h>
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-class GLViewer_Object;
-
-/*!
- \class GLViewer_MimeSource
- Needs for a work with QClipboard
-*/
-class GLVIEWER_API GLViewer_MimeSource: public QMimeSource
-{
-public:
- GLViewer_MimeSource():QMimeSource(){};
- ~GLViewer_MimeSource();
-
- //! Translate objects to byte array
- bool setObjects( QValueList<GLViewer_Object*> );
- //! Gets objects from byte array
- /*If you want to use new class, following two method must be redefined*/
- static QValueList<GLViewer_Object*> getObjects( QByteArray, QString theType);
- //! Get object from byte array
- /*If you want to use new class, following two method must be redefined*/
- static GLViewer_Object* getObject( QByteArray, QString theType);
-
- // Redefined methods
- virtual const char* format( int theIndex = 0 ) const;
- virtual QByteArray encodedData( const char* ) const;
-
-private:
- QByteArray myByteArray;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_Object.h"
-#include "GLViewer_Drawer.h"
-#include "GLViewer_AspectLine.h"
-#include "GLViewer_Geom.h"
-#include "GLViewer_Text.h"
-#include "GLViewer_Group.h"
-
-//#include <cmath>
-//using namespace std;
-
-/*!
- Default constructor
-*/
-GLViewer_Object::GLViewer_Object()
-{
- myXScale = 1.0;
- myYScale = 1.0;
- myXGap = 0;
- myYGap = 0;
- myZoom = 1.0;
-
- myIsHigh = GL_FALSE;
- myIsSel = GL_FALSE;
-
- myRect = new GLViewer_Rect();;
- myUpdateRect = new GLViewer_Rect();;
- myGLText = new GLViewer_Text( 0, 0, 0, QColor(0,0,0) );
-
- myAspectLine = new GLViewer_AspectLine();
- myType = "GLViewer_Object";
-
- myOwner = NULL;
- myDrawer = NULL;
-
- myIsVisible = true;
-
- isToolTipHTML = false;
-
- myGroup = NULL;
-}
-
-/*!
- Destructor
-*/
-GLViewer_Object::~GLViewer_Object()
-{
- if( myRect )
- delete myRect;
-
- if( myUpdateRect )
- delete myUpdateRect;
-
- if( myGLText )
- delete myGLText;
-
- if( myAspectLine )
- delete myAspectLine;
-}
-
-/*!
- \return priority of object
-*/
-int GLViewer_Object::getPriority() const
-{
- return myDrawer ? myDrawer->getPriority() : 0;
-}
-
-/*!
- \return true if object is inside rectangle
- \param theRect - rectangle
-*/
-GLboolean GLViewer_Object::isInside( GLViewer_Rect theRect )
-{
- return theRect.toQRect().contains( myRect->toQRect() );
-}
-
-/*!
- Sets zoom factor
- \param zoom - zoom factor
-*/
-GLboolean GLViewer_Object::setZoom( GLfloat zoom, bool, bool )
-{
- if( myZoom == zoom )
- return GL_FALSE;
-
- myZoom = zoom;
- return GL_TRUE;
-}
-
-/*!
- Performs zoom change by step
- \param zoomIn - to increase to decrease zoom
-*/
-GLboolean GLViewer_Object::updateZoom( bool zoomIn )
-{
- float newZoom;
- float step = zoomIn ? 1 : -1;
- double epsilon = 0.001;
-
- if( myZoom - 1 > epsilon )
- newZoom = ( myZoom * 2 + step ) / 2;
- else if( 1 - myZoom > epsilon )
- newZoom = 2 / ( 2 / myZoom - step );
- else
- newZoom = zoomIn ? 3./2. : 2./3.;
-
- if( newZoom < 0.01 || newZoom > 100.0 )
- return GL_FALSE;
-
- return setZoom( newZoom, true );
-}
-
-/*!
- Codes object as byte copy
- \return byte array
-*/
-QByteArray GLViewer_Object::getByteCopy()
-{
- int i = 0;
- int anISize = sizeof( int );
-
- const char* aTypeStr = myType.data();
- const char* aToolTipStr = myToolTipText.data();
-
- int aTypeLength = myType.length();
- int aToolTipLength = myToolTipText.length();
-
-
- QByteArray aGLText = myGLText->getByteCopy();
- QByteArray aAspect = myAspectLine->getByteCopy();
-
- float aRectData[8];
- aRectData[ 0 ] = myRect->left();
- aRectData[ 1 ] = myRect->top();
- aRectData[ 2 ] = myRect->right();
- aRectData[ 3 ] = myRect->bottom();
- aRectData[ 4 ] = myXScale;
- aRectData[ 5 ] = myYScale;
- aRectData[ 6 ] = myXGap;
- aRectData[ 7 ] = myYGap;
-
- int sizeOf8Float = sizeof( aRectData );
-
- QByteArray aResult( 2*anISize + sizeOf8Float +
- aTypeLength + aToolTipLength +
- aGLText.size() + aAspect.size() );
- // puts 8 float values into the byte array
- char* aPointer = (char*)&aRectData;
- for( i = 0; i < sizeOf8Float; i++, aPointer++ )
- aResult[i] = *aPointer;
- // puts length of type string
- aPointer = (char*)&aTypeLength;
- for( ; i < anISize + sizeOf8Float; i++, aPointer++ )
- aResult[i] = *aPointer;
- // puts type string
- for( ; i < anISize + sizeOf8Float + aTypeLength; i++ )
- aResult[i] = aTypeStr[i - anISize - sizeOf8Float ];
- // puts length of tooltiptext string
- aPointer = (char*)&aToolTipLength;
- for( ; i < 2*anISize + sizeOf8Float + aTypeLength; i++, aPointer++ )
- aResult[i] = *aPointer;
- // puts tooltiptext string
- for( ; i < 2*anISize + sizeOf8Float + aTypeLength + aToolTipLength; i++ )
- aResult[ i] = aToolTipStr[i - 2*anISize - sizeOf8Float - aTypeLength];
-
- int aCurPos = 2*anISize + sizeOf8Float + aTypeLength + aToolTipLength;
- // adds aspect byte array
- for ( i = aCurPos; i < (int)( aCurPos + aAspect.size() ); i++ )
- aResult[i] = aAspect[i - aCurPos];
-
- aCurPos = aCurPos + aAspect.size();
- // adds GL text byte array
- for ( i = aCurPos; i < (int)( aCurPos + aGLText.size() ); i++ )
- aResult[i] = aGLText[i - aCurPos];
-
- aCurPos += aGLText.size();
- aPointer = (char*)&myOwner;
- for( i = 0; i < sizeof( SUIT_DataOwner* ); i++, aPointer++ )
- aResult[ aCurPos + i ] = *aPointer;
-
- return aResult;
-}
-
-/*!
- Initialize object by byte array
- \param theArray - byte array
-*/
-bool GLViewer_Object::initializeFromByteCopy( QByteArray theArray )
-{
- int i = 0;
- int anISize = sizeof( int );
- int aFSize = sizeof( GLfloat );
-
- float aLeft = 0, aTop = 0, aRight = 0, aBottom = 0;
-
- //QString aTypeStr, aToolTipStr;
- int aTypeLength = 0, aToolTipLength = 0;
-
- int aSize = theArray.size();
-
- GLViewer_Text* aGLText = new GLViewer_Text( 0, 0, 0, QColor(255,255,255));
- int aGLTextMinSize = (aGLText->getByteCopy()).size();
- GLViewer_AspectLine* aAspectLine = new GLViewer_AspectLine();
- int aGLAspLineSize = (aAspectLine->getByteCopy()).size();
-
- QByteArray aGLTextArray, aAspect( aGLAspLineSize );
-
- if( aSize < 2*anISize + 8*aFSize + aGLTextMinSize + aGLAspLineSize )
- return false;
-
- char* aPointer = (char*)&aLeft;
- for( i = 0; i < aFSize; i++, aPointer++ )
- *aPointer = theArray[i];
- aPointer = (char*)&aTop;
- for( ; i < 2*aFSize; i++, aPointer++ )
- *aPointer = theArray[i];
- aPointer = (char*)&aRight;
- for( ; i < 3*aFSize; i++, aPointer++ )
- *aPointer = theArray[i];
- aPointer = (char*)&aBottom;
- for( ; i < 4*aFSize; i++, aPointer++ )
- *aPointer = theArray[i];
-
- //myRect = new QRect( aLeft, aTop, aRight - aLeft, aBottom - aTop );
- myRect = new GLViewer_Rect( aLeft, aRight, aTop, aBottom );
-
- aPointer = (char*)&myXScale;
- for( ; i < 5*aFSize; i++, aPointer++ )
- *aPointer = theArray[i];
- aPointer = (char*)&myYScale;
- for( ; i < 6*aFSize; i++, aPointer++ )
- *aPointer = theArray[i];
- aPointer = (char*)&myXGap;
- for( ; i < 7*aFSize; i++, aPointer++ )
- *aPointer = theArray[i];
- aPointer = (char*)&myYGap;
- for( ; i < 8*aFSize; i++, aPointer++ )
- *aPointer = theArray[i];
-
- myIsHigh = false;
- myIsSel = false;
- myIsVisible = true;
-
- aPointer = (char*)&aTypeLength;
- for( ; i < anISize + 8*aFSize; i++, aPointer++ )
- *aPointer = theArray[i];
- myType = "";
- for( ; i < anISize + 8*aFSize + aTypeLength; i++ )
- {
- QChar aChar( theArray[i] );
- myType += aChar;
- }
-
- aPointer = (char*)&aToolTipLength;
- for( ; i < 2*anISize + 8*aFSize + aTypeLength; i++, aPointer++ )
- *aPointer = theArray[i];
- myToolTipText= "";
- for( ; i < 2*anISize + 8*aFSize + aTypeLength + aToolTipLength; i++ )
- {
- QChar aChar( theArray[i] );
- myToolTipText += aChar;
- }
-
- int aCurPos = 2*anISize + 8*aFSize + aTypeLength + aToolTipLength;
- if( aSize - aCurPos < aGLTextMinSize + aGLAspLineSize )
- return false;
-
- for( i = 0; i < aGLAspLineSize; i++ )
- aAspect[i] = theArray[ aCurPos + i ];
- myAspectLine = GLViewer_AspectLine::fromByteCopy( aAspect );
-
- aCurPos = aCurPos + aGLAspLineSize;
- aGLTextArray.resize( aSize - aCurPos );
- for( i = 0; i + aCurPos < aSize; i++ )
- aGLTextArray[i] = theArray[ aCurPos + i ];
- // replace gl_text pointer by other
- if ( myGLText )
- delete myGLText;
- myGLText = GLViewer_Text::fromByteCopy( aGLTextArray );
-
- return true;
-}
-
-/*!
- Sets object's group
- \param theGroup - group
-*/
-void GLViewer_Object::setGroup( GLViewer_Group* theGroup )
-{
- if ( myGroup == theGroup )
- return;
-
- if( myGroup )
- myGroup->removeObject( this );
-
- myGroup = theGroup;
- if( theGroup )
- myGroup->addObject( this );
-}
-
-/*!
- \return object's group
-*/
-GLViewer_Group* GLViewer_Object::getGroup() const
-{
- return myGroup;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Object.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_OBJECT_H
-#define GLVIEWER_OBJECT_H
-
-#ifdef WNT
-#include <windows.h>
-#endif
-
-#include "GLViewer.h"
-#include "GLViewer_Defs.h"
-#include "GLViewer_Geom.h"
-
-#include <SUIT_DataOwner.h>
-
-#include <GL/gl.h>
-
-#include <qfile.h>
-#include <qstring.h>
-#include <qrect.h>
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-class GLViewer_Drawer;
-class GLViewer_AspectLine;
-class GLViewer_Group;
-class GLViewer_CoordSystem;
-class GLViewer_Text;
-//class GLViewer_Owner;
-
-/*!
- * Class GLViewer_Object
- * Base Object for all GLViewer objects
- */
-class GLVIEWER_API GLViewer_Object
-{
-public:
- //! A constructor
- GLViewer_Object();
- //! A destructor
- virtual ~GLViewer_Object();
-
- //! Main method. Computes all needed information about object for presentation in drawer
- virtual void compute() = 0;
- //! Creates correspond drawer
- virtual GLViewer_Drawer* createDrawer() = 0;
-
- //! Installing already exist drawer with same type
- virtual void setDrawer( GLViewer_Drawer* theDrawer ) { myDrawer = theDrawer; }
- //! Returns current drawer
- GLViewer_Drawer* getDrawer() const { return myDrawer; }
-
- //! Computes highlight presentation
- /*!
- *\param x - x coord
- *\param y - y coord
- *\param tol - tolerance of detecting
- *\param isCircle - = true if sensitive area of detection is round
- */
- virtual GLboolean highlight( GLfloat x,
- GLfloat y,
- GLfloat tol,
- GLboolean isCircle = GL_FALSE ) = 0;
- //! Clears all highlight information
- virtual GLboolean unhighlight() = 0;
-
- //! Computes select presentation
- /*!
- *\param x - x coord
- *\param y - y coord
- *\param tol - tolerance of detecting
- *\param rect - Non empty for rectangle selection
- *\param isFull - = true if
- *\param isCircle - = true if sensitive area of detection is round
- *\param isShift - = true if selection exec with append option
- */
- virtual GLboolean select( GLfloat x,
- GLfloat y,
- GLfloat tol,
- GLViewer_Rect rect,
- GLboolean isFull = GL_FALSE,
- GLboolean isCircle = GL_FALSE,
- GLboolean isShift = GL_FALSE ) = 0;
- //! Clears all select information
- virtual GLboolean unselect() = 0;
-
- //! Returns if theRect inside object
- virtual GLboolean isInside( GLViewer_Rect theRect);
-
- //!\warning It is for ouv
- virtual bool portContains( GLViewer_Pnt ) { return false; }
- //!\warning It is for ouv
- virtual bool startPulling( GLViewer_Pnt ) { return false; }
- //!\warning It is for ouv
- virtual void pull( GLViewer_Pnt, GLViewer_Object* ) {}
- //!\warning It is for ouv
- virtual void finishPulling() {}
- //!\warning It is for ouv
- virtual bool isPulling() { return false; }
- //!\warning It is for ouv
- virtual GLViewer_Rect getPullingRect() const { return GLViewer_Rect(
- myRect->left(), myRect->right(), myRect->top(), myRect->bottom() ); }
-
- //! Installs object rectangle
- virtual void setRect( GLViewer_Rect* rect) { myRect = rect; }
- //! Returns object rectungle
- virtual GLViewer_Rect* getRect() const { return myRect; }
- //! Returns update object rectangle
- /*! Does not equal getRect() if object have a persistence to some viewer transformations*/
- virtual GLViewer_Rect* getUpdateRect() = 0;
-
- //! Installs scale factors
- virtual void setScale( GLfloat xScale, GLfloat yScale ) { myXScale = xScale; myYScale = yScale; }
- //! Returns scale factors
- virtual void getScale( GLfloat& xScale, GLfloat& yScale ) const { xScale = myXScale; yScale = myYScale;}
-
- //!\warning It is for ouv
- virtual GLboolean setZoom( GLfloat zoom, bool recompute, bool fromGroup = false );
- //!\warning It is for ouv
- virtual GLfloat getZoom() const { return myZoom; }
- //!\warning It is for ouv
- virtual GLboolean updateZoom( bool zoomIn );
-
- //! Returns true if object is highlighted
- virtual GLboolean isHighlighted() const { return myIsHigh; }
- //! Returns true if object is selected
- virtual GLboolean isSelected() const { return myIsSel; }
- //! Installs select status to object
- virtual void setSelected( GLboolean state ) { myIsSel = state; }
-
- //! Installs GLText to object
- void setGLText( GLViewer_Text* glText ) { myGLText = glText; }
- //! Returns object GLText
- GLViewer_Text* getGLText() const { return myGLText; }
-
- //! Installs acpect line for object presentation
- virtual void setAspectLine ( GLViewer_AspectLine* aspect ) { myAspectLine = aspect; }
- //! Returns acpect line of object presentation
- virtual GLViewer_AspectLine* getAspectLine() const { return myAspectLine; }
-
- //! Returns object type
- /*! Needs for GLViewer_Drawer*/
- QString getObjectType() const { return myType; }
-
- //! Installs object name
- void setName( QString name ) { myName = name; }
- //! Returns object name
- QString getName() const { return myName; }
-
- //! Returns object priority
- virtual int getPriority() const;
-
- //! Moves object per by recomputing
- /*!
- *\param dx - moving along X coord
- *\param dy - moving along Y coord
- *\param fromGroup - = true if this method called from group
- */
- virtual void moveObject( float dx, float dy, bool fromGroup = false ) = 0;
- //! Finaly recomputing object after moving
- virtual bool finishMove() { return true; }
-
- //! Returns visible object status
- virtual bool getVisible() const { return myIsVisible; }
- //! Installs visible object status
- virtual void setVisible( bool theStatus ) { myIsVisible = theStatus; }
-
- //! Installs onject tool tip text
- void setToolTipText( QString str ){ myToolTipText = str; }
- //! Returns onject tool tip text
- virtual QString getToolTipText(){ return myToolTipText; }
-
- //! Returns true if tool tip contains HTML tags
- bool isTooTipHTML() const { return isToolTipHTML; }
- //! Installs tool tip supporting of HTML tags
- void setToolTipFormat( bool isHTML ) { isToolTipHTML = isHTML; }
-
- //! A function for coding object to the byte copy
- /*! A function is used for copy-past technollogy in copy method */
- virtual QByteArray getByteCopy();
- //! A function for decoding object from the byte copy
- /*! A function is used for copy-past technollogy in past method */
- virtual bool initializeFromByteCopy( QByteArray );
-
- //! A function translate object in to PostScript file on disk
- /*!
- *\param hFile the name of PostScript file chosen by user
- *\param aViewerCS the GLViewer_CoordSystem of window
- *\param aPSCS the GLViewer_CoordSystem of PostScript page
- */
- virtual bool translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS ) = 0;
- //! A function translate object in to HPGL file on disk
- /*!
- *\param hFile the name of PostScript file chosen by user
- *\param aViewerCS the GLViewer_CoordSystem of window
- *\param aHPGLCS the GLViewer_CoordSystem of PostScript page
- */
- virtual bool translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS ) = 0;
-
-#ifdef WIN32
- //! A function translate object in to EMF file on disk
- /*!
- *\warning WIN32 only
- *
- *\param dc the name of HDC associated with file chosen by user
- *\param aViewerCS the GLViewer_CoordSystem of window
- *\param aEMFCS the GLViewer_CoordSystem of EMF page
- */
- virtual bool translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS ) = 0;
-#endif
- //!\warning It is for ouv
- SUIT_DataOwner* owner() const { return myOwner; }
- //!\warning It is for ouv
- void setOwner( SUIT_DataOwner* owner ) { myOwner = owner; }
-
- //! Adds object to group theGroup
- void setGroup( GLViewer_Group* theGroup );
- //! Returns object group
- GLViewer_Group* getGroup() const;
-
- //!\warning It is for ouv
- virtual GLViewer_Object* getOwner() { return this; }
-
- //! Returns true if object can be selected
- virtual bool isSelectable() { return true; }
- //!\warning It is for ouv
- virtual bool isScalable() { return true; }
-
-protected:
- //! Object name
- QString myName;
- //! Object type
- QString myType;
-
- //! Object base rect
- GLViewer_Rect* myRect;
- //! Update object rect (after some viewer transformations)
- GLViewer_Rect* myUpdateRect;
- //! Object GLText
- GLViewer_Text* myGLText;
-
- //! X scale factor
- GLfloat myXScale;
- //! Y scale factor
- GLfloat myYScale;
- //! Gap for X direction of rect
- GLfloat myXGap;
- //! Gap for Y direction of rect
- GLfloat myYGap;
-
- //!\warning It is for ouv
- GLfloat myZoom;
-
- //! Highlight status
- /*! = true after right highlighting*/
- GLboolean myIsHigh;
- //! Selectt status
- /*! = true after right selection*/
- GLboolean myIsSel;
-
- //! Object drawer
- GLViewer_Drawer* myDrawer;
- //! Line aspect for object presentation
- GLViewer_AspectLine* myAspectLine;
-
- //! Objet tool tip text
- QString myToolTipText;
- //! HTML object tool tip status
- /*! = true if tool tip text contains HTML tags */
- bool isToolTipHTML;
-
- //! Object visibke status
- bool myIsVisible;
-
- //!\warning It is for ouv
- SUIT_DataOwner* myOwner;
-
- //! Object Group
- GLViewer_Group* myGroup;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Selector.cxx
-// Created: November, 2004
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_Selector.h"
-
-#include "GLViewer_Viewer.h"
-
-int GLViewer_Selector::apppendKey = Qt::ShiftButton;
-
-/*!
- Constructor
-*/
-GLViewer_Selector::GLViewer_Selector( GLViewer_Viewer* viewer )
-: QObject( 0 ),
-myViewer( viewer ),
-myLocked( false ),
-myMinRectSize( 1, 1 )
-{
-}
-
-/*!
- Destructor
-*/
-GLViewer_Selector::~GLViewer_Selector()
-{
-}
-
-/*!
- Sets the min size of rectangle to treat it as a rectangle for multiple
- selection( sensitivity ). If a rectangle size is less than that min size,
- the right-bottom point of the rectangle will be used for single selection.
- The default min size is ( 1,1 ). [ public ]
-*/
-void GLViewer_Selector::setMinRectSize( const QSize& minSize )
-{
- myMinRectSize = minSize;
-}
-
-/*!
- Locks / unlocks the selector. If locked, nothing can be selected
- regadless of the selection mode. [ public ]
-*/
-void GLViewer_Selector::lock( bool locked )
-{
- myLocked = locked;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Selector.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_SELECTOR_H
-#define GLVIEWER_SELECTOR_H
-
-#include "GLViewer.h"
-#include "GLViewer_Defs.h"
-
-#include <qsize.h>
-#include <qobject.h>
-
-#include <Quantity_NameOfColor.hxx>
-
-class GLViewer_Viewer;
-
-/*!
- \Class GLViewer_Selector
- Base class for object selection in SUIT-based application
-*/
-class GLVIEWER_API GLViewer_Selector : public QObject
-{
- Q_OBJECT
-
-public:
- GLViewer_Selector( GLViewer_Viewer* );
- ~GLViewer_Selector();
-
-public:
- //! Sets lock status (enable/disable interavtive)
- void lock( bool );
- void setMinRectSize( const QSize& minSize );
-
- //! Highlights in point (x,y)
- virtual void detect( int x, int y ) = 0;
- virtual void undetectAll() = 0;
-
- //! Selects highlight objects
- virtual void select( bool append = false ) = 0;
- //! Selects by rect
- virtual void select( const QRect&, bool append = false ) = 0;
- virtual void unselectAll() = 0;
- virtual int numSelected() const = 0;
-
- virtual void setHilightColor( Quantity_NameOfColor ) = 0;
- virtual void setSelectColor( Quantity_NameOfColor ) = 0;
- //!Checks selection state and emits 'selSelectionDone' or 'selSelectionCancel'
- /*!Should be called by after non-interactive selection. */
- virtual void checkSelection( int, bool, int ) = 0;
-
- /*! Sets/returns the key for appending selected objects ( SHIFT by default ) */
- static int appendKey() { return apppendKey; }
- static void setAppendKey( int k ) { apppendKey = k; }
-
-signals:
- void selSelectionCancel();
- void selSelectionDone( bool append, SelectionChangeStatus status );
-
-protected:
-// void setStatus( SelectionChangeStatus theStatus ){ myStatus = theStatus; }
-// SelectionChangeStatus status( return myStatus; }
-
- GLViewer_Viewer* myViewer;
- bool myLocked;
- QSize myMinRectSize;
-
-private:
-// SelectionChangeStatus myStatus;
- static int apppendKey;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Selector2d.cxx
-// Created: November, 2004
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_Selector2d.h"
-#include "GLViewer_Viewer2d.h"
-#include "GLViewer_Context.h"
-#include "GLViewer_ViewPort2d.h"
-
-/*!
- Constructor
-*/
-GLViewer_Selector2d::GLViewer_Selector2d( GLViewer_Viewer2d* v2d, GLViewer_Context* glc ) :
-GLViewer_Selector( v2d ),
-myGLContext( glc )
-{
-// myGLContext->SetHighlightColor( Quantity_NOC_CYAN1 );
-// myGLContext->SetSelectionColor( Quantity_NOC_RED );
-}
-
-/*!
- Destructor
-*/
-GLViewer_Selector2d::~GLViewer_Selector2d()
-{
-}
-
-/*!
- Changes hilight color of context
- \param color - new hilight color
-*/
-void GLViewer_Selector2d::setHilightColor( Quantity_NameOfColor color )
-{
- myGLContext->SetHighlightColor( color );
-}
-
-/*!
- Changes selection color of context
- \param color - new selection color
-*/
-void GLViewer_Selector2d::setSelectColor( Quantity_NameOfColor color )
-{
- myGLContext->SetSelectionColor( color );
-}
-
-/*!
- Detects object at point
- \param x, y - point co-ordinates
-*/
-void GLViewer_Selector2d::detect( int x, int y )
-{
- //cout << "GLViewer_Selector2d : detect ( " << x << " , " << y << " )" << endl;
- if ( myLocked || !myGLContext || !myViewer || !myViewer->getActiveView() ||
- myViewer->getSelectionMode() == GLViewer_Viewer::NoSelection )
- return;
-
- GLViewer_ViewPort* vp = myViewer->getActiveView()->getViewPort();
- if( !vp->inherits( "GLViewer_ViewPort2d" ) )
- return;
-
- myGLContext->MoveTo( x, y );
-}
-
-/*!
- Undetects all objects
-*/
-void GLViewer_Selector2d::undetectAll()
-{
- if ( myLocked || !myGLContext || !myViewer || !myViewer->getActiveView() ||
- myViewer->getSelectionMode() == GLViewer_Viewer::NoSelection )
- return;
-
- GLViewer_ViewPort* vp = myViewer->getActiveView()->getViewPort();
- if( !vp->inherits( "GLViewer_ViewPort2d" ) )
- return;
-
- myGLContext->clearHighlighted( true );
-}
-
-/*!
- Selects previously hilighted objects
- \param append - append objects to selection
-*/
-void GLViewer_Selector2d::select( bool append )
-{
- //cout << "GLViewer_Selector2d : select ( " << (int)append << " )" << endl;
- GLViewer_Viewer::SelectionMode selMode = myViewer->getSelectionMode();
- if ( myLocked || !myGLContext || !myViewer || !myViewer->getActiveView() ||
- selMode == GLViewer_Viewer::NoSelection )
- return;
-
- int selBefore = numSelected();
- if ( selBefore && append && selMode != GLViewer_Viewer::Multiple )
- return;
-
- GLViewer_ViewPort* vp = myViewer->getActiveView()->getViewPort();
- if( !vp->inherits( "GLViewer_ViewPort2d" ) )
- return;
-
- int status = myGLContext->Select( append );
- checkSelection( selBefore, append, status );
-}
-
-/*!
- Selects objects in rectangle
- \param selRect - selection rectangle
- \param append - append objects to selection
-*/
-void GLViewer_Selector2d::select( const QRect& selRect, bool append )
-{
- GLViewer_Viewer::SelectionMode selMode = myViewer->getSelectionMode();
- if ( myLocked || !myGLContext || !myViewer || !myViewer->getActiveView() ||
- selMode == GLViewer_Viewer::NoSelection )
- return;
-
- int selBefore = numSelected();
- if ( selBefore && append && selMode != GLViewer_Viewer::Multiple )
- return;
-
- GLViewer_ViewPort* vp = myViewer->getActiveView()->getViewPort();
- if( !vp->inherits( "GLViewer_ViewPort2d" ) )
- return;
-
- int aStatus = myGLContext->SelectByRect( selRect, append );
- checkSelection( selBefore, append, aStatus );
-}
-
-/*!
- Unselects all objects
-*/
-void GLViewer_Selector2d::unselectAll()
-{
- if ( myLocked || !myViewer )
- return;
-
-// bool updateViewer = true;
- bool hadSelection = ( numSelected() > 0 );
-
-// bool lcOpen = ( myAISContext->IndexOfCurrentLocal() != -1 );
-// lcOpen ? myAISContext->ClearSelected( updateViewer ) :
-// myAISContext->ClearCurrent( updateViewer );
- if ( hadSelection ) emit selSelectionCancel();
-}
-
-/*!
- Checks selection state and emits 'selSelectionDone' or 'selSelectionCancel'
- Should be called by after non-interactive selection.
-*/
-void GLViewer_Selector2d::checkSelection( int selBefore, bool append, int aStatus )
-{
- int selAfter = numSelected();
- if ( selBefore > 0 && selAfter < 1 )
- emit selSelectionCancel();
- else if ( selAfter > 0 )
- {
- switch( aStatus )
- {
- case SS_LocalChanged:
- emit selSelectionDone( selAfter > 1, SCS_Local );
- break;
- case SS_GlobalChanged:
- emit selSelectionDone( selAfter > 1, SCS_Global );
- break;
- }
- }
-}
-
-/*!
- \return number of selected objects
-*/
-int GLViewer_Selector2d::numSelected() const
-{
- return myGLContext->NbSelected();
-}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Selector2d.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_SELECTOR2D_H
-#define GLVIEWER_SELECTOR2D_H
-
-#ifdef WNT
-#include "windows.h"
-#endif
-
-#include "GLViewer_Selector.h"
-
-#include <Quantity_NameOfColor.hxx>
-
-class GLViewer_Viewer2d;
-class GLViewer_Context;
-
-/*!
- \class GLViewer_Selector2d
- 2D select manager for GLViewer
-*/
-class GLVIEWER_API GLViewer_Selector2d : public GLViewer_Selector
-{
- Q_OBJECT
-
-public:
- GLViewer_Selector2d( GLViewer_Viewer2d*, GLViewer_Context* );
- ~GLViewer_Selector2d();
-
-public:
- //! Sets context from Viewer2d
- void setContext( GLViewer_Context* glc ) { myGLContext = glc; }
- GLViewer_Context* getContext() const { return myGLContext; }
-
- // Redefined methods
- virtual void setHilightColor( Quantity_NameOfColor );
- virtual void setSelectColor( Quantity_NameOfColor );
-
- virtual void detect( int, int );
- virtual void undetectAll();
-
- virtual void select( bool append = false );
- virtual void select( const QRect&, bool append = false );
- virtual void unselectAll();
- virtual int numSelected() const;
-
- virtual void checkSelection( int, bool, int );
-
-protected:
- GLViewer_Context* myGLContext;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_Text.h"
-
-/*!
- Constructor
-*/
-GLViewer_Text::GLViewer_Text( const QString& text, float xPos, float yPos, const QColor& color )
-{
- myText = text;
- myXPos = xPos;
- myYPos = yPos;
- myColor = color;
- myQFont = QFont::defaultFont();
- mySeparator = 2;
- myDTF = DTF_BITMAP;
-}
-
-/*!
- Constructor
-*/
-GLViewer_Text::GLViewer_Text( const QString& text, float xPos, float yPos, const QColor& color, QFont theFont, int theSeparator )
-{
- myText = text;
- myXPos = xPos;
- myYPos = yPos;
- myColor = color;
- myQFont = theFont;
- mySeparator = theSeparator;
- myDTF = DTF_BITMAP;
-}
-
-/*!
- Destructor
-*/
-GLViewer_Text::~GLViewer_Text()
-{
-}
-
-/*!
- \return width of text
-*/
-int GLViewer_Text::getWidth()
-{
- int aResult = 0;
- QFontMetrics aFM( myQFont );
- for( uint i = 0; i < myText.length(); i++ )
- aResult += aFM.width( myText.at(i) ) + mySeparator;
- return aResult;
-}
-
-/*!
- \return height of text
-*/
-int GLViewer_Text::getHeight()
-{
- QFontMetrics aFM( myQFont );
- return aFM.height();
-}
-
-/*!
- Codes object as byte copy
- \return byte array
-*/
-QByteArray GLViewer_Text::getByteCopy() const
-{
- int i;
- int aSize = 5*sizeof( int ) + myText.length();
-
- int aR = myColor.red();
- int aG = myColor.green();
- int aB = myColor.blue();
- const char* aStr = myText.data();
-
- int anISize = sizeof( int );
- QByteArray aResult( aSize );
-
- char* aPointer = (char*)&myXPos;
- for( i = 0; i < anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)&myYPos;
- for( ; i < 2*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- aPointer = (char*)&aR;
- for( ; i < 3*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)&aG;
- for( ; i < 4*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
- aPointer = (char*)&aB;
- for( ; i < 5*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- int aTextSize = myText.length();
- aPointer = (char*)&aTextSize;
- for( ; i < 6*anISize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- for( i = 0; i < aTextSize; i++ )
- aResult[6*anISize + i] = aStr[i];
-
- aPointer = (char*)&mySeparator;
- for( ; i < 7*anISize + aTextSize; i++, aPointer++ )
- aResult[i] = *aPointer;
-
- const char* aFontStr = myQFont.toString().data();
- int aFontSize = myQFont.toString().length();
-
- for( i = 0; i < aFontSize; i++ )
- aResult[7*anISize + aTextSize + i] = aFontStr[i];
-
- return aResult;
-}
-
-/*!
- Initialize text from binary representation
- \param theBuf - byte array
-*/
-GLViewer_Text* GLViewer_Text::fromByteCopy( QByteArray theBuf )
-{
- int i = 0;
- int aSize = (int)theBuf.size();
- int aR = 0, aG = 0, aB = 0;
-
- int xPos = 0, yPos = 0;
-
- int anISize = sizeof( int );
- char* aPointer = (char*)&xPos;
- for ( i = 0; i < anISize; i++, aPointer++ )
- *aPointer = theBuf[i];
-
- aPointer = (char*)&yPos;
- for ( ; i < 2*anISize; i++, aPointer++ )
- *aPointer = theBuf[i];
-
- aPointer = (char*)&aR;
- for( ; i < 3*anISize; i++, aPointer++ )
- *aPointer = theBuf[i];
- aPointer = (char*)&aG;
- for( ; i < 4*anISize; i++, aPointer++ )
- *aPointer = theBuf[i];
- aPointer = (char*)&aB;
- for( ; i < 5*anISize; i++, aPointer++ )
- *aPointer = theBuf[i];
-
- int aTextSize = 0;
- aPointer = (char*)&aTextSize;
- for( ; i < 6*anISize; i++, aPointer++ )
- *aPointer = theBuf[i];
-
- QString aText;
- for( ; i < 6*anISize + aTextSize; i++ )
- {
- QChar aChar( theBuf[i] );
- aText += aChar;
- }
-
- int aSeparator = 0;
- aPointer = (char*)&aSeparator;
- for( ; i < 7*anISize + aTextSize; i++, aPointer++ )
- *aPointer = theBuf[i];
-
- QString aFontStr;
- for( ; i < aSize; i++ )
- {
- QChar aChar( theBuf[i] );
- aFontStr += aChar;
- }
- QFont aFont;
-
- if( !aFont.fromString( aFontStr ) )
- return NULL;
-
- GLViewer_Text* aGlText = new GLViewer_Text( aText, xPos, yPos, QColor( aR,aG,aB ), aFont, aSeparator );
-
- return aGlText;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Text.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_TEXT_H
-#define GLVIEWER_TEXT_H
-
-#ifdef WNT
-#include <windows.h>
-#endif
-
-#include "GLViewer.h"
-#include "GLViewer_Defs.h"
-
-#include <GL/gl.h>
-
-#include <qfont.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qfontmetrics.h>
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- \class GLViewer_Text
- Substitution of Prs3d_Text for OpenGL
-*/
-class GLVIEWER_API GLViewer_Text
-{
-public:
- GLViewer_Text( const QString&, float xPos = 0.0, float yPos = 0.0, const QColor& color = QColor( 0, 255, 0 ) );
- GLViewer_Text( const QString&, float xPos, float yPos, const QColor& , QFont theFont, int theSeparator);
- ~GLViewer_Text();
-
- //! Sets text
- void setText( const QString& text ) { myText = text; }
- //! Returns text
- QString getText() const { return myText; }
-
- //! Sets text position
- void setPosition( float xPos, float yPos ) { myXPos = xPos; myYPos = yPos; }
- //! Returns text position
- void getPosition( float& xPos, float& yPos ) { xPos = myXPos; yPos = myYPos; }
-
- //! Sets text color
- void setColor( const QColor& color ) { myColor = color; }
- //! Returns text color
- QColor getColor() const { return myColor; }
-
- //! Sets text font
- void setFont( const QFont theQFont) { myQFont = theQFont; }
- //! Returns text font
- QFont getFont() const { return myQFont; }
-
- //! Returns text separator
- int getSeparator(){ return mySeparator; }
- //! Sets text separator
- void setSeparator( int theSep ){ mySeparator = theSep; }
-
- //! Returns text width
- int getWidth();
- //! Returns text height
- int getHeight();
-
- //! A function for coding object to the byte copy
- /*! A function is used for copy-past technollogy in copy method */
- QByteArray getByteCopy() const;
-
- //! A function for decoding object from the byte copy
- /*! A function is used for copy-past technollogy in past method */
- static GLViewer_Text* fromByteCopy( QByteArray );
-
- //! Sets text format BITMAP or TEXTURE
- DisplayTextFormat getDisplayTextFormat() const { return myDTF; }
- //! Returns text format BITMAP or TEXTURE
- void setTextDisplayFormat( DisplayTextFormat theDTF ) { myDTF = theDTF; }
-
-protected:
- QString myText;
- float myXPos;
- float myYPos;
- QColor myColor;
- QFont myQFont;
- int mySeparator;
- DisplayTextFormat myDTF;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_ToolTip.xx
-// Created: March, 2005
-
-//#include "GLViewerAfx.h"
-#include "GLViewer_Context.h"
-#include "GLViewer_ToolTip.h"
-#include "GLViewer_Viewer2d.h"
-#include "GLViewer_ViewPort2d.h"
-
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qbitmap.h>
-#include <qapplication.h>
-#include <qtooltip.h>
-
-/*!
- constructor
-*/
-GLViewer_ObjectTip::GLViewer_ObjectTip( GLViewer_ViewPort2d* theParent )
-:QObject(),
- myText(),
- myPoint( -1, -1 )
-{
- mypViewPort = theParent;
- //mypLabel = NULL;
- mypLabel = new QLabel( "Test", NULL, "ObjectTipText",
- WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM );
- mypLabel->setMargin( 1 );
- mypLabel->setAutoMask( FALSE );
- mypLabel->setFrameStyle( QFrame::Plain | QFrame::Box );
- mypLabel->setLineWidth( 1 );
- mypLabel->setAlignment( AlignAuto | AlignTop );
- mypLabel->setIndent( 0 );
- mypLabel->polish();
-
- //mypLabel->setPalette( QToolTip::palette() );
-
- mypTimer = new QTimer( this );
-
- connect( mypTimer, SIGNAL( timeout() ), this, SLOT( showTip() ) );
-}
-
-/*!
- destructor
-*/
-GLViewer_ObjectTip::~GLViewer_ObjectTip()
-{
-// delete mypRect;
- if( mypLabel )
- delete mypLabel;
-
- //if( mypPoint )
- // delete mypPoint;
-
- //if( mypTimer )
- // delete mypTimer;
-}
-
-
-/*!
- It is called when there is a possibility that a tool tip should be shown
- \param p - position of tooltip
-*/
-bool GLViewer_ObjectTip::maybeTip( const QPoint &p )
-{
-
-
- GLViewer_Context* aContext = ((GLViewer_Viewer2d*)mypViewPort->getViewFrame()->getViewer())->getGLContext();
-
- /*if( !aContext->currentObjectIsChanged() )
- return false;
- else
- return true;
- if( myPoint.x() == -1 && myPoint.y() == -1 || aContext->currentObjectIsChanged())
- {
- myPoint = p;
- }
- else/if( abs(myPoint.y() - p.y()) < 16 )
- {
- return;
- }
- else // > 16
- {
- myPoint = p;
- }
-*/
- GLViewer_Object* anObj = aContext->getCurrentObject();
- if( anObj )
- {
- setText( anObj->getName() );
- return true;
- }
-
- return false;
- /*if( anObj )
- {
- //GLViewer_Rect* aRect = anObj->getRect();
- //QRect aWinRect = mypViewPort->GLV2win( *aRect );
- tip( QRect( p.x(), p.y(), 1, 1 ), anObj->getName() );
- //QFontMetrics aFM( font() );
- //showTip( aWinRect, anObj->getName(), QRect( 0, 0, aFM.width( anObj->getName() + " " ), aFM.height()*1.5 ) );
- //tip( aWinRect, anObj->getName(), aWinRect( aFM.width( anObj->getName() + " " ), aFM.height()*1.5 ) );
- }
-// else
-// clear();
-
- //tip( QRect( 0, 0, mypViewPort->getGLWidget()->width(),mypViewPort->getGLWidget()->height() ) , "test Tool tip" );
- */
-}
-
-/*!
- Custom event filter
-*/
-bool GLViewer_ObjectTip::eventFilter( QObject* theObj, QEvent* e )
-{
- hideTipAndSleep();
- switch( e->type() )
- {
- /*case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- // input - turn off tool tip mode
- hideTipAndSleep();
- break;*/
- case QEvent::MouseMove:
- {
- //hideTipAndSleep();
- /*if( mypTimer->isActive() )
- {
- mypTimer->Stop();
- wakeUp();
- }*/
- QWidget* aWidget = (QWidget*) theObj;
- if( aWidget == mypViewPort->getGLWidget() )
- {
- wakeup();
- QMouseEvent* m = (QMouseEvent *)e;
- //if( !mypPoint )
- // mypPoint = new QPoint();
-
- myPoint.setX( m->x() );
- myPoint.setY( m->y() );
- }
- }
- }
- return false;
-}
-
-/*!
- Hides tooltip and stops timer
-*/
-void GLViewer_ObjectTip::hideTipAndSleep()
-{
- //if( mypPoint )
- // delete mypPoint;
- myPoint.setX(-1);
- myPoint.setY(-1);
-
- if( mypLabel )
- {
- mypLabel->hide();
- //delete mypLabel;
- }
- mypTimer->stop();
-}
-
-/*!
- Shows tooltip
-*/
-void GLViewer_ObjectTip::showTip()
-{
- if( maybeTip( myPoint ) )
- {
-
- mypLabel->setText( myText );
- mypLabel->adjustSize( );
-
- QPoint pos = mypViewPort->getGLWidget()->mapToGlobal( myPoint );
-
- //mypLabel->show();
- int cur_height = 24;
- QCursor* aCursor = QApplication::overrideCursor();
- if( aCursor )
- {
- const QBitmap* aBitmap = aCursor->bitmap();
- if( aBitmap )
- cur_height = aBitmap->height();
- }
- mypLabel->setGeometry( pos.x(), pos.y() + cur_height, mypLabel->width(), mypLabel->height() );
- mypLabel->setPalette( QToolTip::palette() );
-
- mypLabel->show();
-
- }
-}
-
-/*!
- Restarts timer
-*/
-void GLViewer_ObjectTip::wakeup( int theTime )
-{
- if( mypTimer->isActive() )
- mypTimer->stop();
- mypTimer->start( theTime );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_ToolTip.h
-// Created: March, 2005
-
-#ifndef GLVIEWER_TOOLTIP_H
-#define GLVIEWER_TOOLTIP_H
-
-#include "GLViewer.h"
-
-//#include <qtooltip.h>
-//#include <QtxToolTip.h>
-#include <qobject.h>
-
-#define TIP_TIME 1000
-
-class GLViewer_ViewPort2d;
-class QLabel;
-/*!
- \class GLViewer_ObjectTip
- ToolTip of GLViewer_Objects
-*/
-class GLVIEWER_API GLViewer_ObjectTip: public QObject//QToolTip//QtxToolTip
-{
- Q_OBJECT
-public:
- GLViewer_ObjectTip( GLViewer_ViewPort2d* );
- ~GLViewer_ObjectTip();
-
-//protected:
-// virtual void maybeTip( const QPoint& p );
- virtual bool eventFilter( QObject*, QEvent* );
-
- virtual bool maybeTip( const QPoint&);
-
- void setText( const QString& theText ){ myText = theText; }
- QString getText() const { return myText; }
-
-protected:
- void timeIsOut();
-
-private:
-
- void hideTipAndSleep();
- void wakeup( int mseconds = TIP_TIME );
-
-private slots:
- void showTip();
-
-private:
- GLViewer_ViewPort2d* mypViewPort;
-
- QTimer* mypTimer;
- QPoint myPoint;
- QLabel* mypLabel;
-
- QString myText;
-};
-
-#endif //GLVIEWER_TOOLTIP_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Tools.cxx
-// Created: April, 2005
-
-#include "GLViewer_Tools.h"
-
-#include <GL/gl.h>
-
-#include <iostream>
-
-/*!
- Constructor
- \param size - size of internal array
-*/
-GLViewer_LineList::GLViewer_LineList( int size )
-{
- myRealSize = 2*size;
- mySegmentNumber = 0;
- myMainCoord = 0.0;
-
- myArray = new double[myRealSize];
-
- if( !myArray )
- {
- std::cout << "Can't allocate memory: " << size << std::endl;
- myRealSize = 0;
- }
- else
- memset( myArray, 0, myRealSize*sizeof(double) );
-}
-
-/*!
- Destructor
-*/
-GLViewer_LineList::~GLViewer_LineList()
-{
- delete myArray;
-}
-
-/*!
- Adds new line segment to list
- \param coord1, coord2 - co-ordinates of points
-*/
-bool GLViewer_LineList::addSegment( double coord1, double coord2 )
-{
- if( coord1 > coord2 )
- {
- double temp = coord1;
- coord1 = coord2;
- coord2 = temp;
- }
-
- if( 2*mySegmentNumber == myRealSize || !myArray )
- return false;
-
- int index = 0;
- double c1, c2;
- while( index < mySegmentNumber)
- {
- readSegment( index, c1, c2 );
- if( coord1 < c1 && coord2 < c1 )
- {
- for( int i = mySegmentNumber; i > index - 1; i--)
- {
- myArray[2*i] = myArray[2*i-2]; //2*(i-1)
- myArray[2*i+1] = myArray[2*i-1];//2*(i-1)+1
- }
- myArray[0] = coord1;
- myArray[1] = coord2;
- // mySegmentNumber; what is means ?
- return true;
- }
- else if( coord1 < c1 && coord2 < c2 )
- {
- myArray[index*2] = coord1;
- return true;
- }
- else if( c1 < coord1 && coord2 < c2 )
- {
- return true;
- }
- else if( coord1 < c2 && c2 < coord2 )
- {
- if( c1 > coord1 )
- myArray[2*index] = coord1;
-
- if( index != mySegmentNumber - 1 )
- {
- for( int i = index+1; i < mySegmentNumber; i++ )
- {
- if( coord2 < myArray[2*i] )
- {
- myArray[2*index+1] = coord2;
- if( index+1 != i )
- {
- for( int j = 0; i+j < mySegmentNumber;j++ )
- {
- myArray[2*(index+1+j)] = myArray[2*(i+j)];
- myArray[2*(index+1+j)+1] = myArray[2*(i+j)+1];
- }
- for( int k = 0; k < mySegmentNumber - i; k++ )
- {
- myArray[2*(mySegmentNumber - 1- k)] = 0.0;
- myArray[2*(mySegmentNumber - 1- k)+1] = 0.0;
- }
- mySegmentNumber -= i - index-1;
- }
- return true;
- }
- else if( coord2 < myArray[2*i+1] )
- {
- myArray[2*index+1] = myArray[2*i+1];
-
- for( int j = index+1; j < mySegmentNumber-1;j++ )
- {
- myArray[2*j] = myArray[2*(i+j-index)];
- myArray[2*j+1] = myArray[2*(i+j-index)+1];
- }
- for( int k = 0; k < mySegmentNumber - i-1; k++ )
- {
- myArray[2*(mySegmentNumber - 1- k)] = 0.0;
- myArray[2*(mySegmentNumber - 1- k)+1] = 0.0;
- }
- mySegmentNumber -= i - index;
- return true;
- }
- }
- }
- else
- {
- myArray[2*index+1] = coord2;
- return true;
- }
- }
- index++;
- }
-
- myArray[mySegmentNumber*2] = coord1;
- myArray[mySegmentNumber*2+1] = coord2;
- mySegmentNumber++;
-
- return true;
-}
-
-/*!
- Gets info about segment
- \param theIndex - index of segment
- \param coord1, coord2 - co-ordinates of points
-*/
-bool GLViewer_LineList::readSegment( int theIndex, double& coord1, double& coord2 )
-{
- if( theIndex > mySegmentNumber || !myArray)
- return false;
-
- coord1 = myArray[theIndex*2];
- coord2 = myArray[theIndex*2+1];
-
- return true;
-}
-
-/*!
- \return true if line list covers point
- \param thePoint - point co-ordinate
-*/
-int GLViewer_LineList::contains( double thePoint ) const
-{
- if( !myArray || mySegmentNumber == 0 )
- return -1;
-
- for( int i = 0; i < mySegmentNumber; i++ )
- if( myArray[2*i] <= thePoint && thePoint <= myArray[2*i+1] )
- return i;
-
- return -1;
-
-}
-
-/*!
- Removes segment
- \param theIndex - segment index
-*/
-bool GLViewer_LineList::removeSegment( int theIndex )
-{
- if( theIndex > mySegmentNumber || !myArray)
- return false;
-
- for( int i = theIndex; i < mySegmentNumber; i++ )
- {
- myArray[i*2] = myArray[(i+1)*2];
- myArray[i*2+1] = myArray[(i+1)*2+1];
- }
- mySegmentNumber--;
- myArray[mySegmentNumber*2] = 0.0;
- myArray[mySegmentNumber*2+1] = 0.0;
- return true;
-}
-
-/*!
- Removes segment from line list
- \param coord1, coord2 - co-ordinates of points
-*/
-bool GLViewer_LineList::removeSegment( double coord1, double coord2 )
-{
- if( coord1 > coord2 )
- {
- double temp = coord1;
- coord1 = coord2;
- coord2 = temp;
- }
-
- if( 2*mySegmentNumber == myRealSize || !myArray )
- return false;
-
- int index = 0;
- double c1, c2;
- while( index < mySegmentNumber)
- {
- readSegment( index, c1, c2 );
- if( coord1 < c1 && coord2 < c1 )
- {
- //nothing
- return true;
- }
- else if( coord1 < c1 && coord2 < c2 )
- {
- myArray[index*2] = coord2;
- return true;
- }
- else if( c1 < coord1 && coord2 < c2 )
- {
- if( 2*mySegmentNumber == myRealSize )
- return false;
- for( int i = mySegmentNumber; i > index + 1; i-- )
- {
- myArray[2*i] = myArray[2*(i-1)];
- myArray[2*i+1] = myArray[2*(i-1)+1];
- }
- myArray[2*(index+1)+1] = myArray[2*index+1];
- myArray[2*(index+1)] = coord2;
- myArray[2*index+1] = coord1;
- mySegmentNumber++;
- return true;
- }
- else if( coord1 < c2 && c2 < coord2 )
- {
- if( c1 < coord1 )
- {
- myArray[2*index+1] = coord1;
- }
-
- if( index != mySegmentNumber - 1 )
- {
- for( int i = index+1; i < mySegmentNumber; i++ )
- {
- if( coord2 < myArray[2*i] )
- {
- if( index+1 != i )
- {
- for( int j = 1; i+j-1 < mySegmentNumber;j++ )
- {
- myArray[2*(index+j)] = myArray[2*(i+j-1)];
- myArray[2*(index+j)+1] = myArray[2*(i+j-1)+1];
- }
- for( int k = 0; k < mySegmentNumber - i; k++ )
- {
- myArray[2*(mySegmentNumber - 1- k)] = 0.0;
- myArray[2*(mySegmentNumber - 1- k)+1] = 0.0;
- }
- mySegmentNumber -= i - index -1;
- }
- else
- {
- if( !(c1 < coord1) )
- {
- for( int j = 0; index + j + 1 < mySegmentNumber;j++ )
- {
- myArray[2*(index+j)] = myArray[2*(index+j+1)];
- myArray[2*(index+j)+1] = myArray[2*(index+j+1)+1];
- }
-
- myArray[2*(mySegmentNumber - 1)] = 0.0;
- myArray[2*(mySegmentNumber - 1)+1] = 0.0;
-
- mySegmentNumber --;
- }
-
- }
-
- return true;
-
- }
- else if( coord2 < myArray[2*i+1] )
- {
- if( index+1 != i )
- {
- if( c1 < coord1 )
- index++;
-
- myArray[2*index] = coord2;
- myArray[2*index+1] = myArray[2*i+1];
-
- for( int j = 1; i+j < mySegmentNumber;j++ )
- {
- myArray[2*(index+j)] = myArray[2*(i+j)];
- myArray[2*(index+j)+1] = myArray[2*(i+j)+1];
- }
- for( int k = 0; k < mySegmentNumber - i - 1; k++ )
- {
- myArray[2*(mySegmentNumber - 1- k)] = 0.0;
- myArray[2*(mySegmentNumber - 1- k)+1] = 0.0;
- }
- mySegmentNumber -= i - index;
- }
- else
- {
- if( c1 < coord1 )
- {
- myArray[2*(index+1)] = coord2;
- return true;
- }
- else
- {
- myArray[2*(index)] = coord2;
- myArray[2*(index)+1] = myArray[2*(index+1)+1];
- for( int j = index+1; j < mySegmentNumber-1; j++ )
- {
- myArray[2*j] = myArray[2*(j+1)];
- myArray[2*j+1] = myArray[2*(j+1)+1];
- }
- mySegmentNumber--;
- myArray[2*mySegmentNumber] = 0.0;
- myArray[2*mySegmentNumber+1] = 0.0;
- }
- }
- return true;
- }
- }
- }
- else
- {
- if( !(c1 < coord1) )
- {
- mySegmentNumber--;
- myArray[2*index] = 0.0;
- myArray[2*index+1] = 0.0;
- }
- }
- }
- index++;
- }
- return true;
-}
-
-/*!
- Clears line list
-*/
-void GLViewer_LineList::clear()
-{
- if( myArray )
- memset( myArray, 0, myRealSize*sizeof(double) );
-}
-
-/*!
- Prints debug info about line list
-*/
-void GLViewer_LineList::print()
-{
- std::cout << "MainCoord: " << myMainCoord <<" SIZE: " << myRealSize << " ENum: " << mySegmentNumber << " :::";
- for( int i = 0; i < mySegmentNumber; i++ )
- std::cout << " " << myArray[2*i] << " " << myArray[2*i+1] << " | ";
-
- std::cout << std::endl;
-}
-
-/*!
- Draws line list with help of OpenGL
- \param theDim - dimension
-*/
-void GLViewer_LineList::show( FieldDim theDim )
-{
- if( !myArray )
- return;
-
- glColor3f( 1.0, 0.0, 1.0 );
- if( theDim == FD_X )
- {
- glBegin( GL_LINES );
- for( int i = 0; i < mySegmentNumber; i++ )
- {
- glVertex2d( myArray[2*i], myMainCoord );
- glVertex2d( myArray[2*i+1], myMainCoord );
- }
- glEnd();
- }
- else if( theDim == FD_Y )
- {
- glBegin( GL_LINES );
- for( int i = 0; i < mySegmentNumber; i++ )
- {
- glVertex2d( myMainCoord, myArray[2*i] );
- glVertex2d( myMainCoord, myArray[2*i+1] );
- }
- glEnd();
- }
-}
-
-
-/*!
- Constructor
-*/
-GLViewer_LineField::GLViewer_LineField()
-{
- myCurArrayIndex = 0;
- myGraphArray1 = NULL;
- myGraphArray2 = NULL;
-
- myCurCount = 0;
-
- myXSize = 0;
- myYSize = 0;
- myXLineArray = NULL;
- myYLineArray = NULL;
-}
-
-/*!
- Constructor
-*/
-GLViewer_LineField::GLViewer_LineField( const int theMAXSize, const int theXN, const int theYN )
-{
- myCurArrayIndex = 0;
- myGraphArray1 = NULL;
- myGraphArray2 = NULL;
-
- myCurCount = 0;
-
- if( theXN <= 0 || theYN <= 0 )
- {
- myXSize = 0;
- myYSize = 0;
- myXLineArray = NULL;
- myYLineArray = NULL;
- }
- else
- {
- myXLineArray = new GLViewer_LineList*[theXN];
- myYLineArray = new GLViewer_LineList*[theYN];
-
- for( int i = 0; i < theXN; i++ )
- myXLineArray[i] = new GLViewer_LineList( theMAXSize );
-
- for( int j = 0; j < theYN; j++ )
- myYLineArray[j] = new GLViewer_LineList( theMAXSize );
-
- myXSize = theXN;
- myYSize = theYN;
- }
-}
-
-/*!
- Destructor
-*/
-GLViewer_LineField::~GLViewer_LineField()
-{
- if( myXLineArray )
- {
- for( int i = 0; i < myXSize; i++ )
- delete myXLineArray[i];
-
- delete myXLineArray;
- }
-
- if( myYLineArray )
- {
- for( int j = 0; j < myYSize; j++ )
- delete myYLineArray[j];
-
- delete myYLineArray;
- }
-
- if( myGraphArray1 )
- delete myGraphArray1;
-
- if( myGraphArray2 )
- delete myGraphArray2;
-}
-
-/*!
- Adds line
-*/
-void GLViewer_LineField::addLine( FieldDim theDim, GLViewer_LineList* )
-{
- //not implemented
-}
-
-/*!
- Adds line
- \param theDim - dimension
- \param theMC - main co-ordinate
- \param theBegin - start co-ordinate
- \param theEnd - end co-ordinate
-*/
-void GLViewer_LineField:: addLine( FieldDim theDim, double theMC, double theBegin, double theEnd )
-{
- GLViewer_LineList* aLL = new GLViewer_LineList( 1 );
- aLL->addSegment( theBegin, theEnd );
- aLL->setMainCoord( theMC );
- addLine( theDim, aLL );
-}
-
-/*!
- Adds line
- \param theDim - dimension
- \param theLL - main co-ordinate
- \param thePosition - index in list
-*/
-int GLViewer_LineField::insertLine( FieldDim theDim, GLViewer_LineList* theLL, int thePosition )
-{
- if( !myXLineArray || !myYLineArray )
- return -1;
-
- GLViewer_LineList** anArray = getLLArray( theDim );
- if( !anArray )
- return -1;
-
- int size = getDimSize( theDim );
-
- if( thePosition >= size )
- return -1;
- else if( thePosition < 0 )
- {
- if( anArray[size-1]->count() != 0 ) // no more space
- return -1;
-
- for( int i = 0; i < size; i++ )
- {
- if( anArray[i]->count() == 0 )
- {
- delete anArray[i];
- anArray[i] = theLL;
- return i;
- }
-
- double cur_mc = anArray[i]->mainCoord();
- if( theLL->mainCoord() < cur_mc )
- {
- for( int j = 0; j+i+1 < size; j++ )
- {
- delete anArray[size-j-1];
- anArray[size-j-1] = anArray[size-j-2];
- }
- delete anArray[i];
- anArray[i] = theLL;
- return i;
- }
- }
- }
- else
- {
- delete anArray[thePosition];
- anArray[thePosition] = theLL;
- return thePosition;
- }
-
- return -1;
-}
-
-/*!
- Adds line
- \param theDim - dimension
- \param theMainCoord - main co-ordinate
- \param theBegin - start co-ordinate
- \param theEnd - end co-ordinate
- \param thePosition - index in list
-*/
-int GLViewer_LineField::insertLine( FieldDim theDim, double theMainCoord, double theBegin, double theEnd, int thePosition )
-{
- GLViewer_LineList* aLL = new GLViewer_LineList( 1 );
- aLL->addSegment( theBegin, theEnd );
- aLL->setMainCoord( theMainCoord );
- return insertLine( theDim, aLL, thePosition );
-}
-
-/*!
- \return other dimension
-*/
-FieldDim GLViewer_LineField::invertDim( FieldDim theFD )
-{
- if( theFD == FD_X )
- return FD_Y;
- else
- return FD_X;
-}
-
-/*!
- \return line list
- \param theIndex - index in list
- \param tehFD - dimension
-*/
-GLViewer_LineList* GLViewer_LineField::getLine( int theIndex, FieldDim theFD )
-{
- if( !myXLineArray || !myYLineArray )
- return NULL;
-
- if( theFD == FD_X )
- {
- if( theIndex > myXSize )
- return NULL;
-
- return myXLineArray[theIndex];
- }
- else if( theFD == FD_Y )
- {
- if( theIndex > myYSize )
- return NULL;
-
- return myYLineArray[theIndex];
- }
-
- return NULL;
-}
-
-/*!
- Sets borders of field
- \param X1, X2 - minimal and maximal abscisses
- \param Y1, Y2 - minimal and maximal ordinates
-*/
-void GLViewer_LineField::setBorders( double X1, double X2, double Y1, double Y2 )
-{
- if( !myXLineArray || !myYLineArray )
- return;
-
- for( int i = 0; i < myXSize; i++ )
- {
- myXLineArray[i]->clear();
- myXLineArray[i]->addSegment( X1, X2 );
- myXLineArray[i]->setMainCoord( Y1 + (Y2-Y1)*(double(i)/(myXSize-1)) );
- }
-
- for( int j = 0; j < myYSize; j++ )
- {
- myYLineArray[j]->clear();
- myYLineArray[j]->addSegment( Y1, Y2 );
- myYLineArray[j]->setMainCoord( X1 + (X2-X1)*(double(j)/(myYSize-1)) );
- }
-}
-
-/*!
- Adds rectangle
- \param top, right - a corner of rectangle
- \param bottom, left - other corner of rectangle
-*/
-void GLViewer_LineField::addRectangle( double top, double right, double bottom, double left )
-{
- if( !myXLineArray || !myYLineArray )
- return;
- for( int i = 0; i < myXSize; i++ )
- {
- double mainCoord = myXLineArray[i]->mainCoord();
- if( mainCoord < top && mainCoord > bottom )
- myXLineArray[i]->removeSegment( left, right );
- }
-
- for( int j = 0; j < myYSize; j++ )
- {
- double mainCoord = myYLineArray[j]->mainCoord();
- if( mainCoord < right && mainCoord > left )
- myYLineArray[j]->removeSegment( bottom, top );
- }
-}
-
-/*!
- Prints debug info about line field
-*/
-void GLViewer_LineField::print()
-{
- std::cout << "My X matrix Number: " << myXSize << std::endl;
- for( int i = 0; i < myXSize; i++ )
- myXLineArray[i]->print();
-
- std::cout << "My Y matrix Number: " << myYSize << std::endl;
- for( int j = 0; j < myYSize; j++ )
- myYLineArray[j]->print();
-}
-
-/*!
- Draws field with help of OpenGL
-*/
-void GLViewer_LineField::show()
-{
- for( int i = 0; i < myXSize; i++ )
- getLine( i, FD_X )->show( FD_X );
-
- for( int j = 0; j < myYSize; j++ )
- getLine( j, FD_Y )->show( FD_Y );
- int count = 0;
- double* anArray = solution( count );
- glColor3f( 1.0, 0.0, 0.0 );
- glBegin( GL_LINES );
- for( int k = 0; k < count; k++ )
- {
- glVertex2d( anArray[4*k], anArray[4*k+1] );
- glVertex2d( anArray[4*k+2], anArray[4*k+3] );
- }
- glEnd();
- delete[] anArray;
- std::cout << "Show function" << std::endl;
-}
-
-/*!
- \return size
- \param theDim - dimension
-*/
-int GLViewer_LineField::getDimSize( FieldDim theDim )
-{
- if( theDim == FD_X )
- return myXSize;
- else if( theDim == FD_Y )
- return myYSize;
-
- return -1;
-}
-
-/*!
- \return array of intersected indexes
- \param theDim - dimension
- \param theIndex - index
- \param theLL - line with that intersection is checked
- \param theSize - to return value of array size
-*/
-int* GLViewer_LineField::intersectIndexes( FieldDim theDim, int theIndex, const GLViewer_LineList* theLL, int& theSize )
-{
- theSize = 0;
- if( !myXLineArray || !myYLineArray )
- return NULL;
-
- int aDimSize = getDimSize( theDim );
- int* anArray = new int[aDimSize*2 ];
-
- for( int i = 0; i < aDimSize; i++ )
- {
- GLViewer_LineList* aLL = getLine( i, theDim );
- int index = aLL->contains( theLL->mainCoord() );
- if( index != -1 && theLL->contains( aLL->mainCoord() ) == theIndex )
- {
- anArray[theSize*2] = i;
- anArray[theSize*2+1] = index;
- theSize++;
- }
- }
-
- return anArray;
-}
-
-/*!
- Sets start/end search point
- \param thePoint - type of point (start: FP_Start; end: FP_End )
- \param theX, theY - point co-ordinates
-*/
-bool GLViewer_LineField::setPoint( FieldPoint thePoint, double theX, double theY )
-{
- if( !myXLineArray || !myYLineArray )
- return false;
-
- int i = -1, j = -1;
- int xSeg = -1, ySeg = -1;
- for( i = 0; i < myXSize; i++ )
- {
- GLViewer_LineList* aLL = getLine( i, FD_X );
- if( aLL->mainCoord() == theY )
- {
- xSeg = aLL->contains( theX );
- break;
- }
- }
-
- for( j = 0; j < myYSize; j++ )
- {
- GLViewer_LineList* aLL = getLine( j, FD_Y );
- if( aLL->mainCoord() == theX )
- {
- ySeg = aLL->contains( theY );
- break;
- }
- }
-
- if( xSeg != -1 && ySeg != -1 )
- {
- if( thePoint == FP_Start )
- {
- myStartPoint.myXLineIndex = i;
- myStartPoint.myXSegmentIndex = xSeg;
- myStartPoint.myYLineIndex = j;
- myStartPoint.myYSegmentIndex = ySeg;
- myStartPoint.mySolveIndex = -1;
- }
- else
- {
- myEndPoint.myXLineIndex = i;
- myEndPoint.myXSegmentIndex = xSeg;
- myEndPoint.myYLineIndex = j;
- myEndPoint.myYSegmentIndex = ySeg;
- myEndPoint.mySolveIndex = -1;
- }
- return true;
- }
- else
- return false;
-}
-
-/*!
- \return number of segments
-*/
-int GLViewer_LineField::segmentNumber()
-{
- if( !(myXLineArray || myYLineArray) )
- return -1;
-
- int aNumber = 0;
- for( int aDim = 0; aDim < 2; aDim++ )
- for( int i = 0, n = getDimSize( (FieldDim)aDim ); i < n; i++ )
- aNumber += getLine( i, (FieldDim)aDim )->count();
-
- return aNumber;
-}
-
-/*!
- Removes all multiple segments
-*/
-void GLViewer_LineField::optimize()
-{
- if( !myXLineArray || !myYLineArray )
- return;
-
- for( int aDim = 0; aDim < 2; aDim++ )
- {
- for( int i = 0, n = getDimSize( (FieldDim)aDim ); i < n; i++ )
- {
- GLViewer_LineList* aLL = getLine( i, (FieldDim)aDim );
- for( int k =0, aSegNum = aLL->count(); k < aSegNum; k++ )
- {
- // int index = i; unused
- double a1, a2;
- aLL->readSegment( k, a1, a2 );
- for( int l = i+1, m = getDimSize( (FieldDim)aDim ); l < m; l++ )
- {
- int end = -1;
- GLViewer_LineList* aCurLL = getLine( l, (FieldDim)aDim );
- for( int j = 0, count = aCurLL->count(); j < count; j++ )
- {
- double c1, c2;
- aCurLL->readSegment( j, c1, c2 );
- if( a1 == c1 && a2 == c2 )
- {
- if( !(aDim == 0 && myStartPoint.myXLineIndex == l && myStartPoint.myXSegmentIndex == j) &&
- !(aDim == 0 && myEndPoint.myXLineIndex == l && myEndPoint.myXSegmentIndex == j) &&
- !(aDim == 1 && myStartPoint.myYLineIndex == l && myStartPoint.myYSegmentIndex == j) &&
- !(aDim == 1 && myEndPoint.myYLineIndex == l && myEndPoint.myYSegmentIndex == j) )
- aCurLL->removeSegment( j );
- end = 0;
- break;
- }
- if( a1 < c1 )
- {
- end = 1;
- break;
- }
- }
- if( end == -1 || end == 1)
- break;
- }
- }
- }
- }
-}
-
-/*!
- Some prepare actions
- Needs call setPoint before
-*/
-void GLViewer_LineField::initialize()
-{
- if( !myXLineArray || !myYLineArray )
- return;
-
- int size = segmentNumber();
-
- myCurArrayIndex = 0;
- myCurCount = 0;
-
- myGraphArray1 = new GraphNode[size];
- myGraphArray2 = new GraphNode[size];
-
- int index = 0;
- bool isXSet = false,
- isYSet = false;
- for( int aDim = 0; aDim < 2; aDim++ )
- {
- for( int i = 0, n = getDimSize( (FieldDim)aDim ); i < n; i++ )
- {
- GLViewer_LineList* aLL = getLine( i, (FieldDim)aDim );
- for( int k =0, aSegNum = aLL->count(); k < aSegNum; k++ )
- {
- myGraphArray1[index].myCount = size;
- myGraphArray1[index].myDim = (FieldDim)aDim;
- myGraphArray1[index].myLineIndex = i;
- myGraphArray1[index].mySegmentindex = k;
- myGraphArray1[index].prevNodeIndex = -1;
-
- myGraphArray2[index].myCount = size;
- myGraphArray2[index].myDim = (FieldDim)aDim;
- myGraphArray2[index].myLineIndex = i;
- myGraphArray2[index].mySegmentindex = k;
- myGraphArray2[index].prevNodeIndex = -1;
-
- if( !isXSet && aDim == FD_X && myStartPoint.myXLineIndex == i && myStartPoint.myXSegmentIndex == k )
- {
- myGraphArray1[index].myCount = 0;
- isXSet = true;
- }
-
- if( aDim == FD_Y && !isYSet && myStartPoint.myYLineIndex == i && myStartPoint.myYSegmentIndex == k )
- {
- myGraphArray1[index].myCount = 0;
- isYSet = true;
- }
-
- index++;
- }
- }
- }
-}
-
-/*!
- One iteration of algorithm
-*/
-void GLViewer_LineField::iteration()
-{
- int aParam = myCurCount;
- myCurCount++;
-
- int* aNodes = findByCount( aParam );
- GraphNode* aCurArray = getCurArray();
-
- for( int i = 0; i < aParam; i++ )
- {
- GraphNode aCurNode = aCurArray[aNodes[i]];
- int aSize = 0;
- int* aInterNodes = intersectIndexes( invertDim( aCurNode.myDim ), aCurNode.mySegmentindex,
- getLine( aCurNode.myLineIndex, aCurNode.myDim ), aSize );
- for( int j = 0; j < aSize; j++ )
- {
- int index = findBySegment( invertDim( aCurNode.myDim ), aInterNodes[2*j], aInterNodes[2*j+1], false );
- if( index != -1 )
- if( aCurArray[index].myCount > myCurCount )
- {
- aCurArray[index].myCount = myCurCount;
- aCurArray[index].prevNodeIndex = aNodes[i];
- }
- }
-
- delete[] aInterNodes;
- }
-
- delete[] aNodes;
-}
-
-/*!
- Checks for complete status
-*/
-GLViewer_LineField::IterationStatus GLViewer_LineField::checkComplete()
-{
- if( !myXLineArray || !myYLineArray || !myGraphArray1 || !myGraphArray2 )
- return IS_ERROR;
-
- int count = 0;
- GraphNode* aCurArray = getCurArray(),
- * aSecArray = getSecArray();
-
- for( int i = 0, n = segmentNumber(); i < n; i++ )
- {
- if( aCurArray[i].myCount != aSecArray[i].myCount )
- {
- if( aCurArray[i].myDim == FD_X &&
- aCurArray[i].myLineIndex == myEndPoint.myXLineIndex &&
- aCurArray[i].mySegmentindex == myEndPoint.myXSegmentIndex )
- {
- std::cout << "Algorithm complete X!!!!!!!" << std::endl;
- myEndPoint.mySolveIndex = i;
- return IS_SOLVED;
- }
- else if( aCurArray[i].myDim == FD_Y &&
- aCurArray[i].myLineIndex == myEndPoint.myYLineIndex &&
- aCurArray[i].mySegmentindex == myEndPoint.myYSegmentIndex )
- {
- std::cout << "Algorithm complete Y!!!!!!!" << std::endl;
- myEndPoint.mySolveIndex = i;
- return IS_SOLVED;
- }
- else
- {
- count++;
- aSecArray[i].myCount = aCurArray[i].myCount;
- aSecArray[i].prevNodeIndex = aCurArray[i].prevNodeIndex;
- }
- }
- }
-
- if( myCurArrayIndex == 0)
- myCurArrayIndex = 1;
- else
- myCurArrayIndex = 0;
-
- std::cout << "Number of ways: " << count << std::endl;
- if( count == 0 )
- return IS_LOOP;
-
- return IS_NOT_SOLVED;
-}
-
-/*!
- Finds LineList by counts and returns indexes
-*/
-int* GLViewer_LineField::findByCount( int& theParam )
-{
- if( !myXLineArray || !myYLineArray || !myGraphArray1 || !myGraphArray2 )
- return NULL;
-
- int count = segmentNumber();
- int* anArray = new int[count];
- int aSize = 0;
-
- GraphNode* aCurArray = getCurArray();
- for( int i = 0; i < count; i++ )
- {
- GraphNode aCurNode = aCurArray[i];
- if( aCurNode.myCount == theParam )
- {
- anArray[aSize] = i;
- aSize++;
- }
- }
-
- theParam = aSize;
- return anArray;
-}
-
-/*!
- Finds LineList by segment and dimension
-*/
-int GLViewer_LineField::findBySegment( FieldDim theDim, int theLineIndex, int theSegment, bool inCurArray )
-{
- if( !myXLineArray || !myYLineArray || !myGraphArray1 || !myGraphArray2 || getDimSize( theDim ) <= theLineIndex )
- return -1;
-
- GraphNode* aCurArray;
- if( inCurArray )
- aCurArray = getCurArray();
- else
- aCurArray = getSecArray();
-
- for( int i = 0, n = segmentNumber(); i < n; i++ )
- {
- GraphNode aCurNode = aCurArray[i];
- if( aCurNode.myDim == theDim && aCurNode.myLineIndex == theLineIndex && aCurNode.mySegmentindex == theSegment )
- return i;
- }
-
- return -1;
-}
-
-/*!
- Main method, performs algorithm execution
-*/
-GLViewer_LineField::EndStatus GLViewer_LineField::startAlgorithm()
-{
- if( !myXLineArray || !myYLineArray || !myGraphArray1 || !myGraphArray2 )
- return ES_ERROR;
-
- while( true )
- {
- std::cout << "-----------Iteration #" << myCurCount << "-------------" << std::endl;
- iteration();
-
- IterationStatus is = checkComplete();
- if( is == IS_ERROR )
- return ES_ERROR;
- else if( is == IS_LOOP )
- return ES_LOOP;
- else if( is == IS_SOLVED )
- return ES_SOLVED;
- }
- return ES_SOLVED;
-}
-
-/*!
- \return solution and size of solution
-*/
-double* GLViewer_LineField::solution( int& theSize )
-{
- if( !myXLineArray || !myYLineArray || !myGraphArray1 || !myGraphArray2 )
- return NULL;
-
- if( myEndPoint.mySolveIndex == -1 )
- return NULL;
-
- theSize = myCurCount+1;
- double* anArray = new double[theSize*4];
-
- GraphNode* aCurArray = getCurArray();
-
- int index = myEndPoint.mySolveIndex;
- for( int i = 0; i <= myCurCount; i++ )
- {
- if( index == -1 )
- break;
- double c1, c2;
- GLViewer_LineList* aLL = getLine( aCurArray[index].myLineIndex, aCurArray[index].myDim );
- aLL->readSegment( aCurArray[index].mySegmentindex, c1, c2 );
-
- if( aCurArray[index].myDim == FD_X )
- {
- anArray[i*4] = c1;
- anArray[i*4+1] = aLL->mainCoord();
- anArray[i*4+2] = c2;
- anArray[i*4+3] = aLL->mainCoord();
- }
- else
- {
- anArray[i*4] = aLL->mainCoord();
- anArray[i*4+1] = c1;
- anArray[i*4+2] = aLL->mainCoord();
- anArray[i*4+3] = c2;
- }
-
- index = aCurArray[index].prevNodeIndex;
- }
-
- return anArray;
-}
-
-/*!
- \return current solution array
-*/
-GraphNode* GLViewer_LineField::getCurArray()
-{
- if( !myGraphArray1 || !myGraphArray2 )
- return NULL;
-
- if( myCurArrayIndex == 0)
- return myGraphArray1;
- else
- return myGraphArray2;
-}
-
-/*!
- \return other solution array
-*/
-GraphNode* GLViewer_LineField::getSecArray()
-{
- if( !myGraphArray1 || !myGraphArray2 )
- return NULL;
-
- if( myCurArrayIndex == 0)
- return myGraphArray2;
- else
- return myGraphArray1;
-}
-
-/*!
- \return maximum segment number
-*/
-int GLViewer_LineField::maxSegmentNum()
-{
- if( !myXLineArray || !myYLineArray )
- return -1;
-
- int max_num = -1;
- for( int aDim = 0; aDim < 2; aDim++ )
- {
- for( int i = 0, n = getDimSize( (FieldDim)aDim ); i < n; i++ )
- {
- int count = getLine( i, (FieldDim)aDim )->count();
- if( count > max_num )
- max_num = count;
- }
- }
-
- return max_num;
-}
-
-/*!
- \return list of LileList by dimension
- \param theDim - dimension
-*/
-GLViewer_LineList** GLViewer_LineField::getLLArray( FieldDim theDim )
-{
- if( theDim == FD_X )
- return myXLineArray;
- else if( theDim == FD_Y )
- return myYLineArray;
- else
- return NULL;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Tools.h
-// Created: April, 2005
-
-#ifndef GLVIEWER_TOOLS_H
-#define GLVIEWER_TOOLS_H
-
-#ifdef WNT
-#include "windows.h"
-#endif
-
-#include "GLViewer.h"
-#include "GLViewer_Defs.h"
-
-class GLViewer_LineField;
-
-/*!
- \class GLViewer_Tools
- Tools for Viewer
-*/
-class GLVIEWER_API GLViewer_Tools
-{
-public:
- //GLViewer_Tools();
- //virtual ~GLViewer_Tools();
- //static
-
-};
-
-//! Dimension of line
-enum FieldDim
-{
- FD_X = 0, /*along x axis*/
- FD_Y /*along y axis*/
-};
-
-/*!
- \class GLViewer_LineList
- Tools for distinct line
- This class implmented interface for segment operations:
- add, cut, remove and etc.
- Memory does not changed and allocated only one time
-*/
-class GLViewer_LineList
-{
-public:
- GLViewer_LineList( int );
- virtual ~GLViewer_LineList();
-
- //! Returns number of segments
- int count() const { return mySegmentNumber; }
- //! Returns real size
- int size() const { return myRealSize; }
-
- bool addSegment( double coord1, double coord2 );
- bool removeSegment( int index );
- bool removeSegment( double coord1, double coord2 );
-
- bool readSegment( int index, double& coord1, double& coord2 );
-
- //! Returns index of segment, else -1
- int contains( double thePoint ) const;
-
- //! Sets level of segments
- void setMainCoord( double theVal ) { myMainCoord = theVal; }
- double mainCoord() const { return myMainCoord; }
-
- void clear();
- void print();
-
- void show( FieldDim );
-
- GLViewer_LineList& operator = ( GLViewer_LineList );
-
-private:
- double* myArray;
- int myRealSize;
- int mySegmentNumber;
-
- double myMainCoord;
-};
-
-/*! struct GraphNode describe node in algorithm on rare grid*/
-struct GraphNode
-{
- int myCount;
- FieldDim myDim;
- int myLineIndex;
- int mySegmentindex;
- int prevNodeIndex; //feedback for searching for solution
-};
-
-/*! struct SearchPoint describe node for solving algorithm*/
-struct SearchPoint
-{
- int myXLineIndex;
- int myXSegmentIndex;
- int myYLineIndex;
- int myYSegmentIndex;
- int mySolveIndex;
-};
-
-/*!
- \class GLViewer_LineField
- Tools for solving algorithm of finding shortest path on rare grid with minimum of
- line turns number
-*/
-class GLViewer_LineField
-{
-public:
- //!Searched point
- enum FieldPoint
- {
- FP_Start = 0,
- FP_End = 1
- };
-
- //! Status of interation
- enum IterationStatus
- {
- IS_ERROR = 0,
- IS_LOOP,
- IS_NOT_SOLVED,
- IS_SOLVED
- };
-
- //! Final status of solving
- enum EndStatus
- {
- ES_ERROR = 0,
- ES_LOOP,
- ES_SOLVED
- };
-
- GLViewer_LineField();
- GLViewer_LineField( const int theMAXSize, const int xn, const int yn );
- virtual ~GLViewer_LineField();
-
- //! Adds new line
- /*!best way, if line is already sorted*/
- void addLine( FieldDim, GLViewer_LineList* );
- //! Calls previous
- void addLine( FieldDim theDim, double theMC, double theBegin, double theEnd );
-
- //! Adds new line and sorted field
- /*! Returns position*/
- int insertLine( FieldDim theDim, GLViewer_LineList*, int thePosition );
- //! Calls previous
- int insertLine( FieldDim theDim, double theMC, double theBegin, double theEnd, int thePosition );
-
- //! Returns other dimension
- static FieldDim invertDim( FieldDim );
-
- //! Returns line by index and dimension
- GLViewer_LineList* getLine( int index, FieldDim );
-
- //! Nullifys field and sets same continued segments
- void setBorders( double X1, double X2, double Y1, double Y2 );
- //! Cut rectangle in grid
- void addRectangle( double top, double right, double bottom, double left );
-
- //! returns arrey of intersects indexes with \param theLL
- int* intersectIndexes( FieldDim theDim, int theIndex, const GLViewer_LineList* theLL , int& theSize );
-
- void print();
-
- void show();
-
- int getDimSize( FieldDim );
- //! Returns number of segment
- int segmentNumber();
-
- //! Sets start/end search point
- bool setPoint( FieldPoint, double x, double y );
-
- //! Optimize field
- /*! Removes all multiple segments*/
- void optimize();
- //! Some prepare actions
- /*! Needs call setPoint before*/
- void initialize();
- //! Main method
- EndStatus startAlgorithm();
-
- //! Returns solution and size of solution
- double* solution( int& size );
-
-protected:
- //! One iteration of algorithm
- void iteration();
- //! Checks for complete status
- IterationStatus checkComplete();
-
- //! Finds LineList by counts and returns indexes
- int* findByCount( int& theParam );
- //! Finds LineList by segment and dimension
- int findBySegment( FieldDim, int coord1, int coord2, bool inCurArray = true );
-
- //! Returns current solution array
- GraphNode* getCurArray();
- //! Returns
- GraphNode* getSecArray();
-
- //! Returns maximum segment number
- int maxSegmentNum();
-
- //! Returns list of LileList by dimension
- GLViewer_LineList** getLLArray( FieldDim );
-
-private:
- GLViewer_LineList** myXLineArray,
- ** myYLineArray;
-
- int myXSize,
- myYSize;
-
- GraphNode* myGraphArray1,
- * myGraphArray2;
- int myCurArrayIndex;
-
- SearchPoint myStartPoint,
- myEndPoint;
- int myCurCount;
-};
-
-#endif //GLVIEWER_TOOLS_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_ViewFrame.cxx
-// Created: November, 2004
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_ViewFrame.h"
-#include "GLViewer_Viewer.h"
-#include "GLViewer_Viewer2d.h"
-#include "GLViewer_ViewPort2d.h"
-
-#include <SUIT_Desktop.h>
-#include <SUIT_Session.h>
-#include <SUIT_ToolButton.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_MessageBox.h>
-
-#include <qcolor.h>
-#include <qfiledialog.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qstring.h>
-
-/*!
- Constructor
-*/
-GLViewer_ViewFrame::GLViewer_ViewFrame( SUIT_Desktop* d, GLViewer_Viewer* vw )
-: SUIT_ViewWindow( d ),
-myViewer( vw ),
-myVP( 0 )
-{
- QFrame* client = new QFrame( this );
- setCentralWidget( client );
-
- QBoxLayout* layout = new QHBoxLayout( client, 1, 1 );
- layout->setAutoAdd( true );
-
- GLViewer_ViewPort2d* vp = new GLViewer_ViewPort2d( client, this );
- //vp->turnGrid( true );
- //vp->turnCompass( true );
- //vp->enablePopup( false );
- setViewPort( vp );
- setBackgroundColor( Qt::white );
-
- myToolBar = new QToolBar(this);
- myToolBar->setCloseMode(QDockWindow::Undocked);
- myToolBar->setLabel(tr("LBL_TOOLBAR_LABEL"));
- createActions();
- createToolBar();
-}
-
-/*!
- Destructor
-*/
-GLViewer_ViewFrame::~GLViewer_ViewFrame()
-{
-}
-
-/*!
- Creates actions of GL view frame
-*/
-void GLViewer_ViewFrame::createActions()
-{
- if (!myActionsMap.isEmpty()) return;
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- QAction* aAction;
-
- // Dump view
- aAction = new QAction(tr("MNU_DUMP_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_DUMP" ) ),
- tr( "MNU_DUMP_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_DUMP_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewDump()));
- myActionsMap[ DumpId ] = aAction;
-
- // FitAll
- aAction = new QAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITALL" ) ),
- tr( "MNU_FITALL" ), 0, this);
- aAction->setStatusTip(tr("DSC_FITALL"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitAll()));
- myActionsMap[ FitAllId ] = aAction;
-
- // FitRect
- aAction = new QAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITAREA" ) ),
- tr( "MNU_FITRECT" ), 0, this);
- aAction->setStatusTip(tr("DSC_FITRECT"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitArea()));
- myActionsMap[ FitRectId ] = aAction;
-
- // FitSelect
- aAction = new QAction(tr("MNU_FITSELECT"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITSELECT" ) ),
- tr( "MNU_FITSELECT" ), 0, this);
- aAction->setStatusTip(tr("DSC_FITSELECT"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitSelect()));
- myActionsMap[ FitSelectId ] = aAction;
-
- // Zoom
- aAction = new QAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_ZOOM" ) ),
- tr( "MNU_ZOOM_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_ZOOM_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewZoom()));
- myActionsMap[ ZoomId ] = aAction;
-
- // Panning
- aAction = new QAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_PAN" ) ),
- tr( "MNU_PAN_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_PAN_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewPan()));
- myActionsMap[ PanId ] = aAction;
-
- // Global Panning
- aAction = new QAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_GLOBALPAN" ) ),
- tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewGlobalPan()));
- myActionsMap[ GlobalPanId ] = aAction;
-
- aAction = new QAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_RESET" ) ),
- tr( "MNU_RESET_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_RESET_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewReset()));
- myActionsMap[ ResetId ] = aAction;
-}
-
-/*!
- Creates toolbar of GL view frame
-*/
-void GLViewer_ViewFrame::createToolBar()
-{
- myActionsMap[DumpId]->addTo(myToolBar);
-
- SUIT_ToolButton* aScaleBtn = new SUIT_ToolButton(myToolBar);
- aScaleBtn->AddAction(myActionsMap[FitAllId]);
- aScaleBtn->AddAction(myActionsMap[FitRectId]);
- aScaleBtn->AddAction(myActionsMap[FitSelectId]);
- aScaleBtn->AddAction(myActionsMap[ZoomId]);
-
- SUIT_ToolButton* aPanBtn = new SUIT_ToolButton(myToolBar);
- aPanBtn->AddAction(myActionsMap[PanId]);
- aPanBtn->AddAction(myActionsMap[GlobalPanId]);
-
- myActionsMap[ResetId]->addTo(myToolBar);
-}
-
-/*!
- Sets the viewport for this frame
-*/
-void GLViewer_ViewFrame::setViewPort( GLViewer_ViewPort* vp )
-{
- if ( myVP == vp )
- return;
-
- if ( myVP )
- {
- disconnect( myVP, SIGNAL( vpDrawExternal( QPainter* ) ), this, SIGNAL( vfDrawExternal( QPainter* ) ) );
- disconnect( myVP, SIGNAL( vpMouseEvent( QMouseEvent* ) ), this, SLOT( mouseEvent( QMouseEvent* ) ) );
- disconnect( myVP, SIGNAL( vpKeyEvent( QKeyEvent* ) ), this, SLOT( keyEvent( QKeyEvent* ) ) );
- disconnect( myVP, SIGNAL( vpWheelEvent( QWheelEvent* ) ), this, SLOT( wheelEvent( QWheelEvent* ) ) );
- disconnect( myVP, SIGNAL( contextMenuRequested( QContextMenuEvent* ) ),
- this, SIGNAL( contextMenuRequested( QContextMenuEvent* ) ) );
- }
- myVP = vp;
- if ( myVP )
- {
- connect( myVP, SIGNAL( vpDrawExternal( QPainter* ) ), this, SIGNAL( vfDrawExternal( QPainter* ) ) );
- connect( myVP, SIGNAL( vpMouseEvent( QMouseEvent* ) ), this, SLOT( mouseEvent( QMouseEvent* ) ) );
- connect( myVP, SIGNAL( vpKeyEvent( QKeyEvent* ) ), this, SLOT( keyEvent( QKeyEvent* ) ) );
- connect( myVP, SIGNAL( vpWheelEvent( QWheelEvent* ) ), this, SLOT( wheelEvent( QWheelEvent* ) ) );
- connect( myVP, SIGNAL( contextMenuRequested( QContextMenuEvent* ) ),
- this, SIGNAL( contextMenuRequested( QContextMenuEvent* ) ) );
- }
-}
-
-/*!
- Returns the viewport of this frame. [ public ]
-*/
-GLViewer_ViewPort* GLViewer_ViewFrame::getViewPort() const
-{
- return myVP;
-}
-
-/*!
- Set background of the viewport. [ public ]
-*/
-void GLViewer_ViewFrame::setBackgroundColor( const QColor& color )
-{
- if ( myVP )
- myVP->setBackgroundColor( color );
-}
-
-/*!
- Returns background of the viewport. [ public ]
-*/
-QColor GLViewer_ViewFrame::backgroundColor() const
-{
- if ( myVP )
- return myVP->backgroundColor();
- return QMainWindow::backgroundColor();
-}
-
-/*!
- Sets the viewer for this view. [ public ]
-*/
-void GLViewer_ViewFrame::setViewer( GLViewer_Viewer* v )
-{
- myViewer = v;
-}
-
-/*!
- Returns the viewer of this view. [ public ]
-*/
-GLViewer_Viewer* GLViewer_ViewFrame::getViewer() const
-{
- return myViewer;
-}
-
-/*!
- Returns the preferred view size. [ virtual public ]
-*/
-QSize GLViewer_ViewFrame::sizeHint() const
-{
- QWidget* p = parentWidget();
- if ( p && p->inherits( "QWorkspaceChild" ) )
- p = p->parentWidget();
- if ( !p )
- return QMainWindow::sizeHint();
- return QSize( 9 * p->width() / 10 , 9 * p->height() / 10 );
-}
-
-/*!
- Called by viewer's 'update()' method. Does nothing by default [ virtual public ]
-*/
-void GLViewer_ViewFrame::onUpdate( int )
-{
-}
-
-//#include <windows.h>
-
-/*!
- SLOT: called on dump view operation is activated, stores scene to raster file
-*/
-void GLViewer_ViewFrame::onViewDump()
-{
- GLViewer_Widget* aWidget = ((GLViewer_ViewPort2d*)myVP)->getGLWidget();
- int width, height;
- width = aWidget->width();
- height = aWidget->height();
-
- int imageSize = width*height*3;
- unsigned char* imageBits = NULL;
-
- int reserve_bytes = width % 4; //32 bits platform
- imageSize = (width+reserve_bytes)*height*3;
- imageBits = new unsigned char[imageSize];
-
-
-#ifdef WNT
-
- int num;
- HBITMAP hBmp;
- HDC hdc_old, hdc;
- HGLRC hglrc_old, hglrc;
-
- BITMAPINFO bi;
-
- hglrc_old = wglGetCurrentContext();
- hdc_old = wglGetCurrentDC();
-
- hdc = CreateCompatibleDC( hdc_old );
- if( !hdc )
- {
- cout << "Can't create compatible DC. Last Error Code: " << GetLastError() << endl;
- return;
- }
-
- int sizeBmi = Standard_Integer( sizeof(BITMAPINFO) + sizeof(RGBQUAD)*3 );
- PBITMAPINFO pBmi = (PBITMAPINFO)( new char[sizeBmi] );
- ZeroMemory( pBmi, sizeBmi );
-
- pBmi->bmiHeader.biSize = sizeof( BITMAPINFOHEADER ); //sizeBmi
- pBmi->bmiHeader.biWidth = width;
- pBmi->bmiHeader.biHeight = height;
- pBmi->bmiHeader.biPlanes = 1;
- pBmi->bmiHeader.biBitCount = 24;
- pBmi->bmiHeader.biCompression = BI_RGB;
-
- LPVOID ppvBits;
- hBmp = CreateDIBSection ( hdc, pBmi, DIB_RGB_COLORS, &ppvBits, NULL, 0 );
- SelectObject ( hdc, hBmp );
- delete[] pBmi;
-
- PIXELFORMATDESCRIPTOR pfd;
- ZeroMemory( &pfd, sizeof( PIXELFORMATDESCRIPTOR ) );
- pfd.nSize = sizeof( PIXELFORMATDESCRIPTOR );
- pfd.nVersion = 1;
- pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_BITMAP;
- pfd.iPixelType = PFD_TYPE_RGBA;
- pfd.cColorBits = 24;
- pfd.cDepthBits = 32;
- pfd.iLayerType = PFD_MAIN_PLANE;
-
- int iPf = ChoosePixelFormat( hdc, &pfd);
- if( iPf == 0 )
- {
- if ( !DescribePixelFormat ( hdc, iPf, sizeof(PIXELFORMATDESCRIPTOR), &pfd ) )
- {
- cout << "Can't describe Pixel Format. Last Error Code: " << GetLastError() << endl;
- }
- }
- if ( !SetPixelFormat(hdc, iPf, &pfd) )
- {
- cout << "Can't set Pixel Format. Last Error Code: " << GetLastError() << endl;
- }
-
- hglrc = wglCreateContext( hdc );
- if( !hglrc )
- {
- cout << "Can't create new GL Context. Last Error Code: " << GetLastError() << endl;
- return;
- }
- if( !wglMakeCurrent( hdc, hglrc) )
- {
- cout << "Can't make current new context!" << endl;
- return;
- }
-
- glViewport( 0, 0, width, height );
-
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- GLfloat w_c = width / 2., h_c = height / 2.;
-
- gluOrtho2D( -w_c, w_c, -h_c, h_c );
-
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-
- //set background
- QColor aColor = ((GLViewer_ViewPort2d*)myVP)->backgroundColor();
- glClearColor( ( GLfloat )aColor.red() / 255,
- ( GLfloat )aColor.green() / 255,
- ( GLfloat )aColor.blue() / 255,
- 1.0 );
-
- aWidget->exportRepaint();
-
- memset(&bi, 0, sizeof(BITMAPINFOHEADER));
- bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
- bi.bmiHeader.biPlanes = 1;
- bi.bmiHeader.biBitCount = 24;
- bi.bmiHeader.biHeight = -height;
- bi.bmiHeader.biWidth = width;
- bi.bmiHeader.biCompression = BI_RGB;
-
- num = GetDIBits(hdc, hBmp, 0, height, imageBits, &bi, DIB_RGB_COLORS);
-
- wglMakeCurrent( hdc_old, hglrc_old );
- wglDeleteContext( hglrc );
-
-
-#else //XWindows
-#endif
-
- unsigned int* aPix = NULL;
- QImage anImage( width, height, 32 );
- for( int i = 0; i < height; i++ )
- {
- memset( anImage.scanLine( i ), 0, sizeof(unsigned int)*width );
- unsigned char* pos;
- for( int j = 0; j < width; j++ )
- {
- pos = imageBits + i*width*3 + j*3 + reserve_bytes*i;
- aPix = (unsigned int*)anImage.scanLine(i)+j;
- *aPix = qRgb( *pos, *(pos+1), *(pos+2) );
- }
- }
-
- delete [] imageBits;
-
- QString aFilter( "*.bmp\n*.png" );
-
- QFileDialog aFileDlg( QDir::current().absPath(), aFilter, this );
- aFileDlg.setCaption( tr( "DUMP_VIEW_SAVE_FILE_DLG_CAPTION" ) );
- aFileDlg.setMode( QFileDialog::AnyFile );
-
- if( !aFileDlg.exec() )
- return;
-
- QString aFileName = aFileDlg.selectedFile();
- QString aFileExt = aFileDlg.selectedFilter();
-
- if( aFileName.isEmpty() )
- {
- SUIT_MessageBox::error1( this,
- tr( "DUMP_VIEW_ERROR_DLG_CAPTION" ),
- tr( "DUMP_VIEW_ERROR_DLG_TEXT" ),
- tr( "BUT_OK" ) );
- }
-
- QString aSaveOp = "BMP";
- QString aTypedFileExt = QFileInfo( aFileName ).extension( false ).lower();
-
- if( aFileExt == "*.bmp" )
- {
- if( aTypedFileExt.isEmpty() )
- aFileName += ".bmp";
- aSaveOp = "BMP";
- }
- else if( aFileExt == "*.png" )
- if( aTypedFileExt.isEmpty() )
- aFileName += ".png";
- aSaveOp = "PNG";
-
-//#ifdef WNT
-// if( !anImage.save( aFileName, aSaveOp ) )
-//#else
- if( !aWidget->grabFrameBuffer().save( aFileName, aSaveOp ) )
-//#endif
- {
- SUIT_MessageBox::error1( this,
- tr( "DUMP_VIEW_ERROR_DLG_CAPTION" ),
- tr( "DUMP_VIEW_ERROR_DLG_TEXT" ),
- tr( "BUT_OK" ) );
- }
-}
-
-/*!
- Start panning
-*/
-void GLViewer_ViewFrame::onViewPan()
-{
- myViewer->activateTransform( GLViewer_Viewer::Pan );
-}
-
-/*!
- Start zooming
-*/
-void GLViewer_ViewFrame::onViewZoom()
-{
- myViewer->activateTransform( GLViewer_Viewer::Zoom );
-}
-
-/*!
- Start fit all
-*/
-void GLViewer_ViewFrame::onViewFitAll()
-{
- myViewer->activateTransform( GLViewer_Viewer::FitAll );
-}
-
-/*!
- Start fit area
-*/
-void GLViewer_ViewFrame::onViewFitArea()
-{
- myViewer->activateTransform( GLViewer_Viewer::FitRect );
-}
-
-/*!
- Start fit selected
-*/
-void GLViewer_ViewFrame::onViewFitSelect()
-{
- myViewer->activateTransform( GLViewer_Viewer::FitSelect );
-}
-
-/*!
- Start global panning
-*/
-void GLViewer_ViewFrame::onViewGlobalPan()
-{
- myViewer->activateTransform( GLViewer_Viewer::PanGlobal );
-}
-
-/*!
- Start rotating
-*/
-void GLViewer_ViewFrame::onViewRotate()
-{
- //myViewer->activateTransform( GLViewer_Viewer::Rotate );
-}
-
-/*!
- Start reset default view aspects
-*/
-void GLViewer_ViewFrame::onViewReset()
-{
- myViewer->activateTransform( GLViewer_Viewer::Reset );
-}
-
-/*!
- Dispatches mouse events
-*/
-void GLViewer_ViewFrame::mouseEvent( QMouseEvent* e )
-{
- switch ( e->type() )
- {
- case QEvent::MouseButtonPress:
- emit mousePressed( this, e );
- break;
- case QEvent::MouseButtonRelease:
- emit mouseReleased( this, e );
- break;
- case QEvent::MouseButtonDblClick:
- emit mouseDoubleClicked( this, e );
- break;
- case QEvent::MouseMove:
- emit mouseMoving( this, e );
- break;
- default:
- break;
- }
-}
-
-/*!
- Dispatches key events
-*/
-void GLViewer_ViewFrame::keyEvent( QKeyEvent* e )
-{
- switch ( e->type() )
- {
- case QEvent::KeyPress:
- emit keyPressed( this, e );
- break;
- case QEvent::KeyRelease:
- emit keyReleased( this, e );
- break;
- default:
- break;
- }
-}
-
-/*!
- Dispatches wheel events
-*/
-void GLViewer_ViewFrame::wheelEvent( QWheelEvent* e )
-{
- switch ( e->type() )
- {
- case QEvent::Wheel:
- emit wheeling( this, e );
- break;
- default:
- break;
- }
-}
-
-/*!
- \return the visual parameters of this view as a formated string
-*/
-QString GLViewer_ViewFrame::getVisualParameters()
-{
- QString retStr;
- if ( myVP && myVP->inherits( "GLViewer_ViewPort2d" ) ) {
- GLViewer_ViewPort2d* vp2d = (GLViewer_ViewPort2d*)myVP;
- GLfloat xSc, ySc, xPan, yPan;
- vp2d->getScale( xSc, ySc );
- vp2d->getPan( xPan, yPan );
- retStr.sprintf( "%.12e*%.12e*%.12e*%.12e", xSc, ySc, xPan, yPan );
- }
- return retStr;
-}
-
-/*!
- The method restores visual parameters of this view from a formated string
-*/
-void GLViewer_ViewFrame::setVisualParameters( const QString& parameters )
-{
- QStringList paramsLst = QStringList::split( '*', parameters, true );
- if ( myVP && myVP->inherits( "GLViewer_ViewPort2d" ) && paramsLst.size() == 4) {
- GLViewer_ViewPort2d* vp2d = (GLViewer_ViewPort2d*)myVP;
-
- GLfloat xSc, ySc, xPan, yPan;
- xSc = paramsLst[0].toDouble();
- ySc = paramsLst[1].toDouble();
- xPan = paramsLst[2].toDouble();
- yPan = paramsLst[3].toDouble();
-
- vp2d->getGLWidget()->setScale( xSc, ySc, 1. );
- vp2d->getGLWidget()->setPan( xPan, yPan, 0. );
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_ViewFrame.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_VIEWFRAME_H
-#define GLVIEWER_VIEWFRAME_H
-
-#include "SUIT_ViewWindow.h"
-#include "GLViewer.h"
-
-class QColor;
-
-class SUIT_Desktop;
-
-class GLViewer_Viewer;
-class GLViewer_ViewPort;
-
-#include <qaction.h>
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- \class GLViewer_ViewFrame
- Frame window for viewport in QAD-based application
-*/
-
-class GLVIEWER_API GLViewer_ViewFrame: public SUIT_ViewWindow
-{
- Q_OBJECT
-
-public:
- GLViewer_ViewFrame( SUIT_Desktop* , GLViewer_Viewer* );
- ~GLViewer_ViewFrame();
-
-public:
- void setViewer( GLViewer_Viewer* );
- GLViewer_Viewer* getViewer() const;
-
- void setViewPort( GLViewer_ViewPort* );
- GLViewer_ViewPort* getViewPort() const;
-
- void setBackgroundColor( const QColor& );
- QColor backgroundColor() const;
-
- QSize sizeHint() const;
-
- virtual void onUpdate( int );
-
- virtual QString getVisualParameters();
- virtual void setVisualParameters( const QString& parameters );
-
-signals:
- void vfDrawExternal( QPainter* );
- void vfViewClosing( QCloseEvent* );
-
-protected:
- GLViewer_Viewer* myViewer;
- GLViewer_ViewPort* myVP;
-
-public:
- //ViewType getTypeView() const { return VIEW_GL; };
- QWidget* getViewWidget() { return ( QWidget* )getViewPort(); };
-
-protected slots:
- void onViewDump();
- void onViewPan();
- void onViewZoom();
- void onViewFitAll();
- void onViewFitArea();
- void onViewFitSelect();
- void onViewGlobalPan();
- void onViewRotate();
- void onViewReset();
- void onViewFront() {};
- void onViewBack() {};
- void onViewRight() {};
- void onViewLeft() {};
- void onViewBottom() {};
- void onViewTop() {};
- void onViewTrihedron() {};
-
-private slots:
- void keyEvent( QKeyEvent* );
- void mouseEvent( QMouseEvent* );
- void wheelEvent( QWheelEvent* );
-
-private:
- void createActions();
- void createToolBar();
-
-private:
- //! Actions ID
- enum { DumpId, FitAllId, FitRectId, FitSelectId, ZoomId, PanId, GlobalPanId, ResetId };
- typedef QMap<int, QAction*> ActionsMap;
-
-private:
- ActionsMap myActionsMap;
- QToolBar* myToolBar;
-};
-
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_ViewManager.cxx
-// Created: November, 2004
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_ViewManager.h"
-#include "GLViewer_ViewFrame.h"
-#include "GLViewer_Viewer2d.h"
-#include "SUIT_Desktop.h"
-
-/*!Constructor.*/
-GLViewer_ViewManager::GLViewer_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop )
-: SUIT_ViewManager( theStudy, theDesktop, new GLViewer_Viewer2d( "GLViewer" ) )
-{
- setTitle( tr( "GL_VIEW_TITLE" ) );
-}
-
-/*!Destructor.*/
-GLViewer_ViewManager::~GLViewer_ViewManager()
-{
-}
-
-/*!Context menu popup for \a popup.*/
-void GLViewer_ViewManager::contextMenuPopup( QPopupMenu* popup )
-{
- SUIT_ViewManager::contextMenuPopup( popup );
- // if it is necessary invoke method CreatePopup of ViewPort
- // be sure that existing QPopupMenu menu is used for that.
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_ViewManager.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_VIEWMANAGER_H
-#define GLVIEWER_VIEWMANAGER_H
-
-#include "GLViewer.h"
-#include "SUIT_ViewManager.h"
-#include "GLViewer_Viewer.h"
-
-class SUIT_Desktop;
-
-class GLVIEWER_API GLViewer_ViewManager : public SUIT_ViewManager
-{
- Q_OBJECT
-public:
- GLViewer_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop );
- virtual ~GLViewer_ViewManager();
-
- GLViewer_Viewer* getGLViewer() { return (GLViewer_Viewer*) myViewModel; }
-
- virtual void contextMenuPopup( QPopupMenu* );
-};
-
-#endif // GLVIEWER_VIEWMANAGER_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_ViewPort.cxx
-// Created: November, 2004
-
-//#include <GLViewerAfx.h>
-
-#if !(defined WNT) && !(defined QT_CLEAN_NAMESPACE)
-#define QT_CLEAN_NAMESPACE /* avoid definition of INT32 and INT8 */
-#endif
-
-#include "GLViewer_ViewPort.h"
-
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_Session.h"
-
-#include <qrect.h>
-#include <qcursor.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qintdict.h>
-#include <qpopupmenu.h>
-#include <qcolordialog.h>
-
-#include <stdlib.h>
-
-#if !defined WNT
-#include <GL/glx.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include <X11/Xmu/StdCmap.h>
-#undef QT_CLEAN_NAMESPACE
-#include <Xw_Window.hxx>
-#include <Graphic3d_GraphicDevice.hxx>
-
-/*!
- \struct CMapEntry
- Map of indexed colors
- For internal purposes
-*/
-struct CMapEntry
-{
- CMapEntry();
- ~CMapEntry();
- Colormap cmap;
- bool alloc;
- XStandardColormap scmap;
-};
-
-/*!
- Constructor
-*/
-CMapEntry::CMapEntry()
-{
- cmap = 0;
- alloc = false;
- scmap.colormap = 0;
-}
-
-/*!
- Destructor
-*/
-CMapEntry::~CMapEntry()
-{
- if ( alloc )
- XFreeColormap( QPaintDevice::x11AppDisplay(), cmap );
-}
-
-static QIntDict<CMapEntry> *cmap_dict = 0;
-static bool mesa_gl = false;
-
-static void cleanup_cmaps()
-{
- if ( !cmap_dict )
- return;
- cmap_dict->setAutoDelete( true );
- delete cmap_dict;
- cmap_dict = 0;
-}
-
-static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
-{
- if ( !cmap_dict )
- {
- cmap_dict = new QIntDict<CMapEntry>;
- const char *v = glXQueryServerString( dpy, vi->screen, GLX_VERSION );
- mesa_gl = strstr( v,"Mesa" ) != 0;
- qAddPostRoutine( cleanup_cmaps );
- }
-
- CMapEntry *x = cmap_dict->find( (long)vi->visualid );
- if ( x ) // found colormap for visual
- return x->cmap;
-
- x = new CMapEntry();
-
- XStandardColormap *c;
- int n, i;
-
-#ifdef DEBUG
- cout << "Choosing cmap for vID = " << vi->visualid << endl;
-#endif
-
- if ( vi->visualid == XVisualIDFromVisual( (Visual*)QPaintDevice::x11AppVisual() ) )
- {
-#ifdef DEBUG
- cout << "Using x11AppColormap" << endl;
-#endif
- return QPaintDevice::x11AppColormap();
- }
-
- if ( mesa_gl )
- {
- Atom hp_cmaps = XInternAtom( dpy, "_HP_RGB_SMOOTH_MAP_LIST", true );
- if ( hp_cmaps && vi->visual->c_class == TrueColor && vi->depth == 8 )
- {
- if ( XGetRGBColormaps( dpy, RootWindow( dpy, vi->screen ), &c, &n, hp_cmaps ) )
- {
- i = 0;
- while ( i < n && x->cmap == 0 )
- {
- if ( c[i].visualid == vi->visual->visualid )
- {
- x->cmap = c[i].colormap;
- x->scmap = c[i];
- }
- i++;
- }
- XFree( (char*)c );
- }
- }
- }
-#if !defined( _OS_SOLARIS_ )
- if ( !x->cmap )
- {
- if ( XmuLookupStandardColormap( dpy, vi->screen, vi->visualid, vi->depth, XA_RGB_DEFAULT_MAP, false, true ) )
- {
- if ( XGetRGBColormaps( dpy, RootWindow( dpy, vi->screen ), &c, &n, XA_RGB_DEFAULT_MAP ) )
- {
- i = 0;
- while ( i < n && x->cmap == 0 )
- {
- if ( c[i].visualid == vi->visualid )
- {
- x->cmap = c[i].colormap;
- x->scmap = c[i];
- }
- i++;
- }
- XFree( (char *)c );
- }
- }
- }
-#endif
- if ( !x->cmap )
- {
- // no shared cmap found
- x->cmap = XCreateColormap( dpy, RootWindow( dpy, vi->screen ), vi->visual, AllocNone );
- x->alloc = true;
- }
-
- cmap_dict->insert( (long)vi->visualid, x ); // associate cmap with visualid
- return x->cmap;
-}
-#endif
-
-int GLViewer_ViewPort::nCounter = 0;
-QCursor* GLViewer_ViewPort::defCursor = 0;
-QCursor* GLViewer_ViewPort::panglCursor = 0;
-QCursor* GLViewer_ViewPort::handCursor = 0;
-QCursor* GLViewer_ViewPort::panCursor = 0;
-QCursor* GLViewer_ViewPort::zoomCursor = 0;
-QCursor* GLViewer_ViewPort::rotCursor = 0;
-QCursor* GLViewer_ViewPort::sketchCursor = 0;
-
-/*!
- Creates the necessary viewport cursors. [ static ]
-*/
-void GLViewer_ViewPort::createCursors ()
-{
- defCursor = new QCursor( ArrowCursor );
- panglCursor = new QCursor( CrossCursor );
- handCursor = new QCursor( PointingHandCursor );
- panCursor = new QCursor( SizeAllCursor );
-
- SUIT_ResourceMgr* rmgr = SUIT_Session::session()->resourceMgr();
- zoomCursor = new QCursor( rmgr->loadPixmap( "GLViewer", tr( "ICON_GL_CURSOR_ZOOM" ) ) );
- rotCursor = new QCursor( rmgr->loadPixmap( "GLViewer", tr( "ICON_GL_CURSOR_ROTATE" ) ) );
- sketchCursor = new QCursor( rmgr->loadPixmap( "GLViewer", tr( "ICON_GL_CURSOR_SKETCH" ) ) );
-}
-
-/*!
- Destroys the viewport cursors. [ static ]
-*/
-void GLViewer_ViewPort::destroyCursors()
-{
- delete defCursor; defCursor = 0;
- delete panglCursor; panglCursor = 0;
- delete handCursor; handCursor = 0;
- delete panCursor; panCursor = 0;
- delete zoomCursor; zoomCursor = 0;
- delete rotCursor; rotCursor = 0;
- delete sketchCursor; sketchCursor = 0;
-}
-
-/*!
- Sets new default cursor. [ static ]
-*/
-void GLViewer_ViewPort::setDefaultCursor( const QCursor& newCursor )
-{
- if ( !defCursor )
- defCursor = new QCursor();
- *defCursor = newCursor;
-}
-
-/*!
- Sets new cursor for drawing rectangle in the viewport. [ static ]
-*/
-void GLViewer_ViewPort::setHandCursor( const QCursor& newCursor )
-{
- if ( !handCursor )
- handCursor = new QCursor();
- *handCursor = newCursor;
-}
-
-/*!
- Sets new cursor for panning. [ static ]
-*/
-void GLViewer_ViewPort::setPanCursor( const QCursor& newCursor )
-{
- if ( !panCursor )
- panCursor = new QCursor();
- *panCursor = newCursor;
-}
-
-/*!
- Sets new cursor for global panning. [ static ]
-*/
-void GLViewer_ViewPort::setPanglCursor( const QCursor& newCursor )
-{
- if ( !panglCursor )
- panglCursor = new QCursor();
- *panglCursor = newCursor;
-}
-
-/*!
- Sets new cursor for zooming. [ static ]
-*/
-void GLViewer_ViewPort::setZoomCursor( const QCursor& newCursor )
-{
- if ( !zoomCursor )
- zoomCursor = new QCursor();
- *zoomCursor = newCursor;
-}
-
-/*!
- Sets new cursor for rotating. [ static ]
-*/
-void GLViewer_ViewPort::setRotCursor( const QCursor& newCursor )
-{
- if ( !rotCursor )
- rotCursor = new QCursor();
- *rotCursor = newCursor;
-}
-
-/*!
- Sets new cursor for rotating. [ static ]
-*/
-void GLViewer_ViewPort::setSketchCursor( const QCursor& newCursor )
-{
- if ( !rotCursor )
- sketchCursor = new QCursor();
- *sketchCursor = newCursor;
-}
-
-/*!
- Constructor
-*/
-GLViewer_ViewPort::GLViewer_ViewPort( QWidget* parent )
-: QWidget( parent, 0, WRepaintNoErase | WResizeNoErase )
-{
- initialize();
-}
-
-/*!
- Destructor
-*/
-GLViewer_ViewPort::~GLViewer_ViewPort()
-{
- cleanup();
-}
-
-/*!
- Initializes viewport. [ private ]
-*/
-void GLViewer_ViewPort::initialize()
-{
- if ( nCounter++ == 0 )
- createCursors();
-
- //myPopupActions.setAutoDelete( true );
- myPaintersRedrawing = false;
- myEnableSketching = false;
- myEnableTransform = true;
-
- setMouseTracking( true );
- setBackgroundMode( NoBackground );
-
- setFocusPolicy( StrongFocus );
-}
-
-/*!
- Cleans up the viewport. [ private ]
-*/
-void GLViewer_ViewPort::cleanup()
-{
- if ( --nCounter == 0 )
- destroyCursors();
-}
-
-/*!
- Selects visual ID for OpenGL window ( X11 specific ). [ protected ]
-*/
-void GLViewer_ViewPort::selectVisualId( ViewType type )
-{
-#if !defined WNT
- XVisualInfo* pVisualInfo;
- if ( x11Display() )
- {
- /* Initialization with the default VisualID */
- //Visual *v = DefaultVisual( x11Display(), DefaultScreen( x11Display() ) );
- // int visualID = XVisualIDFromVisual( v ); unused
-
- /* Here we use the settings from Optimizer_ViewInfo::TxglCreateWindow() */
- int visualAttr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, None };
-
- pVisualInfo = ::glXChooseVisual( x11Display(), DefaultScreen( x11Display() ), visualAttr );
-
- if ( isVisible() )
- hide();
-
- XSetWindowAttributes a;
-
- a.colormap = choose_cmap( x11Display(), pVisualInfo ); /* find best colormap */
- a.background_pixel = backgroundColor().pixel();
- a.border_pixel = black.pixel();
- Window p = RootWindow( x11Display(), DefaultScreen( x11Display() ) );
- if ( parentWidget() )
- p = parentWidget()->winId();
-
- Window w;
- if ( type == Type2D ) // creating simple X window for 2d
- {
- unsigned long xbackground =
- BlackPixel( x11Display(), DefaultScreen( x11Display() ) );
- unsigned long xforeground =
- WhitePixel( x11Display(), DefaultScreen( x11Display() ) );
-
- w = XCreateSimpleWindow ( x11Display(), p, x(), y(), width(),
- height(), 0, xforeground, xbackground );
- }
- else if ( type == Type3D )
- {
- w = XCreateWindow( x11Display(), p, x(), y(), width(), height(),
- 0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
- CWBackPixel | CWBorderPixel | CWColormap, &a );
- }
- else
- return;
-
- Window *cmw;
- Window *cmwret;
- int count;
- if ( XGetWMColormapWindows( x11Display(), topLevelWidget()->winId(), &cmwret, &count ) )
- {
- cmw = new Window[count+1];
- memcpy( (char*)cmw, (char*)cmwret, sizeof(Window) * count );
- XFree( (char*)cmwret );
- int i;
-
- for ( i = 0; i < count; i++ )
- {
- if ( cmw[i] == winId() ) /* replace old window */
- {
- cmw[i] = w;
- break;
- }
- }
-
- if ( i >= count ) /* append new window */
- cmw[count++] = w;
- }
- else
- {
- count = 1;
- cmw = new Window[count];
- cmw[0] = w;
- }
-
- /* Creating new window (with good VisualID) for this widget */
- create(w);
- XSetWMColormapWindows( x11Display(), topLevelWidget()->winId(), cmw, count );
- delete[] cmw;
-
- if ( isVisible() )
- show();
-
- if ( pVisualInfo )
- {
- XFree( (char *)pVisualInfo );
- }
- XFlush( x11Display() );
- }
-#endif
-}
-
-/*!
- Sets the background 'color'. [ virtual ]
-*/
-void GLViewer_ViewPort::setBackgroundColor( const QColor& color )
-{
- QPalette pal = palette();
- pal.setColor( QColorGroup::Background, color );
- setPalette( pal );
- repaint();
-}
-
-/*!
- Returns the background color. [ virtual ]
-*/
-QColor GLViewer_ViewPort::backgroundColor() const
-{
- return palette().active().background();
-}
-
-/*!
- Returns 'true' if sketching is enabled in this viewport. [ public ]
-*/
-bool GLViewer_ViewPort::isSketchingEnabled() const
-{
- return myEnableSketching;
-}
-
-/*!
- Enables / disables sketching [ public ]
-*/
-void GLViewer_ViewPort::setSketchingEnabled( bool enable )
-{
- myEnableSketching = enable;
-}
-
-/*!
- Returns 'true' if transformations ( rotation, zoom etc. )
- are enabled in this viewport. [ public ]
-*/
-bool GLViewer_ViewPort::isTransformEnabled() const
-{
- return myEnableTransform;
-}
-
-/*!
- Enables / disables transformations. [ public ]
-*/
-void GLViewer_ViewPort::setTransformEnabled( bool enable )
-{
- myEnableTransform = enable;
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void GLViewer_ViewPort::mousePressEvent( QMouseEvent *e )
-{
- emit vpMouseEvent( e );
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void GLViewer_ViewPort::mouseMoveEvent( QMouseEvent* e )
-{
- emit vpMouseEvent( e );
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void GLViewer_ViewPort::mouseReleaseEvent( QMouseEvent *e )
-{
- emit vpMouseEvent( e );
-
- /* show popup menu */
- if ( e->button() == Qt::RightButton )
- {
- //QPopupMenu* popup = createPopup();
- //if ( popup && popup->count() )
- // popup->exec( QCursor::pos() );
- //destroyPopup( /*popup*/ );
- }
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void GLViewer_ViewPort::mouseDoubleClickEvent( QMouseEvent *e )
-{
- emit vpMouseEvent( e );
-}
-
-/*!
- Emits 'keyEvent' signal. [ virtual protected ]
-*/
-void GLViewer_ViewPort::keyPressEvent( QKeyEvent *e )
-{
- emit vpKeyEvent( e );
-}
-
-/*!
- Emits 'keyEvent' signal. [ virtual protected ]
-*/
-void GLViewer_ViewPort::keyReleaseEvent( QKeyEvent *e )
-{
- emit vpKeyEvent( e );
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void GLViewer_ViewPort::wheelEvent( QWheelEvent *e )
-{
- emit vpWheelEvent( e );
-}
-
-/*!
- Repaints the viewport. [ virtual protected ]
-*/
-void GLViewer_ViewPort::paintEvent( QPaintEvent* )
-{
- if ( myPaintersRedrawing )
- {
- QPainter p( this );
- emit vpDrawExternal( &p );
- myPaintersRedrawing = false;
- }
-}
-
-/*!
- Forces to redraw the viewport by an external painter. [ public ]
-*/
-void GLViewer_ViewPort::redrawPainters()
-{
- myPaintersRedrawing = true;
- repaint();
-}
-
-/*!
- Updates this view. Does nothing by default. [ virtual public ]
-*/
-void GLViewer_ViewPort::onUpdate()
-{
-}
-
-/*!
- Sets the background color with color selection dialog. [ virtual protected slot ]
-*/
-void GLViewer_ViewPort::onChangeBgColor()
-{
- QColor selColor = QColorDialog::getColor ( backgroundColor(), this );
- if ( selColor.isValid() )
- setBackgroundColor( selColor );
-}
-
-/*!
- Custom context menu event handler
-*/
-void GLViewer_ViewPort::contextMenuEvent( QContextMenuEvent* e )
-{
- //if ( e->reason() != QContextMenuEvent::Mouse )
- emit contextMenuRequested( e );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_ViewPort.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_VIEWPORT_H
-#define GLVIEWER_VIEWPORT_H
-
-#include "GLViewer.h"
-
-#include <qlist.h>
-#include <qcolor.h>
-#include <qaction.h>
-#include <qwidget.h>
-
-#include <Aspect_Window.hxx>
-
-class QRect;
-class QCursor;
-class QPainter;
-class GLViewer_ViewSketcher;
-class GLViewer_ViewTransformer;
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-enum BlockStatus
-{
- BS_NoBlock = 0x0000,
- BS_Highlighting = 0x0001,
- BS_Selection = 0x0002,
- BS_Dragging = 0x0004
-};
-
-/*!
- \class GLViewer_ViewPort
- Visualisation canvas of GLViewer
-*/
-class GLVIEWER_API GLViewer_ViewPort: public QWidget
-{
- Q_OBJECT
- friend class GLViewer_ViewSketcher;
- friend class GLViewer_ViewTransformer;
-
-public:
- GLViewer_ViewPort( QWidget* parent );
- ~GLViewer_ViewPort();
-
-public:
- //! Activates/deactivates sketching
- void setSketchingEnabled( bool );
- //! Checks active status of sketcher
- bool isSketchingEnabled() const;
- //! Activates/deactivates transformer
- void setTransformEnabled( bool );
- //! Checks active status of transformer
- bool isTransformEnabled() const;
-
- //! Returns background color
- virtual QColor backgroundColor() const;
- //! Sets background color
- virtual void setBackgroundColor( const QColor& );
-
- //! Redraw external pa inters
- void redrawPainters();
-
- //! Updates view
- virtual void onUpdate();
-
- //! Returns blocking status for current started operations
- virtual BlockStatus currentBlock(){ return BS_NoBlock; }
-
-protected:
- enum ViewType { Type2D, Type3D };
- void selectVisualId( ViewType );
-
- virtual QPaintDevice* getPaintDevice() { return this; }
- virtual void contextMenuEvent( QContextMenuEvent * e );
-
-//! STATICS
- static void createCursors();
- static void destroyCursors();
- static QCursor* getHandCursor() { return handCursor; }
- static void setHandCursor( const QCursor& newCursor );
- static QCursor* getPanCursor() { return panCursor; }
- static void setPanCursor( const QCursor& newCursor );
- static QCursor* getPanglCursor() { return panglCursor; }
- static void setPanglCursor( const QCursor& newCursor );
- static QCursor* getZoomCursor() { return zoomCursor; }
- static void setZoomCursor( const QCursor& newCursor );
-
-public://ouv
- static QCursor* getDefaultCursor() { return defCursor; }
- static void setDefaultCursor( const QCursor& newCursor );
- static QCursor* getRotCursor() { return rotCursor; }
- static void setRotCursor( const QCursor& newCursor );
- static QCursor* getSketchCursor() { return sketchCursor; }
- static void setSketchCursor( const QCursor& newCursor );
-
-protected:
-//! EVENTS
- virtual void paintEvent( QPaintEvent *);
- virtual void mouseMoveEvent( QMouseEvent *);
- virtual void mouseReleaseEvent( QMouseEvent *);
- virtual void mousePressEvent( QMouseEvent *);
- virtual void mouseDoubleClickEvent( QMouseEvent *);
- virtual void keyPressEvent( QKeyEvent *);
- virtual void keyReleaseEvent( QKeyEvent *);
- virtual void wheelEvent( QWheelEvent *);
-
-//! TO BE REDEFINED
- virtual void reset() = 0;
- virtual void pan( int, int ) = 0;
- virtual void setCenter( int, int ) = 0;
- virtual void zoom( int, int, int, int ) = 0;
- virtual void fitRect( const QRect& ) = 0;
- virtual void fitSelect() = 0;
- virtual void fitAll( bool keepScale = false, bool withZ = true ) = 0;
-
-protected slots:
- virtual void onChangeBgColor();
-
-signals:
- void vpKeyEvent( QKeyEvent* );
- void vpMouseEvent( QMouseEvent* );
- void vpWheelEvent( QWheelEvent* );
- void vpDrawExternal( QPainter* );
-
- void contextMenuRequested( QContextMenuEvent* );
-
-private:
- void initialize();
- void cleanup();
-
-protected:
- //Handle(Aspect_Window) myWindow;
- bool myEnableSketching;
- bool myEnableTransform;
- bool myPaintersRedrawing; /* set to draw externally */
- //QList<QAction> myPopupActions;
-
-private:
- static int nCounter; /* objects counter */
- static QCursor* defCursor;
- static QCursor* panglCursor;
- static QCursor* handCursor;
- static QCursor* panCursor;
- static QCursor* zoomCursor;
- static QCursor* rotCursor;
- static QCursor* sketchCursor;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_ViewPort2d.cxx
-// Created: November, 2004
-
-/* GLViewer_ViewPort2d Source File */
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_ViewPort2d.h"
-#include "GLViewer_Viewer2d.h"
-#include "GLViewer_ViewFrame.h"
-#include "GLViewer_MimeSource.h"
-#include "GLViewer_Context.h"
-#include "GLViewer_Compass.h"
-#include "GLViewer_Grid.h"
-
-#include <QtxToolTip.h>
-
-#include <qlayout.h>
-#include <qevent.h>
-#include <qrect.h>
-#include <qpopupmenu.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-
-#define WIDTH 640
-#define HEIGHT 480
-#define MARGIN 100
-
-#define GRID_XSIZE 100
-#define GRID_YSIZE 100
-
-int static aLastViewPostId = 0;
-
-void rotate_point( float& theX, float& theY, float theAngle )
-{
- float aTempX = theX * cos(theAngle) - theY * sin(theAngle);
- float aTempY = theX * sin(theAngle) + theY * cos(theAngle);
- theX = aTempX;
- theY = aTempY;
-}
-
-/*!
- Constructor
-*/
-GLViewer_ViewPort2d::GLViewer_ViewPort2d( QWidget* parent, GLViewer_ViewFrame* theViewFrame ) :
- GLViewer_ViewPort( parent ),
- myMargin( MARGIN ), myWidth( WIDTH ), myHeight( HEIGHT ),
- myXScale( 1.0 ), myYScale( 1.0 ), myXOldScale( 1.0 ), myYOldScale( 1.0 ),
- myXPan( 0.0 ), myYPan( 0.0 ),
- myIsMouseReleaseBlock( false )
-{
- if( theViewFrame == NULL )
- myViewFrame = ( GLViewer_ViewFrame* )parent;
- else
- myViewFrame = theViewFrame;
-
- myGrid = 0;
- myCompass = 0;
- myBorder = new GLViewer_Rect();
-
- QBoxLayout* qbl = new QHBoxLayout( this );
- myGLWidget = new GLViewer_Widget( this, 0 ) ;
- qbl->addWidget( myGLWidget );
- myGLWidget->setFocusProxy( this );
- setMouseTracking( TRUE );
-
- myIsDragProcess = noDrag;
- //myCurDragMousePos = QPoint();
- myCurDragPosX = NULL;
- myCurDragPosY = NULL;
-
- myIsPulling = false;
-
- myViewPortId = aLastViewPostId;
- aLastViewPostId++;
-
- mypFirstPoint = NULL;
- mypLastPoint = NULL;
-
- myObjectTip = new QtxToolTip( myGLWidget );///GLViewer_ObjectTip( this );
- myObjectTip->setShowDelayTime( 60000 );
- connect( myObjectTip, SIGNAL( maybeTip( QPoint, QString&, QFont&, QRect&, QRect& ) ),
- this, SLOT( onMaybeTip( QPoint, QString&, QFont&, QRect&, QRect& ) ) );
-// myGLWidget->installEventFilter( myObjectTip );
-}
-
-/*!
- Destructor
-*/
-GLViewer_ViewPort2d::~GLViewer_ViewPort2d()
-{
- if( myCompass )
- delete myCompass;
-
- if( myGrid )
- delete myGrid;
-
- delete myBorder;
- delete myGLWidget;
-}
-
-/*!
- SLOT: initializes drag process
-*/
-void GLViewer_ViewPort2d::onStartDragObject( )
-{
- if( myIsDragProcess == noDrag )
- {
- myIsDragProcess = initDrag;
- QCursor::setPos( (int)(*myCurDragPosX), (int)(*myCurDragPosY) );
- //myCurDragMousePos = QPoint( 0, 0 );
- delete myCurDragPosX;
- delete myCurDragPosY;
- myCurDragPosX = NULL;
- myCurDragPosY = NULL;
- return;
- }
-}
-
-/*!
- SLOT: cuts object to clipboard
-*/
-void GLViewer_ViewPort2d::onCutObject()
-{
- /*GLViewer_Object* aMovingObject = ((GLViewer_Viewer2d*)getViewFrame()->getViewer())->getGLContext()->getCurrentObject();
- if( aMovingObject )
- {
- GLViewer_MimeSource* aMimeSource = new GLViewer_MimeSource();
- aMimeSource->setObject( aMovingObject );
-
- QClipboard *aClipboard = QApplication::clipboard();
- aClipboard->clear();
- aClipboard->setData( aMimeSource );
-
- ((GLViewer_Viewer2d*)getViewFrame()->getViewer())->getGLContext()->deleteObject( aMovingObject );
- }*/
- GLViewer_Context* aContext = ((GLViewer_Viewer2d*)getViewFrame()->getViewer())->getGLContext();
- int aObjNum = aContext->NbSelected();
- if( aObjNum > 0 )
- {
- QValueList<GLViewer_Object*> aObjects;
- GLViewer_MimeSource* aMimeSource = new GLViewer_MimeSource();
- aContext->InitSelected();
- for( ; aContext->MoreSelected(); aContext->NextSelected() )
- aObjects.append( aContext->SelectedObject() );
-
- //aMimeSource->setObjects( aObjects ); ouv 6.05.04
-
- QClipboard *aClipboard = QApplication::clipboard();
- aClipboard->clear();
- aClipboard->setData( aMimeSource );
-
- for( int i = 0; i < aObjNum; i++ )
- aContext->deleteObject( aObjects[i] );
- }
-}
-
-/*!
- SLOT: copies object to clipboard
-*/
-void GLViewer_ViewPort2d::onCopyObject()
-{
- /*GLViewer_Object* aMovingObject = ((GLViewer_Viewer2d*)getViewFrame()->getViewer())->getGLContext()->getCurrentObject();
- if( aMovingObject )
- {
- GLViewer_MimeSource* aMimeSource = new GLViewer_MimeSource();
- aMimeSource->setObject( aMovingObject );
-
- QClipboard *aClipboard = QApplication::clipboard();
- aClipboard->clear();
- aClipboard->setData( aMimeSource );
- }
- */
- GLViewer_Context* aContext = ((GLViewer_Viewer2d*)getViewFrame()->getViewer())->getGLContext();
- int aObjNum = aContext->NbSelected();
- if( aObjNum > 0 )
- {
- QValueList<GLViewer_Object*> aObjects;
- GLViewer_MimeSource* aMimeSource = new GLViewer_MimeSource();
- aContext->InitSelected();
- for( ; aContext->MoreSelected(); aContext->NextSelected() )
- aObjects.append( aContext->SelectedObject() );
-
- //aMimeSource->setObjects( aObjects ); ouv 6.05.04
-
- QClipboard *aClipboard = QApplication::clipboard();
- aClipboard->clear();
- aClipboard->setData( aMimeSource );
- }
-}
-
-/*!
- SLOT: pastes object from clipboard
-*/
-void GLViewer_ViewPort2d::onPasteObject()
-{
- /*QClipboard *aClipboard = QApplication::clipboard();
- QMimeSource* aMimeSource = aClipboard->data();
- if( aMimeSource->provides( "GLViewer_Object" ) )
- {
- const char* aType;
- int i = 1;
- QByteArray anArray;
- do
- {
- aType = aMimeSource->format( i );
- anArray = aMimeSource->encodedData( aType );
- if( anArray.size() != 0 )
- break;
- i++;
- }
- while( aType != 0 );
- if( anArray.size() == 0 )
- return;
-
- GLViewer_Object* aObject = GLViewer_MimeSource::getObject( anArray, aType );
- if( !aObject )
- return;
-
- ((GLViewer_Viewer2d*)getViewFrame()->getViewer())->getGLContext()->insertObject( aObject, true );
- }
- */
- /* ouv 6.05.04
- QClipboard *aClipboard = QApplication::clipboard();
-
- QMimeSource* aMimeSource = aClipboard->data();
- if( aMimeSource->provides( "GLViewer_Objects" ) )
- {
- QByteArray anArray = aMimeSource->encodedData( "GLViewer_Objects" );
- QValueList<GLViewer_Object*> aObjects = GLViewer_MimeSource::getObjects( anArray, "GLViewer_Objects" );
- if( aObjects.empty() )
- return;
- GLViewer_Context* aContext = ((GLViewer_Viewer2d*)getViewFrame()->getViewer())->getGLContext();
- for( int i = 0; i < aObjects.count(); i++ )
- aContext->insertObject( aObjects[i], true );
- }
- */
-}
-
-/*!
- SLOT: called when object is being dragged
-*/
-void GLViewer_ViewPort2d::onDragObject( QMouseEvent* e )
-{
- //cout << "---GLViewer_ViewPort2d::onDragObject()---" << endl;
- GLViewer_Viewer2d* aViewer = (GLViewer_Viewer2d*)getViewFrame()->getViewer();
- GLViewer_Context* aContext = aViewer->getGLContext();
- GLViewer_Object* anObject = aContext->getCurrentObject();
-
- if( !aContext )
- return;
-
- float aX = e->pos().x();
- float anY = e->pos().y();
- aViewer->transPoint( aX, anY );
-
- if( myCurDragPosX == NULL && myCurDragPosY == NULL )
- {
- myCurDragPosX = new float(aX);
- myCurDragPosY = new float(anY);
- return;
- }
-
- //QPoint aNewPos = e->pos();
- //GLViewer_Viewer2d* aViewer = (GLViewer_Viewer2d*)getViewFrame()->getViewer();
-
- if( anObject && (e->state() & LeftButton ) )
- {
- if( aContext->isSelected( anObject ) )
- {
- for( aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected() )
- {
- GLViewer_Object* aMovingObject = aContext->SelectedObject();
- if( aMovingObject )
- aMovingObject->moveObject( aX - *myCurDragPosX, anY - *myCurDragPosY);
- }
- }
- else
- anObject->moveObject( aX - *myCurDragPosX, anY - *myCurDragPosY);
- }
- else if( aContext->NbSelected() && (e->state() & MidButton ) )
- for( aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected() )
- (aContext->SelectedObject())->moveObject( aX - *myCurDragPosX, anY - *myCurDragPosY);
-
- delete myCurDragPosX;
- delete myCurDragPosY;
- myCurDragPosX = new float(aX);
- myCurDragPosY = new float(anY);
-
- myGLWidget->updateGL();
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void GLViewer_ViewPort2d::mousePressEvent( QMouseEvent* e )
-{
- emit vpMouseEvent( e );
-
- GLViewer_Viewer2d* aViewer = (GLViewer_Viewer2d*)getViewFrame()->getViewer();
- GLViewer_Context* aContext = aViewer->getGLContext();
-
- GLViewer_Object* anObject = NULL;
- if( aContext )
- anObject = aContext->getCurrentObject();
-
- bool accel = e->state() & GLViewer_ViewTransformer::accelKey();
- if( ( anObject && !( accel || e->button() == Qt::RightButton ) ) ||
- ( aContext->NbSelected() && !accel && e->button() == Qt::MidButton ) )
- {
- myIsDragProcess = inDrag;
- }
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void GLViewer_ViewPort2d::mouseMoveEvent( QMouseEvent* e )
-{
- emit vpMouseEvent( e );
-
- if( myIsDragProcess == inDrag )
- onDragObject( e );
-
- /*GLViewer_Viewer2d* aViewer = (GLViewer_Viewer2d*)getViewFrame()->getViewer();
- GLViewer_Context* aContext = aViewer->getGLContext();
-
- GLViewer_Object* anObj = aContext->getCurrentObject();
- if( anObj && aContext->currentObjectIsChanged() )
- {
- //cout << "GLViewer_ViewPort2d::mouseMoveEvent{QToolTip::add}" << endl;
- //QToolTip::remove( myGLWidget );
- QRect* aRect = (aViewer->getWinObjectRect(anObj));
- //QToolTip::add( myGLWidget, *aRect, anObj->getToolTipText() );
- myGLWidget->addToolTip( anObj->getToolTipText(), *aRect );
- }
- if(!anObj)
- {
- //cout << "GLViewer_ViewPort2d::mouseMoveEvent{QToolTip::remove}" << endl;
- //QRect* aRect = (aViewer->getWinObjectRect(anObj));
- //QToolTip::remove( myGLWidget, *aRect );
- myGLWidget->removeToolTip();
- }*/
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void GLViewer_ViewPort2d::mouseReleaseEvent( QMouseEvent* e )
-{
- if ( myIsMouseReleaseBlock )
- {
- // skip mouse release after double click
- myIsMouseReleaseBlock = false;
- return;
- }
-
- /* show popup menu */
- if ( e->button() == Qt::RightButton )
- {
- //QPopupMenu* popup = createPopup();
- //if ( popup && popup->count() )
- // popup->exec( QCursor::pos() );
- //destroyPopup( /*popup*/ );
- }
- emit vpMouseEvent( e );
-
- if( myIsDragProcess == inDrag )
- {
- bool isAnyMoved = false;
- GLViewer_Viewer2d* aViewer = (GLViewer_Viewer2d*)getViewFrame()->getViewer();
- GLViewer_Context* aContext = aViewer->getGLContext();
- GLViewer_Object* aMovingObject;
- for( aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected() )
- {
- aMovingObject = aContext->SelectedObject();
- if( aMovingObject )
- isAnyMoved = aMovingObject->finishMove() || isAnyMoved;
- }
-
- aMovingObject = aContext->getCurrentObject();
- if( aMovingObject )
- isAnyMoved = aMovingObject->finishMove() || isAnyMoved;
-
- myIsDragProcess = noDrag;
- //myCurDragMousePos.setX( 0 );
- //myCurDragMousePos.setY( 0 );
- delete myCurDragPosX;
- delete myCurDragPosY;
- myCurDragPosX = NULL;
- myCurDragPosY = NULL;
-
- if( isAnyMoved )
- {
- emit objectMoved();
- aViewer->updateBorders();
- }
- }
-}
-
-/*!
- Custom mouse double click event handler
-*/
-void GLViewer_ViewPort2d::mouseDoubleClickEvent( QMouseEvent * e )
-{
- //redefined to block mouse release after mouse double click
- myIsMouseReleaseBlock = true;
- // invoke base implementation
- GLViewer_ViewPort::mouseDoubleClickEvent( e );
-}
-
-/*!
- Creates or deletes compass
- \param on - if it is true, then to create
-*/
-void GLViewer_ViewPort2d::turnCompass( GLboolean on )
-{
- if( on )
- myCompass = new GLViewer_Compass( Qt::green, 30, GLViewer_Compass::TopRight, 10, 5, 12, 3 );
- else if( myCompass )
- delete myCompass;
-}
-
-/*!
- Creates or deletes grid
- \param on - if it is true, then to create
-*/
-void GLViewer_ViewPort2d::turnGrid( GLboolean on )
-{
- if( on )
- {
- myGrid = new GLViewer_Grid( 2*WIDTH, 2*HEIGHT,
- 2*WIDTH, 2*HEIGHT,
- GRID_XSIZE, GRID_YSIZE,
- myXPan, myYPan,
- myXScale, myYScale );
- }
- else if( myGrid )
- delete myGrid;
-}
-
-/*!
- Changes grid color
- \param gridColor - new grid color
- \param axisColor - new axis color
-*/
-void GLViewer_ViewPort2d::setGridColor( const QColor gridColor, const QColor axisColor )
-{
- if( myGrid )
- {
- myGrid->setGridColor( ( GLfloat )gridColor.red() / 255,
- ( GLfloat )gridColor.green() / 255,
- ( GLfloat )gridColor.blue() / 255 );
- myGrid->setAxisColor( ( GLfloat )axisColor.red() / 255,
- ( GLfloat )axisColor.green() / 255,
- ( GLfloat )axisColor.blue() / 255 );
- }
-}
-
-/*!
- Changes background color
- \param color - new background color
-*/
-void GLViewer_ViewPort2d::setBackgroundColor( const QColor& color )
-{
- GLViewer_ViewPort::setBackgroundColor( color );
- myGLWidget->makeCurrent();
- glClearColor( ( GLfloat )color.red() / 255,
- ( GLfloat )color.green() / 255,
- ( GLfloat )color.blue() / 255, 1.0 );
- myGLWidget->repaint();
-}
-
-/*!
- \return background color
-*/
-QColor GLViewer_ViewPort2d::backgroundColor() const
-{
- return GLViewer_ViewPort::backgroundColor();
-}
-
-/*!
- Resize view
-*/
-void GLViewer_ViewPort2d::initResize( int x, int y )
-{
- float xa, xb, ya, yb;
- xa = myBorder->left() - myMargin;
- xb = myBorder->right() + myMargin;
- ya = myBorder->top() - myMargin;
- yb = myBorder->bottom() + myMargin;
-
- GLfloat zoom, xzoom, yzoom;
- GLfloat w = x;
- GLfloat h = y;
- bool max = FALSE;
-
- xzoom = (GLfloat)x / myWidth;
- yzoom = (GLfloat)y / myHeight;
-
- if ( ( xzoom < yzoom ) && ( xzoom < 1 ) )
- zoom = xzoom;
- else if ( ( yzoom < xzoom ) && ( yzoom < 1 ) )
- zoom = yzoom;
- else
- {
- max = TRUE;
- zoom = xzoom > yzoom ? xzoom : yzoom;
- }
-
- if ( !max && ( ! ( ( ( myXPan + w/2 ) < xb * myXScale * zoom ) ||
- ( ( myXPan - w/2 ) > xa * myXScale * zoom ) ||
- ( ( myYPan + h/2 ) < yb * myYScale * zoom ) ||
- ( ( myYPan - h/2 ) > ya * myYScale * zoom ) ) ) )
- zoom = 1;
-
- if ( max && ( ( ( myXPan + w/2 ) < xb * myXScale * zoom ) ||
- ( ( myXPan - w/2 ) > xa * myXScale * zoom ) ||
- ( ( myYPan + h/2 ) < yb * myYScale * zoom ) ||
- ( ( myYPan - h/2 ) > ya * myYScale * zoom ) ) )
- zoom = 1;
-
- myWidth = x;
- myHeight = y;
-
- myXScale *= zoom;
- myYScale = myXScale;
-
- if ( myGrid )
- myGrid->setResize( 2*x, 2*y, zoom );
-
- myGLWidget->setScale( myXScale, myYScale, 1.0 );
-}
-
-/*!
- Custom paint event handler
-*/
-void GLViewer_ViewPort2d::paintEvent( QPaintEvent* e )
-{
- //cout << "GLViewer_ViewPort2d::paintEvent" << endl;
- myGLWidget->updateGL();
- GLViewer_ViewPort::paintEvent( e );
-}
-
-/*!
- Custom resize event handler
-*/
-void GLViewer_ViewPort2d::resizeEvent( QResizeEvent* e )
-{
- //cout << "GLViewer_ViewPort2d::resizeEvent" << endl;
- GLViewer_ViewPort::resizeEvent( e );
-}
-
-/*!
- Resets view to start state
-*/
-void GLViewer_ViewPort2d::reset()
-{
- //cout << "GLViewer_ViewPort2d::reset" << endl;
-
- GLint val[4];
- GLint vpWidth, vpHeight;
-
- myGLWidget->makeCurrent();
- glGetIntegerv( GL_VIEWPORT, val );
- vpWidth = val[2];
- vpHeight = val[3];
-
- GLint w = myGLWidget->getWidth();
- GLint h = myGLWidget->getHeight();
- GLfloat zoom = vpWidth / ( GLfloat )w < vpHeight / ( GLfloat )h ?
- vpWidth / ( GLfloat )w : vpHeight / ( GLfloat )h;
-
- if( myGrid )
- {
- myGrid->setPan( 0.0, 0.0 );
- myGrid->setZoom( zoom / myXScale );
- }
-
- myXPan = 0.0;
- myYPan = 0.0;
- myXScale = zoom;
- myYScale = zoom;
-
- myGLWidget->setPan( myXPan, myYPan, 0.0 );
- myGLWidget->setScale( myXScale, myYScale, 1.0 );
- myGLWidget->setRotationAngle( 0.0 );
- myGLWidget->setRotation( 0.0, 0.0, 0.0, 1.0 );
- myGLWidget->updateGL();
-}
-
-/*!
- Sets offset to view
- \param dx - X offset
- \param dy - Y offset
-*/
-void GLViewer_ViewPort2d::pan( int dx, int dy )
-{
- //cout << "GLViewer_ViewPort2d::pan " << dx << " " << dy << endl;
-
- /*myXPan += dx / myXScale;
- myYPan += dy / myYScale;
-
- float ra, rx, ry, rz;
- myGLWidget->getRotation( ra, rx, ry, rz );
- GLfloat angle = ra * PI / 180.;
-
- if( myGrid )
- myGrid->setPan( myXPan*cos(angle) + myYPan*sin(angle),
- -myXPan*sin(angle) + myYPan*cos(angle) );
-
- */
- float ra, rx, ry, rz;
- myGLWidget->getRotation( ra, rx, ry, rz );
- GLfloat angle = ra * PI / 180.;
-
- myXPan += (dx*cos(angle) + dy*sin(angle)) / myXScale;
- myYPan += (-dx*sin(angle) + dy*cos(angle)) / myXScale;
-
- if( myGrid )
- myGrid->setPan( myXPan, myYPan );
-
- myGLWidget->setPan( myXPan, myYPan, 0.0 );
- myGLWidget->setScale( myXScale, myYScale, 1.0 );
- myGLWidget->updateGL();
-}
-
-/*!
- Sets view center in global coords
- \param x, y - global co-ordinates of center
-*/
-void GLViewer_ViewPort2d::setCenter( int x, int y )
-{
- //cout << "GLViewer_ViewPort2d::setCenter" << endl;
-
- GLint val[4];
- GLint vpWidth, vpHeight;
-
- myGLWidget->makeCurrent();
- glGetIntegerv( GL_VIEWPORT, val );
- vpWidth = val[2];
- vpHeight = val[3];
-
- myXPan -= ( x - vpWidth/2 ) / myXScale;
- myYPan += ( y - vpHeight/2 ) / myYScale;
-
- if( myGrid )
- {
- myGrid->setPan( myXPan, myYPan );
- myGrid->setZoom( myXOldScale / myXScale );
- }
-
- myXScale = myXOldScale;
- myYScale = myYOldScale;
-
- myGLWidget->setPan( myXPan, myYPan, 0.0 );
- myGLWidget->setScale( myXScale, myYScale, 1.0 );
- myGLWidget->updateGL();
-}
-
-/*!
- Process zoming transformation with mouse tracking from ( x0, y0 ) to ( x1, y1 )
-*/
-void GLViewer_ViewPort2d::zoom( int x0, int y0, int x, int y )
-{
- //cout << "GLViewer_ViewPort2d::zoom" << endl;
-
- float dx, dy, zm;
- dx = x - x0;
- dy = y - y0;
-
- if ( dx == 0. && dy == 0. )
- return;
-
- zm = sqrt(dx * dx + dy * dy) / 100. + 1;
- zm = (dx > 0.) ? zm : 1. / zm;
-
- //backup values
- float bX = myXScale;
- float bY = myYScale;
- myXScale *= zm;
- myYScale *= zm;
-
- if( myGrid )
- {
- if( myGrid->setZoom( zm ) )
- {
- myGLWidget->setPan( myXPan, myYPan, 0.0 );
- myGLWidget->setScale( myXScale, myYScale, 1.0 );
- myGLWidget->updateGL();
- }
- else
- {// undo
- myXScale = bX;
- myYScale = bY;
- }
- }
- else
- {
- myGLWidget->setPan( myXPan, myYPan, 0.0 );
- myGLWidget->setScale( myXScale, myYScale, 1.0 );
- myGLWidget->updateGL();
- }
-}
-
-/*!
- Transforms view by rectangle
- \param rect - rectangle
-*/
-void GLViewer_ViewPort2d::fitRect( const QRect& rect )
-{
- float x0, x1, y0, y1;
- float dx, dy, zm, centerX, centerY;
-
- GLint val[4];
- GLint vpWidth, vpHeight;
-
- myGLWidget->makeCurrent();
- glGetIntegerv( GL_VIEWPORT, val );
- vpWidth = val[2];
- vpHeight = val[3];
-
- x0 = rect.left();
- x1 = rect.right();
- y0 = rect.top();
- y1 = rect.bottom();
-
- dx = fabs( x1 - x0 );
- dy = fabs( y1 - y0 );
- centerX = ( x0 + x1 ) / 2.;
- centerY = ( y0 + y1 ) / 2.;
-
- if ( dx == 0. || dy == 0. )
- return;
-
- zm = vpWidth / dx < vpHeight / dy ? vpWidth / dx : vpHeight / dy;
-
- float aDX = ( vpWidth / 2. - centerX ) / myXScale;
- float aDY = ( vpHeight / 2. - centerY ) / myYScale;
-
- float ra, rx, ry, rz;
- myGLWidget->getRotation( ra, rx, ry, rz );
- GLfloat angle = ra * PI / 180.;
-
- myXPan += (aDX*cos(angle) - aDY*sin(angle));
- myYPan -= (aDX*sin(angle) + aDY*cos(angle));
-
- if( myGrid )
- myGrid->setPan( myXPan, myYPan );
-
- myXScale *= zm;
- myYScale = myXScale;
-
- if( myGrid )
- myGrid->setZoom( zm );
-
- myGLWidget->setPan( myXPan, myYPan, 0.0 );
- myGLWidget->setScale( myXScale, myYScale, 1.0 );
- myGLWidget->updateGL();
-}
-
-/*!
- Transforms view by selection
-*/
-void GLViewer_ViewPort2d::fitSelect()
-{
- GLViewer_Viewer2d* aViewer = (GLViewer_Viewer2d*)getViewFrame()->getViewer();
- GLViewer_Context* aContext = aViewer->getGLContext();
- if( !aContext )
- return;
-
- QRect aSelRect;
- for( aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected() )
- aSelRect |= *(aViewer->getWinObjectRect( aContext->SelectedObject() ));
-
- if( aSelRect.isValid() )
- {
- aSelRect.setTop( aSelRect.top() - SELECTION_RECT_GAP );
- aSelRect.setBottom( aSelRect.bottom() + SELECTION_RECT_GAP );
- aSelRect.setLeft( aSelRect.left() - SELECTION_RECT_GAP );
- aSelRect.setRight( aSelRect.right() + SELECTION_RECT_GAP );
- fitRect( aSelRect );
- }
-}
-
-/*!
- Transform view by view borders
- \param keepScale - if it is true, zoom does not change
-*/
-void GLViewer_ViewPort2d::fitAll( bool keepScale, bool withZ )
-{
- //cout << "GLViewer_ViewPort2d::fitAll" << endl;
-
- float xa, xb, ya, yb;
- float dx, dy, zm;
- float xScale, yScale;
-
- myMargin = QMAX( myBorder->width(), myBorder->height() ) / 5;
-
- xa = myBorder->left() - myMargin;
- xb = myBorder->right() + myMargin;
- ya = myBorder->bottom() - myMargin;
- yb = myBorder->top() + myMargin;
-
- float aPoints[8] = { xa, ya, xb, ya, xa, yb, xb, yb };
-
- float ra, rx, ry, rz;
- myGLWidget->getRotation( ra, rx, ry, rz );
- float angle = ra * PI / 180.;
-
- int i;
- for( i = 0; i < 7; i = i + 2 )
- rotate_point( aPoints[i], aPoints[i+1], angle );
-
- float aBorders[4] = { aPoints[0], aPoints[0], aPoints[1], aPoints[1] };
-
- for( i = 2; i < 7; i = i + 2 )
- {
- if( aBorders[0] < aPoints[i] )
- aBorders[0] = aPoints[i];
- if( aBorders[1] > aPoints[i] )
- aBorders[1] = aPoints[i];
-
- if( aBorders[2] < aPoints[i+1] )
- aBorders[2] = aPoints[i+1];
- if( aBorders[3] > aPoints[i+1] )
- aBorders[3] = aPoints[i+1];
- }
-
- GLint val[4];
- GLint vpWidth, vpHeight;
-
- myGLWidget->makeCurrent();
- glGetIntegerv( GL_VIEWPORT, val );
- vpWidth = val[2];
- vpHeight = val[3];
-
- dx = fabs( aBorders[1] - aBorders[0] );
- dy = fabs( aBorders[3] - aBorders[2] );
-
- myXPan = -( aBorders[0] + aBorders[1] ) / 2;
- myYPan = -( aBorders[2] + aBorders[3] ) / 2;
-
-
- if( keepScale )
- {
- myXOldScale = myXScale;
- myYOldScale = myYScale;
- }
-
- xScale = myXScale;
- yScale = myYScale;
- if( dx && dy )
- zm = vpWidth / dx < vpHeight / dy ? vpWidth / dx : vpHeight / dy;
- else
- zm = 1.0;
- myXScale = zm;
- myYScale = zm;
-
-
- if( myGrid )
- {
- myGrid->setPan( myXPan, myYPan );
- if( dx > dy )
- myGrid->setZoom( zm / xScale );
- else
- myGrid->setZoom( zm / yScale );
- }
-
- myGLWidget->setPan( myXPan, myYPan, 0.0 );
- myGLWidget->setScale( myXScale, myYScale, 1.0 );
- myGLWidget->updateGL();
-
- if( keepScale )
- emit vpUpdateValues();
-}
-
-/*!
- Begins rotation
- \param x, y - start point
-*/
-void GLViewer_ViewPort2d::startRotation( int x, int y )
-{
- myGLWidget->setRotationStart( x, y, 1.0 );
-}
-
-/*!
- Performs rotation
- \param intX, intY - current point
-*/
-void GLViewer_ViewPort2d::rotate( int intX, int intY )
-{
- GLint val[4];
- GLint vpWidth, vpHeight;
-
- myGLWidget->makeCurrent();
- glGetIntegerv( GL_VIEWPORT, val );
- vpWidth = val[2];
- vpHeight = val[3];
-
- float x = intX, y = intY;
- float x0 = vpWidth/2;
- float y0 = vpHeight/2;
-
- float xs, ys, zs, dx, dy;
- myGLWidget->getRotationStart( xs, ys, zs );
-
- xs = xs - x0;
- x = x - x0;
- dx = x - xs;
- ys = y0 - ys;
- y = y0 - y;
- dy = y - ys;
-
- float l1 = pow( double( xs*xs + ys*ys ), 0.5 );
- float l2 = pow( double( x*x + y*y ), 0.5 );
- float l = pow( double( dx*dx + dy*dy ), 0.5 );
-
- double mult = xs * y - x * ys;
- short sign;
- if( mult > 0 ) sign = 1;
- else if( mult < 0 ) sign = -1;
- else sign = 0;
-
- float anglePrev = myGLWidget->getRotationAngle();
- float angleNew = sign * acos( ( l1*l1 + l2*l2 - l*l ) / ( 2 * l1 * l2 )) * 180. / PI;
- float angle = anglePrev + angleNew;
-
- // GLfloat anAngle = angle * PI / 180.; unused
-
- float ra, rx, ry, rz;
- myGLWidget->getRotation( ra, rx, ry, rz );
- myGLWidget->setRotation( angle, rx, ry, rz );
- myGLWidget->updateGL();
-}
-
-/*!
- Finishes rotation
-*/
-void GLViewer_ViewPort2d::endRotation()
-{
- float ra, rx, ry, rz;
- myGLWidget->getRotation( ra, rx, ry, rz );
- myGLWidget->setRotationAngle( ra );
-}
-
-/*!
- Draws compass
-*/
-void GLViewer_ViewPort2d::drawCompass()
-{
- if( !myCompass->getVisible() )
- return;
-
- GLfloat xScale, yScale, xPan, yPan;
-
- int xPos = getWidth();
- int yPos = getHeight();
-
- int cPos = myCompass->getPos();
- int cSize = myCompass->getSize();
- QColor cCol = myCompass->getColor();
- int cWidthTop = myCompass->getArrowWidthTop();
- int cWidthBot = myCompass->getArrowWidthBottom();
- int cHeightTop = myCompass->getArrowHeightTop();
- int cHeightBot = myCompass->getArrowHeightBottom();
-
- GLfloat colorR = (cCol.red())/255;
- GLfloat colorG = (cCol.green())/255;
- GLfloat colorB = (cCol.blue())/255;
-
- float delX = cSize * 0.5;
- float delY = cSize * 0.5;
-
- getScale( xScale, yScale );
- getPan( xPan, yPan);
-
- float centerX = (xPos/2 - delX - cSize)/xScale;
- float centerY = (yPos/2 - delY - cSize)/yScale;
-
- switch ( cPos )
- {
- case GLViewer_Compass::TopLeft:
- centerX = -centerX;
- break;
- case GLViewer_Compass::BottomLeft:
- centerX = -centerX;
- centerY = -centerY;
- break;
- case GLViewer_Compass::BottomRight:
- centerY = -centerY;
- break;
- default: break;
- }
-
- float ra, rx, ry, rz;
- myGLWidget->getRotation( ra, rx, ry, rz );
- GLfloat angle = ra * PI / 180.;
- GLfloat /*r = 0.0,*/ x = 0.0 , y = 0.0;
-
- rotate_point( centerX, centerY, -angle );
-
- centerX -= xPan;
- centerY -= yPan;
-
- glColor3f( colorR, colorG, colorB );
- glBegin( GL_POLYGON );
- //arrow
- x = centerX; y = centerY + cSize / yScale;
- glVertex2f( x, y );
- //point #2
- x = centerX + cWidthTop / xScale; y = centerY + ( cSize - cHeightTop ) / yScale ;
- glVertex2f( x, y );
- //point #3
- x = centerX + cWidthBot / xScale; y = centerY + ( cSize - cHeightTop ) / yScale ;
- glVertex2f( x, y );
- //point #4
- x = centerX + cWidthBot / xScale; y = centerY - cSize/yScale;
- glVertex2f( x, y );
- //point #5
- x = centerX; y = centerY - (cSize - cHeightBot) / yScale ;
- glVertex2f( x, y );
- //point #6
- x = centerX - cWidthBot / xScale; y = centerY - cSize/yScale;
- glVertex2f( x, y );
- //point #7
- x = centerX - cWidthBot / xScale; y = centerY + ( cSize - cHeightTop ) / yScale ;
- glVertex2f( x, y );
- //point #8
- x = centerX - cWidthTop / xScale; y = centerY + ( cSize - cHeightTop ) / yScale ;
- glVertex2f( x, y );
- glEnd();
- glLineWidth( 2.0 );
- glEnable( GL_LINE_SMOOTH );
- glBegin(GL_LINE_LOOP);
- //circle
- float aCircAngle = 0;
- for ( int i = 0; i < 20 * SEGMENTS + 1; i++ )
- {
- x = centerX + cos(aCircAngle) * cSize / xScale;
- y = centerY + sin(aCircAngle) * cSize / yScale;
- glVertex2f( x, y );
- aCircAngle += float( STEP ) / 2;
- }
- glEnd();
-
- GLdouble modelMatrix[16], projMatrix[16];
- GLint viewport[4];
- GLdouble winxN, winyN, winz;
- GLdouble winxE, winyE;
- GLdouble winxS, winyS;
- GLdouble winxW, winyW;
- GLuint aTextList;
-
- GLViewer_TexFont* aFont = myCompass->getFont();
- float widN = (float)aFont->getStringWidth( "N" );
- float widW = (float)aFont->getStringWidth( "W" );
- float widS = (float)aFont->getStringWidth( "S" );
- float widE = (float)aFont->getStringWidth( "E" );
- float heightL = (float)aFont->getStringHeight();
-
- float xGapN = - widN/2 *( 1.0 + sin(angle) );
- float xGapS = - widS/2 *( 1.0 - sin(angle) );
- float xGapW = - widW/2 *( 1.0 + cos(angle) );
- float xGapE = - widE/2 *( 1.0 - cos(angle) );
-
- float yGapN = - heightL/2 *( 1.0 - cos(angle) ) * 0.75;
- float yGapS = - heightL/2 *( 1.0 + cos(angle) ) * 0.75;
- float yGapW = - heightL/2 *( 1.0 + sin(angle) ) * 0.75;
- float yGapE = - heightL/2 *( 1.0 - sin(angle) ) * 0.75;
-
- glGetIntegerv (GL_VIEWPORT, viewport);
- glGetDoublev (GL_MODELVIEW_MATRIX, modelMatrix);
- glGetDoublev (GL_PROJECTION_MATRIX, projMatrix);
-
- gluProject (centerX, centerY + cSize / yScale, 0, modelMatrix, projMatrix, viewport, &winxN, &winyN, &winz);
- gluProject (centerX + cSize / xScale, centerY, 0, modelMatrix, projMatrix, viewport, &winxE, &winyE, &winz);
- gluProject (centerX, centerY - cSize / yScale, 0, modelMatrix, projMatrix, viewport, &winxS, &winyS, &winz);
- gluProject (centerX - cSize / xScale, centerY, 0, modelMatrix, projMatrix, viewport, &winxW, &winyW, &winz);
-
- glColor3f( 1.0, 1.0, 1.0 );
-
- aTextList = glGenLists( 1 );
- glNewList( aTextList, GL_COMPILE );
-
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
- glOrtho(0,viewport[2],0,viewport[3],-100,100);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
-
- aFont->drawString( "N", winxN + xGapN, winyN + yGapN );
- aFont->drawString( "E", winxE + xGapE, winyE + yGapE );
- aFont->drawString( "S", winxS + xGapS, winyS + yGapS );
- aFont->drawString( "W", winxW + xGapW, winyW + yGapW );
-
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
-
- glEndList();
-
- if ( aTextList != -1 )
- glCallList( aTextList );
-}
-
-/*!
- \return blocking status for current started operations
-*/
-BlockStatus GLViewer_ViewPort2d::currentBlock()
-{
- if( myIsDragProcess == inDrag && myCurDragPosX != NULL && myCurDragPosY != NULL)
- return BlockStatus(BS_Highlighting | BS_Selection);
-
- if( mypFirstPoint && mypLastPoint )
- return BlockStatus(BS_Highlighting | BS_Selection);
-
- return BS_NoBlock;
-}
-
-/*!
- Initializes rectangle selection
- \param x, y - start point
-*/
-void GLViewer_ViewPort2d::startSelectByRect( int x, int y )
-{
- if( !mypFirstPoint && !mypLastPoint )
- {
- mypFirstPoint = new QPoint( x, y );
- mypLastPoint = new QPoint( x, y );
- }
-}
-
-/*!
- Draws rectangle selection
- \param x, y - current point
-*/
-void GLViewer_ViewPort2d::drawSelectByRect( int x, int y )
-{
- if( mypFirstPoint && mypLastPoint )
- {
-
- QPainter p( getPaintDevice() );
- p.setPen( Qt::white );
- p.setRasterOp( Qt::XorROP );
-
- p.drawRect( selectionRect() ); /* erase */
-
- mypLastPoint->setX( x );
- mypLastPoint->setY( y );
-
- p.drawRect( selectionRect() ); /* draw */
- }
-
-}
-
-/*!
- Finishes rectangle selection
-*/
-void GLViewer_ViewPort2d::finishSelectByRect()
-{
- if( mypFirstPoint && mypLastPoint )
- {
-
- QPainter p( getPaintDevice() );
- p.setPen( Qt::white );
- p.setRasterOp( Qt::XorROP );
-
- p.drawRect( selectionRect() ); /* erase */
-
- delete mypFirstPoint;
- delete mypLastPoint;
-
- mypFirstPoint = NULL;
- mypLastPoint = NULL;
- }
-}
-
-/*!
- \return rectangle selection
-*/
-QRect GLViewer_ViewPort2d::selectionRect()
-{
- QRect aRect;
- if( mypFirstPoint && mypLastPoint )
- {
- aRect.setLeft( QMIN( mypFirstPoint->x(), mypLastPoint->x() ) );
- aRect.setTop( QMIN( mypFirstPoint->y(), mypLastPoint->y() ) );
- aRect.setRight( QMAX( mypFirstPoint->x(), mypLastPoint->x() ) );
- aRect.setBottom( QMAX( mypFirstPoint->y(), mypLastPoint->y() ) );
- }
-
- return aRect;
-}
-
-/*!
-*/
-bool GLViewer_ViewPort2d::startPulling( GLViewer_Pnt point )
-{
- GLViewer_Viewer2d* aViewer = (GLViewer_Viewer2d*)getViewFrame()->getViewer();
- GLViewer_Context* aContext = aViewer->getGLContext();
- ObjList anObjects = aContext->getObjects();
-
- for( ObjList::Iterator it = anObjects.begin(); it != anObjects.end(); ++it )
- {
- GLViewer_Object* anObject = *it;
- GLViewer_Rect aRect = anObject->getPullingRect();
-
- if( aRect.contains( point ) && anObject->startPulling( point ) )
- {
- myIsPulling = true;
- myPullingObject = anObject;
- setCursor( *getHandCursor() );
- return true;
- }
- }
-
- return false;
-}
-
-/*!
-*/
-void GLViewer_ViewPort2d::drawPulling( GLViewer_Pnt point )
-{
- GLViewer_Viewer2d* aViewer = (GLViewer_Viewer2d*)getViewFrame()->getViewer();
- GLViewer_Context* aContext = aViewer->getGLContext();
- ObjList anObjects = aContext->getObjects();
-
- GLViewer_Object* aLockedObject = 0;
- for( ObjList::Iterator it = anObjects.begin(); it != anObjects.end(); ++it )
- {
- GLViewer_Object* anObject = *it;
- if( !anObject->getVisible() )
- continue;
-
- GLViewer_Rect aRect = anObject->getPullingRect();
-
- if( aRect.contains( point ) && anObject->portContains( point ) )
- {
- aLockedObject = anObject;
- break;
- }
- }
-
- myPullingObject->pull( point, aLockedObject );
-}
-
-/*!
-*/
-void GLViewer_ViewPort2d::finishPulling()
-{
- myIsPulling = false;
- myPullingObject->finishPulling();
- setCursor( *getDefaultCursor() );
-}
-
-/*!
- Convert rectangle in window co-ordinates to GL co-ordinates
- \return converted rectangle
-*/
-GLViewer_Rect GLViewer_ViewPort2d::win2GLV( const QRect& theRect ) const
-{
- GLViewer_Rect aRect;
-
- GLdouble modelMatrix[16], projMatrix[16];
- GLint viewport[4];
-
- GLdouble objx1, objy1;
- GLdouble objx2, objy2;
- GLdouble objz;
-
- glGetIntegerv (GL_VIEWPORT, viewport);
- glGetDoublev (GL_MODELVIEW_MATRIX, modelMatrix);
- glGetDoublev (GL_PROJECTION_MATRIX, projMatrix);
-
- gluUnProject( theRect.left(), viewport[3] - theRect.top(), 0, modelMatrix, projMatrix, viewport, &objx1, &objy1, &objz );
- gluUnProject( theRect.right(), viewport[3] - theRect.bottom(), 0, modelMatrix, projMatrix, viewport, &objx2, &objy2, &objz );
-
- aRect.setLeft( objx1 );
- aRect.setTop( objy1 );
- aRect.setRight( objx2 );
- aRect.setBottom( objy2 );
-
- return aRect;
-}
-
-/*!
- Convert rectangle in GL co-ordinates to window co-ordinates
- \return converted rectangle
-*/
-QRect GLViewer_ViewPort2d::GLV2win( const GLViewer_Rect& theRect ) const
-{
- QRect aRect;
-
- GLdouble modelMatrix[16], projMatrix[16];
- GLint viewport[4];
-
- GLdouble winx1, winy1;
- GLdouble winx2, winy2;
- GLdouble winz;
-
- glGetIntegerv (GL_VIEWPORT, viewport);
- glGetDoublev (GL_MODELVIEW_MATRIX, modelMatrix);
- glGetDoublev (GL_PROJECTION_MATRIX, projMatrix);
-
- gluProject( theRect.left(), theRect.top(), 0, modelMatrix, projMatrix, viewport, &winx1, &winy1, &winz );
- gluProject( theRect.right(), theRect.bottom(), 0, modelMatrix, projMatrix, viewport, &winx2, &winy2, &winz );
-
- aRect.setLeft( (int)winx1 );
- aRect.setTop( viewport[3] - (int)winy1 );
- aRect.setRight( (int)winx2 );
- aRect.setBottom( viewport[3] - (int)winy2 );
-
- return aRect;
-}
-
-/*!
- SLOT: called when tooltip should be shown
-*/
-void GLViewer_ViewPort2d::onMaybeTip( QPoint thePoint, QString& theText, QFont& theFont, QRect& theTextReg, QRect& theRegion )
-{
- GLViewer_Context* aContext = ((GLViewer_Viewer2d*)getViewFrame()->getViewer())->getGLContext();
-
- GLViewer_Object* anObj = aContext->getCurrentObject();
- if( anObj )
- {
- theText = anObj->getToolTipText();
- if( theText.isEmpty() )
- theText = anObj->getName();
-
- QStringList aList;
- if( anObj->isTooTipHTML() )
- aList = QStringList::split( "<br>", theText );
- else
- aList = QStringList::split( "\n", theText );
-
- if( !aList.isEmpty() )
- {
- int index = 0;
- int str_size = aList.first().length();
- for( int i = 1, size = aList.count(); i < size; i++ )
- {
- if ( str_size < (int)aList[i].length() )
- {
- index = i;
- str_size = aList[i].length();
- }
- }
- theFont = font();
- int cur_height = 24;
- QCursor* aCursor = QApplication::overrideCursor();
- if( aCursor )
- {
- const QBitmap* aBitmap = aCursor->bitmap();
- if( aBitmap )
- cur_height = aBitmap->height();
- }
-
- //temp
- QSize aSize = QLabel( theText, 0 ).sizeHint();
- theTextReg = QRect( thePoint.x(), thePoint.y() + cur_height,
- aSize.width(), aSize.height() );
- theRegion = QRect( thePoint.x(), thePoint.y(), 1, 1 );
- }
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_ViewPort2d.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_VIEWPORT2D_H
-#define GLVIEWER_VIEWPORT2D_H
-
-#ifdef WNT
-#include <windows.h>
-#endif
-
-#include <GL/gl.h>
-#include <GL/glu.h>
-
-#include "GLViewer_ViewPort.h"
-#include "GLViewer_Widget.h"
-#include "GLViewer_Geom.h"
-
-#include <qgl.h>
-#include <qcolor.h>
-#include <qwidget.h>
-#include <qpaintdevice.h>
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-class GLViewer_Compass;
-class GLViewer_Grid;
-class GLViewer_Object;
-class GLViewer_ViewFrame;
-
-class QtxToolTip;
-/*!
- * Class GLViewer_ViewPort
- * 2D visualisation canvas of GLViewer
- */
-class GLViewer_ViewPort2d: public GLViewer_ViewPort
-{
- Q_OBJECT
-
- //! Dragging states
- enum vpDragState{ noDrag, initDrag, inDrag };
-
-public:
- GLViewer_ViewPort2d( QWidget* parent, GLViewer_ViewFrame* theViewFrame = NULL );
- ~GLViewer_ViewPort2d();
-
- //! On/off rectangular grid
- void turnGrid( GLboolean on );
- //! Returns rectangular grid
- GLViewer_Grid* getGrid() const { return myGrid; }
- //! Returns grid color
- void setGridColor( const QColor gridColor, const QColor axisColor );
-
- //! Returns parent window
- GLViewer_ViewFrame* getViewFrame() const { return myViewFrame; }
- //! Returns painted widget
- GLViewer_Widget* getGLWidget() const { return myGLWidget; }
- virtual QPaintDevice* getPaintDevice() { return myGLWidget; }
-
- //! Sets background color
- void setBackgroundColor( const QColor& color);
- //! Returns background color
- QColor backgroundColor() const;
-
- //! Sets borders of scene
- void setBorder( GLViewer_Rect* border ) { myBorder = border; }
- //! Get current borders of scene
- GLViewer_Rect* getBorder() const { return myBorder; }
-
- //! Sets margin of borders
- void setMargin( GLfloat margin ) { myMargin = margin; }
- //! Returns margin of borders
- GLfloat getMargin() const { return myMargin; }
-
- //! Returns width of view
- int getWidth() const { return myWidth; }
- //! Returns height of view
- int getHeight() const { return myHeight; }
-
-
- //! Returns scale factors
- void getScale( GLfloat& xSc, GLfloat& ySc ) const { xSc = myXScale; ySc = myYScale; }
- //! returns offsets
- void getPan( GLfloat& xPan, GLfloat& yPan ) const { xPan = myXPan; yPan = myYPan; }
-
- //! Resize view
- void initResize( int width, int height );
-
- //! Begins rotation
- void startRotation( int, int );
- //! Process rotation
- void rotate( int, int );
- //! Completes rotation
- void endRotation();
-
- //! Checks of dragging process state
- bool isDragProcess(){ return myIsDragProcess; }
-
- //! On/off compass
- void turnCompass( GLboolean on );
- //! Draws compass
- void drawCompass();
-
- //! Returns unique ID of ViewPort
- int getViewPortId(){ return myViewPortId; }
-
- //! Redefined method
- virtual BlockStatus currentBlock();
-
- //! Initializes before selecting by rect
- void startSelectByRect( int x, int y );
- //! Draw selecting rectandle
- void drawSelectByRect( int x, int y );
- //! Pass rect into selector and update
- void finishSelectByRect();
-
- //! \warnign It is for ouv
- bool startPulling( GLViewer_Pnt );
- //! \warnign It is for ouv
- void drawPulling( GLViewer_Pnt );
- //! \warnign It is for ouv
- void finishPulling();
- //! \warnign It is for ouv
- bool isPulling() const { return myIsPulling; }
-
- //! Returns selection by rect
- QRect selectionRect();
-
- //! Transforms window rect to global rect
- GLViewer_Rect win2GLV( const QRect& ) const;
- //! Transforms global rect to window rect
- QRect GLV2win( const GLViewer_Rect& ) const;
-
-signals:
- //! Emits after any transformation
- void vpUpdateValues();
-
- void objectMoved();
-
-protected:
- void onDragObject( QMouseEvent* );
-
- virtual void mouseMoveEvent( QMouseEvent *);
- virtual void mousePressEvent( QMouseEvent *);
- virtual void mouseReleaseEvent( QMouseEvent *);
- virtual void mouseDoubleClickEvent( QMouseEvent *);
-
- virtual void paintEvent( QPaintEvent* );
- virtual void resizeEvent( QResizeEvent* );
-
- //! Returns view to begin state
- virtual void reset();
- //! Sets offset to view
- virtual void pan( int dx, int dy );
- //! Sets view center in global coords
- virtual void setCenter( int x, int y );
- //! Process zoming transformation with mouse tracking from ( x0, y0 ) to ( x1, y1 )
- virtual void zoom( int x0, int y0, int x1, int y1 );
- //! Transforms view by rectangle
- virtual void fitRect( const QRect& );
- //! Transforms view by selection
- virtual void fitSelect();
- //! Transform view by view borders ( if \param keepScale = true, zoom does not change )
- virtual void fitAll( bool keepScale = false, bool withZ = true );
-
-protected slots:
- //! Initializes drag process
- void onStartDragObject();
- //! Pastes object from clipboard
- void onPasteObject();
- //! Cuts object to clipboard
- void onCutObject();
- //! Copies object to clipboard
- void onCopyObject();
-
- //! Sets tool tip with \param text to \param theTextReg and on \param theViewReg whan mouse is on \param thePoint
- void onMaybeTip( QPoint thePoint, QString& text, QFont& font, QRect& theTextReg, QRect& theViewReg );
-
-protected:
- GLViewer_ViewFrame* myViewFrame;
- GLViewer_Widget* myGLWidget;
- GLViewer_Rect* myBorder;
- QColor myBackgroundColor;
-
- GLfloat myMargin;
- int myHeight;
- int myWidth;
-
- GLfloat myXScale;
- GLfloat myYScale;
- GLfloat myXOldScale;
- GLfloat myYOldScale;
- GLfloat myXPan;
- GLfloat myYPan;
-
- GLViewer_Grid* myGrid;
- GLViewer_Compass* myCompass;
-
- //dragging
- int myIsDragProcess;
- float* myCurDragPosX;
- float* myCurDragPosY;
-
- //selection by rect
- QPoint* mypFirstPoint;
- QPoint* mypLastPoint;
-
- //pulling
- bool myIsPulling;
- GLViewer_Object* myPullingObject;
-
- int myViewPortId;
-
- //GLViewer_ObjectTip* myObjectTip;
- QtxToolTip* myObjectTip;
- //! flag to block mouse release event just after mouse double-click
- bool myIsMouseReleaseBlock;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Viewer.cxx
-// Created: November, 2004
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_Viewer.h"
-#include "GLViewer_Selector.h"
-#include "GLViewer_ViewPort.h"
-#include "GLViewer_ViewFrame.h"
-
-#include "SUIT_Desktop.h"
-#include "SUIT_ViewWindow.h"
-
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qcolordialog.h>
-
-/* used for sketching */
-static QEvent* l_mbPressEvent = 0;
-
-/*!
- Constructor
-*/
-GLViewer_Viewer::GLViewer_Viewer( const QString& title )
-: SUIT_ViewModel(),
-mySelector( 0 ),
-mySketcher( 0 ),
-myTransformer( 0 ),
-mySelMode( NoSelection )
-{
-}
-
-/*!
- Destructor
-*/
-GLViewer_Viewer::~GLViewer_Viewer()
-{
- delete mySelector;
-}
-
-/*!
- Sets new view manager
- \param theViewManager - new view manager
-*/
-void GLViewer_Viewer::setViewManager(SUIT_ViewManager* theViewManager)
-{
- SUIT_ViewModel::setViewManager(theViewManager);
- if (theViewManager)
- {
- connect(theViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
- this, SLOT(onMouseEvent(SUIT_ViewWindow*, QMouseEvent*)));
-
- connect(theViewManager, SIGNAL(mouseMove(SUIT_ViewWindow*, QMouseEvent*)),
- this, SLOT(onMouseEvent(SUIT_ViewWindow*, QMouseEvent*)));
-
- connect(theViewManager, SIGNAL(mouseRelease(SUIT_ViewWindow*, QMouseEvent*)),
- this, SLOT(onMouseEvent(SUIT_ViewWindow*, QMouseEvent*)));
-
- connect(theViewManager, SIGNAL(wheel(SUIT_ViewWindow*, QWheelEvent*)),
- this, SLOT(onWheelEvent(SUIT_ViewWindow*, QWheelEvent*)));
- }
-}
-
-/*!
- Builds popup for GL viewer
-*/
-void GLViewer_Viewer::contextMenuPopup( QPopupMenu* thePopup )
-{
- if( thePopup->count() > 0 )
- thePopup->insertSeparator();
-
- thePopup->insertItem( tr( "CHANGE_BGCOLOR" ), this, SLOT( onChangeBgColor() ) );
-}
-
-/*!
- Sets the background color with color selection dialog. [ virtual protected slot ]
-*/
-void GLViewer_Viewer::onChangeBgColor()
-{
- GLViewer_ViewPort* vp = getActiveView()->getViewPort();
- QColor selColor = QColorDialog::getColor( vp->backgroundColor() );
-
- if( selColor.isValid() )
- vp->setBackgroundColor( selColor );
-}
-
-/*!
- Returns the active view. [ public ]
-*/
-GLViewer_ViewFrame* GLViewer_Viewer::getActiveView() const
-{
- SUIT_ViewManager* aMgr = getViewManager();
- return (GLViewer_ViewFrame*)( aMgr != 0 ? aMgr->getActiveView() : 0 );
-}
-
-
-/*!
- Sets the selection mode for this viewer. [ public ]
-*/
-void GLViewer_Viewer::setSelectionMode( GLViewer_Viewer::SelectionMode mode )
-{
- if ( mySelMode != mode )
- {
- mySelMode = mode;
- onSelectionModeChanged();
- }
-}
-
-/*!
- Returns selector of this viewer. [ public ]
-*/
-GLViewer_Selector* GLViewer_Viewer::getSelector() const
-{
- if ( !mySelector )
- {
- GLViewer_Viewer* mthis = (GLViewer_Viewer*)this;
- mthis->mySelector = mthis->createSelector();
- if ( mySelector )
- {
- connect( mySelector, SIGNAL( selSelectionDone( bool, SelectionChangeStatus ) ), SLOT( onSelectionDone( bool, SelectionChangeStatus ) ) );
- connect( mySelector, SIGNAL( selSelectionCancel() ), SLOT( onSelectionCancel() ) );
- }
- }
- return mySelector;
-}
-
-/*!
- Returns the selection mode of this viewer. [ public ]
-*/
-GLViewer_Viewer::SelectionMode GLViewer_Viewer::getSelectionMode() const
-{
- return mySelMode;
-}
-
-/*!
- Handles requests for sketching in the active view. [ virtual public ]
-*/
-void GLViewer_Viewer::activateSketching( int type )
-{
- GLViewer_ViewPort* vp = 0;
- if ( !getActiveView() || !( vp = getActiveView()->getViewPort() ) )
- return;
-
- if ( !vp->isSketchingEnabled() )
- return;
-
- /* Finish current sketching */
- if ( type == NoSketching )
- {
- if ( mySketcher )
- {
- onSketchingFinished();
- delete mySketcher;
- mySketcher = 0;
- }
- }
- /* Activate new sketching */
- else
- {
- activateSketching( NoSketching ); /* concurrency not suported */
- mySketcher = createSketcher( type );
- onSketchingStarted();
- }
-}
-
-/*!
- Handles requests for transformations in the active view. [ virtual public ]
-*/
-void GLViewer_Viewer::activateTransform( int type )
-{
- GLViewer_ViewPort* vp = 0;
- if ( !getActiveView() || !( vp = getActiveView()->getViewPort() ) )
- return;
-
- if ( !vp->isTransformEnabled() )
- return;
-
- /* Finish current transform */
- if ( type == NoTransform )
- {
- if ( myTransformer )
- {
- onTransformationFinished();
- delete myTransformer;
- myTransformer = 0;
- }
- }
- /* Activate new transform */
- else
- {
- activateTransform( NoTransform ); /* concurrency not suported */
- myTransformer = createTransformer( type );
- onTransformationStarted();
- myTransformer->exec();
- }
-}
-
-/*!
- Creates default transformer. [ virtual protected ]
-*/
-GLViewer_ViewTransformer* GLViewer_Viewer::createTransformer( int type )
-{
- return new GLViewer_ViewTransformer( this, type );
-}
-
-/*!
- Creates default sketcher. [ virtual protected ]
-*/
-GLViewer_ViewSketcher* GLViewer_Viewer::createSketcher( int type )
-{
- return new GLViewer_ViewSketcher( this, type );
-}
-
-/*!
- Returns null by default. [ virtual protected ]
-*/
-GLViewer_Selector* GLViewer_Viewer::createSelector()
-{
- return 0;
-}
-
-/*!
- Unhilights detected entities, lock selection, sets event filter
- on the whole application. [ virtual protected ]
-*/
-void GLViewer_Viewer::onTransformationStarted()
-{
- unhilightDetected();
- if ( getSelector() )
- getSelector()->lock( true ); /* disable selection */
-
- /* Watch events: any mouse/key event outside the
- viewport will be considered as the end of
- transform */
- if( !myTransformer )
- return;
- qApp->installEventFilter( this );
-}
-
-/*!
- Unlock selection, removes event filter. [ virtual protected ]
-*/
-void GLViewer_Viewer::onTransformationFinished()
-{
- if ( getSelector() )
- getSelector()->lock( false ); /* enable selection */
-
- /* Stop watch events */
- if( !myTransformer )
- return;
- qApp->removeEventFilter( this );
-}
-
-/*!
- Unhilights detected entities. [ virtual protected ]
-*/
-void GLViewer_Viewer::onSketchingStarted()
-{
- unhilightDetected();
-}
-
-/*!
- Selection by rectangle. [ virtual protected ]
-*/
-void GLViewer_Viewer::onSketchingFinished()
-{
- if ( !getSelector() )
- return;
-
- if( !mySketcher )
- return;
- if ( mySketcher->type() == Rect )
- {
- QRect* selRect = (QRect*)mySketcher->data();
- if ( selRect )
- {
- bool append = bool( mySketcher->buttonState() & GLViewer_Selector::appendKey() );
- getSelector()->select( *selRect, append );
- }
- }
-}
-
-/*!
- Installed while 'fit area' and 'global panning' operations are active. [ virtual protected ]
-*/
-bool GLViewer_Viewer::eventFilter( QObject* o, QEvent* e )
-{
- if( !getActiveView() )
- return false;
-
- if( getActiveView()->getViewPort() == o->parent() )
- o = o->parent();
-
- bool mouseClickedOutside = ( e->type() == QEvent::MouseButtonPress &&
- o != getActiveView()->getViewPort() );
- bool anyKeyPressed = ( e->type() == QEvent::KeyPress );
- if ( mouseClickedOutside || anyKeyPressed )
- { /* terminate all */
- activateTransform( NoTransform );
- activateSketching( NoSketching );
- //cout << "mouseClickedOutside || anyKeyPressed" << endl;
- }
- return QObject::eventFilter( o, e );
-}
-
-/*!
- Called when smth is selected in this viewer. [ virtual protected slot ]
-*/
-void GLViewer_Viewer::onSelectionDone( bool bAdded, SelectionChangeStatus status )
-{
- emit selectionChanged( status );
-}
-
-/*!
- Called when selection is cleared in this viewer. [ virtual protected slot ]
-*/
-void GLViewer_Viewer::onSelectionCancel()
-{
- emit selectionChanged( SCS_Invalid );
-}
-
-/*!
- Listens to key events of the active view. [ virtual protected slot ]
-*/
-void GLViewer_Viewer::onKeyEvent( SUIT_ViewWindow*, QKeyEvent* )
-{
-}
-
-/*!
- Listens to mouse events of the active view. [ virtual protected slot ]
-*/
-void GLViewer_Viewer::onMouseEvent( SUIT_ViewWindow*, QMouseEvent* e )
-{
- //cout << "GLViewer_Viewer::onMouseEvent" << endl;
- switch( e->type() )
- {
- case QEvent::MouseButtonPress:
- handleMousePress( e );
- break;
- case QEvent::MouseMove:
- handleMouseMove( e );
- break;
- case QEvent::MouseButtonRelease:
- handleMouseRelease( e );
- break;
- default: break;
- }
-}
-
-/*!
- Listens to mouse events of the active view. [ virtual protected slot ]
-*/
-void GLViewer_Viewer::onWheelEvent( SUIT_ViewWindow*, QWheelEvent* e )
-{
- //cout << "GLViewer_Viewer::onMouseEvent" << endl;
- switch( e->type() )
- {
- case QEvent::Wheel:
- handleWheel( e );
- break;
- default: break;
- }
-}
-
-/*!
- Enables / disables rectangle sketching. [ virtual protected ]
-*/
-void GLViewer_Viewer::onSelectionModeChanged()
-{
- bool enable = ( mySelMode == Multiple );
- QPtrVector<SUIT_ViewWindow> views = getViewManager()->getViews();
- for ( int i = 0, n = views.count(); i < n; i++ )
- {
- GLViewer_ViewPort* vp = ((GLViewer_ViewFrame*)views[i])->getViewPort();
- if ( vp )
- vp->setSketchingEnabled( enable );
- }
-}
-
-/*!
- Updates all views of this viewer. Use 'flags' to customize update process. [ virtual public ]
-*/
-void GLViewer_Viewer::update( int flags )
-{
- QPtrVector<SUIT_ViewWindow> views = getViewManager()->getViews();
- for ( int i = 0, n = views.count(); i < n; i++ )
- ((GLViewer_ViewFrame*)views[i])->onUpdate( flags );
-}
-
-/*!
- Unhilights the currect detected objects. [ virtual private ]
-*/
-void GLViewer_Viewer::unhilightDetected()
-{
- if ( getSelector() )
- getSelector()->undetectAll();
-}
-
-/*!
- Mouse press handler. If 'accelKey()' is pressed, activates default
- transformations( Zoom or Pan ) in the active viewport. [ private ]
-*/
-void GLViewer_Viewer::handleMousePress( QMouseEvent* e )
-{
- /* test accel for transforms */
- if ( e->state() & GLViewer_ViewTransformer::accelKey() )
- {
- ButtonState bs = e->button();
- if ( bs == GLViewer_ViewTransformer::zoomButton() )
- activateTransform( Zoom );
- else if ( bs == GLViewer_ViewTransformer::panButton() )
- activateTransform( Pan );
- }
- else
- {
- //checking for other operations before selection in release event
- startOperations( e );
- }
-
- /* we may need it for sketching... */
- l_mbPressEvent = new QMouseEvent( *e );
-
- //checking for other operations before selection in release event
-// startOperations( e );
-
- /*e->button() == LeftButton && getSelector() )
- {
- bool append = bool ( e->state() & GLViewer_Selector::appendKey() );
- getSelector()->select( append );
- }*/
-}
-
-/*!
- Mouse move handler. If dragged with MB1, activates rectangle sketching in
- the active viewport, otherwise highlights the selectable entities. [ private ]
-*/
-void GLViewer_Viewer::handleMouseMove( QMouseEvent* e )
-{
- /* Highlight for selection */
- bool dragged = ( e->state() & ( LeftButton | MidButton | RightButton ) );
- if ( !dragged )
- {
- if ( getSelector() )
- getSelector()->detect( e->x(), e->y() );
- }
- /* Try to activate default sketching
- */
- else if ( e->state() == GLViewer_ViewSketcher::sketchButton() )
- {
- activateSketching( Rect );
- if ( mySketcher )
- {
- /* Activated OK. We should not forget initial mousepress
- event and this mousemove event to start sketching from
- the point of initial click */
- if ( l_mbPressEvent )
- {
- QApplication::sendEvent( getActiveView()->getViewPort(), l_mbPressEvent );
- delete l_mbPressEvent;
- l_mbPressEvent = 0;
- }
- QApplication::sendEvent( getActiveView()->getViewPort(), e );
- }
- }
-
- //Try to activate other operations
- updateOperations( e );
-}
-
-/*!
- Mouse move handler. Activates popup of the active view. [ private ]
-*/
-void GLViewer_Viewer::handleMouseRelease( QMouseEvent* e )
-{
- /* selection */
- /* tmp - in handleMousePress*/
- if( e->button() == LeftButton && !(getActiveView()->getViewPort()->currentBlock() & BS_Selection) )
- {
- if ( getSelector() )
- {
- bool append = bool ( e->state() & GLViewer_Selector::appendKey() );
- getSelector()->select( append );
- }
- }
-
- //Try to done active operations
- finishOperations( e );
-
- if ( l_mbPressEvent )
- {
- delete l_mbPressEvent;
- l_mbPressEvent = 0;
- }
-}
-
-/*!
- Wheel rolling handler
-*/
-void GLViewer_Viewer::handleWheel( QWheelEvent* e )
-{
- startOperations( e );
-}
-
-int GLViewer_ViewTransformer::panBtn = Qt::MidButton;
-int GLViewer_ViewTransformer::zoomBtn = Qt::LeftButton;
-int GLViewer_ViewTransformer::fitRectBtn = Qt::LeftButton;
-int GLViewer_ViewTransformer::panGlobalBtn = Qt::LeftButton;
-int GLViewer_ViewTransformer::acccelKey = Qt::ControlButton;
-
-/*!
- Constructor
-*/
-GLViewer_ViewTransformer::GLViewer_ViewTransformer( GLViewer_Viewer* v, int type )
-: QObject( 0 ),
-myViewer( v ),
-myType( type ),
-myMajorBtn( NoButton ),
-myButtonState( 0 )
-{
- if ( myType == GLViewer_Viewer::Pan ||
- myType == GLViewer_Viewer::Zoom ||
- myType == GLViewer_Viewer::PanGlobal ||
- myType == GLViewer_Viewer::FitRect )
- {
- /* 'long' transforms need this */
- initTransform( true );
- }
-}
-
-/*!
- Destructor
-*/
-GLViewer_ViewTransformer::~GLViewer_ViewTransformer()
-{
- if ( myType == GLViewer_Viewer::Pan ||
- myType == GLViewer_Viewer::Zoom ||
- myType == GLViewer_Viewer::PanGlobal ||
- myType == GLViewer_Viewer::FitRect )
- {
- /* 'long' transforms need this */
- initTransform( false );
- }
-
- //QAD_Application::getDesktop()->clearInfo();
-}
-
-/*!
- Inits long transformations ( Zoom, Pan etc ) [ protected ]
-
- Saves viewport state( cursor etc ) and installs event filter to process
- mouse events if 'init' is true. Restores viewport state if 'init' is false.
-*/
-void GLViewer_ViewTransformer::initTransform( bool init )
-{
- GLViewer_ViewPort* avp = myViewer->getActiveView()->getViewPort();
- if ( init )
- {
- mySavedCursor = avp->cursor();
- mySavedMouseTrack = avp->hasMouseTracking();
- avp->setMouseTracking( false );
- avp->installEventFilter( this );
- }
- else
- {
- avp->removeEventFilter( this );
- avp->setMouseTracking( mySavedMouseTrack );
- avp->setCursor( mySavedCursor );
- }
-}
-
-/*!
- Runs transfomation. Redefine to add your own 'instant' transforms
- ( for ex., 'FitAll' is an instant transform ). [ virtual public ]
-*/
-void GLViewer_ViewTransformer::exec()
-{
- GLViewer_ViewPort* avp = myViewer->getActiveView()->getViewPort();
- if( !avp )
- return;
-
- switch( myType )
- {
- case GLViewer_Viewer::Zoom:
- myMajorBtn = zoomButton();
- avp->setCursor( *avp->getZoomCursor() );
- break;
- case GLViewer_Viewer::Pan:
- myMajorBtn = panButton();
- avp->setCursor( *avp->getPanCursor() );
- break;
- case GLViewer_Viewer::PanGlobal:
- myMajorBtn = panGlobalButton();
- avp->setCursor( *avp->getPanglCursor() );
- avp->fitAll( true, false ); /* view is ready now */
- break;
- case GLViewer_Viewer::FitRect:
- myMajorBtn = fitRectButton();
- avp->setCursor( *avp->getHandCursor() );
- break;
- case GLViewer_Viewer::Reset:
- avp->reset(); onTransform( Fin );
- break;
- case GLViewer_Viewer::FitAll:
- avp->fitAll(); onTransform( Fin );
- break;
- case GLViewer_Viewer::FitSelect:
- avp->fitSelect(); onTransform( Fin );
- break;
- default: break;
- }
-}
-
-/*!
- Catches mouse events for the viewport. [ virtual protected ]
-*/
-bool GLViewer_ViewTransformer::eventFilter( QObject* o, QEvent* e )
-{
- switch ( e->type() )
- {
- case QEvent::MouseMove:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- {
- TransformState state = EnTrain;
- QMouseEvent* me = ( QMouseEvent* )e;
-
- myButtonState = me->state();
- if ( e->type() == QEvent::MouseButtonPress )
- myButtonState |= me->button(); /* add pressed button */
-
- int mouseOnlyState = ( myButtonState & ( LeftButton | MidButton | RightButton ) );
- if ( myStart.isNull() )
- {
- state = Debut;
- myStart = me->pos();
- myMajorBtn = mouseOnlyState;
- }
-
- if ( e->type() == QEvent::MouseButtonRelease && mouseOnlyState == myMajorBtn )
- {
- state = Fin;
- }
- myCurr = me->pos();
- onTransform( state );
- return true;
- }
- default: break;
- }
- return QObject::eventFilter( o, e );
-}
-
-/*!
- Transforms the viewport. Used for 'non-instant' transforms
- only( ex. Rotate, Pan etc ). [ virtual protected ]
-*/
-void GLViewer_ViewTransformer::onTransform( TransformState state )
-{
- GLViewer_ViewPort* avp = myViewer->getActiveView()->getViewPort();
- bool doTrsf = ( myButtonState & myMajorBtn );
- switch ( myType )
- {
- case GLViewer_Viewer::Zoom:
- if ( state != Fin && doTrsf )
- {
- avp->zoom( myStart.x(), myStart.y(), myCurr.x(), myCurr.y() );
- myStart = myCurr;
- }
- break;
- case GLViewer_Viewer::Pan:
- if ( state != Fin && doTrsf )
- {
- avp->pan( myCurr.x() - myStart.x(), myStart.y() - myCurr.y() );
- myStart = myCurr;
- }
- break;
- case GLViewer_Viewer::PanGlobal:
- {
- if ( state == Fin )
- avp->setCenter( myCurr.x(), myCurr.y() );
- break;
- }
- case GLViewer_Viewer::FitRect:
- {
- if ( doTrsf )
- {
- QRect rect( QMIN( myStart.x(), myCurr.x() ), QMIN( myStart.y(), myCurr.y() ),
- QABS( myStart.x() - myCurr.x() ), QABS( myStart.y() - myCurr.y() ) );
- if ( !rect.isEmpty() )
- {
- switch ( state )
- {
- case Fin:
- avp->fitRect( rect );
- break;
- default:
- {
- QPainter p( avp->getPaintDevice() ); // for QAD_GLWidget
- p.setPen( Qt::white );
- p.setRasterOp( Qt::XorROP );
- if ( !myDrawRect.isEmpty() )
- p.drawRect( myDrawRect ); /* erase */
- p.drawRect( rect );
- myDrawRect = rect;
- break;
- }
- }
- }
- }
- break;
- }
- default:
- break;
- }
-
- if ( state == Fin )
- myViewer->activateTransform( GLViewer_Viewer::NoTransform );
-}
-
-/*!
- Returns the type of the transformer. [ public ]
-*/
-int GLViewer_ViewTransformer::type() const
-{
- return myType;
-}
-
-
-int GLViewer_ViewSketcher::sketchBtn = LeftButton;
-
-/*!
- Constructor
-*/
-GLViewer_ViewSketcher::GLViewer_ViewSketcher( GLViewer_Viewer* viewer, int type )
-: QObject( 0 ),
-myViewer( viewer ),
-myData( 0 ),
-myType( type )
-{
- if( !myViewer )
- return;
- GLViewer_ViewPort* avp = myViewer->getActiveView()->getViewPort();
- if( !avp )
- return;
-
- mySavedCursor = avp->cursor();
- avp->setCursor( *GLViewer_ViewPort::getHandCursor() );
- avp->installEventFilter( this );
-
- if ( myType == GLViewer_Viewer::Rect )
- myData = new QRect();
-}
-
-/*!
- Destructor
-*/
-GLViewer_ViewSketcher::~GLViewer_ViewSketcher()
-{
- GLViewer_ViewPort* avp = myViewer->getActiveView()->getViewPort();
- avp->removeEventFilter( this );
- avp->setCursor( mySavedCursor );
-
- if ( myType == GLViewer_Viewer::Rect )
- delete ( QRect* ) myData;
-}
-
-/*!
- Catches mouse events for the viewport. [ virtual protected ]
-*/
-bool GLViewer_ViewSketcher::eventFilter( QObject* o, QEvent* e )
-{
- switch ( e->type() )
- {
- case QEvent::MouseMove:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- {
- SketchState state = EnTrain;
- QMouseEvent* me = (QMouseEvent*)e;
-
- myButtonState = me->state();
- if ( e->type() == QEvent::MouseButtonPress )
- myButtonState |= me->button(); /* add pressed button */
-
- if ( myStart.isNull() )
- {
- state = Debut;
- myStart = me->pos();
- }
-
- int mouseOnlyState = ( myButtonState & ( LeftButton | MidButton | RightButton ) );
- if ( e->type() == QEvent::MouseButtonRelease && mouseOnlyState == sketchButton() )
- {
- state = Fin;
- }
- myCurr = me->pos();
- onSketch( state );
- return true;
- }
- default: break;
- }
- return QObject::eventFilter( o, e );
-}
-
-/*!
- Draws in the viewport. [ virtual protected ]
-*/
-void GLViewer_ViewSketcher::onSketch( SketchState state )
-{
- GLViewer_ViewPort* avp = myViewer->getActiveView()->getViewPort();
- if( !avp )
- return;
-
- if( myType == GLViewer_Viewer::Rect )
- {
- QRect* sketchRect = ( QRect* )data();
- if ( myButtonState & sketchButton() )
- {
- QRect rect( QMIN( myStart.x(), myCurr.x() ), QMIN( myStart.y(), myCurr.y() ),
- QABS( myStart.x() - myCurr.x() ), QABS( myStart.y() - myCurr.y() ) );
- if ( !rect.isEmpty() )
- {
- QPainter p( avp );
- p.setPen( Qt::white );
- p.setRasterOp( Qt::XorROP );
- if ( !sketchRect->isEmpty() )
- p.drawRect( *sketchRect ); /* erase */
- *sketchRect = rect;
- if ( state != Fin )
- p.drawRect( *sketchRect );
- }
- }
- }
-
- if ( state == Fin )
- {
- QApplication::syncX(); /* force rectangle redrawing */
- myViewer->activateSketching( GLViewer_Viewer::NoSketching );
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Viewer.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_VIEWER_H
-#define GLVIEWER_VIEWER_H
-
-#include "GLViewer_Defs.h"
-#include "GLViewer_ViewFrame.h"
-#include <SUIT_ViewModel.h>
-
-#include <qlist.h>
-#include <qcursor.h>
-#include <qobject.h>
-#include <qpixmap.h>
-
-class GLViewer_Selector;
-class GLViewer_ViewSketcher;
-class GLViewer_ViewTransformer;
-
-class SUIT_Desktop;
-class SUIT_ViewWindow;
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- \class GLViewer_Object
- Base Viewer for GLViewer
-*/
-class GLVIEWER_API GLViewer_Viewer: public SUIT_ViewModel
-{
- Q_OBJECT
-
-public:
- enum SelectionMode { NoSelection, Single, Multiple };
- enum TransformType { NoTransform, Reset, FitAll, FitRect, FitSelect,
- Zoom, PanGlobal, Pan, Rotate, UserTransform = 100 };
- enum SketchingType { NoSketching, Rect, UserSketching = 100 };
-
-public:
- GLViewer_Viewer( const QString& title );
- ~GLViewer_Viewer();
-
-public:
- virtual void setViewManager( SUIT_ViewManager* theViewManager );
- virtual QString getType() const { return Type(); }
- static QString Type() { return "GLViewer_ViewModel"; }
-
- virtual void contextMenuPopup( QPopupMenu* );
-
-public:
- void setSelectionMode( SelectionMode );
- SelectionMode getSelectionMode() const;
- GLViewer_Selector* getSelector() const;
-
- virtual void update( int = 0 );
-
- void activateTransform( int );
- void activateSketching( int );
-
- GLViewer_ViewFrame* getActiveView() const;
-
-signals:
- void selectionChanged( SelectionChangeStatus );
-
-protected:
- virtual void onSketchingStarted();
- virtual void onSketchingFinished();
- virtual void onTransformationStarted();
- virtual void onTransformationFinished();
- virtual void onSelectionModeChanged();
-
- virtual void unhilightDetected();
- virtual bool eventFilter( QObject*, QEvent* );
-
- /* virtual constructors */
- virtual GLViewer_ViewTransformer* createTransformer( int );
- virtual GLViewer_ViewSketcher* createSketcher( int );
- virtual GLViewer_Selector* createSelector();
-
- virtual void startOperations( QMouseEvent* ) {}
- virtual bool updateOperations( QMouseEvent* ) { return false; }
- virtual void finishOperations( QMouseEvent* ) {}
- virtual void startOperations( QWheelEvent* ) {}
-
-protected slots:
- virtual void onKeyEvent( SUIT_ViewWindow*, QKeyEvent* );
- virtual void onMouseEvent( SUIT_ViewWindow*, QMouseEvent* );
- virtual void onWheelEvent( SUIT_ViewWindow*, QWheelEvent* );
-
- virtual void onSelectionCancel();
- virtual void onSelectionDone( bool add, SelectionChangeStatus status );
-
- virtual void onChangeBgColor();
-
-private:
- void handleMouseMove( QMouseEvent* );
- void handleMousePress( QMouseEvent* );
- void handleMouseRelease( QMouseEvent* );
- void handleWheel( QWheelEvent* );
-
-protected:
- GLViewer_Selector* mySelector; /* selector */
- SelectionMode mySelMode; /* current selection mode */
- GLViewer_ViewSketcher* mySketcher; /* sketch manipulator */
- GLViewer_ViewTransformer* myTransformer; /* transform manipulator */
-};
-
-class GLVIEWER_API GLViewer_ViewTransformer : public QObject
-{
-public:
- GLViewer_ViewTransformer( GLViewer_Viewer*, int type );
- ~GLViewer_ViewTransformer();
-
-public:
- /*! Returns transformer type */
- int type() const;
-
- /*! Sets/returns acceleration key ( CTRL by default ) */
- static int accelKey() { return acccelKey; }
- static void setAccelKey( int k ) { acccelKey = k; }
-
- /*! Sets/returns mouse button used for zooming ( MB1 by default ) */
- static int zoomButton() { return zoomBtn; }
- static void setZoomButton( int b ) { zoomBtn = b; }
-
- /*! Sets/returns mouse button used for panning ( MB2 by default ) */
- static int panButton() { return panBtn; }
- static void setPanButton( int b ) { panBtn = b; }
-
- /*! Sets/returns mouse button used for global pan ( MB1 by default ) */
- static int panGlobalButton() { return panGlobalBtn; }
- static void setPanGlobalButton( int b ) { panGlobalBtn = b; }
-
- /*! Sets/returns mouse button used for fit area ( MB1 by default ) */
- static int fitRectButton() { return fitRectBtn; }
- static void setFitRectButton( int b ) { fitRectBtn = b; }
-
- virtual void exec();
- virtual bool eventFilter( QObject*, QEvent* );
-
-protected:
- enum TransformState { Debut, EnTrain, Fin };
- virtual void onTransform( TransformState );
- void initTransform( bool );
-
-protected:
- static int panBtn;
- static int zoomBtn;
- static int fitRectBtn;
- static int panGlobalBtn;
-
- static int acccelKey;
-
- GLViewer_Viewer* myViewer;
- int myType;
- QCursor mySavedCursor;
- bool mySavedMouseTrack;
- QPoint myStart, myCurr;
- int myButtonState;
- QRect myDrawRect;
- int myMajorBtn;
-};
-
-class GLVIEWER_API GLViewer_ViewSketcher : public QObject
-{
-public:
- GLViewer_ViewSketcher( GLViewer_Viewer*, int type );
- ~GLViewer_ViewSketcher();
-
-public:
- /*! Returns sketcher type */
- int type() const { return myType; }
-
- /*! Returns result of sketching */
- void* data() const { return myData; }
-
- /*! Returns current state of mouse/sys kbd buttons */
- int buttonState() const { return myButtonState; }
-
- /*! Sets/returns mouse button used for sketching ( MB1 by default ) */
- static int sketchButton() { return sketchBtn; }
- static void setSketchButton( int b ) { sketchBtn = b; }
-
- virtual bool eventFilter( QObject*, QEvent* );
-
-protected:
- enum SketchState { Debut, EnTrain, Fin };
- virtual void onSketch( SketchState );
-
-protected:
- static int sketchBtn;
- GLViewer_Viewer* myViewer;
- int myType;
- void* myData;
- QCursor mySavedCursor;
- QPoint myStart, myCurr;
- int myButtonState;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Viewer2d.cxx
-// Created: November, 2004
-
-//#include <GLViewerAfx.h>
-#include "GLViewer_Viewer2d.h"
-#include "GLViewer_Object.h"
-#include "GLViewer_BaseObjects.h"
-#include "GLViewer_CoordSystem.h"
-#include "GLViewer_Context.h"
-#include "GLViewer_Drawer.h"
-#include "GLViewer_Selector2d.h"
-//#include "GLViewer_Sketcher.h"
-#include "GLViewer_ViewPort2d.h"
-
-#include "SUIT_Desktop.h"
-#include "SUIT_ViewWindow.h"
-
-#include "OSD_Timer.hxx"
-#include <TColStd_MapOfInteger.hxx>
-
-#include <qpopupmenu.h>
-#include <qpointarray.h>
-#include <qcolordialog.h>
-
-/*!
- Constructor
- \param title - viewer title
-*/
-GLViewer_Viewer2d::GLViewer_Viewer2d( const QString& title) :
-GLViewer_Viewer( title )
-{
- myGLContext = new GLViewer_Context( this );
-
- //myGLSketcher = new GLViewer_Sketcher( this );
-
- createSelector();
-
- mySelMode = GLViewer_Viewer::Multiple;
-
- myDrawers.clear();
-}
-
-/*!
- Destructor
-*/
-GLViewer_Viewer2d::~GLViewer_Viewer2d()
-{
- //myGLSketcher = 0;
- //delete myGLSketcher;
- GLViewer_TexFont::clearTextBases();
-}
-
-/*!Create new instance of view window on desktop \a theDesktop.
- *\retval SUIT_ViewWindow* - created view window pointer.
- */
-SUIT_ViewWindow* GLViewer_Viewer2d::createView( SUIT_Desktop* theDesktop )
-{
- return new GLViewer_ViewFrame( theDesktop, this );
-}
-
-/*!
- Adds item for change background color
- \param thePopup - menu
-*/
-void GLViewer_Viewer2d::addPopupItems( QPopupMenu* thePopup )
-{
- // CTH8434. "Change background color" menu item is available if there are no selected objects
- if ( getSelector() == 0 || getSelector()->numSelected() == 0 )
- {
- if( thePopup->count() > 0 )
- thePopup->insertSeparator();
- thePopup->insertItem( tr( "CHANGE_BGCOLOR" ), this, SLOT( onChangeBgColor() ) );
- }
-}
-
-/*!
- Changes background color
-*/
-void GLViewer_Viewer2d::onChangeBgColor()
-{
- if( !getActiveView() )
- return;
- GLViewer_ViewPort2d* vp = ( ( GLViewer_ViewPort2d* )getActiveView()->getViewPort() );
-
- QColor selColor = QColorDialog::getColor( vp->backgroundColor(), vp );
- if ( selColor.isValid() ) {
- vp->setBackgroundColor( selColor );
- }
-}
-
-/*!
- Updates colors for all drawers (does not work)
-*/
-void GLViewer_Viewer2d::updateColors( QColor colorH, QColor colorS )
-{
-// cout << "GLViewer_Viewer2d::updateColors" << endl;
-
-/*
- for ( DrawerMap::Iterator it = myDrawers.begin(); it != myDrawers.end(); ++it )
- {
- it.key()->setHColor( colorH );
- it.key()->setSColor( colorS );
- }
-*/
- /*
- ObjList anObjects = myGLContext->getObjects();
- ObjList::Iterator beginIt = anObjects.begin();
- ObjList::Iterator endIt = anObjects.end();
- for ( ObjList::Iterator it = beginIt; it != endIt; ++it )
- {
- //GLViewer_Drawer* aDrawer = (*it)->getDrawer();
- //aDrawer->setHColor( colorH );
- //aDrawer->setSColor( colorS );
- }
- */
-
-
- activateAllDrawers( TRUE );
-}
-
-/*!
- Updates rect of global scene by adding new rectangle
- \param theRect - rectangle
-*/
-void GLViewer_Viewer2d::updateBorders( GLViewer_Rect* theRect )
-{
- QPtrVector<SUIT_ViewWindow> views = getViewManager()->getViews();
- for ( int i = 0, n = views.count(); i < n; i++ )
- {
- GLViewer_Rect* border = ( ( GLViewer_ViewPort2d* )((GLViewer_ViewFrame*)views[i])->getViewPort() )->getBorder();
-
- border->setLeft( QMIN( border->left(), theRect->left() ) );
- border->setRight( QMAX( border->right(), theRect->right() ) );
- border->setBottom( QMIN( border->bottom(), theRect->bottom() ) );
- border->setTop( QMAX( border->top(), theRect->top() ) );
- }
-}
-
-/*!
- Recomputes global scene rect
-*/
-void GLViewer_Viewer2d::updateBorders()
-{
- QPtrVector<SUIT_ViewWindow> views = getViewManager()->getViews();
-
- ObjList anObjects = myGLContext->getObjects();
- ObjList::Iterator beginIt = anObjects.begin();
- ObjList::Iterator endIt = anObjects.end();
- for ( int i = 0, n = views.count(); i < n; i++ )
- {
- GLViewer_Rect* border = ( ( GLViewer_ViewPort2d* )((GLViewer_ViewFrame*)views[i])->getViewPort() )->getBorder();
- if ( !border )
- continue;
- border->setIsEmpty( true );
- // initialise border by default values to avoid old values
- border->setCoords( 0, 0, 0, 0 );
- for ( ObjList::Iterator it = beginIt; it != endIt; ++it )
- {
- GLViewer_Object* anObject = *it;
- GLViewer_Rect* aRect = anObject->getRect();
- if( !anObject->isSelectable() || !anObject->getVisible() )
- continue;
-
- if( border->isEmpty() )
- {
- border->setIsEmpty( false );
- border->setCoords( aRect->left(), aRect->right(), aRect->bottom(), aRect->top() );
- }
- else
- {
- border->setLeft( QMIN( border->left(), aRect->left() ) );
- border->setRight( QMAX( border->right(), aRect->right() ) );
- border->setBottom( QMIN( border->bottom(), aRect->bottom() ) );
- border->setTop( QMAX( border->top(), aRect->top() ) );
- }
- }
- }
-}
-
-/*!
- Redraws all active objects by updating all drawers in all views
-*/
-void GLViewer_Viewer2d::updateAll()
-{
- if ( !getActiveView() )
- return;
-
- QPtrVector<SUIT_ViewWindow> views = getViewManager()->getViews();
- for ( int i = 0, n = views.count(); i < n; i++ )
- ( ( GLViewer_ViewPort2d* )( ( GLViewer_ViewFrame* )views[i] )->getViewPort() )->getGLWidget()->updateGL();
-}
-
-/*!
- \param onlyUpdate is passed to method activateAllDrawers drawers
-*/
-void GLViewer_Viewer2d::updateDrawers( GLboolean update, GLfloat scX, GLfloat scY )
-{
-// cout << "GLViewer_Viewer2d::updateDrawers" << endl;
-
- //myGLContext->updateScales( scX, scY );
- //myGLSketcher->drawContour();
- activateAllDrawers( update );
-}
-
-/*!
- Activates drawers for objects from list \param theObjects only
-*/
-void GLViewer_Viewer2d::activateDrawers( QValueList<GLViewer_Object*>& theObjects, bool onlyUpdate, GLboolean swap )
-{
- //cout << "GLViewer_Viewer2d::activateDrawers " << (int)onlyUpdate << " " << (int)swap << endl;
- QValueList<GLViewer_Drawer*>::Iterator anIt = myDrawers.begin();
- QValueList<GLViewer_Drawer*>::Iterator endDIt = myDrawers.end();
- for( ; anIt != endDIt; anIt++ )
- (*anIt)->clear();
-
- QValueList<GLViewer_Drawer*> anActiveDrawers;
- QValueList<GLViewer_Object*>::Iterator endOIt = theObjects.end();
-
- for( QValueList<GLViewer_Object*>::Iterator oit = theObjects.begin(); oit != endOIt; ++oit )
- {
- GLViewer_Drawer* aDrawer = (*oit)->getDrawer();
- if( !aDrawer )
- {
- anIt = myDrawers.begin();
- endDIt = myDrawers.end();
-
- for( ; anIt != endDIt; anIt++ )
- if( (*anIt)->getObjectType() == (*oit)->getObjectType() )
- {
- (*oit)->setDrawer( *anIt );
- aDrawer = *anIt;
- break;
- }
-
- if( !aDrawer )
- {
- myDrawers.append( (*oit)->createDrawer() );
- aDrawer = (*oit)->getDrawer();
- }
- }
- if ( !aDrawer )
- continue;
- aDrawer->addObject( (*oit) );
-
- int aPriority = aDrawer->getPriority();
-
- if( anActiveDrawers.findIndex( aDrawer ) != -1 )
- continue;
-
- QValueList<GLViewer_Drawer*>::Iterator aDIt = anActiveDrawers.begin();
- QValueList<GLViewer_Drawer*>::Iterator aDEndIt = anActiveDrawers.end();
- for( ; aDIt != aDEndIt; ++aDIt )
- if( (*aDIt)->getPriority() > aPriority )
- break;
-
- anActiveDrawers.insert( aDIt, aDrawer );
- }
-
- QValueList<GLViewer_Drawer*>::Iterator aDIt = anActiveDrawers.begin();
- QValueList<GLViewer_Drawer*>::Iterator aDEndIt = anActiveDrawers.end();
-
- QPtrVector<SUIT_ViewWindow> views = getViewManager()->getViews();
- for ( int i = 0, n = views.count(); i < n; i++ )
- {
- float xScale, yScale;
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )((GLViewer_ViewFrame*)views[i])->getViewPort();
- vp->getScale( xScale, yScale );
- vp->getGLWidget()->makeCurrent();
-
- for( ; aDIt != aDEndIt; aDIt++ )
- {
- GLViewer_Drawer* aDrawer = *aDIt;
- if( aDrawer )
- aDrawer->create( xScale, yScale, onlyUpdate );
- }
-/*
- // draw border
- GLViewer_Rect* border = ( ( GLViewer_ViewPort2d* )((GLViewer_ViewFrame*)views[i])->getViewPort() )->getBorder();
- (*aDIt)->drawRectangle( border, Qt::blue );
-
- QString coords = QString::number( border->left() ) + " " + QString::number( border->right() ) + " " +
- QString::number( border->bottom() ) + " " + QString::number( border->top() );
- (*aDIt)->drawText( "Border : " + coords, border->left(), border->top() + 10 / yScale,
- Qt::blue, &QFont( "Courier", 8, QFont::Normal ), 2 );
-*/
- if ( swap )
- vp->getGLWidget()->swapBuffers();
- }
-
- ( ( GLViewer_ViewPort2d* )getActiveView()->getViewPort() )->getGLWidget()->makeCurrent();
-}
-
-/*!
- Activates drawer for \param theObject
-*/
-void GLViewer_Viewer2d::activateDrawer( GLViewer_Object* theObject, bool onlyUpdate, GLboolean swap )
-{
- ObjList aList;
- aList.append( theObject );
- activateDrawers( aList, onlyUpdate, swap );
-}
-
-/*!
- \param onlyUpdate is passed to drawers
-*/
-void GLViewer_Viewer2d::activateAllDrawers( bool onlyUpdate, GLboolean swap )
-{
- if ( !getActiveView() )
- return;
-
- ObjList anActiveObjs;
- const ObjList& objs = myGLContext->getObjects();
- for( ObjList::const_iterator it = objs.begin(); it != objs.end(); ++it )
- {
- GLViewer_Object* obj = (GLViewer_Object*)(*it);
- if( obj->getVisible() )
- anActiveObjs.append( obj );
- }
-
- activateDrawers( anActiveObjs, onlyUpdate, swap );
-}
-
-/*!
- Creates set of marker
- \param theMarkersNum - number of markers
- \param theMarkersRad - radius of markers
-*/
-void GLViewer_Viewer2d::onCreateGLMarkers( int theMarkersNum, int theMarkersRad )
-{
- if ( !getActiveView() )
- return;
-
- GLViewer_MarkerSet* aMarkerSet = new GLViewer_MarkerSet( theMarkersNum, theMarkersRad );
- getGLContext()->insertObject( aMarkerSet );
-
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )getActiveView()->getViewPort();
- int vpWidth = vp->getWidth();
- int vpHeight = vp->getHeight();
-
- float* aXCoord = new float[ theMarkersNum ];
- float* anYCoord = new float[ theMarkersNum ];
-
- srand( 1 );
- for ( long i = 0; i < theMarkersNum; i++ )
- {
- aXCoord[i] = cos( PI * (rand() / (GLfloat)RAND_MAX) ) * ((GLfloat)vpWidth / 2.);
- anYCoord[i] = cos( PI * (rand() / (GLfloat)RAND_MAX) ) * ((GLfloat)vpHeight / 2.);
- }
-
- aMarkerSet->setXCoord( aXCoord, theMarkersNum );
- aMarkerSet->setYCoord( anYCoord, theMarkersNum );
- aMarkerSet->compute();
-
- updateBorders( aMarkerSet->getRect() );
-
- activateAllDrawers( false );
- activateTransform( GLViewer_Viewer::FitAll );
-
- delete[] aXCoord;
- delete[] anYCoord;
-}
-
-/*!
- Creates GL polyline
- \param theAnglesNum - number of angles
- \param theRadius - radius
- \param thePolylineNumber - number
-*/
-void GLViewer_Viewer2d::onCreateGLPolyline( int theAnglesNum, int theRadius, int thePolylineNumber )
-{
- if ( !getActiveView() )
- return;
-
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )getActiveView()->getViewPort();
- int vpWidth = vp->getWidth();
- int vpHeight = vp->getHeight();
-
- float* aXCoord = new float[ theAnglesNum ];
- float* anYCoord = new float[ theAnglesNum ];
-
- //srand( ( unsigned )time( NULL ) );
- srand( 1 );
- for( int j = 0; j < thePolylineNumber; j++)
- {
- GLViewer_Polyline* aPolyline = new GLViewer_Polyline( theAnglesNum, theRadius );
- getGLContext()->insertObject( aPolyline );
-
- float aXOffset = cos( PI * (rand() / (GLfloat)RAND_MAX) ) * ((GLfloat)vpWidth / 2.);
- float anYOffset = cos( PI * (rand() / (GLfloat)RAND_MAX) ) * ((GLfloat)vpHeight / 2.);
- for( int i = 0; i < theAnglesNum; i++ )
- {
- aXCoord[i] = cos( 2. * PI * i / theAnglesNum ) * theRadius + aXOffset;
- anYCoord[i] = sin( 2. * PI * i / theAnglesNum ) * theRadius + anYOffset;
- }
-
- aPolyline->setHighSelAll( true );
- aPolyline->setClosed( true );
- aPolyline->setXCoord( aXCoord, theAnglesNum );
- aPolyline->setYCoord( anYCoord, theAnglesNum );
- aPolyline->compute();
-
- updateBorders( aPolyline->getRect() );
- }
-
- activateAllDrawers( false );
- activateTransform( GLViewer_Viewer::FitAll );
-
- delete[] aXCoord;
- delete[] anYCoord;
-}
-
-/*!
- Creates text
- \param theStr - text string
- \param theTextNumber - number
-*/
-void GLViewer_Viewer2d::onCreateGLText( QString theStr, int theTextNumber )
-{
- if ( !getActiveView() )
- return;
-
- if( theTextNumber <= 0 )
- return;
-
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )getActiveView()->getViewPort();
- int vpWidth = vp->getWidth();
- int vpHeight = vp->getHeight();
-
- //srand( ( unsigned )time( NULL ) );
- srand( 1 );
- for( int j = 0; j < theTextNumber; j++)
- {
- float aXPos = cos( PI * (rand() / (GLfloat)RAND_MAX) ) * ((GLfloat)vpWidth / 2.);
- float anYPos = cos( PI * (rand() / (GLfloat)RAND_MAX) ) * ((GLfloat)vpHeight / 2.);
- QColor aColor( 255, 0, 255 );
-
- GLViewer_TextObject* aText = new GLViewer_TextObject( theStr, aXPos, anYPos, aColor );
- aText->compute();
- getGLContext()->insertObject( aText );
-
- updateBorders( aText->getRect() );
- }
-
- activateAllDrawers( false );
-}
-
-/*!
- Translates point from global CS to curreent viewer CS
- \param x, y - co-ordinates to be translated
-*/
-void GLViewer_Viewer2d::transPoint( GLfloat& x, GLfloat& y )
-{
- if ( !getActiveView() )
- return;
-
- GLfloat xScale, yScale;
- GLfloat xPan, yPan;
-
- GLViewer_ViewPort2d* curvp = ( GLViewer_ViewPort2d* )getActiveView()->getViewPort();
-
- curvp->getScale( xScale, yScale );
- curvp->getPan( xPan, yPan );
-
- GLfloat a = curvp->getGLWidget()->getRotationAngle() * PI / 180.;
-
- x = ( x - ( GLfloat )curvp->getWidth() / 2 ) / xScale;
- y = ( -y + ( GLfloat )curvp->getHeight() / 2 ) / yScale;
-
- GLfloat x1 = x;
- GLfloat y1 = y;
-
- x = x1 * cos(a) + y1 * sin(a);
- y = -x1 * sin(a) + y1 * cos(a);
-
- x -= xPan;
- y -= yPan;
-}
-
-/*!
- \return object rect in window CS
- \param theObject - object
-*/
-QRect* GLViewer_Viewer2d::getWinObjectRect( GLViewer_Object* theObject )
-{
- if ( !getActiveView() )
- return 0;
-
- GLfloat xScale, yScale;
- GLfloat xPan, yPan;
-
- GLViewer_ViewPort2d* curvp = ( GLViewer_ViewPort2d* )getActiveView()->getViewPort();
- GLfloat aWidth = curvp->getWidth();
- GLfloat aHeight = curvp->getHeight();
-
-
- curvp->getScale( xScale, yScale );
- curvp->getPan( xPan, yPan );
-
- QRect aObjRect = theObject->getRect()->toQRect();
- float aLeft = aObjRect.left() + xPan, aRight = aObjRect.right() + xPan;
- float aTop = aObjRect.top() + yPan, aBot = aObjRect.bottom() + yPan;
-
- GLfloat anAngle = curvp->getGLWidget()->getRotationAngle() * PI / 180.;
-
- QPointArray aPointArray(4);
- aPointArray[0] = QPoint( (int)(aLeft*cos(anAngle) - aTop*sin(anAngle)),
- (int)(aLeft*sin(anAngle) + aTop*cos(anAngle)) );
- aPointArray[1] = QPoint( (int)(aRight*cos(anAngle) - aTop*sin(anAngle)),
- (int)(aRight*sin(anAngle) + aTop*cos(anAngle)) );
- aPointArray[2] = QPoint( (int)(aRight*cos(anAngle) - aBot*sin(anAngle)),
- (int)(aRight*sin(anAngle) + aBot*cos(anAngle)) );
- aPointArray[3] = QPoint( (int)(aLeft*cos(anAngle) - aBot*sin(anAngle)),
- (int)(aLeft*sin(anAngle) + aBot*cos(anAngle)) );
-
- int aMinLeft = aPointArray[0].x(), aMaxRight = aPointArray[0].x(),
- aMinTop = aPointArray[0].y(), aMaxBottom = aPointArray[0].y();
- for( int i = 1; i < 4; i++ )
- {
- int x = aPointArray[i].x();
- int y = aPointArray[i].y();
- aMinLeft = QMIN( aMinLeft,x );
- aMaxRight = QMAX( aMaxRight, x );
- aMinTop = QMIN( aMinTop, y );
- aMaxBottom = QMAX( aMaxBottom, y );
- }
-
- aLeft = (aMinLeft/* + xPan*/)*xScale + aWidth / 2;
- aRight = (aMaxRight/* + xPan*/)*xScale + aWidth / 2;
-
- aTop = -( (aMaxBottom/* + yPan*/)*yScale - aHeight / 2 );
- aBot = -( (aMinTop/* + yPan*/)*yScale - aHeight / 2 );
-
- QRect* newRect = new QRect( (int)aLeft, (int)aTop, (int)(aRight-aLeft), (int)(aBot-aTop) );
-
- return newRect;
-}
-
-/*!
- Translates rect in window CS to rect in global CS
- \param theRect - rectangle to be translated
- \return transformed rect
-*/
-GLViewer_Rect GLViewer_Viewer2d::getGLVRect( const QRect& theRect ) const
-{
- if ( !getActiveView() )
- return GLViewer_Rect();
-
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )getActiveView()->getViewPort();
-
- if( !vp )
- return GLViewer_Rect();
-
- return vp->win2GLV( theRect );
-}
-
-/*!
- Translates rect in global CS to rect in window CS
- \param theRect - rectangle to be translated
- \return transformed rect
-*/
-QRect GLViewer_Viewer2d::getQRect( const GLViewer_Rect& theRect ) const
-{
- if ( !getActiveView() )
- return QRect();
-
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )getActiveView()->getViewPort();
-
- if( !vp )
- return QRect();
-
- return vp->GLV2win( theRect );
-}
-
-/*!
- \return new selector
-*/
-GLViewer_Selector* GLViewer_Viewer2d::createSelector()
-{
- return new GLViewer_Selector2d( this, getGLContext() );
-}
-
-/*!
- \return new Transformer
- \param type - type of new transformer
-*/
-GLViewer_ViewTransformer* GLViewer_Viewer2d::createTransformer( int type )
-{
- return new GLViewer_View2dTransformer( this, type );
-}
-
-/*!
- Custom mouse event handler
-*/
-void GLViewer_Viewer2d::onMouseEvent( SUIT_ViewWindow*, QMouseEvent* e )
-{
- if ( !getActiveView() )
- return;
-
- //if ( testRotation( e ) )
- // return;
-
- switch( e->type() )
- {
- case QEvent::MouseButtonPress :
- case QEvent::MouseMove :
- case QEvent::MouseButtonRelease :
- //if( myGLSketcher->getType() != None )
- // myGLSketcher->sketch( e );
- default: break;
- }
-
- GLViewer_Viewer::onMouseEvent( 0, e );
-}
-
-/*!
- Rotation transformation
-*/
-bool GLViewer_Viewer2d::testRotation( QMouseEvent* e )
-{
- if ( ( e->button() == GLViewer_View2dTransformer::rotateButton() ) &&
- ( e->type() == QEvent::MouseButtonPress ) &&
- ( e->state() & GLViewer_ViewTransformer::accelKey() ) )
- {
- activateTransform( GLViewer_Viewer::Rotate );
- return true;
- }
- return false;
-}
-
-/*!
- Inserts text lines as header for file
- \param aType - file type
- \param hFile - file instance
-*/
-void GLViewer_Viewer2d::insertHeader( VectorFileType aType, QFile& hFile )
-{
- if( aType == POST_SCRIPT )
- {
- QString header = "%!PS-Adobe-3.0\n";
- header += "%%Creator: OpenCascade 2004\n";
- header += "%%Title: Our document\n";
- header += "%%PageOrder: Ascend\n";
- header += "%%Orientation: Portrait\n";
- header += "%%LanguageLevel: 2\n";
-
- header += "%%Pages: 1\n";
- header += "%%Page: 1\n\n";
-
- hFile.writeBlock( header.ascii(), header.length() );
- }
- else if( aType == HPGL )
- {
- QString header = "[Esc].(;\n";
- header += "[Esc].I81;;17:\n";
- header += "[Esc].N;19:\n";
- header += "IN;\n";
- header += "SC;\n";
- header += "PU;\n";
- header += "SP1;\n";
- header += "LT;\n";
- header += "VS36;\n";
-
- hFile.writeBlock( header.ascii(), header.length() );
- }
-}
-
-/*!
- Inserts text lines as ending for file
- \param aType - file type
- \param hFile - file instance
-*/
-void GLViewer_Viewer2d::insertEnding( VectorFileType aType, QFile& hFile )
-{
- if( aType == POST_SCRIPT )
- {
- QString ending = "showpage\n\n%%EOF";
- hFile.writeBlock( ending.ascii(), ending.length() );
- }
- else if( aType == HPGL )
- {
- QString ending = "PU;PA0,0;SP;EC;PG1;EC1;OE\n";
- hFile.writeBlock( ending.ascii(), ending.length() );
- }
-}
-
-inline void mm2custom( GLViewer_Viewer2d::VectorFileType aType, double& value )
-{
- if( aType==GLViewer_Viewer2d::POST_SCRIPT )
- value*=2.8346; //mm to pt
-
- else if( aType==GLViewer_Viewer2d::HPGL )
- value*=40; //mm to plu (there are 40 plues in mm)
-#ifdef WIN32
- else if( aType==GLViewer_Viewer2d::ENH_METAFILE )
- value*=100; //this unit is 1/100 mm
-#endif
-}
-
-/*!
- Translates current view content to vector file
- \param aType - type of file
- \param FileName - name of file,
- \param aPType - paper size type
- \param mmLeft, mmRight, mmTop, mmBottom - margins
-*/
-bool GLViewer_Viewer2d::translateTo( VectorFileType aType, QString FileName, PaperType aPType,
- double mmLeft, double mmRight, double mmTop, double mmBottom )
-{
- if ( !getActiveView() )
- return false;
-
- QFile hFile( FileName.ascii() );
-
-#ifdef WIN32
- HDC hMetaFileDC;
-#endif
-
- GLViewer_ViewPort2d* aCurVP = (GLViewer_ViewPort2d*) getActiveView()->getViewPort();
-
- GLfloat xPan, yPan;
- aCurVP->getPan( xPan, yPan );
- GLfloat aRotation = aCurVP->getGLWidget()->getRotationAngle() * 3.14159265 / 180.0;
-
- GLViewer_CoordSystem aViewerCS( GLViewer_CoordSystem::Cartesian, xPan, yPan, 1.0, 1.0, aRotation );
-
- double AW = Sizes[2*int(aPType)],
- AH = Sizes[2*int(aPType)+1]; //size of Axx paper in mm
-
- mm2custom( aType, mmLeft ); //we translate mm to custom units
- mm2custom( aType, mmRight );
- mm2custom( aType, mmTop );
- mm2custom( aType, mmBottom );
- mm2custom( aType, AW );
- mm2custom( aType, AH );
-
- float xScale, yScale;
- aCurVP->getScale( xScale, yScale );
-
- double VPWidth = aCurVP->getWidth()/xScale, //the width in reference units
- VPHeight = aCurVP->getHeight()/yScale;
-
- double k1 = ( AW-mmLeft-mmRight ) / VPWidth,
- k2 = ( AH-mmTop-mmBottom ) / VPHeight;
-
- if( k1>k2 )
- k1 = k2; //We select the minimum
-
- double hdelta = ( AW-mmLeft-mmRight - VPWidth * k1 )/2.0, //addition in horizontal
- vdelta = ( AH-mmTop-mmBottom - VPHeight * k1 )/2.0; //addition in vertical
-
- mmLeft += hdelta; //The real free space on the left and right borders
- mmRight += hdelta;
- mmTop += vdelta;
- mmBottom += vdelta;
-
- GLViewer_CoordSystem aPaperCS( GLViewer_CoordSystem::Cartesian,
- -(mmLeft/k1+VPWidth/2.0), -(mmBottom/k1+VPHeight/2.0), 1/k1, 1/k1 );
-
- if( aType==POST_SCRIPT || aType==HPGL )
- {
- hFile.open( IO_ReadWrite | IO_Truncate );
- hFile.at( 0 );
- insertHeader( aType, hFile );
- }
-#ifdef WIN32
- else if( aType==ENH_METAFILE )
- {
- RECT r;
- r.left = 0; r.right = AW;
- r.top = 0; r.bottom = AH;
- HDC screen_dc = GetDC( 0 ); //The screen device context
- HDC bitDC = CreateCompatibleDC ( screen_dc ); //The context compatible with screen
-
- hMetaFileDC = CreateEnhMetaFile( bitDC, FileName.ascii(), &r, "" );
- SetMapMode( hMetaFileDC, MM_HIMETRIC );
- SetWindowOrgEx( hMetaFileDC, 0, r.bottom, NULL );
- HRGN ClipRgn = CreateRectRgn( 0, 0, AW, AH );
- SelectClipRgn( hMetaFileDC, ClipRgn );
-
- LOGBRUSH aBrushData;
- aBrushData.lbColor = RGB( 255, 255, 255 );
- aBrushData.lbStyle = BS_SOLID;
-
- FillRect( hMetaFileDC, &r, CreateBrushIndirect( &aBrushData ) );
-
- ReleaseDC( 0, screen_dc );
- DeleteDC( bitDC );
-
- aCurVP->getGLWidget()->translateBackgroundToEMF( hMetaFileDC, &aViewerCS, &aPaperCS );
- }
-#endif
-
- if( aType==POST_SCRIPT )
- {
- QString temp = "%1 %2 %3 %4 rectclip\n\n",
- aBuffer = temp.arg( mmLeft ).arg( mmBottom ).
- arg( AW-mmLeft-mmRight ).arg( AH-mmBottom-mmTop );
- //It is set clipping path
-
- hFile.writeBlock( aBuffer.ascii(), aBuffer.length() );
-
- aCurVP->getGLWidget()->translateBackgroundToPS( hFile, &aViewerCS, &aPaperCS );
- }
-
- bool result = true;
- for( int i=0, n=myDrawers.count(); i<n; i++ )
- if( aType==POST_SCRIPT )
- result &= myDrawers[ i ]->translateToPS( hFile, &aViewerCS, &aPaperCS );
- else if( aType==HPGL )
- result &= myDrawers[ i ]->translateToHPGL( hFile, &aViewerCS, &aPaperCS );
-#ifdef WIN32
- else if( aType==ENH_METAFILE )
- result &= myDrawers[ i ]->translateToEMF( hMetaFileDC, &aViewerCS, &aPaperCS );
-#endif
-
- if( aType==POST_SCRIPT || aType==HPGL )
- {
- insertEnding( aType, hFile);
- hFile.close();
- }
-#ifdef WIN32
- else if( aType==ENH_METAFILE )
- DeleteEnhMetaFile( CloseEnhMetaFile( hMetaFileDC ) );
-#endif
-
- return true;
-}
-
-/*!
- Repaints view
- \param theView - view to be repainted. If it is NULL then all views will be repainted
-*/
-void GLViewer_Viewer2d::repaintView( GLViewer_ViewFrame* theView, bool makeCurrent )
-{
- GLViewer_ViewFrame* aCurView;
- if( !theView )
- aCurView = (GLViewer_ViewFrame*)getActiveView();
- else
- aCurView = theView;
-
- if ( !aCurView )
- return;
-
- ObjList anActiveObjs;
- const ObjList& objs = myGLContext->getObjects();
- for( ObjList::const_iterator it = objs.begin(); it != objs.end(); ++it )
- {
- GLViewer_Object* obj = (GLViewer_Object*)(*it);
- if( obj->getVisible() )
- anActiveObjs.append( obj );
- }
-
- float xScale;
- float yScale;
-
- QValueList<GLViewer_Drawer*>::Iterator anIt = myDrawers.begin();
- QValueList<GLViewer_Drawer*>::Iterator endDIt = myDrawers.end();
- for( ; anIt != endDIt; anIt++ )
- (*anIt)->clear();
-
- QValueList<GLViewer_Drawer*> anActiveDrawers;
- QValueList<GLViewer_Object*>::Iterator endOIt = anActiveObjs.end();
-
- for( QValueList<GLViewer_Object*>::Iterator oit = anActiveObjs.begin(); oit != endOIt; ++oit )
- {
- GLViewer_Drawer* aDrawer = (*oit)->getDrawer();
- if( !aDrawer )
- {
- anIt = myDrawers.begin();
-
- for( ; anIt != endDIt; anIt++ )
- if( (*anIt)->getObjectType() == (*oit)->getObjectType() )
- {
- (*oit)->setDrawer( *anIt );
- aDrawer = *anIt;
- break;
- }
-
- if( !aDrawer ) //are not exists
- {
- myDrawers.append( (*oit)->createDrawer() );
- aDrawer = (*oit)->getDrawer();
- }
- }
- aDrawer->addObject( (*oit) );
- if( anActiveDrawers.findIndex( aDrawer ) == -1 )
- anActiveDrawers.append( aDrawer );
- }
-
- QValueList<GLViewer_Drawer*>::Iterator aDIt = anActiveDrawers.begin();
- QValueList<GLViewer_Drawer*>::Iterator aDEndIt = anActiveDrawers.end();
-
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )aCurView->getViewPort();
- vp->getScale( xScale, yScale );
-
- if( makeCurrent )
- vp->getGLWidget()->makeCurrent();
-
- for( ; aDIt != aDEndIt; aDIt++ )
- (*aDIt)->create( xScale, yScale, false );
-
-// if ( swap )
- vp->getGLWidget()->swapBuffers();
-
-// ( ( GLViewer_ViewPort2d* )getActiveView()->getViewPort() )->getGLWidget()->makeCurrent();
-}
-
-/*!
- Starts some operation on mouse event
-*/
-void GLViewer_Viewer2d::startOperations( QMouseEvent* e )
-{
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )((GLViewer_ViewFrame*)getActiveView())->getViewPort();
-
- float x = e->pos().x();
- float y = e->pos().y();
- transPoint( x, y );
- GLViewer_Pnt point( x, y );
-
- if( e->button() == Qt::LeftButton && !myGLContext->getCurrentObject() && vp->startPulling( point ) )
- return;
-
- if( e->button() == Qt::LeftButton && !(vp->currentBlock() & BS_Selection) && !myGLContext->getCurrentObject() )
- vp->startSelectByRect( e->x(), e->y() );
-}
-
-/*!
- Updates started operation on mouse event
-*/
-bool GLViewer_Viewer2d::updateOperations( QMouseEvent* e )
-{
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )((GLViewer_ViewFrame*)getActiveView())->getViewPort();
-
- if( vp->isPulling() )
- {
- float x = e->pos().x();
- float y = e->pos().y();
- transPoint( x, y );
-
- vp->drawPulling( GLViewer_Pnt( x, y ) );
- updateAll();
- return true;
- }
-
- if( !myGLContext->getCurrentObject() )
- {
- vp->drawSelectByRect( e->x(), e->y() );
- return true;
- }
- return false;
-}
-
-/*!
- Completes started operation on mouse event
-*/
-void GLViewer_Viewer2d::finishOperations( QMouseEvent* e )
-{
- GLViewer_ViewPort2d* vp = ( GLViewer_ViewPort2d* )((GLViewer_ViewFrame*)getActiveView())->getViewPort();
-
- if( vp->isPulling() )
- {
- vp->finishPulling();
- updateAll();
- return;
- }
-
- if( !myGLContext->getCurrentObject() )
- {
- QRect aSelRect = vp->selectionRect();
- vp->finishSelectByRect();
- if ( getSelector() && !aSelRect.isNull() )
- {
- bool append = bool ( e->state() & GLViewer_Selector::appendKey() );
- getSelector()->select( aSelRect, append );
- }
- }
-}
-
-/*!
- Starts some operation on mouse wheel event
-*/
-void GLViewer_Viewer2d::startOperations( QWheelEvent* e )
-{
- bool zoomIn = e->delta() > 0;
- bool update = false;
- for( myGLContext->InitSelected(); myGLContext->MoreSelected(); myGLContext->NextSelected() )
- {
- GLViewer_Object* anObject = myGLContext->SelectedObject();
- update = anObject->updateZoom( zoomIn ) || update;
- }
-
- emit wheelZoomChange( zoomIn );
-
- if( update )
- updateAll();
-}
-
-
-int GLViewer_View2dTransformer::rotateBtn = RightButton;
-
-/*!
- Constructor
-*/
-GLViewer_View2dTransformer::GLViewer_View2dTransformer( GLViewer_Viewer* viewer, int typ )
-: GLViewer_ViewTransformer( viewer, typ )
-{
- if ( type() == GLViewer_Viewer::Rotate )
- initTransform( true );
-}
-
-/*!
- Destructor
-*/
-GLViewer_View2dTransformer::~GLViewer_View2dTransformer()
-{
- if ( type() == GLViewer_Viewer::Rotate )
- initTransform( false );
-}
-
-/*!
- Redefined to provide specific 3D transfomations. [ virtual public ]
-*/
-void GLViewer_View2dTransformer::exec()
-{
- if ( !myViewer->getActiveView() )
- return;
-
- /* additional transforms */
- GLViewer_ViewPort* vp = myViewer->getActiveView()->getViewPort();
- GLViewer_ViewPort2d* avp = (GLViewer_ViewPort2d*)vp;
- switch ( myType )
- {
- case GLViewer_Viewer::Rotate:
- myMajorBtn = rotateButton();
- avp->setCursor( *avp->getRotCursor() );
- break;
- default:
- GLViewer_ViewTransformer::exec();
- }
-}
-
-/*!
- Handles rotation. [ protected virtual ]
-*/
-void GLViewer_View2dTransformer::onTransform( TransformState state )
-{
- if ( !myViewer->getActiveView() )
- return;
-
- GLViewer_ViewPort* vp = myViewer->getActiveView()->getViewPort();
- GLViewer_ViewPort2d* avp = (GLViewer_ViewPort2d*)vp;
- if ( type() == GLViewer_Viewer::Rotate )
- {
- switch ( state )
- {
- case Debut:
- if ( myButtonState & myMajorBtn )
- avp->startRotation( myStart.x(), myStart.y() );
- break;
- case EnTrain:
- if ( myButtonState & myMajorBtn )
- avp->rotate( myCurr.x(), myCurr.y() );
- break;
- case Fin:
- avp->endRotation();
- break;
- default: break;
- }
- }
- GLViewer_ViewTransformer::onTransform( state );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Viewer2d.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_VIEWER2D_H
-#define GLVIEWER_VIEWER2D_H
-
-#ifdef WNT
-#include <windows.h>
-#endif
-
-#include <qmap.h>
-#include <qrect.h>
-
-#include "GLViewer_Viewer.h"
-#include "GLViewer_Object.h"
-#include "GLViewer_ViewFrame.h"
-#include "GLViewer_Drawer.h"
-
-#include <TColStd_SequenceOfInteger.hxx>
-
-#include <GL/gl.h>
-
-class GLViewer_Object;
-class GLViewer_Context;
-class GLViewer_Selector2d;
-//class GLViewer_Sketcher;
-
-class SUIT_Desktop;
-class SUIT_ViewWindow;
-
-//! Paper sizes array
-const double Sizes[2*5] = {
- /* A1 */ 594.0, 840.0,
- /* A2 */ 420.0, 594.0,
- /* A3 */ 297.0, 420.0,
- /* A4 */ 210.0, 297.0,
- /* A5 */ 148.5, 210.0
-};
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- \class GLViewer_Viewer2d
- OpenGL Viewer 2D
-*/
-
-class GLVIEWER_API GLViewer_Viewer2d : public GLViewer_Viewer
-{
- Q_OBJECT
-
-public:
- //! Type of sketcher operation
- enum GLSketchingType
- {
- None,
- Polyline,
- Arc,
- Curve,
- Scribble,
- Oval,
- Rectangle
- };
- //! Type of export vector file
- enum VectorFileType
- {
- POST_SCRIPT,
- HPGL
-#ifdef WIN32
- , ENH_METAFILE
-#endif
- };
-
- //! Type of paper for export to vector format
- enum PaperType
- {
- A1=0,
- A2,
- A3,
- A4,
- A5
- };
-
-public:
- //! A constructor
- GLViewer_Viewer2d( const QString& title );
- //! A destructor
- ~GLViewer_Viewer2d();
-
-public:
- //! Redefined method
- /*Returns GLViewer_ViewFrame*/
- virtual SUIT_ViewWindow* createView( SUIT_Desktop* );
-
- //! Adds item for change background color
- void addPopupItems( QPopupMenu* );
-
- //void activateGLSketching( int );
-
- //! Returns all drawers
- const QValueList<GLViewer_Drawer*>& getDrawers() const { return myDrawers; }
-
- //! Returns context
- GLViewer_Context* getGLContext() const { return myGLContext; }
- //! Updates colors for all drawers (does not work)
- void updateColors( QColor colorH, QColor colorS );
-
- //! Updates rect of global scene by adding new rect
- void updateBorders( GLViewer_Rect* theRect );
- //! Recomputes global scene rect
- void updateBorders();
-
- //! Redraws all active objects by updating all drawers in all views
- void updateAll();
- //! Updates all drawers with new scale factor
- /* \param onlyUpdate is passed to method activateAllDrawersdrawers*/
- void updateDrawers( GLboolean onlyUpdate, GLfloat scX = 0.0, GLfloat scY = 0.0 );
- //! Activates drawers for objects from list \param theObjects only
- void activateDrawers( QValueList<GLViewer_Object*>& theObjects, bool onlyUpdate, GLboolean swap = GL_FALSE );
- //! Activates drawer for \param theObject
- void activateDrawer( GLViewer_Object* theObject, bool onlyUpdate, GLboolean swap = GL_FALSE );
- //! Updates all drawers with new scale factor
- /* \param onlyUpdate is passed to drawers*/
- void activateAllDrawers( bool onlyUpdate, GLboolean swap = GL_FALSE );
-
- //! Translates point (x,y) from global CS to curreent viewer CS
- void transPoint( GLfloat& x, GLfloat& y );
- //! Returns object rect in window CS
- QRect* getWinObjectRect( GLViewer_Object* theObject);
-
- //! Translates rect in window CS to rect in global CS
- GLViewer_Rect getGLVRect( const QRect& ) const;
- //! Translates rect in global CS to rect in window CS
- QRect getQRect( const GLViewer_Rect& ) const;
-
- //! Inserts common text lines starting file of \param aType
- virtual void insertHeader( VectorFileType aType, QFile& hFile );
- //! Inserts common text lines ending file of \param aType
- virtual void insertEnding( VectorFileType aType, QFile& hFile );
- //! Translates current view content to vector file
- /* Translates current view content to vector file with type \param aType, name \param FileName,
- * output paper size \param aPType, with margins in mm
- */
- virtual bool translateTo( VectorFileType aType, QString FileName, PaperType aPType,
- double mmLeft, double mmRight, double mmTop, double mmBottom );
-
- //bool isSketchingActive();
- //int getSketchingType();
-
- //virtual void startSketching();
- //virtual void finishSketching();
-
- //! Repaints view \param theView. If \param theView = NULL repaints all views.
- void repaintView( GLViewer_ViewFrame* theView = NULL, bool makeCurrent = false );
-
-signals:
- //! Signal needs for optimum recompute of zoom depending objects
- //! Warning: use recompute without update viewer
- void wheelZoomChange( bool );
-
-public slots:
- //void onSketchDelObject();
- //void onSketchUndoLast();
- //void onSketchFinish();
-
- //! Changes background color
- void onChangeBgColor();
- //! Creates set of marker number \param number and radius = \param size
- void onCreateGLMarkers( int number = 1000, int size = 5 );
- //! Creates set of polyline number \param number, number of angles = \param angles and diameter = \param size
- void onCreateGLPolyline( int number = 100, int angles = 10, int size = 100 );
- //! Creates set of text number \param number and with text = \param text
- void onCreateGLText( QString text = "Text", int number = 1 );
-
-protected:
- //! Returns new selector
- GLViewer_Selector* createSelector();
- //! Returns new Transformer with type \param type
- GLViewer_ViewTransformer* createTransformer( int type);
-
- //! Transforms point (x,y) in Viewer CS to Post Script CS
- void transformCoordsToPS( double& x, double& y );
- //! Transforms point (x,y) in Viewer CS to HPGL CS
- void transformCoordsToHPGL( double& x, double& y );
-
- //! Starts any operations on mouse event
- virtual void startOperations( QMouseEvent* );
- //! Updates started operations on mouse event
- virtual bool updateOperations( QMouseEvent* );
- //! Completes started operations on mouse event
- virtual void finishOperations( QMouseEvent* );
- //! Starts any operations on mouse wheel event
- virtual void startOperations( QWheelEvent* );
-
-protected slots:
- void onMouseEvent( SUIT_ViewWindow*, QMouseEvent* );
-
-private:
- //! Rotation transformation
- bool testRotation( QMouseEvent* );
-protected:
- //! Current context
- GLViewer_Context* myGLContext;
- //! Map of active drawers
- QValueList<GLViewer_Drawer*> myDrawers;
-
- //GLViewer_Sketcher* myGLSketcher;
-};
-
-class GLVIEWER_API GLViewer_View2dTransformer : public GLViewer_ViewTransformer
-{
-public:
- GLViewer_View2dTransformer( GLViewer_Viewer*, int );
- ~GLViewer_View2dTransformer();
-
- virtual void exec();
-
- /*! Sets/returns mouse butto which will be used for rotation ( MB1 by default ) */
- static int rotateButton() { return rotateBtn; }
- static void setRotateButton( int b ) { rotateBtn = b; }
-
-protected:
- void onTransform( TransformState );
-
- static int rotateBtn;
-};
-
-#ifdef WNT
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Widget.cxx
-// Created: November, 2004
-
-#include "GLViewer_Widget.h"
-#include "GLViewer_ViewPort2d.h"
-#include "GLViewer_Viewer2d.h"
-#include "GLViewer_Compass.h"
-#include "GLViewer_Grid.h"
-#include "GLViewer_Object.h"
-#include "GLViewer_CoordSystem.h"
-
-#include <cmath>
-using namespace std;
-
-#include <qevent.h>
-#include <qrect.h>
-
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qapplication.h>
-#include <qintdict.h>
-#include <qpaintdevicemetrics.h>
-#include <qsize.h>
-#include <qtooltip.h>
-
-/*!
- A constructor
- Parameters using for QOGLWidget as is
-*/
-GLViewer_Widget::GLViewer_Widget( QWidget* parent, const char* name ):
-QGLWidget( parent, 0/*, WRepaintNoErase | WResizeNoErase*/ )
-{
- myViewPort = ( GLViewer_ViewPort2d* )parent;
-
- myXPan = 0.0;
- myYPan = 0.0;
- myZPan = 0.0;
- myXScale = 1.0;
- myYScale = 1.0;
- myZScale = 1.0;
- myRotationAngle = 0.0;
- myRotationCenterX = 0.0;
- myRotationCenterY = 0.0;
- myRotationCenterZ = 1.0;
- myRotationAnglePrev = 0.0;
-
- myStart = GL_TRUE;
-
- isExportMode = false;
-
- //init();
- setMouseTracking( true );
-}
-
-/*!
- Destructor
-*/
-GLViewer_Widget::~GLViewer_Widget()
-{
-}
-
-/*!
- \return offset parameters of Window in OpenGL global scene
-*/
-void GLViewer_Widget::getPan( GLfloat& xPan, GLfloat& yPan, GLfloat& zPan )
-{
- xPan = myXPan;
- yPan = myYPan;
- zPan = myZPan;
-}
-
-/*!
- A function for installing the offset parameters of Window in OpenGL global scene
-*/
-void GLViewer_Widget::setPan( GLfloat xPan, GLfloat yPan, GLfloat zPan )
-{
- myXPan = xPan;
- myYPan = yPan;
- myZPan = zPan;
-}
-
-/*!
- \return scales on OpenGL scene along 3 directions in 2d scene zScale = 1.0
-*/
-void GLViewer_Widget::getScale( GLfloat& xScale, GLfloat& yScale, GLfloat& zScale )
-{
- xScale = myXScale;
- yScale = myYScale;
- zScale = myZScale;
-}
-
-/*!
- A function for installing the scales of OpenGL scene
-*/
-void GLViewer_Widget::setScale( GLfloat xScale, GLfloat yScale, GLfloat zScale )
-{
- if ( xScale > 0 && yScale > 0 && zScale > 0 )
- {
- myXScale = xScale;
- myYScale = yScale;
- myZScale = zScale;
- }
-}
-
-/*!
- \return start point of curren rotation of Window in OpenGL global scene
-*/
-void GLViewer_Widget::getRotationStart( GLfloat& rotationStartX,
- GLfloat& rotationStartY,
- GLfloat& rotationStartZ )
-{
- rotationStartX = myRotationStartX;
- rotationStartY = myRotationStartY;
- rotationStartZ = myRotationStartZ;
-}
-
-/*!
- A function for installing the rotation angle of Window in OpenGL global scene in degree (Only in 2D)
-*/
-void GLViewer_Widget::setRotationStart( GLfloat rotationStartX,
- GLfloat rotationStartY,
- GLfloat rotationStartZ )
-{
- myRotationStartX = rotationStartX;
- myRotationStartY = rotationStartY;
- myRotationStartZ = rotationStartZ;
-}
-
-/*!
- \return parameters of rotation
- \param rotationAngle - angle
- \param rotationCenterX - center x
- \param rotationCenterY - center y
- \param rotationCenterZ - center z
-*/
-void GLViewer_Widget::getRotation( GLfloat& rotationAngle,
- GLfloat& rotationCenterX,
- GLfloat& rotationCenterY,
- GLfloat& rotationCenterZ )
-{
- rotationAngle = myRotationAngle;
- rotationCenterX = myRotationCenterX;
- rotationCenterY = myRotationCenterY;
- rotationCenterZ = myRotationCenterZ;
-}
-
-/*!
- Sets parameters of rotation
- \param rotationAngle - angle
- \param rotationCenterX - center x
- \param rotationCenterY - center y
- \param rotationCenterZ - center z
-*/
-void GLViewer_Widget::setRotation( GLfloat rotationAngle,
- GLfloat rotationCenterX,
- GLfloat rotationCenterY,
- GLfloat rotationCenterZ )
-{
- myRotationAngle = rotationAngle;
- myRotationCenterX = rotationCenterX;
- myRotationCenterY = rotationCenterY;
- myRotationCenterZ = rotationCenterZ;
-}
-
-
-/*!
- Sets image as background
- \param filename - name of file
-*/
-void GLViewer_Widget::setBackground( QString filename )
-{
-
- //get image
- QImage buf;
- if ( !filename.isEmpty() && buf.load( filename ) )
- { // Load first image from file
- isLoadBackground = true;
- myBackgroundFile = filename;
-
- myIW = buf.width();
- myIH = buf.height();
-
- myBackgroundSize = 64;
- while( myBackgroundSize < myIW || myBackgroundSize < myIH)
- myBackgroundSize = myBackgroundSize * 2;
-
- GLubyte* pixels = new GLubyte[myBackgroundSize * myBackgroundSize * 4];
-
- for( int i = 0; i < myBackgroundSize; i++ )
- {
- for( int j = 0; j < myBackgroundSize; j++ )
- {
- if( j < myIW && i < myIH )
- {
- pixels[i * myBackgroundSize * 4 + j * 4] = (GLubyte)qRed( buf.pixel(j,myIH - i - 1) );
- pixels[i * myBackgroundSize * 4 + j * 4 + 1]= (GLubyte)qGreen( buf.pixel(j,myIH - i - 1) );
- pixels[i * myBackgroundSize * 4 + j * 4 + 2] = (GLubyte)qBlue( buf.pixel(j,myIH - i - 1) );
- }
- else
- {
- pixels[i * myBackgroundSize * 4 + j * 4] = (GLubyte)0;
- pixels[i * myBackgroundSize * 4 + j * 4 + 1] = (GLubyte)0;
- pixels[i * myBackgroundSize * 4 + j * 4 + 2] = (GLubyte)0;
- }
- pixels[i * myBackgroundSize* 4 + j * 4 + 3] = (GLubyte)255;
- }
- }
-
- //initialize texture
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glGenTextures(1, &texName);
- glBindTexture(GL_TEXTURE_2D, texName);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, myBackgroundSize , myBackgroundSize, 0, GL_RGBA, GL_UNSIGNED_BYTE,
- pixels);
-
- delete[] pixels;
- }
-}
-
-/*!
- Adds tooltip
- \param theString - tooltip text
- \param theRect - tooltip rectangle
-*/
-void GLViewer_Widget::addToolTip( QString theString, QRect theRect )
-{
- myToolTipRect = theRect;
- QToolTip::add( this, myToolTipRect, theString );
-}
-
-/*!
- Removes tooltip
-*/
-void GLViewer_Widget::removeToolTip()
-{
- QToolTip::remove( this, myToolTipRect );
-}
-
-/*!
- Initialization (redefined virtual from QGLWidget)
-*/
-void GLViewer_Widget::initializeGL()
-{
- setAutoBufferSwap( true );
-
- glShadeModel(GL_FLAT);
-
- //get image
- QImage buf;
- QString aPicturePath = getenv("GLViewer__Background_Picture");
-
- if ( !aPicturePath.isEmpty() && buf.load( aPicturePath ) )
- { // Load first image from file
- isLoadBackground = true;
- setBackground( aPicturePath );
-
- }
-
- else
- isLoadBackground = false;
-}
-
-/*!
- Paints content
-*/
-void GLViewer_Widget::paintGL()
-{
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-
- glRotatef( myRotationAngle, myRotationCenterX, myRotationCenterY, myRotationCenterZ );
- glScalef( myXScale, myYScale, myZScale );
- glTranslatef( myXPan, myYPan, myZPan );
-
- if( isLoadBackground )
- {
- glEnable(GL_TEXTURE_2D);
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
- glBindTexture(GL_TEXTURE_2D, texName);
- glBegin(GL_QUADS);
-
- glTexCoord2f( 0.0, 0.0); glVertex3f( -myIW/2, -myIH/2, 0.0);
- glTexCoord2f( 0.0, (float)myIH/myBackgroundSize ); glVertex3f( -myIW/2, myIH/2, 0.0);
- glTexCoord2f( (float)myIW/myBackgroundSize, (float)myIH/myBackgroundSize ); glVertex3f( myIW/2, myIH/2, 0.0);
- glTexCoord2f( (float)myIW/myBackgroundSize, 0.0); glVertex3f( myIW/2, -myIH/2, 0.0);
-
- glEnd();
- glFlush();
- glDisable(GL_TEXTURE_2D);
-
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
- }
-
-
- GLViewer_Grid* grid = myViewPort->getGrid();
- if( grid )
- grid->draw();
-
- GLViewer_Viewer2d* v = ( GLViewer_Viewer2d* )getViewPort()->getViewFrame()->getViewer();
- if( !isExportMode )
- v->updateDrawers( GL_FALSE, myXScale, myYScale );
- else
- v->repaintView( getViewPort()->getViewFrame() );
-}
-
-/*!
- Resets OpenGl parameters after resize
- \param w - new width
- \param h - new height
-*/
-void GLViewer_Widget::resizeGL( int w, int h )
-{
-
- if( h < 1 ) h = 1;
- if( w < 1 ) w = 1;
- glViewport( 0, 0, w, h);
-
- if( myStart )
- {
- myWidth = w;
- myHeight = h;
- myStart = GL_FALSE;
- }
-
- myViewPort->initResize( w, h );
-
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- GLfloat w_c = w / 2., h_c = h / 2.;
-
- gluOrtho2D( -w_c, w_c, -h_c, h_c );
-
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-}
-
-/*!
- Provides repaint in export mode
-*/
-void GLViewer_Widget::exportRepaint()
-{
- isExportMode = true;
-
- paintGL();
-
- isExportMode = false;
-}
-
-/*!
- Custom paint event handler
-*/
-void GLViewer_Widget::paintEvent( QPaintEvent* e )
-{
- QApplication::sendEvent( myViewPort, e );
-}
-
-/*!
- Custom mouse move event handler
-*/
-void GLViewer_Widget::mouseMoveEvent( QMouseEvent* e )
-{
- QApplication::sendEvent( myViewPort, e );
-}
-
-/*!
- Custom mouse press event handler
-*/
-void GLViewer_Widget::mousePressEvent( QMouseEvent* e )
-{
- QApplication::sendEvent( myViewPort, e );
-}
-
-/*!
- Custom mouse release event handler
-*/
-void GLViewer_Widget::mouseReleaseEvent( QMouseEvent* e )
-{
- QApplication::sendEvent( myViewPort, e );
-}
-
-/*!
- Custom enter event handler
-*/
-void GLViewer_Widget::enterEvent( QEvent* e )
-{
- updateGL();
-}
-
-/*!
- Custom leave event handler
-*/
-void GLViewer_Widget::leaveEvent( QEvent* e )
-{
- updateGL();
-}
-
-
-/*!
- \return the hex code of digit < 16
- \param c - digit
-*/
-inline char hex( uchar c )
-{
- if( c<=9 )
- return '0'+c;
- else if( c < 16 )
- return 'a' + c - 10;
-
- return ' ';
-}
-
-/*!
- Translates part of image inside rectangle from w1 to w2 and from h2 to h1 to PS format
- \param hFile - PostScript file
- \param image - image to be tarnslated
- \param w1 - x start position
- \param w2 - x end position
- \param h1 - y start position
- \param h2 - y end position
- \param aViewerCS - viewer co-ordinate system
- \param aPSCS - paper co-ordinate system
- \param a
- \param b
- \param c
- \param d
- \param dw
- \param dh
-*/
-void AddImagePart( QFile& hFile, QImage& image, int w1, int w2, int h1, int h2,
- GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS,
- double a, double b, double c, double d, double dw, double dh )
-{
- if( aViewerCS && aPSCS )
- {
- double width = w2-w1+1, height = h2-h1+1;
- QString aBuffer = "", temp = "%1 %2 8 [ %3 %4 %5 %6 %7 %8 ]\n";
- aBuffer += temp.arg( width ).arg( height ).
- arg( a ).arg( b ).arg( c ).arg( d ).
- arg( dw ).arg( dh );
- aBuffer += "<\n";
-
- char line[81]; line[80] = '\0'; int cur_index = 0;
- int full = 0;
- for( int i=h2; i>=h1; i-- )
- {
- uchar* theCurLine = image.scanLine( i ), cur;
- for( int j=w1; j<=w2; j++ )
- for( int k=0; k<3; k++ )
- {
- cur = *(theCurLine+4*j+2-k);
- *(line+cur_index) = hex( cur/16 ); //HI
- *(line+cur_index+1) = hex( cur%16 ); //LO
- full++;
- cur_index+=2;
- if( cur_index>=80 )
- {
- aBuffer += line;
- aBuffer += "\n";
- cur_index = 0;
- }
- }
- }
-
- aBuffer += "> false 3 colorimage\n\n";
-
- hFile.writeBlock( aBuffer.ascii(), aBuffer.length() );
- }
-}
-
-/*!
- \return background rectangle in viewer CS
-*/
-void GLViewer_Widget::getBackgroundRectInViewerCS( double& left, double& top, double& right, double& bottom )
-{
- left = -myIW/2; right = myIW/2;
- top = myIH/2; bottom = -myIH/2;
-}
-
-/*!
- Translates background to PostScript
- \param hFile - PostScript file
- \param aViewerCS - viewer co-ordinate system
- \param aPSCS - paper co-ordinate system
-*/
-void GLViewer_Widget::translateBackgroundToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS )
-{
- QImage buf;
-
- if( aViewerCS && aPSCS && isLoadBackground && buf.load( myBackgroundFile ) )
- {
- double a, b, c, d, dx, dy; //The preparation of transformation matrix
-
- double width = buf.width(), height = buf.height();
-
- double left, top, right, bottom;
- getBackgroundRectInViewerCS( left, top, right, bottom );
-
- double aax = left, aay = bottom,
- bbx = right, bby = bottom,
- ccx = left, ccy = top;
-
- aViewerCS->transform( *aPSCS, aax, aay );
- aViewerCS->transform( *aPSCS, bbx, bby );
- aViewerCS->transform( *aPSCS, ccx, ccy );
-
- a = ( bbx - aax ) / width;
- b = ( ccx - aax ) / height;
- c = ( bby - aay ) / width;
- d = ( ccy - aay ) / height;
-
- //Now we must find invert matrix
- double det = a*d-b*c,
- newa = d/det,
- newb = -c/det,
- newc = -b/det,
- newd = a/det;
-
- a = newa; b = newb; c = newc; d = newd;
-
- dx = -(a*aax+c*aay);
- dy = -(b*aax+d*aay); //according to PS specification of coordinate transformation
-
- const int max = 133000; //The maximum length of string in PS
- int dh = int( floor( double( max ) / ( 3.0*2.0*width ) ) );
- for( int k=buf.height()-1; k>=0; k-=dh )
- AddImagePart( hFile, buf, 0, buf.width()-1, QMAX( k-dh+1, 0 ), k,
- aViewerCS, aPSCS, a, b, c, d, dx, dy-(buf.height()-1-k) );
- }
-}
-
-/*!
- Translates image line with one color depth to line with other depth
-*/
-void DecodeScanLine( int width, uchar* dest, int dest_depth, uchar* source, int source_depth )
-{
-#ifndef WIN32
-typedef unsigned int WORD;
-#endif
-
- int aSize = width*dest_depth,
- dw = aSize % 8;
-
- if( dw )
- aSize+=dw;
-
- if( dest_depth==source_depth )
- memcpy( dest, source, aSize/8 );
- else
- {
- double r, g, b; WORD color;
- for( int i=0; i<width; i++ )
- {
- color = 0;
- switch( source_depth )
- {
- case 16:
- memcpy( &color, source + 2*i, 2 );
- b = double( color & 0x001F ) / 31.0;
- g = double( ( color & 0x07E0 ) >> 5 ) / 63.0;
- r = double( ( color & 0xF800 ) >> 11 ) / 31.0;
- break;
- case 24:
- b = double( *(source + 3*i) ) / 255.0;
- g = double( *(source + 3*i+1) ) / 255.0;
- r = double( *(source + 3*i+2) ) / 255.0;
- break;
- case 32:
- b = double( *(source + 4*i) ) / 255.0;
- g = double( *(source + 4*i+1) ) / 255.0;
- r = double( *(source + 4*i+2) ) / 255.0;
- break;
- }
- switch( dest_depth )
- {
- case 16:
- color = WORD(b*31.0);
- color += (WORD(g*63.0)<<5);
- color += (WORD(r*31.0)<<11);
- memcpy( dest + 2*i, &color, 2 );
- break;
- case 24:
- *( dest + 3*i ) = (uchar)(255*b);
- *( dest + 3*i+1 ) = (uchar)(255*g);
- *( dest + 3*i+2 ) = (uchar)(255*r);
- break;
- case 32:
- *( dest + 4*i ) = (uchar)(255*b);
- *( dest + 4*i+1 ) = (uchar)(255*g);
- *( dest + 4*i+2 ) = (uchar)(255*r);
- *( dest + 4*i+3 ) = 0;
- break;
- }
- }
- }
-}
-
-#ifdef WIN32
-/*!
- Translates background to EMF
- \param dc - descriptor of EMF
- \param aViewerCS - viewer co-ordinate system
- \param aPSCS - paper co-ordinate system
-*/
-void GLViewer_Widget::translateBackgroundToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS )
-{
- QImage buf;
-
- if( aViewerCS && aEMFCS && isLoadBackground && buf.load( myBackgroundFile ) )
- {
- double left, top, right, bottom;
- getBackgroundRectInViewerCS( left, top, right, bottom );
-
- double aRot = aViewerCS->getRotation();
-
- double lx = left, ly = top;
- aViewerCS->transform( *aEMFCS, lx, ly );
-
- aViewerCS->setRotation( 0.0 ); //we switch off the rotation of CS
-
- aViewerCS->transform( *aEMFCS, left, top );
- aViewerCS->transform( *aEMFCS, right, bottom );
-
- int w = buf.width(),
- h = buf.height();
-
- HDC aScrDC = GetDC( 0 );
- HDC aCompDC = CreateCompatibleDC( aScrDC );
- HBITMAP aBMP = CreateCompatibleBitmap( aScrDC, w, h );
-
- BITMAP aBitInfo;
- GetObject ( aBMP, sizeof(BITMAP), &aBitInfo );
- int depth = aBitInfo.bmBitsPixel; //how many bits represent a color of one pixel
-
- int aLineSize = w*depth;
- int dw = aLineSize % 32; //scanline word aligning
-
- if( dw )
- aLineSize += 32-dw;
-
- aLineSize /= 8;
-
- BYTE* bits = new BYTE[aLineSize*h];
- memset( bits, 0, aLineSize*h );
- uchar* aLine = NULL;
-
- for( int i=0; i<h; i++ )
- {
- aLine = buf.scanLine( i );
- DecodeScanLine( w, bits+aLineSize*i, depth, aLine, buf.depth() );
- }
-
- SetBitmapBits( aBMP, aLineSize*h, bits );
-
- HGDIOBJ old = SelectObject( aCompDC, aBMP );
-
- XFORM aTrans;
- GetWorldTransform( dc, &aTrans );
- XFORM aRotTrans = aTrans;
- double a = aRotTrans.eM11,
- b = aRotTrans.eM12,
- c = aRotTrans.eM21,
- d = aRotTrans.eM22;
-
- aRotTrans.eM11 = a*cos( aRot )-b*sin( aRot ); //we multiply the current matrix with the rotation matrix
- aRotTrans.eM12 = a*sin( aRot )+b*cos( aRot );
- aRotTrans.eM21 = c*cos( aRot )-d*sin( aRot );
- aRotTrans.eM22 = c*sin( aRot )+d*cos( aRot );
-
- a = aRotTrans.eM11;
- b = aRotTrans.eM12;
- c = aRotTrans.eM21;
- d = aRotTrans.eM22;
-
- double det = a*d-b*c, //now we find the invert matrix
- newa = d/det,
- newb = -c/det,
- newc = -b/det,
- newd = a/det;
-
- a = newa; b = newb; c = newc; d = newd;
-
- aRotTrans.eDx = lx -(a*left+c*top); //we find the dx and dy translating (left,top)->(lx,ly) -
- aRotTrans.eDy = ly -(b*left+d*top); //the real image of left-top corner of picture
-
- SetWorldTransform( dc, &aRotTrans );
- int res = StretchBlt( dc, left, top, right-left, bottom-top, aCompDC, 0, 0, w, h, SRCCOPY );
- SetWorldTransform( dc, &aTrans );
-
- SelectObject( aCompDC, old );
-
- ReleaseDC( 0, aScrDC );
- DeleteDC( aCompDC );
- DeleteObject( aBMP );
- delete[] bits;
-
- aViewerCS->setRotation( aRot );
- }
-}
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE
-//
-// 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
-//
-// Author : OPEN CASCADE
-//
-
-// File: GLViewer_Widget.h
-// Created: November, 2004
-
-#ifndef GLVIEWER_WIDGET_H
-#define GLVIEWER_WIDGET_H
-
-#include "GLViewer.h"
-
-#include <qgl.h>
-#include <qfile.h>
-
-class GLViewer_ViewPort2d;
-class GLViewer_CoordSystem;
-
-/*!
- \class GLViewer_Widget
- Widget for visualization of OpenGL scene
-*/
-class GLVIEWER_API GLViewer_Widget : public QGLWidget
-{
- Q_OBJECT
-
-public:
- //! A constructor
- /*! Parameters using for QOGLWidget as is
- */
- GLViewer_Widget( QWidget* theParent, const char* theName = 0 );
-
- //! A destructor
- ~GLViewer_Widget();
-
- //! Returns parent GLViewer_ViewPort2d
- /*! ViewPort2d because this class is not use for 3D Viewer */
- GLViewer_ViewPort2d* getViewPort() const { return myViewPort; }
- //! Returns width of OpenGl Window
- GLint getWidth() const { return myWidth; }
- //! Returns height of OpenGl Window
- GLint getHeight() const { return myHeight; }
-
- //! Returns scales on OpenGL scene along 3 directions
- /*! in 2d scene zScale = 1.0 */
- void getScale( GLfloat& xScale,
- GLfloat& yScale,
- GLfloat& zScale );
- //! A function for installing the scales of OpenGL scene
- void setScale( GLfloat xScale,
- GLfloat yScale,
- GLfloat zScaleGLfloat );
-
- //! Returns offset parameters of Window in OpenGL global scene
- void getPan( GLfloat& xPan, GLfloat& yPan, GLfloat& zPan );
- //! A function for installing the offset parameters of Window in OpenGL global scene
- void setPan( GLfloat xPan, GLfloat yPan, GLfloat zPan );
-
- //! Returns rotation angle of Window in OpenGL global scene in degree
- /*! Only in 2D */
- GLfloat getRotationAngle() const { return myRotationAnglePrev; }
- //! A function for installing the rotation angle of Window in OpenGL global scene in degree
- /*! Only in 2D */
- void setRotationAngle( GLfloat a ) { myRotationAnglePrev = a; }
-
- //! Returns start point of curren rotation of Window in OpenGL global scene
- void getRotationStart( GLfloat& rotationStartX,
- GLfloat& rotationStartY,
- GLfloat& rotationStartZ );
- //! A function for installing the start point of curren rotation of Window in OpenGL global scene
- void setRotationStart( GLfloat rotationStartX,
- GLfloat rotationStartY,
- GLfloat rotationStartZ );
- //! Returns parameters of current rotation
- void getRotation( GLfloat& rotationAngle,
- GLfloat& rotationCenterX,
- GLfloat& rotationCenterY,
- GLfloat& rotationCenterZ );
- //! A function for installing the parameters of current rotation
- void setRotation( GLfloat, GLfloat, GLfloat, GLfloat );
-
- //! A function load picture from file with name theFileName and post it in center of global OpenGL scene
- void setBackground( QString theFileName );
-
- //! A function add the tool tip with text theTTText on theTTRect rect to the widget window
- void addToolTip( QString theTTText, QRect theTTRect );
- //! A function remove tool tip form widget window
- void removeToolTip();
-
- //! A function translate background of window in to PostScript file on disk
- /*!
- *\param hFile the name of PostScript file chosen by user
- *\param aViewerCS the GLViewer_CoordSystem of window
- *\param aPSCS the GLViewer_CoordSystem of PostScript page
- */
- virtual void translateBackgroundToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS );
-
- //! A function repaints OpenGL scene in export mode
- /* Repaints all objects in only current view */
- void exportRepaint();
-
-#ifdef WIN32
- //! A function translate background of window in to EMF file on disk
- //!
- /*!
- *\warning WIN32 only
- *
- *\param dc the name of HDC associated with file chosen by user
- *\param aViewerCS the GLViewer_CoordSystem of window
- *\param aEMFCS the GLViewer_CoordSystem of EMF page
- */
- virtual void translateBackgroundToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS );
-#endif
-
-private:
- //! Auxiliary function. Returns rect of window background in viewer coordinate system
- void getBackgroundRectInViewerCS( double& left, double& top, double& right, double& bottom );
-
-protected:
- /* Redefined QT methods */
- //! A function is called before first display of window (create OpenGL scene)
- virtual void initializeGL();
- //! A function is called in earch paint event of window
- /* Calling by public method repaint() */
- virtual void paintGL();
- //! A function is called in earch resize event of window
- virtual void resizeGL( int, int );
-
-
- virtual void paintEvent( QPaintEvent* );
- virtual void mouseMoveEvent( QMouseEvent* );
- virtual void mousePressEvent( QMouseEvent* );
- virtual void mouseReleaseEvent( QMouseEvent* );
-
- /* Needs to redefine because Window must be updated highlight presentation when mouse enter window */
- virtual void enterEvent( QEvent* );
- /* Needs to redefine because Window must be updated highlight presentation when mouse leave window */
- virtual void leaveEvent( QEvent* );
-
-private:
- //! width of window
- GLint myWidth;
- //! height of window
- GLint myHeight;
-
- //! Scale along X direction
- GLfloat myXScale;
- //! Scale along Y direction
- GLfloat myYScale;
- //! Scale along Z direction
- /* equals 1 in 2D */
- GLfloat myZScale;
-
- //! Window offset along X direction
- GLfloat myXPan;
- //! Window offset along Y direction
- GLfloat myYPan;
- //! Window offset along Z direction
- /* equals 0 in 2D */
- GLfloat myZPan;
-
- GLfloat myRotationStartX;
- GLfloat myRotationStartY;
- GLfloat myRotationStartZ;
- GLfloat myRotationAngle;
- GLfloat myRotationCenterX;
- GLfloat myRotationCenterY;
- GLfloat myRotationCenterZ;
- GLfloat myRotationAnglePrev;
-
- GLboolean myStart;
- GLViewer_ViewPort2d* myViewPort;
-
- //! True if background is loaded
- bool isLoadBackground;
- //! File name of background image
- QString myBackgroundFile;
- //! Texture id of loaded background image
- GLuint texName;
- //! Width of background image
- int myIW;
- //! Height of background image
- int myIH;
- //! Size of background image
- int myBackgroundSize;
-
- QRect myToolTipRect;
-
- //! Needs for export repaint
- bool isExportMode;
-};
-
-#endif // GLVIEWER_WIDGET_H
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : caf
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libGLViewer.la
-
-salomeinclude_HEADERS= \
- GLViewer.h \
- GLViewer_AspectLine.h \
- GLViewer_BaseDrawers.h \
- GLViewer_BaseObjects.h \
- GLViewer_Compass.h \
- GLViewer_Context.h \
- GLViewer_CoordSystem.h \
- GLViewer_Defs.h \
- GLViewer_Drawer.h \
- GLViewer_Geom.h \
- GLViewer_Grid.h \
- GLViewer_Group.h \
- GLViewer_MimeSource.h \
- GLViewer_Object.h \
- GLViewer_Selector.h \
- GLViewer_Selector2d.h \
- GLViewer_Text.h \
- GLViewer_Tools.h \
- GLViewer_ToolTip.h \
- GLViewer_ViewFrame.h \
- GLViewer_ViewManager.h \
- GLViewer_ViewPort.h \
- GLViewer_ViewPort2d.h \
- GLViewer_Viewer.h \
- GLViewer_Viewer2d.h \
- GLViewer_Widget.h
-
-dist_libGLViewer_la_SOURCES= \
- GLViewer_AspectLine.cxx \
- GLViewer_BaseDrawers.cxx \
- GLViewer_BaseObjects.cxx \
- GLViewer_Compass.cxx \
- GLViewer_Context.cxx \
- GLViewer_CoordSystem.cxx \
- GLViewer_Drawer.cxx \
- GLViewer_Geom.cxx \
- GLViewer_Grid.cxx \
- GLViewer_Group.cxx \
- GLViewer_MimeSource.cxx \
- GLViewer_Object.cxx \
- GLViewer_Selector.cxx \
- GLViewer_Selector2d.cxx \
- GLViewer_Text.cxx \
- GLViewer_Tools.cxx \
- GLViewer_ToolTip.cxx \
- GLViewer_ViewFrame.cxx \
- GLViewer_ViewManager.cxx \
- GLViewer_ViewPort.cxx \
- GLViewer_ViewPort2d.cxx \
- GLViewer_Viewer.cxx \
- GLViewer_Viewer2d.cxx \
- GLViewer_Widget.cxx
-
-MOC_FILES= \
- GLViewer_Selector_moc.cxx \
- GLViewer_Selector2d_moc.cxx \
- GLViewer_ToolTip_moc.cxx \
- GLViewer_ViewFrame_moc.cxx \
- GLViewer_ViewManager_moc.cxx \
- GLViewer_ViewPort_moc.cxx \
- GLViewer_ViewPort2d_moc.cxx \
- GLViewer_Viewer_moc.cxx \
- GLViewer_Viewer2d_moc.cxx \
- GLViewer_Widget_moc.cxx
-nodist_libGLViewer_la_SOURCES= $(MOC_FILES)
-
-dist_salomeres_DATA= \
- resources/cursor_rotate.png \
- resources/cursor_sketch.png \
- resources/cursor_zoom.png \
- resources/view_dump.png \
- resources/view_fitall.png \
- resources/view_fitarea.png \
- resources/view_fitselect.png \
- resources/view_glpan.png \
- resources/view_pan.png \
- resources/view_reset.png \
- resources/view_zoom.png
-
-nodist_salomeres_DATA= \
- GLViewer_images.qm \
- GLViewer_msg_en.qm
-
-libGLViewer_la_CPPFLAGS=$(QT_INCLUDES) $(CAS_CPPFLAGS) -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
-libGLViewer_la_LDFLAGS=$(QT_MT_LIBS) $(CAS_KERNEL)
-
-libGLViewer_la_LIBADD= ../SUIT/libsuit.la
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: GLViewer_images.po
-// Created: 10/25/2004 12:46:36 PM
-// Author: Sergey Anikin
-// Copyright (C) CEA 2004
-
-msgid ""
-msgstr ""
-"Project-Id-Version: example-Qt-message-extraction\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 2005-05-05 10:17+0400\n"
-"Last-Translator: \n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-msgid "ICON_GL_FITALL"
-msgstr "view_fitall.png"
-
-msgid "ICON_GL_FITAREA"
-msgstr "view_fitarea.png"
-
-msgid "ICON_GL_FITSELECT"
-msgstr "view_fitselect.png"
-
-msgid "ICON_GL_GLOBALPAN"
-msgstr "view_glpan.png"
-
-msgid "ICON_GL_PAN"
-msgstr "view_pan.png"
-
-msgid "ICON_GL_RESET"
-msgstr "view_reset.png"
-
-msgid "ICON_GL_ZOOM"
-msgstr "view_zoom.png"
-
-msgid "ICON_GL_DUMP"
-msgstr "view_dump.png"
-
-msgid "ICON_GL_CURSOR_ZOOM"
-msgstr "cursor_zoom.png"
-
-msgid "ICON_GL_CURSOR_ROTATE"
-msgstr "cursor_rotate.png"
-
-msgid "ICON_GL_CURSOR_SKETCH"
-msgstr "cursor_sketch.png"
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: GLViewer_msg_en.po
-// Created: 10/25/2004 12:46:36 PM
-// Author: Sergey Anikin
-// Copyright (C) CEA 2004
-
-msgid ""
-msgstr ""
-"Project-Id-Version: example-Qt-message-extraction\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 1999-02-23 15:38+0200\n"
-"Last-Translator: \n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-msgid "LBL_TOOLBAR_LABEL"
-msgstr "View Operations"
-
-msgid "DSC_RESET_VIEW"
-msgstr "Reset View Point"
-
-msgid "MNU_RESET_VIEW"
-msgstr "Reset"
-
-msgid "DSC_FITALL"
-msgstr "Fit all objects inside the view frame"
-
-msgid "MNU_FITALL"
-msgstr "Fit All"
-
-msgid "DSC_FITRECT"
-msgstr "Fit area within the view frame"
-
-msgid "MNU_FITRECT"
-msgstr "Fit Area"
-
-msgid "DSC_FITSELECT"
-msgstr "Fit area of selection within the view frame"
-
-msgid "MNU_FITSELECT"
-msgstr "Fit Selection"
-
-msgid "DSC_ZOOM_VIEW"
-msgstr "Zoom the view"
-
-msgid "MNU_ZOOM_VIEW"
-msgstr "Zoom"
-
-msgid "DSC_PAN_VIEW"
-msgstr "Panning the view"
-
-msgid "MNU_PAN_VIEW"
-msgstr "Panning"
-
-msgid "DSC_GLOBALPAN_VIEW"
-msgstr "Selection of a new center of the view"
-
-msgid "MNU_GLOBALPAN_VIEW"
-msgstr "Global Panning"
-
-msgid "DSC_DUMP_VIEW"
-msgstr "Saves the active view in the image file"
-
-msgid "MNU_DUMP_VIEW"
-msgstr "Dump"
-
-msgid "GL_IMAGE_FILES"
-msgstr "Images Files (*.bmp *.png)"
-
-msgid "INF_APP_DUMP_VIEW"
-msgstr "Dump view"
-
-msgid "ERR_DOC_CANT_SAVE_FILE"
-msgstr "Cannot save file"
-
-msgid "ERROR"
-msgstr "Error"
-
-msgid "CHANGE_BGCOLOR"
-msgstr "Change background..."
-
-msgid "GLViewer_ViewFrame::DUMP_VIEW_SAVE_FILE_DLG_CAPTION"
-msgstr "Save Dump View in file"
-
-msgid "GLViewer_ViewFrame::DUMP_VIEW_ERROR_DLG_CAPTION"
-msgstr "Error"
-
-msgid "GLViewer_ViewFrame::DUMP_VIEW_ERROR_DLG_TEXT"
-msgstr "Can't save Dump View in file"
-
-msgid "GLViewer_ViewManager::GL_VIEW_TITLE"
-msgstr "GL Scene:%M - viewer:%V"
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp.h
-// Created: June, 2005
-// Author: OCC team
-
-
-// The following ifdef block is the standard way of creating macros which make exporting
-// from a DLL simpler. All files within this DLL are compiled with the LightApp_EXPORTS
-// symbol defined on the command line. this symbol should not be defined on any project
-// that uses this DLL. This way any other project whose source files include this file see
-// LightApp_API functions as being imported from a DLL, wheras this DLL sees symbols
-// defined with this macro as being exported.
-#ifdef WNT
-
-#ifdef LIGHTAPP_EXPORTS
-#define LIGHTAPP_EXPORT __declspec(dllexport)
-#else
-#define LIGHTAPP_EXPORT __declspec(dllimport)
-#endif
-
-#pragma warning ( disable:4251 )
-#pragma warning ( disable:4786 )
-#pragma warning ( disable:4503 )
-
-#else
-#define LIGHTAPP_EXPORT
-#endif //WNT
-
-#define APP_VERSION "0.1"
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_AboutDlg.cxx
-// Created: 03.06.2005 13:52:45
-// Author: Sergey TELKOV
-// Copyright (C) CEA 2005
-
-#include "LightApp_AboutDlg.h"
-
-#include <SUIT_Session.h>
-#include <SUIT_ResourceMgr.h>
-
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qgroupbox.h>
-
-/*!Constructor.*/
-LightApp_AboutDlg::LightApp_AboutDlg( const QString& defName, const QString& defVer, QWidget* parent )
-: QtxDialog( parent, "salome_about_dialog", true, false, None )
-{
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-
- QPixmap ico = resMgr->loadPixmap( "LightApp", tr( "ICO_ABOUT" ), false );
- if ( !ico.isNull() )
- setIcon( ico );
-
- QPalette pal = palette();
- QColorGroup cg = pal.active();
- cg.setColor( QColorGroup::Foreground, Qt::darkBlue );
- cg.setColor( QColorGroup::Background, Qt::white );
- pal.setActive( cg ); pal.setInactive( cg ); pal.setDisabled( cg );
- setPalette(pal);
-
- QVBoxLayout* main = new QVBoxLayout( mainFrame() );
- QGroupBox* base = new QGroupBox( 1, Qt::Horizontal, "", mainFrame() );
- base->setFrameStyle( QFrame::NoFrame );
- base->setInsideMargin( 0 );
- main->addWidget( base );
-
- QLabel* screen = new QLabel( base );
- screen->setScaledContents( true );
- screen->setAlignment( Qt::AlignCenter );
- screen->setFrameStyle( QFrame::Box | QFrame::Plain );
-
- QLabel* title = new QLabel( base );
- title->setAlignment( Qt::AlignCenter );
- changeFont( title, true, false, false, 5 );
-
- QLabel* version = new QLabel( base );
- version->setAlignment( Qt::AlignCenter );
- changeFont( version, false, true, false, 2 );
-
- QLabel* copyright = new QLabel( base );
- copyright->setAlignment( Qt::AlignCenter );
- changeFont( copyright, false, false, false, 1 );
-
- QLabel* license = new QLabel( base );
- license->setAlignment( Qt::AlignCenter );
- changeFont( license, false, false, false, 1 );
-
- screen->setPixmap( resMgr->loadPixmap( "LightApp", tr( "ABOUT" ), false ) );
- checkLabel( screen );
-
- QString titleText = tr( "ABOUT_TITLE" );
- if ( titleText == "ABOUT_TITLE" )
- titleText = defName;
- title->setText( titleText );
- checkLabel( title );
-
- QString verText = tr( "ABOUT_VERSION" );
- if ( verText.contains( "%1" ) )
- verText = verText.arg( defVer );
- version->setText( verText );
- checkLabel( version );
-
- copyright->setText( tr( "ABOUT_COPYRIGHT" ) );
- checkLabel( copyright );
-
- license->setText( tr( "ABOUT_LICENSE" ) );
- checkLabel( license );
-
- QString capText = tr( "ABOUT_CAPTION" );
- if ( capText.contains( "%1" ) )
- capText = capText.arg( defName );
- setCaption( capText );
-
- setSizeGripEnabled( false );
-}
-
-/*!Destructor.*/
-LightApp_AboutDlg::~LightApp_AboutDlg()
-{
- //! Do nothing.
-}
-
-/*!On mouse press event.*/
-void LightApp_AboutDlg::mousePressEvent( QMouseEvent* )
-{
- accept();
-}
-
-/*!Change font of widget \a wid.
- *\param wid - QWidget
- *\param bold - boolean value
- *\param italic - boolean value
- *\param underline - boolean value
- *\param inc - integer increment for font point size.
- */
-void LightApp_AboutDlg::changeFont( QWidget* wid, const bool bold, const bool italic,
- const bool underline, const int inc ) const
-{
- if ( !wid )
- return;
-
- QFont widFont = wid->font();
- widFont.setBold( bold );
- widFont.setItalic( italic );
- widFont.setUnderline( underline );
- widFont.setPointSize( widFont.pointSize() + inc );
-}
-
-/*!Check lable \a lab.*/
-void LightApp_AboutDlg::checkLabel( QLabel* lab ) const
-{
- if ( !lab )
- return;
-
- bool vis = !lab->text().stripWhiteSpace().isEmpty() ||
- ( lab->pixmap() && !lab->pixmap()->isNull() );
- vis ? lab->show() : lab->hide();
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_AboutDlg.h
-// Created: 03.06.2005 13:49:25
-// Author: Sergey TELKOV
-// Copyright (C) CEA 2005
-
-#ifndef LIGHTAPP_ABOUTDLG_H
-#define LIGHTAPP_ABOUTDLG_H
-
-#include "LightApp.h"
-
-#include <QtxDialog.h>
-
-class QLabel;
-
-/*!
- \class LightApp_AboutDlg
- LightApp help about dialog
-*/
-class LIGHTAPP_EXPORT LightApp_AboutDlg : public QtxDialog
-{
- Q_OBJECT
-
-public:
- LightApp_AboutDlg( const QString&, const QString&, QWidget* = 0 );
- virtual ~LightApp_AboutDlg();
-
-protected:
- virtual void mousePressEvent( QMouseEvent* );
-
-private:
- void checkLabel( QLabel* ) const;
- void changeFont( QWidget*, const bool = false, const bool = false,
- const bool = false, const int = 0 ) const;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_Application.cxx
-// Created: 6/20/2005 18:39:45 PM
-// Author: Natalia Donis
-// Copyright (C) CEA 2005
-
-#ifndef DISABLE_PYCONSOLE
- #include "PythonConsole_PyInterp.h" // WARNING! This include must be the first!
- #include <PythonConsole_PyConsole.h>
-#endif
-
-#include "LightApp_Application.h"
-#include "LightApp_WidgetContainer.h"
-#include "LightApp_Module.h"
-#include "LightApp_DataModel.h"
-#include "LightApp_Study.h"
-#include "LightApp_Preferences.h"
-#include "LightApp_PreferencesDlg.h"
-#include "LightApp_ModuleDlg.h"
-#include "LightApp_AboutDlg.h"
-
-#include "LightApp_OBFilter.h"
-
-#include "LightApp_EventFilter.h"
-
-#include "LightApp_OBSelector.h"
-#include "LightApp_SelectionMgr.h"
-#include "LightApp_DataObject.h"
-
-#include <CAM_Module.h>
-#include <CAM_DataModel.h>
-#include <CAM_Study.h>
-#include <STD_TabDesktop.h>
-
-#include <SUIT_Session.h>
-#include <SUIT_Study.h>
-#include <SUIT_FileDlg.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_Tools.h>
-#include <SUIT_Accel.h>
-
-#include <QtxMRUAction.h>
-#include <QtxDockAction.h>
-#include <QtxToolBar.h>
-#include <qprocess.h>
-
-#include <LogWindow.h>
-#include <OB_Browser.h>
-#include <OB_ListView.h>
-#include <OB_ObjSearch.h>
-
-#ifndef DISABLE_GLVIEWER
- #include <GLViewer_Viewer.h>
- #include <GLViewer_ViewManager.h>
- #include "LightApp_GLSelector.h"
-#endif
-
-#ifndef DISABLE_PLOT2DVIEWER
- #include <Plot2d_ViewManager.h>
- #include <Plot2d_ViewModel.h>
-#ifndef DISABLE_SALOMEOBJECT
- #include <SPlot2d_ViewModel.h>
-#else
- #include <Plot2d_ViewModel.h>
-#endif
-#endif
-
-#ifndef DISABLE_OCCVIEWER
- #include <OCCViewer_ViewManager.h>
-#ifndef DISABLE_SALOMEOBJECT
- #include <SOCC_ViewModel.h>
-#else
- #include <OCCViewer_ViewModel.h>
-#endif
- #include "LightApp_OCCSelector.h"
-#endif
-
-#ifndef DISABLE_VTKVIEWER
-#ifndef DISABLE_SALOMEOBJECT
- #include <SVTK_ViewModel.h>
- #include <SVTK_ViewManager.h>
- #include "LightApp_VTKSelector.h"
-#else
- #include <VTKViewer_ViewModel.h>
- #include <VTKViewer_ViewManager.h>
-#endif
- #include <VTKViewer_ViewModel.h>
-#endif
-
-//#ifndef DISABLE_SUPERVGRAPHVIEWER
-// #include <SUPERVGraph_ViewModel.h>
-// #include <SUPERVGraph_ViewFrame.h>
-// #include <SUPERVGraph_ViewManager.h>
-//#endif
-
-#ifndef DISABLE_QXGRAPHVIEWER
- #include <QxGraph_ViewModel.h>
- #include <QxGraph_ViewWindow.h>
- #include <QxGraph_ViewManager.h>
-#endif
-
-#include <QtxWorkstack.h>
-
-#include <qdir.h>
-#include <qimage.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qapplication.h>
-#include <qmap.h>
-#include <qstatusbar.h>
-#include <qthread.h>
-#include <qobjectlist.h>
-#include <qcombobox.h>
-#include <qinputdialog.h>
-#include <qmessagebox.h>
-#include <qfontdatabase.h>
-
-#define FIRST_HELP_ID 1000000
-
-#ifndef DISABLE_SALOMEOBJECT
- #include "SALOME_InteractiveObject.hxx"
- #include "SALOME_ListIO.hxx"
-#endif
-
-static const char* imageEmptyIcon[] = {
-"20 20 1 1",
-". c None",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"....................",
-"...................."};
-
-int LightApp_Application::lastStudyId = 0;
-
-/*!
- \return last global id of study
-*/
-int LightApp_Application::studyId()
-{
- return LightApp_Application::lastStudyId;
-}
-
-/*!Create new instance of LightApp_Application.*/
-extern "C" LIGHTAPP_EXPORT SUIT_Application* createApplication()
-{
- return new LightApp_Application();
-}
-
-/*! \var global preferences of LightApp */
-LightApp_Preferences* LightApp_Application::_prefs_ = 0;
-
-/*!
- \class LightApp_Application
- Application containing LightApp module
-*/
-
-/*!Constructor.*/
-LightApp_Application::LightApp_Application()
-: CAM_Application( false ),
-myPrefs( 0 )
-{
- STD_TabDesktop* desk = new STD_TabDesktop();
-
- setDesktop( desk );
-
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- QPixmap aLogo = aResMgr->loadPixmap( "LightApp", tr( "APP_DEFAULT_ICO" ), false );
-
- desktop()->setIcon( aLogo );
- desktop()->setDockableMenuBar( true );
- desktop()->setDockableStatusBar( false );
-
- // base logo (salome itself)
- desktop()->addLogo( "_app_base", aResMgr->loadPixmap( "LightApp", tr( "APP_BASE_LOGO" ), false ) );
- // extra logo (salome-based application)
- desktop()->addLogo( "_app_extra", aResMgr->loadPixmap( "LightApp", tr( "APP_EXTRA_LOGO" ), false ) );
-
- clearViewManagers();
-
- mySelMgr = new LightApp_SelectionMgr( this );
-
- myAccel = SUIT_Accel::getAccel();
-
-#ifndef DISABLE_OCCVIEWER
- myAccel->setActionKey( SUIT_Accel::PanLeft, CTRL+Key_Left, OCCViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::PanRight, CTRL+Key_Right, OCCViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::PanUp, CTRL+Key_Up, OCCViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::PanDown, CTRL+Key_Down, OCCViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::ZoomIn, CTRL+Key_Plus, OCCViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::ZoomOut, CTRL+Key_Minus, OCCViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::ZoomFit, CTRL+Key_Asterisk, OCCViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::RotateLeft, ALT+Key_Left, OCCViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::RotateRight, ALT+Key_Right, OCCViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::RotateUp, ALT+Key_Up, OCCViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::RotateDown, ALT+Key_Down, OCCViewer_Viewer::Type() );
-#endif
-#ifndef DISABLE_VTKVIEWER
- myAccel->setActionKey( SUIT_Accel::PanLeft, CTRL+Key_Left, VTKViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::PanRight, CTRL+Key_Right, VTKViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::PanUp, CTRL+Key_Up, VTKViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::PanDown, CTRL+Key_Down, VTKViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::ZoomIn, CTRL+Key_Plus, VTKViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::ZoomOut, CTRL+Key_Minus, VTKViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::ZoomFit, CTRL+Key_Asterisk, VTKViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::RotateLeft, ALT+Key_Left, VTKViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::RotateRight, ALT+Key_Right, VTKViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::RotateUp, ALT+Key_Up, VTKViewer_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::RotateDown, ALT+Key_Down, VTKViewer_Viewer::Type() );
-#endif
-#ifndef DISABLE_PLOT2DVIEWER
- myAccel->setActionKey( SUIT_Accel::PanLeft, CTRL+Key_Left, Plot2d_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::PanRight, CTRL+Key_Right, Plot2d_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::PanUp, CTRL+Key_Up, Plot2d_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::PanDown, CTRL+Key_Down, Plot2d_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::ZoomIn, CTRL+Key_Plus, Plot2d_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::ZoomOut, CTRL+Key_Minus, Plot2d_Viewer::Type() );
- myAccel->setActionKey( SUIT_Accel::ZoomFit, CTRL+Key_Asterisk, Plot2d_Viewer::Type() );
-#endif
-
- connect( mySelMgr, SIGNAL( selectionChanged() ), this, SLOT( onSelection() ) );
-
- // Set existing font for the python console in resources
- if( !aResMgr->hasValue( "PyConsole", "font" ) )
- return;
-
- QFont f = aResMgr->fontValue( "PyConsole", "font" );
- QFontDatabase fdb;
- QStringList famdb = fdb.families();
-
- if ( famdb.contains(f.family()) || !aResMgr->hasValue( "PyConsole", "additional_families" ) )
- return;
-
- QStringList anAddFamilies = QStringList::split( ";", aResMgr->stringValue( "PyConsole", "additional_families" ) );
- QString aFamily;
- for ( QStringList::Iterator it = anAddFamilies.begin(); it != anAddFamilies.end(); ++it )
- {
- aFamily = *it;
- if ( famdb.contains(aFamily) )
- {
- f.setFamily( aFamily );
- aResMgr->setValue( "PyConsole", "font", f );
- break;
- }
- }
-}
-
-/*!Destructor.
- *\li Save window geometry.
- *\li Save desktop geometry.
- *\li Save resource maneger.
- *\li Delete selection manager.
- */
-LightApp_Application::~LightApp_Application()
-{
- delete mySelMgr;
-}
-
-/*!Start application.*/
-void LightApp_Application::start()
-{
- if ( desktop() )
- desktop()->loadGeometry( resourceMgr(), "desktop" );
-
- CAM_Application::start();
-
- QAction* a = action( ViewWindowsId );
- if ( a && a->inherits( "QtxDockAction" ) )
- ((QtxDockAction*)a)->setAutoPlace( true );
-
- updateWindows();
- updateViewManagers();
-
- putInfo( "" );
- desktop()->statusBar()->message( "" );
-
- LightApp_EventFilter::Init();
-}
-
-/*!Gets application name.*/
-QString LightApp_Application::applicationName() const
-{
- return tr( "APP_NAME" );
-}
-
-/*!Gets application version.*/
-QString LightApp_Application::applicationVersion() const
-{
- static QString _app_version;
-
- if ( _app_version.isEmpty() )
- {
- QString resVersion = tr( "APP_VERSION" );
- if ( resVersion != "APP_VERSION" )
- {
- _app_version = resVersion;
- }
- else
- {
- QString path( ::getenv( "GUI_ROOT_DIR" ) );
- if ( !path.isEmpty() )
- path += QDir::separator();
- path += QString( "bin/salome/VERSION" );
-
- QFile vf( path );
- if ( vf.open( IO_ReadOnly ) )
- {
- QString line;
- vf.readLine( line, 1024 );
- vf.close();
-
- if ( !line.isEmpty() )
- {
- while ( !line.isEmpty() && line.at( line.length() - 1 ) == QChar( '\n' ) )
- line.remove( line.length() - 1, 1 );
-
- int idx = line.findRev( ":" );
- if ( idx != -1 )
- _app_version = line.mid( idx + 1 ).stripWhiteSpace();
- }
- }
- }
- }
- return _app_version;
-}
-
-/*!Load module by \a name.*/
-CAM_Module* LightApp_Application::loadModule( const QString& name )
-{
- CAM_Module* mod = CAM_Application::loadModule( name );
- if ( mod )
- {
- connect( this, SIGNAL( studyOpened() ), mod, SLOT( onModelOpened() ) );
- connect( this, SIGNAL( studySaved() ), mod, SLOT( onModelSaved() ) );
- connect( this, SIGNAL( studyClosed() ), mod, SLOT( onModelClosed() ) );
- }
- return mod;
-}
-
-/*!Activate module by \a modName*/
-bool LightApp_Application::activateModule( const QString& modName )
-{
- QString actName;
- CAM_Module* prevMod = activeModule();
-
- if ( prevMod )
- actName = prevMod->moduleName();
-
- if ( actName == modName )
- return true;
-
- putInfo( tr( "ACTIVATING_MODULE" ).arg( modName ) );
-
- saveWindowsGeometry();
-
- bool status = CAM_Application::activateModule( modName );
-
- updateModuleActions();
-
- putInfo( "" );
-
- if ( !status )
- return false;
-
- updateWindows();
- updateViewManagers();
-
- return true;
-}
-
-/*!
- Opens other study into active Study. If Study is empty - creates it.
- \param theName - name of study
-*/
-bool LightApp_Application::useStudy(const QString& theName)
-{
- createEmptyStudy();
- LightApp_Study* aStudy = dynamic_cast<LightApp_Study*>(activeStudy());
- bool res = false;
- if (aStudy)
- res = aStudy->loadDocument( theName );
- updateDesktopTitle();
- updateCommandsStatus();
- return res;
-}
-
-/*!Gets selection manager.*/
-LightApp_SelectionMgr* LightApp_Application::selectionMgr() const
-{
- return mySelMgr;
-}
-
-/*!Creat action "New window" for certain type of viewer:*/
-void LightApp_Application::createActionForViewer( const int id,
- const int parentId,
- const QString& suffix,
- const int accel )
-{
- QAction* a = createAction( id, tr( QString( "NEW_WINDOW_%1" ).arg( suffix ) ), QIconSet(),
- tr( QString( "NEW_WINDOW_%1" ).arg( suffix ) ),
- tr( QString( "NEW_WINDOW_%1" ).arg( suffix ) ),
- accel, desktop(), false, this, SLOT( onNewWindow() ) );
- createMenu( a, parentId, -1 );
-}
-
-/*!Create actions:*/
-void LightApp_Application::createActions()
-{
- STD_Application::createActions();
-
- SUIT_Desktop* desk = desktop();
- SUIT_ResourceMgr* resMgr = resourceMgr();
-
- //! Preferences
- createAction( PreferencesId, tr( "TOT_DESK_PREFERENCES" ), QIconSet(),
- tr( "MEN_DESK_PREFERENCES" ), tr( "PRP_DESK_PREFERENCES" ),
- CTRL+Key_F, desk, false, this, SLOT( onPreferences() ) );
-
- //! Help for modules
- int helpMenu = createMenu( tr( "MEN_DESK_HELP" ), -1, -1, 1000 );
- int helpModuleMenu = createMenu( tr( "MEN_DESK_MODULE_HELP" ), helpMenu, -1, 0 );
- createMenu( separator(), helpMenu, -1, 1 );
-
- QStringList aModuleList;
- modules( aModuleList, false );
-
- int id = LightApp_Application::UserID + FIRST_HELP_ID;
- // help for KERNEL and GUI
- QCString dir;
- QString aFileName = "index.html";
- QString root;
- QAction* a;
- if (dir = getenv("GUI_ROOT_DIR")) {
- root = Qtx::addSlash( Qtx::addSlash(dir) + Qtx::addSlash("share") + Qtx::addSlash("doc") +
- Qtx::addSlash("salome") + Qtx::addSlash("gui") + Qtx::addSlash("GUI") );
- if ( QFileInfo( root + aFileName ).exists() ) {
- a = createAction( id, tr( QString("GUI Help") ), QIconSet(),
- tr( QString("GUI Help") ),
- tr( QString("GUI Help") ),
- 0, desk, false, this, SLOT( onHelpContentsModule() ) );
- a->setName( QString("GUI") );
- createMenu( a, helpModuleMenu, -1 );
- id++;
- }
- }
- if (dir = getenv("KERNEL_ROOT_DIR")) {
- root = Qtx::addSlash( Qtx::addSlash(dir) + Qtx::addSlash("share") + Qtx::addSlash("doc") +
- Qtx::addSlash("salome") );
- if ( QFileInfo( root + aFileName ).exists() ) {
- a = createAction( id, tr( QString("KERNEL Help") ), QIconSet(),
- tr( QString("KERNEL Help") ),
- tr( QString("KERNEL Help") ),
- 0, desk, false, this, SLOT( onHelpContentsModule() ) );
- a->setName( QString("KERNEL") );
- createMenu( a, helpModuleMenu, -1 );
- id++;
- }
- }
- // help for other existing modules
- QStringList::Iterator it;
- for ( it = aModuleList.begin(); it != aModuleList.end(); ++it )
- {
- if ( (*it).isEmpty() )
- continue;
-
- QString modName = moduleName( *it );
-
- if (dir = getenv( modName + "_ROOT_DIR")) {
- root = Qtx::addSlash( Qtx::addSlash(dir) + Qtx::addSlash("share") + Qtx::addSlash("doc") +
- Qtx::addSlash("salome") + Qtx::addSlash("gui") + Qtx::addSlash(modName) );
- if ( QFileInfo( root + aFileName ).exists() ) {
-
- QAction* a = createAction( id, tr( moduleTitle(modName) + QString(" Help") ), QIconSet(),
- tr( moduleTitle(modName) + QString(" Help") ),
- tr( moduleTitle(modName) + QString(" Help") ),
- 0, desk, false, this, SLOT( onHelpContentsModule() ) );
- a->setName( modName );
- createMenu( a, helpModuleMenu, -1 );
- id++;
- }
- }
- }
-
- //! MRU
- QtxMRUAction* mru = new QtxMRUAction( tr( "TOT_DESK_MRU" ), tr( "MEN_DESK_MRU" ), desk );
- connect( mru, SIGNAL( activated( QString ) ), this, SLOT( onMRUActivated( QString ) ) );
- registerAction( MRUId, mru );
-
- // default icon for neutral point ('SALOME' module)
- QPixmap defIcon = resMgr->loadPixmap( "LightApp", tr( "APP_DEFAULT_ICO" ), false );
- if ( defIcon.isNull() )
- defIcon = QPixmap( imageEmptyIcon );
-
- //! default icon for any module
- QPixmap modIcon = resMgr->loadPixmap( "LightApp", tr( "APP_MODULE_ICO" ), false );
- if ( modIcon.isNull() )
- modIcon = QPixmap( imageEmptyIcon );
-
- QStringList modList;
- modules( modList, false );
-
- if( modList.count()>1 )
- {
- QToolBar* modTBar = new QtxToolBar( true, desk );
- modTBar->setLabel( tr( "INF_TOOLBAR_MODULES" ) );
-
- QActionGroup* modGroup = new QActionGroup( this );
- modGroup->setExclusive( true );
- modGroup->setUsesDropDown( true );
-
- a = createAction( -1, tr( "APP_NAME" ), defIcon, tr( "APP_NAME" ),
- tr( "PRP_APP_MODULE" ), 0, desk, true );
- modGroup->add( a );
- myActions.insert( QString(), a );
-
- QMap<QString, QString> iconMap;
- moduleIconNames( iconMap );
-
- const int iconSize = 20;
-
- modGroup->addTo( modTBar );
- QObjectList *l = modTBar->queryList( "QComboBox" );
- QObjectListIt oit( *l );
- while ( QObject* obj = oit.current() ) {
- QComboBox* cb = (QComboBox*)obj;
- if ( cb ) cb->setFocusPolicy( QWidget::NoFocus );
- ++oit;
- }
- delete l;
-
- modTBar->addSeparator();
-
- for ( it = modList.begin(); it != modList.end(); ++it )
- {
- if ( !isLibExists( *it ) )
- continue;
-
- QString iconName;
- if ( iconMap.contains( *it ) )
- iconName = iconMap[*it];
-
- QString modName = moduleName( *it );
-
- QPixmap icon = resMgr->loadPixmap( modName, iconName, false );
- if ( icon.isNull() )
- {
- icon = modIcon;
- printf( "****************************************************************\n" );
- printf( "* Icon for %s not found. Using the default one.\n", (*it).latin1() );
- printf( "****************************************************************\n" );
- }
-
- icon.convertFromImage( icon.convertToImage().smoothScale( iconSize, iconSize, QImage::ScaleMin ) );
-
- QAction* a = createAction( -1, *it, icon, *it, tr( "PRP_MODULE" ).arg( *it ), 0, desk, true );
- a->addTo( modTBar );
- modGroup->add( a );
-
- myActions.insert( *it, a );
- }
-
- SUIT_Tools::simplifySeparators( modTBar );
- connect( modGroup, SIGNAL( selected( QAction* ) ), this, SLOT( onModuleActivation( QAction* ) ) );
- }
-
- // New window
- int windowMenu = createMenu( tr( "MEN_DESK_WINDOW" ), -1, MenuWindowId, 100 );
- int newWinMenu = createMenu( tr( "MEN_DESK_NEWWINDOW" ), windowMenu, -1, 0 );
- createMenu( separator(), windowMenu, -1, 1 );
-
-
-#ifndef DISABLE_GLVIEWER
- createActionForViewer( NewGLViewId, newWinMenu, QString::number( 0 ), ALT+Key_G );
-#endif
-#ifndef DISABLE_PLOT2DVIEWER
- createActionForViewer( NewPlot2dId, newWinMenu, QString::number( 1 ), ALT+Key_P );
-#endif
-#ifndef DISABLE_OCCVIEWER
- createActionForViewer( NewOCCViewId, newWinMenu, QString::number( 2 ), ALT+Key_O );
-#endif
-#ifndef DISABLE_VTKVIEWER
- createActionForViewer( NewVTKViewId, newWinMenu, QString::number( 3 ), ALT+Key_K );
-#endif
-#ifndef DISABLE_QXGRAPHVIEWER
- createActionForViewer( NewQxGraphViewId, newWinMenu, QString::number( 4 ), ALT+Key_C );
-#endif
-
-
- createAction( RenameId, tr( "TOT_RENAME" ), QIconSet(), tr( "MEN_DESK_RENAME" ), tr( "PRP_RENAME" ),
- SHIFT+Key_R, desk, false, this, SLOT( onRenameWindow() ) );
- createMenu( RenameId, windowMenu, -1 );
-
- int fileMenu = createMenu( tr( "MEN_DESK_FILE" ), -1 );
- createMenu( PreferencesId, fileMenu, 15, -1 );
- createMenu( separator(), fileMenu, -1, 15, -1 );
-
- /*
- createMenu( separator(), fileMenu, -1, 100, -1 );
- createMenu( MRUId, fileMenu, 100, -1 );
- createMenu( separator(), fileMenu, -1, 100, -1 );
- */
-}
-
-/*!On module activation action.*/
-void LightApp_Application::onModuleActivation( QAction* a )
-{
- if ( !a )
- return;
-
- QString modName = a->menuText();
- if ( modName == tr( "APP_NAME" ) )
- modName = QString::null;
-
- // Force user to create/open a study before module activation
- QMap<QString, QString> iconMap;
- moduleIconNames( iconMap );
- QPixmap icon = resourceMgr()->loadPixmap( moduleName( modName ), iconMap[ modName ], false );
- if ( icon.isNull() )
- icon = resourceMgr()->loadPixmap( "LightApp", tr( "APP_MODULE_BIG_ICO" ), false ); // default icon for any module
-
- bool cancelled = false;
- while ( !modName.isEmpty() && !activeStudy() && !cancelled ){
- LightApp_ModuleDlg aDlg( desktop(), modName, icon );
- QMap<int, QString> opmap = activateModuleActions();
- for ( QMap<int, QString>::ConstIterator it = opmap.begin(); it != opmap.end(); ++it )
- aDlg.addButton( it.data(), it.key() );
-
- int res = aDlg.exec();
- if ( res != QDialog::Rejected ) {
- // some operation is selected
- moduleActionSelected( res );
- }
- else {
- putInfo( tr("INF_CANCELLED") );
- myActions[QString()]->setOn( true );
- cancelled = true;
- }
- }
-
- if ( !cancelled )
- activateModule( modName );
-}
-
-/*!Default module activation.*/
-QString LightApp_Application::defaultModule() const
-{
- QStringList aModuleNames;
- modules( aModuleNames, false ); // obtain a complete list of module names for the current configuration
- //! If there's the one and only module --> activate it automatically
- //! TODO: Possible improvement - default module can be taken from preferences
- return aModuleNames.count() > 1 ? "" : ( aModuleNames.count() ? aModuleNames.first() : "" );
-}
-
-/*!On new window slot.*/
-void LightApp_Application::onNewWindow()
-{
- const QObject* obj = sender();
- if ( !obj || !obj->inherits( "QAction" ) )
- return;
-
- QString type;
- int id = actionId( (QAction*)obj );
- switch ( id )
- {
-#ifndef DISABLE_GLVIEWER
- case NewGLViewId:
- type = GLViewer_Viewer::Type();
- break;
-#endif
-#ifndef DISABLE_PLOT2DVIEWER
- case NewPlot2dId:
- type = Plot2d_Viewer::Type();
- break;
-#endif
-#ifndef DISABLE_OCCVIEWER
- case NewOCCViewId:
- type = OCCViewer_Viewer::Type();
- break;
-#endif
-#ifndef DISABLE_VTKVIEWER
- case NewVTKViewId:
- type = VTKViewer_Viewer::Type();
- break;
-#endif
-#ifndef DISABLE_QXGRAPHVIEWER
- case NewQxGraphViewId:
- type = QxGraph_Viewer::Type();
- break;
-#endif
- }
-
- if ( !type.isEmpty() )
- createViewManager( type );
-}
-
-/*!
- SLOT: Creates new document
-*/
-void LightApp_Application::onNewDoc()
-{
- SUIT_Study* study = activeStudy();
-
- saveWindowsGeometry();
-
- CAM_Application::onNewDoc();
-
- if ( !study ) // new study will be create in THIS application
- {
- updateWindows();
- updateViewManagers();
- }
-}
-
-/*!
- SLOT: Opens new document
-*/
-void LightApp_Application::onOpenDoc()
-{
- SUIT_Study* study = activeStudy();
- saveWindowsGeometry();
-
- CAM_Application::onOpenDoc();
-
- if ( !study ) // new study will be create in THIS application
- {
- updateWindows();
- updateViewManagers();
- }
-}
-
-#include "SUIT_MessageBox.h"
-
-/*!
- SLOT: Opens new document.
- \param aName - name of file
-*/
-bool LightApp_Application::onOpenDoc( const QString& aName )
-{
- bool isAlreadyOpen = false;
-
- // Look among opened studies
- if (activeStudy()) { // at least one study is opened
- SUIT_Session* aSession = SUIT_Session::session();
- QPtrList<SUIT_Application> aAppList = aSession->applications();
- QPtrListIterator<SUIT_Application> it (aAppList);
- SUIT_Application* aApp = 0;
- // iterate on all applications
- for (; (aApp = it.current()) && !isAlreadyOpen; ++it) {
- if (aApp->activeStudy()->studyName() == aName) {
- isAlreadyOpen = true; // Already opened, ask user what to do
-
- // The document ... is already open.
- // Do you want to reload it?
- int aAnswer = SUIT_MessageBox::warn2(desktop(), tr("WRN_WARNING"),
- tr("QUE_DOC_ALREADYOPEN").arg(aName),
- tr("BUT_YES"), tr("BUT_NO"), 1, 2, 2);
- if (aAnswer == 1) { // reload
- if (activeStudy()->studyName() == aName && aAppList.count() > 1) {
- // Opened in THIS (active) application.
- STD_Application* app1 = (STD_Application*)aAppList.at(0);
- STD_Application* app2 = (STD_Application*)aAppList.at(1);
- if (!app1 || !app2) {
- // Error
- return false;
- }
- if (app1->activeStudy()->studyName() == aName) {
- // app1 is this application, we need another one
- app1 = app2;
- }
- // Close document of this application. This application will be destroyed.
- onCloseDoc(/*ask = */false);
- // Open the file with another application, as this one will be destroyed.
- return app1->onOpenDoc(aName);
- } else {
- // Opened in another application.
- STD_Application* app = (STD_Application*)aApp;
- if (app)
- app->onCloseDoc(/*ask = */false);
- }
- } else { // do not reload
- // OK, the study will not be reloaded, but we call
- // CAM_Application::onOpenDoc( aName ) all the same.
- // It will activate a desktop of the study <aName>.
- }
- }
- }
- }
-
- bool res = CAM_Application::onOpenDoc( aName );
-
- QAction* a = action( MRUId );
- if ( a && a->inherits( "QtxMRUAction" ) )
- {
- QtxMRUAction* mru = (QtxMRUAction*)a;
- if ( res )
- mru->insert( aName );
- else
- mru->remove( aName );
- }
- return res;
-}
-
-/*!
- SLOT: Displays "About" message box
-*/
-void LightApp_Application::onHelpAbout()
-{
- LightApp_AboutDlg* dlg = new LightApp_AboutDlg( applicationName(), applicationVersion(), desktop() );
- dlg->exec();
- delete dlg;
-}
-
-/*!
- SLOT: Loads document
- \param aName - name of document
-*/
-bool LightApp_Application::onLoadDoc( const QString& aName )
-{
- bool res = CAM_Application::onLoadDoc( aName );
-
- /*jfa tmp:QAction* a = action( MRUId );
- if ( a && a->inherits( "QtxMRUAction" ) )
- {
- QtxMRUAction* mru = (QtxMRUAction*)a;
- if ( res )
- mru->insert( aName );
- else
- mru->remove( aName );
- }*/
- return res;
-}
-
-/*!
- Private SLOT: Called on selection is changed
- Dispatchs active module that selection is changed
-*/
-void LightApp_Application::onSelection()
-{
- onSelectionChanged();
-
- if ( activeModule() && activeModule()->inherits( "LightApp_Module" ) )
- ((LightApp_Module*)activeModule())->selectionChanged();
-}
-
-/*!
- Sets active study.
- \param study - SUIT_Study.
-*/
-void LightApp_Application::setActiveStudy( SUIT_Study* study )
-{
- CAM_Application::setActiveStudy( study );
-
- activateWindows();
-}
-
-/*!
- Enables/Disables menu items and toolbar buttons. Rebuild menu
-*/
-void LightApp_Application::updateCommandsStatus()
-{
- CAM_Application::updateCommandsStatus();
- QAction* a = 0;
-
-#ifndef DISABLE_GLVIEWER
- a = action( NewGLViewId );
- if( a )
- a->setEnabled( activeStudy() );
-#endif
-
-#ifndef DISABLE_PLOT2DVIEWER
- a = action( NewPlot2dId );
- if( a )
- a->setEnabled( activeStudy() );
-#endif
-
-#ifndef DISABLE_OCCVIEWER
- a = action( NewOCCViewId );
- if( a )
- a->setEnabled( activeStudy() );
-#endif
-
-#ifndef DISABLE_VTKVIEWER
- a = action( NewVTKViewId );
- if( a )
- a->setEnabled( activeStudy() );
-#endif
-
-#ifndef DISABLE_QXGRAPHVIEWER
- a = action( NewQxGraphViewId );
- if( a )
- a->setEnabled( activeStudy() );
-#endif
-}
-
-/*!
- \class RunBrowser
- Runs system command in separate thread
-*/
-class RunBrowser: public QThread
-{
-public:
- RunBrowser (LightApp_Application* app, QString theApp, QString theParams,
- QString theHelpFile, QString theContext=NULL)
- : myApp(theApp), myParams(theParams),
-#ifdef WIN32
- myHelpFile("file://" + theHelpFile + theContext),
-#else
- myHelpFile("file:" + theHelpFile + theContext),
-#endif
- myStatus(0),
- myLApp( app )
- {
- };
-
- virtual void run()
- {
- QString aCommand;
-
- if (!myApp.isEmpty())
- {
- //aCommand.sprintf("%s %s %s",myApp.latin1(),myParams.latin1(),myHelpFile.latin1());
-
- //QProcess* proc = new QProcess();
- //proc->addArgument( aCommand );
-
- QProcess* proc = new QProcess();
- proc->addArgument( myApp );
- if (!myParams.isEmpty()) proc->addArgument( myParams );
- proc->addArgument( myHelpFile );
- //myStatus = system(aCommand);
-
- //if(myStatus != 0)
- if(!proc->start())
- {
- QCustomEvent* ce2000 = new QCustomEvent( 2000 );
- QString* msg = new QString( QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").arg(myApp).arg(myHelpFile) );
- ce2000->setData( msg );
- postEvent( myLApp, ce2000 );
- }
- }
- }
-
-private:
- QString myApp;
- QString myParams;
- QString myHelpFile;
- int myStatus;
- LightApp_Application* myLApp;
-};
-
-/*!
- SLOT: Displays help contents for choosen module
-*/
-void LightApp_Application::onHelpContentsModule()
-{
- const QAction* obj = (QAction*) sender();
-
- QString aComponentName = obj->name();
- QString aFileName = "index.html";
-
- QCString dir = getenv( aComponentName + "_ROOT_DIR");
- QString homeDir = !aComponentName.compare(QString("KERNEL")) ?
- Qtx::addSlash( Qtx::addSlash(dir) + Qtx::addSlash("share") + Qtx::addSlash("doc") + Qtx::addSlash("salome") ) :
- Qtx::addSlash( Qtx::addSlash(dir) + Qtx::addSlash("share") + Qtx::addSlash("doc") + Qtx::addSlash("salome") + Qtx::addSlash("gui") + Qtx::addSlash(aComponentName) );
-
- QString helpFile = QFileInfo( homeDir + aFileName ).absFilePath();
- SUIT_ResourceMgr* resMgr = resourceMgr();
- QString platform;
-#ifdef WIN32
- platform = "winapplication";
-#else
- platform = "application";
-#endif
- QString anApp = resMgr->stringValue("ExternalBrowser", platform);
-#ifdef WIN32
- QString quote("\"");
- anApp.prepend( quote );
- anApp.append( quote );
-#endif
- QString aParams = resMgr->stringValue("ExternalBrowser", "parameters");
-
- if (!anApp.isEmpty()) {
- RunBrowser* rs = new RunBrowser( this, anApp, aParams, helpFile );
- rs->start();
- }
- else {
- if( SUIT_MessageBox::warn2(desktop(), tr("WRN_WARNING"),
- tr("DEFINE_EXTERNAL_BROWSER"),
- tr("BUT_OK"),tr("BUT_CANCEL"),0,1,0 )==0 )
- onPreferences();
- }
-}
-
-/*!
- SLOT: Displays help contents for choosen dialog
-*/
-void LightApp_Application::onHelpContextModule(const QString& theComponentName, const QString& theFileName)
-{
- QCString dir = getenv( theComponentName + "_ROOT_DIR");
- QString homeDir = Qtx::addSlash(Qtx::addSlash(dir)+Qtx::addSlash("share")+Qtx::addSlash("doc")+Qtx::addSlash("salome")+Qtx::addSlash("gui")+Qtx::addSlash(theComponentName));
-
- QString helpFile = QFileInfo( homeDir + theFileName ).absFilePath();
- SUIT_ResourceMgr* resMgr = resourceMgr();
- QString platform;
-#ifdef WIN32
- platform = "winapplication";
-#else
- platform = "application";
-#endif
- QString anApp = resMgr->stringValue("ExternalBrowser", platform);
-#ifdef WIN32
- QString quote("\"");
- anApp.prepend( quote );
- anApp.append( quote );
-#endif
- QString aParams = resMgr->stringValue("ExternalBrowser", "parameters");
-
- if (!anApp.isEmpty()) {
- RunBrowser* rs = new RunBrowser( this, anApp, aParams, helpFile );
- rs->start();
- }
- else {
- if( SUIT_MessageBox::warn2(desktop(), tr("WRN_WARNING"),
- tr("DEFINE_EXTERNAL_BROWSER"),
- tr("BUT_OK"), tr("BUT_CANCEL"),0,1,0)==0 )
- onPreferences();
- }
-}
-
-/*!
- Sets enable or disable some actions on selection changed.
-*/
-void LightApp_Application::onSelectionChanged()
-{
-}
-
-/*!
- \return window by key
- \param flag - key for window
- \param studyId - study id
- Flag used how identificator of window in windows list.
-*/
-QWidget* LightApp_Application::window( const int flag, const int studyId ) const
-{
- QWidget* wid = 0;
-
- int sId = studyId;
- if ( sId < 0 )
- {
- if ( !activeStudy() )
- return 0;
- else
- sId = activeStudy()->id();
- }
-
- if ( myWindows.contains( flag ) )
- wid = myWindows[flag]->widget( sId );
-
- return wid;
-}
-
-/*!
- Adds window to application.
- \param wid - QWidget
- \param flag - key for window
- \param studyId - study id
- Flag used how identificator of window in windows list.
-*/
-void LightApp_Application::addWindow( QWidget* wid, const int flag, const int studyId )
-{
- if ( !wid )
- return;
-
- int sId = studyId;
- if ( sId < 0 )
- {
- if ( !activeStudy() )
- return;
- else
- sId = activeStudy()->id();
- }
-
- if ( !myWindows.contains( flag ) )
- {
- QMap<int, int> winMap;
- currentWindows( winMap );
-
- LightApp_WidgetContainer* newWC = new LightApp_WidgetContainer( flag, desktop() );
- connect( newWC, SIGNAL( destroyed ( QObject* ) ), this, SLOT( onWCDestroyed( QObject* ) ) );
- // asv: connecting a slot for storing visibility flag of a window
- connect( newWC, SIGNAL( visibilityChanged ( bool ) ), SLOT( onVisibilityChanged( bool ) ) );
- myWindows.insert( flag, newWC );
- if ( winMap.contains( flag ) )
- desktop()->moveDockWindow( myWindows[flag], (Dock)winMap[flag] );
-
- myWindows[flag]->setResizeEnabled( true );
- myWindows[flag]->setCloseMode( QDockWindow::Always );
- myWindows[flag]->setName( QString( "dock_window_%1" ).arg( flag ) );
- myWindows[flag]->setFixedExtentWidth( wid->width() );
- myWindows[flag]->setFixedExtentHeight( wid->height() );
- }
-
- QFont f;
-#ifndef DISABLE_PYCONSOLE
- if( wid->inherits( "PythonConsole" ) )
- {
- if( resourceMgr()->hasValue( "PyConsole", "font" ) )
- f = resourceMgr()->fontValue( "PyConsole", "font" );
- else
- {
- f = ( ( PythonConsole* )wid )->font();
- resourceMgr()->setValue( "PyConsole", "font", f );
- }
- }
- else
-#endif
- f = wid->font();
-
- myWindows[flag]->insert( sId, wid );
- wid->setFont(f);
-
- setWindowShown( flag, !myWindows[flag]->isEmpty() );
-}
-
-/*!
- Removes window from application.
- \param flag - key for window
- \param studyId - study id
- Flag used how identificator of window in windows list.
-*/
-void LightApp_Application::removeWindow( const int flag, const int studyId )
-{
- if ( !myWindows.contains( flag ) )
- return;
-
- int sId = studyId;
- if ( sId < 0 )
- {
- if ( !activeStudy() )
- return;
- else
- sId = activeStudy()->id();
- }
-
- bool anIsEmpty = !myWindows[flag]->isEmpty();
- QWidget* wid = myWindows[flag]->widget( sId );
- myWindows[flag]->remove( sId );
- delete wid;
-
- //setWindowShown( flag, !myWindows[flag]->isEmpty() );
- setWindowShown( flag, anIsEmpty );
-}
-
-/*!
- Gets window.
- \param flag - key for window
- \param studyId - study id
- Flag used how identificator of window in windows list.
-*/
-QWidget* LightApp_Application::getWindow( const int flag, const int studyId )
-{
- QWidget* wid = window( flag, studyId );
- if ( !wid )
- addWindow( wid = createWindow( flag ), flag, studyId );
-
- return wid;
-}
-
-/*!
- \return is window visible
- \param type - flag of window
-*/
-bool LightApp_Application::isWindowVisible( const int type ) const
-{
- bool res = false;
- if ( myWindows.contains( type ) )
- {
- SUIT_Desktop* desk = ((LightApp_Application*)this)->desktop();
- res = desk && desk->appropriate( myWindows[type] );
- }
- return res;
-}
-
-/*!
- Sets window show or hide.
- \param type - window identificator.
- \param on - true/false (window show/hide)
-*/
-void LightApp_Application::setWindowShown( const int type, const bool on )
-{
- if ( !desktop() || !myWindows.contains( type ) )
- return;
-
- QDockWindow* dw = myWindows[type];
- desktop()->setAppropriate( dw, on );
- if( on )
- dw->show();
- else if( dw->isShown() )
- {
- dw->hide();
- myWindowsVisible[ type ] = true;
- }
-}
-
-/*!
- \return Object Browser
-*/
-OB_Browser* LightApp_Application::objectBrowser()
-{
- OB_Browser* ob = 0;
- QWidget* wid = window( WT_ObjectBrowser );
- if ( wid && wid->inherits( "OB_Browser" ) )
- ob = (OB_Browser*)wid;
- return ob;
-}
-
-/*!
- \return Log Window
-*/
-LogWindow* LightApp_Application::logWindow()
-{
- LogWindow* lw = 0;
- QWidget* wid = getWindow( WT_LogWindow );
- if ( wid->inherits( "LogWindow" ) )
- lw = (LogWindow*)wid;
- return lw;
-}
-
-#ifndef DISABLE_PYCONSOLE
-/*!
- \return Python Console
-*/
-PythonConsole* LightApp_Application::pythonConsole()
-{
- PythonConsole* console = 0;
- QWidget* wid = getWindow( WT_PyConsole );
- if ( wid->inherits( "PythonConsole" ) )
- console = (PythonConsole*)wid;
- return console;
-}
-#endif
-
-/*!
- Updates object browser and maybe data models
- \param updateModels - if it is true, then data models are updated
-*/
-void LightApp_Application::updateObjectBrowser( const bool updateModels )
-{
- // update existing data models
- if ( updateModels )
- {
- const bool isAutoUpdate = objectBrowser() ? objectBrowser()->isAutoUpdate() : true;
- if( objectBrowser() )
- objectBrowser()->setAutoUpdate( false );
-
- LightApp_Study* study = dynamic_cast<LightApp_Study*>(activeStudy());
- if ( study ) {
- CAM_Study::ModelList dm_list;
- study->dataModels( dm_list );
- for ( CAM_Study::ModelListIterator it( dm_list ); it.current(); ++it ) {
- CAM_DataModel* camDM = it.current();
- if ( camDM && camDM->inherits( "LightApp_DataModel" ) )
- ((LightApp_DataModel*)camDM)->update();
- }
- }
-
- if( objectBrowser() )
- objectBrowser()->setAutoUpdate( isAutoUpdate );
- }
- if ( objectBrowser() )
- {
- objectBrowser()->updateGeometry();
- objectBrowser()->updateTree( 0, false );
- }
-}
-
-/*!
- \return preferences
-*/
-LightApp_Preferences* LightApp_Application::preferences() const
-{
- return preferences( false );
-}
-
-/*!
- \return first view manager of some type
- \param vmType - type of view manager
- \param create - is it necessary to create view manager in case, when there is no manager of such type
-*/
-SUIT_ViewManager* LightApp_Application::getViewManager( const QString& vmType, const bool create )
-{
- SUIT_ViewManager* aVM = viewManager( vmType );
- SUIT_ViewManager* anActiveVM = CAM_Application::activeViewManager();
-
- if ( anActiveVM && anActiveVM->getType() == vmType )
- aVM = anActiveVM;
-
- if ( aVM && create )
- {
- if ( !aVM->getActiveView() )
- aVM->createView();
- else
- aVM->getActiveView()->setFocus();
- }
- else if ( create )
- aVM = createViewManager( vmType );
-
- return aVM;
-}
-
-/*!
- Creates view manager of some type
- \param vmType - type of view manager
-*/
-SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType )
-{
- SUIT_ResourceMgr* resMgr = resourceMgr();
-
- SUIT_ViewManager* viewMgr = 0;
-#ifndef DISABLE_GLVIEWER
- if( vmType == GLViewer_Viewer::Type() )
- {
- viewMgr = new GLViewer_ViewManager( activeStudy(), desktop() );
- new LightApp_GLSelector( (GLViewer_Viewer2d*)viewMgr->getViewModel(), mySelMgr );
- }
-#endif
-#ifndef DISABLE_PLOT2DVIEWER
- if( vmType == Plot2d_Viewer::Type() )
- {
- viewMgr = new Plot2d_ViewManager( activeStudy(), desktop() );
- Plot2d_Viewer* vm;
-#ifndef DISABLE_SALOMEOBJECT
- vm = new SPlot2d_Viewer();
-#else
- vm = new Plot2d_Viewer();
-#endif
- viewMgr->setViewModel( vm );// custom view model, which extends SALOME_View interface
- Plot2d_ViewWindow* wnd = dynamic_cast<Plot2d_ViewWindow*>( viewMgr->getActiveView() );
- if( wnd )
- {
- Plot2d_ViewFrame* frame = wnd->getViewFrame();
- frame->setBackgroundColor( resMgr->colorValue( "Plot2d", "Background", frame->backgroundColor() ) );
- }
- }
-#endif
- //#ifndef DISABLE_SUPERVGRAPHVIEWER
- // if( vmType == SUPERVGraph_Viewer::Type() )
- // {
- // viewMgr = new SUPERVGraph_ViewManager( activeStudy(), desktop(), new SUPERVGraph_Viewer() );
- // }
- //#endif
-#ifndef DISABLE_QXGRAPHVIEWER
- if( vmType == QxGraph_Viewer::Type() )
- {
- viewMgr = new QxGraph_ViewManager( activeStudy(), desktop(), new QxGraph_Viewer() );
- }
-#endif
-#ifndef DISABLE_OCCVIEWER
- if( vmType == OCCViewer_Viewer::Type() )
- {
- viewMgr = new OCCViewer_ViewManager( activeStudy(), desktop() );
- OCCViewer_Viewer* vm;
-#ifndef DISABLE_SALOMEOBJECT
- vm = new SOCC_Viewer();
-#else
- vm = new OCCViewer_Viewer();
-#endif
- vm->setBackgroundColor( resMgr->colorValue( "OCCViewer", "background", vm->backgroundColor() ) );
- vm->setTrihedronSize( resMgr->doubleValue( "OCCViewer", "trihedron_size", vm->trihedronSize() ) );
- int u( 1 ), v( 1 );
- vm->isos( u, v );
- u = resMgr->integerValue( "OCCViewer", "iso_number_u", u );
- v = resMgr->integerValue( "OCCViewer", "iso_number_v", v );
- vm->setIsos( u, v );
- viewMgr->setViewModel( vm );// custom view model, which extends SALOME_View interface
- new LightApp_OCCSelector( (OCCViewer_Viewer*)viewMgr->getViewModel(), mySelMgr );
- }
-#endif
-#ifndef DISABLE_VTKVIEWER
-#ifndef DISABLE_SALOMEOBJECT
- if ( vmType == SVTK_Viewer::Type() )
-#else
- if ( vmType == VTKViewer_Viewer::Type() )
-#endif
- {
-#ifndef DISABLE_SALOMEOBJECT
- viewMgr = new SVTK_ViewManager( activeStudy(), desktop() );
- SVTK_Viewer* vm = dynamic_cast<SVTK_Viewer*>( viewMgr->getViewModel() );
- if( vm )
- {
- vm->setBackgroundColor( resMgr->colorValue( "VTKViewer", "background", vm->backgroundColor() ) );
- vm->setTrihedronSize( resMgr->doubleValue( "VTKViewer", "trihedron_size", vm->trihedronSize() ),
- resMgr->booleanValue( "VTKViewer", "relative_size", vm->trihedronRelative() ) );
- new LightApp_VTKSelector( vm, mySelMgr );
- }
-#else
- viewMgr = new VTKViewer_ViewManager( activeStudy(), desktop() );
- VTKViewer_Viewer* vm = dynamic_cast<VTKViewer_Viewer*>( viewMgr->getViewModel() );
- if ( vm )
- vm->setBackgroundColor( resMgr->colorValue( "VTKViewer", "background", vm->backgroundColor() ) );
-#endif
- }
-#endif
-
- if ( !viewMgr )
- return 0;
-
- addViewManager( viewMgr );
- SUIT_ViewWindow* viewWin = viewMgr->createViewWindow();
-
- if ( viewWin && desktop() )
- viewWin->resize( (int)( desktop()->width() * 0.6 ), (int)( desktop()->height() * 0.6 ) );
-
- return viewMgr;
-}
-
-/*!
- SLOT: Removes view manager from application
-*/
-void LightApp_Application::onCloseView( SUIT_ViewManager* theVM )
-{
- removeViewManager( theVM );
-}
-
-/*!
- Protected SLOT: On study created.
- \param theStudy - just created study
-*/
-void LightApp_Application::onStudyCreated( SUIT_Study* theStudy )
-{
- SUIT_DataObject* aRoot = 0;
- if ( theStudy && theStudy->root() )
- {
- aRoot = theStudy->root();
- //aRoot->setName( tr( "DATA_MODELS" ) );
- }
- getWindow( WT_ObjectBrowser );
- if ( objectBrowser() != 0 )
- objectBrowser()->setRootObject( aRoot );
-
- activateModule( defaultModule() );
-
- if ( objectBrowser() )
- objectBrowser()->openLevels();
-
- activateWindows();
-}
-
-/*!
- Protected SLOT: On study opened.
- \param theStudy - just opened study
-*/
-void LightApp_Application::onStudyOpened( SUIT_Study* theStudy )
-{
- SUIT_DataObject* aRoot = 0;
- if ( theStudy && theStudy->root() )
- {
- aRoot = theStudy->root();
- //aRoot->dump();
- }
- getWindow( WT_ObjectBrowser );
- if ( objectBrowser() )
- objectBrowser()->setRootObject( aRoot );
-
- activateModule( defaultModule() );
-
- if ( objectBrowser() )
- objectBrowser()->openLevels();
-
- activateWindows();
-
- emit studyOpened();
-}
-
-/*!Protected SLOT. On study saved.*/
-void LightApp_Application::onStudySaved( SUIT_Study* )
-{
- emit studySaved();
-}
-
-/*!Protected SLOT. On study closed.*/
-void LightApp_Application::onStudyClosed( SUIT_Study* s )
-{
- // Bug 10396: clear selection
- mySelMgr->clearSelected();
-
- // Bug 12944: emit signal only after clear selection
- emit studyClosed();
-
- activateModule( "" );
-
- for ( WindowMap::ConstIterator itr = myWindows.begin(); s && itr != myWindows.end(); ++itr )
- removeWindow( itr.key(), s->id() );
-}
-
-/*!Protected SLOT.On desktop activated.*/
-void LightApp_Application::onDesktopActivated()
-{
- CAM_Application::onDesktopActivated();
- LightApp_Module* aModule = dynamic_cast<LightApp_Module*>(activeModule());
- if(aModule)
- aModule->studyActivated();
-}
-
-/*!Gets file filter.
- *\retval QString "(*.bin)"
- */
-QString LightApp_Application::getFileFilter() const
-{
- //return "(*.bin)";
- // HDF persistence
- return "(*.hdf)";
-}
-
-/*!
- Shows file dialog and return user selected file name
-*/
-QString LightApp_Application::getFileName( bool open, const QString& initial, const QString& filters,
- const QString& caption, QWidget* parent )
-{
- if ( !parent )
- parent = desktop();
- QStringList fls = QStringList::split( ";;", filters, false );
- return SUIT_FileDlg::getFileName( parent, initial, fls, caption, open, true );
-}
-
-/*! Gets directory*/
-QString LightApp_Application::getDirectory( const QString& initial, const QString& caption, QWidget* parent )
-{
- if ( !parent )
- parent = desktop();
- return SUIT_FileDlg::getExistingDirectory( parent, initial, caption, true );
-}
-
-/*! Get open file names*/
-QStringList LightApp_Application::getOpenFileNames( const QString& initial, const QString& filters,
- const QString& caption, QWidget* parent )
-{
- if ( !parent )
- parent = desktop();
- QStringList fls = QStringList::split( ";;", filters, false );
- return SUIT_FileDlg::getOpenFileNames( parent, initial, fls, caption, true );
-}
-
-/*!Private SLOT. Update object browser.*/
-void LightApp_Application::onRefresh()
-{
- updateObjectBrowser( true );
-}
-
-/*!Private SLOT. On preferences.*/
-void LightApp_Application::onPreferences()
-{
- QApplication::setOverrideCursor( Qt::waitCursor );
-
- LightApp_PreferencesDlg* prefDlg = new LightApp_PreferencesDlg( preferences( true ), desktop());
-
- QApplication::restoreOverrideCursor();
-
- if ( !prefDlg )
- return;
-
- if ( ( prefDlg->exec() == QDialog::Accepted || prefDlg->isSaved() ) && resourceMgr() ) {
- if ( desktop() )
- desktop()->saveGeometry( resourceMgr(), "desktop" );
- resourceMgr()->save();
- }
-
- delete prefDlg;
-}
-
-/*!Protected SLOT. On preferences changed.*/
-void LightApp_Application::onPreferenceChanged( QString& modName, QString& section, QString& param )
-{
- LightApp_Module* sMod = 0;
- CAM_Module* mod = module( modName );
- if ( mod && mod->inherits( "LightApp_Module" ) )
- sMod = (LightApp_Module*)mod;
-
- if ( sMod )
- sMod->preferencesChanged( section, param );
- else
- preferencesChanged( section, param );
- // emit signal to allow additional preferences changing processing
- emit preferenceChanged( modName, section, param );
-}
-
-/*!Private SLOT. On open document with name \a aName.*/
-void LightApp_Application::onMRUActivated( QString aName )
-{
- onOpenDoc( aName );
-}
-
-/*!Remove all windows from study.*/
-void LightApp_Application::beforeCloseDoc( SUIT_Study* s )
-{
- CAM_Application::beforeCloseDoc( s );
-}
-
-/*!Update actions.*/
-void LightApp_Application::updateActions()
-{
- updateCommandsStatus();
-}
-
-/*!
- Creates new study
-*/
-SUIT_Study* LightApp_Application::createNewStudy()
-{
- LightApp_Application::lastStudyId++;
-
- LightApp_Study* aStudy = new LightApp_Study( this );
-
- // Set up processing of major study-related events
- connect( aStudy, SIGNAL( created( SUIT_Study* ) ), this, SLOT( onStudyCreated( SUIT_Study* ) ) );
- connect( aStudy, SIGNAL( opened ( SUIT_Study* ) ), this, SLOT( onStudyOpened ( SUIT_Study* ) ) );
- connect( aStudy, SIGNAL( saved ( SUIT_Study* ) ), this, SLOT( onStudySaved ( SUIT_Study* ) ) );
- connect( aStudy, SIGNAL( closed ( SUIT_Study* ) ), this, SLOT( onStudyClosed ( SUIT_Study* ) ) );
-
- return aStudy;
-}
-
-/*!
- Creates window by flag.
- \param flag - identificator of window type
-*/
-QWidget* LightApp_Application::createWindow( const int flag )
-{
- QWidget* wid = 0;
- if ( flag == WT_ObjectBrowser )
- {
- OB_Browser* ob = new OB_Browser( desktop() );
- ob->setSearch( new OB_ObjSearch( ob ) );
- ob->setAutoUpdate( true );
- //ob->setAutoOpenLevel( 1 ); // commented by ASV as a fix to bug IPAL10107
- ob->setCaption( tr( "OBJECT_BROWSER" ) );
-
- OB_ListView* ob_list = dynamic_cast<OB_ListView*>( const_cast<QListView*>( ob->listView() ) );
- if( ob_list )
- ob_list->setColumnMaxWidth( 0, desktop()->width()/4 );
-
- ob->setFilter( new LightApp_OBFilter( selectionMgr() ) );
- ob->setNameTitle( tr( "OBJ_BROWSER_NAME" ) );
-
- // Create OBSelector
- new LightApp_OBSelector( ob, mySelMgr );
-
- wid = ob;
-
- ob->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) );
- }
-#ifndef DISABLE_PYCONSOLE
- else if ( flag == WT_PyConsole )
- {
- PythonConsole* pyCons = new PythonConsole( desktop() );
- pyCons->setCaption( tr( "PYTHON_CONSOLE" ) );
- wid = pyCons;
- // pyCons->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) );
- }
-#endif
- else if ( flag == WT_LogWindow )
- {
- LogWindow* logWin = new LogWindow( desktop() );
- logWin->setCaption( tr( "LOG_WINDOW" ) );
- wid = logWin;
- logWin->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) );
- }
- return wid;
-}
-
-/*!
- \return default windows( Object Browser, Python Console )
- Adds to map \a aMap.
- */
-void LightApp_Application::defaultWindows( QMap<int, int>& aMap ) const
-{
- aMap.insert( WT_ObjectBrowser, Qt::DockLeft );
-#ifndef DISABLE_PYCONSOLE
- aMap.insert( WT_PyConsole, Qt::DockBottom );
-#endif
- // aMap.insert( WT_LogWindow, Qt::DockBottom );
-}
-
-/*!Default view managers*/
-void LightApp_Application::defaultViewManagers( QStringList& ) const
-{
- /*!Do nothing.*/
-}
-
-/*!
- \return preferences.
- Create preferences, if \a crt = true.
-*/
-LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const
-{
- if ( myPrefs )
- return myPrefs;
-
- LightApp_Application* that = (LightApp_Application*)this;
-
- bool toCreate = !_prefs_ && crt;
- if( toCreate )
- {
- _prefs_ = new LightApp_Preferences( resourceMgr() );
- that->createPreferences( _prefs_ );
- }
-
- that->myPrefs = _prefs_;
-
- QPtrList<SUIT_Application> appList = SUIT_Session::session()->applications();
- for ( QPtrListIterator<SUIT_Application> appIt ( appList ); appIt.current(); ++appIt )
- {
- if ( !appIt.current()->inherits( "LightApp_Application" ) )
- continue;
-
- LightApp_Application* app = (LightApp_Application*)appIt.current();
-
- QStringList modNameList;
- app->modules( modNameList, false );
- for ( QStringList::const_iterator it = modNameList.begin(); it != modNameList.end(); ++it )
- {
- int id = _prefs_->addPreference( *it );
- _prefs_->setItemProperty( id, "info", tr( "PREFERENCES_NOT_LOADED" ).arg( *it ) );
- }
-
- ModuleList modList;
- app->modules( modList );
- for ( ModuleListIterator itr( modList ); itr.current(); ++itr )
- {
- LightApp_Module* mod = 0;
- if ( itr.current()->inherits( "LightApp_Module" ) )
- mod = (LightApp_Module*)itr.current();
-
- if ( mod && !_prefs_->hasModule( mod->moduleName() ) )
- {
- int modCat = _prefs_->addPreference( mod->moduleName() );
- _prefs_->setItemProperty( modCat, "info", QString::null );
- if( toCreate )
- mod->createPreferences();
- }
- }
- }
-
- connect( myPrefs, SIGNAL( preferenceChanged( QString&, QString&, QString& ) ),
- this, SLOT( onPreferenceChanged( QString&, QString&, QString& ) ) );
-
- return myPrefs;
-}
-
-/*!
- Adds new module to application
-*/
-void LightApp_Application::moduleAdded( CAM_Module* mod )
-{
- CAM_Application::moduleAdded( mod );
-
- LightApp_Module* lightMod = 0;
- if ( mod && mod->inherits( "LightApp_Module" ) )
- lightMod = (LightApp_Module*)mod;
-
- if ( myPrefs && lightMod && !myPrefs->hasModule( lightMod->moduleName() ))
- {
- int modCat = myPrefs->addPreference( mod->moduleName() );
- myPrefs->setItemProperty( modCat, "info", QString::null );
- lightMod->createPreferences();
- }
-}
-
-/*!
- Create preferences
-*/
-void LightApp_Application::createPreferences( LightApp_Preferences* pref )
-{
- if ( !pref )
- return;
-
- int salomeCat = pref->addPreference( tr( "PREF_CATEGORY_SALOME" ) );
-
- int genTab = pref->addPreference( tr( "PREF_TAB_GENERAL" ), salomeCat );
- int studyGroup = pref->addPreference( tr( "PREF_GROUP_STUDY" ), genTab );
- pref->setItemProperty( studyGroup, "columns", 1 );
-
- pref->addPreference( tr( "PREF_MULTI_FILE" ), studyGroup, LightApp_Preferences::Bool, "Study", "multi_file" );
- pref->addPreference( tr( "PREF_ASCII_FILE" ), studyGroup, LightApp_Preferences::Bool, "Study", "ascii_file" );
- pref->addPreference( tr( "PREF_STORE_POS" ), studyGroup, LightApp_Preferences::Bool, "Study", "store_positions" );
-
- int extgroup = pref->addPreference( tr( "PREF_GROUP_EXT_BROWSER" ), genTab );
- pref->setItemProperty( extgroup, "columns", 1 );
- QString platform;
-#ifdef WIN32
- platform = "winapplication";
-#else
- platform = "application";
-#endif
- int apppref = pref->addPreference( tr( "PREF_APP" ), extgroup, LightApp_Preferences::File, "ExternalBrowser", platform );
- pref->setItemProperty( apppref, "existing", true );
- pref->setItemProperty( apppref, "flags", QFileInfo::ExeUser );
- pref->setItemProperty( apppref, "readOnly", false );
-
- pref->addPreference( tr( "PREF_PARAM" ), extgroup, LightApp_Preferences::String, "ExternalBrowser", "parameters" );
-
- int pythonConsoleGroup = pref->addPreference( tr( "PREF_GROUP_PY_CONSOLE" ), genTab );
- pref->setItemProperty( pythonConsoleGroup, "columns", 1 );
- pref->addPreference( tr( "PREF_FONT" ), pythonConsoleGroup, LightApp_Preferences::Font, "PyConsole", "font" );
-
- int viewTab = pref->addPreference( tr( "PREF_TAB_VIEWERS" ), salomeCat );
-
- int occGroup = pref->addPreference( tr( "PREF_GROUP_OCCVIEWER" ), viewTab );
-
- int vtkGroup = pref->addPreference( tr( "PREF_GROUP_VTKVIEWER" ), viewTab );
-
- int plot2dGroup = pref->addPreference( tr( "PREF_GROUP_PLOT2DVIEWER" ), viewTab );
-
- int supervGroup = pref->addPreference( tr( "PREF_GROUP_SUPERV" ), viewTab );
-
- pref->setItemProperty( occGroup, "columns", 1 );
- pref->setItemProperty( vtkGroup, "columns", 1 );
- pref->setItemProperty( plot2dGroup, "columns", 1 );
-
- int occTS = pref->addPreference( tr( "PREF_TRIHEDRON_SIZE" ), occGroup,
- LightApp_Preferences::DblSpin, "OCCViewer", "trihedron_size" );
- pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), occGroup,
- LightApp_Preferences::Color, "OCCViewer", "background" );
-
- pref->setItemProperty( occTS, "min", 1.0E-06 );
- pref->setItemProperty( occTS, "max", 1000 );
-
- int isoU = pref->addPreference( tr( "PREF_ISOS_U" ), occGroup,
- LightApp_Preferences::IntSpin, "OCCViewer", "iso_number_u" );
- int isoV = pref->addPreference( tr( "PREF_ISOS_V" ), occGroup,
- LightApp_Preferences::IntSpin, "OCCViewer", "iso_number_v" );
-
- pref->setItemProperty( isoU, "min", 0 );
- pref->setItemProperty( isoU, "max", 100000 );
-
- pref->setItemProperty( isoV, "min", 0 );
- pref->setItemProperty( isoV, "max", 100000 );
-
- int vtkTS = pref->addPreference( tr( "PREF_TRIHEDRON_SIZE" ), vtkGroup,
- LightApp_Preferences::DblSpin, "VTKViewer", "trihedron_size" );
- pref->addPreference( tr( "PREF_RELATIVE_SIZE" ), vtkGroup, LightApp_Preferences::Bool, "VTKViewer", "relative_size" );
- pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), vtkGroup,
- LightApp_Preferences::Color, "VTKViewer", "background" );
-
- pref->setItemProperty( vtkTS, "min", 1.0E-06 );
- pref->setItemProperty( vtkTS, "max", 150 );
-
- pref->addPreference( tr( "PREF_SHOW_LEGEND" ), plot2dGroup,
- LightApp_Preferences::Bool, "Plot2d", "ShowLegend" );
-
- int legendPosition = pref->addPreference( tr( "PREF_LEGEND_POSITION" ), plot2dGroup,
- LightApp_Preferences::Selector, "Plot2d", "LegendPos" );
- QStringList aLegendPosList;
- aLegendPosList.append( tr("PREF_LEFT") );
- aLegendPosList.append( tr("PREF_RIGHT") );
- aLegendPosList.append( tr("PREF_TOP") );
- aLegendPosList.append( tr("PREF_BOTTOM") );
-
- QValueList<QVariant> anIndexesList;
- anIndexesList.append(0);
- anIndexesList.append(1);
- anIndexesList.append(2);
- anIndexesList.append(3);
-
- pref->setItemProperty( legendPosition, "strings", aLegendPosList );
- pref->setItemProperty( legendPosition, "indexes", anIndexesList );
-
- int curveType = pref->addPreference( tr( "PREF_CURVE_TYPE" ), plot2dGroup,
- LightApp_Preferences::Selector, "Plot2d", "CurveType" );
- QStringList aCurveTypesList;
- aCurveTypesList.append( tr("PREF_POINTS") );
- aCurveTypesList.append( tr("PREF_LINES") );
- aCurveTypesList.append( tr("PREF_SPLINE") );
-
- anIndexesList.clear();
- anIndexesList.append(0);
- anIndexesList.append(1);
- anIndexesList.append(2);
-
- pref->setItemProperty( curveType, "strings", aCurveTypesList );
- pref->setItemProperty( curveType, "indexes", anIndexesList );
-
- int markerSize = pref->addPreference( tr( "PREF_MARKER_SIZE" ), plot2dGroup,
- LightApp_Preferences::IntSpin, "Plot2d", "MarkerSize" );
-
- pref->setItemProperty( markerSize, "min", 0 );
- pref->setItemProperty( markerSize, "max", 100 );
-
- QStringList aScaleModesList;
- aScaleModesList.append( tr("PREF_LINEAR") );
- aScaleModesList.append( tr("PREF_LOGARITHMIC") );
-
- anIndexesList.clear();
- anIndexesList.append(0);
- anIndexesList.append(1);
-
- int horScale = pref->addPreference( tr( "PREF_HOR_AXIS_SCALE" ), plot2dGroup,
- LightApp_Preferences::Selector, "Plot2d", "HorScaleMode" );
-
- pref->setItemProperty( horScale, "strings", aScaleModesList );
- pref->setItemProperty( horScale, "indexes", anIndexesList );
-
- int verScale = pref->addPreference( tr( "PREF_VERT_AXIS_SCALE" ), plot2dGroup,
- LightApp_Preferences::Selector, "Plot2d", "VerScaleMode" );
-
- pref->setItemProperty( verScale, "strings", aScaleModesList );
- pref->setItemProperty( verScale, "indexes", anIndexesList );
-
- pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), plot2dGroup,
- LightApp_Preferences::Color, "Plot2d", "Background" );
-
- int dirTab = pref->addPreference( tr( "PREF_TAB_DIRECTORIES" ), salomeCat );
- int dirGroup = pref->addPreference( tr( "PREF_GROUP_DIRECTORIES" ), dirTab );
- pref->setItemProperty( dirGroup, "columns", 1 );
- pref->addPreference( tr( "" ), dirGroup,
- LightApp_Preferences::DirList, "FileDlg", "QuickDirList" );
-
- pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), supervGroup,
- LightApp_Preferences::Color, "SUPERVGraph", "Background" );
- pref->addPreference( tr( "PREF_SUPERV_TITLE_COLOR" ), supervGroup,
- LightApp_Preferences::Color, "SUPERVGraph", "Title" );
-// pref->addPreference( tr( "PREF_SUPERV_CTRL_COLOR" ), supervGroup,
-// LightApp_Preferences::Color, "SUPERVGraph", "Ctrl" );
-
- int obTab = pref->addPreference( tr( "PREF_TAB_OBJBROWSER" ), salomeCat );
- int objSetGroup = pref->addPreference( tr( "PREF_OBJ_BROWSER_SETTINGS" ), obTab );
- pref->addPreference( tr( "PREF_AUTO_SIZE_FIRST" ), objSetGroup, LightApp_Preferences::Bool,
- "ObjectBrowser", "auto_size_first" );
- pref->addPreference( tr( "PREF_AUTO_SIZE" ), objSetGroup, LightApp_Preferences::Bool,
- "ObjectBrowser", "auto_size" );
-}
-
-/*!
- Changes appearance of application according to changed preferences
- \param sec - section
- \param param - name of changed parameter
-*/
-void LightApp_Application::preferencesChanged( const QString& sec, const QString& param )
-{
- SUIT_ResourceMgr* resMgr = resourceMgr();
- if ( !resMgr )
- return;
-
-#ifndef DISABLE_OCCVIEWER
- if ( sec == QString( "OCCViewer" ) && param == QString( "trihedron_size" ) )
- {
- double sz = resMgr->doubleValue( sec, param, -1 );
- QPtrList<SUIT_ViewManager> lst;
- viewManagers( OCCViewer_Viewer::Type(), lst );
- for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current() && sz >= 0; ++it )
- {
- SUIT_ViewModel* vm = it.current()->getViewModel();
- if ( !vm || !vm->inherits( "OCCViewer_Viewer" ) )
- continue;
-
- OCCViewer_Viewer* occVM = (OCCViewer_Viewer*)vm;
- occVM->setTrihedronSize( sz );
- occVM->getAISContext()->UpdateCurrentViewer();
- }
- }
-#endif
-
-#ifndef DISABLE_VTKVIEWER
- if ( sec == QString( "VTKViewer" ) && (param == QString( "trihedron_size" ) || param == QString( "relative_size" )) )
- {
- double sz = resMgr->doubleValue( "VTKViewer", "trihedron_size", -1 );
- bool isRelative = resMgr->booleanValue( "VTKViewer", "relative_size", true );
- QPtrList<SUIT_ViewManager> lst;
-#ifndef DISABLE_SALOMEOBJECT
- viewManagers( SVTK_Viewer::Type(), lst );
- for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current() && sz >= 0; ++it )
- {
- SUIT_ViewModel* vm = it.current()->getViewModel();
- if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
- continue;
-
- SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
- if( vtkVM )
- {
- vtkVM->setTrihedronSize( sz, isRelative );
- vtkVM->Repaint();
- }
- }
-#endif
- }
-#endif
-
-#ifndef DISABLE_OCCVIEWER
- if ( sec == QString( "OCCViewer" ) && ( param == QString( "iso_number_u" ) || param == QString( "iso_number_v" ) ) )
- {
- QPtrList<SUIT_ViewManager> lst;
- viewManagers( OCCViewer_Viewer::Type(), lst );
- int u = resMgr->integerValue( sec, "iso_number_u" );
- int v = resMgr->integerValue( sec, "iso_number_v" );
- for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current(); ++it )
- {
- OCCViewer_ViewManager* mgr = dynamic_cast<OCCViewer_ViewManager*>( it.current() );
- if( mgr && mgr->getOCCViewer() )
- mgr->getOCCViewer()->setIsos( u, v );
- }
- }
-#endif
-
- if( sec=="ObjectBrowser" )
- {
- if( param=="auto_size" || param=="auto_size_first" )
- {
- OB_Browser* ob = objectBrowser();
- if( !ob )
- return;
-
- bool autoSize = resMgr->booleanValue( "ObjectBrowser", "auto_size", false ),
- autoSizeFirst = resMgr->booleanValue( "ObjectBrowser", "auto_size_first", true );
- ob->setWidthMode( autoSize ? QListView::Maximum : QListView::Manual );
- ob->listView()->setColumnWidthMode( 0, autoSizeFirst ? QListView::Maximum : QListView::Manual );
- if( autoSize )
- for( int i=1; i<ob->listView()->columns(); i++ )
- if( ob->listView()->columnWidth( i )>0 )
- ob->listView()->adjustColumn( i );
- updateObjectBrowser( false );
- }
- }
-
- if( sec=="Study" )
- {
- if( param=="store_positions" )
- updateWindows();
- }
-
-#ifndef DISABLE_PYCONSOLE
- if( sec=="PyConsole" )
- {
- if( param=="font" )
- if( pythonConsole() )
- pythonConsole()->setFont( resMgr->fontValue( "PyConsole", "font" ) );
- }
-#endif
-}
-
-/*!
- Saves preferences
-*/
-void LightApp_Application::savePreferences()
-{
- saveWindowsGeometry();
-
- if ( resourceMgr() )
- {
- if ( desktop() )
- desktop()->saveGeometry( resourceMgr(), "desktop" );
- resourceMgr()->save();
- }
-}
-
-/*!
- Updates desktop title
-*/
-void LightApp_Application::updateDesktopTitle() {
- QString aTitle = applicationName();
- QString aVer = applicationVersion();
- if ( !aVer.isEmpty() )
- aTitle += QString( " " ) + aVer;
-
- if ( activeStudy() ) {
- QString sName = SUIT_Tools::file( activeStudy()->studyName().stripWhiteSpace(), false );
- aTitle += QString( " - [%1]" ).arg( sName );
- }
-
- desktop()->setCaption( aTitle );
-}
-
-/*!
- \brief Get module activation actions
- \return map <action_id><action_name> where
- - action_id is unique non-zero action identifier
- - action_name is action title
- \sa moduleActionSelected()
-*/
-QMap<int, QString> LightApp_Application::activateModuleActions() const
-{
- QMap<int, QString> opmap;
- opmap.insert( NewStudyId, tr( "ACTIVATE_MODULE_OP_NEW" ) );
- opmap.insert( OpenStudyId, tr( "ACTIVATE_MODULE_OP_OPEN" ) );
- return opmap;
-}
-
-/*!
- \brief Process module activation action.
- \param id action identifier
- \sa activateModuleActions()
-*/
-void LightApp_Application::moduleActionSelected( const int id )
-{
- switch ( id ) {
- case NewStudyId:
- onNewDoc();
- break;
- case OpenStudyId:
- onOpenDoc();
- break;
- default:
- break;
- }
-}
-/*!
- Updates windows after close document
-*/
-void LightApp_Application::afterCloseDoc()
-{
- updateWindows();
-
- CAM_Application::afterCloseDoc();
-}
-
-/*!
- Updates actions of active module
-*/
-void LightApp_Application::updateModuleActions()
-{
- QString modName;
- if ( activeModule() )
- modName = activeModule()->moduleName();
-
- if ( myActions.contains( modName ) )
- myActions[modName]->setOn( true );
-}
-
-/*!
- Gets current windows.
- \param winMap - output current windows map.
-*/
-void LightApp_Application::currentWindows( QMap<int, int>& winMap ) const
-{
- winMap.clear();
- if ( !activeStudy() )
- return;
-
- if ( activeModule() && activeModule()->inherits( "LightApp_Module" ) )
- ((LightApp_Module*)activeModule())->windows( winMap );
- else
- defaultWindows( winMap );
-}
-
-/*!
- Gets current view managers.
- \param lst - output current view managers list.
-*/
-void LightApp_Application::currentViewManagers( QStringList& lst ) const
-{
- lst.clear();
- if ( !activeStudy() )
- return;
-
- if ( activeModule() && activeModule()->inherits( "LightApp_Module" ) )
- ((LightApp_Module*)activeModule())->viewManagers( lst );
- else
- defaultViewManagers( lst );
-}
-
-/*!
- Updates windows
-*/
-void LightApp_Application::updateWindows()
-{
- QMap<int, int> winMap;
- currentWindows( winMap );
-
- if ( activeStudy() ) {
- for ( QMap<int, int>::ConstIterator it = winMap.begin(); it != winMap.end(); ++it ) {
- getWindow( it.key() );
-
- Dock dock; int index, extraOffset; bool nl;
- if ( desktop()->getLocation( myWindows[it.key()], dock, index, nl, extraOffset )
- &&
- dock != (Dock)it.data() )
- desktop()->moveDockWindow( myWindows[it.key()], (Dock)it.data() );
- }
-
- loadWindowsGeometry();
- }
-
- // setWindowShown should be done even if no study is active (open). in this case all open windows
- // will be hidden, which is neccessary in this case.
- for ( WindowMap::ConstIterator itr = myWindows.begin(); itr != myWindows.end(); ++itr ) {
-
- if ( myWindowsVisible.contains( itr.key() ) &&
- !myWindowsVisible[ itr.key() ] )
- continue;
-
- setWindowShown( itr.key(), !itr.data()->isEmpty() && winMap.contains( itr.key() ) );
- }
-}
-
-/*!
- Updates view managers
-*/
-void LightApp_Application::updateViewManagers()
-{
- QStringList lst;
- currentViewManagers( lst );
-
- for ( QStringList::const_iterator it = lst.begin(); it != lst.end(); ++it )
- getViewManager( *it, true );
-}
-
-/*!
- Loads windows geometry
-*/
-void LightApp_Application::loadWindowsGeometry()
-{
- bool store = resourceMgr()->booleanValue( "Study", "store_positions", true );
- if( !store )
- return;
-
- QtxDockAction* dockMgr = 0;
-
- QAction* a = action( ViewWindowsId );
- if ( a && a->inherits( "QtxDockAction" ) )
- dockMgr = (QtxDockAction*)a;
-
- if ( !dockMgr )
- return;
-
- QString modName;
- if ( activeModule() )
- modName = activeModule()->name("");
-
- QString section = QString( "windows_geometry" );
- if ( !modName.isEmpty() )
- section += QString( "." ) + modName;
-
- dockMgr->loadGeometry( resourceMgr(), section, false );
- dockMgr->restoreGeometry();
-}
-
-/*!
- Saves windows geometry
-*/
-void LightApp_Application::saveWindowsGeometry()
-{
- bool store = resourceMgr()->booleanValue( "Study", "store_positions", true );
- if( !store )
- return;
-
- QtxDockAction* dockMgr = 0;
-
- QAction* a = action( ViewWindowsId );
- if ( a && a->inherits( "QtxDockAction" ) )
- dockMgr = (QtxDockAction*)a;
-
- if ( !dockMgr )
- return;
-
- QString modName;
- if ( activeModule() )
- modName = activeModule()->name("");
-
- QString section = QString( "windows_geometry" );
- if ( !modName.isEmpty() )
- section += QString( "." ) + modName;
-
- dockMgr->storeGeometry();
- dockMgr->saveGeometry( resourceMgr(), section, false );
-}
-
-/*!
- Activates windows
-*/
-void LightApp_Application::activateWindows()
-{
- if ( activeStudy() )
- {
- for ( WindowMap::Iterator itr = myWindows.begin(); itr != myWindows.end(); ++itr )
- itr.data()->activate( activeStudy()->id() );
- }
-}
-
-/*!
- Adds icon names for modules
-*/
-void LightApp_Application::moduleIconNames( QMap<QString, QString>& iconMap ) const
-{
- iconMap.clear();
-
- SUIT_ResourceMgr* resMgr = resourceMgr();
- if ( !resMgr )
- return;
-
- QStringList modList;
- modules( modList, false );
-
- for ( QStringList::const_iterator it = modList.begin(); it != modList.end(); ++it )
- {
- QString modName = *it;
- QString modIntr = moduleName( modName );
- QString modIcon = resMgr->stringValue( modIntr, "icon", QString::null );
-
- if ( modIcon.isEmpty() )
- continue;
-
- if ( SUIT_Tools::extension( modIcon ).isEmpty() )
- modIcon += QString( ".png" );
-
- iconMap.insert( modName, modIcon );
- }
-}
-
-/*!
- Inserts items in popup, which necessary for current application
-*/
-void LightApp_Application::contextMenuPopup( const QString& type, QPopupMenu* thePopup, QString& title )
-{
- CAM_Application::contextMenuPopup( type, thePopup, title );
-
- OB_Browser* ob = objectBrowser();
- if ( !ob || type != ob->popupClientType() )
- return;
-
- thePopup->insertSeparator();
- thePopup->insertItem( tr( "MEN_REFRESH" ), this, SLOT( onRefresh() ) );
- thePopup->insertItem( tr( "MEN_FIND" ), this, SLOT( onFind() ) );
-}
-
-/*!
- Create empty study
-*/
-void LightApp_Application::createEmptyStudy()
-{
- CAM_Application::createEmptyStudy();
- if ( objectBrowser() )
- objectBrowser()->updateTree();
-}
-
-/*!
- Activates module
- \param mod - module to be activated
-*/
-bool LightApp_Application::activateModule( CAM_Module* mod )
-{
- bool res = CAM_Application::activateModule( mod );
- if ( objectBrowser() )
- objectBrowser()->updateTree();
- return res;
-}
-
-/*!
- \return keyborad accelerators manager object
-*/
-SUIT_Accel* LightApp_Application::accel() const
-{
- return myAccel;
-}
-
-/*!
- Removes dead widget container from map
-*/
-void LightApp_Application::onWCDestroyed( QObject* ob )
-{
- // remove destroyed widget container from windows map
- for ( WindowMap::ConstIterator itr = myWindows.begin(); itr != myWindows.end(); ++itr )
- {
- if ( itr.data() != ob )
- continue;
-
- int key = itr.key();
- myWindows.remove( key );
- break;
- }
-}
-
-/*!
- Connects just added view manager
-*/
-void LightApp_Application::addViewManager( SUIT_ViewManager* vm )
-{
- connect( vm, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
- this, SLOT( onCloseView( SUIT_ViewManager* ) ) );
- STD_Application::addViewManager( vm );
-}
-
-/*!
- Remove view manager from memory
-*/
-void LightApp_Application::removeViewManager( SUIT_ViewManager* vm )
-{
- disconnect( vm, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
- this, SLOT( onCloseView( SUIT_ViewManager* ) ) );
- STD_Application::removeViewManager( vm );
- delete vm;
-}
-
-/*!
- Renames active window of desktop
-*/
-void LightApp_Application::onRenameWindow()
-{
- if( !desktop() )
- return;
-
- QWidget* w = desktop()->activeWindow();
- if( !w )
- return;
-
- bool ok;
- QString name = QInputDialog::getText( tr( "TOT_RENAME" ), tr( "PRP_RENAME" ), QLineEdit::Normal, w->caption(), &ok, w );
- if( ok && !name.isEmpty() )
- w->setCaption( name );
-}
-
-/*!
- \return if the library of module exists
- \param moduleTitle - title of module
-*/
-bool LightApp_Application::isLibExists( const QString& moduleTitle ) const
-{
- if( moduleTitle.isEmpty() )
- return false;
-
- QString lib = moduleLibrary( moduleTitle );
-
- //abd: changed libSalomePyQtGUI to SalomePyQtGUI for WIN32
- bool isPythonModule = lib.contains("SalomePyQtGUI");
-
- QStringList paths;
-#ifdef WIN32
- paths = QStringList::split( ";", ::getenv( "PATH" ) );
-#else
- paths = QStringList::split( ":", ::getenv( "LD_LIBRARY_PATH" ) );
-#endif
-
- bool isLibFound = false;
- QStringList::const_iterator anIt = paths.begin(), aLast = paths.end();
- for( ; anIt!=aLast; anIt++ )
- {
- QFileInfo inf( Qtx::addSlash( *anIt ) + lib );
-
- if( inf.exists() )
- {
- isLibFound = true;
- break;
- }
- }
-
- if ( !isLibFound )
- {
- printf( "****************************************************************\n" );
- printf( "* Warning: library %s cannot be found\n", lib.latin1() );
- printf( "* Module %s will not be available in GUI mode\n", moduleTitle.latin1() );
- printf( "****************************************************************\n" );
- }
- else if ( !isPythonModule )
- return true;
-
- if ( isPythonModule )
- {
- QString pylib = moduleName( moduleTitle ) + QString(".py");
- QString pylibgui = moduleName( moduleTitle ) + QString("GUI.py");
-
- // Check the python library
-#ifdef WIN32
- paths = QStringList::split( ";", ::getenv( "PATH" ) );
-#else
- paths = QStringList::split( ":", ::getenv( "PYTHONPATH" ) );
-#endif
- bool isPyLib = false, isPyGuiLib = false;
- QStringList::const_iterator anIt = paths.begin(), aLast = paths.end();
- for( ; anIt!=aLast; anIt++ )
- {
- QFileInfo inf( Qtx::addSlash( *anIt ) + pylib );
- QFileInfo infgui( Qtx::addSlash( *anIt ) + pylibgui );
-
- if( !isPyLib && inf.exists() )
- isPyLib = true;
-
- if( !isPyGuiLib && infgui.exists() )
- isPyGuiLib = true;
-
- if ( isPyLib && isPyGuiLib && isLibFound)
- return true;
- }
-
- printf( "****************************************************************\n" );
- printf( "* Warning: python library for %s cannot be found:\n", moduleTitle.latin1() );
- if (!isPyLib)
- printf( "* No module named %s\n", moduleName( moduleTitle ).latin1() );
- if (!isPyGuiLib)
- printf( "* No module named %s\n", (moduleName( moduleTitle ) + QString("GUI")).latin1() );
- printf( "****************************************************************\n" );
- return true;
- }
- return false;
-}
-
-/*!
- \return default name for an active study
-*/
-void LightApp_Application::setDefaultStudyName( const QString& theName )
-{
- QStringList anInfoList;
- modules( anInfoList, false );
-
- LightApp_Study* aStudy = (LightApp_Study*)activeStudy();
- if( anInfoList.count() == 1 && // to avoid a conflict between different modules
- !aStudy->isSaved() )
- {
- aStudy->setStudyName( theName );
- updateDesktopTitle();
- }
-}
-
-/*! slot, called on show/hide of a dock window */
-void LightApp_Application::onVisibilityChanged( bool visible )
-{
- const QObject* win = sender();
-
- for ( WindowMap::ConstIterator itr = myWindows.begin(); itr != myWindows.end(); ++itr )
- if ( itr.data() == win )
- {
- myWindowsVisible[ itr.key() ] = visible;
- return;
- }
-}
-
-/*!
- Custom event handler
-*/
-bool LightApp_Application::event( QEvent* e )
-{
- if( e && e->type()==2000 )
- {
- QCustomEvent* ce = ( QCustomEvent* )e;
- QString* d = ( QString* )ce->data();
- if( SUIT_MessageBox::warn2(0, tr("WRN_WARNING"),
- d ? *d : "",
- tr("BUT_OK"), tr("BUT_CANCEL"), 0, 1, 0 )==0 )
- onPreferences();
- if( d )
- delete d;
- return true;
- }
- return CAM_Application::event( e );
-}
-
-/*! Check data object */
-bool LightApp_Application::checkDataObject(LightApp_DataObject* theObj)
-{
- if (theObj)
- {
- bool isSuitable = !theObj->entry().isEmpty() &&
- !theObj->componentDataType().isEmpty() &&
- !theObj->name().isEmpty();
- return isSuitable;
- }
-
- return false;
-}
-
-void LightApp_Application::onFind()
-{
- objectBrowser()->enableSearch( true );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_Application.h
-// Created: 6/20/2005 18:39:25 PM
-// Author: OCC team
-// Copyright (C) CEA 2005
-
-#ifndef LIGHTAPP_APPLICATION_H
-#define LIGHTAPP_APPLICATION_H
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include "LightApp.h"
-#include <CAM_Application.h>
-
-class LogWindow;
-class OB_Browser;
-#ifndef DISABLE_PYCONSOLE
- class PythonConsole;
-#endif
-class STD_Application;
-class LightApp_WidgetContainer;
-class LightApp_Preferences;
-class LightApp_SelectionMgr;
-class LightApp_DataObject;
-class SUIT_Study;
-class SUIT_Accel;
-class CAM_Module;
-
-class QString;
-class QWidget;
-class QStringList;
-class QPixmap;
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- Description : Application containing only LightApp module
-*/
-
-class LIGHTAPP_EXPORT LightApp_Application : public CAM_Application
-{
- Q_OBJECT
-
-public:
- typedef enum { WT_ObjectBrowser,
-#ifndef DISABLE_PYCONSOLE
- WT_PyConsole,
-#endif
- WT_LogWindow,
- WT_User }
- WindowTypes;
-
- enum { MenuWindowId = 6 };
-
- enum { RenameId = CAM_Application::UserID,
-
-#ifndef DISABLE_GLVIEWER
- NewGLViewId ,
-#endif
-
-#ifndef DISABLE_PLOT2DVIEWER
- NewPlot2dId,
-#endif
-
-#ifndef DISABLE_OCCVIEWER
- NewOCCViewId,
-#endif
-
-#ifndef DISABLE_VTKVIEWER
- NewVTKViewId,
-#endif
-
-#ifndef DISABLE_QXGRAPHVIEWER
- NewQxGraphViewId,
-#endif
-
- PreferencesId, MRUId, UserID };
-
-protected:
- enum { NewStudyId = 1, OpenStudyId };
-
-public:
- LightApp_Application();
- virtual ~LightApp_Application();
-
- virtual QString applicationName() const;
- virtual QString applicationVersion() const;
-
- virtual CAM_Module* loadModule( const QString& );
- virtual bool activateModule( const QString& );
-
- virtual bool useStudy( const QString& );
-
- LightApp_SelectionMgr* selectionMgr() const;
-
- LogWindow* logWindow();
- OB_Browser* objectBrowser();
-#ifndef DISABLE_PYCONSOLE
- PythonConsole* pythonConsole();
-#endif
-
- virtual void updateObjectBrowser( const bool = true );
-
- LightApp_Preferences* preferences() const;
-
- virtual QString getFileFilter() const;
-
- virtual QString getFileName( bool open, const QString& initial, const QString& filters,
- const QString& caption, QWidget* parent );
- virtual QString getDirectory( const QString& initial, const QString& caption, QWidget* parent );
- virtual QStringList getOpenFileNames( const QString& initial, const QString& filters,
- const QString& caption, QWidget* parent );
-
- void updateActions();
-
- SUIT_ViewManager* getViewManager( const QString&, const bool );
- virtual void addViewManager( SUIT_ViewManager* );
- virtual void removeViewManager( SUIT_ViewManager* );
- virtual SUIT_ViewManager* createViewManager( const QString& vmType );
-
- QWidget* getWindow( const int, const int = -1 );
- QWidget* window( const int, const int = -1 ) const;
- void addWindow( QWidget*, const int, const int = -1 );
- void removeWindow( const int, const int = -1 );
-
- bool isWindowVisible( const int ) const;
- void setWindowShown( const int, const bool );
-
- virtual void start();
-
- virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
-
- virtual void createEmptyStudy();
-
- SUIT_Accel* accel() const;
-
- void setDefaultStudyName( const QString& theName );
-
- static int studyId();
-
- virtual bool event( QEvent* );
-
- virtual bool checkDataObject( LightApp_DataObject* theObj );
-
-signals:
- void studyOpened();
- void studySaved();
- void studyClosed();
- void preferenceChanged( const QString&, const QString&, const QString& );
-
-public slots:
- virtual void onHelpContentsModule();
- virtual void onHelpContextModule( const QString&, const QString& );
- virtual void onNewDoc();
- virtual void onOpenDoc();
- virtual void onHelpAbout();
- virtual bool onOpenDoc( const QString& );
- virtual bool onLoadDoc( const QString& );
-
-protected:
- virtual void createActions();
- virtual void createActionForViewer( const int id,
- const int parentId,
- const QString& suffix,
- const int accel );
- virtual SUIT_Study* createNewStudy();
- virtual QWidget* createWindow( const int );
- virtual void defaultWindows( QMap<int, int>& ) const;
- void defaultViewManagers( QStringList& ) const;
-
- virtual void setActiveStudy( SUIT_Study* );
- virtual void updateCommandsStatus();
- virtual void onSelectionChanged();
-
- virtual void beforeCloseDoc( SUIT_Study* );
- virtual void afterCloseDoc();
- virtual void moduleAdded( CAM_Module* );
- virtual bool activateModule( CAM_Module* = 0 );
-
- LightApp_Preferences* preferences( const bool ) const;
- virtual void createPreferences( LightApp_Preferences* );
- virtual void preferencesChanged( const QString&, const QString& );
- virtual void savePreferences();
- virtual void updateDesktopTitle();
-
- virtual QMap<int, QString> activateModuleActions() const;
- virtual void moduleActionSelected( const int );
-
-protected slots:
- virtual void onDesktopActivated();
-
- void onNewWindow();
- void onModuleActivation( QAction* );
- void onCloseView( SUIT_ViewManager* );
-
- void onStudyCreated( SUIT_Study* );
- void onStudyOpened( SUIT_Study* );
- void onStudySaved( SUIT_Study* );
- void onStudyClosed( SUIT_Study* );
-
- void onWCDestroyed( QObject* );
-
-private slots:
- void onSelection();
- void onRefresh();
- void onFind();
- void onPreferences();
- void onMRUActivated( QString );
- void onPreferenceChanged( QString&, QString&, QString& );
- void onRenameWindow();
- void onVisibilityChanged( bool );
-
-protected:
- void updateWindows();
- void updateViewManagers();
- void updateModuleActions();
-
- void loadWindowsGeometry();
- void saveWindowsGeometry();
-
- void updatePreference( const QString&, const QString&, const QString& );
-
- QString defaultModule() const;
- void currentWindows( QMap<int, int>& ) const;
- void currentViewManagers( QStringList& ) const;
- void moduleIconNames( QMap<QString, QString>& ) const;
-
- void activateWindows();
- bool isLibExists( const QString& ) const;
-
-protected:
- typedef QMap<QString, QAction*> ActionMap;
- typedef QMap<int, LightApp_WidgetContainer*> WindowMap;
- typedef QMap<int, bool> WindowVisibilityMap;
-
-protected:
- LightApp_Preferences* myPrefs;
- LightApp_SelectionMgr* mySelMgr;
- ActionMap myActions;
- WindowMap myWindows;
- WindowVisibilityMap myWindowsVisible;
-
- SUIT_Accel* myAccel;
-
- static LightApp_Preferences* _prefs_;
-
- static int lastStudyId;
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_DataModel.cxx
-// Created: 10/25/2004 10:36:06 AM
-// Author: Sergey LITONIN
-// Copyright (C) CEA 2004
-
-#include "LightApp_DataModel.h"
-#include "LightApp_Study.h"
-#include "LightApp_RootObject.h"
-#include "LightApp_DataObject.h"
-#include "LightApp_Module.h"
-#include "LightApp_Application.h"
-
-#include <OB_Browser.h>
-
-#include <SUIT_Application.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_Session.h>
-#include <SUIT_DataObject.h>
-
-/*!
- Constructor
-*/
-LightApp_DataModel::LightApp_DataModel( CAM_Module* theModule )
-: CAM_DataModel( theModule )
-{
-}
-
-/*!
- Destructor
-*/
-LightApp_DataModel::~LightApp_DataModel()
-{
-}
-
-/*!
- Emit opened()
-*/
-bool LightApp_DataModel::open( const QString&, CAM_Study* study, QStringList )
-{
- emit opened(); //TODO: is it really needed? to be removed maybe...
- return true;
-}
-
-/*!
- Emit saved()
-*/
-bool LightApp_DataModel::save( QStringList& )
-{
- emit saved();
- return true;
-}
-
-/*!
- Emit saved()
-*/
-bool LightApp_DataModel::saveAs( const QString&, CAM_Study*, QStringList& )
-{
- emit saved();
- return true;
-}
-
-/*!
- Emit closed()
-*/
-bool LightApp_DataModel::close()
-{
- emit closed();
- return true;
-}
-
-/*!
- Build whole data model tree
-*/
-void LightApp_DataModel::build()
-{
-}
-
-/*!
- Updates data model presentation in some widgets (for example, in object browser
-*/
-void LightApp_DataModel::updateWidgets()
-{
- LightApp_Application* app = dynamic_cast<LightApp_Application*>( module()->application() );
- if( app )
- app->objectBrowser()->updateTree( 0, false );
-}
-
-/*!
- Default behaviour of data model update for light modules
-*/
-void LightApp_DataModel::update( LightApp_DataObject*, LightApp_Study* )
-{
- LightApp_ModuleObject* modelRoot = dynamic_cast<LightApp_ModuleObject*>( root() );
- DataObjectList ch;
- QMap<SUIT_DataObject*,int> aMap;
- if( modelRoot )
- {
- ch = modelRoot->children();
- for ( DataObjectListIterator it( ch ); it.current(); ++it )
- it.current()->setParent( 0 );
- }
-
- build();
-
- modelRoot = dynamic_cast<LightApp_ModuleObject*>( root() );
- if( modelRoot )
- {
- DataObjectList new_ch = modelRoot->children();
- for ( DataObjectListIterator it1( new_ch ); it1.current(); ++it1 )
- aMap.insert( it1.current(), 0 );
- }
-
- updateWidgets();
-
- for( DataObjectListIterator it( ch ); it.current(); ++it )
- if( !aMap.contains( it.current() ) )
- delete it.current();
-}
-
-/*!
- \return corresponding module
-*/
-LightApp_Module* LightApp_DataModel::getModule() const
-{
- return dynamic_cast<LightApp_Module*>( module() );
-}
-
-/*!
- \return corresponding study
-*/
-LightApp_Study* LightApp_DataModel::getStudy() const
-{
- LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root()->root() );
- if ( !aRoot )
- return 0;
- return aRoot->study();
-}
-
-/*!
- default implementation, always returns false so as not to mask study's isModified()
-*/
-bool LightApp_DataModel::isModified() const
-{
- return false;
-}
-
-/*!
- default implementation, always returns true so as not to mask study's isSaved()
-*/
-bool LightApp_DataModel::isSaved() const
-{
- return true;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_DataModel.h
-// Created: 10/25/2004 10:32:33 AM
-// Author: Sergey LITONIN
-// Copyright (C) CEA 2004
-
-#ifndef LIGHTAPP_DATAMODEL_H
-#define LIGHTAPP_DATAMODEL_H
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include "LightApp.h"
-#include "CAM_DataModel.h"
-
-class LightApp_Module;
-class LightApp_Study;
-class LightApp_DataObject;
-
-/*!
- Description : Base class of data model
-*/
-class LIGHTAPP_EXPORT LightApp_DataModel : public CAM_DataModel
-{
- Q_OBJECT
-
-public:
- LightApp_DataModel ( CAM_Module* theModule );
- virtual ~LightApp_DataModel();
-
- virtual bool open( const QString&, CAM_Study*, QStringList );
- virtual bool save( QStringList& );
- virtual bool saveAs( const QString&, CAM_Study*, QStringList& );
- virtual bool close();
-
- virtual void update( LightApp_DataObject* = 0, LightApp_Study* = 0 );
-
- virtual bool isModified() const;
- virtual bool isSaved() const;
-
- LightApp_Module* getModule() const;
-
-signals:
- void opened();
- void saved();
- void closed();
-
-protected:
- LightApp_Study* getStudy() const;
- virtual void build();
- virtual void updateWidgets();
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_DataObject.h"
-
-#include "LightApp_Study.h"
-#include "LightApp_RootObject.h"
-
-#include "CAM_DataModel.h"
-#include "CAM_Module.h"
-
-#include <SUIT_Application.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_DataObjectKey.h>
-
-#include <qobject.h>
-
-/*!
- Class: LightApp_DataObject::Key
- Level: Internal
-*/
-class LightApp_DataObject::Key : public SUIT_DataObjectKey
-{
-public:
- Key( const QString& );
- virtual ~Key();
-
- virtual bool isLess( const SUIT_DataObjectKey* ) const;
- virtual bool isEqual( const SUIT_DataObjectKey* ) const;
-
-private:
- QString myEntry;
-};
-
-/*!Constructor. Initialize by \a entry.*/
-LightApp_DataObject::Key::Key( const QString& entry )
-: SUIT_DataObjectKey(),
- myEntry( entry )
-{
-}
-
-/*!Destructor. Do nothing.*/
-LightApp_DataObject::Key::~Key()
-{
-}
-
-/*!Checks: Is current key less than \a other.*/
-bool LightApp_DataObject::Key::isLess( const SUIT_DataObjectKey* other ) const
-{
- Key* that = (Key*)other;
- return myEntry < that->myEntry;
-}
-
-/*!Checks: Is current key equal with \a other.*/
-bool LightApp_DataObject::Key::isEqual( const SUIT_DataObjectKey* other ) const
-{
- Key* that = (Key*)other;
- return myEntry == that->myEntry;
-}
-
-/*!Constructor. Initialize by \a parent*/
-LightApp_DataObject::LightApp_DataObject( SUIT_DataObject* parent )
-: CAM_DataObject( parent ), myCompObject( 0 ), myCompDataType( "" )
-{
-}
-
-/*!Destructor. Do nothing.*/
-LightApp_DataObject::~LightApp_DataObject()
-{
-}
-
-/*!Gets object ID.
- *\retval QString
- */
-QString LightApp_DataObject::entry() const
-{
- return QString::null;
-}
-
-/*!Create and return new key object.*/
-SUIT_DataObjectKey* LightApp_DataObject::key() const
-{
- QString str = entry();
- return new Key( str );
-}
-
-/*!Gets component object.
- *\retval SUIT_DataObject.
- */
-SUIT_DataObject* LightApp_DataObject::componentObject() const
-{
- if ( !myCompObject ) {
- SUIT_DataObject* compObj = 0; // for root object
-
- if ( parent() && parent() == root() )
- compObj = (SUIT_DataObject*)this; // for component-level objects
- else
- {
- compObj = parent(); // for lower level objects
- while ( compObj && compObj->parent() != root() )
- compObj = compObj->parent();
- }
- LightApp_DataObject* that = (LightApp_DataObject*)this;
- that->myCompObject = compObj;
- }
- return myCompObject;
-}
-
-/*!Get component type.*/
-QString LightApp_DataObject::componentDataType() const
-{
- if ( myCompDataType.isEmpty() ) {
- SUIT_DataObject* aCompObj = componentObject();
- LightApp_ModuleObject* anObj = dynamic_cast<LightApp_ModuleObject*>( aCompObj );
- if ( anObj ) {
- CAM_DataModel* aModel = anObj->dataModel();
- if ( aModel ) {
- LightApp_DataObject* that = (LightApp_DataObject*)this;
- that->myCompDataType = aModel->module()->name();
- }
- }
- }
- return myCompDataType;
-}
-
-
-
-/*!Constructor.Initialize by \a parent.*/
-LightApp_ModuleObject::LightApp_ModuleObject( SUIT_DataObject* parent )
-: CAM_RootObject( parent ),
- CAM_DataObject( parent )
-{
-}
-
-/*!Constructor.Initialize by \a module and parent.*/
-LightApp_ModuleObject::LightApp_ModuleObject( CAM_DataModel* dm, SUIT_DataObject* parent )
-: CAM_RootObject( dm, parent ),
- CAM_DataObject( parent )
-{
-}
-
-/*!Destructor. Do nothing.*/
-LightApp_ModuleObject::~LightApp_ModuleObject()
-{
-}
-
-/*!Returns module name */
-QString LightApp_ModuleObject::name() const
-{
- return CAM_RootObject::name();
-}
-
-/*!Insert new child object to the children list at specified position
- *\add component in Study for this module object if it necessary*/
-void LightApp_ModuleObject::insertChild( SUIT_DataObject* theObj, int thePosition )
-{
- CAM_RootObject::insertChild(theObj, thePosition);
-
- CAM_DataModel* aModel = dataModel();
-
- LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>(parent());
-
- if (aRoot)
- aRoot->study()->addComponent(aModel);
-
-
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_DATAOBJECT_H
-#define LIGHTAPP_DATAOBJECT_H
-
-#include "LightApp.h"
-
-#include "CAM_DataObject.h"
-#include "CAM_DataModel.h"
-#include "CAM_RootObject.h"
-
-class LightApp_Study;
-
-/*!Description : Data Object has empty entry so it's children must redefine metod entry() and return some unique string*/
-// to do : decomment virtual inheritance
-class LIGHTAPP_EXPORT LightApp_DataObject : public virtual CAM_DataObject
-{
- class Key;
-
-public:
- enum { CT_Value, CT_Entry, CT_IOR, CT_RefEntry };
-
-public:
- LightApp_DataObject( SUIT_DataObject* = 0 );
- virtual ~LightApp_DataObject();
-
- virtual SUIT_DataObjectKey* key() const;
- virtual QString entry() const;
-
- virtual SUIT_DataObject* componentObject() const;
- virtual QString componentDataType() const;
-
-protected:
- QString myCompDataType;
- SUIT_DataObject* myCompObject;
-};
-
-/*!
- * LightApp_ModuleObject - class for optimized access to DataModel from
- * CAM_RootObject.h.
- * In modules which will be redefine LightApp_DataObject, LightApp_ModuleObject must be children from rederined DataObject for having necessary properties and children from LightApp_ModuleObject.
- */
-
-class LIGHTAPP_EXPORT LightApp_ModuleObject : public CAM_RootObject
-{
-public:
- LightApp_ModuleObject( SUIT_DataObject* = 0 );
- LightApp_ModuleObject ( CAM_DataModel*, SUIT_DataObject* = 0 );
-
- virtual ~LightApp_ModuleObject();
-
- virtual QString name() const;
- virtual void insertChild( SUIT_DataObject*, int thePosition );
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_DataOwner.h"
-
-#include "LightApp_DataObject.h"
-
-#include <iostream>
-
-/*!Constructor. Initialize by \a theEntry.*/
-LightApp_DataOwner::LightApp_DataOwner( const QString& theEntry )
-: myEntry( theEntry )
-{
-}
-
-#ifndef DISABLE_SALOMEOBJECT
-/*!Constructor. Initialize by \a SALOME_InteractiveObject.*/
-LightApp_DataOwner::LightApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO ):
- myEntry(!theIO.IsNull()? theIO->getEntry(): ""),
- myIO(theIO)
-{
-}
-#endif
-
-/*!Destructor. Do nothing.*/
-LightApp_DataOwner::~LightApp_DataOwner()
-{
-}
-
-/*!Gets key string, used for data owners comparison.*/
-QString LightApp_DataOwner::keyString() const
-{
- return myEntry;
-}
-
-/*!Gets entry.*/
-QString LightApp_DataOwner::entry() const
-{
- return myEntry;
-}
-
-#ifndef DISABLE_SALOMEOBJECT
-/*!Gets SALOME_InteractiveObject.*/
-const Handle(SALOME_InteractiveObject)& LightApp_DataOwner::IO() const
-{
- return myIO;
-}
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_DATAOWNER_H
-#define LIGHTAPP_DATAOWNER_H
-
-#include "LightApp.h"
-#include "SUIT_DataOwner.h"
-
-#ifndef DISABLE_SALOMEOBJECT
- #include "SALOME_InteractiveObject.hxx"
-#endif
-
-
-/*!
- This class provide data owner objects.
-*/
-class LIGHTAPP_EXPORT LightApp_DataOwner : public SUIT_DataOwner
-{
-public:
-#ifndef DISABLE_SALOMEOBJECT
- LightApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO );
-#endif
- LightApp_DataOwner( const QString& );
- virtual ~LightApp_DataOwner();
-
- // *** jfa: The below line has been put here 14.02.2007.
- // *** It cancels modifications from branch BR_Dev_For_4_0
- virtual QString keyString() const;
-
-#ifndef DISABLE_SALOMEOBJECT
- const Handle(SALOME_InteractiveObject)& IO() const;
-#endif
- QString entry() const;
-
-private:
- QString myEntry;
-#ifndef DISABLE_SALOMEOBJECT
- Handle(SALOME_InteractiveObject) myIO;
-#endif
-};
-
-typedef SMART(LightApp_DataOwner) LightApp_DataOwnerPtr;
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_DataSubOwner.h"
-
-#include "LightApp_DataObject.h"
-
-/*!Constructor.Initialize by \a entry and \a index*/
-LightApp_DataSubOwner::LightApp_DataSubOwner( const QString& entry, const int index )
-: LightApp_DataOwner( entry ),
-myIndex( index )
-{
-}
-
-/*!Destructor. Do nothing.*/
-LightApp_DataSubOwner::~LightApp_DataSubOwner()
-{
-}
-
-/*!Gets key string, used for data owners comparison.*/
-QString LightApp_DataSubOwner::keyString() const
-{
- QString aKey = LightApp_DataOwner::keyString();
- aKey += QString("_%1").arg(index());
- return aKey;
-}
-
-/*!Gets index.*/
-int LightApp_DataSubOwner::index() const
-{
- return myIndex;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_DATASUBOWNER_H
-#define LIGHTAPP_DATASUBOWNER_H
-
-#include <LightApp.h>
-#include <LightApp_DataOwner.h>
-
-/*!
- Class provide sub owner.
- */
-class LIGHTAPP_EXPORT LightApp_DataSubOwner : public LightApp_DataOwner
-{
-public:
- LightApp_DataSubOwner( const QString&, const int );
- virtual ~LightApp_DataSubOwner();
-
- // *** jfa: The below line has been put here 14.02.2007.
- // *** It cancels modifications from branch BR_Dev_For_4_0
- virtual QString keyString() const;
- int index() const;
-
-private:
- int myIndex;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_Dialog.cxx
-// Author: Alexander SOLOVYOV
-
-#include <LightApp_Dialog.h>
-#include <SUIT_Session.h>
-
-#include <qtoolbutton.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-
-/*!
- Constructor
-*/
-LightApp_Dialog::LightApp_Dialog( QWidget* parent, const char* name, bool modal,
- bool allowResize, const int f, WFlags wf )
-: QtxDialog( parent, name, modal, allowResize, f, wf ),
- myIsExclusive( true ),
- myIsBusy( false )
-{
- setObjectPixmap( "LightApp", tr( "ICON_SELECT" ) );
-}
-
-/*!
- Destructor
-*/
-LightApp_Dialog::~LightApp_Dialog()
-{
-}
-
-/*!
- Show dialog
-*/
-void LightApp_Dialog::show()
-{
- QtxDialog::show();
-}
-
-/*!
- \return isExclusive status of selection buttons
-*/
-bool LightApp_Dialog::isExclusive() const
-{
- return myIsExclusive;
-}
-
-/*!
- Updates "on" state of buttons according to special button
- \param _id - id of special button (if it is -1, then first selected button will be treated as special)
-*/
-void LightApp_Dialog::updateButtons( const int _id )
-{
- if( !myIsExclusive )
- return;
-
- int id = _id;
-
- ObjectMap::const_iterator anIt = myObjects.begin(),
- aLast = myObjects.end();
- for( ; anIt!=aLast; anIt++ )
- {
- QToolButton* but = (QToolButton*)anIt.data().myBtn;
- if( but && but->isOn() )
- {
- if( id==-1 )
- id = anIt.key();
-
- if( anIt.key()!=id )
- but->setOn( false );
- }
- }
-}
-
-/*!
- Sets isExclusive status of selection buttons
- \param ex - new value of isExclusive status
-*/
-void LightApp_Dialog::setExclusive( const bool ex )
-{
- myIsExclusive = ex;
- updateButtons();
-}
-
-/*!
- Shows object selection widget
- \param id - identificator of object selection widget
-*/
-void LightApp_Dialog::showObject( const int id )
-{
- setObjectShown( id, true );
-}
-
-/*!
- Hides object selection widget
- \param id - identificator of object selection widget
-*/
-void LightApp_Dialog::hideObject( const int id )
-{
- setObjectShown( id, false );
-}
-
-/*!
- Shows/hides object selection widget
- \param id - identificator of object selection widget
- \param shown - if it is true, widget will be shown
-*/
-void LightApp_Dialog::setObjectShown( const int id, const bool shown )
-{
- if( myObjects.contains( id ) && isObjectShown( id )!=shown )
- {
- Object& obj = myObjects[ id ];
- obj.myEdit->setShown( shown );
- obj.myBtn->setShown( shown );
- obj.myLabel->setShown( shown );
- if( !shown )
- ( ( QToolButton* )obj.myBtn )->setOn( false );
- }
-}
-
-/*!
- \return isShown state of object selection widget
- \param id - identificator of object selection widget
-*/
-bool LightApp_Dialog::isObjectShown( const int id ) const
-{
- return myObjects.contains( id ) && myObjects[ id ].myEdit->isShown();
-}
-
-/*!
- Change enable state of object selection widget
- \param id - identificator of object selection widget
- \param en - new value of enable state
-*/
-void LightApp_Dialog::setObjectEnabled( const int id, const bool en )
-{
- if( myObjects.contains( id ) && isObjectEnabled( id )!=en )
- {
- Object& obj = myObjects[ id ];
- obj.myEdit->setEnabled( en );
- obj.myBtn->setEnabled( en );
-// obj.myLabel->setEnabled( en );
- if( !en )
- ( ( QToolButton* )obj.myBtn )->setOn( false );
- }
-}
-
-/*!
- \return enable state of object selection widget
- \param id - identificator of object selection widget
-*/
-bool LightApp_Dialog::isObjectEnabled( const int id ) const
-{
- return myObjects.contains( id ) && myObjects[ id ].myEdit->isEnabled();
-}
-
-/*!
- Passes to all active widgets name, type and id of selected object
- \param name - name of selected object
- \param type - type of selected object
- \param id - id of selected object
- \param update - is need to update selection description string
-*/
-void LightApp_Dialog::selectObject( const QString& name, const int type, const QString& id, const bool update )
-{
- QStringList names; names.append( name );
- TypesList types; types.append( type );
- QStringList ids; ids.append( id );
- selectObject( names, types, ids, update );
-}
-
-/*!
- Passes to all active widgets names, types and ids of selected objects
- \param _names - names of selected objects
- \param _types - types of selected objects
- \param _ids - ids of selected objects
- \param update - is need to update selection description string
-*/
-void LightApp_Dialog::selectObject( const QStringList& _names,
- const TypesList& _types,
- const QStringList& _ids,
- const bool update )
-{
- ObjectMap::iterator anIt = myObjects.begin(),
- aLast = myObjects.end();
- for( ; anIt!=aLast; anIt++ )
- if( anIt.data().myBtn->isOn() )
- selectObject( anIt.key(), _names, _types, _ids, update );
-}
-
-/*!
- \return true if widget has selection
- \param id - identificator of object selection widget
-*/
-bool LightApp_Dialog::hasSelection( const int id ) const
-{
- return myObjects.contains( id ) && !myObjects[ id ].myIds.isEmpty();
-}
-
-/*!
- Clears selection of widget
- \param id - identificator of object selection widget
-*/
-void LightApp_Dialog::clearSelection( const int id )
-{
- if( id==-1 )
- {
- ObjectMap::const_iterator anIt = myObjects.begin(),
- aLast = myObjects.end();
- for( ; anIt!=aLast; anIt++ )
- clearSelection( anIt.key() );
- }
-
- else if( myObjects.contains( id ) )
- {
- myObjects[ id ].myIds.clear();
- myObjects[ id ].myTypes.clear();
- myObjects[ id ].myNames.clear();
-
- myObjects[ id ].myEdit->setText( QString::null );
- emit selectionChanged( id );
- }
-}
-
-/*!
- \return object selection widget
- \param theId - identificator of object selection widget
- \param theWgId may be "Label", "Btn" or "Control"
-*/
-QWidget* LightApp_Dialog::objectWg( const int theId, const int theWgId ) const
-{
- QWidget* aResWg = 0;
- if( myObjects.contains( theId ) )
- {
- if ( theWgId == Label )
- aResWg = myObjects[ theId ].myLabel;
- else if ( theWgId == Btn )
- aResWg = myObjects[ theId ].myBtn;
- else if ( theWgId == Control )
- aResWg = myObjects[ theId ].myEdit;
- }
- return aResWg;
-}
-
-/*!
- \return object selection widget text
- \param theId - identificator of object selection widget
-*/
-QString LightApp_Dialog::objectText( const int theId ) const
-{
- return myObjects.contains( theId ) ? myObjects[ theId ].myEdit->text() : "";
-}
-
-/*!
- Sets object selection widget text
- \param theId - identificator of object selection widget
- \param theText - new text
-*/
-void LightApp_Dialog::setObjectText( const int theId, const QString& theText )
-{
- if ( myObjects.contains( theId ) )
- myObjects[ theId ].myEdit->setText( theText );
-}
-
-/*!
- \return objects selected by widget
- \param id - identificator of object selection widget
- \param list - list to be filled by selected objects
-*/
-void LightApp_Dialog::selectedObject( const int id, QStringList& list ) const
-{
- if( myObjects.contains( id ) )
- list = myObjects[ id ].myIds;
-}
-
-/*!
- \return selected object id
- \param id - identificator of object selection widget
-*/
-QString LightApp_Dialog::selectedObject( const int id ) const
-{
- if ( myObjects.contains( id ) && myObjects[ id ].myIds.count() > 0 )
- return myObjects[ id ].myIds.first();
- else
- return "";
-}
-
-/*!
- \return all selected objects
- \param objs - map: widget id -> string id to be filled with selected objects
-*/
-void LightApp_Dialog::objectSelection( SelectedObjects& objs ) const
-{
- //objs.clear();
- ObjectMap::const_iterator anIt = myObjects.begin(),
- aLast = myObjects.end();
- for( ; anIt!=aLast; anIt++ )
- {
- QStringList ids;
- selectedObject( anIt.key(), ids );
- if( !ids.isEmpty() )
- objs.insert( anIt.key(), ids );
- }
-}
-
-/*!
- Creates object selection widget
- \return id
- \label - label text
- \parent - parent object
- \id - proposed id for widget (if it is less than 0, the free id will be used)
-*/
-int LightApp_Dialog::createObject( const QString& label, QWidget* parent, const int id )
-{
- int nid = id;
- if( nid<0 )
- for( nid=0; myObjects.contains( nid ); nid++ );
-
- if( !myObjects.contains( nid ) )
- {
- QLabel* lab = new QLabel( label, parent );
- myObjects[ nid ].myLabel = lab;
-
- QToolButton* but = new QToolButton( parent );
- but->setIconSet( QIconSet( myPixmap ) );
- but->setToggleButton( true );
- but->setMaximumWidth( but->height() );
- but->setMinimumWidth( but->height() );
- connect( but, SIGNAL( toggled( bool ) ), this, SLOT( onToggled( bool ) ) );
- myObjects[ nid ].myBtn = but;
-
- QLineEdit* ne = new QLineEdit( parent );
- ne->setReadOnly( true );
- ne->setMinimumWidth( 150 );
- connect( ne, SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) );
- myObjects[ nid ].myEdit = ne;
-
- myObjects[ nid ].myNI = OneNameOrCount;
- }
- return nid;
-}
-
-/*!
- Changes label of object selection widget
- \param id - identificator of object selection widget
- \param label - new text of label
-*/
-void LightApp_Dialog::renameObject( const int id, const QString& label )
-{
- if( myObjects.contains( id ) )
- myObjects[ id ].myLabel->setText( label );
-}
-
-/*!
- Sets possible types for widget
- \param id - identificator of object selection widget
- \param type1,... - type
-*/
-void LightApp_Dialog::setObjectType( const int id, const int type1, ... )
-{
- TypesList types;
-
- const int* tt = &type1;
- while( *tt>=0 )
- {
- types.append( *tt );
- tt++;
- }
-
- setObjectType( id, types );
-}
-
-/*!
- Sets possible types for widget
- \param id - identificator of object selection widget
- \param list - list of possible types
-*/
-void LightApp_Dialog::setObjectType( const int id, const TypesList& list )
-{
- if( !myObjects.contains( id ) )
- return;
-
- TypesList& internal = myObjects[ id ].myPossibleTypes;
-
- QMap<int,int> types;
- TypesList::const_iterator anIt = list.begin(),
- aLast = list.end();
- for( ; anIt!=aLast; anIt++ )
- types.insert( *anIt, 0 );
-
-
- internal.clear();
- QMap<int,int>::const_iterator aMIt = types.begin(),
- aMLast = types.end();
- for( ; aMIt!=aMLast; aMIt++ )
- internal.append( aMIt.key() );
-
- updateObject( id );
-}
-
-/*!
- Adds new possible types to object selection widget
- \param id - identificator of object selection widget
- \param type1, ... - new types
-*/
-void LightApp_Dialog::addObjectType( const int id, const int type1, const int, ... )
-{
- TypesList types; objectTypes( id, types );
-
- const int* tt = &type1;
- while( *tt>=0 )
- {
- types.append( *tt );
- tt++;
- }
-
- setObjectType( id, types );
-}
-
-/*!
- Adds new possible types to object selection widget
- \param id - identificator of object selection widget
- \param list - new types
-*/
-void LightApp_Dialog::addObjectType( const int id, const TypesList& list )
-{
- TypesList types = list; objectTypes( id, types );
- setObjectType( id, types );
-}
-
-/*!
- Adds new possible type to object selection widget
- \param id - identificator of object selection widget
- \param type - new type
-*/
-void LightApp_Dialog::addObjectType( const int id, const int type )
-{
- TypesList types; objectTypes( id, types );
- types.append( type );
- setObjectType( id, types );
-}
-
-/*!
- Clears list of possibles types for object selection widget
- \param id - identificator of object selection widget
-*/
-void LightApp_Dialog::removeObjectType( const int id )
-{
- TypesList types;
- setObjectType( id, types );
-}
-
-/*!
- Removes types from list of possibles for object selection widget
- \param id - identificator of object selection widget
- \param list - list of types to be removed
-*/
-void LightApp_Dialog::removeObjectType( const int id, const TypesList& list )
-{
- if( !myObjects.contains( id ) )
- return;
-
- TypesList& internal = myObjects[ id ].myPossibleTypes;
-
- QMap<int,int> types;
- TypesList::const_iterator anIt = internal.begin(),
- aLast = internal.end();
- for( ; anIt!=aLast; anIt++ )
- types.insert( *anIt, 0 );
- anIt = list.begin(); aLast = list.end();
- for( ; anIt!=aLast; anIt++ )
- types.remove( *anIt );
-
-
- internal.clear();
- QMap<int,int>::const_iterator aMIt = types.begin(),
- aMLast = types.end();
- for( ; aMIt!=aMLast; aMIt++ )
- internal.append( aMIt.key() );
-
- updateObject( id );
-}
-
-/*!
- Removes type from list of possibles for object selection widget
- \param id - identificator of object selection widget
- \param type - type to be removed
-*/
-void LightApp_Dialog::removeObjectType( const int id, const int type )
-{
- TypesList list; list.append( type );
- removeObjectType( id, list );
-}
-
-/*!
- \return true if widget has such type
- \param id - identificator of object selection widget
- \param type - type to be checked
-*/
-bool LightApp_Dialog::hasObjectType( const int id, const int type ) const
-{
- if( myObjects.contains( id ) )
- return myObjects[ id ].myPossibleTypes.contains( type );
- else
- return false;
-}
-
-/*!
- Returns list of possible types for widget
- \param id - identificator of object selection widget
- \param list - list to be filled with possible types
-*/
-void LightApp_Dialog::objectTypes( const int id, TypesList& list ) const
-{
- if( myObjects.contains( id ) )
- {
- TypesList::const_iterator anIt = myObjects[ id ].myPossibleTypes.begin(),
- aLast = myObjects[ id ].myPossibleTypes.end();
- for( ; anIt!=aLast; anIt++ )
- list.append( *anIt );
- }
-}
-
-/*!
- SLOT: called if selection button is clicked
-*/
-void LightApp_Dialog::onToggled( bool on )
-{
- QButton* but = ( QButton* )sender();
- int id = -1;
-
- if( !but )
- return;
-
- ObjectMap::const_iterator anIt = myObjects.begin(),
- aLast = myObjects.end();
- for( ; anIt!=aLast && id==-1; anIt++ )
- if( anIt.data().myBtn==but )
- id = anIt.key();
-
- if( id!=-1 )
- if( on )
- {
- updateButtons( id );
- emit objectActivated( id );
- }
- else
- emit objectDeactivated( id );
-}
-
-/*!
- Updates selection description of widget
- \param id - identificator of object selection widget
- \param emit_signal - if it is true, the signal "selection changed" is emitted
-*/
-void LightApp_Dialog::updateObject( const int id, bool emit_signal )
-{
- if( hasSelection( id ) )
- {
- Object& obj = myObjects[ id ];
- filterTypes( id, obj.myNames, obj.myTypes, obj.myIds );
- obj.myEdit->setText( selectionDescription( obj.myNames, obj.myTypes, obj.myNI ) );
- if( emit_signal )
- emit selectionChanged( id );
- }
-}
-
-/*!
- Finds in list possible types
- \param id - identificator of object selection widget
- \param names - list of selected objects names
- \param types - list of selected objects types
- \param ids - list of selected objects ids
-*/
-void LightApp_Dialog::filterTypes( const int id, QStringList& names, TypesList& types, QStringList& ids ) const
-{
- if( !myObjects.contains( id ) )
- return;
-
- const Object& obj = myObjects[ id ];
- if( obj.myPossibleTypes.isEmpty() )
- return;
-
- QStringList new_names, new_ids;
- TypesList new_types;
-
- TypesList::const_iterator anIt1 = types.begin(),
- aLast = types.end();
- QStringList::const_iterator anIt2 = names.begin(),
- anIt3 = ids.begin();
- for( ; anIt1!=aLast; anIt1++, anIt2++, anIt3++ )
- if( obj.myPossibleTypes.contains( *anIt1 ) )
- {
- if( new_types.count()==1 && !multipleSelection( id ) )
- break;
-
- new_names.append( *anIt2 );
- new_types.append( *anIt1 );
- new_ids.append( *anIt3 );
- }
- names = new_names;
- types = new_types;
- ids = new_ids;
-}
-
-/*!
- \return global resource manager
-*/
-SUIT_ResourceMgr* LightApp_Dialog::resMgr() const
-{
- return SUIT_Session::session()->resourceMgr();
-}
-
-/*!
- Sets pixmap for all object selection button
- \param p - image
-*/
-void LightApp_Dialog::setObjectPixmap( const QPixmap& p )
-{
- myPixmap = p;
- ObjectMap::const_iterator anIt = myObjects.begin(),
- aLast = myObjects.end();
- for( ; anIt!=aLast; anIt++ )
- ( ( QToolButton* )anIt.data().myBtn )->setIconSet( p );
-}
-
-/*!
- Sets pixmap all for object selection button
- \param section - name of section of resource manager
- \param file - name of file
-*/
-void LightApp_Dialog::setObjectPixmap( const QString& section, const QString& file )
-{
- SUIT_ResourceMgr* mgr = resMgr();
- if( mgr )
- setObjectPixmap( mgr->loadPixmap( section, file ) );
-}
-
-/*!
- \return true, if it is enable multiple selection
- \param id - identificator of object selection widget
-*/
-bool LightApp_Dialog::multipleSelection( const int id ) const
-{
- return nameIndication( id )!=OneName;
-}
-
-/*!
- \return type of name indication
- \param id - identificator of object selection widget
-*/
-LightApp_Dialog::NameIndication LightApp_Dialog::nameIndication( const int id ) const
-{
- if( myObjects.contains( id ) )
- return myObjects[ id ].myNI;
- else
- return OneNameOrCount;
-}
-
-/*!
- Sets type of name indication
- \param id - identificator of object selection widget
- \param ni - new type of name indication
-*/
-void LightApp_Dialog::setNameIndication( const int id, const NameIndication ni )
-{
- if( id==-1 )
- {
- ObjectMap::iterator anIt = myObjects.begin(),
- aNext,
- aLast = myObjects.end();
- for( ; anIt!=aLast; anIt++ )
- {
- anIt.data().myNI = ni;
- setReadOnly( anIt.key(), isReadOnly( anIt.key() ) );
- aNext = anIt; aNext++;
- updateObject( anIt.key(), aNext==aLast );
- }
- }
- else if( myObjects.contains( id ) )
- {
- myObjects[ id ].myNI = ni;
- setReadOnly( id, isReadOnly( id ) );
- updateObject( id, true );
- }
-}
-
-/*!
- \return string representation of selection by selection data
- \param names - list of selected objects names
- \param types - list of selected objects types
- \param ni - type of name indication
-*/
-QString LightApp_Dialog::selectionDescription( const QStringList& names, const TypesList& types, const NameIndication ni ) const
-{
- if( names.count()!=types.count() )
- return "LightApp_Dialog::selectionDescription(): Error!!!";
-
- if( names.isEmpty() )
- return QString::null;
-
- switch( ni )
- {
- case OneName:
- return names.first();
- break;
-
- case OneNameOrCount:
- if( names.count()==1 )
- return names.first();
- else
- return countOfTypes( types );
- break;
-
- case ListOfNames:
- return names.join( " " );
- break;
-
- case Count:
- return countOfTypes( types );
- break;
- };
- return QString::null;
-}
-
-/*!
- \return string representation of count of types
- \param types - list of types
-*/
-QString LightApp_Dialog::countOfTypes( const TypesList& types ) const
-{
- QMap<int, int> typesCount;
- QStringList typeCount;
-
- TypesList::const_iterator anIt = types.begin(),
- aLast = types.end();
- for( ; anIt!=aLast; anIt++ )
- if( typesCount.contains( *anIt ) )
- typesCount[ *anIt ]++;
- else
- typesCount[ *anIt ] = 1;
-
- QMap<int,int>::const_iterator aMIt = typesCount.begin(),
- aMLast = typesCount.end();
- for( ; aMIt!=aMLast; aMIt++ )
- typeCount.append( QString( "%1 %2" ).arg( aMIt.data() ).arg( typeName( aMIt.key() ) ) );
-
- return typeCount.join( ", " );
-}
-
-/*!
- \return reference to type name
- \param type - integer id of type
-*/
-QString& LightApp_Dialog::typeName( const int type )
-{
- return myTypeNames[ type ];
-}
-
-/*!
- \return const reference to type name
- \param type - integer id of type
-*/
-const QString& LightApp_Dialog::typeName( const int type ) const
-{
- return myTypeNames[ type ];
-}
-
-
-/*!
- Activates object selection widget
- \param id - identificator of object selection widget
-*/
-void LightApp_Dialog::activateObject( const int theId )
-{
- if ( myObjects.contains( theId ) && !myObjects[ theId ].myBtn->isOn() )
- myObjects[ theId ].myBtn->toggle();
-}
-
-/*!
- Deactivates all object selection widgets
-*/
-void LightApp_Dialog::deactivateAll()
-{
- ObjectMap::iterator anIt = myObjects.begin(),
- aLast = myObjects.end();
- for( ; anIt!=aLast; anIt++ )
- {
- QToolButton* btn = ( QToolButton* )anIt.data().myBtn;
- btn->setOn( false );
- }
-}
-
-/*!
- Passes to widget name, type and id of selected object
- \param id - identificator of object selection widget
- \param name - name of selected object
- \param type - type of selected object
- \param selid - id of selected object
- \param update - is need to update selection description string
-*/
-void LightApp_Dialog::selectObject( const int id, const QString& name, const int type, const QString& selid, const bool update )
-{
- QStringList names; names.append( name );
- TypesList types; types.append( type );
- QStringList ids; ids.append( selid );
- selectObject( id, names, types, ids, update );
-}
-
-/*!
- Passes to widget names, types and ids of selected objects
- \param id - identificator of object selection widget
- \param _names - names of selected object
- \param _types - types of selected object
- \param _ids - ids of selected object
- \param update - is need to update selection description string
-*/
-void LightApp_Dialog::selectObject( const int id, const QStringList& _names, const TypesList& _types,
- const QStringList& _ids, const bool update )
-{
- if( !myObjects.contains( id ) )
- return;
-
- QStringList names = _names, ids = _ids;
- TypesList types = _types;
-
- filterTypes( id, names, types, ids );
-
- Object& obj = myObjects[ id ];
- if( update )
- obj.myEdit->setText( selectionDescription( names, types, obj.myNI ) );
- obj.myTypes = types;
- obj.myIds = ids;
- obj.myNames = names;
-
- emit selectionChanged( id );
-}
-
-/*!
- Sets read only state of object selection line edit
- \param id - identificator of object selection widget
- \param ro - new read only state
-*/
-void LightApp_Dialog::setReadOnly( const int id, const bool ro )
-{
- if( myObjects.contains( id ) )
- myObjects[ id ].myEdit->setReadOnly( nameIndication( id )==ListOfNames || nameIndication( id )==OneName ? ro : true );
-}
-
-/*!
- \return read only state of object selection line edit
- \param id - identificator of object selection widget
-*/
-bool LightApp_Dialog::isReadOnly( const int id ) const
-{
- if( myObjects.contains( id ) )
- return myObjects[ id ].myEdit->isReadOnly();
- else
- return true;
-}
-
-/*!
- SLOT: called if text of object selection line edit is changed
-*/
-void LightApp_Dialog::onTextChanged( const QString& text )
-{
- if( myIsBusy )
- return;
-
- myIsBusy = true;
-
- if( sender() && sender()->inherits( "QLineEdit" ) )
- {
- QLineEdit* edit = ( QLineEdit* )sender();
- int id = -1;
- ObjectMap::const_iterator anIt = myObjects.begin(),
- aLast = myObjects.end();
- for( ; anIt!=aLast; anIt++ )
- if( anIt.data().myEdit == edit )
- id = anIt.key();
-
- if( id>=0 && !isReadOnly( id ) )
- {
- QStringList list = QStringList::split( " ", text );
- emit objectChanged( id, list );
- }
- }
-
- myIsBusy = false;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_Dialog.h
-// Author: Alexander SOLOVYOV
-
-#ifndef LIGHTAPP_DIALOG_H
-#define LIGHTAPP_DIALOG_H
-
-#include "LightApp.h"
-#include <QtxDialog.h>
-
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qpixmap.h>
-
-class QLineEdit;
-class QButton;
-class QLabel;
-
-class SUIT_ResourceMgr;
-
-#ifdef WIN32
-#pragma warning ( disable:4251 )
-#endif
-
-/*!
- \class LightApp_Dialog
- Base class for all LightApp dialogs.
- Provides standard widget for object selection: line edit, button;
- it is necessary to call corresponding methods on selection change.
- Standard dialog provides filtering, selection string representation,
- possibility to indicate necessary selection by text with list of ids.
-*/
-class LIGHTAPP_EXPORT LightApp_Dialog : public QtxDialog
-{
- Q_OBJECT
-
-public:
- typedef QValueList<int> TypesList;
- typedef QMap<int,QStringList> SelectedObjects;
-
- enum ObjectWg
- {
- Label = 0x00000001,
- Btn = 0x00000002,
- Control = 0x00000004
- };
-
- typedef enum
- {
- OneName, //<! only one object can be selected and it's name is shown
- OneNameOrCount, //<! if one object is selected, it's name is shown otherwise
- // "<count> <type>" is shown
- ListOfNames, //! list of all names is shown
- Count //! In every case "<count> <type>" is shown
-
- } NameIndication;
- //! The enumeration describing how names of selected objects will be shown in line edit
- //! For more details see above
-
-public:
- LightApp_Dialog( QWidget* = 0, const char* = 0, bool = false,
- bool = false, const int = Standard, WFlags = 0 );
- virtual ~LightApp_Dialog();
-
- virtual void show();
-
- //! Check if buttons is exclusive (as radiobuttons)
- bool isExclusive() const;
-
- //! Set exclusive state
- void setExclusive( const bool );
-
- //! Check if operation according to dialog will be resumed automatically when mouse enter the dialog
- bool isAutoResumed() const;
-
- //! Set auto resumed state
- void setAutoResumed( const bool );
-
- //! Show widgets corresponding to id
- void showObject( const int );
-
- //! Hide widgets corresponding to id
- void hideObject( const int );
-
- //! Change the shown state of widgets corresponding to id
- void setObjectShown( const int, const bool );
-
- //! Check the shown state
- bool isObjectShown( const int ) const;
-
- //! Change the enabled state of widgets corresponding to id
- void setObjectEnabled( const int, const bool );
-
- //! Check the enabled state
- bool isObjectEnabled( const int ) const;
-
- //! Get widget of object (see ObjectWg enumeration)
- QWidget* objectWg( const int theId, const int theWgId ) const;
-
- //! Pass to all active widgets name, type and id of selected object
- void selectObject( const QString&, const int, const QString&, const bool = true );
-
- /*!
- Pass to all active widgets list of names, types and ids of selected objects
- Every active widget filters list and accept only objects with possible types
- */
- void selectObject( const QStringList&, const TypesList&, const QStringList&, const bool = true );
-
- //! Get text of object's control
- QString objectText( const int ) const;
-
- //! Set text of object's control
- void setObjectText( const int, const QString& );
-
- //! Select in certain widget avoiding check if there is active widget
- void selectObject( const int, const QString&, const int, const QString&, const bool = true );
- void selectObject( const int, const QStringList&, const TypesList&, const QStringList&, const bool = true );
-
- //! Check if certain widget has selection
- bool hasSelection( const int ) const;
-
- //! Clear selection in widgets. If parameter is -1, then selection in all widgets will be cleared
- void clearSelection( const int = -1 );
-
- //! Get ids list of object selected in certain widget
- void selectedObject( const int, QStringList& ) const;
-
- //! Get ids list of object selected in certain widget
- QString selectedObject( const int ) const;
-
- //! Get map "widget id -> ids list"
- void objectSelection( SelectedObjects& ) const;
-
- //! Activate object selection button
- void activateObject( const int );
-
- //! Set all object selection buttons to inactive state
- void deactivateAll();
-
-signals:
- //! selection in certain widget is changed
- void selectionChanged ( int );
-
- //! selection in certain widget is on
- void objectActivated ( int );
-
- //! selection in certain widget is off
- void objectDeactivated( int );
-
- /*
- text representation of selection is changed
- it is emitted only if "read only" state of line edit is false
- */
- void objectChanged( int, const QStringList& );
-
-protected:
- //! Finds and returns resource manager
- SUIT_ResourceMgr* resMgr() const;
-
- /*! Create label, button and line edit for object selection
- * If passed id is negative, then id will be calculated automatically (first free id)
- * Returns the same id (if id>=0) or calculated
- */
- int createObject ( const QString&, QWidget*, const int = -1 );
-
- //! Set pixmap as icon for all selection buttons
- void setObjectPixmap ( const QPixmap& );
-
- //! Load pixmap with section, name using resource manager and set as icon for all selection buttons
- void setObjectPixmap ( const QString&, const QString& );
-
- //! Change label
- void renameObject ( const int, const QString& );
-
- //! Set possible types for certain id. The list of arguments must be finished by negative integer
- void setObjectType ( const int, const int, ... );
-
- //! Set list as possible types for object selection
- void setObjectType ( const int, const TypesList& );
-
- /*!
- Add types to list of possible types
- The list of arguments must be finished by negative integer
- */
- void addObjectType ( const int, const int, const int, ... );
-
- //! Add types to list of possible types
- void addObjectType ( const int, const TypesList& );
-
- //! Add type to list of possible types
- void addObjectType ( const int, const int );
-
- //! Clear list of possible types (it means, that all types are welcome)
- void removeObjectType( const int );
-
- //! Remove types in list from list of possible types
- void removeObjectType( const int, const TypesList& );
-
- //! Remove a type from list of possible types
- void removeObjectType( const int, const int );
-
- //! Check if list of possible types contains this one
- bool hasObjectType ( const int, const int ) const;
-
- //! Return list of possible types
- void objectTypes ( const int, TypesList& ) const;
-
- //!Change and get type name for indicating in selection widget
- QString& typeName( const int );
- const QString& typeName( const int ) const;
-
- //! Create string contains selection list by list of names, list of types and current name indication state
- virtual QString selectionDescription( const QStringList&, const TypesList&, const NameIndication ) const;
-
- //! Create string by pattern "<count> <type>" for current list of types
- virtual QString countOfTypes( const TypesList& ) const;
-
- //! Get and set name indication for certain widget
- NameIndication nameIndication( const int ) const;
- void setNameIndication( const int, const NameIndication );
-
- //! Check using name indication if multiple selection in possible
- bool multipleSelection( const int ) const;
-
- //! Set the "read only" state of object selection line edit
- //! The "read only" will be false only if name indication is ListOfNames
- void setReadOnly( const int, const bool );
-
- //! Check the "read only" state of object selection line edit
- bool isReadOnly( const int ) const;
-
-private slots:
- //! emits if the object selection button changes state
- void onToggled( bool );
-
- //! text in some line edit is changed
- void onTextChanged( const QString& );
-
-private:
- /*!
- If buttons are exclusive, set to "off" all buttons except one with id
- If id=-1, then all buttons, except first with "on" state, will be set to "off"
- */
- void updateButtons( const int = -1 );
-
- /*!
- Filter types and update selection string in line edit
- If bool is true, then signal is emitted
- */
- void updateObject( const int, bool = true );
-
- //! Remove from list not possible types and remove from names and ids lists the corresponding items
- void filterTypes( const int, QStringList&, TypesList&, QStringList& ) const;
-
-private:
- typedef struct
- {
- QLineEdit* myEdit;
- QButton* myBtn;
- QLabel* myLabel;
- QStringList myNames, myIds;
- TypesList myTypes, myPossibleTypes;
- NameIndication myNI;
-
- } Object;
-
- typedef QMap<int, Object> ObjectMap;
-
-private:
- ObjectMap myObjects;
-
- QMap<int,QString> myTypeNames;
- bool myIsExclusive, myIsBusy;
- QPixmap myPixmap;
-};
-
-#ifdef WIN32
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_Displayer.h"
-#include "LightApp_Application.h"
-#include "LightApp_Module.h"
-
-#include <CAM_Study.h>
-
-#include <SUIT_Session.h>
-#include <SUIT_Desktop.h>
-#include <SUIT_ViewManager.h>
-#include <SUIT_ViewModel.h>
-#include <SUIT_ViewWindow.h>
-
-#include <qstring.h>
-#ifndef DISABLE_SALOMEOBJECT
- #include "SALOME_InteractiveObject.hxx"
-#endif
-
-/*!
- Default constructor
-*/
-LightApp_Displayer::LightApp_Displayer()
-{
-}
-
-/*!
- Destructor
-*/
-LightApp_Displayer::~LightApp_Displayer()
-{
-}
-
-/*!
- Displays object in view
- \param entry - object entry
- \param updateViewer - is it necessary to update viewer
- \param theViewFrame - view
-*/
-void LightApp_Displayer::Display( const QString& entry, const bool updateViewer, SALOME_View* theViewFrame )
-{
- SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView();
- if ( vf )
- {
- SALOME_Prs* prs = buildPresentation( entry, vf );
-
- if ( prs )
- {
- vf->BeforeDisplay( this );
- vf->Display( prs );
- vf->AfterDisplay( this );
-
- if ( updateViewer )
- vf->Repaint();
-
- delete prs; // delete presentation because displayer is its owner
- }
- }
-}
-
-/*!
- Redisplays object in view
- \param entry - object entry
- \param updateViewer - is it necessary to update viewer
-*/
-void LightApp_Displayer::Redisplay( const QString& entry, const bool updateViewer )
-{
- // Remove the object permanently (<forced> == true)
- SUIT_Session* ses = SUIT_Session::session();
- SUIT_Application* app = ses->activeApplication();
- if ( app )
- {
- SUIT_Desktop* desk = app->desktop();
- QPtrList<SUIT_ViewWindow> wnds = desk->windows();
- SUIT_ViewWindow* wnd;
- for ( wnd = wnds.first(); wnd; wnd = wnds.next() )
- {
- SUIT_ViewManager* vman = wnd->getViewManager();
- if( !vman )
- continue;
-
- SUIT_ViewModel* vmodel = vman->getViewModel();
- if( !vmodel )
- continue;
-
- SALOME_View* view = dynamic_cast<SALOME_View*>(vmodel);
- if( view && ( IsDisplayed( entry, view ) || view == GetActiveView() ) )
- {
- Erase( entry, true, false, view );
- Display( entry, updateViewer, view );
- }
- }
- }
-}
-
-/*!
- Erases object in view
- \param entry - object entry
- \param forced - deletes object from viewer (otherwise it will be erased, but cached)
- \param updateViewer - is it necessary to update viewer
- \param theViewFrame - view
-*/
-void LightApp_Displayer::Erase( const QString& entry, const bool forced,
- const bool updateViewer, SALOME_View* theViewFrame )
-{
- SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView();
-
- if ( vf ) {
- SALOME_Prs* prs = vf->CreatePrs( entry.latin1() );
- if ( prs ) {
- vf->Erase( prs, forced );
- if ( updateViewer )
- vf->Repaint();
- delete prs; // delete presentation because displayer is its owner
- }
- }
-}
-
-/*!
- Erases all objects in view
- \param forced - deletes objects from viewer
- \param updateViewer - is it necessary to update viewer
- \param theViewFrame - view
-*/
-void LightApp_Displayer::EraseAll( const bool forced, const bool updateViewer, SALOME_View* theViewFrame ) const
-{
- SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView();
-
- if ( vf ) {
- vf->EraseAll( forced );
- if ( updateViewer )
- vf->Repaint();
- }
-}
-
-/*!
- \return true if object is displayed in viewer
- \param entry - object entry
- \param theViewFrame - view
-*/
-bool LightApp_Displayer::IsDisplayed( const QString& entry, SALOME_View* theViewFrame ) const
-{
- SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView();
- bool res = false;
- if( vf )
- {
-#ifndef DISABLE_SALOMEOBJECT
- Handle( SALOME_InteractiveObject ) temp = new SALOME_InteractiveObject();
- temp->setEntry( entry.latin1() );
- res = vf->isVisible( temp );
-#endif
- }
- return res;
-}
-
-/*!
- Updates active view
-*/
-void LightApp_Displayer::UpdateViewer() const
-{
- SALOME_View* vf = GetActiveView();
- if ( vf )
- vf->Repaint();
-}
-
-/*!
- \return presentation of object, built with help of CreatePrs method
- \param entry - object entry
- \param theViewFrame - view
- \sa CreatePrs()
-*/
-SALOME_Prs* LightApp_Displayer::buildPresentation( const QString& entry, SALOME_View* theViewFrame )
-{
- SALOME_Prs* prs = 0;
-
- SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView();
-
- if ( vf )
- prs = vf->CreatePrs( entry.latin1() );
-
- return prs;
-}
-
-/*!
- \return active view
-*/
-SALOME_View* LightApp_Displayer::GetActiveView()
-{
- SUIT_Session* session = SUIT_Session::session();
- if ( SUIT_Application* app = session->activeApplication() ) {
- if ( LightApp_Application* sApp = dynamic_cast<LightApp_Application*>( app ) ) {
- if( SUIT_ViewManager* vman = sApp->activeViewManager() ) {
- if ( SUIT_ViewModel* vmod = vman->getViewModel() )
- return dynamic_cast<SALOME_View*>( vmod );
- }
- }
- }
- return 0;
-}
-
-/*!
- \return true, if object can be displayed in this type of viewer
- \param entry - object entry
- \param viewer_type - type of viewer
-*/
-bool LightApp_Displayer::canBeDisplayed( const QString& /*entry*/, const QString& /*viewer_type*/ ) const
-{
- return true;
-}
-
-/*!
- \return true, if object can be displayed in any type of viewer
- \param entry - object entry
-*/
-bool LightApp_Displayer::canBeDisplayed( const QString& entry ) const
-{
- QString viewerType;
- SUIT_Session* session = SUIT_Session::session();
- if( SUIT_Application* app = session->activeApplication() )
- if( LightApp_Application* sApp = dynamic_cast<LightApp_Application*>( app ) )
- if( SUIT_ViewManager* vman = sApp->activeViewManager() )
- if( SUIT_ViewModel* vmod = vman->getViewModel() )
- viewerType = vmod->getType();
- return !viewerType.isNull() && canBeDisplayed( entry, viewerType );
-}
-
-/*!
- \return displayer, corresponding to module
- \param mod_name - name of module
- \param load - is module has to be forced loaded
-*/
-LightApp_Displayer* LightApp_Displayer::FindDisplayer( const QString& mod_name, const bool load )
-{
- SUIT_Session* session = SUIT_Session::session();
- SUIT_Application* sapp = session ? session->activeApplication() : 0;
- LightApp_Application* app = dynamic_cast<LightApp_Application*>( sapp );
- if( !app )
- return 0;
-
- LightApp_Module* m = dynamic_cast<LightApp_Module*>( app ? app->module( mod_name ) : 0 );
- if( !m && load )
- {
- m = dynamic_cast<LightApp_Module*>( app->loadModule( mod_name ) );
- if( m )
- app->addModule( m );
- }
-
- if( m )
- {
- m->connectToStudy( dynamic_cast<CAM_Study*>( app->activeStudy() ) );
- if( m!=app->activeModule() && load )
- {
- m->setMenuShown( false );
- m->setToolShown( false );
- }
- }
- return m ? m->displayer() : 0;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_DISPLAYER_HEADER
-#define LIGHTAPP_DISPLAYER_HEADER
-
-#include "LightApp.h"
-
-#include <SALOME_Prs.h>
-
-class QString;
-
-/*!
- \class LightApp_Displayer
- Uniform mechanism of display/erase of objects in different views.
- Objects are specified by string entry
-*/
-class LIGHTAPP_EXPORT LightApp_Displayer : public SALOME_Displayer
-{
-public:
- LightApp_Displayer();
- virtual ~LightApp_Displayer();
-
- void Display( const QString&, const bool = true, SALOME_View* = 0 );
- void Redisplay( const QString&, const bool = true );
- void Erase( const QString&, const bool forced = false, const bool updateViewer = true, SALOME_View* = 0 );
- void EraseAll( const bool forced = false, const bool updateViewer = true, SALOME_View* = 0 ) const;
- bool IsDisplayed( const QString&, SALOME_View* = 0 ) const;
- void UpdateViewer() const;
-
- static SALOME_View* GetActiveView();
- static LightApp_Displayer* FindDisplayer( const QString&, const bool );
-
- virtual bool canBeDisplayed( const QString& /*entry*/, const QString& /*viewer_type*/ ) const;
- bool canBeDisplayed( const QString& /*entry*/ ) const;
-
-protected:
- virtual SALOME_Prs* buildPresentation( const QString&, SALOME_View* = 0 );
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_Driver.h"
-
-#include <TCollection_AsciiString.hxx>
-
-#include <OSD_Path.hxx>
-#include <OSD_File.hxx>
-#include <OSD_Directory.hxx>
-#include <OSD_Process.hxx>
-#include <OSD_Directory.hxx>
-#include <OSD_Protection.hxx>
-#include <OSD_SingleProtection.hxx>
-#include <OSD_FileIterator.hxx>
-
-#include <qfileinfo.h>
-#include <qdir.h>
-
-#ifdef WIN32
-#include <time.h>
-#endif
-
-/*! Constructor.*/
-LightApp_Driver::LightApp_Driver()
-: myIsTemp( false )
-{
-}
-
-/*! Destructor.*/
-LightApp_Driver::~LightApp_Driver()
-{
-}
-
-using namespace std;
-
-/*!
- Save in file 'theFileName' datas from this driver
-*/
-bool LightApp_Driver::SaveDatasInFile( const char* theFileName, bool isMultiFile )
-{
- int aNbModules = 0;
- std::map<std::string, ListOfFiles>::const_iterator it;
- for (it = myMap.begin(); it != myMap.end(); ++it)
- aNbModules++;
-
- unsigned char** aBuffer = new unsigned char*[aNbModules];
- long* aBufferSize = new long[aNbModules];
- char** aModuleName = new char*[aNbModules];
-
- if(aBuffer == NULL || aBufferSize == NULL || aModuleName == NULL)
- return false;
-
- int aFileBufferSize = 4; //4 bytes for a number of the modules that will be written to the stream;
- int i = 0;
- for (it = myMap.begin(); it != myMap.end(); ++it) {
- aModuleName[i] = const_cast<char*>(it->first.c_str());//(it->first);
- aFileBufferSize += 4; //Add 4 bytes: a length of the module name
- aFileBufferSize += strlen(aModuleName[i])+1;
- std::string aName(aModuleName[i]);
- PutFilesToStream(aName, aBuffer[i], aBufferSize[i], isMultiFile);
- aFileBufferSize += 8; //Add 8 bytes: a length of the buffer
- aFileBufferSize += aBufferSize[i];
- i++;
- }
- int n = i;
-
- unsigned char* aFileBuffer = new unsigned char[aFileBufferSize];
- if(aFileBuffer == NULL)
- return false;
-
- myTmpDir = QDir::convertSeparators( QFileInfo( theFileName ).dirPath( true ) + "/" ).latin1() ;
-
- int aCurrentPos = 0;
-
- //Initialize 4 bytes of the buffer by 0
- memset(aFileBuffer, 0, 4);
- //Copy the number of modules that will be written to the stream
- memcpy(aFileBuffer, &aNbModules, ((sizeof(int) > 4) ? 4 : sizeof(int)));
- aCurrentPos += 4;
-
- int aBufferNameSize = 0;
- for (i = 0; i < n; i++) {
- aBufferNameSize = strlen(aModuleName[i])+1;
- //Initialize 4 bytes of the buffer by 0
- memset((aFileBuffer + aCurrentPos), 0, 4);
- //Copy the length of the module name to the buffer
- memcpy((aFileBuffer + aCurrentPos), &aBufferNameSize, ((sizeof(int) > 4) ? 4 : sizeof(int)));
- aCurrentPos += 4;
- //Copy the module name to the buffer
- memcpy((aFileBuffer + aCurrentPos), aModuleName[i], aBufferNameSize);
- aCurrentPos += aBufferNameSize;
-
- //Initialize 8 bytes of the buffer by 0
- memset((aFileBuffer + aCurrentPos), 0, 8);
- //Copy the length of the module buffer to the buffer
- memcpy((aFileBuffer + aCurrentPos), (aBufferSize + i), ((sizeof(long) > 8) ? 8 : sizeof(long)));
- aCurrentPos += 8;
- //Copy the module buffer to the buffer
- memcpy((aFileBuffer + aCurrentPos), aBuffer[i], aBufferSize[i]);
- aCurrentPos += aBufferSize[i];
- }
-
-#ifdef WNT
- ofstream aFile(theFileName, ios::out | ios::binary);
-#else
- ofstream aFile(theFileName);
-#endif
- aFile.write((char*)aFileBuffer, aFileBufferSize);
- aFile.close();
-
- delete[] aBuffer;
- delete[] aBufferSize;
- delete[] aModuleName;
- delete[] aFileBuffer;
-
- return true;
-}
-
-/*!
- Filling current driver from file 'theFileName'
-*/
-bool LightApp_Driver::ReadDatasFromFile( const char* theFileName, bool isMultiFile )
-{
-#ifdef WNT
- ifstream aFile(theFileName, ios::binary);
-#else
- ifstream aFile(theFileName);
-#endif
-
- myTmpDir = QDir::convertSeparators( QFileInfo( theFileName ).dirPath( true ) + "/" ).latin1() ;
-
- aFile.seekg(0, ios::end);
- int aFileBufferSize = aFile.tellg();
- unsigned char* aFileBuffer = new unsigned char[aFileBufferSize];
- aFile.seekg(0, ios::beg);
- aFile.read((char*)aFileBuffer, aFileBufferSize);
- aFile.close();
-
- int aNbModules = 0;
- //Copy the number of files in the stream
- memcpy(&aNbModules, aFileBuffer, sizeof(int));
- long aCurrentPos = 4;
- int aModuleNameSize;
-
- for (int i = 0; i < aNbModules; i++) {
- //Put a length of the module name to aModuleNameSize
- memcpy(&aModuleNameSize, (aFileBuffer + aCurrentPos), ((sizeof(int) > 4) ? 4 : sizeof(int)));
- aCurrentPos += 4;
-
- char *aModuleName = new char[aModuleNameSize];
- //Put a module name to aModuleName
- memcpy(aModuleName, (aFileBuffer + aCurrentPos), aModuleNameSize);
- aCurrentPos += aModuleNameSize;
-
- //Put a length of the file buffer to aBufferSize
- long aBufferSize;
- memcpy(&aBufferSize, (aFileBuffer + aCurrentPos), ((sizeof(long) > 8) ? 8 : sizeof(long)));
- aCurrentPos += 8;
- unsigned char *aBuffer = new unsigned char[aBufferSize];
-
- //Put a buffer for current module to aBuffer
- memcpy(aBuffer, (aFileBuffer + aCurrentPos), aBufferSize);
- aCurrentPos += aBufferSize;
-
- // Put buffer to aListOfFiles and set to myMap
- ListOfFiles aListOfFiles = PutStreamToFiles(aBuffer, aBufferSize, isMultiFile);
- SetListOfFiles(aModuleName, aListOfFiles);
-
- delete[] aModuleName;
- delete[] aBuffer;
- }
-
- delete[] aFileBuffer;
-
- return true;
-}
-
-/*!
- \return temp directory for path 'theURL'
-*/
-std::string LightApp_Driver::GetTmpDir (const char* theURL, const bool isMultiFile)
-{
- std::string anURLDir = GetDirFromPath(theURL);
- std::string aTmpDir = isMultiFile ? anURLDir : GetTmpDir();
-
- return aTmpDir;
-}
-
-/*!
- \return list of files for module with name 'theModuleName'
-*/
-LightApp_Driver::ListOfFiles LightApp_Driver::GetListOfFiles( const char* theModuleName )
-{
- ListOfFiles aListOfFiles;
-
- std::string aName(theModuleName);
- if (myMap.count(aName))
- aListOfFiles = myMap[aName];
-
- return aListOfFiles;
-}
-
-/*!
- Sets list of files for module with name 'theModuleName'
-*/
-void LightApp_Driver::SetListOfFiles( const char* theModuleName, const ListOfFiles theListOfFiles )
-{
- std::string aName (theModuleName);
- myMap[aName] = theListOfFiles;
-}
-
-/*!
- Converts files which was created from module <theModuleName> into a byte sequence unsigned char
-*/
-void LightApp_Driver::PutFilesToStream( const std::string& theModuleName, unsigned char*& theBuffer,
- long& theBufferSize, bool theNamesOnly )
-{
- ListOfFiles aFiles = myMap[theModuleName];
- // aFiles must contain temporary directory name in its first item
- // and names of files (relatively the temporary directory) in the others
-
- int i, aLength = aFiles.size() - 1;
- if(aLength <= 0) {
- theBufferSize = 0;
- theBuffer = new unsigned char[theBufferSize];
- return;
- }
- //Get a temporary directory for saved a file
- TCollection_AsciiString aTmpDir(const_cast<char*>(aFiles[0].c_str()));
-
- long aBufferSize = 0;
- long aCurrentPos;
- int aNbFiles = 0;
- int* aFileNameSize= new int[aLength];
- long* aFileSize= new long[aLength];
-
- //Determine the required size of the buffer
- TCollection_AsciiString aFileName;
- for (i = 0; i < aLength; i++) {
- char* aFName = const_cast<char*>(aFiles[i+1].c_str());
- aFileName = aFName;
- //Check if the file exists
- if (!theNamesOnly) { // mpv 15.01.2003: if only file names must be stroed, then size of files is zero
- TCollection_AsciiString aFullPath = aTmpDir + aFileName;
- OSD_Path anOSDPath(aFullPath);
- OSD_File anOSDFile(anOSDPath);
- if(!anOSDFile.Exists()) continue;
-#ifdef WNT
- ifstream aFile(aFullPath.ToCString(), ios::binary);
-#else
- ifstream aFile(aFullPath.ToCString());
-#endif
- aFile.seekg(0, ios::end);
- aFileSize[i] = aFile.tellg();
- aBufferSize += aFileSize[i]; //Add a space to store the file
- }
- aFileNameSize[i] = strlen(aFName) + 1;
- aBufferSize += aFileNameSize[i]; //Add a space to store the file name
- aBufferSize += (theNamesOnly)?4:12; //Add 4 bytes: a length of the file name,
- // 8 bytes: length of the file itself
- aNbFiles++;
- }
-
- aBufferSize += 4; //4 bytes for a number of the files that will be written to the stream;
- theBuffer = new unsigned char[aBufferSize];
- if(theBuffer == NULL) {
- theBufferSize = 0;
- theBuffer = 0;
- return;
- }
- //Initialize 4 bytes of the buffer by 0
- memset(theBuffer, 0, 4);
- //Copy the number of files that will be written to the stream
- memcpy(theBuffer, &aNbFiles, ((sizeof(int) > 4) ? 4 : sizeof(int)));
-
- aCurrentPos = 4;
-
- for(i = 0; i < aLength; i++) {
- ifstream *aFile;
- if (!theNamesOnly) { // mpv 15.01.2003: we don't open any file if theNamesOnly = true
- TCollection_AsciiString aName(const_cast<char*>(aFiles[i+1].c_str()));
- TCollection_AsciiString aFullPath = aTmpDir + aName;
- OSD_Path anOSDPath(aFullPath);
- OSD_File anOSDFile(anOSDPath);
- if(!anOSDFile.Exists()) continue;
-#ifdef WNT
- aFile = new ifstream(aFullPath.ToCString(), ios::binary);
-#else
- aFile = new ifstream(aFullPath.ToCString());
-#endif
- }
- //Initialize 4 bytes of the buffer by 0
- memset((theBuffer + aCurrentPos), 0, 4);
- //Copy the length of the file name to the buffer
- memcpy((theBuffer + aCurrentPos), (aFileNameSize + i), ((sizeof(int) > 4) ? 4 : sizeof(int)));
- aCurrentPos += 4;
-
- //Copy the file name to the buffer
- char* aFName = const_cast<char*>(aFiles[i+1].c_str());
- memcpy((theBuffer + aCurrentPos), aFName, aFileNameSize[i]);
- aCurrentPos += aFileNameSize[i];
-
- if (!theNamesOnly) { // mpv 15.01.2003: we don't copy file content to the buffer if !theNamesOnly
- //Initialize 8 bytes of the buffer by 0
- memset((theBuffer + aCurrentPos), 0, 8);
- //Copy the length of the file to the buffer
- memcpy((theBuffer + aCurrentPos), (aFileSize + i), ((sizeof(long) > 8) ? 8 : sizeof(long)));
- aCurrentPos += 8;
-
- aFile->seekg(0, ios::beg);
- aFile->read((char *)(theBuffer + aCurrentPos), aFileSize[i]);
- aFile->close();
- delete(aFile);
- aCurrentPos += aFileSize[i];
- }
- }
- delete[] aFileNameSize;
- delete[] aFileSize;
-
- theBufferSize = aBufferSize;
-}
-
-/*!
- Converts a byte sequence <theBuffer> to files and return list of them
-*/
-LightApp_Driver::ListOfFiles LightApp_Driver::PutStreamToFiles( const unsigned char* theBuffer,
- const long theBufferSize, bool theNamesOnly )
-{
- if(theBufferSize == 0 || theBuffer == 0)
- return ListOfFiles();
-
- // Create a temporary directory for the component's data files
- std::string aDir = GetTmpDir();
-
- // Remember that the files are in a temporary location that should be deleted
- // when a study is closed
- SetIsTemporary( true );
-
- //Get a temporary directory for saving a file
- TCollection_AsciiString aTmpDir(const_cast<char*>(aDir.c_str()));
-
- long aFileSize, aCurrentPos = 4;
- int i, aFileNameSize, aNbFiles = 0;
-
- //Copy the number of files in the stream
- memcpy(&aNbFiles, theBuffer, sizeof(int));
-
- const int n = aNbFiles + 1;
- ListOfFiles aFiles(n);
- aFiles[0] = aDir;
-
- for(i = 0; i < aNbFiles; i++) {
- //Put a length of the file name to aFileNameSize
- memcpy(&aFileNameSize, (theBuffer + aCurrentPos), ((sizeof(int) > 4) ? 4 : sizeof(int)));
- aCurrentPos += 4;
-
- char *aFileName = new char[aFileNameSize];
- //Put a file name to aFileName
- memcpy(aFileName, (theBuffer + aCurrentPos), aFileNameSize);
- aCurrentPos += aFileNameSize;
-
- //Put a length of the file to aFileSize
- if (!theNamesOnly) {
- memcpy(&aFileSize, (theBuffer + aCurrentPos), ((sizeof(long) > 8) ? 8 : sizeof(long)));
- aCurrentPos += 8;
-
- TCollection_AsciiString aFullPath = aTmpDir + aFileName;
-
-#ifdef WNT
- ofstream aFile(aFullPath.ToCString(), ios::out | ios::binary);
-#else
- ofstream aFile(aFullPath.ToCString());
-#endif
-
- aFile.write((char *)(theBuffer+aCurrentPos), aFileSize);
- aFile.close();
- aCurrentPos += aFileSize;
- }
- std::string aStrFileName(aFileName);
- aFiles[i+1] = aStrFileName;
- delete[] aFileName;
- }
- return aFiles;
-}
-
-/*!
- Remove files. First item in <theFiles> is a directory with slash at the end.
- Other items are names of files. If <IsDirDeleted> is true,
- then the directory is also deleted.
-*/
-void LightApp_Driver::RemoveFiles( const ListOfFiles& theFiles, const bool IsDirDeleted)
-{
- int i, aLength = theFiles.size() - 1;
- if(aLength <= 0) {
- return;
- }
- //Get a temporary directory for saved a file
- TCollection_AsciiString aDirName(const_cast<char*>(theFiles[0].c_str()));
-
- for(i = 0; i < aLength; i++) {
- TCollection_AsciiString aFile(aDirName);
- aFile += const_cast<char*>(theFiles[i+1].c_str());
- OSD_Path anOSDPath(aFile);
- OSD_File anOSDFile(anOSDPath);
- if(!anOSDFile.Exists()) continue;
-
- anOSDFile.Remove();
- }
-
- if(IsDirDeleted) {
- OSD_Path aPath(aDirName);
- OSD_Directory aDir(aPath);
- // san -- Using a special code block below is essential - it ensures that
- // OSD_FileIterator instance is destroyed by the moment when
- // OSD_Directory::Remove() is called.
- // Otherwise, the directory remains locked (at least on Windows)
- // by the iterator and cannot be removed.
- {
- OSD_FileIterator anIterator(aPath, '*');
- if(!aDir.Exists() || anIterator.More())
- return;
- }
- aDir.Remove();
- }
-}
-
-/*!
- Removes files which was created from module theModuleName if
- <IsDirDeleted> is true tmp directory is also deleted if it is empty
-*/
-void LightApp_Driver::RemoveTemporaryFiles( const char* theModuleName, const bool IsDirDeleted )
-{
- std::string aModuleName(theModuleName);
- ListOfFiles aFiles = myMap[aModuleName];
- // aFiles must contain temporary directory name in its first item
- // and names of files (relatively the temporary directory) in the others
- RemoveFiles( aFiles, IsDirDeleted );
-
-}
-
-/*!
- Clears map of list files
-*/
-void LightApp_Driver::ClearDriverContents()
-{
- std::map<std::string, ListOfFiles>::iterator it;
- for ( it = myMap.begin(); it != myMap.end(); ++it )
- {
- const char* aModuleName = const_cast<char*>(it->first.c_str());
- // If the driver contains temporary files -
- // remove them along with the temporary directory
- RemoveTemporaryFiles( aModuleName, IsTemporary() );
- }
- myMap.clear();
- // Reset the "temporary" flag
- SetIsTemporary( false );
-}
-
-/*!
- \return a temp directory to store created files like "/tmp/sub_dir/"
-*/
-std::string LightApp_Driver::GetTmpDir()
-{
- if ( myTmpDir.length() != 0 )
- return myTmpDir;
-
- //Find a temporary directory to store a file
- TCollection_AsciiString aTmpDir;
-
- char *Tmp_dir = getenv("SALOME_TMP_DIR");
- if ( !Tmp_dir )
- Tmp_dir = getenv ( "TEMP" );
- if ( !Tmp_dir )
- Tmp_dir = getenv ( "TMP" );
- if ( Tmp_dir )
- {
- aTmpDir = TCollection_AsciiString(Tmp_dir);
-#ifdef WIN32
- if(aTmpDir.Value(aTmpDir.Length()) != '\\') aTmpDir+='\\';
-#else
- if(aTmpDir.Value(aTmpDir.Length()) != '/') aTmpDir+='/';
-#endif
- }
- else
- {
-#ifdef WIN32
- aTmpDir = TCollection_AsciiString("C:\\");
-#else
- aTmpDir = TCollection_AsciiString("/tmp/");
-#endif
- }
-
- srand((unsigned int)time(NULL));
- int aRND = 999 + (int)(100000.0*rand()/(RAND_MAX+1.0)); //Get a random number to present a name of a sub directory
- TCollection_AsciiString aSubDir(aRND);
- if(aSubDir.Length() <= 1) aSubDir = TCollection_AsciiString("123409876");
-
- aTmpDir += aSubDir; //Get RND sub directory
-
-#ifdef WIN32
- if(aTmpDir.Value(aTmpDir.Length()) != '\\') aTmpDir+='\\';
-#else
- if(aTmpDir.Value(aTmpDir.Length()) != '/') aTmpDir+='/';
-#endif
-
- OSD_Path aPath(aTmpDir);
- OSD_Directory aDir(aPath);
-
- for(aRND = 0; aDir.Exists(); aRND++) {
- aTmpDir.Insert((aTmpDir.Length() - 1), TCollection_AsciiString(aRND)); //Build a unique directory name
- aPath = OSD_Path(aTmpDir);
- aDir = OSD_Directory(aPath);
- }
-
-#ifdef WIN32
- // Workaround for OSD_Protection bug on Windows
- OSD_Protection aProtection(OSD_RWXD, OSD_RWXD, OSD_RWXD, OSD_RWXD);
-#else
- OSD_Protection aProtection(OSD_RX, OSD_RWXD, OSD_RX, OSD_RX);
-#endif
- aDir.Build(aProtection);
-
- myTmpDir = aTmpDir.ToCString();
-
- return aTmpDir.ToCString();
-}
-
-/*!
- \return the dir by the path
-*/
-std::string LightApp_Driver::GetDirFromPath( const std::string& thePath ) {
- if(thePath == "")
- return "";
- OSD_Path aPath = OSD_Path(TCollection_AsciiString(const_cast<char*>(thePath.c_str())));
- TCollection_AsciiString aDirString(aPath.Trek());
- aDirString.ChangeAll('|','/');
- return aDirString.ToCString();
-}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_DRIVER_H
-#define LIGHTAPP_DRIVER_H
-
-#include <LightApp.h>
-
-#include "string"
-#include "vector"
-#include "map"
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-/*!Description : Driver can save to file and read from file list of files for light modules*/
-
-class LIGHTAPP_EXPORT LightApp_Driver
-{
-public:
- LightApp_Driver();
- virtual ~LightApp_Driver();
-
-
- typedef std::vector<std::string> ListOfFiles;
-
- virtual bool SaveDatasInFile (const char* theFileName, bool isMultiFile);
- virtual bool ReadDatasFromFile (const char* theFileName, bool isMultiFile);
- virtual std::string GetTmpDir (const char* theURL, const bool isMultiFile);
-
- ListOfFiles GetListOfFiles (const char* theModuleName);
- virtual void SetListOfFiles (const char* theModuleName, const ListOfFiles theListOfFiles);
- virtual void RemoveTemporaryFiles(const char* theModuleName, const bool IsDirDeleted);
- void RemoveFiles( const ListOfFiles& theFiles, const bool IsDirDeleted);
-
- virtual void ClearDriverContents();
-
-protected:
- void PutFilesToStream(const std::string& theModuleName, unsigned char*& theBuffer,
- long& theBufferSize, bool theNamesOnly = false);
- ListOfFiles PutStreamToFiles(const unsigned char* theBuffer,
- const long theBufferSize, bool theNamesOnly = false);
-
- std::string GetTmpDir();
- std::string GetDirFromPath(const std::string& thePath);
-
- void SetIsTemporary( bool theFlag ) { myIsTemp = theFlag; }
- bool IsTemporary() const { return myIsTemp; }
-
-protected:
- typedef std::map<std::string, ListOfFiles> MapOfListOfFiles;
- MapOfListOfFiles myMap;
- std::string myTmpDir;
-
-private:
- bool myIsTemp;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_EventFilter.h"
-
-#include <SUIT_Desktop.h>
-
-#include <qapplication.h>
-
-LightApp_EventFilter* LightApp_EventFilter::myFilter = NULL;
-
-/*!Constructor.*/
-LightApp_EventFilter::LightApp_EventFilter()
-: QObject()
-{
- qApp->installEventFilter( this );
-}
-
-/*!Destructor.*/
-LightApp_EventFilter::~LightApp_EventFilter()
-{
- qApp->removeEventFilter( this );
-}
-
-/*!
- Custom event filter
-*/
-bool LightApp_EventFilter::eventFilter( QObject* o, QEvent* e )
-{
- if ( e->type() == QEvent::WindowActivate && o->inherits("QDialog") )
- {
- QWidget* parent = ((QWidget*)o)->parentWidget();
-
- SUIT_Desktop* aDesktop = 0;
-
- while( parent )
- {
- if ( aDesktop = dynamic_cast<SUIT_Desktop*>(parent) )
- break;
- parent = parent->parentWidget();
- }
-
- if ( aDesktop )
- aDesktop->emitActivated();
- }
-
- return QObject::eventFilter( o, e );
-}
-
-/*!Create new instance of LightApp_EventFilter*/
-void LightApp_EventFilter::Init()
-{
- if( myFilter==NULL )
- myFilter = new LightApp_EventFilter();
-}
-
-/*!Destroy filter.*/
-void LightApp_EventFilter::Destroy()
-{
- if( myFilter )
- {
- delete myFilter;
- myFilter = NULL;
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_EVENTFILTER_H
-#define LIGHTAPP_EVENTFILTER_H
-
-#include "LightApp.h"
-
-#include <qobject.h>
-
-#if defined WNT
-#pragma warning( disable: 4251 )
-#endif
-
-/*!
- Class provide event filter.
-*/
-class LIGHTAPP_EXPORT LightApp_EventFilter: public QObject
-{
-public:
- static void Init();
- static void Destroy();
-
-protected:
- LightApp_EventFilter();
- virtual ~LightApp_EventFilter();
-
-private:
- /*! global event filter for qapplication */
- virtual bool eventFilter( QObject* o, QEvent* e );
-
-private:
- static LightApp_EventFilter* myFilter;
-};
-
-#if defined WNT
-#pragma warning( default: 4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_GLSelector.h"
-
-#include "LightApp_DataOwner.h"
-#include "LightApp_DataObject.h"
-
-#include <GLViewer_Context.h>
-
-/*!Constructor. Initialize by GLViewer_Viewer2d and SUIT_SelectionMgr.*/
-LightApp_GLSelector::LightApp_GLSelector( GLViewer_Viewer2d* viewer, SUIT_SelectionMgr* mgr )
-: SUIT_Selector( mgr, viewer ),
- myViewer( viewer )
-{
- if ( myViewer )
- connect( myViewer, SIGNAL( selectionChanged( SelectionChangeStatus ) ),
- this, SLOT( onSelectionChanged() ) );
-}
-
-/*!Destructor. Do nothing.*/
-LightApp_GLSelector::~LightApp_GLSelector()
-{
-}
-
-/*!Gets viewer*/
-GLViewer_Viewer2d* LightApp_GLSelector::viewer() const
-{
- return myViewer;
-}
-
-/*!On selection changed event.*/
-void LightApp_GLSelector::onSelectionChanged()
-{
- selectionChanged();
-}
-
-/*!Gets list of selected Data Owner objects.*/
-void LightApp_GLSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
-{
- if ( !myViewer )
- return;
-
- GLViewer_Context* cont = myViewer->getGLContext();
- if ( !cont )
- return;
-
- for ( cont->InitSelected(); cont->MoreSelected(); cont->NextSelected() )
- {
- GLViewer_Object* obj = cont->SelectedObject();
- if ( obj )
- {
- LightApp_DataOwner* owner = dynamic_cast<LightApp_DataOwner*>( obj->owner() );
- if ( owner )
- aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( owner->entry() ) ) );
- }
- }
-}
-
-/*!Sets to selected list of Data Owner objects.*/
-void LightApp_GLSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
-{
- if ( !myViewer )
- return;
-
- GLViewer_Context* cont = myViewer->getGLContext();
- if ( !cont )
- return;
-
- QMap<QString, int> aSelected;
- for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr )
- {
- const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*itr).operator->() );
-
- if ( owner )
- aSelected.insert( owner->entry(), 0 );
- }
-
- bool changed = false;
- const ObjList& displayed = cont->getObjects();
- for ( ObjList::const_iterator it = displayed.begin(); it != displayed.end(); ++it )
- {
- GLViewer_Object* obj = *it;
- if ( obj && obj->getVisible() )
- {
- LightApp_DataOwner* owner = dynamic_cast<LightApp_DataOwner*>( obj->owner() );
- bool sel = owner && aSelected.contains( owner->entry() );
- changed = changed || sel != (bool)obj->isSelected();
- if ( sel && !obj->isSelected() )
- cont->setSelected( obj, false );
- else if ( !sel && obj->isSelected() )
- cont->remSelected( obj, false );
- }
- }
-
- if ( changed )
- myViewer->updateAll();
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_GLSELECTOR_H
-#define LIGHTAPP_GLSELECTOR_H
-
-#include "LightApp.h"
-
-#include <SUIT_Selector.h>
-
-#include <GLViewer_Viewer2d.h>
-
-#include <string>
-#include <GLViewer_Object.h>
-
-class LightApp_DataObject;
-
-/*!
- \class LightApp_GLSelector
- Custom selector to get/set selection from GL viewer
-*/
-class LIGHTAPP_EXPORT LightApp_GLSelector : public SUIT_Selector
-{
- Q_OBJECT
-
-public:
- LightApp_GLSelector( GLViewer_Viewer2d*, SUIT_SelectionMgr* );
- virtual ~LightApp_GLSelector();
-
- GLViewer_Viewer2d* viewer() const;
-
- virtual QString type() const { return GLViewer_Viewer2d::Type(); }
-
-private slots:
- void onSelectionChanged();
-
-protected:
- virtual void getSelection( SUIT_DataOwnerPtrList& ) const;
- virtual void setSelection( const SUIT_DataOwnerPtrList& );
-
-private:
- GLViewer_Viewer2d* myViewer;
-};
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_HDFDriver.h"
-
-#include "HDFexplorer.hxx"
-#include "HDFOI.hxx"
-
-// OCCT Includes
-#include <TCollection_AsciiString.hxx>
-
-/*! Constructor.*/
-LightApp_HDFDriver::LightApp_HDFDriver()
-{
-}
-
-/*! Destructor.*/
-LightApp_HDFDriver::~LightApp_HDFDriver()
-{
-}
-
-using namespace std;
-
-/*!
- Saves in file 'theFileName' datas from this driver
-*/
-bool LightApp_HDFDriver::SaveDatasInFile( const char* theFileName, bool isMultiFile )
-{
- bool isASCII = false;
- bool isError = false;
-
- HDFfile *hdf_file = 0;
- HDFgroup *hdf_group_datacomponent = 0;
- HDFgroup *hdf_group_study_structure = 0;
- HDFgroup *hdf_sco_group = 0;
- HDFgroup *hdf_sco_group2 = 0;
- HDFdataset *hdf_dataset = 0;
- hdf_size aHDFSize[1];
-
- try {
- hdf_file = new HDFfile ((char*)theFileName);
- hdf_file->CreateOnDisk();
-
- //-----------------------------------------------------------------------
- // 1 - Create a groupe for each SComponent and Update the PersistanceRef
- //-----------------------------------------------------------------------
- hdf_group_datacomponent = new HDFgroup ("DATACOMPONENT", hdf_file);
- hdf_group_datacomponent->CreateOnDisk();
-
- std::map<std::string, std::string> mapNameEntry;
-
- int tag = 1;
- std::map<std::string, ListOfFiles>::const_iterator it;
- for (it = myMap.begin(); it != myMap.end(); ++it, ++tag) {
- std::string aName (it->first);
- char* aModuleName = const_cast<char*>(aName.c_str());
- unsigned char* aBuffer;
- long aBufferSize;
- PutFilesToStream(aName, aBuffer, aBufferSize, isMultiFile);
-
- //Handle(SALOMEDSImpl_SComponent) sco = itcomponent.Value();
- //TCollection_AsciiString scoid = sco->GetID();
- //hdf_sco_group = new HDFgroup(scoid.ToCString(), hdf_group_datacomponent);
-
- TCollection_AsciiString entry ("0:1:");
- entry += TCollection_AsciiString(tag);
- mapNameEntry[aModuleName] = entry.ToCString();
-
- //hdf_sco_group = new HDFgroup (aModuleName, hdf_group_datacomponent);
- hdf_sco_group = new HDFgroup (entry.ToCString(), hdf_group_datacomponent);
- hdf_sco_group->CreateOnDisk();
-
- aHDFSize[0] = aBufferSize;
-
- hdf_dataset = new HDFdataset ("FILE_STREAM", hdf_sco_group, HDF_STRING, aHDFSize, 1);
- hdf_dataset->CreateOnDisk();
- hdf_dataset->WriteOnDisk(aBuffer); //Save the stream in the HDF file
- hdf_dataset->CloseOnDisk();
- hdf_dataset = 0; //will be deleted by hdf_sco_group destructor
-
- // store multifile state
- aHDFSize[0] = 2;
- hdf_dataset = new HDFdataset("MULTIFILE_STATE", hdf_sco_group, HDF_STRING, aHDFSize, 1);
- hdf_dataset->CreateOnDisk();
- hdf_dataset->WriteOnDisk((void*)(isMultiFile ? "M" : "S")); // save: multi or single
- hdf_dataset->CloseOnDisk();
- hdf_dataset = 0; //will be deleted by hdf_sco_group destructor
-
- // store ASCII state
- aHDFSize[0] = 2;
- hdf_dataset = new HDFdataset("ASCII_STATE", hdf_sco_group, HDF_STRING, aHDFSize, 1);
- hdf_dataset->CreateOnDisk();
- hdf_dataset->WriteOnDisk((void*)(isASCII ? "A" : "B")); // save: ASCII or BINARY
- hdf_dataset->CloseOnDisk();
- hdf_dataset = 0; //will be deleted by hdf_sco_group destructor
-
- hdf_sco_group->CloseOnDisk();
- hdf_sco_group = 0; // will be deleted by hdf_group_datacomponent destructor
-
- delete [] aBuffer;
- }
-
- hdf_group_datacomponent->CloseOnDisk();
- hdf_group_datacomponent = 0; // will be deleted by hdf_file destructor
-
- //-----------------------------------------------------------------------
- // 3 - Write the Study Structure
- //-----------------------------------------------------------------------
- hdf_group_study_structure = new HDFgroup ("STUDY_STRUCTURE", hdf_file);
- hdf_group_study_structure->CreateOnDisk();
-
- for (it = myMap.begin(); it != myMap.end(); ++it) {
- std::string aName (it->first);
- char* aModuleName = const_cast<char*>(aName.c_str());
-
- //hdf_sco_group2 = new HDFgroup(scid.ToCString(), hdf_group_study_structure);
- char* entry = (char*)(mapNameEntry[aModuleName].c_str());
- hdf_sco_group2 = new HDFgroup (entry, hdf_group_study_structure);
- hdf_sco_group2->CreateOnDisk();
-
- // ComponentDataType treatment
- hdf_int32 name_len = (hdf_int32)strlen(aModuleName);
- aHDFSize[0] = name_len + 1;
- hdf_dataset = new HDFdataset ("COMPONENTDATATYPE", hdf_sco_group2, HDF_STRING, aHDFSize, 1);
- hdf_dataset->CreateOnDisk();
- hdf_dataset->WriteOnDisk(aModuleName);
- hdf_dataset->CloseOnDisk();
- hdf_dataset = 0; //will be deleted by hdf_sco_group2 destructor
-
- hdf_sco_group2->CloseOnDisk();
- hdf_sco_group2 = 0; // will be deleted by hdf_group_study_structure destructor
- }
-
- hdf_group_study_structure->CloseOnDisk();
- hdf_group_study_structure = 0; // will be deleted by hdf_file destructor
-
- hdf_file->CloseOnDisk();
- delete hdf_file; // recursively deletes all hdf objects...
-
- } catch (HDFexception) {
- isError = true;
- }
- if (isASCII && !isError) { // save file in ASCII format
- HDFascii::ConvertFromHDFToASCII(theFileName, true);
- }
-
- return !isError;
-}
-
-/*!
- Filling current driver from file 'theFileName'
-*/
-bool LightApp_HDFDriver::ReadDatasFromFile( const char* theFileName, bool isMultiFile )
-{
- bool isASCII = false;
- bool isError = false;
- TCollection_AsciiString aHDFUrl;
-
- HDFfile *hdf_file = 0;
- HDFgroup *hdf_group_datacomponent = 0;
- HDFgroup *hdf_group_study_structure = 0;
- HDFgroup *hdf_sco_group = 0;
- HDFgroup *hdf_sco_group2 = 0;
-
- std::map<std::string, std::string> mapEntryName;
-
- if (HDFascii::isASCII(theFileName)) {
- isASCII = true;
- char* aResultPath = HDFascii::ConvertFromASCIIToHDF(theFileName);
- aHDFUrl = aResultPath;
- aHDFUrl += "hdf_from_ascii.hdf";
- delete(aResultPath);
- } else {
- aHDFUrl = (char*)theFileName;
- }
-
- hdf_file = new HDFfile((char*)aHDFUrl.ToCString());
-
- char aMultifileState[2];
- char ASCIIfileState[2];
-
- try {
- hdf_file->OpenOnDisk(HDF_RDONLY);
-
- } catch (HDFexception) {
- //char *eStr = new char[strlen(aUrl.ToCString()) + 17];
- //sprintf(eStr,"Can't open file %s", aUrl.ToCString());
- //_errorCode = TCollection_AsciiString(eStr);
- //delete [] eStr;
- return false;
- }
-
- try {
- if (!hdf_file->ExistInternalObject("STUDY_STRUCTURE")) {
- //_errorCode = "Study is empty";
- isError = true;
- } else {
- hdf_group_study_structure = new HDFgroup ("STUDY_STRUCTURE", hdf_file);
- hdf_group_study_structure->OpenOnDisk();
-
- char name[HDF_NAME_MAX_LEN + 1];
- Standard_Integer nbsons = hdf_group_study_structure->nInternalObjects();
- for (Standard_Integer i = 0; i < nbsons; i++) {
- hdf_group_study_structure->InternalObjectIndentify(i, name);
- if (strncmp(name, "INTERNAL_COMPLEX", 16) == 0) continue;
- hdf_object_type type = hdf_group_study_structure->InternalObjectType(name);
- if (type == HDF_GROUP) {
- hdf_sco_group2 = new HDFgroup (name, hdf_group_study_structure);
- hdf_sco_group2->OpenOnDisk();
-
- // Read component data
- char* aCompDataType = NULL;
- int aDataSize = 0;
-
- if (hdf_sco_group2->ExistInternalObject("COMPONENTDATATYPE")) {
- HDFdataset *hdf_dataset = new HDFdataset("COMPONENTDATATYPE", hdf_sco_group2);
- hdf_dataset->OpenOnDisk();
- aDataSize = hdf_dataset->GetSize();
- aCompDataType = new char[aDataSize];
- if (aCompDataType == NULL) {
- isError = true;
- } else {
- hdf_dataset->ReadFromDisk(aCompDataType);
-
- mapEntryName[name] = aCompDataType;
-
- delete [] aCompDataType;
- }
-
- hdf_dataset->CloseOnDisk();
- hdf_dataset = 0;
- }
-
- hdf_sco_group2->CloseOnDisk();
- }
- }
-
- hdf_group_study_structure->CloseOnDisk();
- }
-
- if (!hdf_file->ExistInternalObject("DATACOMPONENT")) {
- //_errorCode = "No components stored";
- isError = true;
- } else {
- hdf_group_datacomponent = new HDFgroup ("DATACOMPONENT", hdf_file);
- hdf_group_datacomponent->OpenOnDisk();
-
- char name[HDF_NAME_MAX_LEN + 1];
- Standard_Integer nbsons = hdf_group_datacomponent->nInternalObjects();
- for (Standard_Integer i = 0; i < nbsons; i++) {
- hdf_group_datacomponent->InternalObjectIndentify(i, name);
- if (strncmp(name, "INTERNAL_COMPLEX", 16) == 0) continue;
- hdf_object_type type = hdf_group_datacomponent->InternalObjectType(name);
- if (type == HDF_GROUP) {
- hdf_sco_group = new HDFgroup (name, hdf_group_datacomponent);
- hdf_sco_group->OpenOnDisk();
-
- // Read component data
- unsigned char* aStreamFile = NULL;
- int aStreamSize = 0;
-
- if (hdf_sco_group->ExistInternalObject("FILE_STREAM")) {
- HDFdataset *hdf_dataset = new HDFdataset("FILE_STREAM", hdf_sco_group);
- hdf_dataset->OpenOnDisk();
- aStreamSize = hdf_dataset->GetSize();
- aStreamFile = new unsigned char[aStreamSize];
- if (aStreamFile == NULL) {
- isError = true;
- } else {
- hdf_dataset->ReadFromDisk(aStreamFile);
- }
-
- hdf_dataset->CloseOnDisk();
- hdf_dataset = 0;
- }
-
- HDFdataset *multifile_hdf_dataset = new HDFdataset("MULTIFILE_STATE", hdf_sco_group);
- multifile_hdf_dataset->OpenOnDisk();
- multifile_hdf_dataset->ReadFromDisk(aMultifileState);
- multifile_hdf_dataset->CloseOnDisk();
- multifile_hdf_dataset = 0;
-
- HDFdataset *ascii_hdf_dataset = new HDFdataset("ASCII_STATE", hdf_sco_group);
- ascii_hdf_dataset->OpenOnDisk();
- ascii_hdf_dataset->ReadFromDisk(ASCIIfileState);
- ascii_hdf_dataset->CloseOnDisk();
- ascii_hdf_dataset = 0;
-
- isASCII = (ASCIIfileState[0] == 'A') ? true : false;
-
- if (aStreamFile != NULL) {
- // Put buffer to aListOfFiles and set to myMap
- ListOfFiles aListOfFiles = PutStreamToFiles(aStreamFile, aStreamSize, isMultiFile);
- char* aCompDataType = (char*)(mapEntryName[name].c_str());
- SetListOfFiles(aCompDataType, aListOfFiles);
-
- delete [] aStreamFile;
- }
-
- hdf_sco_group->CloseOnDisk();
- }
- }
-
- hdf_group_datacomponent->CloseOnDisk();
- }
- } catch (HDFexception) {
- isError = true;
-
- //Handle(TColStd_HSequenceOfAsciiString) aFilesToRemove = new TColStd_HSequenceOfAsciiString;
- //aFilesToRemove->Append(aHDFUrl);
- //RemoveFiles(aFilesToRemove, true);
- }
-
- hdf_file->CloseOnDisk();
- delete hdf_file; // all related hdf objects will be deleted
-
- if (isASCII && !isError) {
- //Handle(TColStd_HSequenceOfAsciiString) aFilesToRemove = new TColStd_HSequenceOfAsciiString;
- //aFilesToRemove->Append(aHDFUrl);
- //RemoveFiles(aFilesToRemove, true);
- }
-
- //std::map<std::string, std::string>::const_iterator it;
- //for (it = mapEntryName.begin(); it != mapEntryName.end(); ++it) {
- // cout << "Read Component: entry = " << it->first
- // << ", Component data type = " << it->second << endl;
- //}
-
- return !isError;
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_HDFDRIVER_H
-#define LIGHTAPP_HDFDRIVER_H
-
-#include <LightApp.h>
-#include <LightApp_Driver.h>
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-/*!Description : Driver can save to file and read from file list of files for light modules*/
-
-class LIGHTAPP_EXPORT LightApp_HDFDriver : public LightApp_Driver
-{
-public:
- LightApp_HDFDriver();
- virtual ~LightApp_HDFDriver();
-
- virtual bool SaveDatasInFile (const char* theFileName, bool isMultiFile);
- virtual bool ReadDatasFromFile (const char* theFileName, bool isMultiFile);
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_Module.cxx
-// Created: 6/20/2005 16:30:56 AM
-// Author: OCC team
-// Copyright (C) CEA 2005
-
-#include "LightApp_Module.h"
-
-#include "CAM_Application.h"
-
-#include "LightApp_Application.h"
-#include "LightApp_DataModel.h"
-#include "LightApp_DataObject.h"
-#include "LightApp_Study.h"
-#include "LightApp_Preferences.h"
-#include "LightApp_Selection.h"
-#include "LightApp_Operation.h"
-#include "LightApp_SwitchOp.h"
-#include "LightApp_UpdateFlags.h"
-#include "LightApp_ShowHideOp.h"
-
-#include "SUIT_Operation.h"
-#include <SUIT_Study.h>
-#include <SUIT_DataObject.h>
-#include <SUIT_ResourceMgr.h>
-
-#ifndef DISABLE_VTKVIEWER
-#ifndef DISABLE_SALOMEOBJECT
- #include <SVTK_ViewWindow.h>
- #include <SVTK_ViewModel.h>
-#else
- #include <VTKViewer_ViewWindow.h>
-#endif
- #include <VTKViewer_ViewModel.h>
-#endif
-#ifndef DISABLE_OCCVIEWER
- #include <OCCViewer_ViewWindow.h>
- #include <OCCViewer_ViewPort3d.h>
-#ifndef DISABLE_SALOMEOBJECT
- #include <SOCC_ViewModel.h>
-#else
- #include <OCCViewer_ViewModel.h>
-#endif
-#endif
-#ifndef DISABLE_GLVIEWER
- #include <GLViewer_ViewFrame.h>
- #include <GLViewer_ViewPort.h>
-#endif
-#ifndef DISABLE_PLOT2DVIEWER
- #include <Plot2d_ViewWindow.h>
- #include <Plot2d_ViewFrame.h>
-#ifndef DISABLE_SALOMEOBJECT
- #include <SPlot2d_ViewModel.h>
-#else
- #include <Plot2d_ViewModel.h>
-#endif
-#endif
-
-#include <OB_Browser.h>
-
-#include <QtxPopupMgr.h>
-
-#include <qvariant.h>
-#include <qstring.h>
-#include <qstringlist.h>
-
-/*!Constructor.*/
-LightApp_Module::LightApp_Module( const QString& name )
-: CAM_Module( name ),
- myPopupMgr( 0 ),
- mySwitchOp( 0 ),
- myDisplay( -1 ),
- myErase( -1 ),
- myDisplayOnly( -1 ),
- myEraseAll( -1 )
-{
-}
-
-/*!Destructor.*/
-LightApp_Module::~LightApp_Module()
-{
- if ( mySwitchOp )
- delete mySwitchOp;
-}
-
-/*!Initialize module.*/
-void LightApp_Module::initialize( CAM_Application* app )
-{
- CAM_Module::initialize( app );
-
- SUIT_ResourceMgr* resMgr = app ? app->resourceMgr() : 0;
- if ( resMgr )
- resMgr->raiseTranslators( name() );
-}
-
-/*!NOT IMPLEMENTED*/
-void LightApp_Module::windows( QMap<int, int>& ) const
-{
-}
-
-/*!NOT IMPLEMENTED*/
-void LightApp_Module::viewManagers( QStringList& ) const
-{
-}
-
-/*!Context menu popup.*/
-void LightApp_Module::contextMenuPopup( const QString& client, QPopupMenu* menu, QString& /*title*/ )
-{
- LightApp_Selection* sel = createSelection();
- sel->init( client, getApp()->selectionMgr() );
- popupMgr()->updatePopup( menu, sel );
- delete sel;
-}
-
-/*!Update object browser.
- * For updating model or whole object browser use update() method can be used.
-*/
-void LightApp_Module::updateObjBrowser( bool theIsUpdateDataModel,
- SUIT_DataObject* theDataObject )
-{
- bool upd = getApp()->objectBrowser()->isAutoUpdate();
- getApp()->objectBrowser()->setAutoUpdate( false );
-
- if( theIsUpdateDataModel ){
- if( CAM_DataModel* aDataModel = dataModel() ){
- if ( LightApp_DataModel* aModel = dynamic_cast<LightApp_DataModel*>( aDataModel ) ) {
- SUIT_DataObject* aParent = NULL;
- if(theDataObject && theDataObject != aDataModel->root())
- aParent = theDataObject->parent();
-
- LightApp_DataObject* anObject = dynamic_cast<LightApp_DataObject*>(theDataObject);
- LightApp_Study* aStudy = dynamic_cast<LightApp_Study*>(getApp()->activeStudy());
- aModel->update( anObject, aStudy );
- }
- }
- }
- getApp()->objectBrowser()->setAutoUpdate( upd );
- getApp()->objectBrowser()->updateTree( 0, false );
-}
-
-/*!NOT IMPLEMENTED*/
-void LightApp_Module::selectionChanged()
-{
-}
-
-/*!Activate module.*/
-bool LightApp_Module::activateModule( SUIT_Study* study )
-{
- bool res = CAM_Module::activateModule( study );
-
- if ( res && application() && application()->resourceMgr() )
- application()->resourceMgr()->raiseTranslators( name() );
-
- connect( application(), SIGNAL( viewManagerAdded( SUIT_ViewManager* ) ),
- this, SLOT( onViewManagerAdded( SUIT_ViewManager* ) ) );
- connect( application(), SIGNAL( viewManagerRemoved( SUIT_ViewManager* ) ),
- this, SLOT( onViewManagerRemoved( SUIT_ViewManager* ) ) );
-
- if ( mySwitchOp == 0 )
- mySwitchOp = new LightApp_SwitchOp( this );
-
- return res;
-}
-
-/*!Deactivate module.*/
-bool LightApp_Module::deactivateModule( SUIT_Study* study )
-{
- delete mySwitchOp;
- mySwitchOp = 0;
-
- disconnect( application(), SIGNAL( viewManagerAdded( SUIT_ViewManager* ) ),
- this, SLOT( onViewManagerAdded( SUIT_ViewManager* ) ) );
- disconnect( application(), SIGNAL( viewManagerRemoved( SUIT_ViewManager* ) ),
- this, SLOT( onViewManagerRemoved( SUIT_ViewManager* ) ) );
-
- // abort all operations
- MapOfOperation::const_iterator anIt;
- for( anIt = myOperations.begin(); anIt != myOperations.end(); anIt++ ) {
- anIt.data()->abort();
- }
-
- return CAM_Module::activateModule( study );
-}
-
-/*!NOT IMPLEMENTED*/
-void LightApp_Module::MenuItem()
-{
-}
-
-/*!NOT IMPLEMENTED*/
-void LightApp_Module::createPreferences()
-{
-}
-
-/*!NOT IMPLEMENTED*/
-void LightApp_Module::preferencesChanged( const QString&, const QString& )
-{
-}
-
-/*!Gets application.*/
-LightApp_Application* LightApp_Module::getApp() const
-{
- return (LightApp_Application*)application();
-}
-
-/*!
- * \brief Update something in accordance with update flags
- * \param theFlags - update flags
-*
-* Update viewer or/and object browser etc. in accordance with update flags ( see
-* LightApp_UpdateFlags enumeration ). Derived modules can redefine this method for their
-* own purposes
-*/
-void LightApp_Module::update( const int theFlags )
-{
- if ( theFlags & UF_Model )
- {
- if( CAM_DataModel* aDataModel = dataModel() )
- if( LightApp_DataModel* aModel = dynamic_cast<LightApp_DataModel*>( aDataModel ) )
- aModel->update( 0, dynamic_cast<LightApp_Study*>( getApp()->activeStudy() ) );
- }
- if ( theFlags & UF_ObjBrowser )
- getApp()->objectBrowser()->updateTree( 0 );
- if ( theFlags & UF_Controls )
- updateControls();
- if ( theFlags & UF_Viewer )
- {
- if ( SUIT_ViewManager* viewMgr = getApp()->activeViewManager() )
- if ( SUIT_ViewWindow* viewWnd = viewMgr->getActiveView() )
- {
-#ifndef DISABLE_VTKVIEWER
-#ifndef DISABLE_SALOMEOBJECT
- if ( viewWnd->inherits( "SVTK_ViewWindow" ) )
- ( (SVTK_ViewWindow*)viewWnd )->Repaint();
-#else
- if ( viewWnd->inherits( "VTKViewer_ViewWindow" ) )
- ( (VTKViewer_ViewWindow*)viewWnd )->Repaint();
-#endif
-#endif
-#ifndef DISABLE_OCCVIEWER
- if ( viewWnd->inherits( "OCCViewer_ViewWindow" ) )
- ( (OCCViewer_ViewWindow*)viewWnd )->getViewPort()->onUpdate();
-#endif
-#ifndef DISABLE_PLOT2DVIEWER
- if ( viewWnd->inherits( "Plot2d_ViewWindow" ) )
- ( (Plot2d_ViewWindow*)viewWnd )->getViewFrame()->Repaint();
-#endif
-#ifndef DISABLE_GLVIEWER
- if ( viewWnd->inherits( "GLViewer_ViewFrame" ) )
- ( (GLViewer_ViewFrame*)viewWnd )->getViewPort()->onUpdate();
-#endif
- }
- }
-}
-/*!
- * \brief Updates controls
-*
-* Updates (i.e. disable/enable) controls states (menus, tool bars etc.). This method is
-* called from update( UF_Controls ). You may redefine it in concrete module.
-*/
-void LightApp_Module::updateControls()
-{
-}
-
-/*!Create new instance of data model and return it.*/
-CAM_DataModel* LightApp_Module::createDataModel()
-{
- return new LightApp_DataModel(this);
-}
-
-/*!Create and return instance of LightApp_Selection.*/
-LightApp_Selection* LightApp_Module::createSelection() const
-{
- return new LightApp_Selection();
-}
-
-/*!NOT IMPLEMENTED*/
-void LightApp_Module::onModelOpened()
-{
-}
-
-/*!NOT IMPLEMENTED*/
-void LightApp_Module::onModelSaved()
-{
-}
-
-/*!NOT IMPLEMENTED*/
-void LightApp_Module::onModelClosed()
-{
-}
-
-/*!Gets popup manager.(create if not exist)*/
-QtxPopupMgr* LightApp_Module::popupMgr()
-{
- if ( !myPopupMgr )
- {
- myPopupMgr = new QtxPopupMgr( 0, this );
-
- QPixmap p;
- SUIT_Desktop* d = application()->desktop();
-
- QAction
- *disp = createAction( -1, tr( "TOP_SHOW" ), p, tr( "MEN_SHOW" ), tr( "STB_SHOW" ),
- 0, d, false, this, SLOT( onShowHide() ) ),
- *erase = createAction( -1, tr( "TOP_HIDE" ), p, tr( "MEN_HIDE" ), tr( "STB_HIDE" ),
- 0, d, false, this, SLOT( onShowHide() ) ),
- *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" ),
- 0, d, false, this, SLOT( onShowHide() ) );
- myDisplay = actionId( disp );
- myErase = actionId( erase );
- myDisplayOnly = actionId( dispOnly );
- myEraseAll = actionId( eraseAll );
-
- myPopupMgr->insert( disp, -1, 0 );
- myPopupMgr->insert( erase, -1, 0 );
- myPopupMgr->insert( dispOnly, -1, 0 );
- myPopupMgr->insert( eraseAll, -1, 0 );
- myPopupMgr->insert( separator(), -1, 0 );
-
- QString oneAndNotActive = "( count( $component ) = 1 ) and ( not( activeModule in $component ) )";
- QString uniform = "true in $canBeDisplayed and %1 and ( activeModule = '%2' )";
- uniform = uniform.arg( oneAndNotActive ).arg( name() );
- myPopupMgr->setRule( disp, /*QString( "( not isVisible ) and " ) + */ uniform, true );
- myPopupMgr->setRule( erase, /*QString( "( isVisible ) and " ) + */ uniform, true );
- myPopupMgr->setRule( dispOnly, uniform, true );
-
- QStringList viewers;
-
-#ifndef DISABLE_OCCVIEWER
-#ifndef DISABLE_SALOMEOBJECT
- viewers.append( SOCC_Viewer::Type() );
-#else
- viewers.append( OCCViewer_Viewer::Type() );
-#endif
-#endif
-#ifndef DISABLE_VTKVIEWER
-#ifndef DISABLE_SALOMEOBJECT
- viewers.append( SVTK_Viewer::Type() );
-#else
- viewers.append( VTKViewer_Viewer::Type() );
-#endif
-#endif
-#ifndef DISABLE_PLOT2DVIEWER
-#ifndef DISABLE_SALOMEOBJECT
- viewers.append( SPlot2d_Viewer::Type() );
-#else
- viewers.append( Plot2d_Viewer::Type() );
-#endif
-#endif
-
- if( !viewers.isEmpty() )
- {
- QString strViewers = "{ ", temp = "'%1' ";
- QStringList::const_iterator anIt = viewers.begin(), aLast = viewers.end();
- for( ; anIt!=aLast; anIt++ )
- strViewers+=temp.arg( *anIt );
- strViewers+="}";
- myPopupMgr->setRule( eraseAll, QString( "client in %1" ).arg( strViewers ), true );
- }
- }
- return myPopupMgr;
-}
-
-/*!Gets preferences.*/
-LightApp_Preferences* LightApp_Module::preferences() const
-{
- LightApp_Preferences* pref = 0;
- if ( getApp() )
- pref = getApp()->preferences();
- return pref;
-}
-
-/*!Add preference to preferences.*/
-int LightApp_Module::addPreference( const QString& label )
-{
- LightApp_Preferences* pref = preferences();
- if ( !pref )
- return -1;
-
- int catId = pref->addPreference( moduleName(), -1 );
- if ( catId == -1 )
- return -1;
-
- return pref->addPreference( label, catId );
-}
-
-/*!Add preference to preferences.*/
-int LightApp_Module::addPreference( const QString& label, const int pId, const int type,
- const QString& section, const QString& param )
-{
- LightApp_Preferences* pref = preferences();
- if ( !pref )
- return -1;
-
- return pref->addPreference( moduleName(), label, pId, type, section, param );
-}
-
-/*!Gets property of preferences.*/
-QVariant LightApp_Module::preferenceProperty( const int id, const QString& prop ) const
-{
- QVariant var;
- LightApp_Preferences* pref = preferences();
- if ( pref )
- var = pref->itemProperty( id, prop );
- return var;
-}
-
-/*!Set property of preferences.*/
-void LightApp_Module::setPreferenceProperty( const int id, const QString& prop, const QVariant& var )
-{
- LightApp_Preferences* pref = preferences();
- if ( pref )
- pref->setItemProperty( id, prop, var );
-}
-
-/*!
- * \brief Starts operation with given identifier
- * \param id - identifier of operation to be started
-*
-* Module stores operations in map. This method starts operation by id.
-* If operation isn't in map, then it will be created by createOperation method
-* and will be inserted to map
-*/
-void LightApp_Module::startOperation( const int id )
-{
- LightApp_Operation* op = 0;
- if( myOperations.contains( id ) )
- op = myOperations[ id ];
- else
- {
- op = createOperation( id );
- if( op )
- {
- myOperations.insert( id, op );
- op->setModule( this );
- connect( op, SIGNAL( stopped( SUIT_Operation* ) ), this, SLOT( onOperationStopped( SUIT_Operation* ) ) );
- connect( op, SIGNAL( destroyed() ), this, SLOT( onOperationDestroyed() ) );
- }
- }
-
- if( op )
- {
- // be sure that operation has correct study pointer
- op->setStudy( application() ? application()->activeStudy() : 0 );
- op->start();
- }
-}
-
-/*!
- * \brief Creates operation with given identifier
- * \param id - identifier of operation to be started
- * \return Pointer on created operation or NULL if operation is not created
-*
-* Creates operation with given id. You should not call this method, it will be called
-* automatically from startOperation. You may redefine this method in concrete module to
-* create operations.
-*/
-LightApp_Operation* LightApp_Module::createOperation( const int id ) const
-{
- if( id==-1 )
- return 0;
-
- if( id==myDisplay )
- return new LightApp_ShowHideOp( LightApp_ShowHideOp::DISPLAY );
- else if( id==myErase )
- return new LightApp_ShowHideOp( LightApp_ShowHideOp::ERASE );
- else if( id==myDisplayOnly )
- return new LightApp_ShowHideOp( LightApp_ShowHideOp::DISPLAY_ONLY );
- else if( id==myEraseAll )
- return new LightApp_ShowHideOp( LightApp_ShowHideOp::ERASE_ALL );
- else
- return 0;
-}
-
-/*!
- * \brief Virtual protected slot called when operation stopped
- * \param theOp - stopped operation
-*
-* Virtual protected slot called when operation stopped. Redefine this slot if you want to
-* perform actions after stopping operation
-*/
-void LightApp_Module::onOperationStopped( SUIT_Operation* /*theOp*/ )
-{
-}
-
-/*!
- * \brief Virtual protected slot called when operation destroyed
- * \param theOp - destroyed operation
-*
-* Virtual protected slot called when operation destroyed. Redefine this slot if you want to
-* perform actions after destroying operation. Base implementation removes pointer on
-* destroyed operation from the map of operations
-*/
-void LightApp_Module::onOperationDestroyed()
-{
- const QObject* s = sender();
- if( s && s->inherits( "LightApp_Operation" ) )
- {
- const LightApp_Operation* op = ( LightApp_Operation* )s;
- MapOfOperation::const_iterator anIt = myOperations.begin(),
- aLast = myOperations.end();
- for( ; anIt!=aLast; anIt++ )
- if( anIt.data()==op )
- {
- myOperations.remove( anIt.key() );
- break;
- }
- }
-}
-
-/*!
- Must be redefined in order to use standard displayer mechanism
- \return displayer of module
-*/
-LightApp_Displayer* LightApp_Module::displayer()
-{
- return 0;
-}
-
-/*!
- SLOT: called on activating of standard operations show/hide
-*/
-void LightApp_Module::onShowHide()
-{
- if( !sender()->inherits( "QAction" ) || !popupMgr() )
- return;
-
- QAction* act = ( QAction* )sender();
- int id = actionId( act );
- if( id!=-1 )
- startOperation( id );
-}
-
-/*!
- virtual SLOT: called on view manager adding
-*/
-void LightApp_Module::onViewManagerAdded( SUIT_ViewManager* )
-{
-}
-
-/*!
- virtual SLOT: called on view manager removing
-*/
-void LightApp_Module::onViewManagerRemoved( SUIT_ViewManager* )
-{
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_Module.h
-// Created: 6/20/2005 16:25:06 AM
-// Author: OCC team
-// Copyright (C) CEA 2005
-
-#ifndef LIGHTAPP_MODULE_H
-#define LIGHTAPP_MODULE_H
-
-#include "LightApp.h"
-#include <CAM_Module.h>
-
-class LightApp_Application;
-class LightApp_Preferences;
-class LightApp_Selection;
-class LightApp_Operation;
-class LightApp_SwitchOp;
-class LightApp_ShowHideOp;
-class LightApp_Displayer;
-
-class SUIT_Study;
-class SUIT_DataObject;
-class SUIT_Operation;
-class SUIT_ViewManager;
-class CAM_Application;
-
-class QtxPopupMgr;
-
-class QString;
-class QVariant;
-
-#ifdef WIN32
-#pragma warning ( disable:4251 )
-#endif
-
-/*!
- \class LightApp_Module
- Base class for all light modules
-*/
-
-class LIGHTAPP_EXPORT LightApp_Module : public CAM_Module
-{
- Q_OBJECT
-
-public:
- LightApp_Module( const QString& );
- virtual ~LightApp_Module();
-
- virtual void initialize( CAM_Application* );
- virtual void windows( QMap<int, int>& ) const;
- virtual void viewManagers( QStringList& ) const;
-
- virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
-
- virtual void createPreferences();
-
- LightApp_Application* getApp() const;
-
- virtual void update( const int );
- // Update viewer or/and object browser etc. in accordance with update flags
- // ( see SalomeApp_UpdateFlags enumeration ). Derived modules can redefine this method
- // for their own purposes
-
- virtual void updateObjBrowser( bool = true, SUIT_DataObject* = 0 );
- // Update object bropwser ( for updating model or whole object browser use update() method
- // can be used )
-
- virtual void selectionChanged();
- virtual void preferencesChanged( const QString&, const QString& );
-
- virtual void studyActivated() {};
-
- virtual LightApp_Displayer* displayer();
- virtual LightApp_Selection* createSelection() const;
-
-public slots:
- virtual bool activateModule( SUIT_Study* );
- virtual bool deactivateModule( SUIT_Study* );
-
- void MenuItem();
-
-protected slots:
- virtual void onModelSaved();
- virtual void onModelOpened();
- virtual void onModelClosed();
-
- virtual void onOperationStopped( SUIT_Operation* );
- virtual void onOperationDestroyed();
- virtual void onShowHide();
- virtual void onViewManagerAdded( SUIT_ViewManager* );
- virtual void onViewManagerRemoved( SUIT_ViewManager* );
-
-protected:
- virtual QtxPopupMgr* popupMgr();
- LightApp_Preferences* preferences() const;
-
- virtual CAM_DataModel* createDataModel();
-
- int addPreference( const QString& label );
- int addPreference( const QString& label, const int pId, const int = -1,
- const QString& section = QString::null,
- const QString& param = QString::null );
- QVariant preferenceProperty( const int, const QString& ) const;
- void setPreferenceProperty( const int, const QString&, const QVariant& );
-
- /*! Module stores operations in map. This method starts operation by id.
- * If operation isn't in map, then it will be created by createOperation method
- * and will be inserted to map
- */
- void startOperation( const int );
- /*! Create operation by its id. You must not call this method, it will be called automatically
- * by startOperation. Please redefine this method in current module
- */
- virtual LightApp_Operation* createOperation( const int ) const;
-
- virtual void updateControls();
-
-private:
- typedef QMap<int,LightApp_Operation*> MapOfOperation;
-
-private:
- QtxPopupMgr* myPopupMgr;
- MapOfOperation myOperations;
- LightApp_SwitchOp* mySwitchOp;
-
-protected:
- int myDisplay, myErase, myDisplayOnly, myEraseAll;
-};
-
-#ifdef WIN32
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : LightApp_ModuleDlg.cxx
-// Author : Michael Zorin (mzn)
-// Module : LightApp
-
-#include <LightApp_ModuleDlg.h>
-
-#include <qlabel.h>
-
-static const char* default_icon[] = {
-"48 48 17 1",
-". c None",
-"# c #161e4c",
-"b c #1d3638",
-"e c #2f585b",
-"i c #345b5e",
-"c c #386266",
-"g c #3f7477",
-"d c #4d8589",
-"m c #519099",
-"o c #6abbc1",
-"a c #70c9d3",
-"f c #79ddea",
-"n c #7adff2",
-"k c #7ce2f4",
-"j c #993550",
-"h c #d84b71",
-"l c #ef537d",
-"................................................",
-"................................................",
-"................................................",
-"................................................",
-"................................................",
-"................########.########.########......",
-"...............#aaaaaa###aaaaaa###aaaaaa##......",
-"..............#aaaaaa#b#aaaaaa#b#aaaaaa#c#......",
-".............########b########b########cc#......",
-".............#dddddd#b#dddddd#b#dddddd#cc#......",
-"...........########d########d########d#cc#......",
-"..........#aaaaaa###aaaaaa###aaaaaa##d#cc#......",
-".........#aaaaaa#b#aaaaaa#b#aaaaaa#c#d#cc#......",
-"........########b########e########cc#d#c#.......",
-"........#dddddd#b#dddddd#e#ffffff#cc#d####......",
-"......########d########d########f#cc###g##......",
-".....#aaaaaa###aaaaaa###hhhhhh##f#cc#gg#c#......",
-"....#aaaaaa#b#aaaaaa#i#hhhhhh#j#f#cc###cc#......",
-"...########b########i########jj#f#c#gg#cc#......",
-"...#kkkkkk#b#kkkkkk#i#llllll#jj#f####g#cc#......",
-"...#kkkkkk#b#kkkkkk#i#llllll#jj###m##g#cc#......",
-"...#knnkkk#b#kkkkkk#i#llllll#jj#mm#c#g#cc#......",
-"...#knnkkk#b#kkkkkk#i#llllll#jj###cc#g#c#.......",
-"...#kkkkkk#b#kkkkkk#i#llllll#j#dd#cc#g####......",
-"...#kkkkkk###kkkkkk###llllll####d#cc###g##......",
-"...########g########g########o##d#cc#gg#c#......",
-"....#gggggg#b#gggggg#b#oooooo#c#d#cc###cc#......",
-"...########b########b########cc#d#c#gg#cc#......",
-"...#kkkkkk#b#kkkkkk#b#kkkkkk#cc#d####g#cc#......",
-"...#kkkkkk#b#kkkkkk#b#kkkkkk#cc###g##g#cc#......",
-"...#kkkkkk#b#kkkkkk#b#kkkkkk#cc#gg#c#g#cc#......",
-"...#kkkkkk#b#kkkkkk#b#kkkkkk#cc###cc#g#c#.......",
-"...#kkkkkk#b#kkkkkk#b#kkkkkk#c#gg#cc#g##........",
-"...#kkkkkk###kkkkkk###kkkkkk####g#cc###.........",
-"...########g########g########g##g#cc#...........",
-"....#gggggg#b#gggggg#b#gggggg#c#g#cc#...........",
-"...########b########b########cc#g#c#............",
-"...#kkkkkk#b#kkkkkk#b#kkkkkk#cc#g##.............",
-"...#kkkkkk#b#kkkkkk#b#kkkkkk#cc###..............",
-"...#kkkkkk#b#kkkkkk#b#kkkkkk#cc#................",
-"...#kkkkkk#b#kkkkkk#b#kkkkkk#cc#................",
-"...#kkkkkk#b#kkkkkk#b#kkkkkk#c#.................",
-"...#kkkkkk###kkkkkk###kkkkkk##..................",
-"...########.########.########...................",
-"................................................",
-"................................................",
-"................................................",
-"................................................"};
-
-LightApp_ModuleDlg::LightApp_ModuleDlg( QWidget* parent,
- const QString& component,
- const QPixmap& icon )
-: SUIT_MsgDlg( parent, tr( "CAPTION" ), tr ( "DESCRIPTION" ).arg( component ), !icon.isNull() ? icon : QPixmap( default_icon ) )
-{
- iconLabel()->setFrameStyle( QFrame::Box | QFrame::Sunken );
- iconLabel()->setMinimumSize( 70, 70 );
-}
-
-LightApp_ModuleDlg::~LightApp_ModuleDlg()
-{
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : LightApp_ModuleDlg.h
-// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-//
-
-#ifndef LIGHTAPP_MODULEDLG_H
-#define LIGHTAPP_MODULEDLG_H
-
-#include "LightApp.h"
-
-#include <SUIT_MsgDlg.h>
-
-class LIGHTAPP_EXPORT LightApp_ModuleDlg : public SUIT_MsgDlg
-{
- Q_OBJECT
-
-public:
- LightApp_ModuleDlg( QWidget*, const QString&, const QPixmap& = QPixmap() );
- ~LightApp_ModuleDlg();
-};
-
-#endif // LIGHTAPP_MODULEDLG_H
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : LightApp_NameDlg.cxx
-// Author : Vadim SANDLER
-// $Header$
-
-#include <LightApp_NameDlg.h>
-#include <SUIT_Application.h>
-#include <SUIT_Desktop.h>
-#include <SUIT_Tools.h>
-
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-
-#ifndef WIN32
-using namespace std;
-#endif
-
-/*!
- Constructor
-*/
-LightApp_NameDlg::LightApp_NameDlg( QWidget* parent )
-: QDialog( parent ? parent : NULL,//application()->desktop(),
-"LightApp_NameDlg",
-true,
-WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
-{
- setCaption( tr("TLT_RENAME") );
- setSizeGripEnabled( TRUE );
-
- QVBoxLayout* topLayout = new QVBoxLayout( this );
- topLayout->setMargin( 11 ); topLayout->setSpacing( 6 );
-
- /***************************************************************/
- QGroupBox* GroupC1 = new QGroupBox( this, "GroupC1" );
- GroupC1->setColumnLayout(0, Qt::Vertical );
- GroupC1->layout()->setMargin( 0 ); GroupC1->layout()->setSpacing( 0 );
- QHBoxLayout* GroupC1Layout = new QHBoxLayout( GroupC1->layout() );
- GroupC1Layout->setAlignment( Qt::AlignTop );
- GroupC1Layout->setMargin( 11 ); GroupC1Layout->setSpacing( 6 );
-
- QLabel* TextLabel = new QLabel( GroupC1, "TextLabel1" );
- TextLabel->setText( tr( "NAME_LBL" ) );
- GroupC1Layout->addWidget( TextLabel );
-
- myLineEdit = new QLineEdit( GroupC1, "LineEdit1" );
- myLineEdit->setMinimumSize( 250, 0 );
- GroupC1Layout->addWidget( myLineEdit );
-
- /***************************************************************/
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setMargin( 0 ); GroupButtons->layout()->setSpacing( 0 );
- QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons->layout() );
- GroupButtonsLayout->setAlignment( Qt::AlignTop );
- GroupButtonsLayout->setMargin( 11 ); GroupButtonsLayout->setSpacing( 6 );
-
- myButtonOk = new QPushButton( GroupButtons, "buttonOk" );
- myButtonOk->setText( tr( "BUT_OK" ) );
- myButtonOk->setAutoDefault( TRUE ); myButtonOk->setDefault( TRUE );
- GroupButtonsLayout->addWidget( myButtonOk );
-
- GroupButtonsLayout->addStretch();
-
- myButtonCancel = new QPushButton( GroupButtons, "buttonCancel" );
- myButtonCancel->setText( tr( "BUT_CANCEL" ) );
- myButtonCancel->setAutoDefault( TRUE );
- GroupButtonsLayout->addWidget( myButtonCancel );
- /***************************************************************/
-
- topLayout->addWidget( GroupC1 );
- topLayout->addWidget( GroupButtons );
-
- // signals and slots connections
- connect( myButtonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( myButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
-
- /* Move widget on the botton right corner of main widget */
- SUIT_Tools::centerWidget( this, parent );
-}
-
-/*!
- Destructor
-*/
-LightApp_NameDlg::~LightApp_NameDlg()
-{
-}
-
-/*!
- Sets name
-*/
-void LightApp_NameDlg::setName( const QString& name )
-{
- myLineEdit->setText( name );
- myLineEdit->end(false);
- myLineEdit->home(true);
-}
-
-/*!
- Returns name entered by user
-*/
-QString LightApp_NameDlg::name()
-{
- return myLineEdit->text();
-}
-
-/*!
- Accepts if name isn't empty
-*/
-void LightApp_NameDlg::accept()
-{
- if ( name().stripWhiteSpace().isEmpty() )
- return;
- QDialog::accept();
-}
-
-/*!
- Creates modal <Rename> dialog and returns name entered [ static ]
-*/
-QString LightApp_NameDlg::getName( QWidget* parent, const QString& oldName )
-{
- QString n;
- LightApp_NameDlg* dlg = new LightApp_NameDlg( parent );
- if ( !oldName.isNull() )
- dlg->setName( oldName );
- if ( dlg->exec() == QDialog::Accepted )
- n = dlg->name();
- delete dlg;
- return n;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// SALOME SalomeApp : implementation of desktop and GUI kernel
-//
-// File : LightApp_NameDlg.h
-// Author : Vadim SANDLER
-// Module : SALOME
-// $Header$
-
-#ifndef LIGHTAPP_NAMEDLG_H
-#define LIGHTAPP_NAMEDLG_H
-
-#include "LightApp.h"
-#include <qdialog.h>
-
-class QLineEdit;
-class QPushButton;
-
-/*!
- \class LightApp_NameDlg
- Common <Rename> dialog box class
-*/
-class LIGHTAPP_EXPORT LightApp_NameDlg : public QDialog
-{
- Q_OBJECT
-
-public:
- LightApp_NameDlg( QWidget* parent = 0 );
- ~LightApp_NameDlg();
-
- void setName( const QString& name );
- QString name();
-
- static QString getName( QWidget* parent = 0, const QString& oldName = QString::null );
-
-protected slots:
- void accept();
-
-private:
- QPushButton* myButtonOk;
- QPushButton* myButtonCancel;
- QLineEdit* myLineEdit;
-};
-
-#endif // LightApp_NAMEDLG_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_OBFilter.h"
-
-#include "LightApp_SelectionMgr.h"
-#include "LightApp_DataObject.h"
-#include "LightApp_DataOwner.h"
-
-/*!
- Constructor.
-*/
-LightApp_OBFilter::LightApp_OBFilter( LightApp_SelectionMgr* theSelMgr )
-{
- mySelMgr = theSelMgr;
-}
-
-/*!Destructor.*/
-LightApp_OBFilter::~LightApp_OBFilter()
-{
-}
-
-/*!Checks: data object is ok?*/
-bool LightApp_OBFilter::isOk( const SUIT_DataObject* theDataObj ) const
-{
- const LightApp_DataObject* obj = dynamic_cast<const LightApp_DataObject*>( theDataObj );
- if ( obj )
- return mySelMgr->isOk( new LightApp_DataOwner( obj->entry() ) );
-
- return true;
-}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_OBFILTER_H
-#define LIGHTAPP_OBFILTER_H
-
-#include "LightApp.h"
-#include "OB_Filter.h"
-
-class LightApp_SelectionMgr;
-
-/*!
- \class LightApp_OBFilter
- Custom Object Browser filter, that checks correctness of object by all filters set in selection manager
-*/
-class LIGHTAPP_EXPORT LightApp_OBFilter: public OB_Filter
-{
-public:
- LightApp_OBFilter( LightApp_SelectionMgr* theSelMgr );
- ~LightApp_OBFilter();
-
- virtual bool isOk( const SUIT_DataObject* ) const;
-
-private:
- LightApp_SelectionMgr* mySelMgr;
-
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_OBSelector.h"
-
-#include "LightApp_DataOwner.h"
-#include "LightApp_DataObject.h"
-#include "LightApp_Application.h"
-
-#include <OB_Browser.h>
-
-#include <SUIT_Session.h>
-#include <SUIT_DataObjectIterator.h>
-
-#include <qdatetime.h>
-
-#include <time.h>
-
-/*!
- Constructor
-*/
-LightApp_OBSelector::LightApp_OBSelector( OB_Browser* ob, SUIT_SelectionMgr* mgr )
-: SUIT_Selector( mgr, ob ),
- myBrowser( ob )
-{
- if ( myBrowser ) {
- connect( myBrowser, SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
- }
-
- setModified();
-}
-
-/*!
- Destructor
-*/
-LightApp_OBSelector::~LightApp_OBSelector()
-{
-}
-
-/*!
- Gets browser.
-*/
-OB_Browser* LightApp_OBSelector::browser() const
-{
- return myBrowser;
-}
-
-/*!
- Gets selection.
-*/
-void LightApp_OBSelector::getSelection( SUIT_DataOwnerPtrList& theList ) const
-{
- if (mySelectedList.count() == 0 ) {
- SUIT_Session* session = SUIT_Session::session();
- SUIT_Application* sapp = session ? session->activeApplication() : 0;
- LightApp_Application* app = dynamic_cast<LightApp_Application*>( sapp );
- if( !app )
- return;
-
- if ( !myBrowser )
- return;
- DataObjectList objlist;
- myBrowser->getSelected( objlist );
- LightApp_OBSelector* that = (LightApp_OBSelector*)this;
- for ( DataObjectListIterator it( objlist ); it.current(); ++it )
- {
- LightApp_DataObject* obj = dynamic_cast<LightApp_DataObject*>( it.current() );
- if ( obj && app->checkDataObject(obj) )
- {
-#ifndef DISABLE_SALOMEOBJECT
- Handle(SALOME_InteractiveObject) aSObj = new SALOME_InteractiveObject
- ( obj->entry(), obj->componentDataType(), obj->name() );
- LightApp_DataOwner* owner = new LightApp_DataOwner( aSObj );
-#else
- LightApp_DataOwner* owner = new LightApp_DataOwner( obj->entry() );
-#endif
- that->mySelectedList.append( SUIT_DataOwnerPtr( owner ) );
- }
- }
- }
- theList = mySelectedList;
-}
-
-/*!Sets selection.*/
-void LightApp_OBSelector::setSelection( const SUIT_DataOwnerPtrList& theList )
-{
- if ( !myBrowser )
- return;
-
- if( myEntries.count() == 0 ||
- myModifiedTime < myBrowser->getModifiedTime() )
- fillEntries( myEntries );
-
- DataObjectList objList;
- for ( SUIT_DataOwnerPtrList::const_iterator it = theList.begin(); it != theList.end(); ++it )
- {
- const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*it).operator->() );
- if ( owner && myEntries.contains( owner->entry() ) )
- objList.append( myEntries[owner->entry()] );
- }
-
- myBrowser->setSelected( objList );
- mySelectedList.clear();
-}
-
-/*!On selection changed.*/
-void LightApp_OBSelector::onSelectionChanged()
-{
- QTime t1 = QTime::currentTime();
- mySelectedList.clear();
- selectionChanged();
- QTime t2 = QTime::currentTime();
- qDebug( QString( "selection time = %1 msecs" ).arg( t1.msecsTo( t2 ) ) );
-}
-
-/*!Fill entries.*/
-void LightApp_OBSelector::fillEntries( QMap<QString, LightApp_DataObject*>& entires )
-{
- entires.clear();
-
- if ( !myBrowser )
- return;
-
- for ( SUIT_DataObjectIterator it( myBrowser->getRootObject(),
- SUIT_DataObjectIterator::DepthLeft ); it.current(); ++it )
- {
- LightApp_DataObject* obj = dynamic_cast<LightApp_DataObject*>( it.current() );
- if ( obj )
- entires.insert( obj->entry(), obj );
- }
-
- setModified();
-}
-
-/*!Update modified time.*/
-void LightApp_OBSelector::setModified()
-{
- myModifiedTime = clock();
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_OBSELECTOR_H
-#define LIGHTAPP_OBSELECTOR_H
-
-#include "LightApp.h"
-
-#include <SUIT_Selector.h>
-#include <SUIT_DataOwner.h>
-
-class OB_Browser;
-class LightApp_DataObject;
-
-/*!
- \class LightApp_OBSelector
- Custom selector to get/set selection from object browser
-*/
-class LIGHTAPP_EXPORT LightApp_OBSelector : public SUIT_Selector
-{
- Q_OBJECT
-
-public:
- LightApp_OBSelector( OB_Browser*, SUIT_SelectionMgr* );
- virtual ~LightApp_OBSelector();
-
- OB_Browser* browser() const;
-
- /*!Return "ObjectBrowser"*/
- virtual QString type() const { return "ObjectBrowser"; }
-
- void setModified();
- unsigned long getModifiedTime() { return myModifiedTime; }
-
-private slots:
- void onSelectionChanged();
-
-protected:
- virtual void getSelection( SUIT_DataOwnerPtrList& ) const;
- virtual void setSelection( const SUIT_DataOwnerPtrList& );
-
-private:
- void fillEntries( QMap<QString, LightApp_DataObject*>& );
-
-private:
- OB_Browser* myBrowser;
- SUIT_DataOwnerPtrList mySelectedList;
-
- QMap<QString, LightApp_DataObject*> myEntries;
-
- unsigned long myModifiedTime;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_DataOwner.h"
-#include "LightApp_OCCSelector.h"
-
-#ifndef DISABLE_SALOMEOBJECT
- #include <SALOME_InteractiveObject.hxx>
-#endif
-#include <AIS_ListOfInteractive.hxx>
-#include <AIS_ListIteratorOfListOfInteractive.hxx>
-
-/*!
- Constructor
-*/
-LightApp_OCCSelector::LightApp_OCCSelector( OCCViewer_Viewer* viewer, SUIT_SelectionMgr* mgr )
-: SUIT_Selector( mgr, viewer ),
- myViewer( viewer )
-{
- if ( myViewer ) {
- connect( myViewer, SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
- connect( myViewer, SIGNAL( deselection() ), this, SLOT( onDeselection() ) );
- }
-}
-
-/*!
- Destructor.
-*/
-LightApp_OCCSelector::~LightApp_OCCSelector()
-{
-}
-
-/*!
- Gets viewer.
-*/
-OCCViewer_Viewer* LightApp_OCCSelector::viewer() const
-{
- return myViewer;
-}
-
-
-/*!On selection changed.*/
-void LightApp_OCCSelector::onSelectionChanged()
-{
- selectionChanged();
-}
-
-/*!On selection cleared.*/
-void LightApp_OCCSelector::onDeselection()
-{
- mySelectedExternals.clear();
-}
-
-/*!Gets selection list.*/
-void LightApp_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
-{
- if ( !myViewer )
- return;
-
- AIS_ListOfInteractive aSelList;
- myViewer->getSelectedObjects( aSelList );
- for ( AIS_ListIteratorOfListOfInteractive anIt( aSelList ); anIt.More(); anIt.Next() )
- if ( !anIt.Value().IsNull() )
- {
-#ifndef DISABLE_SALOMEOBJECT
- Handle(SALOME_InteractiveObject) anObj = Handle(SALOME_InteractiveObject)::DownCast(anIt.Value()->GetOwner());
- if( !anObj.IsNull() )
- aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( anObj ) ) );
-#else
- aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( entry( anIt.Value() ) ) ) );
-#endif
- }
- // add externally selected objects
- SUIT_DataOwnerPtrList::const_iterator anExtIter;
- for(anExtIter = mySelectedExternals.begin(); anExtIter != mySelectedExternals.end(); anExtIter++) {
- aList.append(*anExtIter);
- }
-}
-
-/*!Sets selection list.*/
-void LightApp_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
-{
- if ( !myViewer )
- return;
-
- QMap<QString, Handle(AIS_InteractiveObject)> aDisplayed;
- Handle(AIS_InteractiveContext) aContext = myViewer->getAISContext();
- if ( aContext.IsNull() )
- return;
-
- AIS_ListOfInteractive aDispList, aSelList;
- aContext->DisplayedObjects( aDispList );
-
- for ( AIS_ListIteratorOfListOfInteractive it( aDispList ); it.More(); it.Next() )
- {
- QString entryStr = entry( it.Value() );
- if ( !entryStr.isEmpty() )
- aDisplayed.insert( entryStr, it.Value() );
- }
-
- mySelectedExternals.clear();
-
- for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr )
- {
- const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*itr).operator->() );
- if ( owner && aDisplayed.contains( owner->entry() ) )
- aSelList.Append( aDisplayed[owner->entry()] );
- else
- mySelectedExternals.append(*itr);
- }
-
- myViewer->unHighlightAll( false );
- myViewer->setObjectsSelected( aSelList );
-}
-
-/*!Gets entry ob object.*/
-QString LightApp_OCCSelector::entry( const Handle(AIS_InteractiveObject)& anAIS ) const
-{
- if ( anAIS.IsNull() || !anAIS->HasOwner() )
- return QString::null;
-
- QString res;
-
-#ifndef DISABLE_SALOMEOBJECT
- Handle(SALOME_InteractiveObject) anObj = Handle(SALOME_InteractiveObject)::DownCast(anAIS->GetOwner());
- if ( !anObj.IsNull() )
- res = QString( anObj->getEntry() );
-#endif
-
- return res;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_OCCSELECTOR_H
-#define LIGHTAPP_OCCSELECTOR_H
-
-#include "LightApp.h"
-
-#include <SUIT_Selector.h>
-#include <SUIT_DataOwner.h>
-
-#include <OCCViewer_ViewModel.h>
-
-class Handle_AIS_InteractiveObject;
-
-/*!
- \class LightApp_OCCSelector
- Custom selector to get/set selection from OCC viewer
-*/
-class LIGHTAPP_EXPORT LightApp_OCCSelector : public SUIT_Selector
-{
- Q_OBJECT
-
-public:
- LightApp_OCCSelector( OCCViewer_Viewer*, SUIT_SelectionMgr* );
- virtual ~LightApp_OCCSelector();
-
- OCCViewer_Viewer* viewer() const;
-
- virtual QString type() const { return OCCViewer_Viewer::Type(); }
-
-private slots:
- virtual void onSelectionChanged();
- virtual void onDeselection();
-
-protected:
- virtual void getSelection( SUIT_DataOwnerPtrList& ) const;
- virtual void setSelection( const SUIT_DataOwnerPtrList& );
-
- QString entry( const Handle_AIS_InteractiveObject& ) const;
-
- SUIT_DataOwnerPtrList mySelectedExternals;
-
-private:
- OCCViewer_Viewer* myViewer;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : LightApp_Operation.h
-// Author : Sergey LITONIN
-// Module : LightApp
-
-#include <LightApp_Operation.h>
-#include <LightApp_Module.h>
-#include <LightApp_Application.h>
-#include <LightApp_Operation.h>
-#include <LightApp_SelectionMgr.h>
-#include <LightApp_Dialog.h>
-
-#include <SUIT_Desktop.h>
-
-#include <qapplication.h>
-
-
-/*!
- * \brief Constructor
-*
-* Constructor sets myModule in NULL and myIsAutoResumed in TRUE
-*/
-LightApp_Operation::LightApp_Operation()
-: SUIT_Operation( 0 ),
- myModule( 0 ),
- myIsAutoResumed( true )
-{
-}
-
-/*!
- * \brief Destructor
-*
-* Destructor does nothing
-*/
-LightApp_Operation::~LightApp_Operation()
-{
-
-}
-
-/*!
- * \brief Gets module of operation
- * \return Pointer to the module
-*
-* Gets pointer to the module or NULL if module was not set. It is strongly recomended to
-* set valid pointer on the module before start of operation
-*/
-LightApp_Module* LightApp_Operation::module() const
-{
- return myModule;
-}
-
-
-/*!
- * \brief Sets module of operation
- * \param theModule - module to be set
-*
-* Sets pointer to the module. It is strongly recomended to set valid pointer on the
-* module before start of operation
-*/
-void LightApp_Operation::setModule( LightApp_Module* theModule )
-{
- myModule = theModule;
- setApplication( myModule ? myModule->application() : 0 );
- setStudy( application() ? application()->activeStudy() : 0 );
-}
-
-/*!
- * \brief Gets desktop of operation
- * \return Pointer to the desktop
-*
-* Gets pointer to the desktop or NULL if application was not set. It is strongly recomended
-* to set valid pointer on the application before start of operation
-*/
-SUIT_Desktop* LightApp_Operation::desktop() const
-{
- return application() != 0 ? application()->desktop() : 0;
-}
-
-/*!
- * \brief Enable dialog of operation
-*
-* Virtual method redefined from the base class. Enable dialog if it was desabled (in
-* suspend method) and activate selection
-*/
-void LightApp_Operation::resumeOperation()
-{
- SUIT_Operation::resumeOperation();
- setDialogActive( true );
-}
-
-/*!
- * \brief Performs actions needed for starting operation
-*
-* Virtual method redefined from the base class. Connect signal of selection manager to
-* onSelectionDone() slot
-*/
-void LightApp_Operation::startOperation()
-{
- if( selectionMgr() )
- connect( selectionMgr(), SIGNAL( selectionChanged() ), SLOT( onSelectionDone() ) );
-
- //If suspended operation was stopped during starting other operation,
- //the dialog is inactive now, We must activate it
- setDialogActive( true );
-}
-
-/*!
- * \brief Performs actions needed for suspending operation
-*
-* Virtual method redefined from the base class. This implementation calls corresponding
-* method of base class and cals setDialogActive( false )
-*/
-void LightApp_Operation::suspendOperation()
-{
- SUIT_Operation::suspendOperation();
- setDialogActive( false );
-}
-
-/*!
- * \brief Performs actions needed for aborting operation
-*
-* Virtual method redefined from the base class calls corresponding method of base class
-* and hides dialog box (if it is exists), disconnect slots from selection manager
-*/
-void LightApp_Operation::abortOperation()
-{
- SUIT_Operation::abortOperation();
- setDialogActive( true );
- if ( dlg() )
- dlg()->hide();
-
- if( selectionMgr() )
- disconnect( selectionMgr(), SIGNAL( selectionChanged() ), this, SLOT( onSelectionDone() ) );
-}
-
-/*!
- * \brief Performs actions needed for committing operation
-*
-* Virtual method redefined from the base class calls corresponding method of base class
-* and hides dialog box (if it is exists), disconnect slots from selection manager
-*/
-void LightApp_Operation::commitOperation()
-{
- SUIT_Operation::commitOperation();
- setDialogActive( true );
- if ( dlg() )
- dlg()->hide();
-
- if( selectionMgr() )
- disconnect( selectionMgr(), SIGNAL( selectionChanged() ), this, SLOT( onSelectionDone() ) );
-}
-
-/*!
- * \brief Gets dialog
- * \return Pointer to the dialog of this operation or NULL if it does not exist
-*
-* This method should be redefined in derived classes if they use dialogs. If this
-* function returns pointer to dialog then dialog will be correctly
-* -# deactivated in suspendOperation method
-* -# activated in resumeOperation method
-* -# hidden in abortOperation and commitOperation methods
-*/
-LightApp_Dialog* LightApp_Operation::dlg() const
-{
- return 0;
-}
-
-/*!
- * \brief Activates selection
-*
-* Virtual method should be redefined in derived classes if they use own selection modes
-* (different from default)
-*/
-void LightApp_Operation::activateSelection()
-{
-}
-
-/*!
- * \brief Virtual method called when selection is changed
-*
-* Virtual method should be redefined in derived classes if they works with selection
-* to provide reaction on the change of selection
-*/
-void LightApp_Operation::selectionDone()
-{
-}
-
-/*!
- * \brief Gets active operation
-*
-* This method provided for convinience calls SUIT_Study::activeOperation() one
-*/
-SUIT_Operation* LightApp_Operation::activeOperation() const
-{
- return study() != 0 ? study()->activeOperation() : 0;
-}
-
-/*!
- * \brief Gets selection manager
-*
-* This method provided for convinience calls LightApp_Application::selectionMgr() one
-*/
-LightApp_SelectionMgr* LightApp_Operation::selectionMgr() const
-{
- SUIT_Application* app = application();
- if ( app != 0 && app->inherits( "LightApp_Application" ) )
- return ( (LightApp_Application*)app )->selectionMgr();
- else
- return 0;
-}
-
-/*!
- * \brief Call selectionDone() method
-*
-* Call selectionDone() method if operator is an active one (see selectionDone() for more
-* description )
-*/
-void LightApp_Operation::onSelectionDone()
-{
- if ( isActive() )
- selectionDone();
-}
-
-/*!
- * \brief Update object browser or/and viewer etc.
- * \param flags - update flags
-*
-* This method provided for convinience calls LightApp_Module::update() one (see
-* LightApp_Module::update() for more description)
-*/
-void LightApp_Operation::update( const int flags )
-{
- if ( myModule != 0 )
- myModule->update( flags );
-}
-
-/*!
- * \brief Activate/Deactivate dialog of operation
- * \param active - State of the dialog to be set
-*
-* Activate/Deactivate dialog of operation. This method called from startOperation(),
-* suspendOperation() ones and so on
-*/
-void LightApp_Operation::setDialogActive( const bool active )
-{
- if( dlg() )
- {
- if( active )
- {
- activateSelection();
- dlg()->setActiveWindow();
- }
- }
-}
-
-/*!
- * \brief Gets autoresume property
- * \return Autoresume property.
-*
-* Autoresume property is used during automatic resuming operation. If operation is
-* suspended and cursor is moved above dialog of the operation then operation is resumed
-* automatically (if possible). It can be resumed only program call otherwise (see
-* LightApp_SwitchOp for more description). This property is TRUE by default and may be
-* changed with setAutoResumed() method call.
-*/
-bool LightApp_Operation::isAutoResumed() const
-{
- return myIsAutoResumed;
-}
-
-/*!
- * \brief Sets autoresume property
- * \param on - Value to be set
- * \return Autoresume property.
-*
-* Sets autoresume property (see isAutoResumed() for more description)
-*/
-void LightApp_Operation::setAutoResumed( const bool on )
-{
- myIsAutoResumed = on;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : LightApp_Operation.h
-// Author : Sergey LITONIN
-// Module : LIGHT
-
-
-#ifndef LightApp_Operation_H
-#define LightApp_Operation_H
-
-#include "LightApp.h"
-#include <SUIT_Operation.h>
-
-class LightApp_Module;
-class LightApp_Application;
-class LightApp_Operation;
-class LightApp_SelectionMgr;
-class LightApp_Dialog;
-class SUIT_Desktop;
-
-/*!
- \class LightApp_Operation
- \brief Base class for all operations
- Base class for all operations (see SUIT_Operation for more description)
-*/
-class LIGHTAPP_EXPORT LightApp_Operation : public SUIT_Operation
-{
- Q_OBJECT
-
-public:
- LightApp_Operation();
- virtual ~LightApp_Operation();
-
- virtual void setModule( LightApp_Module* );
- LightApp_Module* module() const;
-
- bool isAutoResumed() const;
-
- virtual LightApp_Dialog* dlg() const;
-
-protected:
-
- // Methods redefined from base class
-
- virtual void startOperation();
- virtual void suspendOperation();
- virtual void resumeOperation();
- virtual void abortOperation();
- virtual void commitOperation();
-
- // Additional virtual methods may be redefined by derived classes
-
- virtual void setDialogActive( const bool );
- virtual void activateSelection();
- virtual void selectionDone();
-
-
- // Axiluary methods
-
- SUIT_Desktop* desktop() const;
- SUIT_Operation* activeOperation() const;
- LightApp_SelectionMgr* selectionMgr() const;
- void update( const int );
- void setAutoResumed( const bool );
-
-private slots:
-
- virtual void onSelectionDone();
-
-private:
-
- LightApp_Module* myModule;
- bool myIsAutoResumed;
-};
-
-#endif
-
-
-
-
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_Preferences.cxx
-// Author: Sergey TELKOV
-
-#include "LightApp_Preferences.h"
-
-#include <QtxListResourceEdit.h>
-
-#include <qlayout.h>
-
-/*!
- Constructor.Initialize by resource manager and parent QWidget.
-*/
-LightApp_Preferences::LightApp_Preferences( QtxResourceMgr* resMgr, QWidget* parent )
-: QtxListResourceEdit( resMgr, parent )
-{
-}
-
-/*!
- Destructor.
-*/
-LightApp_Preferences::~LightApp_Preferences()
-{
-}
-
-/*!
- Adds preference.
-*/
-int LightApp_Preferences::addPreference( const QString& label, const int pId, const int type,
- const QString& section, const QString& param )
-{
- return addItem( label, pId, type, section, param );
-}
-
-/*!
- Adds preference.
-*/
-int LightApp_Preferences::addPreference( const QString& mod, const QString& label, const int pId,
- const int type, const QString& section, const QString& param )
-{
- int id = addItem( label, pId, type, section, param );
- if ( id != -1 && !mod.isEmpty() )
- myPrefMod.insert( id, mod );
- return id;
-}
-
-/*!
- Checks: is preferences has module with name \a mod.
-*/
-bool LightApp_Preferences::hasModule( const QString& mod ) const
-{
- bool res = false;
- for ( PrefModuleMap::ConstIterator it = myPrefMod.begin(); it != myPrefMod.end() && !res; ++it )
- res = it.data() == mod;
- return res;
-}
-
-/*!Do nothing.*/
-void LightApp_Preferences::onHelp()
-{
-}
-
-/*!Store preferences on apply.*/
-void LightApp_Preferences::onApply()
-{
- store();
-}
-
-/*!Emit preference changed.*/
-void LightApp_Preferences::changedResources( const QMap<Item*, QString>& map )
-{
- for ( QMap<Item*, QString>::ConstIterator it = map.begin(); it != map.end(); ++it )
- {
- QString sec, param;
- it.key()->resource( sec, param );
- QString mod = module( it.key()->id() );
- emit preferenceChanged( mod, sec, param );
- }
-}
-
-/*!Gets module name by \a id, if exist.*/
-QString LightApp_Preferences::module( const int id ) const
-{
- QString mod;
- if ( myPrefMod.contains( id ) )
- mod = myPrefMod[id];
- return mod;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_Preferences.h
-// Author: Sergey TELKOV
-
-#ifndef LIGHTAPP_PREFERENCES_H
-#define LIGHTAPP_PREFERENCES_H
-
-#include <LightApp.h>
-
-#include <QtxDialog.h>
-#include <QtxListResourceEdit.h>
-
-#include <qmap.h>
-
-class QtxResourceMgr;
-
-/*!
- \class LightApp_Preferences
- Custom preference container. Assign each preference category with module.
- Emits signal on preference changing
-*/
-class LIGHTAPP_EXPORT LightApp_Preferences : public QtxListResourceEdit
-{
- Q_OBJECT
-
-public:
- LightApp_Preferences( QtxResourceMgr*, QWidget* = 0 );
- virtual ~LightApp_Preferences();
-
- int addPreference( const QString& label, const int pId = -1, const int = -1,
- const QString& section = QString::null, const QString& param = QString::null );
- int addPreference( const QString& modName, const QString& label, const int pId = -1, const int = -1,
- const QString& section = QString::null, const QString& param = QString::null );
-
- bool hasModule( const QString& ) const;
-
-signals:
- void preferenceChanged( QString&, QString&, QString& );
-
-private slots:
- void onHelp();
- void onApply();
- virtual void changedResources( const QMap<Item*, QString>& );
-
-private:
- QString module( const int ) const;
-
-private:
- typedef QMap<int, QString> PrefModuleMap;
-
-private:
- PrefModuleMap myPrefMod;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_PreferencesDlg.cxx
-// Author: Sergey TELKOV
-
-#include "LightApp_PreferencesDlg.h"
-#include "LightApp_Preferences.h"
-
-#include "QtxResourceMgr.h"
-
-#include <qbutton.h>
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qvbox.h>
-#include <qfiledialog.h>
-
-/*!
- Constructor.
-*/
-LightApp_PreferencesDlg::LightApp_PreferencesDlg( LightApp_Preferences* prefs, QWidget* parent )
-: QtxDialog( parent, 0, true, true, OK | Close | Apply ),
-myPrefs( prefs ), mySaved ( false )
-{
- setCaption( tr( "CAPTION" ) );
-
- QVBoxLayout* main = new QVBoxLayout( mainFrame(), 5 );
-
- QVBox* base = new QVBox( mainFrame() );
- main->addWidget( base );
-
- myPrefs->reparent( base, QPoint( 0, 0 ), true );
-
- setFocusProxy( myPrefs );
-
- setButtonPosition( Right, Close );
-
- setDialogFlags( AlignOnce );
-
- connect( this, SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) );
- connect( this, SIGNAL( dlgApply() ), this, SLOT( onApply() ) );
-
- QButton* defBtn = userButton( insertButton( tr( "DEFAULT_BTN_TEXT" ) ) );
- if ( defBtn )
- connect( defBtn, SIGNAL( clicked() ), this, SLOT( onDefault() ) );
- QButton* impBtn = userButton( insertButton( tr( "IMPORT_BTN_TEXT" ) ) );
- if( impBtn )
- connect( impBtn, SIGNAL( clicked() ), this, SLOT( onImportPref() ) );
-}
-
-/*!
- Destructor.
-*/
-LightApp_PreferencesDlg::~LightApp_PreferencesDlg()
-{
- if ( !myPrefs )
- return;
-
- myPrefs->reparent( 0, QPoint( 0, 0 ), false );
- myPrefs = 0;
-}
-
-/*!Show dialog.*/
-void LightApp_PreferencesDlg::show()
-{
- myPrefs->retrieve();
- myPrefs->toBackup();
-
- QtxDialog::show();
-}
-
-/*!Store preferences on accept.*/
-void LightApp_PreferencesDlg::accept()
-{
- QtxDialog::accept();
-
- myPrefs->store();
- mySaved = true;
-}
-
-/*!Reject. Restore preferences from backup.*/
-void LightApp_PreferencesDlg::reject()
-{
- QtxDialog::reject();
-
- myPrefs->fromBackup();
-}
-
-/*!Do nothing.*/
-void LightApp_PreferencesDlg::onHelp()
-{
-}
-
-/*!Store preferences on apply.*/
-void LightApp_PreferencesDlg::onApply()
-{
- myPrefs->store();
-
- // Fix for Bug PAL11197: Restoring the corrected values from resource manager.
- // (Correcting in VisuGUI.cxx and SMESHGUI.cxx in methods
- // ::preferencesChanged( const QString& sect, const QString& name ))
- myPrefs->retrieve();
- //
-
- myPrefs->toBackup();
- mySaved = true;
-}
-
-/*! Restore default preferences*/
-void LightApp_PreferencesDlg::onDefault()
-{
- if( QMessageBox::Ok == QMessageBox::information( this, tr( "WARNING" ), tr( "DEFAULT_QUESTION" ), QMessageBox::Ok, QMessageBox::Cancel ) )
- {
- if ( myPrefs && myPrefs->resourceMgr() )
- {
- bool prev = myPrefs->resourceMgr()->ignoreUserValues();
- myPrefs->resourceMgr()->setIgnoreUserValues( true );
- myPrefs->retrieve();
- myPrefs->resourceMgr()->setIgnoreUserValues( prev );
- }
- }
-}
-
-/*! Import preferences from some file */
-void LightApp_PreferencesDlg::onImportPref()
-{
- QtxResourceMgr* mgr = myPrefs->resourceMgr();
- if( !mgr )
- return;
-
- QFileDialog dlg( ".", "*", this, "" );
- dlg.setCaption( tr("IMPORT_PREFERENCES") );
- dlg.setShowHiddenFiles( true );
- dlg.exec();
- QString fname = dlg.selectedFile();
- if( fname.isEmpty() )
- return;
-
- if( mgr->import( fname ) )
- {
- myPrefs->retrieve();
- myPrefs->toBackup();
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_PreferencesDlg.h
-// Author: Sergey TELKOV
-
-#ifndef LIGHTAPP_PREFERENCESDLG_H
-#define LIGHTAPP_PREFERENCESDLG_H
-
-#include <LightApp.h>
-
-#include <QtxDialog.h>
-
-class LightApp_Preferences;
-
-/*!
- \class LightApp_PreferencesDlg
- Dialog for preferences edition
-*/
-class LIGHTAPP_EXPORT LightApp_PreferencesDlg : public QtxDialog
-{
- Q_OBJECT
-
-public:
- LightApp_PreferencesDlg( LightApp_Preferences*, QWidget* = 0 );
- virtual ~LightApp_PreferencesDlg();
-
- virtual void show();
- virtual void accept();
- virtual void reject();
-
- bool isSaved() { return mySaved; }
- void setSaved( bool saved ) { mySaved = saved; }
-
-private slots:
- void onHelp();
- void onApply();
- void onDefault();
- void onImportPref();
-
-private:
- LightApp_Preferences* myPrefs;
- bool mySaved;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_ROOTOBJECT_H
-#define LIGHTAPP_ROOTOBJECT_H
-
-#include "LightApp.h"
-#include "SUIT_DataObject.h"
-
-class LightApp_Study;
-
-/*!
- LightApp_RootObject - class to be instanciated by only one object -
- root object of LightApp data object tree. This object is not shown
- in object browser (invisible), so it has no re-definition of name(), icon(),
- etc. methods. The goal of this class is to provide a unified access
- to LightApp_Study object from LightApp_DataObject instances.
-*/
-class LIGHTAPP_EXPORT LightApp_RootObject : public SUIT_DataObject
-{
-public:
- LightApp_RootObject( LightApp_Study* study )
- : myStudy( study )
- {}
-
- virtual ~LightApp_RootObject() {}
-
- void setStudy( LightApp_Study* study ) { myStudy = study; }
- LightApp_Study* study() const { return myStudy; }
-
-private:
- LightApp_Study* myStudy;
-
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_Selection.h"
-#include "LightApp_SelectionMgr.h"
-#include "LightApp_DataOwner.h"
-#include "LightApp_Study.h"
-#include "LightApp_Application.h"
-#include "LightApp_Displayer.h"
-
-#include "SUIT_Session.h"
-#include "SUIT_ViewWindow.h"
-
-/*!
- Constructor
-*/
-LightApp_Selection::LightApp_Selection()
-: myStudy( 0 )
-{
-}
-
-/*!
- Destructor.
-*/
-LightApp_Selection::~LightApp_Selection()
-{
-}
-
-/*!
- Initialization.
-*/
-void LightApp_Selection::init( const QString& client, LightApp_SelectionMgr* mgr)
-{
- myPopupClient = client;
- myStudy = 0;
-
- if( mgr )
- {
- if( mgr->application() )
- myStudy = dynamic_cast<LightApp_Study*>( mgr->application()->activeStudy() );
- if( !myStudy )
- return;
-
- //1) to take owners from current popup client
- SUIT_DataOwnerPtrList sel( true ), cur_sel( true );
- mgr->selected( sel, client );
-
- //2) to take such owners from other popup clients that it's entry is different with every entry from current list
- QPtrList<SUIT_Selector> aSelectors;
- mgr->selectors( aSelectors );
- for( SUIT_Selector* selector = aSelectors.first(); selector; selector = aSelectors.next() )
- {
- qDebug( selector->type() );
- if( selector->type() != client && selector->isEnabled() )
- {
- //mgr->selected( cur_sel, selector->type() );
- selector->selected( cur_sel );
- SUIT_DataOwnerPtrList::const_iterator aLIt = cur_sel.begin(), aLLast = cur_sel.end();
- for( ; aLIt!=aLLast; aLIt++ )
- sel.append( *aLIt ); //check entry and don't append if such entry is in list already
- }
- }
-
- //3) to analyse owner and fill internal data structures
- SUIT_DataOwnerPtrList::const_iterator anIt = sel.begin(), aLast = sel.end();
- QMap<QString,int> entries;
- QString entry;
- int num=0;
- for( ; anIt!=aLast; anIt++ )
- {
- LightApp_DataOwner* sowner = dynamic_cast<LightApp_DataOwner*>( (*anIt ).get() );
- if( sowner )
- {
- entry = referencedToEntry( sowner->entry() );
- if( entries.contains( entry ) )
- continue;
-
- entries.insert( entry, 0 );
- myEntries.insert( num, entry );
- myIsReferences.insert( num, sowner->entry() != entry );
- processOwner( sowner );
- num++;
- }
- }
- }
-}
-
-QString LightApp_Selection::referencedToEntry( const QString& entry ) const
-{
- return myStudy->referencedToEntry( entry );
-}
-
-/*!
- Gets count of entries.
-*/
-int LightApp_Selection::count() const
-{
- return myEntries.count();
-}
-
-/*!
- Gets QtxValue();
-*/
-QtxValue LightApp_Selection::param( const int ind, const QString& p ) const
-{
- LightApp_Application* app = dynamic_cast<LightApp_Application*>( myStudy ? myStudy->application() : 0 );
- if( !( ind>=0 && ind<count() ) || !app )
- return QtxValue();
-
- if( p=="isVisible" )
- {
- QString mod_name = app->moduleTitle( param( ind, "component" ).toString() );
- LightApp_Displayer* d = LightApp_Displayer::FindDisplayer( mod_name, false );
- // false in last parameter means that now we doesn't load module, if it isn't loaded
-
- bool vis = false;
- if( d )
- vis = d->IsDisplayed( myEntries[ ind ] );
- else
- {
- LightApp_Displayer local_d;
- vis = local_d.IsDisplayed( myEntries[ ind ] );
- }
- return QtxValue( vis, 0 );
- }
-
- else if( p=="component" )
- {
- return myStudy->componentDataType( myEntries[ ind ] );
- }
-
- else if( p=="isComponent" )
- {
- return QtxValue( myStudy->isComponent( myEntries[ ind ] ), 0 );
- }
-
- else if( p=="isReference" )
- return QtxValue( isReference( ind ), false );
-
- else if( p=="displayer" )
- return param( ind, "component" );
-
- else if( p=="canBeDisplayed" )
- {
- QString mod_name = app->moduleTitle( param( ind, "component" ).toString() );
- LightApp_Displayer* d = LightApp_Displayer::FindDisplayer( mod_name, false );
- // false in last parameter means that now we doesn't load module, if it isn't loaded
-
- if ( d )
- return d->canBeDisplayed( myEntries[ ind ] );
- else if ( myEntries[ ind ].startsWith( QObject::tr( "SAVE_POINT_DEF_NAME" ) ) ) // object is a Save Point object
- return false;
-
- return true;
- //now if displayer is null, it means, that according module isn't loaded, so that we allow to all display/erase
- //operations under object
- }
-
- return QtxValue();
-}
-
-/*!
- Gets global parameters. client, isActiveView, activeView etc.
-*/
-QtxValue LightApp_Selection::globalParam( const QString& p ) const
-{
- if ( p == "client" ) return QtxValue( myPopupClient );
- else if ( p == "activeModule" )
- {
- LightApp_Application* app = dynamic_cast<LightApp_Application*>( myStudy->application() );
- QString mod_name = app ? QString( app->activeModule()->name() ) : QString::null;
- //cout << "activeModule : " << mod_name.latin1() << endl;
- if( !mod_name.isEmpty() )
- return mod_name;
- else
- return QtxValue();
- }
- else if ( p == "isActiveView" ) return QtxValue( (bool)activeVW() );
- else if ( p == "activeView" ) return QtxValue( activeViewType() );
-#ifndef WNT
- else return QtxPopupMgr::Selection::globalParam( p );
-#else
- else return Selection::globalParam( p );
-#endif
-}
-
-/*!
- Do nothing. To be redefined by successors
-*/
-void LightApp_Selection::processOwner( const LightApp_DataOwner* )
-{
-}
-
-/*!
- Gets entry with index \a index.
-*/
-QString LightApp_Selection::entry( const int index ) const
-{
- if ( index >= 0 && index < count() )
- return myEntries[ index ];
- return QString();
-}
-
-/*!
- Returns true if i-th selected object was reference to object with entry( i )
-*/
-bool LightApp_Selection::isReference( const int index ) const
-{
- if( index >= 0 && index < count() )
- return myIsReferences[ index ];
- else
- return false;
-}
-
-/*!
- Gets type of active view manager.
-*/
-QString LightApp_Selection::activeViewType() const
-{
- SUIT_ViewWindow* win = activeVW();
- if ( win ) {
- SUIT_ViewManager* vm = win->getViewManager();
- if ( vm )
- return vm->getType();
- }
- return QString::null;
-}
-
-/*!
- Gets active view window.
-*/
-SUIT_ViewWindow* LightApp_Selection::activeVW() const
-{
- SUIT_Session* session = SUIT_Session::session();
- if ( session ) {
- SUIT_Application* app = session->activeApplication();
- if ( app ) {
- SUIT_Desktop* desk = app->desktop();
- if ( desk )
- return desk->activeWindow();
- }
- }
- return 0;
-}
+++ /dev/null
-// LightApp_Selection
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : LightApp_Selection.h
-// Author : Alexander SOLOVYOV
-// Module : GUI
-// $Header$
-
-#ifndef LIGHTAPP_SELECTION_HeaderFile
-#define LIGHTAPP_SELECTION_HeaderFile
-
-#include "LightApp.h"
-#include <QtxPopupMgr.h>
-
-class LightApp_SelectionMgr;
-class LightApp_DataOwner;
-class LightApp_Study;
-class SUIT_ViewWindow;
-
-/*!
- \class LightApp_Selection
- Custom selection class, allowing to build popup with rules on the base
- of owners selected in all selectors (popup client has more priority).
- It is able to return values of standard object properties
- (isVisible,isComponent,canBeDisplayed,isReference, etc)
-*/
-class LIGHTAPP_EXPORT LightApp_Selection : public QtxPopupMgr::Selection
-{
-public:
- LightApp_Selection();
- virtual ~LightApp_Selection();
-
- virtual void init( const QString&, LightApp_SelectionMgr* );
- virtual void processOwner( const LightApp_DataOwner* );
-
- virtual int count() const;
- virtual QtxValue param( const int, const QString& ) const;
- virtual QtxValue globalParam( const QString& ) const;
- void setModuleName( const QString );
-
-protected:
- QString entry( const int ) const;
- bool isReference( const int ) const;
- /*!Gets study.*/
- LightApp_Study* study() const { return myStudy; }
- QString activeViewType() const;
- SUIT_ViewWindow* activeVW() const;
- virtual QString referencedToEntry( const QString& ) const;
-
-private:
- QString myPopupClient;
- QMap<int,QString> myEntries; // entries of selected objects
- QMap<int,bool> myIsReferences; // whether i-th selected object was a reference
- LightApp_Study* myStudy;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_SelectionMgr.h"
-
-#include "LightApp_Study.h"
-#include "LightApp_DataOwner.h"
-#include "LightApp_DataSubOwner.h"
-#include "LightApp_Application.h"
-
-#include <SUIT_Session.h>
-
-#ifndef DISABLE_SALOMEOBJECT
- #include <SALOME_ListIO.hxx>
- #include <SALOME_ListIteratorOfListIO.hxx>
-
- // Open CASCADE Include
- #include <TColStd_MapOfInteger.hxx>
- #include <TColStd_MapIteratorOfMapOfInteger.hxx>
- #include <TColStd_IndexedMapOfInteger.hxx>
-#endif
-
-/*!
- Constructor.
-*/
-LightApp_SelectionMgr::LightApp_SelectionMgr( LightApp_Application* app, const bool fb )
-: SUIT_SelectionMgr( fb ),
-myApp( app )
-{
-}
-
-/*!
- Destructor.
-*/
-LightApp_SelectionMgr::~LightApp_SelectionMgr()
-{
-}
-
-/*!
- Gets application.
-*/
-LightApp_Application* LightApp_SelectionMgr::application() const
-{
- return myApp;
-}
-
-#ifndef DISABLE_SALOMEOBJECT
-/*!
- Get all selected objects from selection manager
-*/
-void LightApp_SelectionMgr::selectedObjects( SALOME_ListIO& theList, const QString& theType,
- const bool convertReferences ) const
-{
- theList.Clear();
-
- SUIT_DataOwnerPtrList aList;
- selected( aList, theType );
-
- QMap<QString,int> entryMap;
-
- QString entry, checkEntry;
- for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr )
- {
- const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*itr).operator->() );
- if( !owner )
- continue;
-
- LightApp_Study* study = dynamic_cast<LightApp_Study*>( application()->activeStudy() );
- if ( !study )
- return;
-
- entry = owner->entry();
- // Entry to check object uniqueness.
- // It is selected owner entry in the case, when we do not convert references,
- // and entry of a real object, when we convert references.
- checkEntry = entry;
- if ( convertReferences ) {
- QString refEntry = study->referencedToEntry( entry );
- checkEntry = refEntry;
- if ( !entryMap.contains( checkEntry ) ) {
- if ( refEntry != entry ) {
- QString component = study->componentDataType( refEntry );
- theList.Append( new SALOME_InteractiveObject( refEntry, component, ""/*refobj->Name().c_str()*/ ) );
- }
- else if( !owner->IO().IsNull() )
- theList.Append( owner->IO() );
- }
- }
- else {
- if( !entryMap.contains( entry ) && !owner->IO().IsNull() )
- theList.Append( owner->IO() );
- }
-
- entryMap.insert(checkEntry, 1);
- }
-}
-
-/*!
- Append selected objects.
-*/
-void LightApp_SelectionMgr::setSelectedObjects( const SALOME_ListIO& lst, const bool append )
-{
- SUIT_DataOwnerPtrList owners;
- for ( SALOME_ListIteratorOfListIO it( lst ); it.More(); it.Next() )
- {
- if ( it.Value()->hasEntry() )
- owners.append( new LightApp_DataOwner( it.Value() ) );
- }
-
- setSelected( owners, append );
-}
-
-#else
-/*!
- Get all selected objects from selection manager
-*/
-void LightApp_SelectionMgr::selectedObjects( QStringList& theList, const QString& theType,
- const bool convertReferences ) const
-{
- theList.clear();
-
- SUIT_DataOwnerPtrList aList;
- selected( aList, theType );
-
- QString entry;
- for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr )
- {
- const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*itr).operator->() );
- if( !owner )
- continue;
-
- LightApp_Study* study = dynamic_cast<LightApp_Study*>( application()->activeStudy() );
- if ( !study )
- return;
-
- entry = owner->entry();
- if( !theList.contains( entry ) )
- theList.append( entry );
- }
-}
-
-#endif
-
-/*!
- Emit current selection changed.
-*/
-void LightApp_SelectionMgr::selectionChanged( SUIT_Selector* theSel )
-{
- SUIT_SelectionMgr::selectionChanged( theSel );
-
- emit currentSelectionChanged();
-}
-
-#ifndef DISABLE_SALOMEOBJECT
-
-/*!
- get map of indexes for the given SALOME_InteractiveObject
-*/
-void LightApp_SelectionMgr::GetIndexes( const Handle(SALOME_InteractiveObject)& IObject,
- TColStd_IndexedMapOfInteger& theIndex)
-{
- theIndex.Clear();
-
- SUIT_DataOwnerPtrList aList;
- selected( aList );
-
- for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr )
- {
- const LightApp_DataSubOwner* subOwner = dynamic_cast<const LightApp_DataSubOwner*>( (*itr).operator->() );
- if ( subOwner )
- if ( subOwner->entry() == QString(IObject->getEntry()) )
- theIndex.Add( subOwner->index() );
- }
-
-}
-
-/*!
- get map of indexes for the given entry of SALOME_InteractiveObject
-*/
-void LightApp_SelectionMgr::GetIndexes( const QString& theEntry, TColStd_IndexedMapOfInteger& theIndex )
-{
- theIndex.Clear();
-
- SUIT_DataOwnerPtrList aList;
- selected( aList );
-
- for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr )
- {
- const LightApp_DataSubOwner* subOwner = dynamic_cast<const LightApp_DataSubOwner*>( (*itr).operator->() );
- if ( subOwner )
- if ( subOwner->entry() == theEntry )
- theIndex.Add( subOwner->index() );
- }
-
-}
-
-/*!
- Add or remove interactive objects from selection manager.
-*/
-//bool LightApp_SelectionMgr::AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& IObject,
-void LightApp_SelectionMgr::AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& IObject,
- const TColStd_MapOfInteger& theIndexes,
- bool modeShift)
-{
- SUIT_DataOwnerPtrList remainsOwners;
-
- SUIT_DataOwnerPtrList aList;
- selected( aList );
-
- QString ioEntry (IObject->getEntry());
-
- if ( !modeShift ) {
- for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr )
- {
- const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*itr).operator->() );
- if ( owner )
- {
- if ( owner->entry() != ioEntry )
- {
- const LightApp_DataSubOwner* subOwner = dynamic_cast<const LightApp_DataSubOwner*>( owner );
- if ( subOwner )
- remainsOwners.append( new LightApp_DataSubOwner( subOwner->entry(), subOwner->index() ) );
- else
- remainsOwners.append( new LightApp_DataOwner( owner->entry() ) );
- }
- }
- }
- }
- else
- remainsOwners = aList;
-
- TColStd_MapIteratorOfMapOfInteger It;
- It.Initialize(theIndexes);
- for(;It.More();It.Next())
- remainsOwners.append( new LightApp_DataSubOwner( ioEntry, It.Key() ) );
-
- bool append = false;
- setSelected( remainsOwners, append );
-
- emit currentSelectionChanged();
-
- // Bug 17269: To avoid calling of selected(aList)
- //TColStd_IndexedMapOfInteger anIndexes;
- //GetIndexes( IObject, anIndexes );
- //return !anIndexes.IsEmpty();
-}
-
-/*!
- select 'subobjects' with given indexes
-*/
-void LightApp_SelectionMgr::selectObjects( const Handle(SALOME_InteractiveObject)& IObject,
- TColStd_IndexedMapOfInteger theIndex, bool append )
-{
- SUIT_DataOwnerPtrList aList;
-
- if ( theIndex.IsEmpty() )
- aList.append( new LightApp_DataOwner( QString(IObject->getEntry()) ) );
- else
- {
- int i;
- for ( i = 1; i <= theIndex.Extent(); i++ )
- aList.append( new LightApp_DataSubOwner( QString(IObject->getEntry()), theIndex( i ) ) );
- }
-
- setSelected( aList, append );
-
-}
-
-/*!
- select 'subobjects' with given indexes
-*/
-void LightApp_SelectionMgr::selectObjects( MapIOOfMapOfInteger theMapIO, bool append )
-{
- SUIT_DataOwnerPtrList aList;
-
- MapIOOfMapOfInteger::Iterator it;
- for ( it = theMapIO.begin(); it != theMapIO.end(); ++it )
- {
- if ( it.data().IsEmpty() )
- aList.append( new LightApp_DataOwner( QString(it.key()->getEntry()) ) );
- else
- {
- int i;
- for ( i = 1; i <= it.data().Extent(); i++ )
- aList.append( new LightApp_DataSubOwner( QString(it.key()->getEntry()), it.data()( i ) ) );
- }
- }
-
- setSelected( aList, append );
-
-}
-
-/*!
- get map of selected subowners : object's entry <-> map of indexes
-*/
-void LightApp_SelectionMgr::selectedSubOwners( MapEntryOfMapOfInteger& theMap )
-{
- theMap.clear();
-
- TColStd_IndexedMapOfInteger anIndexes;
-
- SUIT_DataOwnerPtrList aList;
- selected( aList );
-
- for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr )
- {
- const LightApp_DataSubOwner* subOwner =
- dynamic_cast<const LightApp_DataSubOwner*>( (*itr).operator->() );
- if ( subOwner )
- {
- if ( !theMap.contains( subOwner->entry() ) )
- {
- anIndexes.Clear();
- //Bug 17269: GetIndexes( subOwner->entry(), anIndexes );
- //Bug 17269: To avoid multiple calling of selected(aList)
- for ( SUIT_DataOwnerPtrList::const_iterator itr2 = itr; itr2 != aList.end(); ++itr2 )
- {
- const LightApp_DataSubOwner* subOwner2 =
- dynamic_cast<const LightApp_DataSubOwner*>( (*itr2).operator->() );
- if ( subOwner2 )
- if ( subOwner2->entry() == subOwner->entry() )
- anIndexes.Add( subOwner2->index() );
- }
- //
- theMap.insert( subOwner->entry(), anIndexes );
- }
- }
- }
-}
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_SELECTIONMGR_H
-#define LIGHTAPP_SELECTIONMGR_H
-
-#include "LightApp.h"
-
-#include <SUIT_SelectionMgr.h>
-
-#ifndef DISABLE_SALOMEOBJECT
- #include <SALOME_InteractiveObject.hxx>
- #include <qmap.h>
-
- class SALOME_ListIO;
- class TColStd_IndexedMapOfInteger;
- class TColStd_MapOfInteger;
-#else
-#include <qstringlist.h>
-#endif
-
-class LightApp_Application;
-
-/*!
- Custom selection manager, allowing to work with object selection
- (additionally to data owners) and to access to sub-selection of objects
-*/
-class LIGHTAPP_EXPORT LightApp_SelectionMgr : public SUIT_SelectionMgr
-{
- Q_OBJECT
-
-public:
- LightApp_SelectionMgr( LightApp_Application*, const bool = true );
- virtual ~LightApp_SelectionMgr();
-
- LightApp_Application* application() const;
-
-#ifndef DISABLE_SALOMEOBJECT
- typedef QMap< Handle(SALOME_InteractiveObject), TColStd_IndexedMapOfInteger > MapIOOfMapOfInteger;
- typedef QMap< QString, TColStd_IndexedMapOfInteger > MapEntryOfMapOfInteger;
-
- void selectedObjects( SALOME_ListIO&, const QString& = QString::null, const bool = true ) const;
- void setSelectedObjects( const SALOME_ListIO&, const bool = false );
-
- void GetIndexes( const Handle(SALOME_InteractiveObject)& IObject,
- TColStd_IndexedMapOfInteger& theIndex );
- void GetIndexes( const QString& theEntry,
- TColStd_IndexedMapOfInteger& theIndex );
-
- //bool AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& IObject,
- void AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& IObject,
- const TColStd_MapOfInteger& theIndices,
- bool modeShift );
-
- void selectObjects( const Handle(SALOME_InteractiveObject)& IObject,
- TColStd_IndexedMapOfInteger theIndex, bool append );
- void selectObjects( MapIOOfMapOfInteger theMapIO, bool append );
-
- void selectedSubOwners( MapEntryOfMapOfInteger& theMap );
-#else
- void selectedObjects( QStringList&, const QString& = QString::null, const bool = true ) const;
-#endif
-
-signals:
- void currentSelectionChanged();
-
-private:
- virtual void selectionChanged( SUIT_Selector* );
-
-private:
- LightApp_Application* myApp;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_ShowHideOp.h"
-#include "LightApp_Application.h"
-#include "LightApp_DataOwner.h"
-#include "LightApp_Module.h"
-#include "LightApp_Study.h"
-#include "LightApp_Displayer.h"
-#include "CAM_Study.h"
-
-#include "LightApp_SelectionMgr.h"
-#include "LightApp_Selection.h"
-
-#ifndef DISABLE_SALOMEOBJECT
- #include <SALOME_ListIO.hxx>
- #include <SALOME_ListIteratorOfListIO.hxx>
-#endif
-
-/*!
- Constructor
-*/
-LightApp_ShowHideOp::LightApp_ShowHideOp( ActionType type )
-: LightApp_Operation(),
- myActionType( type )
-{
-}
-
-/*!
- Destructor
-*/
-LightApp_ShowHideOp::~LightApp_ShowHideOp()
-{
-}
-
-/*!
- Makes show/hide operation
-*/
-void LightApp_ShowHideOp::startOperation()
-{
- LightApp_Application* app = dynamic_cast<LightApp_Application*>( application() );
- LightApp_Study* study = app ? dynamic_cast<LightApp_Study*>( app->activeStudy() ) : 0;
- if( !app || !study )
- {
- abort();
- return;
- }
-
- LightApp_SelectionMgr* mgr = app->selectionMgr();
- LightApp_Module* mod = dynamic_cast<LightApp_Module*>( app->activeModule() );
- if( !mod )
- return;
-
- LightApp_Selection* sel = mod->createSelection();
- if( !sel )
- return;
-
- sel->init( "", mgr );
- if( sel->count()==0 && myActionType!=ERASE_ALL )
- {
- abort();
- return;
- }
-
- QString mod_name;
- if( sel->count()>0 )
- {
- QString aStr = sel->param( 0, "displayer" ).toString();
- mod_name = app->moduleTitle( aStr );
- }
- else if( app->activeModule() )
- mod_name = app->moduleTitle( app->activeModule()->name() );
-
- LightApp_Displayer* d = LightApp_Displayer::FindDisplayer( mod_name, true );
- if( !d )
- {
- abort();
- return;
- }
-
- if( myActionType==DISPLAY_ONLY || myActionType==ERASE_ALL )
- {
- //ERASE ALL
- QStringList comps;
- study->components( comps );
- QStringList::const_iterator anIt = comps.begin(), aLast = comps.end();
- for( ; anIt!=aLast; anIt++ )
- {
- LightApp_Displayer* disp = LightApp_Displayer::FindDisplayer( app->moduleTitle( *anIt ), true );
- if( disp )
- disp->EraseAll( false, false, 0 );
- }
- if( myActionType==ERASE_ALL )
- {
- d->UpdateViewer();
- commit();
- return;
- }
- }
-
- QStringList entries;
-
-#ifndef DISABLE_SALOMEOBJECT
- SALOME_ListIO selObjs;
- mgr->selectedObjects( selObjs );
- SALOME_ListIteratorOfListIO anIt( selObjs );
- for( ; anIt.More(); anIt.Next() )
- if( !anIt.Value().IsNull() )
-#else
- QStringList selObjs;
- mgr->selectedObjects( selObjs );
- QStringList::const_iterator anIt = selObjs.begin(), aLast = selObjs.end();
- for( ; ; anIt!=aLast )
-#endif
- {
- QString entry =
-#ifndef DISABLE_SALOMEOBJECT
- anIt.Value()->getEntry();
-#else
- *anIt;
-#endif
-
- if( study->isComponent( entry ) )
- study->children( entry, entries );
- else
- entries.append( entry );
- }
-
- for( QStringList::const_iterator it = entries.begin(), last = entries.end(); it!=last; it++ )
- {
- QString e = study->referencedToEntry( *it );
- if( myActionType==DISPLAY || myActionType==DISPLAY_ONLY )
- d->Display( e, false, 0 );
- else if( myActionType==ERASE )
- d->Erase( e, false, false, 0 );
- }
- d->UpdateViewer();
- commit();
-
- delete sel;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_SHOW_HIDE_OPERATION_HEADER
-#define LIGHTAPP_SHOW_HIDE_OPERATION_HEADER
-
-#include "LightApp_Operation.h"
-
-class LightApp_Displayer;
-
-/*!
- \class LightApp_ShowHideOp
- Standard operation allowing to show/hide selected objects
- corresponding to any module with help of module displayer
-*/
-class LIGHTAPP_EXPORT LightApp_ShowHideOp : public LightApp_Operation
-{
- Q_OBJECT
-
-public:
- typedef enum { DISPLAY, ERASE, DISPLAY_ONLY, ERASE_ALL } ActionType;
-
-public:
- LightApp_ShowHideOp( ActionType );
- ~LightApp_ShowHideOp();
-
-protected:
- virtual void startOperation();
-
-private:
- ActionType myActionType;
-};
-
-#endif
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_Study.h"
-
-#include "CAM_DataModel.h"
-#include "LightApp_Application.h"
-#include "LightApp_DataModel.h"
-#include "LightApp_DataObject.h"
-#include "LightApp_RootObject.h"
-#include "LightApp_HDFDriver.h"
-
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_DataObjectIterator.h"
-
-#include <OB_Browser.h>
-
-#include <TCollection_AsciiString.hxx>
-
-#include <OSD_Path.hxx>
-#include <OSD_File.hxx>
-#include <OSD_Directory.hxx>
-#include <OSD_Process.hxx>
-#include <OSD_Directory.hxx>
-#include <OSD_Protection.hxx>
-#include <OSD_SingleProtection.hxx>
-#include <OSD_FileIterator.hxx>
-
-#include <set>
-#include <qstring.h>
-
-/*!
- Constructor.
-*/
-LightApp_Study::LightApp_Study( SUIT_Application* app )
-: CAM_Study( app )
-{
- // HDF persistence
- myDriver = new LightApp_HDFDriver();
- //myDriver = new LightApp_Driver();
-}
-
-/*!
- Destructor.
-*/
-LightApp_Study::~LightApp_Study()
-{
-}
-
-/*!
- Create document.
-*/
-void LightApp_Study::createDocument()
-{
- setStudyName( QString( "Study%1" ).arg( LightApp_Application::studyId() ) );
-
- // create myRoot
- setRoot( new LightApp_RootObject( this ) );
-
- CAM_Study::createDocument();
-
- emit created( this );
-}
-
-/*!
- Opens document
-*/
-bool LightApp_Study::openDocument( const QString& theFileName )
-{
- myDriver->ClearDriverContents();
- // create files for models from theFileName
- if( !openStudyData(theFileName))
- return false;
-
- setRoot( new LightApp_RootObject( this ) ); // create myRoot
-
- // update loaded data models: call open() and update() on them.
- ModelList dm_s;
- dataModels( dm_s );
- for ( ModelListIterator it( dm_s ); it.current(); ++it )
- openDataModel( studyName(), it.current() );
- // this will build a SUIT_DataObject-s tree under myRoot member field
- // passing "false" in order NOT to rebuild existing data models' trees - it was done in previous step
- // but tree that corresponds to not-loaded data models will be updated any way.
- ((LightApp_Application*)application())->updateObjectBrowser( false );
-
- bool res = CAM_Study::openDocument( theFileName );
-
- emit opened( this );
- return res;
-}
-
-/*!
- Loads document
-*/
-bool LightApp_Study::loadDocument( const QString& theStudyName )
-{
- myDriver->ClearDriverContents();
- if( !openStudyData(theStudyName))
- return false;
-
- setRoot( new LightApp_RootObject( this ) ); // create myRoot
-
- //SRN: BugID IPAL9021, put there the same code as in a method openDocument
-
- // update loaded data models: call open() and update() on them.
- ModelList dm_s;
- dataModels( dm_s );
-
- for ( ModelListIterator it( dm_s ); it.current(); ++it )
- openDataModel( studyName(), it.current() );
-
- // this will build a SUIT_DataObject-s tree under myRoot member field
- // passing "false" in order NOT to rebuild existing data models' trees - it was done in previous step
- // but tree that corresponds to not-loaded data models will be updated any way.
- ((LightApp_Application*)application())->updateObjectBrowser( false );
-
- bool res = CAM_Study::openDocument( theStudyName );
- emit opened( this );
- //SRN: BugID IPAL9021: End
- return res;
-}
-
-/*!
- Saves document
-*/
-bool LightApp_Study::saveDocumentAs( const QString& theFileName )
-{
- SUIT_ResourceMgr* resMgr = application()->resourceMgr();
- if( !resMgr )
- return false;
-
- ModelList list;
- dataModels( list );
-
- LightApp_DataModel* aModel = (LightApp_DataModel*)list.first();
-
- QStringList listOfFiles;
- bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false );
- for ( ; aModel; aModel = (LightApp_DataModel*)list.next() )
- {
- std::vector<std::string> anOldList = myDriver->GetListOfFiles( aModel->module()->name() );
- listOfFiles.clear();
- aModel->saveAs( theFileName, this, listOfFiles );
- if ( !listOfFiles.isEmpty() )
- saveModuleData(aModel->module()->name(), listOfFiles);
-
- // Remove files if necessary. File is removed if it was in the list of files before
- // saving and it is not contained in the list after saving. This provides correct
- // removing previous temporary files. These files are not removed before saving
- // because they may be required for it.
-
- std::vector<std::string> aNewList = myDriver->GetListOfFiles( aModel->module()->name() );
-
- std::set<std::string> aNewNames;
- std::set<std::string> toRemove;
- int i, n;
- for( i = 0, n = aNewList.size(); i < n; i++ )
- aNewNames.insert( aNewList[ i ] );
- for( i = 0, n = anOldList.size(); i < n; i++ )
- {
- if ( i == 0 ) // directory is always inserted in list
- toRemove.insert( anOldList[ i ] );
- else if ( aNewNames.find( anOldList[ i ] ) == aNewNames.end() )
- toRemove.insert( anOldList[ i ] );
- }
-
- std::vector<std::string> toRemoveList( toRemove.size() );
- std::set<std::string>::iterator anIter;
- for( anIter = toRemove.begin(), i = 0; anIter != toRemove.end(); ++anIter, ++i )
- toRemoveList[ i ] = *anIter;
-
-
- myDriver->RemoveFiles( toRemoveList, isMultiFile );
- }
-
- bool res = saveStudyData(theFileName);
- res = res && CAM_Study::saveDocumentAs( theFileName );
- //SRN: BugID IPAL9377, removed usage of uninitialized variable <res>
- if ( res )
- emit saved( this );
-
- return res;
-}
-
-/*!
- Saves document
-*/
-bool LightApp_Study::saveDocument()
-{
- ModelList list; dataModels( list );
-
- LightApp_DataModel* aModel = (LightApp_DataModel*)list.first();
-
- myDriver->ClearDriverContents();
- QStringList listOfFiles;
- for ( ; aModel; aModel = (LightApp_DataModel*)list.next() ) {
- listOfFiles.clear();
- aModel->save( listOfFiles );
- saveModuleData(aModel->module()->name(), listOfFiles);
- }
-
- bool res = saveStudyData(studyName());
- res = res && CAM_Study::saveDocument();
- if (res)
- emit saved( this );
-
- return res;
-}
-
-/*!
- Closes document
-*/
-void LightApp_Study::closeDocument(bool permanently)
-{
- // Inform everybody that this study is going to close when it's most safe to,
- // i.e. in the very beginning
- emit closed( this );
-
- CAM_Study::closeDocument(permanently);
-
- // Remove temporary files
- myDriver->ClearDriverContents();
-}
-
-/*!
- \return real entry by entry of reference
- \param entry - entry of reference object
-*/
-QString LightApp_Study::referencedToEntry( const QString& entry ) const
-{
- return entry;
-}
-
-/*!
- \return entries of object children
-*/
-void LightApp_Study::children( const QString&, QStringList& ) const
-{
-}
-
-/*!
- \return true if entry corresponds to component
-*/
-bool LightApp_Study::isComponent( const QString& entry ) const
-{
- if( !root() )
- return false;
-
- DataObjectList ch;
- root()->children( ch );
- DataObjectList::const_iterator anIt = ch.begin(), aLast = ch.end();
- for( ; anIt!=aLast; anIt++ )
- {
- LightApp_DataObject* obj = dynamic_cast<LightApp_DataObject*>( *anIt );
- if( obj && obj->entry()==entry )
- return true;
- }
- return false;
-}
-
-/*!
- \return component data type for entry
-*/
-QString LightApp_Study::componentDataType( const QString& entry ) const
-{
- LightApp_DataObject* aCurObj;
- for ( SUIT_DataObjectIterator it( root(), SUIT_DataObjectIterator::DepthLeft ); it.current(); ++it ) {
- aCurObj = dynamic_cast<LightApp_DataObject*>( it.current() );
- if ( aCurObj && aCurObj->entry() == entry ) {
- return aCurObj->componentDataType();
- }
- }
- return "";
-}
-
-/*!
- \return true if study is modified
-*/
-bool LightApp_Study::isModified() const
-{
- bool isAnyChanged = CAM_Study::isModified();
- ModelList list; dataModels( list );
-
- LightApp_DataModel* aModel = 0;
- for ( QPtrListIterator<CAM_DataModel> it( list ); it.current() && !isAnyChanged; ++it ){
- aModel = dynamic_cast<LightApp_DataModel*>( it.current() );
- if ( aModel )
- isAnyChanged = aModel->isModified();
- }
- return isAnyChanged;
-}
-
-/*!
- \return true if data model is saved
-*/
-bool LightApp_Study::isSaved() const
-{
- return CAM_Study::isSaved();
-}
-
-/*!
- Creates SComponent for module, necessary for SalomeApp study
-*/
-void LightApp_Study::addComponent(const CAM_DataModel* dm)
-{
-}
-
-/*!
- Saves list file for module 'theModuleName'
-*/
-void LightApp_Study::saveModuleData(QString theModuleName, QStringList theListOfFiles)
-{
- int aNb = theListOfFiles.count();
- if ( aNb == 0 )
- return;
-
- std::vector<std::string> aListOfFiles ( aNb );
- int anIndex = 0;
- for ( QStringList::Iterator it = theListOfFiles.begin(); it != theListOfFiles.end(); ++it ) {
- if ( (*it).isEmpty() )
- continue;
- aListOfFiles[anIndex] = (*it).latin1();
- anIndex++;
- }
- myDriver->SetListOfFiles(theModuleName, aListOfFiles);
-}
-
-/*!
- Gets list of file for module 'theModuleNam'
-*/
-void LightApp_Study::openModuleData(QString theModuleName, QStringList& theListOfFiles)
-{
- std::vector<std::string> aListOfFiles = myDriver->GetListOfFiles(theModuleName);
- int i, aLength = aListOfFiles.size() - 1;
- if (aLength < 0)
- return;
-
- //Get a temporary directory for saved a file
- theListOfFiles.append(aListOfFiles[0].c_str());
- for(i = 0; i < aLength; i++)
- theListOfFiles.append(aListOfFiles[i+1].c_str());
-}
-
-/*!
- Saves data from study
-*/
-bool LightApp_Study::saveStudyData( const QString& theFileName )
-{
- ModelList list; dataModels( list );
- SUIT_ResourceMgr* resMgr = application()->resourceMgr();
- if( !resMgr )
- return false;
- bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false );
-
- bool aRes = myDriver->SaveDatasInFile(theFileName.latin1(), isMultiFile);
- return aRes;
-}
-
-/*!
- Opens data for study
-*/
-bool LightApp_Study::openStudyData( const QString& theFileName )
-{
- SUIT_ResourceMgr* resMgr = application()->resourceMgr();
- if( !resMgr )
- return false;
- bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false );
-
- bool aRes = myDriver->ReadDatasFromFile(theFileName.latin1(), isMultiFile);
- return aRes;
-}
-
-/*!
- Opens data model
-*/
-bool LightApp_Study::openDataModel( const QString& studyName, CAM_DataModel* dm )
-{
- if (!dm)
- return false;
-
- QStringList listOfFiles;
- openModuleData(dm->module()->name(), listOfFiles);
- if (dm && dm->open(studyName, this, listOfFiles)) {
- // Something has been read -> create data model tree
- LightApp_DataModel* aDM = dynamic_cast<LightApp_DataModel*>( dm );
- if ( aDM )
- aDM->update(NULL, this);
- return true;
- }
- return false;
-}
-
-/*!
- \return temporary directory for saving files of modules
-*/
-std::string LightApp_Study::GetTmpDir (const char* theURL,
- const bool isMultiFile)
-{
- return myDriver->GetTmpDir(theURL, isMultiFile);
-}
-
-/*!
- \return list of files necessary for module
- \param theModuleName - name of module
-*/
-std::vector<std::string> LightApp_Study::GetListOfFiles(const char* theModuleName) const
-{
- std::vector<std::string> aListOfFiles;
- aListOfFiles = myDriver->GetListOfFiles(theModuleName);
- return aListOfFiles;
-}
-
-/*!
- Sets list of files necessary for module
- \param theModuleName - name of module
- \param theListOfFiles - list of files
-*/
-void LightApp_Study::SetListOfFiles (const char* theModuleName, const std::vector<std::string> theListOfFiles)
-{
- myDriver->SetListOfFiles(theModuleName, theListOfFiles);
-}
-
-/*!
- Removes temporary files
-*/
-void LightApp_Study::RemoveTemporaryFiles (const char* theModuleName, const bool isMultiFile) const
-{
- if (isMultiFile)
- return;
- bool isDirDeleted = true;
- myDriver->RemoveTemporaryFiles(theModuleName, isDirDeleted);
-}
-
-/*!
- Fills list with components names
- \param comp - list to be filled
-*/
-void LightApp_Study::components( QStringList& comp ) const
-{
- DataObjectList children = root()->children();
- DataObjectList::const_iterator anIt = children.begin(), aLast = children.end();
- for( ; anIt!=aLast; anIt++ )
- {
- LightApp_DataObject* obj = dynamic_cast<LightApp_DataObject*>( *anIt );
- if( obj && obj->entry()!="Interface Applicative" )
- comp.append( obj->entry() );
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_STUDY_H
-#define LIGHTAPP_STUDY_H
-
-#include <LightApp.h>
-#include <LightApp_Driver.h>
-
-#include <CAM_Study.h>
-#include <CAM_DataModel.h>
-#include <SUIT_Study.h>
-
-#include "string"
-#include "vector"
-
-class SUIT_Application;
-class CAM_DataModel;
-
-/*!
- Custom study, using for open/close of documents HDF format.
- Data of each module can be saved to different files, those
- after that are combined into one HDF file
-*/
-class LIGHTAPP_EXPORT LightApp_Study : public CAM_Study
-{
- Q_OBJECT
-
-public:
- LightApp_Study( SUIT_Application* );
- virtual ~LightApp_Study();
-
- virtual void createDocument();
- virtual bool openDocument( const QString& );
- virtual bool loadDocument( const QString& );
-
- virtual bool saveDocument();
- virtual bool saveDocumentAs( const QString& );
-
- virtual void closeDocument(bool permanently = true);
-
- virtual bool isSaved() const;
- virtual bool isModified() const;
-
- virtual void addComponent ( const CAM_DataModel* dm);
-
- virtual std::string GetTmpDir ( const char* theURL, const bool isMultiFile );
-
- virtual QString componentDataType( const QString& ) const;
- virtual QString referencedToEntry( const QString& ) const;
- virtual bool isComponent( const QString& ) const;
- virtual void children( const QString&, QStringList& ) const;
- virtual void components( QStringList& ) const;
-
-protected:
- virtual void saveModuleData ( QString theModuleName, QStringList theListOfFiles );
- virtual void openModuleData ( QString theModuleName, QStringList& theListOfFiles );
- virtual bool saveStudyData ( const QString& theFileName );
- virtual bool openStudyData ( const QString& theFileName );
-
- virtual std::vector<std::string> GetListOfFiles ( const char* theModuleName ) const;
- virtual void SetListOfFiles ( const char* theModuleName,
- const std::vector<std::string> theListOfFiles );
-
- virtual void RemoveTemporaryFiles ( const char* theModuleName, const bool isMultiFile ) const;
-
-protected:
- virtual bool openDataModel ( const QString&, CAM_DataModel* );
-
-signals:
- void saved ( SUIT_Study* );
- void opened ( SUIT_Study* );
- void closed ( SUIT_Study* );
- void created( SUIT_Study* );
-
-
-private:
- LightApp_Driver* myDriver;
-
- friend class LightApp_Application;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_SwitchOp.h"
-#include "LightApp_Module.h"
-#include "LightApp_Operation.h"
-#include "LightApp_Dialog.h"
-#include <CAM_Application.h>
-#include <SUIT_Operation.h>
-#include <SUIT_Study.h>
-#include <qevent.h>
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qapplication.h>
-
-/*!
- * \brief Constructor
- * \param theParent - parent of object
-*
-* Creates instance of the object. Connects signals and slots. Install eveny filter
-* on application
-*/
-LightApp_SwitchOp::LightApp_SwitchOp( LightApp_Module* theModule )
-: QObject( 0 ),
- myModule( theModule )
-{
- qApp->installEventFilter( this );
-}
-
-/*!
- * \brief Destructor
-*/
-LightApp_SwitchOp::~LightApp_SwitchOp()
-{
-
-}
-
-/*!
- * \brief Get module
-*
-* Get module. Module is a parent of this class
-*/
-LightApp_Module* LightApp_SwitchOp::module() const
-{
- return myModule;
-}
-
-/*!
- * \brief Get study
- * \return Active study of application (in current realisation)
-*
-* Get study
-*/
-SUIT_Study* LightApp_SwitchOp::study() const
-{
- return module()->application()->activeStudy();
-}
-
-/*!
- * \brief Get operation by widget
- * \param theWg - key widget to find operation
- * \return Pointer to the operations if it is found or zero
-*
-* Find operation containing dialog with given widget
-*/
-LightApp_Operation* LightApp_SwitchOp::operation( QWidget* theWg ) const
-{
- // get dialog from widget
- LightApp_Dialog* aDlg = 0;
- QWidget* aParent = theWg;
- while( aParent && !aParent->inherits( "LightApp_Dialog" ) )
- aParent = aParent->parentWidget();
-
- if ( aParent && aParent->inherits( "LightApp_Dialog" ) )
- aDlg = (LightApp_Dialog*)aParent;
-
- // try to find operation corresponding to the dialog
- if ( aDlg != 0 && study() != 0 )
- {
- QPtrListIterator<SUIT_Operation> anIter( study()->operations() );
- while( SUIT_Operation* anOp = anIter.current() )
- {
- if ( anOp->inherits( "LightApp_Operation" ) &&
- ((LightApp_Operation*)anOp)->dlg() == aDlg )
- return ((LightApp_Operation*)anOp);
- ++anIter;
- }
- }
-
- return 0;
-}
-
-/*!
- * \brief Event filter
- * \param theObj - object
- * \param theEv - event
-*
-* Event filter. Catched signals off application. If event concerns to dialog then
-* corresponding operation is found and activated.
-*/
-bool LightApp_SwitchOp::eventFilter( QObject* theObj, QEvent* theEv )
-{
- if ( theObj->inherits( "QWidget" ) && ( theEv->type() == QEvent::Enter ) )
- {
- QEvent::Type aType = theEv->type();
- LightApp_Operation* anOp = operation( (QWidget*)theObj );
- if ( anOp )
- {
- switch ( aType )
- {
- case QEvent::Enter:
- {
- if ( !anOp->isActive() && anOp->isAutoResumed() &&
- study() && !study()->blockingOperation( anOp ) )
- study()->resume( anOp );
- }
- break;
-
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- {
- if ( !anOp->isActive() )
- return true;
- }
- break;
-
- }
- }
- }
-
- return QObject::eventFilter( theObj, theEv );
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LightApp_SwitchOp_H
-#define LightApp_SwitchOp_H
-
-#include "LightApp.h"
-#include <qobject.h>
-
-class LightApp_Module;
-class LightApp_Operation;
-class QEvent;
-class SUIT_Study;
-
-/*!
- * \brief This class is intended for controling switching between operation
- *
- * Several operation may be launched simultaneously. This class is intended for
- * controlling switching between such operations. This class works with operations having
- * dialogs (activation of other operations is performed by SUIT_Study). When several
- * operations is launched simultaneously corresponding dialogs are shown on the screen.
- * Only one operation from the launched ones can be active (active operation). Other
- * operations are suspended. As result only one dialog from shown ones can be active too.
- * Other dialogs are disabled. This class installs event filter on application. When mouse
- * cursor is moved above disabled dialog corresponding event is catched by this class.
- * It finds corresponding operation and verify whether operation can be resumed (see
- * SUIT_Study::isDenied( SUIT_Operation* ) method). If yes then current active
- * operation is suspended and new operation activated. Module contains this class as a
- * field. Then module is created instance of this class created too.
- */
-class LIGHTAPP_EXPORT LightApp_SwitchOp : public QObject
-{
- Q_OBJECT
-
-public:
-
- LightApp_SwitchOp( LightApp_Module* );
- virtual ~LightApp_SwitchOp();
-
- // Redefined from base class
- bool eventFilter( QObject*, QEvent* );
-
-private:
-
- LightApp_Module* module() const;
- LightApp_Operation* operation( QWidget* ) const;
- SUIT_Study* study() const;
-
-private:
-
- LightApp_Module* myModule;
-
-};
-
-#endif
-
-
-
-
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : LightApp_UpdateFlags.h
-// Author : Sergey LITONIN
-// Module : LIGHT
-
-
-#ifndef LightApp_UpdateFlags_H
-#define LightApp_UpdateFlags_H
-
-/*!
- \enum UpdateFlags
- Enumeration for update flags. First byte is reserved for LightApp_Module.
- Modules derived from this model must use other 3 bytes to define their
- own update flags
-*/
-
-typedef enum
-{
- UF_Forced = 0x00000001,
- UF_Model = 0x00000002,
- UF_Viewer = 0x00000004,
- UF_ObjBrowser = 0x00000008,
- UF_Controls = 0x00000010,
-} UpdateFlags;
-
-#endif
-
-
-
-
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_VTKSelector.h"
-#include "LightApp_DataOwner.h"
-
-#ifndef DISABLE_VTKVIEWER
- #include "SVTK_ViewModelBase.h"
- #include "SVTK_ViewManager.h"
- #include "SVTK_Selector.h"
- #include "SVTK_ViewWindow.h"
- #include "SVTK_Functor.h"
- #include "VTKViewer_Algorithm.h"
- #include <vtkRenderer.h>
-#endif
-
-#ifndef DISABLE_SALOMEOBJECT
- #include "SALOME_Actor.h"
- #include "SALOME_ListIteratorOfListIO.hxx"
-#endif
-
-
-
-#ifndef DISABLE_VTKVIEWER
-#ifndef DISABLE_SALOMEOBJECT
-/*!
- Constructor.
-*/
-LightApp_SVTKDataOwner::LightApp_SVTKDataOwner( const Handle(SALOME_InteractiveObject)& theIO,
- SUIT_Desktop* theDesktop )
-: LightApp_DataOwner( theIO ),
-myDesktop( theDesktop )
-{
-}
-#else
-LightApp_SVTKDataOwner::LightApp_SVTKDataOwner( const QString& theEntry )
-: LightApp_DataOwner( theEntry )
-{
-}
-#endif
-
-/*!
- \return active SVTK view window
-*/
-SVTK_ViewWindow*
-LightApp_SVTKDataOwner
-::GetActiveViewWindow() const
-{
- if(SUIT_ViewWindow* aViewWindow = myDesktop->activeWindow())
- return dynamic_cast<SVTK_ViewWindow*>(aViewWindow);
-
- return NULL;
-}
-
-/*!
- Gets dataowners ids list.
-*/
-const TColStd_IndexedMapOfInteger&
-LightApp_SVTKDataOwner
-::GetIds() const
-{
- if(SVTK_ViewWindow* aViewWindow = GetActiveViewWindow()){
- if(SVTK_Selector* aSelector = aViewWindow->GetSelector()){
- aSelector->GetIndex(IO(),myIds);
- }
- }
-
- return myIds;
-}
-
-/*!
- Gets selection mode.
-*/
-Selection_Mode
-LightApp_SVTKDataOwner
-::GetMode() const
-{
- if(SVTK_ViewWindow* aViewWindow = GetActiveViewWindow()){
- if(SVTK_Selector* aSelector = aViewWindow->GetSelector()){
- return aSelector->SelectionMode();
- }
- }
-
- return -1;
-}
-
-/*!
- Gets actor pointer.
-*/
-SALOME_Actor*
-LightApp_SVTKDataOwner
-::GetActor() const
-{
- if(SVTK_ViewWindow* aViewWindow = GetActiveViewWindow()){
- using namespace SVTK;
- return Find<SALOME_Actor>(aViewWindow->getRenderer()->GetActors(),TIsSameIObject<SALOME_Actor>(IO()));
- }
-
- return NULL;
-}
-
-#endif
-
-/*!
- Destuctor.
-*/
-/*
-LightApp_SVTKDataOwner::~LightApp_SVTKDataOwner()
-{
-}
-*/
-
-#ifndef DISABLE_VTKVIEWER
-/*!
- Constructor.
-*/
-LightApp_VTKSelector
-::LightApp_VTKSelector( SVTK_ViewModelBase* viewer,
- SUIT_SelectionMgr* mgr ):
- SUIT_Selector( mgr, viewer ),
- myViewer( viewer )
-{
- if ( myViewer )
- connect( myViewer, SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
-}
-
-/*!
- Gets viewer.
-*/
-SVTK_ViewModelBase*
-LightApp_VTKSelector
-::viewer() const
-{
- return myViewer;
-}
-
-/*!
- Gets type of salome vtk viewer.
-*/
-QString
-LightApp_VTKSelector
-::type() const
-{
- return myViewer->getType();
-}
-
-#endif
-/*!
- On selection changed.
-*/
-void
-LightApp_VTKSelector
-::onSelectionChanged()
-{
- selectionChanged();
-}
-
-#ifndef DISABLE_VTKVIEWER
-
-/*!
- Gets list of selected data owners.(output \a aList).
-*/
-void
-LightApp_VTKSelector
-::getSelection( SUIT_DataOwnerPtrList& aList ) const
-{
- if(myViewer){
- if(SUIT_ViewManager* aViewManager = myViewer->getViewManager()){
- if(SVTK_ViewManager* aViewMgr = dynamic_cast<SVTK_ViewManager*>(aViewManager)){
- if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewMgr->getActiveView())){
- if(SVTK_Selector* aSelector = aView->GetSelector()){
- const SALOME_ListIO& aListIO = aSelector->StoredIObjects();
- SALOME_ListIteratorOfListIO anIter(aListIO);
- for(; anIter.More(); anIter.Next()){
- Handle(SALOME_InteractiveObject) anIO = anIter.Value();
- if(anIO->hasEntry())
- aList.append(new LightApp_SVTKDataOwner(anIO,aViewMgr->getDesktop()));
- }
- }
- }
- }
- }
- }
-}
-
-/*!
- Sets selection to selector from data owner list \a theList.
-*/
-void
-LightApp_VTKSelector
-::setSelection( const SUIT_DataOwnerPtrList& theList )
-{
- if(myViewer){
- if(SUIT_ViewManager* aViewMgr = myViewer->getViewManager()){
- if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewMgr->getActiveView())){
- if(SVTK_Selector* aSelector = aView->GetSelector()){
- SALOME_ListIO anAppendList;
- const SALOME_ListIO& aStoredList = aSelector->StoredIObjects();
- SUIT_DataOwnerPtrList::const_iterator anIter = theList.begin();
- for(; anIter != theList.end(); ++anIter){
- const SUIT_DataOwner* aDataOwner = (*anIter).get();
- if(const LightApp_SVTKDataOwner* anOwner = dynamic_cast<const LightApp_SVTKDataOwner*>(aDataOwner)){
- aSelector->SetSelectionMode(anOwner->GetMode());
- Handle(SALOME_InteractiveObject) anIO = anOwner->IO();
-
- aSelector->AddIObject(anIO);
-
- anAppendList.Append(anIO);
- aSelector->AddOrRemoveIndex(anIO,anOwner->GetIds(),false);
- }else if(const LightApp_DataOwner* anOwner = dynamic_cast<const LightApp_DataOwner*>(aDataOwner)){
- Handle(SALOME_InteractiveObject) anIO =
- new SALOME_InteractiveObject(anOwner->entry().latin1(),"");
- aSelector->AddIObject(anIO);
- anAppendList.Append(anIO);
- }
- }
- // To remove IOs, which is not selected.
- QMap< QString, Handle( SALOME_InteractiveObject )> toRemove;
- SALOME_ListIteratorOfListIO anIt( aStoredList );
- for( ; anIt.More(); anIt.Next() )
- if( !anIt.Value().IsNull() )
- toRemove[ anIt.Value()->getEntry() ] = anIt.Value();
-
- anIt = SALOME_ListIteratorOfListIO(anAppendList);
- for( ; anIt.More(); anIt.Next() )
- toRemove.remove( anIt.Value()->getEntry() );
-
- QMap< QString, Handle( SALOME_InteractiveObject )>::const_iterator RIt = toRemove.begin(),
- REnd = toRemove.end();
- for( ; RIt!=REnd; RIt++ )
- aSelector->RemoveIObject( RIt.data() );
-
- aView->onSelectionChanged();
- }
- }
- }
- }
-}
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_VTKSELECTOR_H
-#define LIGHTAPP_VTKSELECTOR_H
-
-#include "SUIT_Selector.h"
-#include "LightApp.h"
-#include "LightApp_DataOwner.h"
-
-class SUIT_Desktop;
-
-#ifndef DISABLE_VTKVIEWER
- #include <vtkSmartPointer.h>
- #include <TColStd_IndexedMapOfInteger.hxx>
- #include "SVTK_Selection.h"
-#ifndef DISABLE_SALOMEOBJECT
- #include "SALOME_InteractiveObject.hxx"
-#endif
- class SALOME_Actor;
- class SVTK_ViewWindow;
- class SVTK_ViewModelBase;
-#endif
-
-/*!
- Provide salome vtk data owner list.
-*/
-class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner
-{
- public:
- virtual ~LightApp_SVTKDataOwner() {};
-#ifndef DISABLE_VTKVIEWER
- #ifndef DISABLE_SALOMEOBJECT
- LightApp_SVTKDataOwner( const Handle(SALOME_InteractiveObject)&, SUIT_Desktop* );
- #else
- LightApp_SVTKDataOwner( const QString& );
- #endif
-
- /*!Gets dataowners ids list.*/
- const TColStd_IndexedMapOfInteger& GetIds() const;
-
- /*!Gets selection mode.*/
- Selection_Mode GetMode() const;
-
- /*!Finds corresponding actor in the active viewer.*/
- SALOME_Actor* GetActor() const;
-
- protected:
- mutable TColStd_IndexedMapOfInteger myIds;
-
- SVTK_ViewWindow* GetActiveViewWindow() const;
- SUIT_Desktop* myDesktop;
-#endif
-};
-
-
-/*!
- \class LightApp_VTKSelector
- Custom selector to get/set selection from object browser
-*/
-class LIGHTAPP_EXPORT LightApp_VTKSelector : public SUIT_Selector
-{
- Q_OBJECT;
-
-public:
- virtual ~LightApp_VTKSelector() {};
-#ifndef DISABLE_VTKVIEWER
- LightApp_VTKSelector( SVTK_ViewModelBase*, SUIT_SelectionMgr* );
-
- SVTK_ViewModelBase* viewer() const;
-
- virtual QString type() const;
-#else
- LightApp_VTKSelector( SUIT_SelectionMgr* );
-#endif
-
-private slots:
- void onSelectionChanged();
-
-#ifndef DISABLE_VTKVIEWER
-protected:
- virtual void getSelection( SUIT_DataOwnerPtrList& ) const;
- virtual void setSelection( const SUIT_DataOwnerPtrList& );
-
-private:
- SVTK_ViewModelBase* myViewer;
-
-#endif
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "LightApp_WidgetContainer.h"
-
-#include <qobjectlist.h>
-#include <qwidgetstack.h>
-
-/*!
- Constructor.
-*/
-LightApp_WidgetContainer::LightApp_WidgetContainer( const int type, QWidget* parent )
-: QDockWindow( QDockWindow::InDock, parent ),
-myType( type )
-{
- setWidget( myStack = new QWidgetStack( this ) );
- myStack->show();
-}
-
-/*!
- Destructor.
-*/
-LightApp_WidgetContainer::~LightApp_WidgetContainer()
-{
-}
-
-/*!
- Checks: is widget container is empty?
-*/
-bool LightApp_WidgetContainer::isEmpty() const
-{
- const QObjectList* lst = myStack->children();
- if ( !lst )
- return true;
-
- bool res = true;
- for ( QObjectListIt it( *lst ); it.current() && res; ++it )
- {
- if ( it.current()->isWidgetType() && myStack->id( (QWidget*)it.current() ) != -1 )
- res = false;
- }
- return res;
-}
-
-/*!
- Gets type of widget container.
-*/
-int LightApp_WidgetContainer::type() const
-{
- return myType;
-}
-
-/*!
- Checks: is container contains widget with id \a id.
-*/
-bool LightApp_WidgetContainer::contains( const int id ) const
-{
- return myStack->widget( id ) != 0;
-}
-
-/*!
- * Insert widget(\a wid with id \a id) to container.And return id of widget in stack.
- *\warning remove widget with id = \a id , if it was in container.
- */
-int LightApp_WidgetContainer::insert( const int id, QWidget* wid )
-{
- if ( id == -1 || !wid )
- return -1;
-
- if ( contains( id ) )
- remove( id );
-
- int stackId = myStack->addWidget( wid, id );
- if ( !myStack->visibleWidget() )
- myStack->raiseWidget( wid );
-
- setCaption( myStack->visibleWidget() ? myStack->visibleWidget()->caption() : QString::null );
-
- return stackId;
-}
-
-/*!
- Remove widget(\a wid) from stack.
-*/
-void LightApp_WidgetContainer::remove( const int id )
-{
- remove( myStack->widget( id ) );
-
- setCaption( myStack->visibleWidget() ? myStack->visibleWidget()->caption() : QString::null );
-}
-
-/*!
- Remove widget(\a wid) from stack.
-*/
-void LightApp_WidgetContainer::remove( QWidget* wid )
-{
- myStack->removeWidget( wid );
-
- setCaption( myStack->visibleWidget() ? myStack->visibleWidget()->caption() : QString::null );
-}
-
-/*!
- Raise widget with id = \a id.
-*/
-void LightApp_WidgetContainer::activate( const int id )
-{
- myStack->raiseWidget( id );
-
- setCaption( myStack->visibleWidget() ? myStack->visibleWidget()->caption() : QString::null );
-}
-
-/*!
- Raise widget (\a wid).
-*/
-void LightApp_WidgetContainer::activate( QWidget* wid )
-{
- myStack->raiseWidget( wid );
-
- setCaption( myStack->visibleWidget() ? myStack->visibleWidget()->caption() : QString::null );
-}
-
-/*!
- Gets widget from container list(stack) by id = \a id.
-*/
-QWidget* LightApp_WidgetContainer::widget( const int id ) const
-{
- return myStack->widget( id );
-}
-
-/*!
- Gets visible widget.
-*/
-QWidget* LightApp_WidgetContainer::active() const
-{
- return myStack->visibleWidget();
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 LIGHTAPP_WIDGETCONTAINER_H
-#define LIGHTAPP_WIDGETCONTAINER_H
-
-#include "LightApp.h"
-
-#include <qdockwindow.h>
-
-class QWidget;
-class QWidgetStack;
-
-/*!
- Class which privade widget container.
-*/
-class LIGHTAPP_EXPORT LightApp_WidgetContainer : public QDockWindow
-{
- Q_OBJECT
-
-public:
- LightApp_WidgetContainer( const int, QWidget* = 0 );
- virtual ~LightApp_WidgetContainer();
-
- bool isEmpty() const;
-
- int type() const;
-
- int insert( const int, QWidget* );
- void remove( QWidget* );
- void remove( const int );
- bool contains( const int ) const;
-
- void activate( QWidget* );
- void activate( const int );
-
- QWidget* active() const;
- QWidget* widget( const int ) const;
-
-private:
- int myType;
- QWidgetStack* myStack;
-};
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : OCC team (OCN)
-# Module : LightApp
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libLightApp.la
-
-salomeinclude_HEADERS= \
- LightApp.h \
- LightApp_AboutDlg.h \
- LightApp_Application.h \
- LightApp_DataModel.h \
- LightApp_DataObject.h \
- LightApp_DataOwner.h \
- LightApp_DataSubOwner.h \
- LightApp_Dialog.h \
- LightApp_Displayer.h \
- LightApp_Driver.h \
- LightApp_EventFilter.h \
- LightApp_HDFDriver.h \
- LightApp_Module.h \
- LightApp_ModuleDlg.h \
- LightApp_NameDlg.h \
- LightApp_OBFilter.h \
- LightApp_OBSelector.h \
- LightApp_Operation.h \
- LightApp_Selection.h \
- LightApp_SelectionMgr.h \
- LightApp_ShowHideOp.h \
- LightApp_Study.h \
- LightApp_SwitchOp.h \
- LightApp_Preferences.h \
- LightApp_PreferencesDlg.h \
- LightApp_RootObject.h \
- LightApp_UpdateFlags.h \
- LightApp_WidgetContainer.h
-
-if ENABLE_VTKVIEWER
-if ENABLE_SALOMEOBJECT
- salomeinclude_HEADERS+= LightApp_VTKSelector.h
-endif
-endif
-if ENABLE_OCCVIEWER
- salomeinclude_HEADERS+= LightApp_OCCSelector.h
-endif
-if ENABLE_GLVIEWER
- salomeinclude_HEADERS+= LightApp_GLSelector.h
-endif
-
-dist_libLightApp_la_SOURCES= \
- LightApp_AboutDlg.cxx \
- LightApp_Application.cxx \
- LightApp_DataModel.cxx \
- LightApp_DataObject.cxx \
- LightApp_DataOwner.cxx \
- LightApp_DataSubOwner.cxx \
- LightApp_Dialog.cxx \
- LightApp_Displayer.cxx \
- LightApp_Driver.cxx \
- LightApp_EventFilter.cxx \
- LightApp_HDFDriver.cxx \
- LightApp_Module.cxx \
- LightApp_ModuleDlg.cxx \
- LightApp_NameDlg.cxx \
- LightApp_OBFilter.cxx \
- LightApp_OBSelector.cxx \
- LightApp_Operation.cxx \
- LightApp_Selection.cxx \
- LightApp_SelectionMgr.cxx \
- LightApp_ShowHideOp.cxx \
- LightApp_Study.cxx \
- LightApp_SwitchOp.cxx \
- LightApp_Preferences.cxx \
- LightApp_PreferencesDlg.cxx \
- LightApp_WidgetContainer.cxx
-
-if ENABLE_VTKVIEWER
-if ENABLE_SALOMEOBJECT
- dist_libLightApp_la_SOURCES+= LightApp_VTKSelector.cxx
-endif
-endif
-if ENABLE_OCCVIEWER
- dist_libLightApp_la_SOURCES+= LightApp_OCCSelector.cxx
-endif
-if ENABLE_GLVIEWER
- dist_libLightApp_la_SOURCES+= LightApp_GLSelector.cxx
-endif
-
-MOC_FILES= \
- LightApp_AboutDlg_moc.cxx \
- LightApp_Application_moc.cxx \
- LightApp_DataModel_moc.cxx \
- LightApp_Dialog_moc.cxx \
- LightApp_OBSelector_moc.cxx \
- LightApp_Operation_moc.cxx \
- LightApp_Module_moc.cxx \
- LightApp_ModuleDlg_moc.cxx \
- LightApp_NameDlg_moc.cxx \
- LightApp_SelectionMgr_moc.cxx \
- LightApp_ShowHideOp_moc.cxx \
- LightApp_Study_moc.cxx \
- LightApp_SwitchOp_moc.cxx \
- LightApp_Preferences_moc.cxx \
- LightApp_PreferencesDlg_moc.cxx \
- LightApp_WidgetContainer_moc.cxx
-
-if ENABLE_VTKVIEWER
-if ENABLE_SALOMEOBJECT
- MOC_FILES+= LightApp_VTKSelector_moc.cxx
-endif
-endif
-if ENABLE_OCCVIEWER
- MOC_FILES+= LightApp_OCCSelector_moc.cxx
-endif
-if ENABLE_GLVIEWER
- MOC_FILES+= LightApp_GLSelector_moc.cxx
-endif
-nodist_libLightApp_la_SOURCES= $(MOC_FILES)
-
-dist_salomeres_DATA= \
- resources/icon_about.png \
- resources/icon_applogo.png \
- resources/icon_default.png \
- resources/icon_module.png \
- resources/icon_module_big.png \
- resources/icon_select.png \
- resources/LightApp.ini \
- resources/LightApp.xml
-
-nodist_salomeres_DATA= \
- LightApp_images.qm \
- LightApp_msg_en.qm
-
-libLightApp_la_CPPFLAGS=$(PYTHON_INCLUDES) $(QT_INCLUDES) $(CAS_CPPFLAGS) \
- $(HDF5_INCLUDES) @KERNEL_CXXFLAGS@ -I$(srcdir)/../SUIT -I$(srcdir)/../STD \
- -I$(srcdir)/../CAM -I$(srcdir)/../ObjBrowser -I$(srcdir)/../LogWindow \
- -I$(srcdir)/../Prs -I$(srcdir)/../Qtx
-libLightApp_la_LDFLAGS=$(QT_MT_LIBS)
-
-if ENABLE_VTKVIEWER
- libLightApp_la_CPPFLAGS+= $(VTK_INCLUDES) -I$(srcdir)/../VTKViewer
-else
- libLightApp_la_CPPFLAGS+= -DDISABLE_VTKVIEWER
-endif
-if ENABLE_PLOT2DVIEWER
- libLightApp_la_CPPFLAGS+= $(QWT_INCLUDES) -I$(srcdir)/../Plot2d
-else
- libLightApp_la_CPPFLAGS+= -DDISABLE_PLOT2DVIEWER
-endif
-if ENABLE_OCCVIEWER
- libLightApp_la_CPPFLAGS+= -I$(srcdir)/../OCCViewer
-else !ENABLE_OCCVIEWER
- libLightApp_la_CPPFLAGS+= -DDISABLE_OCCVIEWER
-endif
-if ENABLE_PYCONSOLE
- libLightApp_la_CPPFLAGS+= $(PYTHON_INCLUDES) -I$(srcdir)/../PythonConsole -I$(srcdir)/../PyInterp
- libLightApp_la_LDFLAGS+= $(PYTHON_LIBS)
-else !ENABLE_PYCONSOLE
- libLightApp_la_CPPFLAGS+= -DDISABLE_PYCONSOLE
-endif
-if ENABLE_GLVIEWER
- libLightApp_la_CPPFLAGS+= -I$(srcdir)/../GLViewer
-else !ENABLE_GLVIEWER
- libLightApp_la_CPPFLAGS+= -DDISABLE_GLVIEWER
-endif
-if ENABLE_SUPERVGRAPHVIEWER
- libLightApp_la_CPPFLAGS+= -I$(srcdir)/../SUPERVGraph
-else !ENABLE_SUPERVGRAPHVIEWER
- libLightApp_la_CPPFLAGS+= -DDISABLE_SUPERVGRAPHVIEWER
-endif
-if ENABLE_QXGRAPHVIEWER
- libLightApp_la_CPPFLAGS+= -I$(srcdir)/../QxGraph
-else !ENABLE_QXGRAPHVIEWER
- libLightApp_la_CPPFLAGS+= -DDISABLE_QXGRAPHVIEWER
-endif
-
-if ENABLE_SALOMEOBJECT
-
- libLightApp_la_CPPFLAGS+= -I$(srcdir)/../OBJECT
-if ENABLE_PLOT2DVIEWER
- libLightApp_la_CPPFLAGS+= -I$(srcdir)/../SPlot2d
-endif
-if ENABLE_OCCVIEWER
- libLightApp_la_CPPFLAGS+= -I$(srcdir)/../SOCC
-endif
-if ENABLE_VTKVIEWER
- libLightApp_la_CPPFLAGS+= -I$(srcdir)/../SVTK
-endif
-else !ENABLE_SALOMEOBJECT
- libLightApp_la_CPPFLAGS+= -DDISABLE_SALOMEOBJECT
-
-endif
-
-libLightApp_la_LIBADD= ../SUIT/libsuit.la ../STD/libstd.la ../CAM/libCAM.la \
- ../ObjBrowser/libObjBrowser.la ../LogWindow/libLogWindow.la $(CAS_KERNEL) \
- ../Prs/libSalomePrs.la $(HDF5_LIBS) $(KERNEL_LDFLAGS) -lSalomeHDFPersist
-
-if ENABLE_SALOMEOBJECT
- libLightApp_la_LIBADD+= ../OBJECT/libSalomeObject.la
-endif
-if ENABLE_VTKVIEWER
- libLightApp_la_LIBADD+= ../VTKViewer/libVTKViewer.la
-if ENABLE_SALOMEOBJECT
- libLightApp_la_LIBADD+= ../SVTK/libSVTK.la
-endif
-endif
-if ENABLE_OCCVIEWER
- libLightApp_la_LIBADD+= ../OCCViewer/libOCCViewer.la
-if ENABLE_SALOMEOBJECT
- libLightApp_la_LIBADD+= ../SOCC/libSOCC.la
-endif
-endif
-if ENABLE_GLVIEWER
- libLightApp_la_LIBADD+= ../GLViewer/libGLViewer.la
-endif
-if ENABLE_PLOT2DVIEWER
- libLightApp_la_LIBADD+= ../Plot2d/libPlot2d.la
-if ENABLE_SALOMEOBJECT
- libLightApp_la_LIBADD+= ../SPlot2d/libSPlot2d.la
-endif
-endif
-if ENABLE_PYCONSOLE
- libLightApp_la_LIBADD+= ../PyInterp/libPyInterp.la ../PythonConsole/libPythonConsole.la
-endif
-if ENABLE_SUPERVGRAPHVIEWER
- libLightApp_la_LIBADD+= ../SUPERVGraph/libSUPERVGraph.la
-endif
-if ENABLE_QXGRAPHVIEWER
- libLightApp_la_LIBADD+= ../QxGraph/libQxGraph.la
-endif
+++ /dev/null
-# The resources mapping file for LightApp application
-
-[language]
-language = en
-
-[launch]
-modules = LIGHT
-
-[resources]
-SUIT = $(GUI_ROOT_DIR)/share/salome/resources/gui
-STD = $(GUI_ROOT_DIR)/share/salome/resources/gui
-LightApp = $(GUI_ROOT_DIR)/share/salome/resources/gui
-Plot2d = $(GUI_ROOT_DIR)/share/salome/resources/gui
-GLViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
-OCCViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
-VTKViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
-LIGHT = $(LIGHT_ROOT_DIR)/share/salome/resources/light
-
-[LIGHT]
-name = Light
-icon = LIGHT
+++ /dev/null
-<document>
- <section name="launch">
- <!-- SALOME launching parameters -->
- <parameter name="gui" value="yes"/>
- <parameter name="splash" value="yes"/>
- <parameter name="file" value="no"/>
- <parameter name="key" value="no"/>
- <parameter name="interp" value="no"/>
- <parameter name="modules" value="LIGHT"/>
- </section>
- <section name="language">
- <!-- Language settings (resource manager)-->
- <parameter name="language" value="en"/>
- <parameter name="translators" value="%P_msg_%L.qm|%P_icons.qm|%P_images.qm"/>
- </section>
- <section name="splash" >
- <!-- Splash screen settings -->
- <parameter name="image" value="${GUI_ROOT_DIR}/share/salome/resources/gui/icon_about.png" />
- <parameter name="info" value="%A : %V" />
- <parameter name="text_colors" value="#FFFFFF" />
- <parameter name="margin" value="10" />
- </section>
- <section name="resources">
- <!-- Resource directories (resource manager)-->
- <parameter name="SUIT" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="STD" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="Plot2d" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="SPlot2d" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="GLViewer" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="OCCViewer" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="VTKViewer" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="SalomeApp" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="OB" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="CAM" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="LightApp" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="SVTK" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="ToolsGUI" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="LIGHT" value="${LIGHT_ROOT_DIR}/share/salome/resources/light"/>
- </section>
- <section name="desktop" >
- <!-- Default GUI desktop state, position, size -->
- <parameter name="state" value="normal"/>
- <parameter name="pos_x" value="center"/>
- <parameter name="pos_y" value="center"/>
- <parameter name="width" value="800"/>
- <parameter name="height" value="600"/>
- </section>
- <section name="LIGHT">
- <!-- LIGHT module settings -->
- <parameter name="name" value="Light"/>
- <parameter name="icon" value="LIGHT.png"/>
- </section>
- <section name="PyConsole">
- <!-- Python console preferences -->
- <parameter name="font" value="Helvetic,12" />
- <parameter name="additional_families" value="Helvetic;Helvetica;Helvetica[Adobe];Times;Times[Adobe];Sans Serif;Serif;Monospace;Lucida"/>
- </section>
- <section name="FileDlg">
- <!-- "Open/Save File" dialog box preferences-->
- <parameter name="QuickDirList" value=""/>
- </section>
- <section name="Study">
- <!-- General study settings -->
- <parameter name="store_positions" value="true" />
- </section>
- <section name="OCCViewer" >
- <!-- OCC viewer preferences -->
- <parameter name="background" value="35, 136, 145" />
- <parameter name="iso_number_u" value="1" />
- <parameter name="iso_number_v" value="1" />
- <parameter name="trihedron_size" value="100" />
- </section>
- <section name="VTKViewer" >
- <!-- OCC viewer preferences -->
- <parameter name="background" value="0, 0, 0"/>
- <parameter name="trihedron_size" value="100" />
- </section>
- <section name="Plot2d" >
- <!-- Plot2d viewer preferences -->
- <parameter name="Background" value="255, 255, 255" />
- <parameter name="CurveType" value="1" />
- <parameter name="HorScaleMode" value="0" />
- <parameter name="LegendPos" value="1" />
- <parameter name="MarkerSize" value="9" />
- <parameter name="ShowLegend" value="true" />
- <parameter name="VerScaleMode" value="0" />
- </section>
- <section name="SUPERVGraph" >
- <!-- Supervision viewer preferences -->
- <parameter name="Background" value="144, 208, 211" />
- <parameter name="Title" value="63, 213, 255" />
- </section>
-</document>
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: LightApp_images.po
-// Created: May, 2005
-// Author: OCC team
-// Copyright (C) CEA 2005
-
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n"
-"PO-Revision-Date: YYYY-MM-DD\n"
-"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-msgid "ABOUT"
-msgstr "icon_about.png"
-
-msgid "ABOUT_SPLASH"
-msgstr "icon_about.png"
-
-msgid "APP_DEFAULT_ICO"
-msgstr "icon_default.png"
-
-msgid "APP_MODULE_ICO"
-msgstr "icon_module.png"
-
-msgid "APP_MODULE_BIG_ICO"
-msgstr "icon_module_big.png"
-
-msgid "ICON_SELECT"
-msgstr "icon_select.png"
-
-msgid "APP_BASE_LOGO"
-msgstr "icon_applogo.png"
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# This is a Qt message file in .po format. Each msgid starts with
-# a scope. This scope should *NOT* be translated - eg. "Foo::Bar"
-# would be translated to "Pub", not "Foo::Pub".
-msgid ""
-msgstr ""
-"Project-Id-Version: example-Qt-message-extraction\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 1999-02-23 15:38+0200\n"
-"Last-Translator: \n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-
-//=======================================================================================
-
-msgid "APP_NAME"
-msgstr "SALOME"
-
-msgid "ABOUT_CAPTION"
-msgstr "About %1"
-
-msgid "ABOUT_VERSION"
-msgstr "Version %1"
-
-msgid "ABOUT_COPYRIGHT"
-msgstr "Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6,\nCEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS"
-
-msgid "ABOUT_LICENSE"
-msgstr "GNU LGPL"
-
-//=======================================================================================
-
-msgid "LightApp_Application::ACTIVATING_MODULE"
-msgstr "Trying to activate module \"%1\""
-
-msgid "LightApp_Application::TOT_RENAME"
-msgstr "Rename"
-
-msgid "LightApp_Application::MEN_DESK_RENAME"
-msgstr "&Rename"
-
-msgid "LightApp_Application::PRP_RENAME"
-msgstr "Rename active window"
-
-msgid "LightApp_Application::TOT_DESK_PREFERENCES"
-msgstr "Preferences"
-
-msgid "LightApp_Application::MEN_DESK_PREFERENCES"
-msgstr "Pre&ferences..."
-
-msgid "LightApp_Application::TOT_DESK_MRU"
-msgstr "Most recently used"
-
-msgid "LightApp_Application::MEN_DESK_MRU"
-msgstr "Most recently used"
-
-msgid "LightApp_Application::PRP_DESK_PREFERENCES"
-msgstr "Allow to change the preferences"
-
-msgid "LightApp_Application::INF_TOOLBAR_MODULES"
-msgstr "Modules"
-
-msgid "LightApp_Application::PRP_APP_MODULE"
-msgstr "Switch to SALOME platform neutral point"
-
-msgid "LightApp_Application::PRP_MODULE"
-msgstr "Switch to the module \"%1\""
-
-msgid "LightApp_Application::NEW_WINDOW_0"
-msgstr "&GL view"
-
-msgid "LightApp_Application::NEW_WINDOW_1"
-msgstr "&Plot2d view"
-
-msgid "LightApp_Application::NEW_WINDOW_2"
-msgstr "&OCC view"
-
-msgid "LightApp_Application::NEW_WINDOW_3"
-msgstr "VT&K view"
-
-msgid "LightApp_Application::NEW_WINDOW_4"
-msgstr "&QxGraph view"
-
-msgid "LightApp_Application::INF_CANCELLED"
-msgstr "Module activation cancelled"
-
-msgid "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"
-msgstr "External browser \"%1\" can not show help page \"%2\". Do you want to change it in preferences?"
-
-msgid "LightApp_Application::DEFINE_EXTERNAL_BROWSER"
-msgstr "External browser is not found. Do you want to define it in preferences?"
-
-msgid "LightApp_Application::DATA_MODELS"
-msgstr "Data models"
-
-msgid "LightApp_Application::OBJECT_BROWSER"
-msgstr "Object Browser"
-
-msgid "LightApp_Application::OBJ_BROWSER_NAME"
-msgstr "Object"
-
-msgid "LightApp_Application::LOG_WINDOW"
-msgstr "Message Window"
-
-//=======================================================================================
-
-msgid "LightApp_Application::MEN_DESK_MODULE_HELP"
-msgstr "Module help"
-
-//=======================================================================================
-
-msgid "LightApp_Application::PREFERENCES_NOT_LOADED"
-msgstr "Preferences for module \"<b>%1</b>\" will be available when the module will be loaded"
-
-msgid "LightApp_Application::PREF_CATEGORY_SALOME"
-msgstr "SALOME"
-
-msgid "LightApp_Application::PREF_TAB_GENERAL"
-msgstr "General"
-
-msgid "LightApp_Application::PREF_GROUP_STUDY"
-msgstr "Study properties"
-
-msgid "LightApp_Application::PREF_MULTI_FILE"
-msgstr "Multi file save"
-
-msgid "LightApp_Application::PREF_ASCII_FILE"
-msgstr "ASCII save"
-
-msgid "LightApp_Application::PREF_STORE_POS"
-msgstr "Store positions of windows"
-
-msgid "LightApp_Application::PREF_GROUP_EXT_BROWSER"
-msgstr "External browser"
-
-msgid "LightApp_Application::PREF_APP"
-msgstr "Application"
-
-msgid "LightApp_Application::PREF_PARAM"
-msgstr "Parameters"
-
-msgid "LightApp_Application::PREF_GROUP_PY_CONSOLE"
-msgstr "Python console properties"
-
-msgid "LightApp_Application::PREF_FONT"
-msgstr "Font"
-
-msgid "LightApp_Application::PREF_TAB_OBJBROWSER"
-msgstr "Object browser"
-
-msgid "LightApp_Application::PREF_OBJ_BROWSER_SETTINGS"
-msgstr "Object browser settings"
-
-msgid "LightApp_Application::PREF_GROUP_DEF_COLUMNS"
-msgstr "Default columns"
-
-msgid "LightApp_Application::PREF_TAB_VIEWERS"
-msgstr "Viewers"
-
-msgid "LightApp_Application::PREF_GROUP_OCCVIEWER"
-msgstr "OCC Viewer 3d"
-
-msgid "LightApp_Application::PREF_GROUP_VTKVIEWER"
-msgstr "VTK Viewer 3d"
-
-msgid "LightApp_Application::PREF_VIEWER_BACKGROUND"
-msgstr "Background color"
-
-msgid "LightApp_Application::PREF_TRIHEDRON_SIZE"
-msgstr "Trihedron size"
-
-msgid "LightApp_Application::PREF_RELATIVE_SIZE"
-msgstr "Relative size"
-
-msgid "LightApp_Application::PREF_ISOS_U"
-msgstr "Number of isolines along U"
-msgid "LightApp_Application::PREF_ISOS_V"
-msgstr "Number of isolines along V"
-
-msgid "LightApp_Application::PREF_TRIHEDRON_SHOW"
-msgstr "Show trihedron"
-
-msgid "LightApp_Application::PREF_GROUP_PLOT2DVIEWER"
-msgstr "Plot2d Viewer"
-
-msgid "LightApp_Application::PREF_SHOW_LEGEND"
-msgstr "Show legend"
-
-msgid "LightApp_Application::PREF_LEGEND_POSITION"
-msgstr "Legend position:"
-
-msgid "LightApp_Application::PREF_LEFT"
-msgstr "Left"
-
-msgid "LightApp_Application::PREF_RIGHT"
-msgstr "Right"
-
-msgid "LightApp_Application::PREF_TOP"
-msgstr "Top"
-
-msgid "LightApp_Application::PREF_BOTTOM"
-msgstr "Bottom"
-
-msgid "LightApp_Application::PREF_CURVE_TYPE"
-msgstr "Curve type:"
-
-msgid "LightApp_Application::PREF_POINTS"
-msgstr "Points"
-
-msgid "LightApp_Application::PREF_LINES"
-msgstr "Lines"
-
-msgid "LightApp_Application::PREF_SPLINE"
-msgstr "Spline"
-
-msgid "LightApp_Application::PREF_MARKER_SIZE"
-msgstr "Marker size:"
-
-msgid "LightApp_Application::PREF_LINEAR"
-msgstr "Linear"
-
-msgid "LightApp_Application::PREF_LOGARITHMIC"
-msgstr "Logarithmic"
-
-msgid "LightApp_Application::PREF_HOR_AXIS_SCALE"
-msgstr "Horizontal axis scale:"
-
-msgid "LightApp_Application::PREF_VERT_AXIS_SCALE"
-msgstr "Vertical axis scale:"
-
-msgid "LightApp_Application::PREF_TAB_DIRECTORIES"
-msgstr "Directories"
-
-msgid "LightApp_Application::PREF_GROUP_DIRECTORIES"
-msgstr "Quick directory list"
-
-msgid "LightApp_Application::MEN_REFRESH"
-msgstr "Refresh"
-
-msgid "LightApp_Application::MEN_FIND"
-msgstr "Find"
-
-msgid "LightApp_Application::PREF_GROUP_SUPERV"
-msgstr "Graph Supervisor"
-
-msgid "LightApp_Application::PREF_SUPERV_TITLE_COLOR"
-msgstr "Title color"
-
-msgid "LightApp_Application::PREF_SUPERV_CTRL_COLOR"
-msgstr "Ctrl color"
-
-msgid "LightApp_Application::PREF_AUTO_SIZE"
-msgstr "Auto size for other columns"
-
-msgid "LightApp_Application::PREF_AUTO_SIZE_FIRST"
-msgstr "Auto size for first column"
-
-//=======================================================================================
-
-msgid "LightApp_PreferencesDlg::CAPTION"
-msgstr "Preferences"
-
-msgid "LightApp_PreferencesDlg::DEFAULT_BTN_TEXT"
-msgstr "Defaults"
-
-msgid "LightApp_PreferencesDlg::WARNING"
-msgstr "Warning"
-
-msgid "LightApp_PreferencesDlg::DEFAULT_QUESTION"
-msgstr "Do you want to retrieve default preferences?"
-
-msgid "LightApp_PreferencesDlg::IMPORT_PREFERENCES"
-msgstr "Import preferences"
-
-msgid "LightApp_PreferencesDlg::IMPORT_BTN_TEXT"
-msgstr "Import"
-
-//=======================================================================================
-
-msgid "LightApp_Module::TOP_SHOW"
-msgstr "Show"
-
-msgid "LightApp_Module::MEN_SHOW"
-msgstr "Show"
-
-msgid "LightApp_Module::STB_SHOW"
-msgstr "Show"
-
-msgid "LightApp_Module::TOP_HIDE"
-msgstr "Hide"
-
-msgid "LightApp_Module::MEN_HIDE"
-msgstr "Hide"
-
-msgid "LightApp_Module::STB_HIDE"
-msgstr "Hide"
-
-msgid "LightApp_Module::TOP_DISPLAY_ONLY"
-msgstr "Show only"
-
-msgid "LightApp_Module::MEN_DISPLAY_ONLY"
-msgstr "Show only"
-
-msgid "LightApp_Module::STB_DISPLAY_ONLY"
-msgstr "Show only"
-
-msgid "LightApp_Module::TOP_ERASE_ALL"
-msgstr "Hide all"
-
-msgid "LightApp_Module::MEN_ERASE_ALL"
-msgstr "Hide all"
-
-msgid "LightApp_Module::STB_ERASE_ALL"
-msgstr "Hide all"
-//=======================================================================================
-
-
-msgid "LightApp_ModuleDlg::CAPTION"
-msgstr "Activate module"
-
-msgid "LightApp_ModuleDlg::DESCRIPTION"
-msgstr "You're activating module <b>%1</b>.<br>Please, select required action by pressing the corresponding button below."
-
-msgid "LightApp_NameDlg::TLT_RENAME"
-msgstr "Rename"
-
-msgid "LightApp_NameDlg::NAME_LBL"
-msgstr "Name: "
-
-msgid "LightApp_Application::ACTIVATE_MODULE_OP_OPEN"
-msgstr "&Open..."
-
-msgid "LightApp_Application::ACTIVATE_MODULE_OP_NEW"
-msgstr "&New"
-
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : LogWindow
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libLogWindow.la
-
-salomeinclude_HEADERS= LogWindow.h
-
-dist_libLogWindow_la_SOURCES= LogWindow.cxx
-
-MOC_FILES= LogWindow_moc.cxx
-nodist_libLogWindow_la_SOURCES = $(MOC_FILES)
-
-libLogWindow_la_CPPFLAGS=$(QT_INCLUDES) -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
-
-libLogWindow_la_LDFLAGS=$(QT_MT_LIBS) ../SUIT/libsuit.la ../Qtx/libqtx.la
-
-
+++ /dev/null
-# Copyright (C) 2003 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
-#
-#
-#
-# File : Makefile.in
-# Author : Patrick GOLDBRONN (CEA)
-# Module : SALOME
-# $Header$
-
-SUBDIRS = CASCatch Qtx Style DDS QDS SUIT STD CAF CAM SUITApp LogWindow ObjBrowser Prs
-
-if ENABLE_SALOMEOBJECT
- SUBDIRS += OBJECT
-endif
-
-if ENABLE_GLVIEWER
- SUBDIRS += GLViewer
-endif
-
-if ENABLE_VTKVIEWER
- SUBDIRS += VTKViewer
-if ENABLE_SALOMEOBJECT
- SUBDIRS += SVTK
-endif
-endif
-if ENABLE_OCCVIEWER
- SUBDIRS += OCCViewer
-if ENABLE_SALOMEOBJECT
- SUBDIRS += SOCC
-endif
-endif
-if ENABLE_PYCONSOLE
- SUBDIRS += PyInterp PythonConsole
-endif
-if ENABLE_PLOT2DVIEWER
- SUBDIRS += Plot2d
-if ENABLE_SALOMEOBJECT
- SUBDIRS += SPlot2d
-endif
-endif
-if ENABLE_SUPERVGRAPHVIEWER
- SUBDIRS += SUPERVGraph
-endif
-if ENABLE_QXGRAPHVIEWER
- SUBDIRS += QxGraph
-endif
-SUBDIRS += LightApp ResExporter
-
-if GUI_ENABLE_CORBA
- SUBDIRS += RegistryDisplay TOOLSGUI \
- Event Session SalomeApp SALOME_SWIG SALOME_PY SALOME_PYQT
-endif
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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 $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libSalomeObject.la
-
-salomeinclude_HEADERS= \
- SALOME_InteractiveObject.hxx \
- Handle_SALOME_InteractiveObject.hxx \
- SALOME_AISShape.hxx \
- Handle_SALOME_AISShape.hxx \
- SALOME_AISObject.hxx \
- Handle_SALOME_AISObject.hxx \
- SALOME_ListIO.hxx \
- SALOME_ListIteratorOfListIO.hxx \
- Handle_SALOME_ListNodeOfListIO.hxx \
- SALOME_ListNodeOfListIO.hxx \
- Handle_SALOME_Filter.hxx \
- SALOME_Filter.hxx \
- Handle_SALOME_TypeFilter.hxx \
- SALOME_TypeFilter.hxx \
- SALOME_DataMapOfIOMapOfInteger.hxx \
- SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx \
- Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx \
- SALOME_Selection.h
-
-dist_libSalomeObject_la_SOURCES= \
- SALOME_InteractiveObject.cxx \
- SALOME_AISShape.cxx\
- SALOME_AISObject.cxx\
- SALOME_ListIO_0.cxx \
- SALOME_ListIteratorOfListIO_0.cxx \
- SALOME_ListNodeOfListIO_0.cxx \
- SALOME_Filter.cxx \
- SALOME_TypeFilter.cxx \
- SALOME_DataMapOfIOMapOfInteger_0.cxx \
- SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx \
- SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx
-
-libSalomeObject_la_CPPFLAGS=$(QT_INCLUDES) $(CAS_CPPFLAGS)
-libSalomeObject_la_LDFLAGS=$(QT_LIBS) $(CAS_LDPATH) -lTKV3d
-
-EXTRA_DIST+= \
- SALOME_AISObject.ixx \
- SALOME_AISObject.jxx \
- SALOME_AISShape.ixx \
- SALOME_AISShape.jxx \
- SALOME_Filter.ixx \
- SALOME_Filter.jxx \
- SALOME_InteractiveObject.ixx \
- SALOME_InteractiveObject.jxx \
- SALOME_TypeFilter.ixx \
- SALOME_TypeFilter.jxx \
- SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : OCCViewer
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libOCCViewer.la
-
-salomeinclude_HEADERS= \
- OCCViewer_AISSelector.h \
- OCCViewer_ViewManager.h \
- OCCViewer_ViewModel.h \
- OCCViewer_ViewPort3d.h \
- OCCViewer_ViewPort.h \
- OCCViewer_ViewSketcher.h \
- OCCViewer_ViewWindow.h \
- OCCViewer_VService.h \
- OCCViewer_CreateRestoreViewDlg.h \
- OCCViewer.h \
- OCCViewer_ClippingDlg.h \
- OCCViewer_SetRotationPointDlg.h
-
-dist_libOCCViewer_la_SOURCES= \
- OCCViewer_AISSelector.cxx \
- OCCViewer_ViewManager.cxx \
- OCCViewer_ViewModel.cxx \
- OCCViewer_ViewPort3d.cxx \
- OCCViewer_ViewPort.cxx \
- OCCViewer_ViewSketcher.cxx \
- OCCViewer_ViewWindow.cxx \
- OCCViewer_VService.cxx \
- OCCViewer_CreateRestoreViewDlg.cxx \
- OCCViewer_SetRotationPointDlg.cxx \
- OCCViewer_ClippingDlg.cxx
-
-MOC_FILES= \
- OCCViewer_AISSelector_moc.cxx \
- OCCViewer_ViewModel_moc.cxx \
- OCCViewer_ViewPort3d_moc.cxx \
- OCCViewer_ViewPort_moc.cxx \
- OCCViewer_ViewSketcher_moc.cxx \
- OCCViewer_ViewWindow_moc.cxx \
- OCCViewer_ViewManager_moc.cxx \
- OCCViewer_CreateRestoreViewDlg_moc.cxx \
- OCCViewer_SetRotationPointDlg_moc.cxx \
- OCCViewer_ClippingDlg_moc.cxx
-nodist_libOCCViewer_la_SOURCES= $(MOC_FILES)
-
-dist_salomeres_DATA = \
- resources/view_back.png \
- resources/view_bottom.png \
- resources/view_camera_dump.png \
- resources/view_clone.png \
- resources/view_clipping.png \
- resources/view_clipping_pressed.png \
- resources/view_fitall.png \
- resources/view_fitarea.png \
- resources/view_front.png \
- resources/view_glpan.png \
- resources/view_left.png \
- resources/view_pan.png \
- resources/view_presets.png \
- resources/view_reset.png \
- resources/view_right.png \
- resources/view_rotate.png \
- resources/view_shoot.png \
- resources/view_top.png \
- resources/view_triedre.png \
- resources/view_zoom.png \
- resources/view_rotation_point.png
-
-nodist_salomeres_DATA = \
- OCCViewer_images.qm \
- OCCViewer_msg_en.qm
-
-libOCCViewer_la_CPPFLAGS=$(QT_INCLUDES) $(OGL_INCLUDES) $(CAS_CPPFLAGS) \
- -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
-
-libOCCViewer_la_LDFLAGS=$(OGL_LIBS) $(QT_MT_LIBS) $(CAS_KERNEL) $(CAS_VIEWER) ../SUIT/libsuit.la
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-#ifdef WNT
-#ifdef OCCVIEWER_EXPORTS
-#define OCCVIEWER_EXPORT __declspec(dllexport)
-#else
-#define OCCVIEWER_EXPORT __declspec(dllimport)
-#endif
-#else
-#define OCCVIEWER_EXPORT
-#endif
-
-#if defined WNT
-#pragma warning ( disable: 4251 )
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "OCCViewer_AISSelector.h"
-
-/*!
- Constructor
-*/
-OCCViewer_AISSelector::OCCViewer_AISSelector( QObject* parent,
- const Handle (AIS_InteractiveContext)& aisContext) :
- QObject( parent ),
- myNumSelected( 0 ),
- myEnableSelection( true ),
- myEnableMultipleSelection( true )
-{
- myHilightColor = Quantity_NOC_CYAN1;
- mySelectColor = Quantity_NOC_GRAY80;
-
- setAISContext( aisContext );
-}
-
-/*!
- Destructor
-*/
-OCCViewer_AISSelector::~OCCViewer_AISSelector()
-{
-}
-
-/*!
- Enables/disables selection
-*/
-void OCCViewer_AISSelector::enableSelection( bool bEnable )
-{
- myEnableSelection = bEnable;
-}
-
-/*!
- Enables/disables multiple selection i.e
- selection of several objects at the same time.
-*/
-void OCCViewer_AISSelector::enableMultipleSelection( bool bEnable )
-{
- myEnableMultipleSelection = bEnable;
- if ( bEnable ) myEnableSelection = bEnable;
-}
-
-/*!
- Sets the color to hilight the detected objects
-*/
-void OCCViewer_AISSelector::setHilightColor ( Quantity_NameOfColor color )
-{
- myHilightColor = color;
- if ( !myAISContext.IsNull() )
- myAISContext->SetHilightColor( myHilightColor );
-}
-
-/*!
- Sets the color to display the selected objects
-*/
-void OCCViewer_AISSelector::setSelectColor ( Quantity_NameOfColor color )
-{
- mySelectColor = color;
- if ( !myAISContext.IsNull() )
- myAISContext->SelectionColor( mySelectColor );
-}
-
-/*!
- Sets the interactive context for this selector
-*/
-void OCCViewer_AISSelector::setAISContext ( const Handle (AIS_InteractiveContext)& aisContext )
-{
- myAISContext = aisContext;
- if ( ! myAISContext.IsNull() ) {
- myAISContext->SetHilightColor( myHilightColor );
- myAISContext->SelectionColor( mySelectColor );
- myAISContext->SetSubIntensityColor( Quantity_NOC_CYAN1 );
- }
-}
-
-/*!
- Checks the status of pick and emits 'selSelectionDone' or
- 'selSelectionCancel'.
- Returns 'true' if no error, 'false' otherwise.
-*/
-bool OCCViewer_AISSelector::checkSelection ( AIS_StatusOfPick status,
- bool hadSelection,
- bool addTo )
-{
- if ( myAISContext.IsNull() )
- return false;
-
- myNumSelected = myAISContext->NbCurrents(); /* update after the last selection */
-
- if ( status == AIS_SOP_NothingSelected && !hadSelection ) {
- emit selSelectionCancel( addTo );
- }
- else if ( status == AIS_SOP_NothingSelected && hadSelection ) {
- emit selSelectionCancel( addTo ); /* unselected now */
- }
- else if ( status == AIS_SOP_OneSelected || status == AIS_SOP_SeveralSelected )
- {
- emit selSelectionDone( addTo ); /* selected ( the same object, may be ) */
- }
- return ( status != AIS_SOP_Error && status != AIS_SOP_NothingSelected );
-}
-
-/*!
- Detects the interactive objects at position (x,y).
- Returns 'true' if no error, 'false' otherwise.
-*/
-bool OCCViewer_AISSelector::moveTo ( int x, int y, const Handle (V3d_View)& view )
-{
- if ( myAISContext.IsNull() )
- return false;
-
- if ( !myEnableSelection )
- return false;
-
- AIS_StatusOfDetection status = AIS_SOD_Error;
- status = myAISContext->MoveTo (x, y, view);
-
- return ( status != AIS_SOD_Error && status != AIS_SOD_AllBad );
-}
-
-/*!
- Selects the detected interactive objects.
- Calls checkSelection() for checking the status.
-*/
-bool OCCViewer_AISSelector::select ()
-{
- if ( myAISContext.IsNull() )
- return false;
-
- if ( !myEnableSelection )
- return false;
-
- bool hadSelection = ( myNumSelected > 0 );
-
- /* select and send notifications */
- return checkSelection ( myAISContext->Select(), hadSelection, false );
-}
-
-/*!
- Selects the objects covered by the rectangle.
- Multiple selection must be enabled to get use of this function.
- Calls checkSelection() for checking the status.
-*/
-bool OCCViewer_AISSelector::select ( int left, int top, int right, int bottom,
- const Handle (V3d_View)& view )
-{
- if ( myAISContext.IsNull() )
- return false;
-
- if ( !myEnableSelection || !myEnableMultipleSelection )
- return false; /* selection with rectangle is considered as multiple selection */
-
- bool hadSelection = ( myNumSelected > 0 );
-
- /* select and send notifications */
- return checkSelection ( myAISContext->Select(left, top, right, bottom, view),
- hadSelection, false );
-}
-
-/*!
- Adds new selected objects to the objects previously selected.
- Multiple selection must be enabled to get use of this function.
- Calls checkSelection() for checking the status.
-*/
-bool OCCViewer_AISSelector::shiftSelect ()
-{
- if ( myAISContext.IsNull() )
- return false;
-
- if ( !myEnableSelection )
- return false;
-
- bool hadSelection = ( myNumSelected > 0 ); /* something was selected */
- if ( hadSelection && !myEnableMultipleSelection)
- return false;
-
- /* select and send notifications */
- return checkSelection ( myAISContext->ShiftSelect(), hadSelection, true );
-}
-
-/*!
- Adds new selected objects covered by the rectangle to the objects
- previously selected.
- Multiple selection must be enabled to get use of this function.
- Calls checkSelection() for checking the status.
-*/
-bool OCCViewer_AISSelector::shiftSelect ( int left, int top, int right, int bottom,
- const Handle (V3d_View)& view )
-
-{
- if ( myAISContext.IsNull() )
- return false;
-
- if ( !myEnableSelection || !myEnableMultipleSelection )
- return false; /* selection with rectangle is considered as multiple selection */
-
- bool hadSelection = ( myNumSelected > 0 ); /* something was selected */
- if ( hadSelection && !myEnableMultipleSelection)
- return false;
-
- /* select and send notifications */
- return checkSelection ( myAISContext->ShiftSelect(left,top,right,bottom, view),
- hadSelection, true );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-#if !defined( OCCVIEWER_AISSELECTOR_H )
-#define OCCVIEWER_AISSELECTOR_H
-
-#include "OCCViewer.h"
-#include <qobject.h>
-
-#include <Quantity_NameOfColor.hxx>
-#include <AIS_InteractiveContext.hxx>
-
-class OCCVIEWER_EXPORT OCCViewer_AISSelector : public QObject
-{
- Q_OBJECT
-
-public:
- // constructor
- OCCViewer_AISSelector( QObject* parent, const Handle (AIS_InteractiveContext)& );
- // destructor
- ~OCCViewer_AISSelector();
-
- // enables/disables selection
- void enableSelection( bool );
- // enables/disables multiple selection
- void enableMultipleSelection( bool );
-
- // detects the interactive objects at position (x,y).
- bool moveTo ( int, int, const Handle (V3d_View)& );
- // selects the objects covered by the rectangle.
- bool select ( int, int, int, int, const Handle (V3d_View)& );
- // adds new selected objects covered by the rectangle to the objects
- // previously selected.
- bool shiftSelect ( int, int, int, int, const Handle (V3d_View)& );
- // selects the detected interactive objects.
- bool select ();
- // adds new selected objects to the objects previously selected.
- bool shiftSelect ();
-
- // sets the interactive context for this selector
- void setAISContext ( const Handle (AIS_InteractiveContext)& );
- // sets the color to hilight the detected objects
- void setHilightColor ( Quantity_NameOfColor color );
- // sets the color to display the selected objects
- void setSelectColor ( Quantity_NameOfColor color );
-
-protected:
- // checks the status of pick and emits 'selSelectionDone' or 'selSelectionCancel'.
- bool checkSelection ( AIS_StatusOfPick status, bool hadSelection, bool addTo );
-
-signals:
- // 'selection done' signal
- void selSelectionDone( bool bAdded );
- // 'selection cancelled' signal
- void selSelectionCancel( bool bAdded );
-
-protected:
- Handle (AIS_InteractiveContext) myAISContext; // graphic context
- Quantity_NameOfColor myHilightColor; // color for hilight object
- Quantity_NameOfColor mySelectColor; // color for selected object
-
- int myNumSelected; // nymber of selected objects
- bool myEnableSelection; // enable selection flag
- bool myEnableMultipleSelection; // enable multiple selection flag
-};
-
-#endif // OCCVIEWER_AISSELECTOR_H
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "OCCViewer_ClippingDlg.h"
-
-#include <QtxDblSpinBox.h>
-#include <QtxAction.h>
-
-#include "SUIT_Session.h"
-#include "SUIT_ViewWindow.h"
-#include "OCCViewer_ViewWindow.h"
-#include "OCCViewer_ViewPort3d.h"
-
-#include <V3d_View.hxx>
-//#include <V3d.hxx>
-#include <Geom_Plane.hxx>
-#include <Prs3d_Presentation.hxx>
-#include <AIS_ListIteratorOfListOfInteractive.hxx>
-#include <AIS_ListOfInteractive.hxx>
-#include <AIS_InteractiveObject.hxx>
-#include <AIS_InteractiveContext.hxx>
-#include <IntAna_IntConicQuad.hxx>
-#include <gp_Lin.hxx>
-#include <gp_Pln.hxx>
-
-// QT Includes
-#include <qapplication.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-
-/*!
- Constructor
- \param view - view window
- \param parent - parent widget
- \param name - dialog name
- \param modal - is this dialog modal
- \param fl - flags
-*/
-OCCViewer_ClippingDlg::OCCViewer_ClippingDlg( OCCViewer_ViewWindow* view, QWidget* parent, const char* name, bool modal, WFlags fl )
-: QDialog( parent, "OCCViewer_ClippingDlg", modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
- myView( view )
-{
- setCaption( tr( "Clipping" ) );
-
- QVBoxLayout* topLayout = new QVBoxLayout( this );
- topLayout->setMargin( 11 ); topLayout->setSpacing( 6 );
-
- /***************************************************************/
- GroupPoint = new QGroupBox( this, "GroupPoint" );
- GroupPoint->setTitle( tr("Base point") );
- GroupPoint->setColumnLayout(0, Qt::Vertical );
- GroupPoint->layout()->setSpacing( 0 );
- GroupPoint->layout()->setMargin( 0 );
- QGridLayout* GroupPointLayout = new QGridLayout( GroupPoint->layout() );
- GroupPointLayout->setAlignment( Qt::AlignTop );
- GroupPointLayout->setSpacing( 6 );
- GroupPointLayout->setMargin( 11 );
-
- // Controls
- const double min = -1e+16;
- const double max = 1e+16;
- const double step = 5;
- const int precision = -6; // PAL12789. Minus is for using 'g' double->string conversion specifier,
- // see QtxDblSpinBox::mapValueToText( double v )
-
- TextLabelX = new QLabel( GroupPoint, "TextLabelX" );
- TextLabelX->setText( tr("X:") );
- GroupPointLayout->addWidget( TextLabelX, 0, 0 );
-
- SpinBox_X = new QtxDblSpinBox( min, max, step, GroupPoint, "SpinBox_X" );
- SpinBox_X->setPrecision( precision );
- GroupPointLayout->addWidget( SpinBox_X, 0, 1 );
-
- TextLabelY = new QLabel( GroupPoint, "TextLabelY" );
- TextLabelY->setText( tr("Y:") );
- GroupPointLayout->addWidget( TextLabelY, 0, 2 );
-
- SpinBox_Y = new QtxDblSpinBox( min, max, step, GroupPoint, "SpinBox_Y" );
- SpinBox_Y->setPrecision( precision );
- GroupPointLayout->addWidget( SpinBox_Y, 0, 3 );
-
- TextLabelZ = new QLabel( GroupPoint, "TextLabelZ" );
- TextLabelZ->setText( tr("Z:") );
- GroupPointLayout->addWidget( TextLabelZ, 0, 4 );
-
- SpinBox_Z = new QtxDblSpinBox( min, max, step, GroupPoint, "SpinBox_Z" );
- SpinBox_Z->setPrecision( precision );
- GroupPointLayout->addWidget( SpinBox_Z, 0, 5 );
-
- resetButton = new QPushButton( GroupPoint, "resetButton" );
- resetButton->setText( tr( "Reset" ) );
- GroupPointLayout->addWidget( resetButton, 0, 6 );
-
- /***************************************************************/
- GroupDirection = new QGroupBox( this, "GroupDirection" );
- GroupDirection->setTitle( tr("Direction") );
- GroupDirection->setColumnLayout(0, Qt::Vertical );
- GroupDirection->layout()->setSpacing( 0 );
- GroupDirection->layout()->setMargin( 0 );
- QGridLayout* GroupDirectionLayout = new QGridLayout( GroupDirection->layout() );
- GroupDirectionLayout->setAlignment( Qt::AlignTop );
- GroupDirectionLayout->setSpacing( 6 );
- GroupDirectionLayout->setMargin( 11 );
-
- // Controls
- TextLabelDx = new QLabel( GroupDirection, "TextLabelDx" );
- TextLabelDx->setText( tr("Dx:") );
- GroupDirectionLayout->addWidget( TextLabelDx, 0, 0 );
-
- SpinBox_Dx = new QtxDblSpinBox( min, max, step, GroupDirection, "SpinBox_Dx" );
- SpinBox_Dx->setPrecision( precision );
- GroupDirectionLayout->addWidget( SpinBox_Dx, 0, 1 );
-
- TextLabelDy = new QLabel( GroupDirection, "TextLabelDy" );
- TextLabelDy->setText( tr("Dy:") );
- GroupDirectionLayout->addWidget( TextLabelDy, 0, 2 );
-
- SpinBox_Dy = new QtxDblSpinBox( min, max, step, GroupDirection, "SpinBox_Dy" );
- SpinBox_Dy->setPrecision( precision );
- GroupDirectionLayout->addWidget( SpinBox_Dy, 0, 3 );
-
- TextLabelDz = new QLabel( GroupDirection, "TextLabelDz" );
- TextLabelDz->setText( tr("Dz:") );
- GroupDirectionLayout->addWidget( TextLabelDz, 0, 4 );
-
- SpinBox_Dz = new QtxDblSpinBox( min, max, step, GroupDirection, "SpinBox_Dz" );
- SpinBox_Dz->setPrecision( precision );
- GroupDirectionLayout->addWidget( SpinBox_Dz, 0, 5 );
-
- invertButton = new QPushButton( GroupDirection, "invertButton" );
- invertButton->setText( tr( "Invert" ) );
- GroupDirectionLayout->addWidget( invertButton, 0, 6 );
-
- DirectionCB = new QComboBox( GroupDirection, "DirectionCB" );
- DirectionCB->insertItem(tr("CUSTOM"));
- DirectionCB->insertItem(tr("||X-Y"));
- DirectionCB->insertItem(tr("||Y-Z"));
- DirectionCB->insertItem(tr("||Z-X"));
- GroupDirectionLayout->addMultiCellWidget( DirectionCB, 1, 1, 0, 5 );
-
- /***************************************************************/
-
- PreviewChB = new QCheckBox( tr("Preview") ,this, "PreviewChB" );
- PreviewChB->setChecked( true );
-
- /***************************************************************/
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setMargin( 0 ); GroupButtons->layout()->setSpacing( 0 );
- QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons->layout() );
- GroupButtonsLayout->setAlignment( Qt::AlignTop );
- GroupButtonsLayout->setMargin( 11 ); GroupButtonsLayout->setSpacing( 6 );
-
- buttonApply = new QPushButton( GroupButtons, "buttonApply" );
- buttonApply->setText( tr( "BUT_APPLY" ) );
- buttonApply->setAutoDefault( TRUE );
- buttonApply->setDefault( TRUE );
- GroupButtonsLayout->addWidget( buttonApply );
-
- GroupButtonsLayout->addStretch();
-
- buttonClose = new QPushButton( GroupButtons, "buttonClose" );
- buttonClose->setText( tr( "BUT_CLOSE" ) );
- buttonClose->setAutoDefault( TRUE );
- GroupButtonsLayout->addWidget( buttonClose );
- /***************************************************************/
-
- topLayout->addWidget( GroupPoint );
- topLayout->addWidget( GroupDirection );
-
- topLayout->addWidget( PreviewChB );
-
- topLayout->addWidget( GroupButtons );
-
- /* initializations */
-
- SpinBox_X->setValue( 0.0 );
- SpinBox_Y->setValue( 0.0 );
- SpinBox_Z->setValue( 0.0 );
-
- SpinBox_Dx->setValue( 1.0 );
- SpinBox_Dy->setValue( 1.0 );
- SpinBox_Dz->setValue( 1.0 );
-
- /* signals and slots connections */
- connect( resetButton, SIGNAL (clicked() ), this, SLOT( onReset() ) );
- connect( invertButton, SIGNAL (clicked() ), this, SLOT( onInvert() ) ) ;
-
- connect( SpinBox_X, SIGNAL ( valueChanged( double ) ), this, SLOT( onValueChanged() ) );
- connect( SpinBox_Y, SIGNAL ( valueChanged( double ) ), this, SLOT( onValueChanged() ) );
- connect( SpinBox_Z, SIGNAL ( valueChanged( double ) ), this, SLOT( onValueChanged() ) );
- connect( SpinBox_Dx, SIGNAL ( valueChanged( double ) ), this, SLOT( onValueChanged() ) );
- connect( SpinBox_Dy, SIGNAL ( valueChanged( double ) ), this, SLOT( onValueChanged() ) );
- connect( SpinBox_Dz, SIGNAL ( valueChanged( double ) ), this, SLOT( onValueChanged() ) );
-
- connect( DirectionCB, SIGNAL ( activated ( int ) ), this, SLOT( onModeChanged( int ) ) ) ;
-
- connect( PreviewChB, SIGNAL ( toggled ( bool ) ), this, SLOT( onPreview( bool ) ) ) ;
-
- connect( buttonClose, SIGNAL( clicked() ), this, SLOT( ClickOnClose() ) ) ;
- connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
-
- myBusy = false;
-
- connect(view, SIGNAL(Show( QShowEvent * )), this, SLOT(onViewShow()));
- connect(view, SIGNAL(Hide( QHideEvent * )), this, SLOT(onViewHide()));
-}
-
-/*!
- Destructor
- Destroys the object and frees any allocated resources
-*/
-OCCViewer_ClippingDlg::~ OCCViewer_ClippingDlg()
-{
- // no need to delete child widgets, Qt does it all for us
-}
-
-
-/*!
- Custom handling of close event: erases preview
-*/
-void OCCViewer_ClippingDlg::closeEvent( QCloseEvent* e )
-{
- erasePreview();
-
- // Set the clipping plane back
- Handle(V3d_View) aView3d = myView->getViewPort()->getView();
- if ( !aView3d.IsNull() && !myClippingPlane.IsNull() )
- aView3d->SetPlaneOn( myClippingPlane );
-
- if (!myView->isCuttingPlane())
- myAction->setOn( false );
-
- QDialog::closeEvent( e );
-}
-
-
-/*!
- Custom handling of show event: displays preview
-*/
-void OCCViewer_ClippingDlg::showEvent( QShowEvent* e )
-{
- ReserveClippingPlane();
-
- QDialog::showEvent( e );
- onPreview( PreviewChB->isChecked() );
-}
-
-
-/*!
- Custom handling of hide event: erases preview
-*/
-void OCCViewer_ClippingDlg::hideEvent( QHideEvent* e )
-{
- erasePreview();
- QDialog::hideEvent( e );
-}
-
-
-/*!
- SLOT on close button click: erases preview and rejects dialog
-*/
-void OCCViewer_ClippingDlg::ClickOnClose()
-{
- erasePreview();
-
- // Set the clipping plane back
- Handle(V3d_View) aView3d = myView->getViewPort()->getView();
- if ( !aView3d.IsNull() && !myClippingPlane.IsNull() )
- aView3d->SetPlaneOn( myClippingPlane );
-
- if (!myView->isCuttingPlane())
- myAction->setOn( false );
-
- reject();
-}
-
-
-/*!
- SLOT on apply button click: sets cutting plane
-*/
-void OCCViewer_ClippingDlg::ClickOnApply()
-{
- qApp->processEvents();
- QApplication::setOverrideCursor( Qt::WaitCursor );
- qApp->processEvents();
-
- myView->setCuttingPlane( true, SpinBox_X->value() , SpinBox_Y->value() , SpinBox_Z->value(),
- SpinBox_Dx->value(), SpinBox_Dy->value(), SpinBox_Dz->value() );
-
- QApplication::restoreOverrideCursor();
-
- erasePreview();
-
- ReserveClippingPlane();
-}
-
-/*!
- SLOT on reset button click: sets default values
-*/
-void OCCViewer_ClippingDlg::onReset()
-{
- myBusy = true;
- SpinBox_X->setValue(0);
- SpinBox_Y->setValue(0);
- SpinBox_Z->setValue(0);
- myBusy = false;
-
- if ( PreviewChB->isChecked() )
- {
- erasePreview();
- displayPreview();
- }
-}
-
-/*!
- SLOT on invert button click: inverts normal of cutting plane
-*/
-void OCCViewer_ClippingDlg::onInvert()
-{
- double Dx = SpinBox_Dx->value();
- double Dy = SpinBox_Dy->value();
- double Dz = SpinBox_Dz->value();
-
- myBusy = true;
- SpinBox_Dx->setValue( -Dx );
- SpinBox_Dy->setValue( -Dy );
- SpinBox_Dz->setValue( -Dz );
- myBusy = false;
-
- if ( PreviewChB->isChecked() )
- {
- erasePreview();
- displayPreview();
- }
-}
-
-/*!
- SLOT: called on mode changed
-*/
-void OCCViewer_ClippingDlg::onModeChanged( int mode )
-{
- bool isUserMode = (mode==0);
-
- TextLabelX->setEnabled( isUserMode );
- TextLabelY->setEnabled( isUserMode );
- TextLabelZ->setEnabled( isUserMode );
-
- SpinBox_X->setEnabled( isUserMode );
- SpinBox_Y->setEnabled( isUserMode );
- SpinBox_Z->setEnabled( isUserMode );
-
- TextLabelDx->setEnabled( isUserMode );
- TextLabelDy->setEnabled( isUserMode );
- TextLabelDz->setEnabled( isUserMode );
-
- SpinBox_Dx->setEnabled( isUserMode );
- SpinBox_Dy->setEnabled( isUserMode );
- SpinBox_Dz->setEnabled( isUserMode );
-
- if ( isUserMode )
- return;
-
- double aDx = 0, aDy = 0, aDz = 0;
-
- if ( mode == 1 )
- {
- aDz = 1;
- TextLabelZ->setEnabled( true );
- SpinBox_Z->setEnabled( true );
- SpinBox_Z->setFocus();
- }
- else if ( mode == 2 )
- {
- aDx = 1;
- TextLabelX->setEnabled( true );
- SpinBox_X->setEnabled( true );
- SpinBox_X->setFocus();
- }
- else if ( mode == 3 )
- {
- aDy = 1;
- TextLabelY->setEnabled( true );
- SpinBox_Y->setEnabled( true );
- SpinBox_Y->setFocus();
- }
-
- myBusy = true;
- SpinBox_Dx->setValue( aDx );
- SpinBox_Dy->setValue( aDy );
- SpinBox_Dz->setValue( aDz );
- myBusy = false;
-
- if ( PreviewChB->isChecked() )
- {
- erasePreview();
- displayPreview();
- }
-}
-
-
-/*!
- Displays preview of clipping plane
-*/
-void OCCViewer_ClippingDlg::displayPreview()
-{
- if ( myBusy || !isValid() )
- return;
-
- OCCViewer_Viewer* anOCCViewer = (OCCViewer_Viewer*)myView->getViewManager()->getViewModel();
- if (!anOCCViewer)
- return;
-
- Handle(AIS_InteractiveContext) ic = anOCCViewer->getAISContext();
-
- double aXMin, aYMin, aZMin, aXMax, aYMax, aZMax;
- aXMin = aYMin = aZMin = DBL_MAX;
- aXMax = aYMax = aZMax = -DBL_MAX;
-
- bool isFound = false;
- AIS_ListOfInteractive aList;
- ic->DisplayedObjects( aList );
- for ( AIS_ListIteratorOfListOfInteractive it( aList ); it.More(); it.Next() )
- {
- Handle(AIS_InteractiveObject) anObj = it.Value();
- if ( !anObj.IsNull() && anObj->HasPresentation() &&
- !anObj->IsKind( STANDARD_TYPE(AIS_Plane) ) )
- {
- Handle(Prs3d_Presentation) aPrs = anObj->Presentation();
- if ( !aPrs->IsEmpty() && !aPrs->IsInfinite() )
- {
- isFound = true;
- double xmin, ymin, zmin, xmax, ymax, zmax;
- aPrs->MinMaxValues( xmin, ymin, zmin, xmax, ymax, zmax );
- aXMin = QMIN( aXMin, xmin ); aXMax = QMAX( aXMax, xmax );
- aYMin = QMIN( aYMin, ymin ); aYMax = QMAX( aYMax, ymax );
- aZMin = QMIN( aZMin, zmin ); aZMax = QMAX( aZMax, zmax );
- }
- }
- }
-
- double aSize = 50;
-
- gp_Pnt aBasePnt( SpinBox_X->value(), SpinBox_Y->value(), SpinBox_Z->value() );
- gp_Dir aNormal( SpinBox_Dx->value(), SpinBox_Dy->value(), SpinBox_Dz->value() );
- gp_Pnt aCenter = aBasePnt;
-
- if ( isFound )
- {
- // compute clipping plane size
- aCenter = gp_Pnt( ( aXMin + aXMax ) / 2, ( aYMin + aYMax ) / 2, ( aZMin + aZMax ) / 2 );
- double aDiag = aCenter.Distance(gp_Pnt(aXMax, aYMax, aZMax ))*2;
- aSize = aDiag * 1.1;
-
- // compute clipping plane center ( redefine the base point )
- IntAna_IntConicQuad intersector = IntAna_IntConicQuad();
-
- intersector.Perform( gp_Lin( aCenter, aNormal), gp_Pln( aBasePnt, aNormal), Precision::Confusion() );
- if ( intersector.IsDone() && intersector.NbPoints() == 1 )
- aBasePnt = intersector.Point( 1 );
- }
-
- myPreviewPlane = new AIS_Plane( new Geom_Plane( aBasePnt, aNormal ) );
- myPreviewPlane->SetSize( aSize, aSize );
-
- // Deactivate clipping planes
- myView->getViewPort()->getView()->SetPlaneOff();
-
- ic->Display( myPreviewPlane, 1, -1, false );
- ic->SetWidth( myPreviewPlane, 10, false );
- ic->SetMaterial( myPreviewPlane, Graphic3d_NOM_PLASTIC, false );
- ic->SetTransparency( myPreviewPlane, 0.5, false );
- ic->SetColor( myPreviewPlane, Quantity_Color( 85 / 255., 85 / 255., 255 / 255., Quantity_TOC_RGB ), false );
-
- anOCCViewer->update();
-}
-
-
-/*!
- Erases preview of clipping plane
-*/
-void OCCViewer_ClippingDlg::erasePreview ()
-{
- OCCViewer_Viewer* anOCCViewer = (OCCViewer_Viewer*)myView->getViewManager()->getViewModel();
- if (!anOCCViewer)
- return;
-
- Handle(AIS_InteractiveContext) ic = anOCCViewer->getAISContext();
-
- if ( !myPreviewPlane.IsNull() && ic->IsDisplayed( myPreviewPlane ) )
- {
- ic->Erase( myPreviewPlane, false, false );
- ic->Remove( myPreviewPlane, false );
- myPreviewPlane.Nullify();
- }
-
- anOCCViewer->update();
-}
-
-
-/*!
- SLOT: called on value changes (co-ordinates of point or normal)
-*/
-void OCCViewer_ClippingDlg::onValueChanged()
-{
- if ( PreviewChB->isChecked() )
- {
- erasePreview();
- displayPreview();
- }
-}
-
-
-/*!
- SLOT: called on preview check box toggled
-*/
-void OCCViewer_ClippingDlg::onPreview( bool on )
-{
- erasePreview();
-
- if ( on )
- displayPreview();
-}
-
-/*!
- \return true if plane parameters are valid
-*/
-bool OCCViewer_ClippingDlg::isValid()
-{
- return ( SpinBox_Dx->value()!=0 || SpinBox_Dy->value()!=0 || SpinBox_Dz->value()!=0 );
-}
-
-/*!
- Remember the current clipping plane
-*/
-void OCCViewer_ClippingDlg::ReserveClippingPlane()
-{
- Handle(V3d_View) aView3d = myView->getViewPort()->getView();
- if ( !aView3d.IsNull() )
- {
- aView3d->InitActivePlanes();
- if ( aView3d->MoreActivePlanes() )
- myClippingPlane = aView3d->ActivePlane();
- }
-}
-
-void OCCViewer_ClippingDlg::onViewShow()
-{
- if(myAction->isOn())
- show();
- else
- hide();
-}
-
-void OCCViewer_ClippingDlg::onViewHide()
-{
- hide();
-}
-
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 OCCVIEWER_CLIPPINGDLG_H
-#define OCCVIEWER_CLIPPINGDLG_H
-
-#include "OCCViewer.h"
-
-#include <qdialog.h>
-
-#include <AIS_Plane.hxx>
-#include <V3d_Plane.hxx>
-
-class QGroupBox;
-class QLabel;
-class QPushButton;
-class QComboBox;
-class QCheckBox;
-class QtxDblSpinBox;
-class QtxAction;
-
-class OCCViewer_ViewWindow;
-
-
-/*!
- \class OCCViewer_ClippingDlg
- \brief Dialog allowing to assign parameters of clipping plane
-*/
-class OCCViewer_ClippingDlg : public QDialog
-{
- Q_OBJECT
-
- public:
- OCCViewer_ClippingDlg(OCCViewer_ViewWindow* , QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
- ~OCCViewer_ClippingDlg();
-
- void SetAction( QtxAction* theAction ) { myAction = theAction; }
-
-private :
-
- virtual void closeEvent( QCloseEvent* e );
- virtual void showEvent ( QShowEvent * );
- virtual void hideEvent ( QHideEvent * );
- void displayPreview();
- void erasePreview();
- void ReserveClippingPlane();
-
- bool isValid();
-
- QGroupBox* GroupPoint;
- QLabel* TextLabelX;
- QLabel* TextLabelY;
- QLabel* TextLabelZ;
- QtxDblSpinBox* SpinBox_X;
- QtxDblSpinBox* SpinBox_Y;
- QtxDblSpinBox* SpinBox_Z;
- QPushButton* resetButton;
-
- QGroupBox* GroupDirection;
- QLabel* TextLabelDx;
- QLabel* TextLabelDy;
- QLabel* TextLabelDz;
- QtxDblSpinBox* SpinBox_Dx;
- QtxDblSpinBox* SpinBox_Dy;
- QtxDblSpinBox* SpinBox_Dz;
- QPushButton* invertButton;
-
- QComboBox* DirectionCB;
-
- QCheckBox* PreviewChB;
-
- QPushButton* buttonApply;
- QPushButton* buttonClose;
-
- OCCViewer_ViewWindow* myView;
-
- Handle(AIS_Plane) myPreviewPlane;
- Handle(V3d_Plane) myClippingPlane;
-
- bool myBusy;
-
- QtxAction* myAction;
-
-private slots:
- void ClickOnApply();
- void ClickOnClose();
-
- void onReset();
- void onInvert();
- void onModeChanged( int mode );
- void onValueChanged();
- void onPreview( bool on );
-
- void onViewShow();
- void onViewHide();
-};
-
-#endif // OCCVIEWER_CLIPPINGDLG_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "OCCViewer_CreateRestoreViewDlg.h"
-#include "OCCViewer_ViewModel.h"
-#include "OCCViewer_ViewPort3d.h"
-
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qimage.h>
-
-/*!
- Constructor
-*/
-OCCViewer_CreateRestoreViewDlg::OCCViewer_CreateRestoreViewDlg( QWidget* aWin, OCCViewer_Viewer* curModel )
-: QDialog( aWin )
-{
- setCaption( tr( "CAPTION" ) );
-
- myParametersMap = curModel->getViewAspects();
-
- myKeyFlag = 0;
-
- int aQuantityOfItems = myParametersMap.count();
-
- setFixedSize( 400, 300 );
-
- QGridLayout* aGrid = new QGridLayout( this, 2, 1, 5, 10 );
-
- QWidget* aWidget1 = new QWidget( this );
- QWidget* aWidget2 = new QWidget( this );
-
- QHBoxLayout* aLayout = new QHBoxLayout( aWidget1 );
-
- myListBox = new QtxListBox( aWidget1 );
- myListBox->installEventFilter( this );
-
- myCurViewPort = new OCCViewer_ViewPort3d( aWidget1, curModel->getViewer3d(), V3d_ORTHOGRAPHIC );
- myCurViewPort->getView()->SetBackgroundColor( Quantity_NOC_BLACK );
-
- myListBox->setEditEnabled( 1 );
-
- if ( aQuantityOfItems )
- {
- myListBox->clear();
- for( int i = 0; i < aQuantityOfItems; i++ )
- myListBox->insertItem( myParametersMap[ i ].name );
-
- changeImage( myListBox->item( 0 ) );
- }
- else
- {
- myListBox->clear();
- myListBox->insertItem( "No Items", 0 );
- myListBox->setEditEnabled( 0 );
- }
-
- connect( myListBox, SIGNAL( clicked( QListBoxItem* ) ), this, SLOT( changeImage( QListBoxItem* ) ) );
- connect( myListBox, SIGNAL( itemEdited( QListBoxItem* ) ), this, SLOT( editItemText( QListBoxItem* ) ) );
-
- aLayout->addWidget( myListBox );
- aLayout->addWidget( myCurViewPort, 30 );
-
- QHBoxLayout* aButtonLayout = new QHBoxLayout( aWidget2, 0, 5 );
-
- QPushButton* theOk = new QPushButton( tr( "Ok" ), aWidget2 ); theOk->setAutoDefault( false );
- QPushButton* theCancel = new QPushButton( tr( "Cancel" ), aWidget2 ); theCancel->setAutoDefault( false );
- QPushButton* theDelete = new QPushButton( tr( "Delete" ), aWidget2 ); theDelete->setAutoDefault( false );
- QPushButton* theClearAll = new QPushButton( tr( "Clear List" ), aWidget2 ); theClearAll->setAutoDefault( false );
-
- aButtonLayout->addWidget( theOk );
- aButtonLayout->addWidget( theCancel );
- aButtonLayout->addWidget( theDelete );
- aButtonLayout->addWidget( theClearAll );
-
- aGrid->addWidget( aWidget1, 0, 0 );
- aGrid->addWidget( aWidget2, 1, 0 );
-
- connect( theOk, SIGNAL( clicked() ), this, SLOT( OKpressed() ) );
- connect( theCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( theDelete, SIGNAL( clicked() ), this, SLOT( deleteSelectedItems() ) );
- connect( theClearAll, SIGNAL( clicked() ), this, SLOT( clearList() ) );
-}
-
-/*!
- Destructor
-*/
-OCCViewer_CreateRestoreViewDlg::~OCCViewer_CreateRestoreViewDlg()
-{
-}
-
-/*!
- Changes image in accordance with item
- \param curItem - item contains info about view parameters
-*/
-void OCCViewer_CreateRestoreViewDlg::changeImage( QListBoxItem* curItem )
-{
- if( curItem && myListBox->isEditEnabled() )
- {
- int lowLevel = -1;
- int highLevel = -1;
- int index = curItem->listBox()->index( curItem );
- if( myKeyFlag == 2 )
- {
- for( int i = 0; i < (int)myListBox->count(); i++ )
- {
- if( myListBox->isSelected( i ) && i != index )
- {
- myListBox->clearSelection();
- if( i > index )
- {
- lowLevel = index;
- highLevel = i;
- }
- else
- {
- lowLevel = i;
- highLevel = index;
- }
- for( int j = lowLevel; j <= highLevel; j++ )
- myListBox->setSelected( j, TRUE );
- break;
- }
- if( myListBox->isSelected( i ) && i == index )
- myListBox->setSelected( i, TRUE );
- }
- }
-
- Handle(V3d_View) aView3d = myCurViewPort->getView();
- myCurrentItem = myParametersMap[ index ];
-
- Standard_Boolean prev = aView3d->SetImmediateUpdate( Standard_False );
- aView3d->SetScale( myCurrentItem.scale );
- aView3d->SetCenter( myCurrentItem.centerX, myCurrentItem.centerY );
- aView3d->SetProj( myCurrentItem.projX, myCurrentItem.projY, myCurrentItem.projZ );
- aView3d->SetTwist( myCurrentItem.twist );
- aView3d->SetAt( myCurrentItem.atX, myCurrentItem.atY, myCurrentItem.atZ );
- aView3d->SetImmediateUpdate( prev );
- aView3d->SetEye( myCurrentItem.eyeX, myCurrentItem.eyeY, myCurrentItem.eyeZ );
- }
-}
-
-/*!
- \return current view parameters (corresponding to current item)
-*/
-viewAspect OCCViewer_CreateRestoreViewDlg::currentItem() const
-{
- return myCurrentItem;
-}
-
-/*!
- Deletes selected items from list view
-*/
-void OCCViewer_CreateRestoreViewDlg::deleteSelectedItems()
-{
- if( myListBox->count() && myListBox->isEditEnabled() )
- {
- int curIndex = -1;
- for( int i = 0; i < (int)myListBox->count(); i++ )
- if( myListBox->isSelected( i ) )
- {
- myListBox->removeItem( i );
- for( int j = i; j < (int)myParametersMap.count(); j++ )
- if( j != myParametersMap.count() - 1 )
- myParametersMap[ j ] = myParametersMap[ j + 1 ];
- else
- myParametersMap.remove( myParametersMap.at(j) );
- if( i != myListBox->count() )
- curIndex = i;
- else
- curIndex = i - 1;
- i--;
- }
- if( curIndex >= 0 )
- {
- myListBox->setCurrentItem( curIndex );
- changeImage( myListBox->item( curIndex ) );
- }
- }
- if( !myListBox->count() )
- {
- myListBox->clear();
- myListBox->insertItem( "No Items", 0 );
- myListBox->setEditEnabled( 0 );
- }
-}
-
-/*!
- Clears list of view aspects
-*/
-void OCCViewer_CreateRestoreViewDlg::clearList()
-{
- myListBox->clear();
- myListBox->insertItem( "No Items", 0 );
- myListBox->setEditEnabled( 0 );
-
- myParametersMap.clear();
-}
-
-/*!
- \return const reference to all view aspects
-*/
-const viewAspectList& OCCViewer_CreateRestoreViewDlg::parameters() const
-{
- return myParametersMap;
-}
-
-/*!
- Renames key of view aspect map in accordance with item name
- \param anItem - item
-*/
-void OCCViewer_CreateRestoreViewDlg::editItemText( QListBoxItem* anItem )
-{
- int index = anItem->listBox()->index( anItem );
- myParametersMap[ index ].name = anItem->text().latin1();
-}
-
-/*!
- Custom event filter
-*/
-bool OCCViewer_CreateRestoreViewDlg::eventFilter( QObject* anObj, QEvent* anEv )
-{
- if( anEv->type() == QEvent::KeyPress )
- {
- QKeyEvent* aKeyEv = ( QKeyEvent* )anEv;
- if( aKeyEv->key() == Qt::Key_Control )
- {
- myKeyFlag = 1;
- myListBox->setSelectionMode( QListBox::Multi );
- }
- else if( aKeyEv->key() == Qt::Key_Shift )
- {
- myKeyFlag = 2;
- myListBox->setSelectionMode( QListBox::Multi );
- }
- else
- myListBox->setSelectionMode( QListBox::Single );
- }
- if( anEv->type() == QEvent::KeyRelease )
- myKeyFlag = 0;
-
- if( !myKeyFlag )
- {
- if( anEv->type() == QEvent::KeyPress || anEv->type() == QEvent::MouseButtonPress )
- myListBox->setSelectionMode( QListBox::Single );
- }
- return QWidget::eventFilter( anObj, anEv );
-}
-
-/*!
- SLOT: called on OK click, emits dlgOk() and closes dialog
-*/
-void OCCViewer_CreateRestoreViewDlg::OKpressed()
-{
- emit dlgOk();
- accept();
-}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 OCCVIEWER_CREATERESTOREVIEWDLG_H
-#define OCCVIEWER_CREATERESTOREVIEWDLG_H
-
-#include "OCCViewer.h"
-
-#include "OCCViewer_ViewModel.h"
-#include "OCCViewer_ViewWindow.h"
-
-#include <QtxDialog.h>
-#include <QtxListBox.h>
-#include <SUIT_Application.h>
-
-#include <qmap.h>
-#include <qvbox.h>
-#include <qdialog.h>
-#include <qlistbox.h>
-#include <qstringlist.h>
-
-class OCCViewer_ViewPort3d;
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-class OCCVIEWER_EXPORT OCCViewer_CreateRestoreViewDlg : public QDialog
-{
- Q_OBJECT
-
-public:
- OCCViewer_CreateRestoreViewDlg( QWidget*, OCCViewer_Viewer* );
- virtual ~OCCViewer_CreateRestoreViewDlg();
-
- const viewAspectList& parameters() const;
- viewAspect currentItem() const;
- virtual bool eventFilter( QObject*, QEvent* );
-
-public slots:
- void OKpressed();
- void clearList();
- void editItemText( QListBoxItem* );
- void changeImage( QListBoxItem* );
- void deleteSelectedItems();
-
-signals:
- void dlgOk();
-
-private:
- int myKeyFlag;
- QtxListBox* myListBox;
- OCCViewer_ViewPort3d* myCurViewPort;
- viewAspect myCurrentItem;
- viewAspectList myParametersMap;
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "OCCViewer_SetRotationPointDlg.h"
-
-#include <QtxAction.h>
-
-#include "OCCViewer_ViewWindow.h"
-
-#include <qlineedit.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qbuttongroup.h>
-#include <qobjectlist.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-
-/*!
- Constructor
- \param view - view window
- \param parent - parent widget
- \param name - dialog name
- \param modal - is this dialog modal
- \param fl - flags
-*/
-OCCViewer_SetRotationPointDlg::OCCViewer_SetRotationPointDlg( OCCViewer_ViewWindow* view, QWidget* parent, const char* name, bool modal, WFlags fl )
-: QDialog( parent, "OCCViewer_SetRotationPointDlg", modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
- myView( view )
-{
- setCaption(tr("CAPTION"));
- setSizeGripEnabled(TRUE);
-
- // Create layout for this dialog
- QGridLayout* layoutDlg = new QGridLayout (this);
- layoutDlg->setSpacing(6);
- layoutDlg->setMargin(11);
-
- // Create check box "Use Bounding Box Center"
- QHBox* aCheckBox = new QHBox(this);
-
- myIsBBCenter = new QCheckBox(tr("USE_BBCENTER"), aCheckBox);
- myIsBBCenter->setChecked(true);
- connect(myIsBBCenter, SIGNAL(stateChanged(int)), SLOT(onBBCenterChecked()));
-
- // Create croup button with radio buttons
- myGroupSelButton = new QButtonGroup(2,Qt::Vertical,"",this);
- myGroupSelButton->setMargin(11);
-
- // Create "Set to Origin" button
- myToOrigin = new QPushButton(myGroupSelButton);
- myToOrigin->setText(tr("LBL_TOORIGIN"));
- connect(myToOrigin, SIGNAL(clicked()), this, SLOT(onToOrigin()));
-
- // Create "Select Point from View" button
- mySelectPoint = new QPushButton(myGroupSelButton);
- mySelectPoint->setText(tr("LBL_SELECTPOINT"));
- mySelectPoint->setToggleButton(true);
- connect(mySelectPoint, SIGNAL(clicked()), this, SLOT(onSelectPoint()));
-
- // Create croup box with grid layout
- myGroupBoxCoord = new QGroupBox(this, "GroupBox");
- QHBoxLayout* aHBoxLayout = new QHBoxLayout(myGroupBoxCoord);
- aHBoxLayout->setMargin(11);
- aHBoxLayout->setSpacing(6);
-
- // "X" coordinate
- QLabel* TextLabelX = new QLabel (tr("LBL_X"), myGroupBoxCoord, "TextLabelX");
- TextLabelX->setFixedWidth(15);
- myX = new QLineEdit(myGroupBoxCoord);
- myX->setValidator(new QDoubleValidator(myX));
- myX->setText(QString::number(0.0));
- connect(myX, SIGNAL(textChanged(const QString&)), this, SLOT(onCoordChanged()));
-
- // "Y" coordinate
- QLabel* TextLabelY = new QLabel (tr("LBL_Y"), myGroupBoxCoord, "TextLabelY");
- TextLabelY->setFixedWidth(15);
- myY = new QLineEdit(myGroupBoxCoord);
- myY->setValidator(new QDoubleValidator(myY));
- myY->setText(QString::number(0.0));
- connect(myY, SIGNAL(textChanged(const QString&)), this, SLOT(onCoordChanged()));
-
- // "Z" coordinate
- QLabel* TextLabelZ = new QLabel (tr("LBL_Z"), myGroupBoxCoord, "TextLabelZ");
- TextLabelZ->setFixedWidth(15);
- myZ = new QLineEdit(myGroupBoxCoord);
- myZ->setValidator(new QDoubleValidator(myZ));
- myZ->setText(QString::number(0.0));
- connect(myZ, SIGNAL(textChanged(const QString&)), this, SLOT(onCoordChanged()));
-
- // Layout widgets in the horizontal group box
- aHBoxLayout->addWidget(TextLabelX);
- aHBoxLayout->addWidget(myX);
- aHBoxLayout->addWidget(TextLabelY);
- aHBoxLayout->addWidget(myY);
- aHBoxLayout->addWidget(TextLabelZ);
- aHBoxLayout->addWidget(myZ);
-
- // "Close" button
- QGroupBox* aGroupBox = new QGroupBox(this);
- QHBoxLayout* aHBoxLayout2 = new QHBoxLayout(aGroupBox);
- aHBoxLayout2->setMargin(11);
- aHBoxLayout2->setSpacing(6);
-
- QPushButton* m_bClose = new QPushButton(tr("&Close"), aGroupBox, "m_bClose");
- m_bClose->setAutoDefault(TRUE);
- m_bClose->setFixedSize(m_bClose->sizeHint());
- connect(m_bClose, SIGNAL(clicked()), this, SLOT(onClickClose()));
-
- // Layout buttons
- aHBoxLayout2->addWidget(m_bClose);
-
- // Layout top level widgets
- layoutDlg->addWidget(aCheckBox,0,0);
- layoutDlg->addWidget(myGroupSelButton,1,0);
- layoutDlg->addWidget(myGroupBoxCoord,2,0);
- layoutDlg->addWidget(aGroupBox,3,0);
-
- setEnabled(myGroupSelButton,!myIsBBCenter->isChecked());
- setEnabled(myGroupBoxCoord,!myIsBBCenter->isChecked());
-
- this->resize(400, this->sizeHint().height());
-
- connect(view, SIGNAL(Show( QShowEvent * )), this, SLOT(onViewShow()));
- connect(view, SIGNAL(Hide( QHideEvent * )), this, SLOT(onViewHide()));
-}
-
-/*
- * Destroys the object and frees any allocated resources
- */
-OCCViewer_SetRotationPointDlg
-::~OCCViewer_SetRotationPointDlg()
-{
- // no need to delete child widgets, Qt does it all for us
-}
-
-/*!
- Return true if it is the first show for this dialog
-*/
-bool
-OCCViewer_SetRotationPointDlg
-::IsFirstShown()
-{
- return myIsBBCenter->isChecked() && myX->text().toDouble() == 0.
- && myY->text().toDouble() == 0. && myZ->text().toDouble() == 0.;
-}
-
-void
-OCCViewer_SetRotationPointDlg
-::setEnabled(QGroupBox* theGrp, const bool theState)
-{
- QObjectList aChildren(*theGrp->children());
- QObject* anObj;
- for(anObj = aChildren.first(); anObj !=0; anObj = aChildren.next())
- {
- if (anObj !=0 && anObj->inherits("QLineEdit"))
- ((QLineEdit*)anObj)->setReadOnly(!theState);
- if (anObj !=0 && anObj->inherits("QPushButton"))
- ((QLineEdit*)anObj)->setEnabled(theState);
- }
-
-}
-
-void
-OCCViewer_SetRotationPointDlg
-::onBBCenterChecked()
-{
- setEnabled(myGroupSelButton,!myIsBBCenter->isChecked());
- setEnabled(myGroupBoxCoord,!myIsBBCenter->isChecked());
-
- if ( myIsBBCenter->isChecked() )
- {
- if ( mySelectPoint->state() == QButton::On )
- mySelectPoint->toggle();
- myView->activateSetRotationGravity();
- }
- else
- myView->activateSetRotationSelected(myX->text().toDouble(),
- myY->text().toDouble(),
- myZ->text().toDouble());
-}
-
-void
-OCCViewer_SetRotationPointDlg
-::onToOrigin()
-{
- if ( mySelectPoint->state() == QButton::On )
- mySelectPoint->toggle();
- setCoords();
- myView->activateSetRotationSelected(myX->text().toDouble(),
- myY->text().toDouble(),
- myZ->text().toDouble());
-}
-
-void
-OCCViewer_SetRotationPointDlg
-::onSelectPoint()
-{
- if ( mySelectPoint->state() == QButton::On )
- myView->activateStartPointSelection();
- else
- mySelectPoint->toggle();
-}
-
-void
-OCCViewer_SetRotationPointDlg
-::onCoordChanged()
-{
- if ( !myIsBBCenter->isChecked() )
- {
- if ( mySelectPoint->state() == QButton::On
- &&
- ( myX->hasFocus() || myY->hasFocus() || myZ->hasFocus() ) )
- mySelectPoint->toggle();
- myView->activateSetRotationSelected(myX->text().toDouble(),
- myY->text().toDouble(),
- myZ->text().toDouble());
- }
-}
-
-void
-OCCViewer_SetRotationPointDlg
-::setCoords(double theX, double theY, double theZ)
-{
- myX->setText(QString::number(theX));
- myY->setText(QString::number(theY));
- myZ->setText(QString::number(theZ));
-}
-
-void
-OCCViewer_SetRotationPointDlg
-::toggleChange()
-{
- if ( !myIsBBCenter->isChecked() )
- mySelectPoint->toggle();
-}
-
-void
-OCCViewer_SetRotationPointDlg
-::onClickClose()
-{
- myAction->setOn( false );
- reject();
-}
-
-void
-OCCViewer_SetRotationPointDlg
-::onViewShow()
-{
- if(myAction->isOn())
- show();
- else
- hide();
-}
-
-void
-OCCViewer_SetRotationPointDlg
-::onViewHide()
-{
- hide();
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 OCCVIEWER_SETROTATIONPOINTDLG_H
-#define OCCVIEWER_SETROTATIONPOINTDLG_H
-
-#include "OCCViewer.h"
-
-#include <qdialog.h>
-
-class QtxAction;
-
-class QLineEdit;
-class QPushButton;
-class QGroupBox;
-class QButtonGroup;
-class QCheckBox;
-
-class OCCViewer_ViewWindow;
-
-class OCCVIEWER_EXPORT OCCViewer_SetRotationPointDlg : public QDialog
-{
- Q_OBJECT
-
-public:
- OCCViewer_SetRotationPointDlg(OCCViewer_ViewWindow* , QWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0);
- ~OCCViewer_SetRotationPointDlg();
-
- void SetAction( QtxAction* theAction ) { myAction = theAction; }
- bool IsFirstShown();
-
- void setCoords(double theX=0., double theY=0., double theZ=0.);
- void toggleChange();
-
-protected:
- OCCViewer_ViewWindow* myView;
- QtxAction* myAction;
-
- QCheckBox* myIsBBCenter;
-
- QButtonGroup* myGroupSelButton;
- QPushButton* myToOrigin;
- QPushButton* mySelectPoint;
-
- QGroupBox* myGroupBoxCoord;
- QLineEdit* myX;
- QLineEdit* myY;
- QLineEdit* myZ;
-
- void setEnabled(QGroupBox* theGrp, const bool theState);
-
-protected slots:
- void onBBCenterChecked();
-
- void onToOrigin();
- void onSelectPoint();
-
- void onCoordChanged();
-
- void onClickClose();
-
- void onViewShow();
- void onViewHide();
-};
-
-#endif // OCCVIEWER_SETROTATIONPOINTDLG_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "OCCViewer_VService.h"
-#include <V3d_Viewer.hxx>
-#include <V3d_View.hxx>
-#include <Viewer_Viewer.hxx>
-
-#include <V2d_Viewer.hxx>
-#include <V2d_View.hxx>
-#include <Viewer_Viewer.hxx>
-
-#ifdef WNT
-#include <WNT_Window.hxx>
-#include <Graphic3d_WNTGraphicDevice.hxx>
-#include <WNT_GraphicDevice.hxx>
-#include <WNT_GraphicDevice.hxx>
-#include <WNT_WDriver.hxx>
-#else
-#include <Xw_Window.hxx>
-#include <Graphic3d_GraphicDevice.hxx>
-#include <Xw_Driver.hxx>
-//#include <Xdps_Driver.hxx>
-#include <Xw_TypeOfMapping.hxx>
-#endif
-
-// For 2d
-#define LOPTIM
-#ifdef WNT
-#ifndef LOPTIM
-static Handle(WNT_GraphicDevice) XServiceDefault2dDevice;
-static Handle(WNT_GraphicDevice) XServiceImageDevice;
-#else
-static Handle(WNT_GraphicDevice)& _XServiceDefault2dDevice() {
-static Handle(WNT_GraphicDevice) XServiceDefault2dDevice;
-return XServiceDefault2dDevice;
-}
-#define XServiceDefault2dDevice _XServiceDefault2dDevice()
-
-static Handle(WNT_GraphicDevice)& _XServiceImageDevice() {
-static Handle(WNT_GraphicDevice) XServiceImageDevice;
-return XServiceImageDevice;
-}
-#define XServiceImageDevice _XServiceImageDevice()
-#endif // LOPTIM
-#else
-#ifndef LOPTIM
-static Handle(Xw_GraphicDevice) XServiceDefault2dDevice;
-static Handle(Xw_GraphicDevice) XServiceImageDevice;
-#else
-static Handle(Xw_GraphicDevice)& _XServiceDefault2dDevice() {
-static Handle(Xw_GraphicDevice) XServiceDefault2dDevice;
-return XServiceDefault2dDevice;
-}
-#define XServiceDefault2dDevice _XServiceImageDevice()
-
-static Handle(Xw_GraphicDevice)& _XServiceImageDevice() {
-static Handle(Xw_GraphicDevice) XServiceImageDevice;
-return XServiceImageDevice;
-}
-#define XServiceImageDevice _XServiceImageDevice()
-#endif // LOPTIM
-#endif // WNT
-
-/*!
- Maps CasCade view to the window [ static ]
-*/
-void OCCViewer_VService::SetWindow( const Handle(V3d_View)& view,
- const Standard_Integer hiwin,
- const Standard_Integer lowin,
- const Xw_WindowQuality quality )
-{
-#ifdef WNT
- Handle(WNT_Window) w =
- new WNT_Window( Handle(Graphic3d_WNTGraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin );
-#else
- Handle(Xw_Window) w =
- new Xw_Window( Handle(Graphic3d_GraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin, quality );
-#endif
- view->SetWindow( w );
-}
-
-/*!
- Magnifies 'view' based on previous view [ static ]
-*/
-void OCCViewer_VService::SetMagnify( const Handle(V3d_View)& view,
- const Standard_Integer hiwin,
- const Standard_Integer lowin,
- const Handle(V3d_View)& prevView,
- const Standard_Integer x1,
- const Standard_Integer y1,
- const Standard_Integer x2,
- const Standard_Integer y2,
- const Xw_WindowQuality aQuality )
-{
-#ifdef WNT
- Handle(WNT_Window) w =
- new WNT_Window( Handle(Graphic3d_WNTGraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin );
-#else
- Handle(Xw_Window) w =
- new Xw_Window( Handle(Graphic3d_GraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin, aQuality );
-#endif
- view->SetMagnify( w, prevView, x1, y1, x2, y2 );
-}
-
-/*!
- Creates viewer 3d [ static ]
-*/
-Handle(V3d_Viewer) OCCViewer_VService::Viewer3d( const Standard_CString aDisplay,
- const Standard_ExtString aName,
- const Standard_CString aDomain,
- const Standard_Real ViewSize ,
- const V3d_TypeOfOrientation ViewProj,
- const Standard_Boolean ComputedMode,
- const Standard_Boolean aDefaultComputedMode )
-{
-#ifndef WNT
- static Handle(Graphic3d_GraphicDevice) defaultdevice;
- if ( defaultdevice.IsNull() )
- defaultdevice = new Graphic3d_GraphicDevice( aDisplay );
- return new V3d_Viewer( defaultdevice, aName, aDomain, ViewSize, ViewProj,
- Quantity_NOC_GRAY30, V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
- ComputedMode, aDefaultComputedMode, V3d_TEX_NONE );
-#else
- static Handle(Graphic3d_WNTGraphicDevice) defaultdevice;
- if ( defaultdevice.IsNull() )
- defaultdevice = new Graphic3d_WNTGraphicDevice();
- return new V3d_Viewer( defaultdevice, aName, aDomain, ViewSize, ViewProj,
- Quantity_NOC_GRAY30, V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
- ComputedMode, aDefaultComputedMode, V3d_TEX_NONE);
-#endif // WNT
-}
-
-/*!
- Creates view 2D and maps it to the window [ static ]
-*/
-/*Handle(V2d_View) OCCViewer_VService::View2d( const Handle(V2d_Viewer)& aViewer,
- const Standard_Integer hiwin,
- const Standard_Integer lowin,
- const Xw_WindowQuality aQuality,
- const Standard_Boolean Update,
- const Quantity_NameOfColor BackColor )
-{
-#ifdef WNT
- Handle(WNT_GraphicDevice) GD = Handle(WNT_GraphicDevice)::DownCast(aViewer->Device());
- Handle(WNT_Window) W = new WNT_Window( GD, hiwin, lowin, BackColor );
- Handle(WNT_WDriver) D = new WNT_WDriver( W );
-#else
- Handle(Xw_GraphicDevice) GD = Handle(Xw_GraphicDevice)::DownCast(aViewer->Device());
- Handle(Xw_Window) W = new Xw_Window( GD, hiwin, lowin, aQuality, BackColor );
- Handle(Xw_Driver) D = new Xw_Driver( W );
-#endif
- Handle(V2d_View) V = new V2d_View( D, aViewer );
- if ( Update )
- V->Update();
- return V;
-}*/
-
-/*!
- Creates view 2D and maps it to the window [ static ]
-*/
-/*Handle(V2d_View) OCCViewer_VService::dpsView2d( const Handle(V2d_Viewer)& aViewer,
- const Standard_Integer hiwin,
- const Standard_Integer lowin,
- const Xw_WindowQuality aQuality,
- const Standard_Boolean Update,
- const Quantity_NameOfColor BackColor )
-{
-#ifdef WNT
- Handle(WNT_GraphicDevice) GD = Handle(WNT_GraphicDevice)::DownCast(aViewer->Device());
- Handle(WNT_Window) W = new WNT_Window( GD, hiwin, lowin, BackColor );
- W->SetBackground( BackColor );
- Handle(WNT_WDriver) D = new WNT_WDriver( W );
-#else
- Handle(Xw_GraphicDevice) GD = Handle(Xw_GraphicDevice)::DownCast(aViewer->Device());
- Handle(Xw_Window) W = new Xw_Window( GD, hiwin, lowin, aQuality, BackColor );
- Handle(Xdps_Driver) D = new Xdps_Driver( W );
-#endif
- Handle(V2d_View) V = new V2d_View( D, aViewer );
- if ( Update )
- V->Update();
- return V;
-}*/
-
-/*!
- Creates viewer 2D [ static ]
-*/
-/*Handle(V2d_Viewer) OCCViewer_VService::Viewer2d( const Standard_CString aDisplay,
- const Standard_ExtString aName,
- const Standard_CString aDomain )
-{
-#ifdef WNT
- if ( XServiceDefault2dDevice.IsNull() )
- XServiceDefault2dDevice = new WNT_GraphicDevice();
-#else
- if ( XServiceDefault2dDevice.IsNull() )
- XServiceDefault2dDevice = new Xw_GraphicDevice( aDisplay, Xw_TOM_READONLY );
-#endif
- return new V2d_Viewer( XServiceDefault2dDevice, aName, aDomain );
-}*/
-
-/*!
- Creates viewer 2D [ static ]
-*/
-/*Handle(V2d_Viewer) OCCViewer_VService::Viewer2d( const Standard_CString aDisplay,
- const Handle(Graphic2d_View)& aView,
- const Standard_ExtString aName,
- const Standard_CString aDomain )
-{
-#ifdef WNT
- if ( XServiceDefault2dDevice.IsNull() )
- XServiceDefault2dDevice = new WNT_GraphicDevice();
-#else
- if ( XServiceDefault2dDevice.IsNull() )
- XServiceDefault2dDevice = new Xw_GraphicDevice( aDisplay, Xw_TOM_READONLY );
-#endif
- return new V2d_Viewer( XServiceDefault2dDevice, aView, aName, aDomain );
-}*/
-
-/*!
- Creates window driver [ static ]
-*/
-Handle(Aspect_WindowDriver) OCCViewer_VService::WindowDriver( const Standard_CString aDisplay,
- const Standard_Integer ahiwin,
- const Standard_Integer alowin,
- const Quantity_NameOfColor aColor )
-{
-#ifdef WNT
- if ( XServiceDefault2dDevice.IsNull() )
- XServiceDefault2dDevice = new WNT_GraphicDevice();
- Handle(WNT_Window) W = new WNT_Window( XServiceDefault2dDevice, ahiwin, alowin, aColor );
- return new WNT_WDriver( W );
-#else
- if ( XServiceDefault2dDevice.IsNull() )
- XServiceDefault2dDevice = new Xw_GraphicDevice( aDisplay, Xw_TOM_READONLY );
- Handle(Xw_Window) W = new Xw_Window( XServiceDefault2dDevice, ahiwin, alowin, Xw_WQ_DRAWINGQUALITY , aColor );
- return new Xw_Driver( W );
-#endif
-}
-
-/*!
- Creates Xdps window driver [ static ]
- On Win32 the same as OCCViewer_VService::WindowDriver()
-*/
-/*
-Handle(Aspect_WindowDriver) OCCViewer_VService::XdpsDriver( const Standard_CString aDisplay,
- const Standard_Integer ahiwin,
- const Standard_Integer alowin,
- const Quantity_NameOfColor aColor )
-{
-#ifdef WNT
- if ( XServiceDefault2dDevice.IsNull() )
- XServiceDefault2dDevice = new WNT_GraphicDevice();
- Handle(WNT_Window) W = new WNT_Window( XServiceDefault2dDevice, ahiwin, alowin, aColor );
- return new WNT_WDriver( W );
-#else
- if ( XServiceDefault2dDevice.IsNull() )
- XServiceDefault2dDevice = new Xw_GraphicDevice( aDisplay, Xw_TOM_READONLY );
- Handle(Xw_Window) W = new Xw_Window( XServiceDefault2dDevice, ahiwin, alowin,
- Xw_WQ_DRAWINGQUALITY, aColor );
- return new Xdps_Driver( W );
-#endif
-}
-*/
-/*!
- Creates Xw window driver [ static ]
- On Win32 the same as OCCViewer_VService::WindowDriver()
-*/
-Handle(Aspect_WindowDriver) OCCViewer_VService::ImageDriver( const Standard_CString aDisplay,
- const Standard_Integer ahiwin,
- const Standard_Integer alowin,
- const Quantity_NameOfColor aColor )
-{
-#ifdef WNT
- if ( XServiceImageDevice.IsNull() )
- XServiceImageDevice = new WNT_GraphicDevice();
- Handle(WNT_Window) W = new WNT_Window( XServiceImageDevice, ahiwin, alowin, aColor );
- return new WNT_WDriver( W );
-#else
- if ( XServiceImageDevice.IsNull() )
- XServiceImageDevice = new Xw_GraphicDevice( aDisplay, Xw_TOM_READONLY );
- Handle(Xw_Window) W = new Xw_Window( XServiceImageDevice, ahiwin, alowin,
- Xw_WQ_PICTUREQUALITY, aColor );
- return new Xw_Driver( W );
-#endif
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 OCCVIEWER_VSERVICE_H
-#define OCCVIEWER_VSERVICE_H
-
-#ifndef _Handle_V3d_View_HeaderFile
-#include <Handle_V3d_View.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Xw_WindowQuality_HeaderFile
-#include <Xw_WindowQuality.hxx>
-#endif
-#ifndef _Handle_V3d_Viewer_HeaderFile
-#include <Handle_V3d_Viewer.hxx>
-#endif
-#ifndef _Standard_CString_HeaderFile
-#include <Standard_CString.hxx>
-#endif
-#ifndef _Standard_ExtString_HeaderFile
-#include <Standard_ExtString.hxx>
-#endif
-#ifndef _Quantity_Length_HeaderFile
-#include <Quantity_Length.hxx>
-#endif
-#ifndef _Quantity_NameOfColor_HeaderFile
-#include <Quantity_NameOfColor.hxx>
-#endif
-#ifndef _V3d_TypeOfOrientation_HeaderFile
-#include <V3d_TypeOfOrientation.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Handle_Graphic2d_View_HeaderFile
-#include <Handle_Graphic2d_View.hxx>
-#endif
-#ifndef _Handle_Aspect_WindowDriver_HeaderFile
-#include <Handle_Aspect_WindowDriver.hxx>
-#endif
-
-class V3d_View;
-class V2d_View;
-class V3d_Viewer;
-class V2d_Viewer;
-class Graphic2d_View;
-class Aspect_WindowDriver;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-class Standard_EXPORT OCCViewer_VService
-{
-public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if ( anAddress ) Standard::Free((Standard_Address&)anAddress);
- }
-
- // STATIC METHODS
- static void SetWindow( const Handle( V3d_View )& view,
- const Standard_Integer hiwin,
- const Standard_Integer lowin,
- const Xw_WindowQuality quality = Xw_WQ_3DQUALITY );
-
- static void SetMagnify( const Handle( V3d_View)& view,
- const Standard_Integer hiwin,
- const Standard_Integer lowin,
- const Handle( V3d_View)& aPreviousView,
- const Standard_Integer x1,
- const Standard_Integer y1,
- const Standard_Integer x2,
- const Standard_Integer y2,
- const Xw_WindowQuality quality = Xw_WQ_3DQUALITY );
- static Handle_V3d_Viewer
- Viewer3d( const Standard_CString display,
- const Standard_ExtString name,
- const Standard_CString domain = "",
- const Quantity_Length ViewSize = 1000.0,
- const V3d_TypeOfOrientation ViewProj = V3d_XposYnegZpos,
- const Standard_Boolean ComputedMode = Standard_True,
- const Standard_Boolean DefaultComputedMode = Standard_True );
-
- static Handle_Aspect_WindowDriver
- WindowDriver( const Standard_CString display,
- const Standard_Integer hiwin,
- const Standard_Integer lowin,
- const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );
- /*static Handle_Aspect_WindowDriver
- XdpsDriver( const Standard_CString display,
- const Standard_Integer hiwin,
- const Standard_Integer lowin,
- const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );
- */
- static Handle_Aspect_WindowDriver
- ImageDriver( const Standard_CString display,
- const Standard_Integer hiwin,
- const Standard_Integer lowin,
- const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );
-
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "OCCViewer_ViewManager.h"
-#include "OCCViewer_ViewWindow.h"
-#include "SUIT_Desktop.h"
-
-/*!
- Constructor
-*/
-OCCViewer_ViewManager::OCCViewer_ViewManager( SUIT_Study* study, SUIT_Desktop* theDesktop, bool DisplayTrihedron )
-: SUIT_ViewManager( study, theDesktop, new OCCViewer_Viewer( DisplayTrihedron ) )
-{
- setTitle( tr( "OCC_VIEW_TITLE" ) );
-}
-
-/*!
- Destructor
-*/
-OCCViewer_ViewManager::~OCCViewer_ViewManager()
-{
-}
-
-/*!
- Fills popup menu with custom actions
- \param popup - popup menu to be filled with
-*/
-void OCCViewer_ViewManager::contextMenuPopup( QPopupMenu* popup )
-{
- SUIT_ViewManager::contextMenuPopup( popup );
- // if it is necessary invoke method CreatePopup of ViewPort
- // be sure that existing QPopupMenu menu is used for that.
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 OCCVIEWER_VIEWMANAGER_H
-#define OCCVIEWER_VIEWMANAGER_H
-
-#include "OCCViewer_ViewModel.h"
-
-#include "SUIT_ViewManager.h"
-
-class SUIT_Desktop;
-
-class OCCVIEWER_EXPORT OCCViewer_ViewManager : public SUIT_ViewManager
-{
- Q_OBJECT
-
-public:
- OCCViewer_ViewManager( SUIT_Study* study, SUIT_Desktop* theDesktop, bool DisplayTrihedron = true );
- ~OCCViewer_ViewManager();
-
- OCCViewer_Viewer* getOCCViewer() { return (OCCViewer_Viewer*) myViewModel; }
-
- virtual void contextMenuPopup( QPopupMenu* );
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "OCCViewer_ViewModel.h"
-#include "OCCViewer_ViewWindow.h"
-#include "OCCViewer_VService.h"
-#include "OCCViewer_ViewPort3d.h"
-
-#include "SUIT_ViewWindow.h"
-#include "SUIT_Desktop.h"
-#include "SUIT_Session.h"
-
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qcolordialog.h>
-#include <qpalette.h>
-#include <qpopupmenu.h>
-
-#include <AIS_Axis.hxx>
-#include <AIS_Drawer.hxx>
-#include <AIS_ListIteratorOfListOfInteractive.hxx>
-
-#include <Geom_Axis2Placement.hxx>
-#include <Prs3d_DatumAspect.hxx>
-#include <Prs3d_LineAspect.hxx>
-
-/*!
- Constructor
- \param DisplayTrihedron - is trihedron displayed
-*/
-OCCViewer_Viewer::OCCViewer_Viewer( bool DisplayTrihedron )
-: SUIT_ViewModel(),
-myBgColor( Qt::black )
-{
- // init CasCade viewers
- myV3dViewer = OCCViewer_VService::Viewer3d( "", (short*) "Viewer3d", "", 1000.,
- V3d_XposYnegZpos, true, true );
-
- myV3dViewer->Init();
-
- myV3dCollector = OCCViewer_VService::Viewer3d( "", (short*) "Collector3d", "", 1000.,
- V3d_XposYnegZpos, true, true );
- myV3dCollector->Init();
-
- // init selector
- myAISContext = new AIS_InteractiveContext( myV3dViewer, myV3dCollector);
-
- myAISContext->SelectionColor( Quantity_NOC_WHITE );
-
- // display isoline on planar faces (box for ex.)
- myAISContext->IsoOnPlane( true );
-
- clearViewAspects();
-
- /* create trihedron */
- if( DisplayTrihedron )
- {
- Handle(Geom_Axis2Placement) anAxis = new Geom_Axis2Placement(gp::XOY());
- myTrihedron = new AIS_Trihedron(anAxis);
- myTrihedron->SetInfiniteState( Standard_True );
-
- Quantity_Color Col(193/255., 205/255., 193/255., Quantity_TOC_RGB);
- //myTrihedron->SetColor( Col );
- myTrihedron->SetArrowColor( Col.Name() );
- myTrihedron->SetSize(100);
- Handle(AIS_Drawer) drawer = myTrihedron->Attributes();
- if (drawer->HasDatumAspect()) {
- Handle(Prs3d_DatumAspect) daspect = drawer->DatumAspect();
- daspect->FirstAxisAspect()->SetColor(Quantity_Color(1.0, 0.0, 0.0, Quantity_TOC_RGB));
- daspect->SecondAxisAspect()->SetColor(Quantity_Color(0.0, 1.0, 0.0, Quantity_TOC_RGB));
- daspect->ThirdAxisAspect()->SetColor(Quantity_Color(0.0, 0.0, 1.0, Quantity_TOC_RGB));
- }
-
- myAISContext->Display(myTrihedron);
- myAISContext->Deactivate(myTrihedron);
- }
-
- // selection
- mySelectionEnabled = true;
- myMultiSelectionEnabled = true;
-}
-
-/*!
- Destructor
-*/
-OCCViewer_Viewer::~OCCViewer_Viewer()
-{
-}
-
-/*!
- \return background color of viewer
-*/
-QColor OCCViewer_Viewer::backgroundColor() const
-{
- return myBgColor;
-}
-
-/*!
- Sets background color
- \param c - new background color
-*/
-void OCCViewer_Viewer::setBackgroundColor( const QColor& c )
-{
- if ( c.isValid() )
- myBgColor = c;
-}
-
-/*!
- Start initialization of view window
- \param view - view window to be initialized
-*/
-void OCCViewer_Viewer::initView( OCCViewer_ViewWindow* view )
-{
- if ( view ) {
- view->initLayout();
- view->initSketchers();
-
- OCCViewer_ViewPort3d* vp3d = view->getViewPort();
- if ( vp3d )
- vp3d->setBackgroundColor( myBgColor );
- }
-}
-
-/*!
- Creates new view window
- \param theDesktop - main window of application
-*/
-SUIT_ViewWindow* OCCViewer_Viewer::createView( SUIT_Desktop* theDesktop )
-{
- OCCViewer_ViewWindow* view = new OCCViewer_ViewWindow(theDesktop, this);
- initView( view );
- return view;
-}
-
-/*!
- Sets new view manager
- \param theViewManager - new view manager
-*/
-void OCCViewer_Viewer::setViewManager(SUIT_ViewManager* theViewManager)
-{
- SUIT_ViewModel::setViewManager(theViewManager);
- if (theViewManager) {
- connect(theViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
- this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
-
- connect(theViewManager, SIGNAL(mouseMove(SUIT_ViewWindow*, QMouseEvent*)),
- this, SLOT(onMouseMove(SUIT_ViewWindow*, QMouseEvent*)));
-
- connect(theViewManager, SIGNAL(mouseRelease(SUIT_ViewWindow*, QMouseEvent*)),
- this, SLOT(onMouseRelease(SUIT_ViewWindow*, QMouseEvent*)));
- }
-}
-
-/*!
- SLOT: called on mouse button press, stores current mouse position as start point for transformations
-*/
-void OCCViewer_Viewer::onMousePress(SUIT_ViewWindow* theWindow, QMouseEvent* theEvent)
-{
- myStartPnt.setX(theEvent->x()); myStartPnt.setY(theEvent->y());
-}
-
-/*!
- SLOT: called on mouse move, processes transformation or hilighting
-*/
-void OCCViewer_Viewer::onMouseMove(SUIT_ViewWindow* theWindow, QMouseEvent* theEvent)
-{
- if (!mySelectionEnabled) return;
- if (!theWindow->inherits("OCCViewer_ViewWindow")) return;
-
- OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*) theWindow;
- if ( isSelectionEnabled() )
- myAISContext->MoveTo(theEvent->x(), theEvent->y(), aView->getViewPort()->getView());
-}
-
-
-/*!
- SLOT: called on mouse button release, finishes transformation or selection
-*/
-void OCCViewer_Viewer::onMouseRelease(SUIT_ViewWindow* theWindow, QMouseEvent* theEvent)
-{
- if (!mySelectionEnabled) return;
- if (theEvent->button() != Qt::LeftButton) return;
- if (!theWindow->inherits("OCCViewer_ViewWindow")) return;
-
-
- myEndPnt.setX(theEvent->x()); myEndPnt.setY(theEvent->y());
- OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*) theWindow;
- bool aHasShift = (theEvent->state() & Qt::ShiftButton);
-
- if (!aHasShift) emit deselection();
-
- if (myStartPnt == myEndPnt)
- {
- if (aHasShift && myMultiSelectionEnabled)
- myAISContext->ShiftSelect();
- else
- myAISContext->Select();
- }
- else
- {
- if (aHasShift && myMultiSelectionEnabled)
- myAISContext->ShiftSelect(myStartPnt.x(), myStartPnt.y(),
- myEndPnt.x(), myEndPnt.y(),
- aView->getViewPort()->getView(), Standard_False );
- else
- myAISContext->Select(myStartPnt.x(), myStartPnt.y(),
- myEndPnt.x(), myEndPnt.y(),
- aView->getViewPort()->getView(), Standard_False );
-
- int Nb = myAISContext->NbSelected();
- if( Nb>1 && !myMultiSelectionEnabled )
- {
- myAISContext->InitSelected();
- Handle( SelectMgr_EntityOwner ) anOwner = myAISContext->SelectedOwner();
- if( !anOwner.IsNull() )
- {
- myAISContext->ClearSelected( Standard_False );
- myAISContext->AddOrRemoveSelected( anOwner, Standard_False );
- }
- }
-
- myAISContext->UpdateCurrentViewer();
- }
- emit selectionChanged();
-}
-
-
-/*!
- Sets selection enabled status
- \param isEnabled - new status
-*/
-void OCCViewer_Viewer::enableSelection(bool isEnabled)
-{
- mySelectionEnabled = isEnabled;
- //!! To be done for view windows
- if ( !myViewManager )
- return;
-
- QPtrVector<SUIT_ViewWindow> wins = myViewManager->getViews();
- for ( int i = 0; i < (int)wins.count(); i++ )
- {
- OCCViewer_ViewWindow* win = ::qt_cast<OCCViewer_ViewWindow*>( wins.at( i ) );
- if ( win )
- win->updateEnabledDrawMode();
- }
-}
-
-/*!
- Sets multiselection enabled status
- \param isEnabled - new status
-*/
-void OCCViewer_Viewer::enableMultiselection(bool isEnable)
-{
- myMultiSelectionEnabled = isEnable;
- //!! To be done for view windows
- if ( !myViewManager )
- return;
-
- QPtrVector<SUIT_ViewWindow> wins = myViewManager->getViews();
- for ( int i = 0; i < (int)wins.count(); i++ )
- {
- OCCViewer_ViewWindow* win = ::qt_cast<OCCViewer_ViewWindow*>( wins.at( i ) );
- if ( win )
- win->updateEnabledDrawMode();
- }
-}
-
-/*!
- Builds popup for occ viewer
-*/
-void OCCViewer_Viewer::contextMenuPopup(QPopupMenu* thePopup)
-{
- thePopup->insertItem( tr( "MEN_DUMP_VIEW" ), this, SLOT( onDumpView() ) );
- thePopup->insertItem( tr( "MEN_CHANGE_BACKGROUD" ), this, SLOT( onChangeBgColor() ) );
-
- thePopup->insertSeparator();
-
- OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*)(myViewManager->getActiveView());
- if ( aView && !aView->getToolBar()->isVisible() )
- thePopup->insertItem( tr( "MEN_SHOW_TOOLBAR" ), this, SLOT( onShowToolbar() ) );
-}
-
-/*!
- SLOT: called on dump view operation is activated, stores scene to raster file
-*/
-void OCCViewer_Viewer::onDumpView()
-{
- OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*)(myViewManager->getActiveView());
- if ( aView )
- aView->onDumpView();
-}
-
-/*!
- SLOT: called if background color is to be changed changed, passes new color to view port
-*/
-void OCCViewer_Viewer::onChangeBgColor()
-{
- OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*)(myViewManager->getActiveView());
- if( !aView )
- return;
- OCCViewer_ViewPort3d* aViewPort3d = aView->getViewPort();
- if( !aViewPort3d )
- return;
- QColor aColorActive = aViewPort3d->backgroundColor();
-
- QColor selColor = QColorDialog::getColor( aColorActive, aView);
- if ( selColor.isValid() )
- aViewPort3d->setBackgroundColor(selColor);
-}
-
-/*!
- SLOT: called when popup item "Show toolbar" is activated, shows toolbar of active view window
-*/
-void OCCViewer_Viewer::onShowToolbar() {
- OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*)(myViewManager->getActiveView());
- if ( aView )
- aView->getToolBar()->show();
-}
-
-/*!
- Updates OCC 3D viewer
-*/
-void OCCViewer_Viewer::update()
-{
- if (!myV3dViewer.IsNull())
- myV3dViewer->Update();
-
- OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*)(myViewManager->getActiveView());
- if ( aView )
- aView->updateGravityCoords();
-}
-
-/*!
- \return objects selected in 3D viewer
- \param theList - list to be filled with selected objects
-*/
-void OCCViewer_Viewer::getSelectedObjects(AIS_ListOfInteractive& theList)
-{
- theList.Clear();
- for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected())
- theList.Append(myAISContext->SelectedInteractive());
-}
-
-/*!
- Selects objects in 3D viewer. Other selected objects are left as selected
- \param theList - list objects to be selected
-*/
-void OCCViewer_Viewer::setObjectsSelected(const AIS_ListOfInteractive& theList)
-{
- AIS_ListIteratorOfListOfInteractive aIt;
- for (aIt.Initialize(theList); aIt.More(); aIt.Next())
- myAISContext->AddOrRemoveSelected(aIt.Value(), false);
- myAISContext->UpdateCurrentViewer();
-}
-
-/*!
- Auxiliary method to emit signal selectionChanged()
-*/
-void OCCViewer_Viewer::performSelectionChanged()
-{
- emit selectionChanged();
-}
-
-/*!
- SLOT, clears view aspects
-*/
-void OCCViewer_Viewer::onClearViewAspects()
-{
- clearViewAspects();
-}
-
-/*!
- Clears view aspects
-*/
-void OCCViewer_Viewer::clearViewAspects()
-{
- myViewAspects.clear();
-}
-
-/*!
- \return const reference to list of view aspects
-*/
-const viewAspectList& OCCViewer_Viewer::getViewAspects()
-{
- return myViewAspects;
-}
-
-/*!
- Appends new view aspect
- \param aParams - new view aspects
-*/
-void OCCViewer_Viewer::appendViewAspect( const viewAspect& aParams )
-{
- myViewAspects.append( aParams );
-}
-
-/*!
- Replaces old view aspects by new ones
- \param aViewList - list of new view aspects
-*/
-void OCCViewer_Viewer::updateViewAspects( const viewAspectList& aViewList )
-{
- myViewAspects = aViewList;
-}
-
-/*!
- Hilights/unhilights object in viewer
- \param obj - object to be updated
- \param hilight - if it is true, object will be hilighted, otherwise it will be unhilighted
- \param update - update current viewer
-*/
-bool OCCViewer_Viewer::highlight( const Handle(AIS_InteractiveObject)& obj,
- bool hilight, bool update )
-{
- bool isInLocal = myAISContext->HasOpenedContext();
- if( !obj.IsNull() )
- if( !isInLocal )
- {
- if ( hilight && !myAISContext->IsSelected( obj ) )
- myAISContext->AddOrRemoveCurrentObject( obj, false );
- else if ( !hilight && myAISContext->IsSelected( obj ) )
- myAISContext->AddOrRemoveCurrentObject( obj, false );
- }
-
- if ( update )
- myV3dViewer->Redraw();
-
- return false;
-}
-
-/*!
- Unhilights all objects in viewer
- \param updateviewer - update current viewer
-*/
-bool OCCViewer_Viewer::unHighlightAll( bool updateviewer )
-{
- if ( myAISContext->HasOpenedContext() )
- myAISContext->ClearSelected( updateviewer );
- else
- myAISContext->ClearCurrents( updateviewer );
- return false;
-}
-
-/*!
- \return true if object is in viewer or in collector
- \param obj - object to be checked
- \param onlyInViewer - search object only in viewer (so object must be displayed)
-*/
-bool OCCViewer_Viewer::isInViewer( const Handle(AIS_InteractiveObject)& obj,
- bool onlyInViewer )
-{
- AIS_ListOfInteractive List;
- myAISContext->DisplayedObjects(List);
-
- if( !onlyInViewer )
- {
- AIS_ListOfInteractive List1;
- myAISContext->ObjectsInCollector(List1);
- List.Append(List1);
- }
-
- AIS_ListIteratorOfListOfInteractive ite(List);
- for ( ; ite.More(); ite.Next() )
- if( ite.Value()==obj )
- return true;
-
- return false;
-}
-
-/*!
- \return true if object is displayed in viewer
- \param obj - object to be checked
-*/
-bool OCCViewer_Viewer::isVisible( const Handle(AIS_InteractiveObject)& obj )
-{
- return myAISContext->IsDisplayed( obj );
-}
-
-/*!
- Sets color of object
- \param obj - object to be updated
- \param color - new color
- \param update - update current viewer
-*/
-void OCCViewer_Viewer::setColor( const Handle(AIS_InteractiveObject)& obj,
- const QColor& color,
- bool update )
-{
- if( !obj.IsNull() )
- {
- Quantity_Color CSFColor = Quantity_Color ( color.red() / 255.,
- color.green() / 255.,
- color.blue() / 255.,
- Quantity_TOC_RGB );
- obj->SetColor( CSFColor );
- }
-
- if( update )
- myV3dViewer->Update();
-}
-
-/*!
- Changes display mode of object
- \param obj - object to be processed
- \param mode - new display mode
- \param update - update current viewer
-*/
-void OCCViewer_Viewer::switchRepresentation( const Handle(AIS_InteractiveObject)& obj,
- int mode, bool update )
-{
- myAISContext->SetDisplayMode( obj, (Standard_Integer)mode, update );
- if( update )
- myV3dViewer->Update();
-}
-
-/*!
- Changes transparency of object
- \param obj - object to be processed
- \param trans - new transparency
- \param update - update current viewer
-*/
-void OCCViewer_Viewer::setTransparency( const Handle(AIS_InteractiveObject)& obj,
- float trans, bool update )
-{
- myAISContext->SetTransparency( obj, trans, false );
- myAISContext->Redisplay( obj, Standard_False, Standard_True );
- if( update )
- myV3dViewer->Update();
-}
-
-/*!
- Changes visibility of trihedron to opposite
-*/
-void OCCViewer_Viewer::toggleTrihedron()
-{
- setTrihedronShown( !isTrihedronVisible() );
-}
-
-/*!
- \return true if trihedron is visible
-*/
-bool OCCViewer_Viewer::isTrihedronVisible() const
-{
- return !myTrihedron.IsNull() && !myAISContext.IsNull() && myAISContext->IsDisplayed( myTrihedron );
-}
-
-/*!
- Sets visibility state of trihedron
- \param on - new state
-*/
-
-void OCCViewer_Viewer::setTrihedronShown( const bool on )
-{
- if ( myTrihedron.IsNull() )
- return;
-
- if ( on )
- myAISContext->Display( myTrihedron );
- else
- myAISContext->Erase( myTrihedron );
-}
-
-/*!
- \return trihedron size
-*/
-double OCCViewer_Viewer::trihedronSize() const
-{
- double sz = 0;
- if ( !myTrihedron.IsNull() )
- sz = myTrihedron->Size();
- return sz;
-}
-
-/*!
- Changes trihedron size
- \param sz - new size
-*/
-void OCCViewer_Viewer::setTrihedronSize( const double sz )
-{
- if ( !myTrihedron.IsNull() )
- myTrihedron->SetSize( sz );
-}
-
-/*!
- Set number of isolines
- \param u - u-isolines (first parametric co-ordinate)
- \param v - v-isolines (second parametric co-ordinate)
-*/
-void OCCViewer_Viewer::setIsos( const int u, const int v )
-{
- Handle(AIS_InteractiveContext) ic = getAISContext();
- if ( ic.IsNull() )
- return;
-
- ic->SetIsoNumber( u, AIS_TOI_IsoU );
- ic->SetIsoNumber( v, AIS_TOI_IsoV );
-}
-
-/*!
- \return number of isolines
- \param u - to return u-isolines (first parametric co-ordinate)
- \param v - to return v-isolines (second parametric co-ordinate)
-*/
-void OCCViewer_Viewer::isos( int& u, int& v ) const
-{
- Handle(AIS_InteractiveContext) ic = getAISContext();
- if ( !ic.IsNull() )
- {
- u = ic->IsoNumber( AIS_TOI_IsoU );
- v = ic->IsoNumber( AIS_TOI_IsoV );
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 OCCVIEWER_VIEWMODEL_H
-#define OCCVIEWER_VIEWMODEL_H
-
-#include <qcolor.h>
-#include <qcursor.h>
-
-#include "OCCViewer.h"
-
-#include "SUIT_ViewModel.h"
-
-#include <V3d_View.hxx>
-#include <AIS_Trihedron.hxx>
-#include <AIS_ListOfInteractive.hxx>
-#include <AIS_InteractiveContext.hxx>
-
-class SUIT_ViewWindow;
-class SUIT_Desktop;
-class OCCViewer_ViewWindow;
-
-struct viewAspect
-{
-public:
- double scale;
- double centerX;
- double centerY;
- double projX;
- double projY;
- double projZ;
- double twist;
- double atX;
- double atY;
- double atZ;
- double eyeX;
- double eyeY;
- double eyeZ;
- QString name;
-};
-
-typedef QValueList<viewAspect> viewAspectList;
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-class OCCVIEWER_EXPORT OCCViewer_Viewer: public SUIT_ViewModel
-{
- Q_OBJECT
-
-public:
- static QString Type() { return "OCCViewer"; }
-
- OCCViewer_Viewer( bool DisplayTrihedron = true );
- virtual ~OCCViewer_Viewer();
-
- void update();
-
- virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
-
- virtual void setViewManager(SUIT_ViewManager* theViewManager);
- virtual QString getType() const { return Type(); }
-
- virtual void contextMenuPopup(QPopupMenu*);
-
- void getSelectedObjects(AIS_ListOfInteractive& theList);
- void setObjectsSelected(const AIS_ListOfInteractive& theList);
- void setSelected(const Handle(AIS_InteractiveObject)& theIO)
- { myAISContext->SetSelected(theIO);}
-
- void performSelectionChanged();
- // emit signal selectionChanged
-
- virtual const viewAspectList& getViewAspects();
- virtual void appendViewAspect( const viewAspect& );
- virtual void updateViewAspects( const viewAspectList& );
- virtual void clearViewAspects();
-
- QColor backgroundColor() const;
- void setBackgroundColor( const QColor& );
-
- //! returns true if 3d Trihedron in viewer was created
- bool trihedronActivated() const { return !myTrihedron.IsNull(); }
-
- void toggleTrihedron();
- bool isTrihedronVisible() const;
- virtual void setTrihedronShown( const bool );
-
- double trihedronSize() const;
- virtual void setTrihedronSize( const double );
-
-public slots:
- void onClearViewAspects();
-
-public:
- Handle(V3d_Viewer) getViewer3d() const { return myV3dViewer;}
- Handle(V3d_Viewer) getCollector3d() const { return myV3dCollector; }
- Handle(AIS_InteractiveContext) getAISContext() const { return myAISContext; }
- Handle(AIS_Trihedron) getTrihedron() const { return myTrihedron; }
-
- void enableSelection(bool isEnabled);
- bool isSelectionEnabled() const
- { return mySelectionEnabled; }
-
- void enableMultiselection(bool isEnable);
- bool isMultiSelectionEnabled() const
- { return myMultiSelectionEnabled; }
-
- int getSelectionCount() const
- { return (!myAISContext.IsNull())? myAISContext->NbSelected():0; }
-
- /* Selection management */
- bool highlight( const Handle(AIS_InteractiveObject)&, bool, bool=true );
- bool unHighlightAll( bool=true );
- bool isInViewer( const Handle(AIS_InteractiveObject)&, bool=false );
- bool isVisible( const Handle(AIS_InteractiveObject)& );
-
- void setColor( const Handle(AIS_InteractiveObject)&, const QColor&, bool=true );
- void switchRepresentation( const Handle(AIS_InteractiveObject)&, int, bool=true );
- void setTransparency( const Handle(AIS_InteractiveObject)&, float, bool=true );
- void setIsos( const int u, const int v ); // number of isolines
- void isos( int& u, int& v ) const;
-
-signals:
- void selectionChanged();
- void deselection();
-
-protected:
- void initView( OCCViewer_ViewWindow* view );
-
-protected slots:
- void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
- void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
- void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
-
- void onDumpView();
- void onShowToolbar();
- void onChangeBgColor();
-
-private:
- Handle(V3d_Viewer) myV3dViewer;
- Handle(V3d_Viewer) myV3dCollector;
-
- Handle(AIS_Trihedron) myTrihedron;
- Handle(AIS_InteractiveContext) myAISContext;
-
- viewAspectList myViewAspects;
-
- bool mySelectionEnabled;
- bool myMultiSelectionEnabled;
-
- QColor myBgColor;
- QPoint myStartPnt, myEndPnt;
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-
-#if !defined WNT
-#define QT_CLEAN_NAMESPACE /* avoid definition of INT32 and INT8 */
-#endif
-
-#include "OCCViewer_ViewPort.h"
-
-#include "SUIT_Session.h"
-
-#include <qrect.h>
-#include <qcursor.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qintdict.h>
-#include <qpopupmenu.h>
-#include <qcolordialog.h>
-
-#include <stdlib.h>
-
-#if !defined WNT
-#include <GL/glx.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include <X11/Xmu/StdCmap.h>
-#undef QT_CLEAN_NAMESPACE
-#include <Xw_Window.hxx>
-#include <Graphic3d_GraphicDevice.hxx>
-
-struct CMapEntry
-{
- CMapEntry();
- ~CMapEntry();
- Colormap cmap;
- bool alloc;
- XStandardColormap scmap;
-};
-
-/*!
- Constructor
-*/
-CMapEntry::CMapEntry()
-{
- cmap = 0;
- alloc = false;
- scmap.colormap = 0;
-}
-
-/*!
- Destructor
-*/
-CMapEntry::~CMapEntry()
-{
- if ( alloc )
- XFreeColormap( QPaintDevice::x11AppDisplay(), cmap );
-}
-
-static QIntDict<CMapEntry> *cmap_dict = 0;
-static bool mesa_gl = false;
-
-static void cleanup_cmaps()
-{
- if ( !cmap_dict )
- return;
- cmap_dict->setAutoDelete( true );
- delete cmap_dict;
- cmap_dict = 0;
-}
-
-static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
-{
- if ( !cmap_dict )
- {
- cmap_dict = new QIntDict<CMapEntry>;
- const char *v = glXQueryServerString( dpy, vi->screen, GLX_VERSION );
- mesa_gl = strstr( v,"Mesa" ) != 0;
- qAddPostRoutine( cleanup_cmaps );
- }
-
- CMapEntry *x = cmap_dict->find( (long)vi->visualid );
- if ( x ) // found colormap for visual
- return x->cmap;
-
- x = new CMapEntry();
-
- XStandardColormap *c;
- int n, i;
-
- //#ifdef DEBUG
- //cout << "Choosing cmap for vID = " << vi->visualid << endl;
- //#endif
-
- if ( vi->visualid == XVisualIDFromVisual( (Visual*)QPaintDevice::x11AppVisual() ) )
- {
-#ifdef DEBUG
- cout << "Using x11AppColormap" << endl;
-#endif
- return QPaintDevice::x11AppColormap();
- }
-
- if ( mesa_gl )
- {
- Atom hp_cmaps = XInternAtom( dpy, "_HP_RGB_SMOOTH_MAP_LIST", true );
- if ( hp_cmaps && vi->visual->c_class == TrueColor && vi->depth == 8 )
- {
- if ( XGetRGBColormaps( dpy, RootWindow( dpy, vi->screen ), &c, &n, hp_cmaps ) )
- {
- i = 0;
- while ( i < n && x->cmap == 0 )
- {
- if ( c[i].visualid == vi->visual->visualid )
- {
- x->cmap = c[i].colormap;
- x->scmap = c[i];
- }
- i++;
- }
- XFree( (char*)c );
- }
- }
- }
-#if !defined( _OS_SOLARIS_ )
- if ( !x->cmap )
- {
- if ( XmuLookupStandardColormap( dpy, vi->screen, vi->visualid, vi->depth, XA_RGB_DEFAULT_MAP, false, true ) )
- {
- if ( XGetRGBColormaps( dpy, RootWindow( dpy, vi->screen ), &c, &n, XA_RGB_DEFAULT_MAP ) )
- {
- i = 0;
- while ( i < n && x->cmap == 0 )
- {
- if ( c[i].visualid == vi->visualid )
- {
- x->cmap = c[i].colormap;
- x->scmap = c[i];
- }
- i++;
- }
- XFree( (char *)c );
- }
- }
- }
-#endif
- if ( !x->cmap )
- {
- // no shared cmap found
- x->cmap = XCreateColormap( dpy, RootWindow( dpy, vi->screen ), vi->visual, AllocNone );
- x->alloc = true;
- }
-
- cmap_dict->insert( (long)vi->visualid, x ); // associate cmap with visualid
- return x->cmap;
-}
-#endif
-
-
-/*!
- Constructor
-*/
-OCCViewer_ViewPort::OCCViewer_ViewPort( QWidget* parent )
-: QWidget( parent, 0, WRepaintNoErase | WResizeNoErase )
-{
- initialize();
-}
-
-/*!
- Destructor
-*/
-OCCViewer_ViewPort::~OCCViewer_ViewPort()
-{
- cleanup();
-}
-
-/*!
- Initializes viewport. [ private ]
-*/
-void OCCViewer_ViewPort::initialize()
-{
- myPopupActions.setAutoDelete( true );
- myPaintersRedrawing = false;
- myEnableSketching = true;
- myEnableTransform = true;
-
- setMouseTracking( true );
- setBackgroundMode( NoBackground );
- // set focus policy to threat QContextMenuEvent from keyboard
- setFocusPolicy( StrongFocus );
-}
-
-/*!
- Cleans up the viewport. [ private ]
-*/
-void OCCViewer_ViewPort::cleanup()
-{
-}
-
-/*!
- Selects visual ID for OpenGL window ( X11 specific ). [ protected ]
-*/
-void OCCViewer_ViewPort::selectVisualId()
-{
-#if !defined WNT
- XVisualInfo* pVisualInfo;
- if ( x11Display() )
- {
- /* Initialization with the default VisualID */
- Visual *v = DefaultVisual( x11Display(), DefaultScreen( x11Display() ) );
- int visualID = XVisualIDFromVisual( v );
-
- /* Here we use the settings from Optimizer_ViewInfo::TxglCreateWindow() */
- int visualAttr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, None };
-
- pVisualInfo = ::glXChooseVisual( x11Display(), DefaultScreen( x11Display() ), visualAttr );
-
- if ( isVisible() )
- hide();
-
- XSetWindowAttributes a;
-
- a.colormap = choose_cmap( x11Display(), pVisualInfo ); /* find best colormap */
- a.background_pixel = backgroundColor().pixel();
- a.border_pixel = black.pixel();
- Window p = RootWindow( x11Display(), DefaultScreen( x11Display() ) );
- if ( parentWidget() )
- p = parentWidget()->winId();
-
- Window w;
- /* if ( type == Type2D ) // creating simple X window for 2d
- {
- unsigned long xbackground =
- BlackPixel( x11Display(), DefaultScreen( x11Display() ) );
- unsigned long xforeground =
- WhitePixel( x11Display(), DefaultScreen( x11Display() ) );
-
- w = XCreateSimpleWindow ( x11Display(), p, x(), y(), width(),
- height(), 0, xforeground, xbackground );
- }
- else if ( type == Type3D )
- {
- w = XCreateWindow( x11Display(), p, x(), y(), width(), height(),
- 0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
- CWBackPixel | CWBorderPixel | CWColormap, &a );
- }
- else
- return;*/
- w = XCreateWindow( x11Display(), p, x(), y(), width(), height(),
- 0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
- CWBackPixel | CWBorderPixel | CWColormap, &a );
-
- Window *cmw;
- Window *cmwret;
- int count;
- if ( XGetWMColormapWindows( x11Display(), topLevelWidget()->winId(), &cmwret, &count ) )
- {
- cmw = new Window[count+1];
- memcpy( (char*)cmw, (char*)cmwret, sizeof(Window) * count );
- XFree( (char*)cmwret );
- int i;
-
- for ( i = 0; i < count; i++ )
- {
- if ( cmw[i] == winId() ) /* replace old window */
- {
- cmw[i] = w;
- break;
- }
- }
-
- if ( i >= count ) /* append new window */
- cmw[count++] = w;
- }
- else
- {
- count = 1;
- cmw = new Window[count];
- cmw[0] = w;
- }
-
- /* Creating new window (with good VisualID) for this widget */
- create(w);
- XSetWMColormapWindows( x11Display(), topLevelWidget()->winId(), cmw, count );
- delete[] cmw;
-
- if ( isVisible() )
- show();
-
- if ( pVisualInfo )
- {
- XFree( (char *)pVisualInfo );
- }
- XFlush( x11Display() );
- }
-#endif
-}
-
-/*!
- Sets the background 'color'. [ virtual ]
-*/
-void OCCViewer_ViewPort::setBackgroundColor( const QColor& color )
-{
- QPalette pal = palette();
- pal.setColor( QColorGroup::Background, color );
- setPalette( pal );
- repaint();
- emit vpChangeBGColor( color );
-}
-
-/*!
- Returns the background color. [ virtual ]
-*/
-QColor OCCViewer_ViewPort::backgroundColor() const
-{
- return palette().active().background();
-}
-
-/*!
- Returns 'true' if sketching is enabled in this viewport. [ public ]
-*/
-bool OCCViewer_ViewPort::isSketchingEnabled() const
-{
- return myEnableSketching;
-}
-
-/*!
- Enables / disables sketching [ public ]
-*/
-void OCCViewer_ViewPort::setSketchingEnabled( bool enable )
-{
- myEnableSketching = enable;
-}
-
-/*!
- Returns 'true' if transformations ( rotation, zoom etc. )
- are enabled in this viewport. [ public ]
-*/
-bool OCCViewer_ViewPort::isTransformEnabled() const
-{
- return myEnableTransform;
-}
-
-/*!
- Enables / disables transformations. [ public ]
-*/
-void OCCViewer_ViewPort::setTransformEnabled( bool enable )
-{
- myEnableTransform = enable;
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void OCCViewer_ViewPort::mousePressEvent( QMouseEvent *e )
-{
- emit vpMouseEvent( e );
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void OCCViewer_ViewPort::mouseMoveEvent( QMouseEvent* e )
-{
- emit vpMouseEvent( e );
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void OCCViewer_ViewPort::mouseReleaseEvent( QMouseEvent *e )
-{
- emit vpMouseEvent( e );
-}
-
-/*!
- Emits 'mouseEvent' signal. [ virtual protected ]
-*/
-void OCCViewer_ViewPort::mouseDoubleClickEvent( QMouseEvent *e )
-{
- emit vpMouseEvent( e );
-}
-
-/*!
- Emits 'keyEvent' signal. [ virtual protected ]
-*/
-void OCCViewer_ViewPort::keyPressEvent( QKeyEvent *e )
-{
- emit vpKeyEvent( e );
-}
-
-/*!
- Emits 'keyEvent' signal. [ virtual protected ]
-*/
-void OCCViewer_ViewPort::keyReleaseEvent( QKeyEvent *e )
-{
- emit vpKeyEvent( e );
-}
-
-/*!
- Repaints the viewport. [ virtual protected ]
-*/
-void OCCViewer_ViewPort::paintEvent( QPaintEvent* )
-{
- if ( myPaintersRedrawing )
- {
- QPainter p( this );
- emit vpDrawExternal( &p );
- myPaintersRedrawing = false;
- }
-}
-
-/*!
- Forces to redraw the viewport by an external painter. [ public ]
-*/
-void OCCViewer_ViewPort::redrawPainters()
-{
- myPaintersRedrawing = true;
- repaint();
-}
-
-/*!
- Updates this view. Does nothing by default. [ virtual public ]
-*/
-void OCCViewer_ViewPort::onUpdate()
-{
-}
-
-/*!
- Creates the popup. [ virtual protected ]
-*/
-/*void OCCViewer_ViewPort::onCreatePopup( QPopupMenu* popup )
-{
- if ( popup )
- {
- QtxAction* a = new QtxAction( "", tr( "MEN_VP_CHANGEBGR" ), 0, this );
- a->setStatusTip( tr( "PRP_VP_CHANGEBGR" ) );
- connect( a, SIGNAL( activated() ), SLOT( onChangeBgColor()));
- myPopupActions.append( a );
- a->addTo( popup );
- }
-}*/
-
-/*!
- Destroys the popup. [ virtual protected ]
-*/
-/*void OCCViewer_ViewPort::onDestroyPopup( QPopupMenu* popup )
-{
- if ( popup )
- {
- for ( QtxAction* a = myPopupActions.first(); a; a = myPopupActions.next() )
- a->removeFrom( popup );
- myPopupActions.clear();
- }
-}*/
-
-/*!
- Sets the background color with color selection dialog. [ virtual protected slot ]
-*/
-void OCCViewer_ViewPort::onChangeBgColor()
-{
- QColor selColor = QColorDialog::getColor ( backgroundColor(), this );
- if ( selColor.isValid() )
- setBackgroundColor( selColor );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 OCCVIEWER_VIEWPORT_H
-#define OCCVIEWER_VIEWPORT_H
-
-#include "OCCViewer.h"
-
-#include "QtxAction.h"
-
-#include <qlist.h>
-#include <qcolor.h>
-#include <qwidget.h>
-
-#include <Aspect_Window.hxx>
-
-class QRect;
-class QCursor;
-class QPainter;
-class OCCViewer_ViewSketcher;
-class OCCViewer_ViewTransformer;
-
-#ifdef WIN32
-#pragma warning ( disable:4251 )
-#endif
-
-/*!
- \class OCCViewer_ViewPort
- Visualisation canvas of SUIT-based application
-*/
-class OCCVIEWER_EXPORT OCCViewer_ViewPort : public QWidget
-{
- Q_OBJECT
-
- friend class OCCViewer_ViewSketcher;
-
-public:
- OCCViewer_ViewPort( QWidget* parent );
- virtual ~OCCViewer_ViewPort();
-
-public:
- void setSketchingEnabled( bool );
- bool isSketchingEnabled() const;
- void setTransformEnabled( bool );
- bool isTransformEnabled() const;
-
- virtual QColor backgroundColor() const;
- virtual void setBackgroundColor( const QColor& );
-
- void redrawPainters();
-
- virtual void onUpdate();
-
-protected:
-// enum ViewType { Type2D, Type3D };
- void selectVisualId();
-
-// EVENTS
- virtual void paintEvent( QPaintEvent *);
- virtual void mouseMoveEvent( QMouseEvent *);
- virtual void mouseReleaseEvent( QMouseEvent *);
- virtual void mousePressEvent( QMouseEvent *);
- virtual void mouseDoubleClickEvent( QMouseEvent *);
- virtual void keyPressEvent( QKeyEvent *);
- virtual void keyReleaseEvent( QKeyEvent *);
-
-// TO BE REDEFINED
- virtual void reset() = 0;
- virtual void pan( int, int ) = 0;
- virtual void setCenter( int, int ) = 0;
- virtual void fitRect( const QRect& ) = 0;
- virtual void zoom( int, int, int, int ) = 0;
- virtual void fitAll( bool keepScale = false, bool withZ = true, bool upd = true ) = 0;
-
-// POPUP
-// void onCreatePopup( QPopupMenu* );
-// void onDestroyPopup( QPopupMenu* );
-
-protected slots:
- virtual void onChangeBgColor();
-
-signals:
- void vpKeyEvent( QKeyEvent* );
- void vpMouseEvent( QMouseEvent* );
- void vpDrawExternal( QPainter* );
- void vpChangeBGColor( QColor );
-
-private:
- void initialize();
- void cleanup();
-
-protected:
- Handle(Aspect_Window) myWindow;
- bool myEnableSketching;
- bool myEnableTransform;
- bool myPaintersRedrawing; /* set to draw externally */
- QPtrList<QtxAction> myPopupActions;
-
-private:
- static int nCounter; /* objects counter */
-};
-
-#ifdef WIN32
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "OCCViewer_ViewPort3d.h"
-
-#include "OCCViewer_VService.h"
-#include "OCCViewer_ViewWindow.h"
-
-#include <qrect.h>
-#include <qevent.h>
-#include <qapplication.h>
-
-#include <Visual3d_View.hxx>
-#include <V3d_PerspectiveView.hxx>
-#include <V3d_OrthographicView.hxx>
-
-#if defined WNT
-#include <WNT_Window.hxx>
-#else
-#include <Xw_Window.hxx>
-#endif
-
-static double rx = 0.;
-static double ry = 0.;
-static int sx = 0;
-static int sy = 0;
-static Standard_Boolean zRotation = Standard_False;
-
-/*!
- Constructor
-*/
-OCCViewer_ViewPort3d::OCCViewer_ViewPort3d( QWidget* parent, const Handle( V3d_Viewer)& viewer, V3d_TypeOfView type )
-: OCCViewer_ViewPort( parent ),
-myScale( 1.0 ),
-myDegenerated( true ),
-myAnimate( false )
-{
- selectVisualId();
-
- if ( type == V3d_ORTHOGRAPHIC ) {
- myOrthoView = new V3d_OrthographicView( viewer );
- myActiveView = myOrthoView;
- myPerspView = 0;
- } else {
- myPerspView = new V3d_PerspectiveView( viewer );
- myActiveView = myPerspView;
- }
- if ( myDegenerated )
- activeView()->SetDegenerateModeOn();
-}
-
-/*!
- Destructor
-*/
-OCCViewer_ViewPort3d::~OCCViewer_ViewPort3d()
-{
- Handle(V3d_View) aView = activeView();
- if (!aView.IsNull())
- aView->Remove();
-}
-
-/*!
- Activates the desired 'type' of view in the viewer
- ( view of 'type' is created if it doesn't exist ). [ public ]
-*/
-/*void OCCViewer_ViewPort3d::setActive( V3d_TypeOfView type )
-{
- if ( activeView().IsNull() )
- return;
-
- if ( activeView()->Type() != type )
- {
- if ( type == V3d_ORTHOGRAPHIC )
- setView( myOrthoView );
- if ( type == V3d_PERSPECTIVE )
- setView( myPerspView );
- }
-}*/
-
-/*!
- Maps CasCade 'view' to this viewport. [ private ]
-*/
-bool OCCViewer_ViewPort3d::mapView( const Handle(V3d_View)& view )
-{
- if ( !setWindow( view ) )
- return false;
-
- if ( !mapped( view ) )
- {
- view->SetWindow( myWindow );
- if ( view != activeView() )
- view->View()->Deactivate();
- }
- return true;
-}
-
-/*!
- Sets new CASCADE view on viewport. Returns the previous active view. [ public ]
-*/
-Handle( V3d_View ) OCCViewer_ViewPort3d::setView( const Handle( V3d_View )& view )
-{
- /* map the new view */
- if ( view == activeView() || !mapView( view ) )
- return activeView();
-
- /* activate the new view*/
- Handle( V3d_View ) oldView = activeView();
- if ( !oldView.IsNull() )
- {
- oldView->View()->Deactivate();
- view->SetBackgroundColor( oldView->BackgroundColor() );
- }
- if ( myDegenerated )
- view->SetDegenerateModeOn();
- else
- view->SetDegenerateModeOff();
-
- view->View()->Activate();
- activeView() = view;
- return oldView;
-}
-
-/*!
- Returns CasCade 3D view. [ public ]
-*/
-Handle(V3d_View) OCCViewer_ViewPort3d::getView() const
-{
- return activeView();
-}
-
-/*!
- Returns CasCade 3D viewer [ public ]
-*/
-Handle(V3d_Viewer) OCCViewer_ViewPort3d::getViewer() const
-{
- Handle(V3d_Viewer) viewer;
- if ( !activeView().IsNull() )
- viewer = activeView()->Viewer();
- return viewer;
-}
-
-/*!
- Syncronizes visual state of this viewport with 'ref'
- ( scale, projection, eye etc ) Returns 'true' if copied OK,
- 'false' otherwise. [ virtual public ]
-*/
-bool OCCViewer_ViewPort3d::syncronize( const OCCViewer_ViewPort3d* ref )
-{
- OCCViewer_ViewPort3d* ref3d = (OCCViewer_ViewPort3d*)ref;
- Handle(V3d_View) refView = ref3d->getView();
- Handle(V3d_View) tgtView = getView();
-
- /* Syncronize view types */
-/* if ( tgtView->Type() != refView->Type() )
- {
- setActive( refView->Type() );
- tgtView = getView();
- }*/
-
- /* The following params are copied:
- - view type( ortho/persp )
- - position of view point
- - orientation of high point
- - position of the eye
- - projection vector
- - view center ( 2D )
- - view twist
- - view scale
- */
-
- /* we'll update after setting all params */
- tgtView->SetImmediateUpdate( Standard_False );
-
- /* perspective */
- if ( refView->Type() == V3d_PERSPECTIVE )
- tgtView->SetFocale( refView->Focale() );
-
- /* copy params */
- Standard_Real x, y, z;
- refView->At( x, y, z ); tgtView->SetAt( x, y, z );
- refView->Up( x, y, z ); tgtView->SetUp( x, y, z );
- refView->Eye( x, y, z ); tgtView->SetEye( x, y, z );
- refView->Proj( x, y, z ); tgtView->SetProj( x, y, z );
- refView->Center( x, y ); tgtView->SetCenter( x, y );
- tgtView->SetScale( refView->Scale() );
- tgtView->SetTwist( refView->Twist() );
-
- /* update */
- tgtView->Update();
- tgtView->SetImmediateUpdate( Standard_True );
- return true;
-}
-
-/*!
- Returns Z-size of this view. [ public ]
-*/
-double OCCViewer_ViewPort3d::getZSize() const
-{
- if ( !activeView().IsNull() )
- return activeView()->ZSize();
- return 0;
-}
-
-/*!
- Sets Z-size of this view ( for both orthographic and perspective ). [ public ]
-*/
-void OCCViewer_ViewPort3d::setZSize( double zsize )
-{
- myActiveView->SetZSize( zsize );
-/* if ( !myOrthoView.IsNull() )
- myOrthoView->SetZSize( zsize );
- if ( !myPerspView.IsNull() )
- myPerspView->SetZSize( zsize );*/
-}
-
-/*!
- Returns the background color [ virtual public ]
-*/
-QColor OCCViewer_ViewPort3d::backgroundColor() const
-{
- if ( !activeView().IsNull() )
- {
- Standard_Real aRed, aGreen, aBlue;
- activeView()->BackgroundColor( Quantity_TOC_RGB, aRed, aGreen, aBlue );
- int red = (int) (aRed * 255);
- int green = (int) (aGreen * 255);
- int blue = (int) (aBlue * 255);
- return QColor( red, green, blue );
- }
- return OCCViewer_ViewPort::backgroundColor();
-}
-
-/*!
- Sets the background color [ virtual public ]
-*/
-void OCCViewer_ViewPort3d::setBackgroundColor( const QColor& color )
-{
- if ( !activeView().IsNull() )
- {
- activeView()->SetBackgroundColor( Quantity_TOC_RGB, color.red()/255.,
- color.green()/255., color.blue()/255.);
- activeView()->Update();
- emit vpChangeBGColor( color );
- }
-}
-
-/*!
- Set animation mode
- \param theDegenerated - degenerated mode
-*/
-void OCCViewer_ViewPort3d::setAnimationMode(bool theDegenerated)
-{
- if ( !activeView().IsNull() )
- {
- myAnimate = theDegenerated;
- activeView()->SetAnimationMode(true, theDegenerated);
- }
-}
-
-/*!
- Updates the active viewport. [ virtual public ]
-*/
-void OCCViewer_ViewPort3d::onUpdate()
-{
- if ( !activeView().IsNull() )
- activeView()->Update();
-}
-
-/*!
- Called at 'window fit' transformation. [ virtual protected ]
-*/
-void OCCViewer_ViewPort3d::fitRect( const QRect& rect )
-{
- if ( !activeView().IsNull() )
- activeView()->WindowFit( rect.left(), rect.top(), rect.right(), rect.bottom() );
-}
-
-/*!
- Called at 'zoom' transformation. [ virtual protected ]
-*/
-void OCCViewer_ViewPort3d::zoom( int x0, int y0, int x, int y )
-{
- if ( !activeView().IsNull() ) {
- // as OCCT respects a sign of only dx,
- // but we want both signes to be taken into account
- //activeView()->Zoom( x0, y0, x, y );
- activeView()->Zoom( x0 + y0, 0, x + y, 0 );
- }
-}
-
-/*!
- Centers the viewport. [ virtual protected ]
-*/
-void OCCViewer_ViewPort3d::setCenter( int x, int y )
-{
- if ( !activeView().IsNull() )
- activeView()->Place( x, y, myScale );
-}
-
-/*!
- Called at 'pan' transformation. [ virtual protected ]
-*/
-void OCCViewer_ViewPort3d::pan( int dx, int dy )
-{
- if ( !activeView().IsNull() )
- activeView()->Pan( dx, dy, 1.0 );
-}
-
-/*!
- Inits 'rotation' transformation. [ protected ]
-*/
-void OCCViewer_ViewPort3d::startRotation( int x, int y,
- int theRotationPointType,
- const gp_Pnt& theSelectedPoint )
-{
- if ( !activeView().IsNull() )
- {
- myDegenerated = activeView()->DegenerateModeIsOn();
- activeView()->SetDegenerateModeOn();
- if (myAnimate) activeView()->SetAnimationModeOn();
-
- //double gx, gy, gz;
- //double gx = activeView()->gx;
- //activeView()->Gravity(gx,gy,gz);
-
- switch ( theRotationPointType ) {
- case OCCViewer_ViewWindow::GRAVITY:
- activeView()->StartRotation( x, y, 0.45 );
- break;
- case OCCViewer_ViewWindow::SELECTED:
- sx = x; sy = y;
-
- double X,Y;
- activeView()->Size(X,Y);
- rx = Standard_Real(activeView()->Convert(X));
- ry = Standard_Real(activeView()->Convert(Y));
-
- activeView()->Rotate( 0., 0., 0.,
- theSelectedPoint.X(),theSelectedPoint.Y(), theSelectedPoint.Z(),
- Standard_True );
-
- Quantity_Ratio zRotationThreshold;
- zRotation = Standard_False;
- zRotationThreshold = 0.45;
- if( zRotationThreshold > 0. ) {
- Standard_Real dx = Abs(sx - rx/2.);
- Standard_Real dy = Abs(sy - ry/2.);
- Standard_Real dd = zRotationThreshold * (rx + ry)/2.;
- if( dx > dd || dy > dd ) zRotation = Standard_True;
- }
- break;
- default:
- break;
- }
- }
-}
-
-/*!
- Rotates the viewport. [ protected ]
-*/
-void OCCViewer_ViewPort3d::rotate( int x, int y,
- int theRotationPointType,
- const gp_Pnt& theSelectedPoint )
-{
- if ( !activeView().IsNull() ) {
- switch ( theRotationPointType ) {
- case OCCViewer_ViewWindow::GRAVITY:
- activeView()->Rotation( x, y );
- break;
- case OCCViewer_ViewWindow::SELECTED:
- double dx, dy, dz;
- if( zRotation ) {
- dz = atan2(Standard_Real(x)-rx/2., ry/2.-Standard_Real(y)) -
- atan2(sx-rx/2.,ry/2.-sy);
- dx = dy = 0.;
- }
- else {
- dx = (Standard_Real(x) - sx) * Standard_PI/rx;
- dy = (sy - Standard_Real(y)) * Standard_PI/ry;
- dz = 0.;
- }
-
- activeView()->Rotate( dx, dy, dz,
- theSelectedPoint.X(),theSelectedPoint.Y(), theSelectedPoint.Z(),
- Standard_False );
- break;
- default:
- break;
- }
- }
- // setZSize( getZSize() );
-}
-
-/*!
- Resets the viewport after 'rotation'. [ protected ]
-*/
-void OCCViewer_ViewPort3d::endRotation()
-{
- if ( !activeView().IsNull() )
- {
- if (myAnimate) activeView()->SetAnimationModeOff();
- if ( !myDegenerated )
- activeView()->SetDegenerateModeOff();
- activeView()->ZFitAll(1.);
- activeView()->SetZSize(0.);
- activeView()->Update();
- }
-}
-
-/*!
- Repaints the viewport. [ virtual protected ]
-*/
-void OCCViewer_ViewPort3d::paintEvent( QPaintEvent* e )
-{
-#ifndef WNT
- /* X11 : map before show doesn't work */
- if ( !mapped( activeView() ) )
- mapView( activeView() );
-#endif
- if ( !myWindow.IsNull() )
- {
- QApplication::syncX();
- QRect rc = e->rect();
- if ( !myPaintersRedrawing )
- activeView()->Redraw( rc.x(), rc.y(), rc.width(), rc.height() );
- }
- OCCViewer_ViewPort::paintEvent( e );
-}
-
-/*!
- Resizes the viewport. [ virtual protected ]
-*/
-void OCCViewer_ViewPort3d::resizeEvent( QResizeEvent* e )
-{
-#ifdef WNT
- /* Win32 : map before first show to avoid flicker */
- if ( !mapped( activeView() ) )
- mapView( activeView() );
-#endif
- QApplication::syncX();
- if ( !activeView().IsNull() )
- activeView()->MustBeResized();
-}
-
-/*!
- Fits all objects in view. [ virtual protected ]
-*/
-void OCCViewer_ViewPort3d::fitAll( bool keepScale, bool withZ, bool upd )
-{
- if ( activeView().IsNull() )
- return;
-
-
- if ( keepScale )
- myScale = activeView()->Scale();
-
- Standard_Real margin = 0.01;
- activeView()->FitAll( margin, withZ, upd );
- activeView()->SetZSize(0.);
-}
-
-/*!
- Resets the view. [ virtual protected ]
-*/
-void OCCViewer_ViewPort3d::reset()
-{
-// double zsize = getZSize();
- if ( !activeView().IsNull() )
- activeView()->Reset();
-// setZSize( zsize );
-}
-
-/*!
- Passed the handle of native window of the component to CASCADE view. [ private ]
-*/
-bool OCCViewer_ViewPort3d::setWindow( const Handle(V3d_View)& view )
-{
- if ( !myWindow.IsNull() )
- return true;
-
- if ( view.IsNull() )
- return false;
-
- int hwnd = (int)winId();
- if ( !hwnd )
- return false;
-
- /* set this widget as the drawing window */
- short lo = (short)hwnd;
- short hi = (short)( hwnd >> 16 );
- OCCViewer_VService::SetWindow( view, (int)hi, (int)lo, Xw_WQ_SAMEQUALITY );
- myWindow = view->Window();
- return !myWindow.IsNull();
-}
-
-/*!
- Returns the current active view. [ private ]
-*/
-Handle(V3d_View) OCCViewer_ViewPort3d::activeView() const
-{
- return myActiveView;
-}
-
-/*!
- Returns the current inactive view [ private ]
-*/
-/*Handle(V3d_View) OCCViewer_ViewPort3d::inactiveView() const
-{
- return ( activeView() == myOrthoView ? myPerspView : myOrthoView );
-}*/
-
-/*!
- Returns 'true' if the given view is mapped to window. [ private ]
-*/
-bool OCCViewer_ViewPort3d::mapped( const Handle(V3d_View)& view ) const
-{
- return ( !view.IsNull() && view->View()->IsDefined() );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 OCCVIEWER_VIEWPORT3D_H
-#define OCCVIEWER_VIEWPORT3D_H
-
-#include "OCCViewer_ViewPort.h"
-
-#include <qcolor.h>
-
-#include <V3d_View.hxx>
-#include <V3d_Viewer.hxx>
-
-class QRect;
-
-#ifdef WIN32
-#pragma warning ( disable:4251 )
-#endif
-
-class OCCVIEWER_EXPORT OCCViewer_ViewPort3d: public OCCViewer_ViewPort
-{
- Q_OBJECT
-
- friend class OCCViewer_ViewTransformer;
-
-public:
- OCCViewer_ViewPort3d( QWidget*, const Handle(V3d_Viewer)&, V3d_TypeOfView = V3d_ORTHOGRAPHIC );
- virtual ~OCCViewer_ViewPort3d();
-
-public:
- Handle(V3d_View) getView() const;
- Handle(V3d_View) setView( const Handle(V3d_View)& );
- Handle(V3d_Viewer) getViewer() const;
-
- void setAnimationMode(bool theDegenerated);
-
- virtual void setBackgroundColor( const QColor& color);
- virtual QColor backgroundColor() const;
-
-// void setActive( V3d_TypeOfView );
- virtual bool syncronize( const OCCViewer_ViewPort3d* );
-
- double getZSize() const;
- void setZSize( double );
-
- virtual void onUpdate();
-
- // TRANSFORMATIONS
- virtual void reset();
- virtual void pan( int , int );
- virtual void setCenter( int , int );
- virtual void fitRect( const QRect& );
- virtual void zoom( int, int, int, int );
- virtual void fitAll( bool keepScale = false, bool withZ = true, bool upd = true );
-
- void startRotation( int, int, int, const gp_Pnt& );
- void rotate( int, int, int, const gp_Pnt& );
- void endRotation();
-
-protected:
- // EVENTS
- virtual void paintEvent( QPaintEvent* );
- virtual void resizeEvent( QResizeEvent* );
-
-private:
- Handle(V3d_View) activeView() const;
- Handle(V3d_View) inactiveView() const;
- bool mapView( const Handle(V3d_View)& );
- bool setWindow( const Handle(V3d_View)& );
- bool mapped( const Handle(V3d_View)& ) const;
-
-private:
- Handle(V3d_View) myOrthoView;
- Handle(V3d_View) myPerspView;
- Handle(V3d_View) myActiveView;
- bool myDegenerated;
- bool myAnimate;
- double myScale;
-};
-
-#ifdef WIN32
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "OCCViewer_ViewSketcher.h"
-#include "OCCViewer_ViewWindow.h"
-#include "OCCViewer_ViewPort3d.h"
-
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpointarray.h>
-
-/****************************************************************
-** Class: OCCViewer_ViewSketcher
-** Level: Public
-*****************************************************************/
-
-OCCViewer_ViewSketcher::OCCViewer_ViewSketcher( OCCViewer_ViewWindow* vw, int type )
-: QObject( vw ),
-mySketchButton( Qt::LeftButton ),
-mypViewWindow( vw ),
-myType( type ),
-mypData( 0 ),
-myResult( Neutral ),
-myButtonState( 0 )
-{
-}
-
-OCCViewer_ViewSketcher::~OCCViewer_ViewSketcher()
-{
-}
-
-void OCCViewer_ViewSketcher::activate()
-{
- OCCViewer_ViewPort3d* avp = mypViewWindow->getViewPort();
-
- mySavedCursor = avp->cursor();
- avp->setCursor( Qt::PointingHandCursor );
- avp->installEventFilter( this );
- qApp->installEventFilter( this );
-
- connect( avp, SIGNAL( vpDrawExternal( QPainter* ) ), this, SLOT( onDrawViewPort() ) );
-
- myStart = QPoint();
- myResult = Neutral;
-
- onActivate();
-}
-
-void OCCViewer_ViewSketcher::deactivate()
-{
- OCCViewer_ViewPort3d* avp = mypViewWindow->getViewPort();
-
- disconnect( avp, SIGNAL( vpDrawExternal( QPainter* ) ), this, SLOT( onDrawViewPort() ) );
-
- qApp->removeEventFilter( this );
- avp->removeEventFilter( this );
- avp->setCursor( mySavedCursor );
-
- onDeactivate();
-}
-
-int OCCViewer_ViewSketcher::type() const
-{
- return myType;
-}
-
-void* OCCViewer_ViewSketcher::data() const
-{
- return mypData;
-}
-
-int OCCViewer_ViewSketcher::result() const
-{
- return myResult;
-}
-
-int OCCViewer_ViewSketcher::buttonState() const
-{
- return myButtonState;
-}
-
-void OCCViewer_ViewSketcher::onActivate()
-{
-}
-
-void OCCViewer_ViewSketcher::onDeactivate()
-{
-}
-
-bool OCCViewer_ViewSketcher::isDefault() const
-{
- return true;
-}
-
-bool OCCViewer_ViewSketcher::eventFilter( QObject* o, QEvent* e )
-{
- OCCViewer_ViewPort3d* avp = mypViewWindow->getViewPort();
-
- SketchState state = EnTrain;
- bool ignore = false;
- if ( o == avp )
- {
- switch ( e->type() )
- {
- case QEvent::MouseMove:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- {
- QMouseEvent* me = (QMouseEvent*)e;
-
- myButtonState = me->state();
- if ( e->type() == QEvent::MouseButtonPress )
- myButtonState |= me->button();
-
- if ( myStart.isNull() && ( myButtonState & sketchButton() ) )
- {
- state = Debut;
- myStart = me->pos();
- }
-
- myCurr = me->pos();
-
- onMouse( me );
-
- if ( myResult != Neutral )
- state = Fin;
-
- ignore = true;
- break;
- }
- case QEvent::Hide:
- case QEvent::HideToParent:
- myResult = Reject;
- onSketch( Fin );
- break;
- default:
- break;
- }
- }
- if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease )
- {
- ignore = onKey( (QKeyEvent*)e );
- if ( myResult != Neutral )
- state = Fin;
- }
-
- if ( ignore )
- {
- onSketch( state );
- return true;
- }
- return QObject::eventFilter( o, e );
-}
-
-void OCCViewer_ViewSketcher::onDrawViewPort()
-{
- onSketch( Debut );
-}
-
-bool OCCViewer_ViewSketcher::onKey( QKeyEvent* )
-{
- return false;
-}
-
-void OCCViewer_ViewSketcher::onMouse( QMouseEvent* )
-{
-}
-
-int OCCViewer_ViewSketcher::sketchButton()
-{
- return mySketchButton;
-}
-
-void OCCViewer_ViewSketcher::setSketchButton( int b )
-{
- mySketchButton = b;
-}
-
-/****************************************************************
-** Class: OCCViewer_RectSketcher
-** Level: Public
-*****************************************************************/
-
-OCCViewer_RectSketcher::OCCViewer_RectSketcher( OCCViewer_ViewWindow* vw, int typ )
-: OCCViewer_ViewSketcher( vw, typ )
-{
-}
-
-OCCViewer_RectSketcher::~OCCViewer_RectSketcher()
-{
- delete mypData;
-}
-
-void OCCViewer_RectSketcher::onActivate()
-{
- mypData = new QRect();
-}
-
-void OCCViewer_RectSketcher::onDeactivate()
-{
- delete mypData;
- mypData = 0;
-}
-
-bool OCCViewer_RectSketcher::onKey( QKeyEvent* e )
-{
- if ( e->key() == Qt::Key_Escape )
- myResult = Reject;
- else if ( e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return )
- myResult = Accept;
-
- return true;
-}
-
-void OCCViewer_RectSketcher::onMouse( QMouseEvent* e )
-{
- OCCViewer_ViewPort3d* avp = mypViewWindow->getViewPort();
-
- if ( avp->rect().contains( myCurr ) )
- avp->setCursor( Qt::PointingHandCursor );
- else
- avp->setCursor( Qt::ForbiddenCursor );
-
- if ( e->type() == QEvent::MouseButtonRelease && e->button() == sketchButton() )
- {
- myResult = Accept;
- QApplication::postEvent( avp, new QMouseEvent( e->type(), e->pos(),
- e->globalPos(), e->state(), e->button() ) );
- }
-}
-
-void OCCViewer_RectSketcher::onSketch( SketchState state )
-{
- OCCViewer_ViewPort3d* avp = mypViewWindow->getViewPort();
-
- QRect* sketchRect = (QRect*)data();
- if ( myButtonState & sketchButton() )
- {
- QRect rect( QMIN( myStart.x(), myCurr.x() ), QMIN( myStart.y(), myCurr.y() ),
- QABS( myStart.x() - myCurr.x() ), QABS( myStart.y() - myCurr.y() ) );
- QPainter p( avp );
- p.setPen( Qt::white );
- p.setRasterOp( Qt::XorROP );
- if ( state != Debut && !sketchRect->isEmpty() )
- p.drawRect( *sketchRect );
- *sketchRect = rect;
- if ( !rect.isEmpty() && state != Fin )
- p.drawRect( *sketchRect );
- }
-
- if ( state == Fin )
- {
- QApplication::syncX(); /* force rectangle redrawing */
- mypViewWindow->activateSketching( OCCViewer_ViewWindow::NoSketching );
- }
-}
-
-/****************************************************************
-** Class: OCCViewer_PolygonSketcher
-** Level: Public
-*****************************************************************/
-
-OCCViewer_PolygonSketcher::OCCViewer_PolygonSketcher( OCCViewer_ViewWindow* vw, int typ )
-: OCCViewer_ViewSketcher( vw, typ ),
- myDbl ( false ),
- myToler ( 5, 5 ),
- mypPoints ( 0L ),
- myAddButton ( 0 ),
- myDelButton ( 0 )
-{
- mySketchButton = Qt::RightButton;
-}
-
-OCCViewer_PolygonSketcher::~OCCViewer_PolygonSketcher()
-{
- delete mypPoints;
- delete mypData;
-}
-
-void OCCViewer_PolygonSketcher::onActivate()
-{
- myDbl = false;
- mypData = new QPointArray( 0 );
- mypPoints = new QPointArray( 0 );
-
- switch ( sketchButton() )
- {
- case Qt::LeftButton:
- myAddButton = Qt::RightButton;
- myDelButton = Qt::MidButton;
- break;
- case Qt::MidButton:
- myAddButton = Qt::LeftButton;
- myDelButton = Qt::RightButton;
- break;
- case Qt::RightButton:
- default:
- myAddButton = Qt::LeftButton;
- myDelButton = Qt::MidButton;
- break;
- };
-}
-
-void OCCViewer_PolygonSketcher::onDeactivate()
-{
- delete mypPoints;
- mypPoints = 0;
- delete mypData;
- mypData = 0;
-}
-
-bool OCCViewer_PolygonSketcher::onKey( QKeyEvent* e )
-{
- if ( e->key() == Qt::Key_Escape )
- {
- myResult = Reject;
- return true;
- }
- else if ( e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return )
- {
- QPointArray* points = (QPointArray*)data();
- if ( points->count() )
- {
- QPoint last = points->point( points->count() - 1 );
- if ( last != myCurr )
- {
- points->resize( points->count() + 1 );
- points->setPoint( points->count() - 1, myCurr );
- }
- }
- myResult = Accept;
- return true;
- }
- else if ( e->key() == Qt::Key_Backspace && e->type() == QEvent::KeyRelease )
- {
- QPointArray* points = (QPointArray*)data();
- if ( points->count() > 1 )
- points->resize( points->count() - 1 );
- onMouse( 0 );
- return true;
- }
-
- return true;
-}
-
-void OCCViewer_PolygonSketcher::onMouse( QMouseEvent* e )
-{
- OCCViewer_ViewPort3d* avp = mypViewWindow->getViewPort();
-
- QPointArray* points = (QPointArray*)data();
- if ( !points->count() && !myStart.isNull() )
- {
- points->resize( points->count() + 1 );
- points->setPoint( points->count() - 1, myStart );
- }
-
- bool closed = false;
- bool valid = avp->rect().contains( myCurr );
- if ( !myStart.isNull() )
- {
- QRect aRect( myStart.x() - myToler.width(), myStart.y() - myToler.height(),
- 2 * myToler.width(), 2 * myToler.height() );
- closed = aRect.contains( myCurr );
- }
- valid = valid && isValid( points, myCurr );
- if ( closed && !valid )
- closed = false;
-
- if ( closed )
- avp->setCursor( Qt::CrossCursor );
- else if ( valid )
- avp->setCursor( Qt::PointingHandCursor );
- else
- avp->setCursor( Qt::ForbiddenCursor );
-
- if ( !e )
- return;
-
- if ( e->type() == QEvent::MouseButtonRelease && ( e->button() & sketchButton() ) )
- {
- myResult = Reject;
- QApplication::postEvent( avp, new QMouseEvent( e->type(), e->pos(),
- e->globalPos(), e->state(), e->button() ) );
- }
- else if ( e->type() == QEvent::MouseButtonRelease && ( e->button() & myAddButton ) )
- {
- if ( closed )
- myResult = Accept;
- else
- {
- if ( myStart.isNull() )
- myStart = myCurr;
- else
- {
- QPoint last = points->point( points->count() - 1 );
- if ( last != myCurr && valid )
- {
- points->resize( points->count() + 1 );
- points->setPoint( points->count() - 1, myCurr );
- }
- if ( valid && myDbl )
- myResult = Accept;
- }
- }
- }
- else if ( ( e->type() == QEvent::MouseButtonRelease && ( e->button() & myDelButton ) ) ||
- ( e->type() == QEvent::MouseButtonDblClick && ( e->button() & myDelButton ) ) )
- {
- if ( points->count() > 1 )
- points->resize( points->count() - 1 );
- onMouse( 0 );
- }
- myDbl = e->type() == QEvent::MouseButtonDblClick && ( e->button() & myAddButton );
-}
-
-void OCCViewer_PolygonSketcher::onSketch( SketchState state )
-{
- OCCViewer_ViewPort3d* avp = mypViewWindow->getViewPort();
-
- QPointArray* points = (QPointArray*)data();
- QPainter p( avp );
- p.setPen( Qt::white );
- p.setRasterOp( Qt::XorROP );
- if ( state != Debut )
- p.drawPolyline( *mypPoints );
-
- if ( points->count() )
- {
- mypPoints->resize( points->count() + 1 );
- for ( uint i = 0; i < points->count(); i++ )
- mypPoints->setPoint( i, points->point( i ) );
- mypPoints->setPoint( points->count(), myCurr );
- if ( state != Fin )
- p.drawPolyline( *mypPoints );
- }
-
- if ( state == Fin )
- {
- QApplication::syncX();
- mypViewWindow->activateSketching( OCCViewer_ViewWindow::NoSketching );
- }
-}
-
-bool OCCViewer_PolygonSketcher::isValid( const QPointArray* aPoints, const QPoint& aCur ) const
-{
- if ( !aPoints->count() )
- return true;
-
- if ( aPoints->count() == 1 && aPoints->point( 0 ) == aCur )
- return false;
-
- const QPoint& aLast = aPoints->point( aPoints->count() - 1 );
-
- if ( aLast == aCur )
- return true;
-
- bool res = true;
- for ( uint i = 0; i < aPoints->count() - 1 && res; i++ )
- {
- const QPoint& aStart = aPoints->point( i );
- const QPoint& anEnd = aPoints->point( i + 1 );
- res = !isIntersect( aStart, anEnd, aCur, aLast );
- }
-
- return res;
-}
-
-bool OCCViewer_PolygonSketcher::isIntersect( const QPoint& aStart1, const QPoint& anEnd1,
- const QPoint& aStart2, const QPoint& anEnd2 ) const
-{
- if ( ( aStart1 == aStart2 && anEnd1 == anEnd2 ) ||
- ( aStart1 == anEnd2 && anEnd1 == aStart2 ) )
- return true;
-
- if ( aStart1 == aStart2 || aStart2 == anEnd1 ||
- aStart1 == anEnd2 || anEnd1 == anEnd2 )
- return false;
-
- double x11 = aStart1.x() * 1.0;
- double x12 = anEnd1.x() * 1.0;
- double y11 = aStart1.y() * 1.0;
- double y12 = anEnd1.y() * 1.0;
-
- double x21 = aStart2.x() * 1.0;
- double x22 = anEnd2.x() * 1.0;
- double y21 = aStart2.y() * 1.0;
- double y22 = anEnd2.y() * 1.0;
-
- double k1 = x12 == x11 ? 0 : ( y12 - y11 ) / ( x12 - x11 );
- double k2 = x22 == x21 ? 0 : ( y22 - y21 ) / ( x22 - x21 );
-
- double b1 = y11 - k1 * x11;
- double b2 = y21 - k2 * x21;
-
- if ( k1 == k2 )
- {
- if ( b1 != b2 )
- return false;
- else
- return !( ( QMAX( x11, x12 ) <= QMIN( x21, x22 ) ||
- QMIN( x11, x12 ) >= QMAX( x21, x22 ) ) &&
- ( QMAX( y11, y12 ) <= QMIN( y21, y22 ) ||
- QMIN( y11, y12 ) >= QMAX( y21, y22 ) ) );
- }
- else
- {
- double x0 = ( b2 - b1 ) / ( k1 - k2 );
- double y0 = ( k1 * b2 - k2 * b1 ) / ( k1 - k2 );
-
- if ( QMIN( x11, x12 ) < x0 && x0 < QMAX( x11, x12 ) &&
- QMIN( y11, y12 ) < y0 && y0 < QMAX( y11, y12 ) &&
- QMIN( x21, x22 ) < x0 && x0 < QMAX( x21, x22 ) &&
- QMIN( y21, y22 ) < y0 && y0 < QMAX( y21, y22 ) )
- return true;
- }
- return false;
-}
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 OCCVIEWER_VIEWSKETCHER_H
-#define OCCVIEWER_VIEWSKETCHER_H
-
-#include "OCCViewer.h"
-
-#include <qobject.h>
-#include <qcursor.h>
-
-class OCCViewer_ViewWindow;
-
-#ifdef WNT
-#pragma warning ( disable:4251 )
-#endif
-
-/*!
- \class OCCViewer_ViewSketcher
-*/
-
-class OCCVIEWER_EXPORT OCCViewer_ViewSketcher : public QObject
-{
- Q_OBJECT
-
-public:
- enum { Neutral, Accept, Reject };
-
-public:
- OCCViewer_ViewSketcher( OCCViewer_ViewWindow*, int );
- virtual ~OCCViewer_ViewSketcher();
-
-public:
- int type() const;
- int result() const;
- int buttonState() const;
- void* data() const;
-
- void activate();
- void deactivate();
-
- int sketchButton();
- void setSketchButton( int );
-
- virtual bool isDefault() const;
- virtual bool eventFilter( QObject*, QEvent* );
-
-private slots:
- void onDrawViewPort();
-
-protected:
- enum SketchState { Debut, EnTrain, Fin };
- virtual bool onKey( QKeyEvent* );
- virtual void onMouse( QMouseEvent* );
- virtual void onSketch( SketchState ) = 0;
- virtual void onActivate();
- virtual void onDeactivate();
-
-protected:
- int mySketchButton;
- OCCViewer_ViewWindow* mypViewWindow;
- int myType;
- void* mypData;
- int myResult;
- QCursor mySavedCursor;
- QPoint myStart, myCurr;
- int myButtonState;
-};
-
-/*!
- \class OCCViewer_RectSketcher
-*/
-
-class OCCVIEWER_EXPORT OCCViewer_RectSketcher : public OCCViewer_ViewSketcher
-{
-public:
- OCCViewer_RectSketcher( OCCViewer_ViewWindow*, int );
- virtual ~OCCViewer_RectSketcher();
-
-protected:
- virtual bool onKey( QKeyEvent* );
- virtual void onMouse( QMouseEvent* );
- virtual void onSketch( SketchState );
- virtual void onActivate();
- virtual void onDeactivate();
-};
-
-/*!
- \class OCCViewer_PolygonSketcher
-*/
-
-class OCCVIEWER_EXPORT OCCViewer_PolygonSketcher : public OCCViewer_ViewSketcher
-{
-public:
- OCCViewer_PolygonSketcher( OCCViewer_ViewWindow*, int );
- virtual ~OCCViewer_PolygonSketcher();
-
-protected:
- virtual bool onKey( QKeyEvent* );
- virtual void onMouse( QMouseEvent* );
- virtual void onSketch( SketchState );
- virtual void onActivate();
- virtual void onDeactivate();
-
-private:
- bool isValid( const QPointArray*, const QPoint& ) const;
- bool isIntersect( const QPoint&, const QPoint&,
- const QPoint&, const QPoint& ) const;
-
-private:
- bool myDbl;
- QSize myToler;
- QPointArray* mypPoints;
- int myAddButton;
- int myDelButton;
-};
-
-#ifdef WNT
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// OCCViewer_ViewWindow.cxx: implementation of the OCCViewer_ViewWindow class.
-
-
-#include "OCCViewer_ViewWindow.h"
-#include "OCCViewer_ViewModel.h"
-#include "OCCViewer_ViewPort3d.h"
-#include "OCCViewer_ViewManager.h"
-#include "OCCViewer_ViewSketcher.h"
-#include "OCCViewer_CreateRestoreViewDlg.h"
-#include "OCCViewer_ClippingDlg.h"
-#include "OCCViewer_SetRotationPointDlg.h"
-
-#include "SUIT_Desktop.h"
-#include "SUIT_Session.h"
-#include "SUIT_ToolButton.h"
-
-#include "SUIT_Tools.h"
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_MessageBox.h"
-
-#include <qptrlist.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qcolor.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qdatetime.h>
-#include <qimage.h>
-
-#include <V3d_Plane.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Pln.hxx>
-#include <TColgp_Array1OfPnt2d.hxx>
-
-#include <AIS_ListIteratorOfListOfInteractive.hxx>
-#include <AIS_Shape.hxx>
-
-#include <BRep_Tool.hxx>
-#include <TopoDS.hxx>
-
-#include <BRepBndLib.hxx>
-#include <Graphic3d_MapIteratorOfMapOfStructure.hxx>
-#include <Visual3d_View.hxx>
-#include <Graphic3d_MapOfStructure.hxx>
-#include <Graphic3d_Structure.hxx>
-
-static QEvent* l_mbPressEvent = 0;
-
-const char* imageZoomCursor[] = {
-"32 32 3 1",
-". c None",
-"a c #000000",
-"# c #ffffff",
-"................................",
-"................................",
-".#######........................",
-"..aaaaaaa.......................",
-"................................",
-".............#####..............",
-"...........##.aaaa##............",
-"..........#.aa.....a#...........",
-".........#.a.........#..........",
-".........#a..........#a.........",
-"........#.a...........#.........",
-"........#a............#a........",
-"........#a............#a........",
-"........#a............#a........",
-"........#a............#a........",
-".........#...........#.a........",
-".........#a..........#a.........",
-".........##.........#.a.........",
-"........#####.....##.a..........",
-".......###aaa#####.aa...........",
-"......###aa...aaaaa.......#.....",
-".....###aa................#a....",
-"....###aa.................#a....",
-"...###aa...............#######..",
-"....#aa.................aa#aaaa.",
-".....a....................#a....",
-"..........................#a....",
-"...........................a....",
-"................................",
-"................................",
-"................................",
-"................................"};
-
-const char* imageRotateCursor[] = {
-"32 32 3 1",
-". c None",
-"a c #000000",
-"# c #ffffff",
-"................................",
-"................................",
-"................................",
-"................................",
-"........#.......................",
-".......#.a......................",
-"......#######...................",
-".......#aaaaa#####..............",
-"........#..##.a#aa##........##..",
-".........a#.aa..#..a#.....##.aa.",
-".........#.a.....#...#..##.aa...",
-".........#a.......#..###.aa.....",
-"........#.a.......#a..#aa.......",
-"........#a.........#..#a........",
-"........#a.........#a.#a........",
-"........#a.........#a.#a........",
-"........#a.........#a.#a........",
-".........#.........#a#.a........",
-"........##a........#a#a.........",
-"......##.a#.......#.#.a.........",
-"....##.aa..##.....##.a..........",
-"..##.aa.....a#####.aa...........",
-"...aa.........aaa#a.............",
-"................#.a.............",
-"...............#.a..............",
-"..............#.a...............",
-"...............a................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................"};
-
-const char* imageCrossCursor[] = {
- "32 32 3 1",
- ". c None",
- "a c #000000",
- "# c #ffffff",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "...............#................",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- ".......#################........",
- "........aaaaaaa#aaaaaaaaa.......",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "................a...............",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................"};
-
-
-/*!
- Constructor
- \param theDesktop - main window of application
- \param theModel - OCC 3D viewer
-*/
-OCCViewer_ViewWindow::OCCViewer_ViewWindow(SUIT_Desktop* theDesktop, OCCViewer_Viewer* theModel)
-: SUIT_ViewWindow(theDesktop)
-{
- myModel = theModel;
- myRestoreFlag = 0;
- myEnableDrawMode = false;
- updateEnabledDrawMode();
- myClippingDlg = 0;
- mySetRotationPointDlg = 0;
-
- mypSketcher = 0;
- myCurSketch = -1;
-}
-
-/*!
- Initialization of view window
-*/
-void OCCViewer_ViewWindow::initLayout()
-{
- myViewPort = new OCCViewer_ViewPort3d( this, myModel->getViewer3d(), V3d_ORTHOGRAPHIC );
- myViewPort->setBackgroundColor(black);
- myViewPort->installEventFilter(this);
- setCentralWidget(myViewPort);
- myOperation = NOTHING;
-
- myCurrPointType = GRAVITY;
- myPrevPointType = GRAVITY;
- mySelectedPoint = gp_Pnt(0.,0.,0.);
- myRotationPointSelection = false;
-
- setTransformRequested ( NOTHING );
- setTransformInProcess ( false );
-
- myToolBar = new QToolBar(this);
- myToolBar->setCloseMode(QDockWindow::Undocked);
- myToolBar->setLabel(tr("LBL_TOOLBAR_LABEL"));
-
- createActions();
- createToolBar();
-}
-
-/*!
- \return type of operation by states of mouse and keyboard buttons
- \param theEvent - mouse event
-*/
-OCCViewer_ViewWindow::OperationType OCCViewer_ViewWindow::getButtonState(QMouseEvent* theEvent)
-{
- OperationType aOp = NOTHING;
- if( (theEvent->state() == SUIT_ViewModel::myStateMap[SUIT_ViewModel::ZOOM]) &&
- (theEvent->button() == SUIT_ViewModel::myButtonMap[SUIT_ViewModel::ZOOM]) )
- aOp = ZOOMVIEW;
- else if( (theEvent->state() == SUIT_ViewModel::myStateMap[SUIT_ViewModel::PAN]) &&
- (theEvent->button() == SUIT_ViewModel::myButtonMap[SUIT_ViewModel::PAN]) )
- aOp = PANVIEW;
- else if( (theEvent->state() == SUIT_ViewModel::myStateMap[SUIT_ViewModel::ROTATE]) &&
- (theEvent->button() == SUIT_ViewModel::myButtonMap[SUIT_ViewModel::ROTATE]) )
- aOp = ROTATE;
-
- return aOp;
-}
-
-/*!
- Custom event handler
-*/
-bool OCCViewer_ViewWindow::eventFilter(QObject* watched, QEvent* e)
-{
- if ( watched == myViewPort ) {
- int aType = e->type();
- switch(aType) {
- case QEvent::MouseButtonPress:
- vpMousePressEvent((QMouseEvent*) e);
- return true;
-
- case QEvent::MouseButtonRelease:
- vpMouseReleaseEvent((QMouseEvent*) e);
- return true;
-
- case QEvent::MouseMove:
- vpMouseMoveEvent((QMouseEvent*) e);
- return true;
-
- case QEvent::MouseButtonDblClick:
- emit mouseDoubleClicked(this, (QMouseEvent*)e);
- return true;
-
- case QEvent::Wheel:
- {
- QWheelEvent* aEvent = (QWheelEvent*) e;
- double aDelta = aEvent->delta();
- double aScale = (aDelta < 0) ? 100./(-aDelta) : aDelta/100.;
- myViewPort->getView()->SetZoom(aScale);
- }
- return true;
-
- case QEvent::ContextMenu:
- {
- QContextMenuEvent * aEvent = (QContextMenuEvent*)e;
- if ( aEvent->reason() != QContextMenuEvent::Mouse )
- emit contextMenuRequested( aEvent );
- }
- return true;
-
- default:
- break;
- }
- }
- return SUIT_ViewWindow::eventFilter(watched, e);
-}
-
-/*!
- Updates state of enable draw mode state
-*/
-void OCCViewer_ViewWindow::updateEnabledDrawMode()
-{
- if ( myModel )
- myEnableDrawMode = myModel->isSelectionEnabled() && myModel->isMultiSelectionEnabled();
-}
-
-/*!
- Handler of mouse press event
-*/
-void OCCViewer_ViewWindow::vpMousePressEvent(QMouseEvent* theEvent)
-{
- myStartX = theEvent->x();
- myStartY = theEvent->y();
- switch ( myOperation ) {
- case WINDOWFIT:
- if ( theEvent->button() == Qt::LeftButton )
- emit vpTransformationStarted ( WINDOWFIT );
- break;
-
- case PANGLOBAL:
- if ( theEvent->button() == Qt::LeftButton )
- emit vpTransformationStarted ( PANGLOBAL );
- break;
-
- case ZOOMVIEW:
- if ( theEvent->button() == Qt::LeftButton )
- emit vpTransformationStarted ( ZOOMVIEW );
- break;
-
- case PANVIEW:
- if ( theEvent->button() == Qt::LeftButton )
- emit vpTransformationStarted ( PANVIEW );
- break;
-
- case ROTATE:
- if ( theEvent->button() == Qt::LeftButton ) {
- myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);
- emit vpTransformationStarted ( ROTATE );
- }
- break;
-
- default:
- /* Try to activate a transformation */
- switch ( getButtonState(theEvent) ) {
- case ZOOMVIEW:
- activateZoom();
- break;
- case PANVIEW:
- activatePanning();
- break;
- case ROTATE:
- activateRotation();
- myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);
- break;
- default:
- if ( myRotationPointSelection )
- {
- if ( theEvent->button() == Qt::LeftButton )
- {
- Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
- ic->Select();
- for ( ic->InitSelected(); ic->MoreSelected(); ic->NextSelected() )
- {
- TopoDS_Shape aShape = ic->SelectedShape();
- if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )
- {
- gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( ic->SelectedShape() ) );
- if ( mySetRotationPointDlg )
- {
- myRotationPointSelection = false;
- mySetRotationPointDlg->setCoords(aPnt.X(), aPnt.Y(), aPnt.Z());
- }
- }
- else
- {
- myCurrPointType = myPrevPointType;
- break;
- }
- }
- if ( ic->NbSelected() == 0 ) myCurrPointType = myPrevPointType;
- if ( mySetRotationPointDlg ) mySetRotationPointDlg->toggleChange();
- ic->CloseAllContexts();
- myOperation = NOTHING;
- setCursor( myCursor );
- myCursorIsHand = false;
- myRotationPointSelection = false;
- }
- }
- else
- emit mousePressed(this, theEvent);
- break;
- }
- /* notify that we start a transformation */
- if ( transformRequested() )
- emit vpTransformationStarted ( myOperation );
- }
- if ( transformRequested() )
- setTransformInProcess( true );
-
- /* we may need it for sketching... */
- if ( l_mbPressEvent )
- delete l_mbPressEvent;
- l_mbPressEvent = new QMouseEvent( *theEvent );
-}
-
-
-/*!
- Starts zoom operation, sets corresponding cursor
-*/
-void OCCViewer_ViewWindow::activateZoom()
-{
- if ( !transformRequested() && !myCursorIsHand )
- myCursor = cursor(); /* save old cursor */
-
- if ( myOperation != ZOOMVIEW ) {
- QPixmap zoomPixmap (imageZoomCursor);
- QCursor zoomCursor (zoomPixmap);
- setTransformRequested ( ZOOMVIEW );
- setCursor( zoomCursor );
- }
-}
-
-
-/*!
- Starts panning operation, sets corresponding cursor
-*/
-void OCCViewer_ViewWindow::activatePanning()
-{
- if ( !transformRequested() && !myCursorIsHand )
- myCursor = cursor(); // save old cursor
-
- if ( myOperation != PANVIEW ) {
- QCursor panCursor (Qt::SizeAllCursor);
- setTransformRequested ( PANVIEW );
- setCursor( panCursor );
- }
-}
-
-/*!
- Starts rotation operation, sets corresponding cursor
-*/
-void OCCViewer_ViewWindow::activateRotation()
-{
- if ( !transformRequested() && !myCursorIsHand )
- myCursor = cursor(); // save old cursor
-
- if ( myOperation != ROTATE ) {
- QPixmap rotatePixmap (imageRotateCursor);
- QCursor rotCursor (rotatePixmap);
- setTransformRequested ( ROTATE );
- setCursor( rotCursor );
- }
-}
-
-/*!
- Compute the gravity center
-*/
-bool OCCViewer_ViewWindow::computeGravityCenter( double& theX, double& theY, double& theZ )
-{
- Handle(Visual3d_View) aView = myViewPort->getView()->View();
-
- Standard_Real Xmin,Ymin,Zmin,Xmax,Ymax,Zmax,U,V,W ;
- Standard_Real Umin,Vmin,Umax,Vmax ;
- Standard_Integer Nstruct,Npoint ;
- Graphic3d_MapOfStructure MySetOfStructures;
-
- aView->DisplayedStructures (MySetOfStructures);
- Nstruct = MySetOfStructures.Extent() ;
-
- Graphic3d_MapIteratorOfMapOfStructure MyIterator(MySetOfStructures) ;
- aView->ViewMapping().WindowLimit(Umin,Vmin,Umax,Vmax) ;
- Npoint = 0 ; theX = theY = theZ = 0. ;
- for( ; MyIterator.More(); MyIterator.Next()) {
- if (!(MyIterator.Key())->IsEmpty()) {
- (MyIterator.Key())->MinMaxValues(Xmin,Ymin,Zmin,
- Xmax,Ymax,Zmax) ;
-
- Standard_Real LIM = ShortRealLast() -1.;
- if (! (fabs(Xmin) > LIM || fabs(Ymin) > LIM || fabs(Zmin) > LIM
- || fabs(Xmax) > LIM || fabs(Ymax) > LIM || fabs(Zmax) > LIM )) {
-
- aView->Projects(Xmin,Ymin,Zmin,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmin ; theY += Ymin ; theZ += Zmin ;
- }
- aView->Projects(Xmax,Ymin,Zmin,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmax ; theY += Ymin ; theZ += Zmin ;
- }
- aView->Projects(Xmin,Ymax,Zmin,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmin ; theY += Ymax ; theZ += Zmin ;
- }
- aView->Projects(Xmax,Ymax,Zmin,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmax ; theY += Ymax ; theZ += Zmin ;
- }
- aView->Projects(Xmin,Ymin,Zmax,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmin ; theY += Ymin ; theZ += Zmax ;
- }
- aView->Projects(Xmax,Ymin,Zmax,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmax ; theY += Ymin ; theZ += Zmax ;
- }
- aView->Projects(Xmin,Ymax,Zmax,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmin ; theY += Ymax ; theZ += Zmax ;
- }
- aView->Projects(Xmax,Ymax,Zmax,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmax ; theY += Ymax ; theZ += Zmax ;
- }
- }
- }
- }
- if( Npoint > 0 ) {
- theX /= Npoint ; theY /= Npoint ; theZ /= Npoint ;
- }
- return true;
-}
-
-/*!
- Set the gravity center as a rotation point
-*/
-void OCCViewer_ViewWindow::activateSetRotationGravity()
-{
- if ( myRotationPointSelection )
- {
- Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
- ic->CloseAllContexts();
- myOperation = NOTHING;
- setCursor( myCursor );
- myCursorIsHand = false;
- myRotationPointSelection = false;
- }
-
- myPrevPointType = myCurrPointType;
- myCurrPointType = GRAVITY;
-
- Standard_Real Xcenter, Ycenter, Zcenter;
- if ( computeGravityCenter( Xcenter, Ycenter, Zcenter ) )
- mySetRotationPointDlg->setCoords( Xcenter, Ycenter, Zcenter );
-}
-
-/*!
- Update gravity center in the SetRotationPointDlg
-*/
-void OCCViewer_ViewWindow::updateGravityCoords()
-{
- if ( mySetRotationPointDlg && mySetRotationPointDlg->isShown() && myCurrPointType == GRAVITY )
- {
- Standard_Real Xcenter, Ycenter, Zcenter;
- if ( computeGravityCenter( Xcenter, Ycenter, Zcenter ) )
- mySetRotationPointDlg->setCoords( Xcenter, Ycenter, Zcenter );
- }
-}
-
-/*!
- Set the point selected by user as a rotation point
-*/
-void OCCViewer_ViewWindow::activateSetRotationSelected(double theX, double theY, double theZ)
-{
- if ( myRotationPointSelection )
- {
- Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
- ic->CloseAllContexts();
- myOperation = NOTHING;
- setCursor( myCursor );
- myCursorIsHand = false;
- myRotationPointSelection = false;
- }
-
- myPrevPointType = myCurrPointType;
- myCurrPointType = SELECTED;
- mySelectedPoint.SetCoord(theX,theY,theZ);
-}
-
-/*!
- Start the point selection process
-*/
-void OCCViewer_ViewWindow::activateStartPointSelection()
-{
- myPrevPointType = myCurrPointType;
- myCurrPointType = SELECTED;
-
- // activate selection ------>
- Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
-
- ic->OpenLocalContext();
-
- AIS_ListOfInteractive aList;
- ic->DisplayedObjects( aList );
- for ( AIS_ListIteratorOfListOfInteractive it( aList ); it.More(); it.Next() )
- {
- Handle(AIS_InteractiveObject) anObj = it.Value();
- if ( !anObj.IsNull() && anObj->HasPresentation() &&
- anObj->IsKind( STANDARD_TYPE(AIS_Shape) ) )
- {
- ic->Load(anObj,-1);
- ic->Activate(anObj,AIS_Shape::SelectionMode(TopAbs_VERTEX));
- }
- }
- // activate selection <------
-
- if ( !myCursorIsHand )
- {
- QCursor handCursor (Qt::PointingHandCursor);
- myCursorIsHand = true;
- myCursor = cursor();
- setCursor( handCursor );
- }
- myRotationPointSelection = true;
-}
-
-/*!
- Starts global panning operation, sets corresponding cursor
-*/
-void OCCViewer_ViewWindow::activateGlobalPanning()
-{
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) {
- QPixmap globalPanPixmap (imageCrossCursor);
- QCursor glPanCursor (globalPanPixmap);
- myCurScale = aView3d->Scale();
- aView3d->FitAll(0.01, false);
- myCursor = cursor(); // save old cursor
- myViewPort->fitAll(); // fits view before selecting a new scene center
- setTransformRequested( PANGLOBAL );
- setCursor( glPanCursor );
- }
-}
-
-/*!
- Starts fit operation, sets corresponding cursor
-*/
-void OCCViewer_ViewWindow::activateWindowFit()
-{
- if ( !transformRequested() && !myCursorIsHand )
- myCursor = cursor(); /* save old cursor */
-
- if ( myOperation != WINDOWFIT ) {
- QCursor handCursor (Qt::PointingHandCursor);
- setTransformRequested ( WINDOWFIT );
- setCursor ( handCursor );
- myCursorIsHand = true;
- }
-}
-
-/*!
- Stores which viewer operation is requesting
-*/
-void OCCViewer_ViewWindow::setTransformRequested ( OperationType op )
-{
- myOperation = op;
- myViewPort->setMouseTracking( myOperation == NOTHING );
-}
-
-
-/*!
- Handler of mouse move event
-*/
-void OCCViewer_ViewWindow::vpMouseMoveEvent(QMouseEvent* theEvent)
-{
- myCurrX = theEvent->x();
- myCurrY = theEvent->y();
- switch (myOperation) {
- case ROTATE:
- myViewPort->rotate(myCurrX, myCurrY, myCurrPointType, mySelectedPoint);
- break;
-
- case ZOOMVIEW:
- myViewPort->zoom(myStartX, myStartY, myCurrX, myCurrY);
- myStartX = myCurrX;
- myStartY = myCurrY;
- break;
-
- case PANVIEW:
- myViewPort->pan(myCurrX - myStartX, myStartY - myCurrY);
- myStartX = myCurrX;
- myStartY = myCurrY;
- break;
-
-/* case WINDOWFIT:
- myDrawRect = true;
- repaint();
- break;
-*/
- case PANGLOBAL:
- break;
-
- default:
- if ( myRotationPointSelection )
- emit mouseMoving( this, theEvent );
- else
- {
- int aState = theEvent->state();
- if ( aState == Qt::LeftButton ||
- aState == ( Qt::LeftButton | Qt::ShiftButton) ) {
- myDrawRect = myEnableDrawMode;
- if ( myDrawRect ) {
- drawRect();
- if ( !myCursorIsHand ) { // we are going to sketch a rectangle
- QCursor handCursor (Qt::PointingHandCursor);
- myCursorIsHand = true;
- myCursor = cursor();
- setCursor( handCursor );
- }
- }
- }
- else if ( aState == Qt::RightButton ||
- aState == ( Qt::RightButton | Qt::ShiftButton ) ) {
- OCCViewer_ViewSketcher* sketcher = 0;
- for ( OCCViewer_ViewSketcher* sk = mySketchers.first();
- sk && !sketcher; sk = mySketchers.next() )
- {
- if( sk->isDefault() && sk->sketchButton() & ( aState & Qt::MouseButtonMask ) )
- sketcher = sk;
- }
- if ( sketcher && myCurSketch == -1 )
- {
- activateSketching( sketcher->type() );
- if ( mypSketcher )
- {
- myCurSketch = mypSketcher->sketchButton();
-
- if ( l_mbPressEvent )
- {
- QApplication::sendEvent( getViewPort(), l_mbPressEvent );
- delete l_mbPressEvent;
- l_mbPressEvent = 0;
- }
- QApplication::sendEvent( getViewPort(), theEvent );
- }
- }
- }
- else {
- emit mouseMoving( this, theEvent );
- }
- }
- }
-}
-
-/*!
- Handler of mouse release event
-*/
-void OCCViewer_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent)
-{
- switch ( myOperation ) {
- case NOTHING:
- {
- int prevState = myCurSketch;
- if(theEvent->state() == RightButton)
- {
- for ( OCCViewer_ViewSketcher* sk = mySketchers.first();
- sk && myCurSketch != -1; sk = mySketchers.next() )
- {
- if( ( sk->sketchButton() & theEvent->state() ) && sk->sketchButton() == myCurSketch )
- myCurSketch = -1;
- }
- }
-
- emit mouseReleased(this, theEvent);
- if(theEvent->button() == RightButton && prevState == -1)
- {
- QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
- theEvent->pos(), theEvent->globalPos(),
- theEvent->state() );
- emit contextMenuRequested( &aEvent );
- }
- }
- break;
- case ROTATE:
- myViewPort->endRotation();
- resetState();
- break;
-
- case PANVIEW:
- case ZOOMVIEW:
- resetState();
- break;
-
- case PANGLOBAL:
- if ( theEvent->button() == Qt::LeftButton ) {
- myViewPort->setCenter( theEvent->x(), theEvent->y() );
- myViewPort->getView()->SetScale(myCurScale);
- resetState();
- }
- break;
-
- case WINDOWFIT:
- if ( theEvent->state() == Qt::LeftButton ) {
- myCurrX = theEvent->x();
- myCurrY = theEvent->y();
- QRect rect = SUIT_Tools::makeRect(myStartX, myStartY, myCurrX, myCurrY);
- if ( !rect.isEmpty() ) myViewPort->fitRect(rect);
- resetState();
- }
- break;
- }
-
- // NOTE: viewer 3D detects a rectangle of selection using this event
- // so we must emit it BEFORE resetting the selection rectangle
-
- if ( theEvent->button() == Qt::LeftButton && myDrawRect ) {
- myDrawRect = false;
- drawRect();
- resetState();
- myViewPort->update();
- }
-
- if ( l_mbPressEvent )
- {
- delete l_mbPressEvent;
- l_mbPressEvent = 0;
- }
-}
-
-/*!
- Sets the viewport to its initial state
- ( no transformations in process etc. )
-*/
-void OCCViewer_ViewWindow::resetState()
-{
- myDrawRect = false;
-
- /* make rectangle empty (left > right) */
- myRect.setLeft(2);
- myRect.setRight(0);
-
- if ( myRotationPointSelection )
- {
- QCursor handCursor (Qt::PointingHandCursor);
- setCursor( handCursor );
- }
- else
- {
- if ( transformRequested() || myCursorIsHand )
- setCursor( myCursor );
- myCursorIsHand = false;
- }
-
- if ( transformRequested() )
- emit vpTransformationFinished (myOperation);
-
- setTransformInProcess( false );
- setTransformRequested( NOTHING );
-}
-
-
-/*!
- Draws rectangle by starting and current points
-*/
-void OCCViewer_ViewWindow::drawRect()
-{
- QPainter aPainter(myViewPort);
- aPainter.setRasterOp(Qt::XorROP);
- aPainter.setPen(Qt::white);
- QRect aRect = SUIT_Tools::makeRect(myStartX, myStartY, myCurrX, myCurrY);
- if ( !myRect.isEmpty() )
- aPainter.drawRect( myRect );
- aPainter.drawRect(aRect);
- myRect = aRect;
-}
-
-/*!
- Creates actions of OCC view window
-*/
-void OCCViewer_ViewWindow::createActions()
-{
- if (!myActionsMap.isEmpty()) return;
-
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
-
- QtxAction* aAction;
-
- // Dump view
- aAction = new QtxAction(tr("MNU_DUMP_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_DUMP" ) ),
- tr( "MNU_DUMP_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_DUMP_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onDumpView()));
- myActionsMap[ DumpId ] = aAction;
-
- // FitAll
- aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_FITALL" ) ),
- tr( "MNU_FITALL" ), 0, this);
- aAction->setStatusTip(tr("DSC_FITALL"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onFitAll()));
- myActionsMap[ FitAllId ] = aAction;
-
- // FitRect
- aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_FITAREA" ) ),
- tr( "MNU_FITRECT" ), 0, this);
- aAction->setStatusTip(tr("DSC_FITRECT"));
- connect(aAction, SIGNAL(activated()), this, SLOT(activateWindowFit()));
- myActionsMap[ FitRectId ] = aAction;
-
- // Zoom
- aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_ZOOM" ) ),
- tr( "MNU_ZOOM_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_ZOOM_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(activateZoom()));
- myActionsMap[ ZoomId ] = aAction;
-
- // Panning
- aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_PAN" ) ),
- tr( "MNU_PAN_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_PAN_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(activatePanning()));
- myActionsMap[ PanId ] = aAction;
-
- // Global Panning
- aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_GLOBALPAN" ) ),
- tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(activateGlobalPanning()));
- myActionsMap[ GlobalPanId ] = aAction;
-
- // Rotation Point
- mySetRotationPointAction = new QtxAction(tr("MNU_CHANGINGROTATIONPOINT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_ROTATION_POINT" ) ),
- tr( "MNU_CHANGINGROTATIONPOINT_VIEW" ), 0, this);
- mySetRotationPointAction->setStatusTip(tr("DSC_CHANGINGROTATIONPOINT_VIEW"));
- mySetRotationPointAction->setToggleAction( true );
- connect(mySetRotationPointAction, SIGNAL(toggled( bool )), this, SLOT(onSetRotationPoint( bool )));
- myActionsMap[ ChangeRotationPointId ] = mySetRotationPointAction;
-
- // Rotation
- aAction = new QtxAction(tr("MNU_ROTATE_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_ROTATE" ) ),
- tr( "MNU_ROTATE_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_ROTATE_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(activateRotation()));
- myActionsMap[ RotationId ] = aAction;
-
- // Projections
- aAction = new QtxAction(tr("MNU_FRONT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_FRONT" ) ),
- tr( "MNU_FRONT_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_FRONT_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onFrontView()));
- myActionsMap[ FrontId ] = aAction;
-
- aAction = new QtxAction(tr("MNU_BACK_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_BACK" ) ),
- tr( "MNU_BACK_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_BACK_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onBackView()));
- myActionsMap[ BackId ] = aAction;
-
- aAction = new QtxAction(tr("MNU_TOP_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_TOP" ) ),
- tr( "MNU_TOP_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_TOP_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onTopView()));
- myActionsMap[ TopId ] = aAction;
-
- aAction = new QtxAction(tr("MNU_BOTTOM_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_BOTTOM" ) ),
- tr( "MNU_BOTTOM_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_BOTTOM_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onBottomView()));
- myActionsMap[ BottomId ] = aAction;
-
- aAction = new QtxAction(tr("MNU_LEFT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_LEFT" ) ),
- tr( "MNU_LEFT_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_LEFT_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onLeftView()));
- myActionsMap[ LeftId ] = aAction;
-
- aAction = new QtxAction(tr("MNU_RIGHT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_RIGHT" ) ),
- tr( "MNU_RIGHT_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_RIGHT_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onRightView()));
- myActionsMap[ RightId ] = aAction;
-
- // Reset
- aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_RESET" ) ),
- tr( "MNU_RESET_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_RESET_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onResetView()));
- myActionsMap[ ResetId ] = aAction;
-
- // Reset
- aAction = new QtxAction(tr("MNU_CLONE_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_CLONE_VIEW" ) ),
- tr( "MNU_CLONE_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_CLONE_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onCloneView()));
- myActionsMap[ CloneId ] = aAction;
-
- myClippingAction = new QtxAction(tr("MNU_CLIPPING"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_CLIPPING" ) ),
- tr( "MNU_CLIPPING" ), 0, this);
- myClippingAction->setStatusTip(tr("DSC_CLIPPING"));
- myClippingAction->setToggleAction( true );
- connect(myClippingAction, SIGNAL(toggled( bool )), this, SLOT(onClipping( bool )));
- myActionsMap[ ClippingId ] = myClippingAction;
-
- aAction = new QtxAction(tr("MNU_SHOOT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_SHOOT_VIEW" ) ),
- tr( "MNU_SHOOT_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_SHOOT_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onMemorizeView()));
- myActionsMap[ MemId ] = aAction;
-
- aAction = new QtxAction(tr("MNU_PRESETS_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_PRESETS_VIEW" ) ),
- tr( "MNU_PRESETS_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_PRESETS_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onRestoreView()));
- myActionsMap[ RestoreId ] = aAction;
-
- if (myModel->trihedronActivated()) {
- aAction = new QtxAction(tr("MNU_SHOW_TRIHEDRE"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_TRIHEDRON" ) ),
- tr( "MNU_SHOW_TRIHEDRE" ), 0, this);
- aAction->setStatusTip(tr("DSC_SHOW_TRIHEDRE"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onTrihedronShow()));
- myActionsMap[ TrihedronShowId ] = aAction;
- }
-}
-
-/*!
- Creates toolbar of OCC view window
-*/
-void OCCViewer_ViewWindow::createToolBar()
-{
- myActionsMap[DumpId]->addTo(myToolBar);
- if ( myModel->trihedronActivated() )
- myActionsMap[TrihedronShowId]->addTo(myToolBar);
-
- SUIT_ToolButton* aScaleBtn = new SUIT_ToolButton(myToolBar, "scale");
- aScaleBtn->AddAction(myActionsMap[FitAllId]);
- aScaleBtn->AddAction(myActionsMap[FitRectId]);
- aScaleBtn->AddAction(myActionsMap[ZoomId]);
-
- SUIT_ToolButton* aPanningBtn = new SUIT_ToolButton(myToolBar, "pan");
- aPanningBtn->AddAction(myActionsMap[PanId]);
- aPanningBtn->AddAction(myActionsMap[GlobalPanId]);
-
- myActionsMap[ChangeRotationPointId]->addTo(myToolBar);
-
- myActionsMap[RotationId]->addTo(myToolBar);
-
- SUIT_ToolButton* aViewsBtn = new SUIT_ToolButton(myToolBar, "projection");
- aViewsBtn->AddAction(myActionsMap[FrontId]);
- aViewsBtn->AddAction(myActionsMap[BackId]);
- aViewsBtn->AddAction(myActionsMap[TopId]);
- aViewsBtn->AddAction(myActionsMap[BottomId]);
- aViewsBtn->AddAction(myActionsMap[LeftId]);
- aViewsBtn->AddAction(myActionsMap[RightId]);
-
- myActionsMap[ResetId]->addTo(myToolBar);
-
- SUIT_ToolButton* aMemBtn = new SUIT_ToolButton(myToolBar, "view");
- aMemBtn->AddAction(myActionsMap[MemId]);
- aMemBtn->AddAction(myActionsMap[RestoreId]);
-
- myToolBar->addSeparator();
- myActionsMap[CloneId]->addTo(myToolBar);
-
- myToolBar->addSeparator();
- myActionsMap[ClippingId]->addTo(myToolBar);
-}
-
-/*!
- Processes operation fit all
-*/
-void OCCViewer_ViewWindow::onViewFitAll()
-{
- myViewPort->fitAll();
-}
-
-/*!
- Processes transformation "front view"
-*/
-void OCCViewer_ViewWindow::onFrontView()
-{
- emit vpTransformationStarted ( FRONTVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Xpos);
- onViewFitAll();
-}
-
-/*!
- Processes transformation "back view"
-*/
-void OCCViewer_ViewWindow::onBackView()
-{
- emit vpTransformationStarted ( BACKVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Xneg);
- onViewFitAll();
-}
-
-/*!
- Processes transformation "top view"
-*/
-void OCCViewer_ViewWindow::onTopView()
-{
- emit vpTransformationStarted ( TOPVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Zpos);
- onViewFitAll();
-}
-
-/*!
- Processes transformation "bottom view"
-*/
-void OCCViewer_ViewWindow::onBottomView()
-{
- emit vpTransformationStarted ( BOTTOMVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Zneg);
- onViewFitAll();
-}
-
-/*!
- Processes transformation "left view"
-*/
-void OCCViewer_ViewWindow::onLeftView()
-{
- emit vpTransformationStarted ( LEFTVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Yneg);
- onViewFitAll();
-}
-
-/*!
- Processes transformation "right view"
-*/
-void OCCViewer_ViewWindow::onRightView()
-{
- emit vpTransformationStarted ( RIGHTVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Ypos);
- onViewFitAll();
-}
-
-/*!
- Processes transformation "reset view": sets default orientation of viewport camera
-*/
-void OCCViewer_ViewWindow::onResetView()
-{
- emit vpTransformationStarted( RESETVIEW );
- bool upd = myViewPort->getView()->SetImmediateUpdate( false );
- myViewPort->getView()->Reset( false );
- myViewPort->fitAll( false, true, false );
- myViewPort->getView()->SetImmediateUpdate( upd );
- myViewPort->getView()->Update();
-}
-
-/*!
- Processes transformation "fit all"
-*/
-void OCCViewer_ViewWindow::onFitAll()
-{
- emit vpTransformationStarted( FITALLVIEW );
- myViewPort->fitAll();
-}
-
-/*!
- SLOT: called if change rotation point operation is activated
-*/
-void OCCViewer_ViewWindow::onSetRotationPoint( bool on )
-{
- if ( on )
- {
- if ( !mySetRotationPointDlg )
- {
- mySetRotationPointDlg = new OCCViewer_SetRotationPointDlg( this, myDesktop );
- mySetRotationPointDlg->SetAction( mySetRotationPointAction );
- }
-
- if ( !mySetRotationPointDlg->isShown() )
- {
- if ( mySetRotationPointDlg->IsFirstShown() )
- {
- Standard_Real Xcenter, Ycenter, Zcenter;
- if ( computeGravityCenter( Xcenter, Ycenter, Zcenter ) )
- mySetRotationPointDlg->setCoords( Xcenter, Ycenter, Zcenter );
- }
- mySetRotationPointDlg->show();
- }
- }
- else
- {
- if ( mySetRotationPointDlg->isShown() )
- mySetRotationPointDlg->hide();
- }
-}
-
-/*!
- Creates one more window with same content
-*/
-void OCCViewer_ViewWindow::onCloneView()
-{
- SUIT_ViewWindow* vw = myManager->createViewWindow();
- vw->show();
-}
-
-/*!
- SLOT: called if clipping operation is activated, enables/disables of clipping plane
-*/
-void OCCViewer_ViewWindow::onClipping( bool on )
-{
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- if ( on )
- myActionsMap[ ClippingId ]->setIconSet(aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_CLIPPING_PRESSED" )));
- else
- myActionsMap[ ClippingId ]->setIconSet(aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_CLIPPING" )));
-
- if ( on )
- {
- if ( !myClippingDlg )
- {
- myClippingDlg = new OCCViewer_ClippingDlg( this, myDesktop );
- myClippingDlg->SetAction( myClippingAction );
- }
-
- if ( !myClippingDlg->isShown() )
- myClippingDlg->show();
- }
- else
- {
- if ( myClippingDlg->isShown() )
- myClippingDlg->hide();
- setCuttingPlane(false);
- }
-}
-
-/*!
- Stores view parameters
-*/
-void OCCViewer_ViewWindow::onMemorizeView()
-{
- myModel->appendViewAspect( getViewParams() );
-}
-
-/*!
- Restores view parameters
-*/
-void OCCViewer_ViewWindow::onRestoreView()
-{
- OCCViewer_CreateRestoreViewDlg* aDlg = new OCCViewer_CreateRestoreViewDlg( centralWidget(), myModel );
- connect( aDlg, SIGNAL( dlgOk() ), this, SLOT( setRestoreFlag() ) );
- aDlg->exec();
- myModel->updateViewAspects( aDlg->parameters() );
- if( myRestoreFlag && aDlg->parameters().count() )
- performRestoring( aDlg->currentItem() );
-}
-
-/*!
- Restores view parameters from structure viewAspect
-*/
-void OCCViewer_ViewWindow::performRestoring( const viewAspect& anItem )
-{
- Handle(V3d_View) aView3d = myViewPort->getView();
-
- Standard_Boolean prev = aView3d->SetImmediateUpdate( Standard_False );
- aView3d->SetScale( anItem.scale );
- aView3d->SetCenter( anItem.centerX, anItem.centerY );
- aView3d->SetTwist( anItem.twist );
- aView3d->SetAt( anItem.atX, anItem.atY, anItem.atZ );
- aView3d->SetImmediateUpdate( prev );
- aView3d->SetEye( anItem.eyeX, anItem.eyeY, anItem.eyeZ );
- aView3d->SetProj( anItem.projX, anItem.projY, anItem.projZ );
-
- myRestoreFlag = 0;
-}
-
-/*!
- Sets restore flag
-*/
-void OCCViewer_ViewWindow::setRestoreFlag()
-{
- myRestoreFlag = 1;
-}
-
-/*!
- SLOT: called when action "show/hide" trihedron is activated
-*/
-void OCCViewer_ViewWindow::onTrihedronShow()
-{
- myModel->toggleTrihedron();
-}
-
-/*!
- \return QImage, containing all scene rendering in window
-*/
-QImage OCCViewer_ViewWindow::dumpView()
-{
- QPixmap px = QPixmap::grabWindow( myViewPort->winId() );
- return px.convertToImage();
-}
-
-/*!
- Sets parameters of cutting plane
- \param on - is cutting plane enabled
- \param x - x-position of plane point
- \param y - y-position of plane point
- \param z - z-position of plane point
- \param dx - x-coordinate of plane normal
- \param dy - y-coordinate of plane normal
- \param dz - z-coordinate of plane normal
-*/
-void OCCViewer_ViewWindow::setCuttingPlane( bool on, const double x, const double y, const double z,
- const double dx, const double dy, const double dz )
-{
- Handle(V3d_View) view = myViewPort->getView();
- if ( view.IsNull() )
- return;
-
- if ( on ) {
- Handle(V3d_Viewer) viewer = myViewPort->getViewer();
-
- // try to use already existing plane or create a new one
- Handle(V3d_Plane) clipPlane;
- view->InitActivePlanes();
- if ( view->MoreActivePlanes() )
- clipPlane = view->ActivePlane();
- else
- clipPlane = new V3d_Plane( viewer );
-
- // set new a,b,c,d values for the plane
- gp_Pln pln( gp_Pnt( x, y, z ), gp_Dir( dx, dy, dz ) );
- double a, b, c, d;
- pln.Coefficients( a, b, c, d );
- clipPlane->SetPlane( a, b, c, d );
-
- view->SetPlaneOn( clipPlane );
- }
- else
- view->SetPlaneOff();
-
- view->Update();
- view->Redraw();
-}
-
-/*!
- \return true if there is at least one cutting plane
-*/
-bool OCCViewer_ViewWindow::isCuttingPlane()
-{
- Handle(V3d_View) view = myViewPort->getView();
- view->InitActivePlanes();
- return (view->MoreActivePlanes());
-}
-
-/*!
- The method returns the visual parameters of this view as a viewAspect object
-*/
-viewAspect OCCViewer_ViewWindow::getViewParams() const
-{
- double centerX, centerY, projX, projY, projZ, twist;
- double atX, atY, atZ, eyeX, eyeY, eyeZ;
-
- Handle(V3d_View) aView3d = myViewPort->getView();
-
- aView3d->Center( centerX, centerY );
- aView3d->Proj( projX, projY, projZ );
- aView3d->At( atX, atY, atZ );
- aView3d->Eye( eyeX, eyeY, eyeZ );
- twist = aView3d->Twist();
-
- QString aName = QTime::currentTime().toString() + QString::fromLatin1( " h:m:s" );
-
- viewAspect params;
- params.scale = aView3d->Scale();
- params.centerX = centerX;
- params.centerY = centerY;
- params.projX = projX;
- params.projY = projY;
- params.projZ = projZ;
- params.twist = twist;
- params.atX = atX;
- params.atY = atY;
- params.atZ = atZ;
- params.eyeX = eyeX;
- params.eyeY = eyeY;
- params.eyeZ = eyeZ;
- params.name = aName;
-
- return params;
-}
-
-
-/*!
- The method returns the visual parameters of this view as a formated string
-*/
-QString OCCViewer_ViewWindow::getVisualParameters()
-{
- viewAspect params = getViewParams();
- QString retStr;
- retStr.sprintf( "%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e", params.scale,
- params.centerX, params.centerY, params.projX, params.projY, params.projZ, params.twist,
- params.atX, params.atY, params.atZ, params.eyeX, params.eyeY, params.eyeZ );
- return retStr;
-}
-
-/*!
- The method restors visual parameters of this view from a formated string
-*/
-void OCCViewer_ViewWindow::setVisualParameters( const QString& parameters )
-{
- QStringList paramsLst = QStringList::split( '*', parameters, true );
- if ( paramsLst.size() == 13 ) {
- viewAspect params;
- params.scale = paramsLst[0].toDouble();
- params.centerX = paramsLst[1].toDouble();
- params.centerY = paramsLst[2].toDouble();
- params.projX = paramsLst[3].toDouble();
- params.projY = paramsLst[4].toDouble();
- params.projZ = paramsLst[5].toDouble();
- params.twist = paramsLst[6].toDouble();
- params.atX = paramsLst[7].toDouble();
- params.atY = paramsLst[8].toDouble();
- params.atZ = paramsLst[9].toDouble();
- params.eyeX = paramsLst[10].toDouble();
- params.eyeY = paramsLst[11].toDouble();
- params.eyeZ = paramsLst[12].toDouble();
-
- performRestoring( params );
- }
-}
-
-/*!
- Custom show event handler
-*/
-void OCCViewer_ViewWindow::showEvent( QShowEvent * theEvent )
-{
- emit Show( theEvent );
-}
-
-/*!
- Custom hide event handler
-*/
-void OCCViewer_ViewWindow::hideEvent( QHideEvent * theEvent )
-{
- emit Hide( theEvent );
-}
-
-
-/*!
- Creates default sketcher. [ virtual protected ]
-*/
-OCCViewer_ViewSketcher* OCCViewer_ViewWindow::createSketcher( int type )
-{
- if ( type == Rect )
- return new OCCViewer_RectSketcher( this, type );
- if ( type == Polygon )
- return new OCCViewer_PolygonSketcher( this, type );
- return 0;
-}
-
-void OCCViewer_ViewWindow::initSketchers()
-{
- if ( mySketchers.isEmpty() )
- {
- mySketchers.append( createSketcher( Rect ) );
- mySketchers.append( createSketcher( Polygon ) );
- }
-}
-
-OCCViewer_ViewSketcher* OCCViewer_ViewWindow::getSketcher( const int typ )
-{
- OCCViewer_ViewSketcher* sketcher = 0;
- for ( OCCViewer_ViewSketcher* sk = mySketchers.first();
- sk && !sketcher; sk = mySketchers.next() )
- {
- if ( sk->type() == typ )
- sketcher = sk;
- }
- return sketcher;
-}
-
-/*!
- Handles requests for sketching in the active view. [ virtual public ]
-*/
-void OCCViewer_ViewWindow::activateSketching( int type )
-{
- OCCViewer_ViewPort3d* vp = getViewPort();
- if ( !vp )
- return;
-
- if ( !vp->isSketchingEnabled() )
- return;
-
- /* Finish current sketching */
- if ( type == NoSketching )
- {
- if ( mypSketcher )
- {
- onSketchingFinished();
- mypSketcher->deactivate();
- mypSketcher = 0;
- }
- }
- /* Activate new sketching */
- else
- {
- activateSketching( NoSketching ); /* concurrency not suported */
- mypSketcher = getSketcher( type );
- if ( mypSketcher )
- {
- mypSketcher->activate();
- onSketchingStarted();
- }
- }
-}
-
-/*!
- Unhilights detected entities. [ virtual protected ]
-*/
-void OCCViewer_ViewWindow::onSketchingStarted()
-{
-}
-
-/*!
- Selection by rectangle or polygon. [ virtual protected ]
-*/
-void OCCViewer_ViewWindow::onSketchingFinished()
-{
- if ( mypSketcher && mypSketcher->result() == OCCViewer_ViewSketcher::Accept )
- {
- Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
- bool append = bool( mypSketcher->buttonState() & Qt::ShiftButton );
- switch( mypSketcher->type() )
- {
- case Rect:
- {
- QRect* aRect = (QRect*)mypSketcher->data();
- if( aRect )
- {
- int aLeft = aRect->left();
- int aRight = aRect->right();
- int aTop = aRect->top();
- int aBottom = aRect->bottom();
-
- if( append )
- ic->ShiftSelect( aLeft, aBottom, aRight, aTop, getViewPort()->getView(), Standard_False );
- else
- ic->Select( aLeft, aBottom, aRight, aTop, getViewPort()->getView(), Standard_False );
- }
- }
- break;
- case Polygon:
- {
- QPointArray* aPolygon = (QPointArray*)mypSketcher->data();
- if( aPolygon )
- {
- int size = aPolygon->size();
- TColgp_Array1OfPnt2d anArray( 1, size );
-
- QPointArray::Iterator it = aPolygon->begin();
- QPointArray::Iterator itEnd = aPolygon->end();
- for( int index = 1; it != itEnd; ++it, index++ )
- {
- QPoint aPoint = *it;
- anArray.SetValue( index, gp_Pnt2d( aPoint.x(), aPoint.y() ) );
- }
-
- if( append )
- ic->ShiftSelect( anArray, getViewPort()->getView(), Standard_False );
- else
- ic->Select( anArray, getViewPort()->getView(), Standard_False );
- }
- }
- break;
- default:
- break;
- }
-
- OCCViewer_ViewManager* aViewMgr = ( OCCViewer_ViewManager* )getViewManager();
- aViewMgr->getOCCViewer()->performSelectionChanged();
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 OCCVIEWER_VIEWWINDOW_H
-#define OCCVIEWER_VIEWWINDOW_H
-
-#include "OCCViewer_ViewModel.h"
-#include "OCCViewer_ViewSketcher.h"
-
-#include "SUIT_ViewWindow.h"
-
-#include "QtxAction.h"
-
-#include <qcursor.h>
-#include <qvaluelist.h>
-
-class SUIT_Desktop;
-class OCCViewer_ViewPort3d;
-
-class OCCViewer_ClippingDlg;
-class OCCViewer_SetRotationPointDlg;
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-class OCCVIEWER_EXPORT OCCViewer_ViewWindow : public SUIT_ViewWindow
-{
- Q_OBJECT
-
-public:
- enum OperationType{ NOTHING, PANVIEW, ZOOMVIEW, ROTATE,
- PANGLOBAL, WINDOWFIT, FITALLVIEW, RESETVIEW,
- FRONTVIEW, BACKVIEW, TOPVIEW, BOTTOMVIEW, LEFTVIEW, RIGHTVIEW };
-
- enum RotationPointType{ GRAVITY, SELECTED };
-
- enum SketchingType { NoSketching, Rect, Polygon };
-
- OCCViewer_ViewWindow(SUIT_Desktop* theDesktop, OCCViewer_Viewer* theModel);
- virtual ~OCCViewer_ViewWindow() {};
-
- OCCViewer_ViewPort3d* getViewPort() { return myViewPort; }
-
- bool eventFilter(QObject* watched, QEvent* e);
-
- QToolBar* getToolBar() { return myToolBar; }
-
- void performRestoring( const viewAspect& );
-
- virtual void initLayout();
-
- void updateEnabledDrawMode();
-
- void setCuttingPlane( bool on, const double x = 0 , const double y = 0 , const double z = 0,
- const double dx = 0, const double dy = 0, const double dz = 1);
-
- bool isCuttingPlane();
-
- virtual QString getVisualParameters();
- virtual void setVisualParameters( const QString& parameters );
-
- virtual void initSketchers();
- OCCViewer_ViewSketcher* getSketcher( const int );
-
- void activateSketching( int );
-
-public slots:
- void onFrontView();
- void onViewFitAll();
- void onBackView();
- void onTopView();
- void onBottomView();
- void onLeftView();
- void onRightView();
- void onResetView();
- void onFitAll();
- void activateZoom();
- void activateWindowFit();
- void activateRotation();
- void activatePanning();
- void activateGlobalPanning();
- void onSetRotationPoint( bool on );
- void onCloneView();
- void onClipping( bool on );
- void onMemorizeView();
- void onRestoreView();
- void onTrihedronShow();
- void setRestoreFlag();
-
- void activateSetRotationGravity();
- void activateSetRotationSelected( double theX, double theY, double theZ );
- void activateStartPointSelection();
- void updateGravityCoords();
-
- virtual void showEvent( QShowEvent * );
- virtual void hideEvent( QHideEvent * );
-
-signals:
- void vpTransformationStarted(OCCViewer_ViewWindow::OperationType type);
- void vpTransformationFinished(OCCViewer_ViewWindow::OperationType type);
- void cloneView();
-
- void Show( QShowEvent * );
- void Hide( QHideEvent * );
-
-protected:
- enum { DumpId, FitAllId, FitRectId, ZoomId, PanId, GlobalPanId,
- ChangeRotationPointId, RotationId,
- FrontId, BackId, TopId, BottomId, LeftId, RightId, ResetId, CloneId, ClippingId, MemId, RestoreId,
- TrihedronShowId };
-
- typedef QMap<int, QtxAction*> ActionsMap;
-
- QImage dumpView();
-
- /* Transformation selected but not started yet */
- bool transformRequested() const { return ( myOperation != NOTHING ); }
- void setTransformRequested ( OperationType op );
-
- /* Transformation is selected and already started */
- bool transformInProcess() const { return myEventStarted; }
- void setTransformInProcess( bool bOn ) { myEventStarted = bOn; }
-
- void vpMousePressEvent(QMouseEvent* theEvent);
- void vpMouseReleaseEvent(QMouseEvent* theEvent);
- void vpMouseMoveEvent(QMouseEvent* theEvent);
-
- void resetState();
- void drawRect();
-
- void createActions();
- void createToolBar();
-
- virtual OperationType getButtonState(QMouseEvent* theEvent);
-
- viewAspect getViewParams() const;
-
- bool computeGravityCenter( double& theX, double& theY, double& theZ );
-
- virtual void onSketchingStarted();
- virtual void onSketchingFinished();
-
- virtual OCCViewer_ViewSketcher* createSketcher( int );
-
- OCCViewer_ViewSketcher* mypSketcher;
- QList<OCCViewer_ViewSketcher> mySketchers;
-
- int myCurSketch;
-
- OperationType myOperation;
- OCCViewer_Viewer* myModel;
- OCCViewer_ViewPort3d* myViewPort;
-
- RotationPointType myCurrPointType;
- RotationPointType myPrevPointType;
- gp_Pnt mySelectedPoint;
- bool myRotationPointSelection;
-
- int myRestoreFlag;
-
- int myStartX;
- int myStartY;
- int myCurrX;
- int myCurrY;
-
- bool myEventStarted; // set when transformation is in process
- bool myCursorIsHand;
- bool myDrawRect; // set when a rect is used for selection or magnify
- bool myEnableDrawMode;
- bool myPaintersRedrawing; // set to draw with external painters
-
- QRect myRect;
- QCursor myCursor;
-
- QToolBar* myToolBar;
- ActionsMap myActionsMap;
-
- double myCurScale;
-
-private:
- OCCViewer_ClippingDlg* myClippingDlg;
- QtxAction* myClippingAction;
-
- OCCViewer_SetRotationPointDlg* mySetRotationPointDlg;
- QtxAction* mySetRotationPointAction;
-
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-# SALOME SALOMEGUI : implementation of desktop and GUI kernel
-#
-# Copyright (C) 2003 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
-#
-#
-#
-# File : SALOMEGUI_icons.po
-# Module : SALOME
-
-msgid ""
-msgstr ""
-"Project-Id-Version: example-Qt-message-extraction\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 1999-02-23 15:38+0200\n"
-"Last-Translator: \n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-msgid "ICON_OCCVIEWER_VIEW_BACK"
-msgstr "view_back.png"
-
-msgid "ICON_OCCVIEWER_VIEW_BOTTOM"
-msgstr "view_bottom.png"
-
-msgid "ICON_OCCVIEWER_VIEW_FITALL"
-msgstr "view_fitall.png"
-
-msgid "ICON_OCCVIEWER_VIEW_FITAREA"
-msgstr "view_fitarea.png"
-
-msgid "ICON_OCCVIEWER_VIEW_FRONT"
-msgstr "view_front.png"
-
-msgid "ICON_OCCVIEWER_VIEW_GLOBALPAN"
-msgstr "view_glpan.png"
-
-msgid "ICON_OCCVIEWER_VIEW_LEFT"
-msgstr "view_left.png"
-
-msgid "ICON_OCCVIEWER_VIEW_PAN"
-msgstr "view_pan.png"
-
-msgid "ICON_OCCVIEWER_VIEW_RESET"
-msgstr "view_reset.png"
-
-msgid "ICON_OCCVIEWER_VIEW_RIGHT"
-msgstr "view_right.png"
-
-msgid "ICON_OCCVIEWER_VIEW_ROTATION_POINT"
-msgstr "view_rotation_point.png"
-
-msgid "ICON_OCCVIEWER_VIEW_ROTATE"
-msgstr "view_rotate.png"
-
-msgid "ICON_OCCVIEWER_VIEW_TOP"
-msgstr "view_top.png"
-
-msgid "ICON_OCCVIEWER_VIEW_ZOOM"
-msgstr "view_zoom.png"
-
-msgid "ICON_OCCVIEWER_VIEW_TRIHEDRON"
-msgstr "view_triedre.png"
-
-msgid "ICON_OCCVIEWER_VIEW_DUMP"
-msgstr "view_camera_dump.png"
-
-msgid "ICON_OCCVIEWER_CLONE_VIEW"
-msgstr "view_clone.png"
-
-msgid "ICON_OCCVIEWER_CLIPPING"
-msgstr "view_clipping.png"
-
-msgid "ICON_OCCVIEWER_CLIPPING_PRESSED"
-msgstr "view_clipping_pressed.png"
-
-msgid "ICON_OCCVIEWER_SHOOT_VIEW"
-msgstr "view_shoot.png"
-
-msgid "ICON_OCCVIEWER_PRESETS_VIEW"
-msgstr "view_presets.png"
-
-
-
+++ /dev/null
-# SALOME SALOMEGUI : implementation of desktop and GUI kernel
-#
-# Copyright (C) 2003 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
-#
-#
-#
-# File : SALOMEGUI_msg_en.po
-# Module : SALOME
-
-msgid ""
-msgstr ""
-"Project-Id-Version: example-Qt-message-extraction\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 1999-02-23 15:38+0200\n"
-"Last-Translator: \n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-msgid "LBL_TOOLBAR_LABEL"
-msgstr "View Operations"
-
-msgid "DSC_FRONT_VIEW"
-msgstr "Front View"
-
-msgid "MNU_FRONT_VIEW"
-msgstr "Front"
-
-msgid "DSC_BACK_VIEW"
-msgstr "Back View"
-
-msgid "MNU_BACK_VIEW"
-msgstr "Back"
-
-msgid "DSC_TOP_VIEW"
-msgstr "Top View"
-
-msgid "MNU_TOP_VIEW"
-msgstr "Top"
-
-msgid "DSC_BOTTOM_VIEW"
-msgstr "Bottom View"
-
-msgid "MNU_BOTTOM_VIEW"
-msgstr "Bottom"
-
-msgid "DSC_LEFT_VIEW"
-msgstr "Left View"
-
-msgid "MNU_LEFT_VIEW"
-msgstr "Left"
-
-msgid "DSC_RIGHT_VIEW"
-msgstr "Right View"
-
-msgid "MNU_RIGHT_VIEW"
-msgstr "Right"
-
-msgid "DSC_RESET_VIEW"
-msgstr "Reset View Point"
-
-msgid "MNU_RESET_VIEW"
-msgstr "Reset"
-
-msgid "DSC_FITALL"
-msgstr "Fit all objects inside the view frame"
-
-msgid "MNU_FITALL"
-msgstr "Fit All"
-
-msgid "DSC_FITRECT"
-msgstr "Fit area within the view frame"
-
-msgid "MNU_FITRECT"
-msgstr "Fit Area"
-
-msgid "DSC_ZOOM_VIEW"
-msgstr "Zoom the view"
-
-msgid "MNU_ZOOM_VIEW"
-msgstr "Zoom"
-
-msgid "DSC_PAN_VIEW"
-msgstr "Panning the view"
-
-msgid "MNU_PAN_VIEW"
-msgstr "Panning"
-
-msgid "DSC_GLOBALPAN_VIEW"
-msgstr "Selection of a new center of the view"
-
-msgid "MNU_GLOBALPAN_VIEW"
-msgstr "Global Panning"
-
-msgid "DSC_CHANGINGROTATIONPOINT_VIEW"
-msgstr "Change the point, around which the rotation is performed"
-
-msgid "DSC_ROTATE_VIEW"
-msgstr "Rotation of the point of view around the scene center"
-
-msgid "OCCViewer_SetRotationPointDlg::CAPTION"
-msgstr "Set Rotation Point"
-
-msgid "OCCViewer_SetRotationPointDlg::USE_BBCENTER"
-msgstr "Use Bounding Box Center"
-
-msgid "OCCViewer_SetRotationPointDlg::LBL_TOORIGIN"
-msgstr "Set to Origin"
-
-msgid "OCCViewer_SetRotationPointDlg::LBL_SELECTPOINT"
-msgstr "Select Point from View"
-
-msgid "OCCViewer_SetRotationPointDlg::LBL_X"
-msgstr "X :"
-
-msgid "OCCViewer_SetRotationPointDlg::LBL_Y"
-msgstr "Y :"
-
-msgid "OCCViewer_SetRotationPointDlg::LBL_Z"
-msgstr "Z :"
-
-msgid "MNU_CHANGINGROTATIONPOINT_VIEW"
-msgstr "Change Rotation Point"
-
-msgid "MNU_ROTATIONPOINTGRAVITY_VIEW"
-msgstr "Rotation Point : the gravity center"
-
-msgid "MNU_ROTATIONPOINT000_VIEW"
-msgstr "Rotation Point : (0,0,0)"
-
-msgid "MNU_ROTATIONPOINTSELECTED_VIEW"
-msgstr "Rotation Point : the point selected by the user"
-
-msgid "MNU_ROTATE_VIEW"
-msgstr "Rotation"
-
-msgid "DSC_CLONE_VIEW"
-msgstr "Create new OCC viewer for the active scene"
-
-msgid "MNU_CLONE_VIEW"
-msgstr "Clone View"
-
-msgid "MNU_DUMP_VIEW"
-msgstr "Dump view"
-
-msgid "DSC_CLIPPING"
-msgstr "Set clipping plane"
-
-msgid "MNU_CLIPPING"
-msgstr "Clipping"
-
-msgid "DSC_DUMP_VIEW"
-msgstr "Saves the active view in the image file"
-
-msgid "MNU_SHOOT_VIEW"
-msgstr "Memorize View"
-
-msgid "DSC_SHOOT_VIEW"
-msgstr "Memorizes the state of the active view and adds it to the list"
-
-msgid "MNU_PRESETS_VIEW"
-msgstr "Restore View"
-
-msgid "DSC_PRESETS_VIEW"
-msgstr "Selection of the memorized state of the active view"
-
-msgid "OCC_IMAGE_FILES"
-msgstr "Images Files (*.bmp *.png *.jpg *.jpeg)"
-
-msgid "INF_APP_DUMP_VIEW"
-msgstr "Dump view"
-
-msgid "INF_APP_SHOOT_VIEW"
-msgstr "Memorize view"
-
-msgid "INF_APP_PRESETS_VIEW"
-msgstr "Restore view"
-
-msgid "ERR_DOC_CANT_SAVE_FILE"
-msgstr "Cannot save file"
-
-msgid "ERROR"
-msgstr "Error"
-
-msgid "OCCViewer_Viewer::MEN_DUMP_VIEW"
-msgstr "Dump view..."
-
-msgid "OCCViewer_Viewer::MEN_SHOW_TOOLBAR"
-msgstr "Show toolbar"
-
-msgid "OCCViewer_Viewer::MEN_CHANGE_BACKGROUD"
-msgstr "Change background..."
-
-msgid "OCCViewer_ViewManager::OCC_VIEW_TITLE"
-msgstr "OCC scene:%M - viewer:%V"
-
-
-msgid "OCCViewer_CreateRestoreViewDlg::CAPTION"
-msgstr "Restore view"
-
-msgid "MNU_SHOW_TRIHEDRE"
-msgstr "Show/Hide trihedron"
-
-msgid "DSC_SHOW_TRIHEDRE"
-msgstr "Show/Hide trihedron in the current view"
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : ObjectBrowser
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libObjBrowser.la
-
-salomeinclude_HEADERS=\
- OB.h \
- OB_Browser.h \
- OB_ListItem.h \
- OB_ListView.h \
- OB_Filter.h \
- OB_FindDlg.h \
- OB_ObjSearch.h
-
-dist_libObjBrowser_la_SOURCES= \
- OB_Browser.cxx \
- OB_ListItem.cxx \
- OB_ListView.cxx \
- OB_Filter.cxx \
- OB_FindDlg.cxx \
- OB_ObjSearch.cxx
-
-MOC_FILES= \
- OB_Browser_moc.cxx \
- OB_ListView_moc.cxx \
- OB_FindDlg_moc.cxx
-nodist_libObjBrowser_la_SOURCES= $(MOC_FILES)
-
-nodist_salomeres_DATA = OB_msg_en.qm
-
-libObjBrowser_la_CPPFLAGS=$(QT_INCLUDES) -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
-
-libObjBrowser_la_LDFLAGS=$(QT_MT_LIBS)
-libObjBrowser_la_LIBADD= ../SUIT/libsuit.la ../Qtx/libqtx.la
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "OB_Filter.h"
-
-/*!
- Default constructor
-*/
-OB_Filter::OB_Filter()
-{
-}
-
-/*!
- Destructor
-*/
-OB_Filter::~OB_Filter()
-{
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 OB_FILTER_H
-#define OB_FILTER_H
-
-#include "OB.h"
-
-class SUIT_DataObject;
-
-/*!
- \class OB_Filter
- Base class for ObjectBrowser filter.
- Filters selected objects by some condition.
-*/
-class OB_EXPORT OB_Filter
-{
-public:
- OB_Filter();
- virtual ~OB_Filter();
-
- virtual bool isOk( const SUIT_DataObject* ) const = 0;
-};
-
-#endif
+++ /dev/null
-
-#include <OB_FindDlg.h>
-#include <OB_ObjSearch.h>
-#include <OB_Browser.h>
-#include <OB_ListItem.h>
-
-#include <SUIT_DataObject.h>
-#include <SUIT_MessageBox.h>
-
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-
-OB_FindDlg::OB_FindDlg( QWidget* parent )
-: QGroupBox( 1, Qt::Horizontal, tr( "FIND" ), parent ),
- mySearch( 0 )
-{
- QFrame *btns = new QFrame( this ), *checks = new QFrame( this );
-
- myData = new QLineEdit( btns );
- myToFirst = new QPushButton( "|<<", btns );
- myToLast = new QPushButton( ">>|", btns );
- myNext = new QPushButton( ">>", btns );
- myPrev = new QPushButton( "<<", btns );
- myClose = new QPushButton( tr( "CLOSE" ), checks );
- myIsCaseSens = new QCheckBox( tr( "CASE_SENSITIVE" ), checks );
- myIsRegExp = new QCheckBox( tr( "IS_REG_EXP" ), checks );
- int w = 30, h = myToFirst->height();
- myToFirst->setMaximumSize( w, h );
- myToLast->setMaximumSize( w, h );
- myNext->setMaximumSize( w, h );
- myPrev->setMaximumSize( w, h );
-
- QHBoxLayout* l = new QHBoxLayout( btns, 5, 5 );
- l->addWidget( myToFirst, 0 );
- l->addWidget( myPrev, 0 );
- l->addWidget( myData, 1 );
- l->addWidget( myNext, 0 );
- l->addWidget( myToLast, 0 );
-
- QHBoxLayout* c = new QHBoxLayout( checks, 5, 5 );
- c->addWidget( myIsCaseSens, 0 );
- c->addWidget( myIsRegExp, 0 );
- c->addWidget( myClose, 0 );
-
- connect( myToFirst, SIGNAL( clicked() ), this, SLOT( onFind() ) );
- connect( myToLast, SIGNAL( clicked() ), this, SLOT( onFind() ) );
- connect( myNext, SIGNAL( clicked() ), this, SLOT( onFind() ) );
- connect( myPrev, SIGNAL( clicked() ), this, SLOT( onFind() ) );
- connect( myClose, SIGNAL( clicked() ), this, SLOT( onClose() ) );
-}
-
-OB_FindDlg::~OB_FindDlg()
-{
-}
-
-void OB_FindDlg::onClose()
-{
- hide();
-}
-
-void OB_FindDlg::onFind()
-{
- OB_ListItem* it = 0;
- mySearch->setPattern( myData->text(), myIsRegExp->isChecked(), myIsCaseSens->isChecked() );
- if( sender()==myToFirst )
- it = mySearch->findFirst();
- else if( sender()==myNext )
- it = mySearch->findNext();
- else if( sender()==myPrev )
- it = mySearch->findPrev();
- else if( sender()==myToLast )
- it = mySearch->findLast();
- if( it )
- {
- mySearch->browser()->setSelected( it->dataObject(), false );
- mySearch->browser()->listView()->ensureItemVisible( it );
- }
- else
- SUIT_MessageBox::info1( this, tr( "FIND" ), tr( "NOT_FOUND" ), tr( "OK" ) );
-}
-
-OB_ObjSearch* OB_FindDlg::getSearch() const
-{
- return mySearch;
-}
-
-void OB_FindDlg::setSearch( OB_ObjSearch* s )
-{
- mySearch = s;
-}
+++ /dev/null
-
-#ifndef OBJECT_BROWSER_FIND_DIALOG_HEADER
-#define OBJECT_BROWSER_FIND_DIALOG_HEADER
-
-#include <qgroupbox.h>
-
-class OB_ObjSearch;
-class QLineEdit;
-class QPushButton;
-class QCheckBox;
-
-class OB_FindDlg : public QGroupBox
-{
- Q_OBJECT
-
-public:
- OB_FindDlg( QWidget* = 0 );
- virtual ~OB_FindDlg();
-
- OB_ObjSearch* getSearch() const;
- void setSearch( OB_ObjSearch* );
-
-private slots:
- void onFind();
- void onClose();
-
-private:
- QLineEdit* myData;
- QPushButton *myToFirst, *myToLast, *myNext, *myPrev, *myClose;
- QCheckBox *myIsCaseSens, *myIsRegExp;
- OB_ObjSearch* mySearch;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "OB_ListItem.h"
-
-#include "OB_ListView.h"
-
-#include <SUIT_DataObject.h>
-
-#include <qpainter.h>
-#include <qwmatrix.h>
-
-#include <iostream>
-using namespace std;
-
-#ifdef WNT
-#define min(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-
-/*!
- Constructor
-*/
-template<class T>
-ListItemF<T>::ListItemF( T* theT, SUIT_DataObject* obj ) :
-myT( theT ),
-myObject( obj )
-{
-}
-
-/*!
- Paints item
-*/
-template<class T>
-void ListItemF<T>::paintC( QPainter* p, QColorGroup& cg, int c, int w, int align )
-{
-// QColorGroup colorGrp( cg );
- if ( myObject )
- {
- if ( myObject->color( SUIT_DataObject::Text ).isValid() )
- cg.setColor( QColorGroup::Text, myObject->color( SUIT_DataObject::Text ) );
- if ( myObject->color( SUIT_DataObject::Base ).isValid() )
- cg.setColor( QColorGroup::Base, myObject->color( SUIT_DataObject::Base ) );
- if ( myObject->color( SUIT_DataObject::Foreground ).isValid() )
- cg.setColor( QColorGroup::Foreground, myObject->color( SUIT_DataObject::Foreground ) );
- if ( myObject->color( SUIT_DataObject::Background ).isValid() )
- cg.setColor( QColorGroup::Background, myObject->color( SUIT_DataObject::Background ) );
- if ( myObject->color( SUIT_DataObject::Highlight ).isValid() )
- cg.setColor( QColorGroup::Highlight, myObject->color( SUIT_DataObject::Highlight ) );
- if ( myObject->color( SUIT_DataObject::HighlightedText ).isValid() )
- cg.setColor( QColorGroup::HighlightedText, myObject->color( SUIT_DataObject::HighlightedText ) );
- }
-
-
- p->fillRect( 0, 0, w, myT->height(), cg.brush( QColorGroup::Base ) );
- //int itemW = myT.width( p->fontMetrics(), myT.listView(), c );
-
- //myT.paintCell( p, colorGrp, c, itemW, align );
-}
-
-/*!
- Paints focused item
-*/
-template<class T>
-void ListItemF<T>::paintFoc( QPainter* p, QColorGroup& cg, const QRect& r )
-{
- QRect rect = r;
- rect.setWidth( myT->width( p->fontMetrics(), myT->listView(), 0 ) );
- //myT.paintFocus( p, cg, rect );
-}
-
-/*!
- Set selection of item
- \param s - selected state
-*/
-template<class T>
-void ListItemF<T>::setSel( bool s )
-{
- QListView* lv = myT->listView();
- if ( s && lv && lv->inherits( "OB_ListView" ) )
- {
- OB_ListView* objlv = (OB_ListView*)lv;
- s = s && objlv->isOk( myT );
- }
-
- //myT.setSelected( s );
-}
-
-/*!
- Updates name and pixmap of item
-*/
-template<class T>
-void ListItemF<T>::update()
-{
- SUIT_DataObject* obj = dataObject();
- if ( !obj )
- return;
-
- QString n = obj->name();
- if( myT->text( 0 )!=n )
- myT->setText( 0, n );
-
- QPixmap p = obj->icon();
- int aIconW = p.width();
- if( aIconW > 0 )
- {
- if( aIconW > 20 )
- {
- QWMatrix aM;
- double aScale = 20.0 / aIconW;
- aM.scale( aScale, aScale );
- myT->setPixmap( 0, p.xForm( aM ) );
- }
- else
- myT->setPixmap( 0, p );
- }
- else if ( p.isNull() )
- myT->setPixmap( 0, p );
-
- myT->setDragEnabled( obj->isDragable() );
- myT->setDropEnabled( true );
-}
-
-/*!
- Constructor
-*/
-OB_ListItem::OB_ListItem( SUIT_DataObject* obj, QListView* parent )
-: ListItemF<QListViewItem>( this, obj ),
- QListViewItem(parent)
-{
- update();
-}
-
-/*!
- Constructor
-*/
-OB_ListItem::OB_ListItem( SUIT_DataObject* obj, QListViewItem* parent )
-: ListItemF<QListViewItem>( this, obj ),
- QListViewItem(parent)
-{
- update();
-}
-
-/*!
- Constructor
-*/
-OB_ListItem::OB_ListItem( SUIT_DataObject* obj, QListView* parent, QListViewItem* after )
-: ListItemF<QListViewItem>( this, obj),
-QListViewItem(parent, after )
-{
- update();
-}
-
-/*!
- Constructor
-*/
-OB_ListItem::OB_ListItem( SUIT_DataObject* obj, QListViewItem* parent, QListViewItem* after )
-: ListItemF<QListViewItem>( this,obj),
-QListViewItem(parent, after )
-{
- update();
-}
-
-/*!
- Destructor
-*/
-OB_ListItem::~OB_ListItem()
-{
-}
-
-/*!
- Sets selection state of item
- \param s - new state
-*/
-void OB_ListItem::setSelected( bool s )
-{
- setSel( s );
- QListViewItem::setSelected( s );
-}
-
-/*!
- Paints focus
- \param p - painter
- \param cg - color group
- \param r - focus rectangle
-*/
-void OB_ListItem::paintFocus( QPainter* p, const QColorGroup& cg, const QRect& r )
-{
- QColorGroup col_group( cg );
- paintFoc( p, col_group, r );
-
- QRect R( r );
- if ( listView() && !listView()->allColumnsShowFocus() )
- R.setWidth( width( p->fontMetrics(), listView(), 0 ) );
-
- QListViewItem::paintFocus( p, col_group, R );
-}
-
-/*!
- Paints item
- \param p - painter
- \param cg - color group
- \param c - not used
- \param w - width of item
- \param align - alignment
-*/
-void OB_ListItem::paintCell( QPainter* p, const QColorGroup& cg, int c, int w, int align )
-{
- QColorGroup col_group( cg );
- paintC( p, col_group, c ,w, align );
-
- int W = w;
- if ( listView() && !listView()->allColumnsShowFocus() )
- W = width( p->fontMetrics(), listView(), c );
-
- QListViewItem::paintCell( p, col_group, c, min( W, w ), align );
-}
-
-/*!
- \return custom RTTI info
-*/
-int OB_ListItem::RTTI()
-{
- return 1000;
-}
-
-/*!
- \return custom RTTI info
-*/
-int OB_ListItem::rtti() const
-{
- return RTTI();
-}
-
-/*!
- Sets item text
- \param column - column index
- \param text - new text
-*/
-void OB_ListItem::setText( int column, const QString& text )
-{
- QListViewItem::setText( column, text );
- QFontMetrics fm = listView()->fontMetrics();
- int necessary = width( fm, listView(), column ),
- current = listView()->columnWidth( column );
-
- if( listView()->columnWidthMode( column )==QListView::Maximum && necessary>current )
- listView()->setColumnWidth( column, necessary );
-}
-
-/*!
- Constructor
-*/
-OB_CheckListItem::OB_CheckListItem( SUIT_DataObject* obj, QListView* parent, Type type )
-: ListItemF<QCheckListItem>( this, obj),
-QCheckListItem( parent, "", type )
-{
- update();
-}
-
-/*!
- Constructor
-*/
-OB_CheckListItem::OB_CheckListItem( SUIT_DataObject* obj, QListViewItem* parent, Type type )
-: ListItemF<QCheckListItem>( this, obj),
-QCheckListItem( parent, "", type )
-{
- update();
-}
-
-/*!
- Constructor
-*/
-OB_CheckListItem::OB_CheckListItem( SUIT_DataObject* obj, QListView* parent, QListViewItem* after, Type type )
-: ListItemF<QCheckListItem>( this, obj),
-#if defined(QT_VERSION) && QT_VERSION >= 0x030101
- QCheckListItem( parent, after, "", type )
-#else
- QCheckListItem( parent, "", type )
-#endif
-{
- update();
-}
-
-/*!
- Constructor
-*/
-OB_CheckListItem::OB_CheckListItem( SUIT_DataObject* obj, QListViewItem* parent, QListViewItem* after, Type type )
-: ListItemF<QCheckListItem>( this, obj),
-#if defined(QT_VERSION) && QT_VERSION >= 0x030101
- QCheckListItem( parent, after, "", type )
-#else
- QCheckListItem( parent, "", type )
-#endif
-{
- update();
-}
-
-/*!
- Destructor
-*/
-OB_CheckListItem::~OB_CheckListItem()
-{
-}
-
-/*!
- Sets selection state of item
- \param s - new state
-*/
-void OB_CheckListItem::setSelected( bool s )
-{
- setSel( s );
- QCheckListItem::setSelected( s );
-}
-
-/*!
- Paints focus
- \param p - painter
- \param cg - color group
- \param r - focus rectangle
-*/
-void OB_CheckListItem::paintFocus( QPainter* p, const QColorGroup& cg, const QRect& r )
-{
- QColorGroup col_group( cg );
- paintFoc( p, col_group, r );
-
- QRect R( r );
- if ( listView() && !listView()->allColumnsShowFocus() )
- R.setWidth( width( p->fontMetrics(), listView(), 0 ) );
-
- QCheckListItem::paintFocus( p, col_group, R );
-}
-
-/*!
- Paints item
- \param p - painter
- \param cg - color group
- \param c - not used
- \param w - width of item
- \param align - alignment
-*/
-void OB_CheckListItem::paintCell( QPainter* p, const QColorGroup& cg, int c, int w, int align )
-{
- QColorGroup col_group( cg );
- paintC( p, col_group, c ,w, align );
-
- int W = w;
- if ( listView() && !listView()->allColumnsShowFocus() )
- W = width( p->fontMetrics(), listView(), c );
-
- QCheckListItem::paintCell( p, col_group, c, min( W, w ), align );
-}
-
-/*!
- \return custom RTTI info
-*/
-int OB_CheckListItem::RTTI()
-{
- return OB_ListItem::RTTI() + 1;
-}
-
-/*!
- \return custom RTTI info
-*/
-int OB_CheckListItem::rtti() const
-{
- return RTTI();
-}
-
-/*!
- SLOT: called if checked state is changed, changes corresponding state of SUIT object
-*/
-void OB_CheckListItem::stateChange( bool on )
-{
- QCheckListItem::stateChange( on );
-
- if ( dataObject() )
- dataObject()->setOn( on );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 OB_LISTITEM_H
-#define OB_LISTITEM_H
-
-#include "OB.h"
-
-#include <qlistview.h>
-
-class SUIT_DataObject;
-
-/*!
- \class ListItemF
- Base template class for ListViewItems and CheckListItems
-*/
-template<class T> class ListItemF
-{
-public:
- ListItemF( T*, SUIT_DataObject* );
- /*ListItem( SUIT_DataObject*, QListView* );
- ListItem( SUIT_DataObject*, QListViewItem* );
- ListItem( SUIT_DataObject*, QListView*, QListViewItem* );
- ListItem( SUIT_DataObject*, QListViewItem*, QListViewItem* );
-
- ListItem( SUIT_DataObject*, QListView*, int );
- ListItem( SUIT_DataObject*, QListViewItem*, int );
- ListItem( SUIT_DataObject*, QListView*, QListViewItem*, int );
- ListItem( SUIT_DataObject*, QListViewItem*, QListViewItem*, int );*/
-
- void setSel( bool s );
- inline SUIT_DataObject* dataObject() const { return myObject; }
- void paintFoc( QPainter* p, QColorGroup& cg, const QRect& r );
- void paintC( QPainter* p, QColorGroup& cg, int c, int w, int align );
-
-//protected:
- void update();
-
-protected:
- SUIT_DataObject* myObject;
- T* myT;
-};
-
-/*!
- \class OB_ListItem
- Provides custom list item for Object Browser tree
-*/
-class OB_EXPORT OB_ListItem : public ListItemF<QListViewItem>, public QListViewItem
-{
-public:
- OB_ListItem( SUIT_DataObject*, QListView* );
- OB_ListItem( SUIT_DataObject*, QListViewItem* );
- OB_ListItem( SUIT_DataObject*, QListView*, QListViewItem* );
- OB_ListItem( SUIT_DataObject*, QListViewItem*, QListViewItem* );
-
- virtual ~OB_ListItem();
-
- virtual void setSelected( bool s );
- virtual void paintFocus( QPainter* p, const QColorGroup& cg, const QRect& r );
- virtual void paintCell( QPainter* p, const QColorGroup& cg, int c, int w, int align );
-
- virtual void setText ( int column, const QString & text );
-
- virtual int rtti() const;
-
- static int RTTI();
-};
-
-/*!
- \class OB_CheckListItem
- Provides custom list item with check box
-*/
-class OB_EXPORT OB_CheckListItem : public ListItemF<QCheckListItem>, public QCheckListItem
-{
-public:
- OB_CheckListItem( SUIT_DataObject*, QListView*, Type = CheckBox );
- OB_CheckListItem( SUIT_DataObject*, QListViewItem*, Type = CheckBox );
- OB_CheckListItem( SUIT_DataObject*, QListView*, QListViewItem*, Type = CheckBox );
- OB_CheckListItem( SUIT_DataObject*, QListViewItem*, QListViewItem*, Type = CheckBox );
-
- virtual ~OB_CheckListItem();
-
- virtual void setSelected( bool s );
- virtual void paintFocus( QPainter* p, const QColorGroup& cg, const QRect& r );
- virtual void paintCell( QPainter* p, const QColorGroup& cg, int c, int w, int align );
-
-
- virtual int rtti() const;
-
- static int RTTI();
-
-protected:
- void stateChange( bool );
-
-//private:
-// void update();
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "OB_ListView.h"
-
-#include "OB_Filter.h"
-#include "OB_ListItem.h"
-
-#include <SUIT_DataObject.h>
-
-#include <qdragobject.h>
-
-/*!
- Constructor
-*/
-OB_ListView::OB_ListView( QWidget* parent, const char* name, WFlags f )
-: QtxListView( parent, name, f ),
-myFilter( 0 )
-{
-}
-
-/*!
- Constructor
-*/
-OB_ListView::OB_ListView( const int state, QWidget* parent, const char* name, WFlags f )
-: QtxListView( state, parent, name, f ),
-myFilter( 0 )
-{
-}
-
-/*!
- Destructor
-*/
-OB_ListView::~OB_ListView()
-{
- delete myFilter;
-}
-
-/*!
- \return filter
-*/
-OB_Filter* OB_ListView::filter() const
-{
- return myFilter;
-}
-
-/*!
- Changes filter
- \param f - new filter
-*/
-void OB_ListView::setFilter( OB_Filter* f )
-{
- if ( myFilter == f )
- return;
-
- delete myFilter;
- myFilter = f;
-}
-
-/*!
- \return true if item passes filter
-*/
-bool OB_ListView::isOk( QListViewItem* item ) const
-{
- bool ok = true;
- SUIT_DataObject* obj = dataObject( item );
- if ( obj && filter() )
- ok = filter()->isOk( obj );
- return ok;
-}
-
-/*!
- Creates new drag object
-*/
-QDragObject* OB_ListView::dragObject()
-{
- myItems.clear();
-
- for ( QListViewItemIterator it( this ); it.current(); ++it )
- if ( it.current()->isSelected() )
- myItems.append( it.current() );
-
- return new QTextDrag( "", this );
-}
-
-/*!
- Custom drag enter event filter
-*/
-void OB_ListView::dragEnterEvent( QDragEnterEvent* e )
-{
- e->accept();
-}
-
-/*!
- Custom drag move event filter
-*/
-void OB_ListView::dragMoveEvent( QDragMoveEvent* e )
-{
- QListViewItem* item = dropItem( e );
-
- if ( isDropAccepted( item ) )
- {
- setCurrentItem( item );
- e->accept( true );
- }
- else
- e->accept( false );
-}
-
-/*!
- Custom drop event filter
-*/
-void OB_ListView::dropEvent( QDropEvent* e )
-{
- QListViewItem* item = dropItem( e );
- if ( isDropAccepted( item ) )
- {
- e->accept();
- emit dropped( myItems, item, e->action() );
- }
- myItems.clear();
-}
-
-/*!
- Custom key press event filter
-*/
-void OB_ListView::keyPressEvent( QKeyEvent* ke )
-{
- if ( ( ke->key() == Qt::Key_Plus || ke->key() == Qt::Key_Minus ) && ke->state() & ControlButton )
- {
- bool isOpen = ke->key() == Qt::Key_Plus;
- for ( QListViewItemIterator it( this ); it.current(); ++it )
- if ( it.current()->childCount() )
- it.current()->setOpen( isOpen );
- }
- else
- QtxListView::keyPressEvent( ke );
-}
-
-/*!
- Finds item, in that dragged objects are dropped by QDropEvent
- \return tree item
-*/
-QListViewItem* OB_ListView::dropItem( QDropEvent* e ) const
-{
- QListViewItem* item = 0;
- if ( e )
- item = itemAt( QPoint( e->pos().x() - viewport()->x(), e->pos().y() - viewport()->y() ) );
-
- return item;
-}
-
-/*!
- \return SUIT object by tree item
- \param item - tree item
-*/
-SUIT_DataObject* OB_ListView::dataObject( QListViewItem* item ) const
-{
- if ( !item )
- return 0;
-
- SUIT_DataObject* obj = 0;
-
- if ( dynamic_cast<OB_ListItem*>( item ) )
- obj = dynamic_cast<OB_ListItem*>( item )->dataObject();
- else if ( dynamic_cast<OB_CheckListItem*>( item ) )
- obj = dynamic_cast<OB_CheckListItem*>( item )->dataObject();
-
- return obj;
-}
-
-/*!
- \return true if it is possible to drop into item
- \param item - tree item to be checked
-*/
-bool OB_ListView::isDropAccepted( QListViewItem* item ) const
-{
- bool res = true;
-
- for ( QPtrListIterator<QListViewItem> it( myItems ); it.current() && res; ++it )
- res = res && isDropAccepted( it.current(), item );
-
- return res;
-}
-
-/*!
- \return true if it is possible to drop one item into other
- \param drag - dragged item
- \param drop - destination item
-*/
-bool OB_ListView::isDropAccepted( QListViewItem* drag, QListViewItem* drop ) const
-{
- SUIT_DataObject* dragObj = dataObject( drag );
- SUIT_DataObject* dropObj = dataObject( drop );
-
- if ( !dragObj || !dropObj )
- return false;
-
- return dropObj->isDropAccepted( dragObj );
-}
-
-/*!
- Sets column width
- \param col - column index
- \param width - column width
-*/
-void OB_ListView::setColumnWidth( int col, int width )
-{
- int max = columnMaxWidth( col );
- if ( max>0 && width>max )
- width = max;
-
- QtxListView::setColumnWidth( col, width );
-}
-
-/*!
- \return column max width
- \param col - column index
-*/
-int OB_ListView::columnMaxWidth( const int col ) const
-{
- int res = -1;
- if( myMaxColWidth.contains( col ) )
- res = myMaxColWidth[col];
- else if( myMaxColRatio.contains( col ) )
- res = int( myMaxColRatio[col]*height() );
- return res;
-}
-
-/*!
- Changes column max width
- \param col - column index
- \param w - column max width
-*/
-void OB_ListView::setColumnMaxWidth( const int col, const int w )
-{
- myMaxColWidth.insert( col, w );
-}
-
-/*!
- \return column max ratio
- \param col - column index
-*/
-double OB_ListView::columnMaxRatio( const int col ) const
-{
- double res = 0.0;
- if( myMaxColRatio.contains( col ) )
- res = myMaxColRatio[col];
- return res;
-}
-
-/*!
- Changes column max ratio
- \param col - column index
- \param w - column max ratio
-*/
-void OB_ListView::setColumnMaxRatio( const int col, const double r )
-{
- myMaxColRatio.insert( col, r );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 OB_LISTVIEW_H
-#define OB_LISTVIEW_H
-
-#include "OB.h"
-
-
-#include <QtxListView.h>
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-#include <qptrlist.h>
-
-class OB_Filter;
-class QListViewItem;
-class SUIT_DataObject;
-
-/*!
- \class OB_ListView
- Special list view for ObjectBrowser.
- Allows drag-n-drop, filtering of selected objects, column management.
-*/
-class OB_EXPORT OB_ListView : public QtxListView
-{
- Q_OBJECT
-
-public:
- OB_ListView( QWidget* = 0, const char* = 0, WFlags = 0 );
- OB_ListView( const int, QWidget* = 0, const char* = 0, WFlags = 0 );
- virtual ~OB_ListView();
-
- OB_Filter* filter() const;
- void setFilter( OB_Filter* );
-
- bool isOk( QListViewItem* ) const;
- virtual void setColumnWidth( int, int );
- int columnMaxWidth( const int ) const;
- void setColumnMaxWidth( const int, const int );
- double columnMaxRatio( const int ) const;
- void setColumnMaxRatio( const int, const double );
-
-signals:
- void dropped( QPtrList<QListViewItem>, QListViewItem*, int );
-
-protected:
- virtual QDragObject* dragObject();
- virtual void dropEvent( QDropEvent* );
- virtual void dragMoveEvent( QDragMoveEvent* );
- virtual void dragEnterEvent( QDragEnterEvent* );
-
- virtual void keyPressEvent( QKeyEvent* );
-
-private:
- void updateHeader();
- QListViewItem* dropItem( QDropEvent* ) const;
- SUIT_DataObject* dataObject( QListViewItem* ) const;
- bool isDropAccepted( QListViewItem* ) const;
- bool isDropAccepted( QListViewItem*, QListViewItem* ) const;
-
-protected:
- QPtrList<QListViewItem> myItems;
- OB_Filter* myFilter;
- QMap<int,int> myMaxColWidth;
- QMap<int,double> myMaxColRatio;
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-
-#include <OB_ObjSearch.h>
-#include <OB_ListItem.h>
-#include <OB_Browser.h>
-
-#include <qregexp.h>
-
-OB_ObjSearch::OB_ObjSearch( OB_Browser* b )
-: myBrowser( b )
-{
-}
-
-OB_ObjSearch::~OB_ObjSearch()
-{
-}
-
-OB_ListItem* OB_ObjSearch::tail( const bool first ) const
-{
- QListView* lv = myBrowser->listView();
- return dynamic_cast<OB_ListItem*>( first ? lv->firstChild() : lv->lastItem() );
-}
-
-OB_ListItem* OB_ObjSearch::next( OB_ListItem* i, const bool forward ) const
-{
- QListViewItemIterator it( i );
- if( forward )
- it++;
- else
- it--;
- return dynamic_cast<OB_ListItem*>( *it );
-}
-
-SUIT_DataObject* OB_ObjSearch::data( OB_ListItem* i ) const
-{
- return i ? i->dataObject() : 0;
-}
-
-void OB_ObjSearch::setPattern( const QString& data, const bool is_reg_exp, const bool is_case_sens )
-{
- myData = data;
- myIsRegExp = is_reg_exp;
- myIsCaseSens = is_case_sens;
-}
-
-bool OB_ObjSearch::matches( SUIT_DataObject* obj ) const
-{
- if( !obj )
- return false;
-
- QString txt = obj->name();
- if( myIsRegExp )
- {
- QRegExp re( myData );
- re.setCaseSensitive( myIsCaseSens );
- return txt.contains( re );
- }
- else
- return txt.contains( myData, myIsCaseSens );
-}
-
-OB_Browser* OB_ObjSearch::browser() const
-{
- return myBrowser;
-}
-
-OB_ListItem* OB_ObjSearch::findFirst() const
-{
- return find( tail( true ), true, false, false );
-}
-
-OB_ListItem* OB_ObjSearch::findLast() const
-{
- return find( tail( false ), false, false, false );
-}
-
-OB_ListItem* OB_ObjSearch::findNext() const
-{
- return find( current(), true, true, true );
-}
-
-OB_ListItem* OB_ObjSearch::findPrev() const
-{
- return find( current(), false, true, true );
-}
-
-OB_ListItem* OB_ObjSearch::find( OB_ListItem* i, const bool forward,
- const bool ignore_first, const bool cyclic ) const
-{
- if( !i )
- i = tail( forward );
-
- if( ignore_first )
- i = next( i, forward );
-
- while( i && !matches( data( i ) ) )
- i = next( i, forward );
-
- if( !i && cyclic )
- return find( tail( forward ), forward, false, false );
-
- return i;
-}
-
-OB_ListItem* OB_ObjSearch::current() const
-{
- return dynamic_cast<OB_ListItem*>( myBrowser->listView()->currentItem() );
-}
+++ /dev/null
-
-#ifndef OBJECT_BROWSER_OBJECT_SEARCH_HEADER
-#define OBJECT_BROWSER_OBJECT_SEARCH_HEADER
-
-#include <qstring.h>
-
-class OB_ListItem;
-class OB_Browser;
-class SUIT_DataObject;
-
-class OB_ObjSearch
-{
-public:
- OB_ObjSearch( OB_Browser* );
- virtual ~OB_ObjSearch();
-
- void setPattern( const QString&, const bool, const bool );
- OB_Browser* browser() const;
-
- OB_ListItem* findFirst() const;
- OB_ListItem* findLast() const;
- OB_ListItem* findNext() const;
- OB_ListItem* findPrev() const;
-
-protected:
- virtual OB_ListItem* current() const;
- virtual OB_ListItem* tail( const bool ) const;
- virtual OB_ListItem* next( OB_ListItem*, const bool ) const;
- virtual SUIT_DataObject* data( OB_ListItem* ) const;
- virtual bool matches( SUIT_DataObject* ) const;
- OB_ListItem* find( OB_ListItem*, const bool, const bool, const bool ) const;
-
-private:
- OB_Browser* myBrowser;
- QString myData;
- bool myIsRegExp, myIsCaseSens;
-};
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : Plot2d
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES= libPlot2d.la
-
-# header files
-salomeinclude_HEADERS= \
- Plot2d.h \
- Plot2d_Curve.h \
- Plot2d_FitDataDlg.h \
- Plot2d_Prs.h \
- Plot2d_SetupViewDlg.h \
- Plot2d_ViewFrame.h \
- Plot2d_ViewManager.h \
- Plot2d_ViewModel.h \
- Plot2d_ViewWindow.h \
- Plot2d_SetupCurveDlg.h \
- Plot2d_ToolTip.h
-
-dist_libPlot2d_la_SOURCES= \
- Plot2d_Curve.cxx \
- Plot2d_FitDataDlg.cxx \
- Plot2d_Prs.cxx \
- Plot2d_SetupViewDlg.cxx \
- Plot2d_ViewFrame.cxx \
- Plot2d_ViewManager.cxx \
- Plot2d_ViewModel.cxx \
- Plot2d_ViewWindow.cxx \
- Plot2d_SetupCurveDlg.cxx \
- Plot2d_ToolTip.cxx
-
-MOC_FILES = \
- Plot2d_FitDataDlg_moc.cxx \
- Plot2d_SetupViewDlg_moc.cxx \
- Plot2d_ViewFrame_moc.cxx \
- Plot2d_ViewManager_moc.cxx \
- Plot2d_ViewModel_moc.cxx \
- Plot2d_ViewWindow_moc.cxx \
- Plot2d_SetupCurveDlg_moc.cxx \
- Plot2d_ToolTip_moc.cxx
-nodist_libPlot2d_la_SOURCES= $(MOC_FILES)
-
-dist_salomeres_DATA = \
- resources/plot2d_clone.png \
- resources/plot2d_camera_dump.png \
- resources/plot2d_fitall.png \
- resources/plot2d_fitarea.png \
- resources/plot2d_glpan.png \
- resources/plot2d_legend.png \
- resources/plot2d_linear.png \
- resources/plot2d_linear_y.png \
- resources/plot2d_lines.png \
- resources/plot2d_log.png \
- resources/plot2d_log_y.png \
- resources/plot2d_pan.png \
- resources/plot2d_points.png \
- resources/plot2d_settings.png \
- resources/plot2d_splines.png \
- resources/plot2d_zoom.png
-
-nodist_salomeres_DATA= \
- Plot2d_images.qm \
- Plot2d_msg_en.qm
-
-libPlot2d_la_CPPFLAGS=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(QWT_INCLUDES) \
- -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT
-
-libPlot2d_la_LDFLAGS=$(QWT_LIBS) $(QT_MT_LIBS) ../SUIT/libsuit.la
-
-
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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 $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libSalomePrs.la
-
-salomeinclude_HEADERS = SALOME_Prs.h
-
-dist_libSalomePrs_la_SOURCES = SALOME_Prs.cxx
+++ /dev/null
-# SALOME PyInterp : implementation of base thread-safe Python services
-#
-# Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D
-#
-# 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
-#
-#
-#
-# File : Makefile.in
-# Module : SALOME
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libPyInterp.la
-
-salomeinclude_HEADERS= \
- PyInterp.h \
- PyInterp_base.h \
- PyInterp_Dispatcher.h
-
-dist_libPyInterp_la_SOURCES= \
- PyInterp_base.cxx \
- PyInterp_Dispatcher.cxx
-
-MOC_FILES= PyInterp_Watcher_moc.cxx
-nodist_libPyInterp_la_SOURCES= $(MOC_FILES)
-
-libPyInterp_la_CPPFLAGS= $(PYTHON_INCLUDES) $(QT_INCLUDES)
-libPyInterp_la_LDFLAGS= $(PYTHON_LIBS) $(QT_MT_LIBS)
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : PythonConsole
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libPythonConsole.la
-
-salomeinclude_HEADERS= \
- PythonConsole.h \
- PythonConsole_PyConsole.h \
- PythonConsole_PyEditor.h \
- PythonConsole_PyInterp.h
-
-dist_libPythonConsole_la_SOURCES= \
- PythonConsole_PyConsole.cxx \
- PythonConsole_PyEditor.cxx \
- PythonConsole_PyInterp.cxx
-
-MOC_FILES= \
- PythonConsole_PyEditor_moc.cxx \
- PythonConsole_PyConsole_moc.cxx
-nodist_libPythonConsole_la_SOURCES= $(MOC_FILES)
-
-
-libPythonConsole_la_CPPFLAGS= $(PYTHON_INCLUDES) $(QT_INCLUDES) \
- -I$(srcdir)/../PyInterp -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
-
-libPythonConsole_la_LDFLAGS= $(PYTHON_LIBS) $(QT_MT_LIBS)
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-#if !defined ( _PYTHONCONSOLE_H )
-#define _PYTHONCONSOLE_H
-
-// ========================================================
-// set dllexport type for Win platform
-#ifdef WNT
-
-#ifdef PYTHONCONSOLE_EXPORTS
-#define PYCONSOLE_EXPORT __declspec(dllexport)
-#else
-#define PYCONSOLE_EXPORT __declspec(dllimport)
-#endif
-
-#else // WNT
-
-#define PYCONSOLE_EXPORT
-
-#endif // WNT
-
-// ========================================================
-// little trick - if we do not have debug python libraries
-#ifdef _DEBUG
-#ifndef HAVE_DEBUG_PYTHON
-#undef _DEBUG
-#endif
-#endif
-
-//#include <Python.h>
-
-#ifdef _DEBUG
-#ifndef HAVE_DEBUG_PYTHON
-#define _DEBUG
-#endif
-#endif
-
-// ========================================================
-// avoid warning messages
-#ifdef WNT
-#pragma warning (disable : 4786)
-#pragma warning (disable : 4251)
-#endif
-
-#endif // _PYTHONCONSOLE_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 <Python.h>
-#include "PythonConsole_PyConsole.h"
-#include "PythonConsole_PyEditor.h"
-#include "PyInterp_base.h"
-
-#include "SUIT_Desktop.h"
-
-#include <qlayout.h>
-
-using namespace std;
-
-/*!
- Constructor
-*/
-PythonConsole::PythonConsole(QWidget* parent, PyInterp_base* interp)
-: QWidget(parent), myEditor( 0 )
-{
- // create python interpreter
- myInterp = interp;
- if ( !myInterp )
- myInterp = new PythonConsole_PyInterp();
-
- // initialize Python interpretator
- myInterp->initialize();
-
- // create editor console
- QVBoxLayout* lay = new QVBoxLayout( this );
- myEditor = new PythonConsole_PyEditor(myInterp, this,"Python Interpreter");
- lay->addWidget( myEditor );
-}
-
-/*!
- Destructor
-*/
-PythonConsole::~PythonConsole()
-{
-}
-
-/*!
- Executes command
- \param command - string with command and arguments
-*/
-void PythonConsole::exec( const QString& command )
-{
- if ( myEditor )
- myEditor->exec( command );
-}
-
-/*!
- Blocks execution of main application until command is executed
- \param command - string with command and arguments
-*/
-void PythonConsole::execAndWait( const QString& command )
-{
- if ( myEditor )
- myEditor->execAndWait( command );
-}
-
-/*!
- Changes font of python console
- \param f - new font
-*/
-void PythonConsole::setFont( const QFont& f )
-{
- if( myEditor )
- myEditor->setFont( f );
-}
-
-/*!
- \return font of python console
-*/
-QFont PythonConsole::font() const
-{
- QFont res;
- if( myEditor )
- res = myEditor->font();
- return res;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 PythonConsole_PyConsole_H
-#define PythonConsole_PyConsole_H
-
-#include "PythonConsole.h"
-
-#include <qwidget.h>
-
-class PythonConsole_PyEditor;
-class PyInterp_base;
-
-class PYCONSOLE_EXPORT PythonConsole: public QWidget
-{
- Q_OBJECT;
-
-public:
- PythonConsole(QWidget* parent, PyInterp_base* interp = 0 );
- virtual ~PythonConsole();
-
- PyInterp_base* getInterp() { return myInterp; }
- QFont font() const;
- virtual void setFont( const QFont& );
-
- void exec( const QString& command );
- void execAndWait( const QString& command );
-protected:
- PyInterp_base* myInterp;
- PythonConsole_PyEditor* myEditor;
-};
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : PythonConsole_PyEditor.cxx
-// Author : Nicolas REJNERI
-// Module : SALOME
-
-#include <PythonConsole_PyEditor.h> // this include must be first (see PyInterp_base.h)!
-
-#include <PyInterp_Dispatcher.h>
-
-#include <SUIT_Tools.h>
-#include <SUIT_Session.h>
-
-#include <qmap.h>
-#include <qclipboard.h>
-#include <qdragobject.h>
-#include <qapplication.h>
-#include <qpopupmenu.h>
-#include <qfontmetrics.h>
-#include <iostream>
-
-using namespace std;
-
-//#ifdef _DEBUG_
-//static int MYDEBUG = 1;
-//#else
-//static int MYDEBUG = 0;
-//#endif
-
-
-enum { IdCopy, IdPaste, IdClear, IdSelectAll };
-
-
-static QString READY_PROMPT = ">>> ";
-static QString DOTS_PROMPT = "... ";
-
-#define PROMPT_SIZE (int)_currentPrompt.length()
-
-class ExecCommand : public PyInterp_LockRequest
-{
-public:
- ExecCommand(PyInterp_base* theInterp, const QString& theCommand,
- PythonConsole_PyEditor* theListener, bool sync = false)
- : PyInterp_LockRequest( theInterp, theListener, sync ),
- myCommand( theCommand ), myState( PyInterp_Event::OK )
- {}
-
-protected:
- virtual void execute(){
- if( !myCommand.stripWhiteSpace().isEmpty() ) {
-// if(MYDEBUG) MESSAGE("*** ExecCommand::execute() started");
- SUIT_Session::SetPythonExecuted(true); // disable GUI user actions
- int ret = getInterp()->run( myCommand.latin1() );
- SUIT_Session::SetPythonExecuted(false); // enable GUI user actions
-// if(MYDEBUG) MESSAGE("ExecCommand::execute() - myInterp = "<<getInterp()<<"; myCommand = '"<<myCommand.latin1()<<"' - "<<ret);
- if( ret < 0 )
- myState = PyInterp_Event::ERROR;
- else if( ret > 0 )
- myState = PyInterp_Event::INCOMPLETE;
-// if(MYDEBUG) MESSAGE("*** ExecCommand::execute() finished");
- }
- }
-
- virtual QEvent* createEvent() const
- {
- return new PyInterp_Event( myState, (PyInterp_Request*)this );
- }
-
-private:
- QString myCommand;
- int myState;
-};
-
-#define PRINT_EVENT 65432
-
-class PrintEvent : public QCustomEvent
-{
-public:
- PrintEvent( const char* c ) : QCustomEvent( PRINT_EVENT ), myText( c ) {}
- QString text() const { return myText; }
-private:
- QString myText;
-};
-
-void staticCallback( void* data, char* c )
-{
- QApplication::postEvent( (PythonConsole_PyEditor*)data, new PrintEvent( c ) );
-}
-
-/*!
- Constructor
-*/
-PythonConsole_PyEditor::PythonConsole_PyEditor(PyInterp_base* theInterp, QWidget *theParent, const char* theName):
- QTextEdit(theParent,theName),
- myInterp( 0 ),
- myIsInLoop( false )
-{
- QString fntSet( "" );
- QFont aFont = SUIT_Tools::stringToFont( fntSet );
- setFont(aFont);
- //setTextFormat(QTextEdit::PlainText);
- setUndoRedoEnabled( false );
-
- _currentPrompt = READY_PROMPT;
- setWordWrap( WidgetWidth );
- setWrapPolicy( Anywhere );
-
- theInterp->setvoutcb( staticCallback, this );
- theInterp->setverrcb( staticCallback, this );
-
- connect(this,SIGNAL(returnPressed()),this,SLOT(handleReturn()) );
-
- // san - This is necessary for troubleless initialization
- onPyInterpChanged( theInterp );
-}
-
-/*!
- Destructor
-*/
-PythonConsole_PyEditor::~PythonConsole_PyEditor()
-{
-// if(MYDEBUG) MESSAGE("PythonConsole_PyEditor::~PythonConsole_PyEditor()");
-}
-
-/*!
- Called to insert a string s
-*/
-void PythonConsole_PyEditor::setText(QString s)
-{
- int para=paragraphs()-1;
- int col=paragraphLength(para);
-
- // Limit length of the string because exception may occur if string too long (NPAL16033)
- // Exception occurs if one of paragraphs of the input string "s" is too long. Now long
- // paragraph is limited with threshold numbers of characters and finished by " ..." string.
- // Note that first paragraph of the string is checked only because it is enough for bug fixing.
- // If it will be insufficient for other cases then more complicated check should be implemented.
- // At present it is not done because of possible performance problem.
-
- static int threshold = 50000;
- long strLength = s.length();
- if ( col + strLength <= threshold || s.find( '\n' ) < threshold )
- insertAt(s,para,col);
- else
- {
- if ( col >= threshold )
- {
- if ( text( para ).right( 5 ) != QString( " ...\n" ) )
- insertAt(" ...\n",para,col);
- }
- else
- {
- long n = threshold - col;
- s.truncate( n );
- if ( n >= 5 )
- {
- s.at( n - 5 ) = QChar( ' ' );
- s.at( n - 4 ) = QChar( '.' );
- s.at( n - 3 ) = QChar( '.' );
- s.at( n - 2 ) = QChar( '.' );
- s.at( n - 1 ) = QChar( '\n' );
- }
- else
- s = " ...\n";
- insertAt(s,para,col);
- }
- }
-
- int n = paragraphs()-1;
- setCursorPosition( n, paragraphLength(n));
-}
-
-/*!
- Convenient method for executing a Python command,
- as if the user typed it manually
-*/
-void PythonConsole_PyEditor::exec( const QString& command )
-{
- // Some interactive command is being executed in this editor -> do nothing
- if ( isReadOnly() ) {
- myQueue.push_back( command );
- return;
- }
- int para=paragraphs()-1;
- removeParagraph( para );
- _currentPrompt = READY_PROMPT;
- _buf.truncate(0);
- _isInHistory = false;
- setText( "\n" + _currentPrompt);
- // PAL15963 (Problem with option -u (--execute) of runSalome).
- // Let events creating a study end before script execution starts
- setText( command /*+ "\n"*/ );
- //handleReturn();
- qApp->postEvent( this, new QKeyEvent(QEvent::KeyPress,Key_Return,13,Qt::NoButton ));
-}
-
-void PythonConsole_PyEditor::execAndWait( const QString& command )
-{
- if( myIsInLoop )
- return;
-
- myIsInLoop = true;
- exec( command );
- qApp->enter_loop();
- myIsInLoop = false;
-}
-
-/*!
- Called when an handleReturn
-*/
-void PythonConsole_PyEditor::handleReturn()
-{
- int para=paragraphs()-2;
- _buf.append(text(para).remove(0,PROMPT_SIZE));
- _buf.truncate( _buf.length() - 1 );
- setReadOnly( true );
- viewport()->setCursor( waitCursor );
-
- // Post a request to execute Python command
- // Editor will be informed via a custom event that execution has been completed
- PyInterp_Dispatcher::Get()->Exec( new ExecCommand( myInterp, _buf, this ) );
-}
-
-/*!
- Processes drop event: paste dragged text
-*/
-void PythonConsole_PyEditor::contentsDropEvent( QDropEvent* event )
-{
- event->acceptAction();
- QString text;
- if ( QTextDrag::decode( event, text ) ) {
- int par, col;
- int endLine = paragraphs() -1;
- col = charAt( event->pos(), &par );
-
- if ( col >= 0 && par >= 0 ) {
- if ( par != endLine || col < PROMPT_SIZE ) {
- par = endLine;
- col = paragraphLength( endLine );
- }
- setCursorPosition( par, col );
- insertAt( text, par, col );
- removeSelection();
- }
- }
-}
-
-/*!
- Processes middle button release event - paste clipboard's contents
-*/
-void PythonConsole_PyEditor::contentsMouseReleaseEvent( QMouseEvent* event )
-{
- if ( event->button() == LeftButton ) {
- QTextEdit::contentsMouseReleaseEvent(event);
- copy();
- }
- if ( event->button() == MidButton ) {
- if (QApplication::clipboard()->supportsSelection()) {
- int par, col;
- int endLine = paragraphs() -1;
- col = charAt( event->pos(), &par );
- if ( col >= 0 && par >= 0 ) {
- // PAL12896 -->
- if ( par != endLine || col < PROMPT_SIZE ) {
- QPoint aPos = paragraphRect(endLine).bottomRight();
- QMouseEvent* e = new QMouseEvent(event->type(),aPos,event->button(),event->state());
- QTextEdit::contentsMouseReleaseEvent(e);
- }
- else
- QTextEdit::contentsMouseReleaseEvent(event);
- // PAL12896 <--
- }
- }
- }
- else {
- QTextEdit::contentsMouseReleaseEvent(event);
- }
-}
-
-/*
- Processes own popup menu
-*/
-void PythonConsole_PyEditor::mousePressEvent (QMouseEvent* event)
-{
- if ( event->button() == RightButton ) {
- QPopupMenu *popup = new QPopupMenu( this );
- QMap<int, int> idMap;
-
- int para1, col1, para2, col2;
- getSelection(¶1, &col1, ¶2, &col2);
- bool allSelected = hasSelectedText() &&
- para1 == 0 && para2 == paragraphs()-1 && col1 == 0 && para2 == paragraphLength(para2);
- int id;
- id = popup->insertItem( tr( "EDIT_COPY_CMD" ) );
- idMap.insert(IdCopy, id);
- id = popup->insertItem( tr( "EDIT_PASTE_CMD" ) );
- idMap.insert(IdPaste, id);
- id = popup->insertItem( tr( "EDIT_CLEAR_CMD" ) );
- idMap.insert(IdClear, id);
- popup->insertSeparator();
- id = popup->insertItem( tr( "EDIT_SELECTALL_CMD" ) );
- idMap.insert(IdSelectAll, id);
- popup->setItemEnabled( idMap[ IdCopy ], hasSelectedText() );
- popup->setItemEnabled( idMap[ IdPaste ],
- !isReadOnly() && (bool)QApplication::clipboard()->text().length() );
- popup->setItemEnabled( idMap[ IdSelectAll ],
- (bool)text().length() && !allSelected );
-
- int r = popup->exec( event->globalPos() );
- delete popup;
-
- if ( r == idMap[ IdCopy ] ) {
- copy();
- }
- else if ( r == idMap[ IdPaste ] ) {
- paste();
- }
- else if ( r == idMap[ IdClear ] ) {
- clear();
- setText(myBanner);
- _currentPrompt = READY_PROMPT;
- setText(_currentPrompt);
- }
- else if ( r == idMap[ IdSelectAll ] ) {
- selectAll();
- }
- }
- else {
- QTextEdit::mousePressEvent(event);
- }
-}
-
-/*!
- Checks, is the string a command line or not.
-*/
-
-bool PythonConsole_PyEditor::isCommand( const QString& str) const
-{
- // prompt may be '>>> ' or for '... '
- return ( str.find( READY_PROMPT ) == 0 || str.find( DOTS_PROMPT ) == 0 );
-}
-
-
-/*!
- Called when a keyPress event
-*/
-void PythonConsole_PyEditor::keyPressEvent( QKeyEvent* e )
-{
- // get cursor position
- int curLine, curCol;
- getCursorPosition(&curLine, &curCol);
-
- // get last edited line
- int endLine = paragraphs() -1;
-
- // get pressed key code
- int aKey = e->key();
-
- // check if <Ctrl> is pressed
- bool ctrlPressed = e->state() & ControlButton;
- // check if <Shift> is pressed
- bool shftPressed = e->state() & ShiftButton;
-
- // process <Ctrl>+<C> key-bindings
- if ( aKey == Key_C && ctrlPressed ) {
- _buf.truncate(0);
- setText("\n");
- _currentPrompt = READY_PROMPT;
- setText(_currentPrompt);
- return;
- }
-
- // check for printed key
- aKey = ( aKey < Key_Space || aKey > Key_ydiaeresis ) ? aKey : 0;
-
- switch ( aKey ) {
- case 0 :
- // any printed key
- {
- if ( curLine < endLine || curCol < PROMPT_SIZE )
- moveCursor( QTextEdit::MoveEnd, false );
- QTextEdit::keyPressEvent( e );
- break;
- }
- case Key_Return:
- case Key_Enter:
- // <Enter> key
- {
- moveCursor( QTextEdit::MoveEnd, false );
- QTextEdit::keyPressEvent( e );
- break;
- }
- case Key_Up:
- // <Up> arrow key: process as follows:
- // - without <Ctrl>, <Shift> modifiers: previous command in history
- // - with <Ctrl> modifier key pressed: move cursor one row up without selection
- // - with <Shift> modifier key pressed: move cursor one row up with selection
- // - with <Ctrl>+<Shift> modifier keys pressed: scroll one row up
- {
- if ( ctrlPressed && shftPressed ) {
- scrollBy( 0, -QFontMetrics( font() ).lineSpacing() );
- }
- else if ( shftPressed ) {
- if ( curLine > 0 )
- moveCursor( QTextEdit::MoveUp, true );
- }
- else if ( ctrlPressed ) {
- moveCursor( QTextEdit::MoveUp, false );
- }
- else {
- QString histLine = _currentPrompt;
- if ( ! _isInHistory ) {
- _isInHistory = true;
- _currentCommand = text( endLine ).remove( 0, PROMPT_SIZE );
- _currentCommand.truncate( _currentCommand.length() - 1 );
- }
- QString previousCommand = myInterp->getPrevious();
- if ( previousCommand.compare( BEGIN_HISTORY_PY ) != 0 )
- {
- removeParagraph( endLine );
- histLine.append( previousCommand );
- append( histLine );
- }
- moveCursor( QTextEdit::MoveEnd, false );
- scrollViewAfterHistoryUsing( previousCommand ); // NPAL16035
- }
- break;
- }
- case Key_Down:
- // <Down> arrow key: process as follows:
- // - without <Ctrl>, <Shift> modifiers: next command in history
- // - with <Ctrl> modifier key pressed: move cursor one row down without selection
- // - with <Shift> modifier key pressed: move cursor one row down with selection
- // - with <Ctrl>+<Shift> modifier keys pressed: scroll one row down
- {
- if ( ctrlPressed && shftPressed ) {
- scrollBy( 0, QFontMetrics( font() ).lineSpacing() );
- }
- else if ( shftPressed ) {
- if ( curLine < endLine )
- moveCursor( QTextEdit::MoveDown, true );
- }
- else if ( ctrlPressed ) {
- moveCursor( QTextEdit::MoveDown, false );
- }
- else {
- QString histLine = _currentPrompt;
- QString nextCommand = myInterp->getNext();
- if ( nextCommand.compare( TOP_HISTORY_PY ) != 0 ) {
- removeParagraph( endLine );
- histLine.append( nextCommand );
- append( histLine );
- }
- else {
- if (_isInHistory) {
- _isInHistory = false;
- removeParagraph( endLine );
- histLine.append( _currentCommand );
- append( histLine );
- }
- }
- moveCursor( QTextEdit::MoveEnd, false );
- scrollViewAfterHistoryUsing( nextCommand ); // NPAL16035
- }
- break;
- }
- case Key_Left:
- // <Left> arrow key: process as follows:
- // - without <Ctrl>, <Shift> modifiers: move one symbol left (taking into account prompt)
- // - with <Ctrl> modifier key pressed: move one word left (taking into account prompt)
- // - with <Shift> modifier key pressed: move one symbol left with selection
- // - with <Ctrl>+<Shift> modifier keys pressed: move one word left with selection
- {
- if ( !shftPressed && isCommand( text( curLine ) ) && curCol <= PROMPT_SIZE ) {
- setCursorPosition( curLine-1, 0 );
- moveCursor( QTextEdit::MoveLineEnd, false );
- }
- else {
- QTextEdit::keyPressEvent( e );
- }
- break;
- }
- case Key_Right:
- // <Right> arrow key: process as follows:
- // - without <Ctrl>, <Shift> modifiers: move one symbol right (taking into account prompt)
- // - with <Ctrl> modifier key pressed: move one word right (taking into account prompt)
- // - with <Shift> modifier key pressed: move one symbol right with selection
- // - with <Ctrl>+<Shift> modifier keys pressed: move one word right with selection
- {
- if ( !shftPressed ) {
- if ( curCol < paragraphLength( curLine ) ) {
- if ( isCommand( text( curLine ) ) && curCol < PROMPT_SIZE ) {
- setCursorPosition( curLine, PROMPT_SIZE );
- break;
- }
- }
- else {
- if ( curLine < endLine && isCommand( text( curLine+1 ) ) ) {
- setCursorPosition( curLine+1, PROMPT_SIZE );
- break;
- }
- }
- }
- QTextEdit::keyPressEvent( e );
- break;
- }
- case Key_PageUp:
- // <PageUp> key: process as follows:
- // - without <Ctrl>, <Shift> modifiers: first command in history
- // - with <Ctrl> modifier key pressed: move cursor one page up without selection
- // - with <Shift> modifier key pressed: move cursor one page up with selection
- // - with <Ctrl>+<Shift> modifier keys pressed: scroll one page up
- {
- if ( ctrlPressed && shftPressed ) {
- scrollBy( 0, -visibleHeight() );
- }
- else if ( shftPressed ) {
- if ( curLine > 0 )
- moveCursor( QTextEdit::MovePgUp, true );
- }
- else if ( ctrlPressed ) {
- moveCursor( QTextEdit::MovePgUp, false );
- }
- else {
- QString histLine = _currentPrompt;
- if ( ! _isInHistory ) {
- _isInHistory = true;
- _currentCommand = text( endLine ).remove( 0, PROMPT_SIZE );
- _currentCommand.truncate( _currentCommand.length() - 1 );
- }
- QString firstCommand = myInterp->getPrevious();
- QString pcmd;
- while ( ( pcmd = QString( myInterp->getPrevious() ) ).compare( BEGIN_HISTORY_PY ) != 0 )
- firstCommand = pcmd;
- if ( firstCommand.compare( BEGIN_HISTORY_PY ) != 0 ) {
- removeParagraph( endLine );
- histLine.append( firstCommand );
- insertParagraph( histLine, -1 );
- }
- moveCursor( QTextEdit::MoveEnd, false );
- }
- break;
- }
- case Key_PageDown:
- // <PageDown> key: process as follows:
- // - without <Ctrl>, <Shift> modifiers: last command in history
- // - with <Ctrl> modifier key pressed: move cursor one page down without selection
- // - with <Shift> modifier key pressed: move cursor one page down with selection
- // - with <Ctrl>+<Shift> modifier keys pressed: scroll one page down
- {
- if ( ctrlPressed && shftPressed ) {
- scrollBy( 0, visibleHeight() );
- }
- else if ( shftPressed ) {
- if ( curLine < endLine )
- moveCursor( QTextEdit::MovePgDown, true );
- }
- else if ( ctrlPressed ) {
- moveCursor( QTextEdit::MovePgDown, false );
- }
- else {
- if ( _isInHistory ) {
- QString histLine = _currentPrompt;
- while ( QString( myInterp->getNext() ).compare( TOP_HISTORY_PY ) != 0 );
- _isInHistory = false;
- removeParagraph( endLine );
- histLine.append( _currentCommand );
- insertParagraph( histLine, -1 );
- }
- moveCursor( QTextEdit::MoveEnd, false );
- }
- break;
- }
- case Key_Home:
- // <Home> key: process as follows:
- // - without <Ctrl>, <Shift> modifiers: move cursor to the beginning of the current line without selection
- // - with <Ctrl> modifier key pressed: move cursor to the very first symbol without selection
- // - with <Shift> modifier key pressed: move cursor to the beginning of the current line with selection
- // - with <Ctrl>+<Shift> modifier keys pressed: move cursor to the very first symbol with selection
- {
- if ( ctrlPressed ) {
- moveCursor( QTextEdit::MoveHome, shftPressed );
- }
- else {
- if ( isCommand( text( curLine ) ) ) {
- int ps1, ps2, cs1, cs2;
- bool hasSelection = hasSelectedText();
- if ( hasSelection )
- getSelection( &ps1, &cs1, &ps2, &cs2 );
- removeSelection();
- horizontalScrollBar()->setValue( horizontalScrollBar()->minValue() );
- if ( curCol > PROMPT_SIZE && shftPressed )
- setSelection( curLine, PROMPT_SIZE, curLine, ( hasSelection && ps1 == ps2 && ps1 == curLine && cs2 > PROMPT_SIZE ) ? cs2 : curCol );
- setCursorPosition( curLine, PROMPT_SIZE );
- }
- else {
- moveCursor( QTextEdit::MoveLineStart, shftPressed );
- }
- }
- break;
- }
- case Key_End:
- // <End> key: process as follows:
- // - without <Ctrl>, <Shift> modifiers: move cursor to the end of the current line without selection
- // - with <Ctrl> modifier key pressed: move cursor to the very last symbol without selection
- // - with <Shift> modifier key pressed: move cursor to the end of the current line with selection
- // - with <Ctrl>+<Shift> modifier keys pressed: move cursor to the very last symbol with selection
- {
- if ( ctrlPressed ) {
- moveCursor( QTextEdit::MoveEnd, shftPressed );
- }
- else {
- moveCursor( QTextEdit::MoveLineEnd, shftPressed );
- }
- break;
- }
- case Key_Backspace :
- // <Backspace> key: process as follows
- // - without any modifiers : delete symbol before the cursor / selection (taking into account prompt)
- // - with <Ctrl> modifier key pressed: delete previous word
- // works only for last (command) line
- {
- if ( curLine == endLine && ( curCol > PROMPT_SIZE || curCol >= PROMPT_SIZE && hasSelectedText() ) ) {
- if ( ctrlPressed && !hasSelectedText() ) {
- QString txt = text( curLine );
- int ind = curCol-1;
- while ( ind > 0 && txt[ ind ] == ' ' ) ind--;
- ind = txt.findRev( ' ', ind ) + 1;
- if ( ind > PROMPT_SIZE-1 ) {
- setSelection( curLine, ind, curLine, curCol );
- removeSelectedText();
- }
- else {
- QTextEdit::keyPressEvent( e );
- }
- }
- else {
- QTextEdit::keyPressEvent( e );
- }
- }
- break;
- }
- case Key_Delete :
- // <Delete> key: process as follows
- // - without any modifiers : delete symbol after the cursor / selection (taking into account prompt)
- // - with <Ctrl> modifier key pressed: delete next word
- // works only for last (command) line
- {
- if ( curLine == endLine && curCol > PROMPT_SIZE-1 ) {
- if ( ctrlPressed && !hasSelectedText() ) {
- QString txt = text( curLine );
- int ind = curCol;
- while ( ind < (int)( txt.length() - 1 ) && txt[ind] == ' ' ) ind++;
- ind = txt.find( ' ', ind );
- while ( ind < (int)( txt.length() - 1 ) && txt[ ind ] == ' ' ) ind++;
- if ( ind > PROMPT_SIZE-1 ) {
- setSelection( curLine, curCol, curLine, ind );
- removeSelectedText();
- }
- else {
- QTextEdit::keyPressEvent( e );
- }
- }
- else {
- QTextEdit::keyPressEvent( e );
- }
- }
- break;
- }
- case Key_Insert :
- // <Insert> key: process as follows
- // - with <Ctrl> modifier key pressed: copy()
- // - with <Shift> modifier key pressed: paste() to the command line
- {
- if ( ctrlPressed ) {
- copy();
- }
- else if ( shftPressed ) {
- if ( curLine != endLine || curCol < PROMPT_SIZE )
- moveCursor( QTextEdit::MoveEnd, false );
- paste();
- }
- else
- QTextEdit::keyPressEvent( e );
- break;
- }
- }
-}
-
-/*!
- Handles notifications coming from Python dispatcher
-*/
-void PythonConsole_PyEditor::customEvent(QCustomEvent* e)
-{
- switch( e->type() ) {
- case PRINT_EVENT:
- {
- PrintEvent* pe=(PrintEvent*)e;
- setText( pe->text() );
- return;
- }
- case PyInterp_Event::OK:
- case PyInterp_Event::ERROR:
- {
- _buf.truncate(0);
- _currentPrompt = READY_PROMPT;
- QString txt = text( paragraphs()-1 );
- txt.truncate( txt.length()-1 );
- if ( !txt.isEmpty() )
- setText("\n");
- setText(_currentPrompt);
- viewport()->unsetCursor();
- if( myIsInLoop )
- qApp->exit_loop();
- break;
- }
- case PyInterp_Event::INCOMPLETE:
- {
- _buf.append("\n");
- _currentPrompt = DOTS_PROMPT;
- QString txt = text( paragraphs()-1 );
- txt.truncate( txt.length()-1 );
- if ( !txt.isEmpty() )
- setText("\n");
- setText(_currentPrompt);
- viewport()->unsetCursor();
- if( myIsInLoop )
- qApp->exit_loop();
- break;
- }
- default:
- QTextEdit::customEvent( e );
- }
-
- setReadOnly( false );
- _isInHistory = false;
-
- if ( e->type() == PyInterp_Event::OK && myQueue.count() > 0 ) {
- QString nextcmd = myQueue[0];
- myQueue.pop_front();
- exec( nextcmd );
- }
-}
-
-/*!
- Handles Python interpreter change
-*/
-void PythonConsole_PyEditor::onPyInterpChanged( PyInterp_base* interp )
-{
- if ( myInterp != interp
- // Force read-only state and wait cursor when myInterp is NULL
- || !myInterp ){
- myInterp = interp;
- if ( myInterp ){
- myBanner = myInterp->getbanner().c_str();
- setText(myBanner);
- _buf.truncate(0);
- setReadOnly( false );
- _isInHistory = false;
- setText(_currentPrompt);
- viewport()->unsetCursor();
- if( myIsInLoop )
- qApp->exit_loop();
- }
- else {
- clear();
- setReadOnly( true );
- viewport()->setCursor( waitCursor );
- }
- }
-}
-
-/*!
- Creates popup menu
-*/
-QPopupMenu* PythonConsole_PyEditor::createPopupMenu( const QPoint& pos )
-{
- QPopupMenu* popup = QTextEdit::createPopupMenu( pos );
-
- QValueList<int> ids;
- for ( int i = 0; popup && i < (int)popup->count(); i++ )
- {
- if ( !popup->isItemEnabled( popup->idAt( i ) ) )
- ids.append( popup->idAt( i ) );
- }
-
- for ( QValueList<int>::const_iterator it = ids.begin(); it != ids.end(); ++it )
- popup->removeItem( *it );
-
- SUIT_Tools::simplifySeparators( popup );
-
- if ( !popup->count() )
- {
- delete popup;
- popup = 0;
- }
-
- return popup;
-}
-
-/*!
- Scrolls view after use of history (Up/Down keys)to the left position if length
- of command less than visible width of the view
-*/
-void PythonConsole_PyEditor::scrollViewAfterHistoryUsing( const QString& command )
-{
- if ( !command.isEmpty() )
- {
- if ( command == QString( BEGIN_HISTORY_PY ) )
- {
- ensureCursorVisible();
- return;
- }
-
- QFontMetrics aFM( currentFont() );
- int aCommandLength = aFM.width( command ) + aFM.width( READY_PROMPT ) + 5;
- int aVisibleWidth = visibleWidth();
- QScrollBar* aBar = horizontalScrollBar();
- if ( aBar )
- {
- if ( aCommandLength <= aVisibleWidth )
- aBar->setValue( aBar->minValue() );
- else if ( aVisibleWidth > 0 )
- {
- double aRatio = aCommandLength / contentsWidth();
- double aPos = ( aBar->maxValue() - aBar->minValue() ) * aRatio;
- aBar->setValue( (int)aPos );
- ensureCursorVisible();
- }
- }
- }
-}
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : PythonConsole_PyEditor.h
-// Author : Nicolas REJNERI
-// Module : SALOME
-
-#ifndef PythonConsole_PyEditor_H
-#define PythonConsole_PyEditor_H
-
-#include "PythonConsole_PyInterp.h" // this include must be first (see PyInterp_base.h)!
-
-#include <qevent.h>
-#include <qtextedit.h>
-
-class PythonConsole_PyInterp;
-
-class PYCONSOLE_EXPORT PythonConsole_PyEditor : public QTextEdit
-{
- Q_OBJECT;
-
-public:
- PythonConsole_PyEditor(PyInterp_base* theInterp, QWidget *theParent = 0, const char* theName = "");
- ~PythonConsole_PyEditor();
-
- virtual void setText(QString s);
- bool isCommand(const QString& str) const;
-
- virtual void exec( const QString& command );
- void execAndWait( const QString& command );
-
-protected:
- virtual void contentsDropEvent( QDropEvent* event );
- virtual void contentsMouseReleaseEvent( QMouseEvent* event );
- virtual void keyPressEvent (QKeyEvent* event);
- virtual void mousePressEvent (QMouseEvent* event);
- virtual void customEvent (QCustomEvent* event);
-
-public slots:
- void handleReturn();
- void onPyInterpChanged( PyInterp_base* );
-
- virtual QPopupMenu* createPopupMenu( const QPoint& );
-
-private:
-
- void scrollViewAfterHistoryUsing( const QString& command );
-
-private:
- QString _buf;
- QString _currentCommand;
- QString _currentPrompt;
- bool _isInHistory, myIsInLoop;
-
- PyInterp_base* myInterp;
-
- QString myBanner;
- QString myOutput;
- QString myError;
- QStringList myQueue;
-};
-
-#endif
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : PythonConsole_PyInterp.cxx
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#include "PythonConsole_PyInterp.h"
-//#include "utilities.h"
-
-using namespace std;
-
-
-//#ifdef _DEBUG_
-//static int MYDEBUG = 0;
-//#else
-//static int MYDEBUG = 0;
-//#endif
-
-
-/*!
- * constructor : multi Python interpreter, one per SALOME study.
- * calls initialize method defined in base class, which calls virtual methods
- * initstate & initcontext redefined here.
- */
-PythonConsole_PyInterp::PythonConsole_PyInterp(): PyInterp_base()
-{
-}
-
-/*!
- Destructor
-*/
-PythonConsole_PyInterp::~PythonConsole_PyInterp()
-{
-}
-
-/*!
- * EDF-CCAR
- * When SALOME uses multi Python interpreter feature,
- * Every study has its own interpreter and thread state (_tstate = Py_NewInterpreter())
- * This is fine because every study has its own modules (sys.modules) stdout and stderr
- * BUT some Python modules must be imported only once. In multi interpreter context Python
- * modules (*.py) are imported several times.
- * The pyqt module must be imported only once because it registers classes in a C module.
- * It's quite the same with omniorb modules (internals and generated with omniidl)
- * This problem is handled with "shared modules" defined in salome_shared_modules.py
- * These "shared modules" are imported only once and only copied in all the other interpreters
- * BUT it's not the only problem. Every interpreter has its own __builtin__ module. That's fine
- * but if we have copied some modules and imported others problems may arise with operations that
- * are not allowed in restricted execution environment. So we must impose that all interpreters
- * have identical __builtin__ module.
- * That's all, for the moment ...
- */
-
-bool PythonConsole_PyInterp::initState()
-{
- /*
- * The GIL is acquired on input and released on output
- */
- /*PyEval_AcquireLock();
-#ifdef WNT
- _tstate = PyGILState_GetThisThreadState();
- // if no thread state defined
- if ( _tstate )
- PyThreadState_Swap(_tstate);
- else
-#endif
- {
- _tstate = Py_NewInterpreter(); // create an interpreter and save current state
- PySys_SetArgv(PyInterp_base::_argc,PyInterp_base::_argv); // initialize sys.argv
- //if(MYDEBUG) MESSAGE("PythonConsole_PyInterp::initState - this = "<<this<<"; _tstate = "<<_tstate);
- }*/
-
- /*
- * The GIL is acquired and will be held on initState output
- * It is the caller responsability to release the lock if needed
- */
- PyEval_AcquireLock();
-
- _tstate = Py_NewInterpreter(); // create an interpreter and save current state
- PySys_SetArgv(PyInterp_base::_argc,PyInterp_base::_argv); // initialize sys.argv
-// if(MYDEBUG) MESSAGE("PythonConsole_PyInterp::initState - this = "<<this<<"; _tstate = "<<_tstate);
-
-
- /*
- * If builtinmodule has been initialized all the sub interpreters
- * will have the same __builtin__ module
- */
-
- if(!builtinmodule) // PAL18041: deepcopy function don't work in Salome
- {
- //builtinmodule is static member of PyInterp class
- //If it is not NULL (initialized to the builtin module of the main interpreter
- //all the sub interpreters will have the same builtin
- //_interp is a static member and is the main interpreter
- //The first time we initialized it to the builtin of main interpreter
- builtinmodule=PyDict_GetItemString(_interp->modules, "__builtin__");
- }
-
- if(builtinmodule)
- {
- PyObject *m = PyImport_GetModuleDict();
- PyDict_SetItemString(m, "__builtin__", builtinmodule);
-// SCRUTE(builtinmodule->ob_refcnt); // builtinmodule reference counter
- _tstate->interp->builtins = PyModule_GetDict(builtinmodule);
- Py_INCREF(_tstate->interp->builtins);
- }
- PyEval_ReleaseThread(_tstate);
- return true;
-}
-
-/*!
- The GIL is assumed to be held
- It is the caller responsability caller to acquire the GIL
- It will still be held on initContext output
-*/
-bool PythonConsole_PyInterp::initContext()
-{
- PyObject *m = PyImport_AddModule("__main__"); // interpreter main module (module context)
- if(!m){
-// if(MYDEBUG) MESSAGE("problem...");
- PyErr_Print();
-// ASSERT(0);
- return false;
- }
- _g = PyModule_GetDict(m); // get interpreter dictionnary context
-// if(MYDEBUG) MESSAGE("PythonConsole_PyInterp::initContext - this = "<<this<<"; _g = "<<_g);
-
- if(builtinmodule){
- PyDict_SetItemString(_g, "__builtins__", builtinmodule); // assign singleton __builtin__ module
- }
- return true;
-}
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : PythonConsole_PyInterp.h
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#ifndef _PythonConsole_PYINTERP_H_
-#define _PythonConsole_PYINTERP_H_
-
-#include "PythonConsole.h"
-
-#include <PyInterp_base.h> // this include must be first (see PyInterp_base.h)!
-
-class PYCONSOLE_EXPORT PythonConsole_PyInterp : public PyInterp_base
-{
-public:
- PythonConsole_PyInterp();
- ~PythonConsole_PyInterp();
-
-protected:
- virtual bool initState();
- virtual bool initContext();
-};
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Alexander SOLOVYOV (OCN)
-# Module : QDS
-# $Header: /home/server/cvs/GUI/GUI_SRC/src/QDS/Makefile.in
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libQDS.la
-
-# header files
-salomeinclude_HEADERS= QDS.h \
- QDS_CheckBox.h \
- QDS_ComboBox.h \
- QDS_Datum.h \
- QDS_LineEdit.h \
- QDS_SpinBox.h \
- QDS_SpinBoxDbl.h \
- QDS_TextEdit.h \
- QDS_Validator.h
-
-dist_libQDS_la_SOURCES= \
- QDS.cxx \
- QDS_CheckBox.cxx \
- QDS_ComboBox.cxx \
- QDS_Datum.cxx \
- QDS_LineEdit.cxx \
- QDS_SpinBox.cxx \
- QDS_SpinBoxDbl.cxx \
- QDS_TextEdit.cxx \
- QDS_Validator.cxx
-
-MOC_FILES= \
- QDS_CheckBox_moc.cxx \
- QDS_ComboBox_moc.cxx \
- QDS_Datum_moc.cxx \
- QDS_LineEdit_moc.cxx \
- QDS_SpinBox_moc.cxx \
- QDS_SpinBoxDbl_moc.cxx \
- QDS_TextEdit_moc.cxx
-nodist_libQDS_la_SOURCES= $(MOC_FILES)
-
-# may be neccessary for the external projects or future improvements
-EXTRA_DIST+= QDS_RadioBox.cxx QDS_RadioBox.h resources/QDS_msg_en.po
-
-libQDS_la_CPPFLAGS=$(QT_INCLUDES) $(CAS_CPPFLAGS) \
- -I$(srcdir)/../Qtx -I$(srcdir)/../DDS
-
-libQDS_la_LDFLAGS=$(QT_MT_LIBS) $(CAS_KERNEL)
-libQDS_la_LIBADD=../DDS/libDDS.la ../Qtx/libqtx.la
-
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "QDS.h"
-
-#include "QDS_Datum.h"
-
-#include <qtextcodec.h>
-
-#include <DDS_DicItem.h>
-#include <DDS_Dictionary.h>
-
-#include <TCollection_HAsciiString.hxx>
-#include <TCollection_HExtendedString.hxx>
-
-QValueList<QDS_Datum*> QDS::_datumList;
-
-/*!
- Convert the OpenCascade ascii string to Qt string.
-*/
-QString QDS::toQString( const TCollection_AsciiString& src )
-{
- QTextCodec* codec = QTextCodec::codecForLocale();
- QString res;
- if ( !src.IsEmpty() )
- res = codec ? codec->toUnicode( (char*)src.ToCString(), src.Length() ) :
- QString( (char*)src.ToCString() );
- return res;
-}
-
-/*!
- Convert the OpenCascade unicode string to Qt string.
-*/
-QString QDS::toQString( const TCollection_ExtendedString& src )
-{
- if ( src.IsAscii() )
- return toQString( TCollection_AsciiString( src ) );
- else
- return QString( (QChar*)src.ToExtString(), src.Length() );
-}
-
-/*!
- Convert the OpenCascade ascii string to Qt string.
-*/
-QString QDS::toQString( const Handle(TCollection_HAsciiString)& src )
-{
- if ( src.IsNull() )
- return QString::null;
- else
- return toQString( src->String() );
-}
-
-/*!
- Convert the OpenCascade unicode string to Qt string.
-*/
-QString QDS::toQString( const Handle(TCollection_HExtendedString)& src )
-{
- if ( src.IsNull() )
- return QString::null;
- else
- return toQString( src->String() );
-}
-
-/*!
- Convert the Qt string to OpenCascade ascii string.
-*/
-TCollection_AsciiString QDS::toAsciiString( const QString& src )
-{
- TCollection_AsciiString res;
- if ( src.latin1() )
- {
- QTextCodec* codec = QTextCodec::codecForLocale();
- if ( codec )
- {
- int len = -1;
- QCString str = codec->fromUnicode( src, len );
- res = TCollection_AsciiString( (Standard_CString)(const char*)str, len );
- }
- else
- res = TCollection_AsciiString( (char*)src.latin1() );
- }
- return res;
-}
-
-/*!
- Convert the OpenCascade unicode string to OpenCascade ascii string.
-*/
-TCollection_AsciiString QDS::toAsciiString( const TCollection_ExtendedString& src )
-{
- return TCollection_AsciiString( src );
-}
-
-/*!
- Convert the OpenCascade unicode string to OpenCascade ascii string.
-*/
-TCollection_AsciiString QDS::toAsciiString( const Handle(TCollection_HExtendedString)& src )
-{
- TCollection_AsciiString res;
- if ( !src.IsNull() )
- res = toAsciiString( src->String() );
- return res;
-}
-
-/*!
- Convert the Qt string to OpenCascade unicode string.
-*/
-TCollection_ExtendedString QDS::toExtString( const QString& src )
-{
- if ( src.isEmpty() )
- return TCollection_ExtendedString();
-
- Standard_Integer len = src.length();
- Standard_ExtString extStr = new Standard_ExtCharacter[( len + 1 ) * 2];
- memcpy( extStr, src.unicode(), len * 2 );
- extStr[len] = 0;
-
- TCollection_ExtendedString trg( extStr );
-
- delete [] extStr;
-
- return trg;
-}
-
-/*!
- Convert the OpenCascade ascii string to OpenCascade unicode string.
-*/
-TCollection_ExtendedString QDS::toExtString( const TCollection_AsciiString& src )
-{
- return TCollection_ExtendedString( src );
-}
-
-/*!
- Load datum definitions in the dictionary from XML file \adictPath.
- Returns true if load successed or false otherwise.
-*/
-bool QDS::load( const QString& dictPath )
-{
- if ( dictPath.isEmpty() )
- return false;
-
- return DDS_Dictionary::Load( toAsciiString( dictPath ) );
-}
-
-/*!
- Returns the label of unit system \asys. If component \acomp specified and not empty then
- function find the given unit system in the given component otherwise all components will be searched.
- If unit system not found then empty string returned.
-*/
-QString QDS::unitSystemLabel( const QString& sys, const QString& comp )
-{
- QString lab;
- TCollection_AsciiString system = toAsciiString( sys );
- Handle(DDS_Dictionary) dic = DDS_Dictionary::Get();
- if ( !dic.IsNull() )
- lab = toQString( comp.isEmpty() ? dic->GetUnitSystemLabel( system ) :
- dic->GetUnitSystemLabel( system, toAsciiString( comp ) ) );
- return lab;
-}
-
-/*!
- Gets the name of active unit system from the specified component \acomp.
- If component not specified or component is empty string then first got component will be used.
- If component exist then active unit system name returned or empty string otherwise.
-*/
-QString QDS::activeUnitSystem( const QString& comp )
-{
- QString sys;
- Handle(DDS_Dictionary) dic = DDS_Dictionary::Get();
- if ( !dic.IsNull() )
- sys = toQString( comp.isEmpty() ? dic->GetActiveUnitSystem() :
- dic->GetActiveUnitSystem( toAsciiString( comp ) ) );
- return sys;
-}
-
-/*!
- Sets the active unit system named \asys. If not empty component name \acomp specified then
- unit system will be activated in the given component otherwise all components will be processed.
-
- After the changing of active unit system function notify about it to all registered datums
- from processed components using method QDS_Datum::unitSystemChanged();
-*/
-void QDS::setActiveUnitSystem( const QString& sys, const QString& comp )
-{
- Handle(DDS_Dictionary) dic = DDS_Dictionary::Get();
- if ( dic.IsNull() )
- return;
-
- TCollection_AsciiString system = toAsciiString( sys );
- comp.isEmpty() ? dic->SetActiveUnitSystem( system ) :
- dic->SetActiveUnitSystem( system, toAsciiString( comp ) );
-
- QString unitSys = activeUnitSystem( comp );
- if ( sys == unitSys )
- return;
-
- TCollection_AsciiString aComp = toAsciiString( comp );
- for ( QValueList<QDS_Datum*>::iterator it = _datumList.begin(); it != _datumList.end(); ++it )
- {
- QDS_Datum* datum = *it;
- if ( !datum )
- continue;
-
- bool ok = aComp.IsEmpty();
- if ( !ok )
- {
- Handle(DDS_DicItem) item = datum->dicItem();
- ok = !item.IsNull() && aComp == item->GetComponent();
- }
-
- if ( ok )
- datum->unitSystemChanged( unitSys );
- }
-}
-
-/*!
- Register given datum \adatum in the static list.
- This function invoked by QDS_Datum constructor.
-*/
-void QDS::insertDatum( QDS_Datum* datum )
-{
- if ( !datum )
- return;
-
- _datumList.append( datum );
-}
-
-/*!
- Remove given datum \adatum from the static list.
- This function invoked by QDS_Datum destructor.
-*/
-void QDS::removeDatum( QDS_Datum* datum )
-{
- if ( !datum )
- return;
-
- _datumList.remove( datum );
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 QDS_H
-#define QDS_H
-
-#ifdef WIN32
-#ifdef QDS_EXPORTS
-#define QDS_EXPORT __declspec(dllexport)
-#else
-#define QDS_EXPORT __declspec(dllimport)
-#endif
-#else
-#define QDS_EXPORT
-#endif
-
-#if defined WIN32
-#pragma warning ( disable:4251 )
-#pragma warning ( disable:4786 )
-#endif
-
-#include <qstring.h>
-#include <qvaluelist.h>
-
-#include <TCollection_AsciiString.hxx>
-
-#include <TCollection_ExtendedString.hxx>
-
-class QDS_Datum;
-class Handle(TCollection_HAsciiString);
-class Handle(TCollection_HExtendedString);
-
-class QDS_EXPORT QDS
-{
-public:
- /*! Enum describes bit flags of the Qt datum view and behaviour */
- typedef enum
- {
- None = 0x00, //!< Non specified any flags (Default behaviour)
- Label = 0x01, //!< Create subwidget for datum label
- Control = 0x02, //!< Create subwidget for datum input control
- Units = 0x04, //!< Create subwidget for datum units of measure
- NotFormat = 0x08, //!< Don't format initial value
- NotAccel = 0x10, //!< Not support accelerators in datum label
- UnitsWithLabel = 0x20, //!< Display units of measure in label like "<label_text> (<units_text>) instead separate text"
- All = Label | Control | Units //!< Create all subwidgets
- } DatumFlags;
-
-public:
- static bool load( const QString& );
-
- static QString unitSystemLabel( const QString&,
- const QString& = QString::null );
- static QString activeUnitSystem( const QString& = QString::null );
- static void setActiveUnitSystem( const QString&,
- const QString& = QString::null );
-
- static QString toQString( const TCollection_AsciiString& );
- static QString toQString( const TCollection_ExtendedString& );
- static QString toQString( const Handle(TCollection_HAsciiString)& );
- static QString toQString( const Handle(TCollection_HExtendedString)& );
-
- static TCollection_AsciiString toAsciiString( const QString& );
- static TCollection_AsciiString toAsciiString( const TCollection_ExtendedString& );
- static TCollection_AsciiString toAsciiString( const Handle(TCollection_HExtendedString)& );
-
- static TCollection_ExtendedString toExtString( const QString& );
- static TCollection_ExtendedString toExtString( const TCollection_AsciiString& );
-
-protected:
- static void insertDatum( QDS_Datum* );
- static void removeDatum( QDS_Datum* );
-
-private:
- static QValueList<QDS_Datum*> _datumList;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "QDS_CheckBox.h"
-
-#include <qcheckbox.h>
-
-/*
- \class QDS_CheckBox
-
- Datum with control corresponding to check box. This control can have only two states:
- 1 (on/true) or 0 (off/false). QDS_CheckBox don't take into account standard parameter
- properties (minimum, maximum, filter, etc).
-
- QDS_CheckBox can set and get following values for access methods (setStringValue(),
- setIntegerValue(), setDoubleValue(), stringValue(), integerValue(), doubleValue()):
- \li "1" - check box state is setted as on.
- \li "0" - check box state is setted as off.
- \li "-1" - check box state is setted as "NoChage" (undefined).
-
- User can set and check a state "NoChange" using methods clear() and isEmpty() accordingly.
-*/
-
-/*!
- Constructor. Create check box datum object with datum identifier \aid under widget \aparent.
- Parameter \aflags define behaviour of datum and set of created subwidgets. Default value of
- this parameter is QDS::All. Parameter \acomp specify the component name which will be used
- during search of dictionary item.
-*/
-QDS_CheckBox::QDS_CheckBox( const QString& id, QWidget* parent, const int flags, const QString& comp )
-: QDS_Datum( id, parent, flags, comp )
-{
-}
-
-/*!
- Destructor.
-*/
-QDS_CheckBox::~QDS_CheckBox()
-{
-}
-
-/*!
- Sets the state "NoChange" for checkbox.
-*/
-void QDS_CheckBox::clear()
-{
- setStringValue( "-1" );
-}
-
-/*!
- Returns string from QCheckBox widget. If the check box state is on then 1 returned otherwise 0.
-*/
-QString QDS_CheckBox::getString() const
-{
- QString val;
- if ( checkBox() && checkBox()->state() != QButton::NoChange )
- val = checkBox()->isChecked() ? "1" : "0";
- return val;
-}
-
-/*!
- Sets the string into QCheckBox widget. If argument \atxt is string with number "1" then check box
- state is setted as on. If argument \atxt is string with number "0" then state is setted as off.
- If argument \atxt is string with number "-1" then state is setted as "NoChage" (undefined).
-*/
-void QDS_CheckBox::setString( const QString& txt )
-{
- if ( !checkBox() )
- return;
-
- bool isOk;
- int val = (int)txt.toDouble( &isOk );
- if ( isOk && val < 0 )
- {
- checkBox()->setTristate();
- checkBox()->setNoChange();
- }
- else
- checkBox()->setChecked( isOk && val != 0 );
-}
-
-/*!
- Returns pointer to QCheckBox widget.
-*/
-QCheckBox* QDS_CheckBox::checkBox() const
-{
- return ::qt_cast<QCheckBox*>( controlWidget() );
-}
-
-/*!
- Create QCheckBox widget as control subwidget.
-*/
-QWidget* QDS_CheckBox::createControl( QWidget* parent )
-{
- QCheckBox* cb = new QCheckBox( parent );
- connect( cb, SIGNAL( stateChanged( int ) ), SLOT( onParamChanged() ) );
- connect( cb, SIGNAL( toggled( bool ) ), SIGNAL( toggled( bool ) ) );
- connect( cb, SIGNAL( stateChanged( int ) ), this, SLOT( onStateChanged( int ) ) );
- return cb;
-}
-
-/*!
- Notify about ñhanging of control state
-*/
-void QDS_CheckBox::onParamChanged()
-{
- emit paramChanged();
-}
-
-/*!
- Notify about ñhanging of control state. Switch off check box property "tristate" when
- state changed by user.
-*/
-void QDS_CheckBox::onStateChanged( int state )
-{
- if ( state != QButton::NoChange && checkBox() )
- checkBox()->setTristate( false );
-}
-
-/*!
- Sets the check box state \atheState.
-*/
-void QDS_CheckBox::setChecked( const bool theState )
-{
- if ( checkBox() )
- checkBox()->setChecked( theState );
-}
-
-/*!
- Returns current check box state.
-*/
-bool QDS_CheckBox::isChecked() const
-{
- return checkBox() ? checkBox()->isChecked() : false;
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 QDS_CHECKBOX_H
-#define QDS_CHECKBOX_H
-
-#include "QDS_Datum.h"
-
-class QCheckBox;
-
-class QDS_EXPORT QDS_CheckBox : public QDS_Datum
-{
- Q_OBJECT
-
-public:
- QDS_CheckBox( const QString&, QWidget* = 0, const int = All, const QString& = QString::null );
- virtual ~QDS_CheckBox();
-
- bool isChecked() const;
- void setChecked( const bool );
-
- virtual void clear();
-
-signals:
- void toggled( bool );
-
-private slots:
- void onParamChanged();
- void onStateChanged( int );
-
-protected:
- QCheckBox* checkBox() const;
- virtual QWidget* createControl( QWidget* );
-
- virtual QString getString() const;
- virtual void setString( const QString& );
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "QDS_ComboBox.h"
-
-#include <DDS_Dictionary.h>
-
-#include <TCollection_AsciiString.hxx>
-#include <TColStd_HArray1OfInteger.hxx>
-#include <TColStd_HArray1OfExtendedString.hxx>
-
-#include <qlineedit.h>
-
-/*
- \class QDS_ComboBox
-
- Datum with control corresponding to combo box. This control used for datum with enumerable values.
- It can be used for datum which has type of value 'List'. Each item of combobox defined two properties:
- integer identifier and string name. All operations on items performed via identifier.
-*/
-
-/*!
- Constructor. Create combobox datum object with datum identifier \aid under widget \aparent. Parameter \aflags
- define behaviour of datum and set of created subwidgets. Default value of this parameter is QDS::All.
- Parameter \acomp specify the component name which will be used during search of dictionary item.
-*/
-QDS_ComboBox::QDS_ComboBox( const QString& id, QWidget* parent, const int flags, const QString& comp )
-: QDS_Datum( id, parent, flags, comp )
-{
-}
-
-/*!
- Destructor.
-*/
-QDS_ComboBox::~QDS_ComboBox()
-{
-}
-
-/*!
- Returns true if ComboBox allow to edit current text.
-*/
-bool QDS_ComboBox::editable() const
-{
- if ( comboBox() && comboBox()->lineEdit() )
- return !comboBox()->lineEdit()->isReadOnly();
- else
- return false;
-}
-
-/*!
- Sets the possibily of current text editing.
-*/
-void QDS_ComboBox::setEditable( const bool on )
-{
- QComboBox* aCombo = comboBox();
- if ( aCombo )
- aCombo->setEditable( on );
- if ( aCombo && aCombo->lineEdit() )
- {
- aCombo->lineEdit()->setReadOnly( !on );
- aCombo->clearValidator();
- if ( on )
- aCombo->setValidator( validator() );
- }
-}
-
-/*!
- Returns number of items in ComboBox. If \atotal is 'false' then only
- visible items are taken into account otherwise all items.
-*/
-int QDS_ComboBox::count( bool total ) const
-{
- if ( total )
- return myValue.count();
- else if ( comboBox() )
- return comboBox()->count();
- else
- return 0;
-}
-
-/*!
- Returns list of list item identifiers \aids. If \atotal is 'false' then only visible items
- are taken into account otherwise all items.
-*/
-void QDS_ComboBox::values( QValueList<int>& ids, bool total ) const
-{
- ids.clear();
- for ( QIntList::const_iterator it = myDataIds.begin(); it != myDataIds.end(); ++it )
- if ( total || ( myState.contains( *it ) && myState[*it] ) )
- ids.append( *it );
-}
-
-/*!
- Returns the current id as integer. Reimplemented.
-*/
-int QDS_ComboBox::integerValue() const
-{
- QComboBox* cb = comboBox();
- QString cur = getString();
- if ( cb && cb->count() > 0 && cb->currentItem() >= 0 )
- cur = cb->text( cb->currentItem() );
-
- if ( cb && cur == getString() )
- return getId( cb->currentItem() );
- else
- return getId( getString() );
-}
-
-/*!
- Returns the current id as double. Reimplemented.
-*/
-double QDS_ComboBox::doubleValue() const
-{
- initDatum();
-
- QComboBox* cb = comboBox();
- QString cur = getString();
- if ( cb && cb->count() > 0 && cb->currentItem() >= 0 )
- cur = cb->text( cb->currentItem() );
-
- if ( cb && cur == getString() )
- return getId( cb->currentItem() );
- else
- return getId( getString() );
-}
-
-/*!
- Set the current item acording to specified id. Reimplemented.
-*/
-void QDS_ComboBox::setIntegerValue( const int id )
-{
- initDatum();
-
- if ( myValue.contains( id ) )
- setString( myValue[id] );
- else
- setString( "" );
-}
-
-/*!
- Get the integer part of specified value and use it as new current identifier. Reimplemented.
-*/
-void QDS_ComboBox::setDoubleValue( const double val )
-{
- initDatum();
-
- int id = (int)val;
- if ( myValue.contains( id ) )
- setString( myValue[id] );
- else if ( id == -1 )
- setString( "" );
-}
-
-/*!
- Returns visible state of item specified by \aid.
-*/
-bool QDS_ComboBox::state( const int id ) const
-{
- bool state = false;
- if ( myState.contains( id ) )
- state = myState[id];
- return state;
-}
-
-/*!
- Sets the visible state of item specified by \aid. If \aid is -1 then specified
- state will be set to all items. If \aappend is set then keep status for other items
- otherwise status of other items will be cleared.
-*/
-void QDS_ComboBox::setState( const bool on, const int id, const bool append )
-{
- QValueList<int> lst;
- if ( id < 0 )
- {
- for ( IdStateMap::Iterator it = myState.begin(); it != myState.end(); ++it )
- lst.append( it.key() );
- }
- else
- lst.append( id );
-
- setState( on, lst, append );
-}
-
-/*!
- Sets the visible state of items specified by list of identifiers \aids.
- If \aappend is set then keep status for other items otherwise status of other
- items will be cleared.
-*/
-void QDS_ComboBox::setState( const bool on, const QValueList<int>& ids, const bool append )
-{
- initDatum();
-
- if ( ids.isEmpty() && append )
- return;
-
- bool changed = false;
-
- QMap<int, int> aMap;
- for ( uint i = 0; i < ids.count(); i++ )
- aMap.insert( *ids.at( i ), 0 );
-
- for ( IdStateMap::Iterator it = myState.begin(); it != myState.end(); ++it )
- {
- if ( aMap.contains( it.key() ) )
- {
- if ( it.data() != on )
- {
- it.data() = on;
- changed = true;
- }
- }
- else if ( !append && it.data() == on )
- {
- it.data() = !on;
- changed = true;
- }
- }
- if ( changed )
- updateComboBox();
-}
-
-/*!
- Sets the custom user items into the combo box. User items like standard dictionary
- list items will be added into the combobox. This functionality allow to user override
- items.
-*/
-void QDS_ComboBox::setValues( const QValueList<int>& ids, const QStringList& names )
-{
- initDatum();
-
- if ( ids.count() != names.count() )
- return;
-
- myUserIds = ids;
- myUserNames = names;
-}
-
-/*!
- This is an overloaded member function, provided for convenience.
- It behaves essentially like the above function. It creates
- QValueList (0, 1, 2 ... ) and call previous method.
-*/
-void QDS_ComboBox::setValues( const QStringList& names )
-{
- initDatum();
-
- QValueList< int > ids;
- for ( int i = 0, n = names.count(); i < n; i++ )
- ids.append( i );
- setValues( ids, names );
-}
-
-/*!
- Sets the active item as item with default id. If default
- not defined then first item will be used.
-*/
-void QDS_ComboBox::reset()
-{
- int id = -1;
- QString aDefValue = defaultValue();
- if ( !aDefValue.isEmpty() )
- id = aDefValue.toInt();
-
- if ( id == -1 )
- id = getId( 0 );
-
- setIntegerValue( id );
-}
-
-/*!
- Returns identifier from given ComboBox string item.
-*/
-int QDS_ComboBox::stringToValue( const QString& str ) const
-{
- return getId( str );
-}
-
-/*!
- Returns ComboBox string item from given identifier.
-*/
-QString QDS_ComboBox::valueToString( const int val ) const
-{
- QString str;
- if ( myValue.contains( val ) )
- str = myValue[val];
- return str;
-}
-
-/*!
- Returns string from QComboBox widget. Reimplemented.
-*/
-QString QDS_ComboBox::getString() const
-{
- QString res;
- QtxComboBox* cb = comboBox();
- if ( cb )
- {
- if ( !cb->editable() )
- {
- if ( !cb->isCleared() )
- res = cb->currentText();
- }
- else
- res = cb->lineEdit()->text();
- }
- return res;
-}
-
-/*!
- Sets the string into QComboBox widget. Reimplemented.
-*/
-void QDS_ComboBox::setString( const QString& txt )
-{
- QtxComboBox* cb = comboBox();
- if ( !cb )
- return;
-
- bool isClear = cb->isCleared();
-
- int idx = -1;
- for ( int i = 0; i < cb->count() && idx == -1; i++ )
- if ( cb->text( i ) == txt )
- idx = i;
-
- int old = cb->currentItem();
- if ( idx != -1 )
- cb->setCurrentItem( idx );
- else if ( txt.isEmpty() )
- {
- if ( !cb->editable() )
- cb->setCurrentText( txt );
- else
- cb->lineEdit()->setText( txt );
- }
- if ( isClear != txt.isEmpty() || ( !isClear && old != cb->currentItem() ) )
- {
- onParamChanged();
- QString str = getString();
- emit activated( integerValue() );
- emit activated( str );
- emit paramChanged();
- emit paramChanged( str );
- }
-}
-
-/*!
- Returns pointer to QtxComboBox widget.
-*/
-QtxComboBox* QDS_ComboBox::comboBox() const
-{
- return ::qt_cast<QtxComboBox*>( controlWidget() );
-}
-
-/*!
- Create QComboBox widget as control subwidget. Reimplemented.
-*/
-QWidget* QDS_ComboBox::createControl( QWidget* parent )
-{
- QtxComboBox* cb = new QtxComboBox( parent );
- cb->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ) );
- connect( cb, SIGNAL( textChanged( const QString& ) ), this,
- SLOT( onTextChanged( const QString& ) ) );
- connect( cb, SIGNAL( activated( int ) ), this, SLOT( onActivated( int ) ) );
- return cb;
-}
-
-/*!
- Notification about active unit system changing. Reimplemented from QDS_Datum.
- Update combobox content.
-*/
-void QDS_ComboBox::unitSystemChanged( const QString& system )
-{
- QDS_Datum::unitSystemChanged( system );
-
- Handle(TColStd_HArray1OfInteger) anIds;
- Handle(TColStd_HArray1OfExtendedString) aValues, anIcons;
-
- Handle(DDS_DicItem) aDicItem = dicItem();
- if ( !aDicItem.IsNull() )
- aDicItem->GetListOfValues( aValues, anIds, anIcons );
-
- myValue.clear();
- myIcons.clear();
- myDataIds.clear();
-
- QMap<int, QString> userMap;
- QIntList::iterator iIt = myUserIds.begin();
- QStringList::iterator sIt = myUserNames.begin();
- for ( ; iIt != myUserIds.end() && sIt != myUserNames.end(); ++iIt, ++sIt )
- userMap.insert( *iIt, *sIt );
-
- if ( !anIds.IsNull() && !aValues.IsNull() &&
- anIds->Length() == aValues->Length() )
- {
- for ( int i = anIds->Lower(); i <= anIds->Upper(); i++ )
- {
- QString aValue;
- QPixmap aPixmap;
- int id = anIds->Value( i );
- if ( userMap.contains( id ) )
- aValue = userMap[id];
- else
- {
- aValue = toQString( aValues->Value( i ) );
- if ( !anIcons.IsNull() && i <= anIcons->Upper() )
- {
- QString anIconId = toQString( anIcons->Value( i ) );
- if ( anIconId != "" )
- aPixmap = QPixmap( anIconId );
- }
- }
-
- myDataIds.append( id );
- myValue.insert( id, aValue );
- myState.insert( id, true );
- if ( !aPixmap.isNull() )
- myIcons.insert( id, aPixmap );
- }
- }
-
- for ( iIt = myUserIds.begin(); iIt != myUserIds.end(); ++iIt )
- {
- int id = *iIt;
- if ( !myValue.contains( id ) )
- {
- myDataIds.append( id );
- myValue.insert( id, userMap[id] );
- }
- }
-
- QIntList del, add;
- for ( IdStateMap::Iterator it1 = myState.begin(); it1 != myState.end(); ++it1 )
- if ( !myValue.contains( it1.key() ) )
- del.append( it1.key() );
-
- for ( IdValueMap::Iterator it2 = myValue.begin(); it2 != myValue.end(); ++it2 )
- if ( !myState.contains( it2.key() ) )
- add.append( it2.key() );
-
- for ( QIntList::iterator iter1 = del.begin(); iter1 != del.end(); ++iter1 )
- myState.remove( *iter1 );
-
- for ( QIntList::iterator iter2 = add.begin(); iter2 != add.end(); ++iter2 )
- myState.insert( *iter2, true );
-
- updateComboBox();
-}
-
-/*!
- Notify about text changing in line edit of ComboBox.
-*/
-void QDS_ComboBox::onTextChanged( const QString& )
-{
- onParamChanged();
- emit paramChanged();
- QString str = getString();
- emit paramChanged( str );
-}
-
-/*!
- Notify about activation combobox item.
-*/
-void QDS_ComboBox::onActivated( int idx )
-{
- if ( comboBox() )
- comboBox()->setCurrentItem( comboBox()->currentItem() );
-
- int id = getId( idx );
- if ( id != -1 )
- {
- onParamChanged();
- QString str = getString();
- emit activated( id );
- emit activated( str );
- emit paramChanged();
- emit paramChanged( str );
- }
-}
-
-/*!
- Updates ComboBox after have change of visible state or items have been inserted/removed.
-*/
-void QDS_ComboBox::updateComboBox()
-{
- QtxComboBox* cb = comboBox();
-
- int curId = -1;
-
- bool isClear = false;
-
- if ( cb )
- {
- isClear = cb->isCleared();
-
- curId = getId( cb->currentItem() );
- cb->clear();
- }
-
- myIndex.clear();
-
- int idx = 0;
- for ( QIntList::const_iterator it = myDataIds.begin(); it != myDataIds.end(); ++it )
- {
- int id = *it;
- if ( !myValue.contains( id ) || !myState.contains( id ) || !myState[id] )
- continue;
-
- myIndex.insert( id, idx++ );
- if ( cb )
- {
- if ( myIcons.contains( id ) )
- cb->insertItem( myIcons[id], myValue[id] );
- else
- cb->insertItem( myValue[id] );
- }
- }
-
- if ( cb && cb->count() )
- {
- cb->setFont( cb->font() );
- cb->updateGeometry();
-
- if ( isClear )
- cb->setCurrentText( "" );
- else
- {
- if ( getIndex( curId ) != -1 )
- cb->setCurrentItem( getIndex( curId ) );
- if ( curId != getId( cb->currentItem() ) )
- onActivated( cb->currentItem() );
- }
- }
-}
-
-/*!
- Returns index of ComboBox item according to id.
-*/
-int QDS_ComboBox::getIndex( const int id ) const
-{
- int idx = -1;
- if ( myIndex.contains( id ) )
- idx = myIndex[id];
- return idx;
-}
-
-/*!
- Returns index of ComboBox item according to string.
-*/
-int QDS_ComboBox::getIndex( const QString& str ) const
-{
- int idx = -1;
- QComboBox* cb = comboBox();
- if ( cb )
- {
- for ( int i = 0; i < cb->count() && idx == -1; i++ )
- if ( cb->text( i ) == str )
- idx = i;
- }
- return idx;
-}
-
-/*!
- Returns id according to ComboBox item index.
-*/
-int QDS_ComboBox::getId( const int idx ) const
-{
- int id = -1;
- IdIndexMap::ConstIterator it = myIndex.begin();
- for (; it != myIndex.end() && id == -1; ++it )
- if ( it.data() == idx )
- id = it.key();
- return id;
-}
-
-/*!
- Returns id according to ComboBox item string.
-*/
-int QDS_ComboBox::getId( const QString& str ) const
-{
- int id = -1;
- int candidate = -1;
- IdValueMap::ConstIterator it = myValue.begin();
- for (; it != myValue.end() && id == -1; ++it )
- {
- if ( it.data() == str )
- {
- if ( state( it.key() ) )
- id = it.key();
- else
- candidate = it.key();
- }
- }
- if ( id == -1 )
- id = candidate;
-
- return id;
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 QDS_COMBOBOX_H
-#define QDS_COMBOBOX_H
-
-#include "QDS_Datum.h"
-
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
-
-#include <QtxComboBox.h>
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-class QDS_EXPORT QDS_ComboBox : public QDS_Datum
-{
- Q_OBJECT
-
-public:
- QDS_ComboBox( const QString&, QWidget* = 0, const int = All, const QString& = QString::null );
- virtual ~QDS_ComboBox();
-
- bool editable() const;
- void setEditable( const bool );
-
- int count( bool = false ) const;
- void values( QValueList<int>&, bool = false ) const;
-
- virtual int integerValue() const;
- virtual double doubleValue() const;
- virtual void setIntegerValue( const int );
- virtual void setDoubleValue( const double );
-
- bool state( const int ) const;
- void setState( const bool, const int, const bool = true );
- void setState( const bool, const QValueList<int>&, const bool = true );
- void setValues( const QValueList<int>&, const QStringList& );
- void setValues( const QStringList& );
-
- virtual void reset();
-
- int stringToValue( const QString& ) const;
- QString valueToString( const int ) const;
-
-signals:
- void activated( int );
- void activated( const QString& );
-
-protected slots:
- virtual void onActivated( int );
- virtual void onTextChanged( const QString& );
-
-protected:
- QtxComboBox* comboBox() const;
- virtual QWidget* createControl( QWidget* );
-
- virtual QString getString() const;
- virtual void setString( const QString& );
-
- virtual void unitSystemChanged( const QString& );
-
-private:
- int getId( const int ) const;
- int getId( const QString& ) const;
- int getIndex( const int ) const;
- int getIndex( const QString& ) const;
-
- void updateComboBox();
-
-private:
- typedef QMap<int, QPixmap> IdIconsMap;
- typedef QMap<int, QString> IdValueMap;
- typedef QMap<int, bool> IdStateMap;
- typedef QMap<int, int> IdIndexMap;
-
-private:
- IdValueMap myValue;
- IdStateMap myState;
- IdIndexMap myIndex;
- IdIconsMap myIcons;
-
- QIntList myDataIds;
- QIntList myUserIds;
- QStringList myUserNames;
-};
-
-#ifdef WNT
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "QDS_Datum.h"
-
-#include "QDS_Validator.h"
-
-#include <DDS_Dictionary.h>
-
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qvalidator.h>
-#include <qmessagebox.h>
-
-#include <TColStd_SequenceOfAsciiString.hxx>
-
-/*!
- class: QDS_Datum::Wrapper
- descr: Wrapper widget for sub widgets. [internal]
-*/
-
-class QDS_Datum::Wrapper : public QWidget
-{
-public:
- Wrapper( QWidget* = 0 );
- virtual ~Wrapper();
-
- QWidget* widget() const;
- void setWidget( QWidget* );
-
- virtual void setGeometry( int x, int y, int w, int h );
- virtual void setSizePolicy( QSizePolicy );
-
-private:
- QWidget* myWid;
-};
-
-QDS_Datum::Wrapper::Wrapper( QWidget* parent )
-: QWidget( parent ),
-myWid( 0 )
-{
- QHBoxLayout* base = new QHBoxLayout( this );
- base->setAutoAdd( true );
- setFocusPolicy( StrongFocus );
-}
-
-QDS_Datum::Wrapper::~Wrapper()
-{
-}
-
-QWidget* QDS_Datum::Wrapper::widget() const
-{
- return myWid;
-}
-
-void QDS_Datum::Wrapper::setWidget( QWidget* wid )
-{
- if ( myWid == wid )
- return;
-
- myWid = wid;
-
- if ( !myWid )
- return;
-
- if ( myWid->parent() != this )
- myWid->reparent( this, QPoint( 0, 0 ) );
-
- setTabOrder( this, myWid );
- setFocusProxy( myWid );
-
- myWid->updateGeometry();
- updateGeometry();
-}
-
-void QDS_Datum::Wrapper::setSizePolicy( QSizePolicy sp )
-{
- QWidget::setSizePolicy( sp );
-
- if ( widget() )
- widget()->setSizePolicy( sp );
-}
-
-void QDS_Datum::Wrapper::setGeometry( int x, int y, int w, int h )
-{
- QWidget::setGeometry( x, y, w, h );
-
- if ( widget() && widget()->size() != size() )
- widget()->setGeometry( 0, 0, width(), height() );
-}
-
-/*!
- \class QDS_Datum
-
- This is a base class for control using the data dictionary. Datum is successor of QObject (not QWidget).
- This object can have three sub widgets named as Label, Control and Units. User can skip creation of
- some of them manipulate by parameter \aflags. Label widget display label of datum, Control widget allow
- to input value, Units widget display units of measure in the active system.
-
- These widgets constructs under parent of datum. If this parent has layout which can automaticaly add child
- widgets (see QLayout::setAutoAdd()) then these subwidgets will be placed in following order: first widget
- is Label, second - Control, third - Unints. User can add these widgets to layout manually using methods
- QDS_Datum::addTo() or QDS_Datum::widget(). In last case User can retrieve desired widget and place it into
- layout.
-
- If use QGroupBox as parent widget for datum object then all subwidgets will be arranged automatically by
- group box according to column and orientation properties of QGroupBox.
-
- For example:
- QGroupBox* box = new QGroupBox( 3, Qt::Horizontal, "datum box" );
- QDS_Datum* d1 = new QDS_Datum( "datum_1", box, All );
- QDS_Datum* d2 = new QDS_Datum( "datum_2", box, All );
- QDS_Datum* d3 = new QDS_Datum( "datum_3", box, All );
-
- In this example we create the QGroupBox with 3 horizontal columns. All created datum widgets will be
- placed automatically three widgets in a row. Each datum will be placed from up to bottom one by one.
-
- Datum value is stored as string. User can get/set this value in different kinds:
- \liAs string - methods stringValue()/setStringValue().
- \liAs integer - methods integerValue()/setIntegerValue(). Given value converted to/from SI.
- \liAs double - methods doubleValue()/setDoubleValue(). Given value converted to/from SI.
- \liAs variant - methods value()/setValue().
-
- User can perform some actions on datum subwidgets using following methods: isEnabled(),
- setEnabled(), show(), hide(), setShown(), setFocus(), setAlignment().
-*/
-
-/*!
- Constructor. Create datum object with datum identifier \aid under widget \aparent. Parameter \aflags
- define behaviour of datum and set of created subwidgets. Default value of this parameter is QDS::All.
- Parameter \acomp specify the component name which will be used during search of dictionary item.
-
- Datum register self in the static list by QDS::insertDatum().
-*/
-QDS_Datum::QDS_Datum( const QString& id, QWidget* parent, const int flags, const QString& comp )
-: QObject( parent ),
-myId( id ),
-myLabel( 0 ),
-myUnits( 0 ),
-myControl( 0 ),
-myFlags( flags ),
-myInitialised( false )
-{
- if ( myFlags & Label )
- myWrapper.insert( Label, new Wrapper( parent ) );
- if ( myFlags & Control )
- myWrapper.insert( Control, new Wrapper( parent ) );
- if ( myFlags & Units )
- myWrapper.insert( Units, new Wrapper( parent ) );
-
- for ( QMap<int, Wrapper*>::Iterator it = myWrapper.begin(); it != myWrapper.end(); ++it )
- connect( it.data(), SIGNAL( destroyed( QObject* ) ), this, SLOT( onDestroyed( QObject* ) ) );
-
- Handle(DDS_Dictionary) aDict = DDS_Dictionary::Get();
- if ( aDict.IsNull() )
- return;
-
- TCollection_AsciiString anId = toAsciiString( id );
- TCollection_AsciiString aComp = toAsciiString( comp );
-
- if ( aComp.IsEmpty() )
- setDicItem( aDict->GetDicItem( anId ) );
- else
- setDicItem( aDict->GetDicItem( anId, aComp ) );
-
- QTimer::singleShot( 0, this, SLOT( onInitDatum() ) );
-
- if ( parent )
- parent->installEventFilter( this );
-
- insertDatum( this );
-}
-
-/*!
- Destructor. Destroy all subwidget.
- Datum unregister self from the static list by QDS::removeDatum().
-*/
-QDS_Datum::~QDS_Datum()
-{
- removeDatum( this );
-
- delete myLabel;
- delete myUnits;
- delete myControl;
-/*
- for ( QMap<int, Wrapper*>::Iterator it = myWrapper.begin(); it != myWrapper.end(); ++it )
- delete it.data();
-*/
-}
-
-/*!
- Overloaded operator allow to retrieve main subwidget named Control.
-*/
-QDS_Datum::operator QWidget*() const
-{
- return widget( Control );
-}
-
-/*!
- Returns the datum id.
-*/
-QString QDS_Datum::id() const
-{
- initDatum();
-
- return myId;
-}
-
-/*!
- Returns the datum type of value.
-*/
-int QDS_Datum::type() const
-{
- initDatum();
-
- int res = DDS_DicItem::Unknown;
- if ( !myDicItem.IsNull() )
- res = myDicItem->GetType();
- return res;
-}
-
-/*!
- Returns the datum label string.
-*/
-QString QDS_Datum::label() const
-{
- initDatum();
-
- QString labStr;
- if ( !myDicItem.IsNull() )
- labStr = toQString( myDicItem->GetLabel() );
-
- if ( flags() & NotAccel )
- labStr = removeAccel( labStr );
-
- return labStr;
-}
-
-/*!
- Returns the datum units string.
-*/
-QString QDS_Datum::units() const
-{
- initDatum();
-
- QString unitStr;
- if ( !myDicItem.IsNull() )
- unitStr = toQString( myDicItem->GetUnits() );
- return unitStr;
-}
-
-/*!
- Returns the datum value filter string.
-*/
-QString QDS_Datum::filter() const
-{
- initDatum();
-
- QString fltr;
- if ( !myDicItem.IsNull() )
- fltr = toQString( myDicItem->GetFilter() );
- return fltr;
-}
-
-/*!
- Returns the datum value format string.
-*/
-QString QDS_Datum::format() const
-{
- initDatum();
-
- QString fmtStr;
- if ( !myDicItem.IsNull() )
- fmtStr = toQString( myDicItem->GetFormat( false ) );
- return fmtStr;
-}
-
-/*!
- Returns the datum default value string.
-*/
-QString QDS_Datum::defaultValue() const
-{
- initDatum();
-
- QString pref = prefix();
- QString suff = suffix();
-
- QString def;
- if ( !myDicItem.IsNull() )
- def = toQString( myDicItem->GetDefaultValue() );
-
- QString aDef = def.stripWhiteSpace();
- if ( !pref.isEmpty() && aDef.left( pref.length() ) == pref )
- aDef = aDef.mid( pref.length() );
-
- if ( !suff.isEmpty() && aDef.right( suff.length() ) == suff )
- aDef = aDef.mid( 0, aDef.length() - suff.length() );
-
- return aDef;
-}
-
-/*!
- Returns the datum minimum value string.
-*/
-QString QDS_Datum::minimumValue() const
-{
- initDatum();
-
- QString min;
- if ( !myDicItem.IsNull() && myDicItem->HasData( DDS_DicItem::MinValue ) )
- min = format( format(), type(), myDicItem->GetMinValue() );
- return min;
-}
-
-/*!
- Returns the datum maximum value string.
-*/
-QString QDS_Datum::maximumValue() const
-{
- initDatum();
-
- QString max;
- if ( !myDicItem.IsNull() && myDicItem->HasData( DDS_DicItem::MaxValue ) )
- max = format( format(), type(), myDicItem->GetMaxValue() );
- return max;
-}
-
-/*!
- Returns the datum long description.
-*/
-QString QDS_Datum::longDescription() const
-{
- initDatum();
-
- QString ldStr;
- if ( !myDicItem.IsNull() )
- ldStr = toQString( myDicItem->GetLongDescription() );
- return ldStr;
-}
-
-/*!
- Returns the datum short description.
-*/
-QString QDS_Datum::shortDescription() const
-{
- initDatum();
-
- QString sdStr;
- if ( !myDicItem.IsNull() )
- sdStr = toQString( myDicItem->GetLongDescription() );
- return sdStr;
-}
-
-/*!
- Returns the list of option names.
-*/
-QStringList QDS_Datum::options() const
-{
- QStringList res;
- if ( !dicItem().IsNull() )
- {
- TColStd_SequenceOfAsciiString lst;
- dicItem()->GetOptionNames( lst );
- for ( int i = 1; i <= lst.Length(); i++ )
- res.append( toQString( lst.Value( i ) ) );
- }
- return res;
-}
-
-/*!
- Returns the option specified by \aname as QVariant.
- If option not exist then not valid QVariant returned.
-*/
-QVariant QDS_Datum::option( const QString& name ) const
-{
- QVariant res;
- if ( !dicItem().IsNull() )
- res = QVariant( toQString( dicItem()->GetOption( toAsciiString( name ) ) ) );
- return res;
-}
-
-/*!
- Returns the option specified by \aname as QString.
- If option not exist then empty string returned.
-*/
-QString QDS_Datum::optionString( const QString& name ) const
-{
- QString res;
- if ( !dicItem().IsNull() )
- res = toQString( dicItem()->GetOption( toAsciiString( name ) ) );
- return res;
-}
-
-/*!
- Returns the option specified by \aname as double.
- If option not exist then 0 returned.
-*/
-double QDS_Datum::optionDouble( const QString& name ) const
-{
- double res = 0;
- QVariant opt = option( name );
- if ( opt.isValid() && opt.canCast( QVariant::Double ) )
- res = opt.toDouble();
- return res;
-}
-
-/*!
- Returns the option specified by \aname as integer.
- If option not exist then 0 returned.
-*/
-int QDS_Datum::optionInteger( const QString& name ) const
-{
- int res = 0;
- QVariant opt = option( name );
- if ( opt.isValid() && opt.canCast( QVariant::Int ) )
- res = opt.toInt();
- return res;
-}
-
-/*!
- Returns the datum value as variant (QVariant object).
-*/
-QVariant QDS_Datum::value() const
-{
- QVariant val;
- if ( !isEmpty() )
- val = stringValue();
- return val;
-}
-
-/*!
- Returns the datum value as string (QString object).
-*/
-QString QDS_Datum::stringValue() const
-{
- initDatum();
-
- if ( getString() == myTargetValue )
- return mySourceValue;
- else
- return getString();
-}
-
-/*!
- Returns the datum value as double. This value converted from units of measure in active unit system
- to units of measure in unit system "SI".
-*/
-double QDS_Datum::doubleValue() const
-{
- initDatum();
-
- double res = 0;
- if ( !myTargetValue.isNull() && myTargetValue == getString() )
- res = mySourceValue.toDouble();
- else
- {
- res = getString().toDouble();
- if ( !myDicItem.IsNull() )
- res = myDicItem->ToSI( res );
- }
-
- return res;
-}
-
-/*!
- Returns the datum value as integer. This value converted from units of measure in active unit system
- to units of measure in unit system "SI".
-*/
-int QDS_Datum::integerValue() const
-{
- initDatum();
-
- int res = 0;
- if ( !myTargetValue.isNull() && myTargetValue == getString() )
- res = mySourceValue.toInt();
- else
- {
- double val = getString().toDouble();
- if ( !myDicItem.IsNull() )
- res = (int)myDicItem->ToSI( val );
- }
-
- return res;
-}
-
-/*!
- Returns the text from datum. Text consist of label, string value and units.
-*/
-QString QDS_Datum::text() const
-{
- initDatum();
-
- QString aLabel = label();
- QString aData = stringValue();
- QString aUnits = units();
-
- QString res = aLabel;
- if ( !res.isEmpty() && !aData.isEmpty() )
- res += QString( ": " );
-
- res += aData;
- if ( !aUnits.isEmpty() )
- res += QString( " " ) + aUnits;
-
- return res;
-}
-
-/*!
- Returns false if datum control has inputted value.
-*/
-bool QDS_Datum::isEmpty() const
-{
- return stringValue().isEmpty();
-}
-
-/*!
- Reset datum state and set default value as current.
-*/
-void QDS_Datum::reset()
-{
- initDatum();
-
- mySourceValue = defaultValue();
- setString( format( ( myFlags & NotFormat ) ? (QString) "" : format(), type(), mySourceValue ) );
- invalidateCache();
-
- onParamChanged();
- QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
-}
-
-/*!
- Clear the control.
-*/
-void QDS_Datum::clear()
-{
- initDatum();
-
- if ( !getString().isEmpty() )
- {
- mySourceValue = "";
- setString( mySourceValue );
- invalidateCache();
-
- onParamChanged();
- QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
- }
-}
-
-/*!
- Set varian value (QVariant object) into datum.
-*/
-void QDS_Datum::setValue( const QVariant& val )
-{
- if ( val.isValid() && val.canCast( QVariant::String ) )
- setStringValue( val.toString() );
- else
- clear();
-}
-
-/*!
- Set string value (QString object) into datum.
-*/
-void QDS_Datum::setStringValue( const QString& txt )
-{
- initDatum();
-
- mySourceValue = txt;
- QString aStr = format( ( flags() & NotFormat ) ? (QString) "" : format(), type(), txt );
- setString( aStr );
- myTargetValue = aStr;
-
- onParamChanged();
- QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
-}
-
-/*!
- Set double value into datum. This value converted from units of measure in unit system "SI"
- to units of measure in active unit system. Format the value using datum format if it required.
-*/
-void QDS_Datum::setDoubleValue( const double num )
-{
- initDatum();
-
- mySourceValue = QString().setNum( num, 'g', 16 );
- double val = num;
- if ( !myDicItem.IsNull() )
- val = myDicItem->FromSI( val );
-
- QString aStr = format( ( flags() & NotFormat ) ? (QString) "" : format(), type(), val );
- setString( aStr );
- myTargetValue = aStr;
-
- onParamChanged();
- QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
-}
-
-/*!
- Set integer value into datum. This value converted from units of measure in unit system "SI"
- to units of measure in active unit system. Format the value using datum format if it required.
-*/
-void QDS_Datum::setIntegerValue( const int num )
-{
- initDatum();
-
- mySourceValue = QString().setNum( num );
- double val = num;
- if ( !myDicItem.IsNull() )
- val = myDicItem->FromSI( val );
-
- QString aStr = format( ( flags() & NotFormat ) ? (QString) "" : format(), type(), val );
- setString( aStr );
- myTargetValue = aStr;
-
- onParamChanged();
- QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
-}
-
-/*!
- Returns true if all subwidgets specified by \aelement enabled.
-*/
-bool QDS_Datum::isEnabled( const int element ) const
-{
- initDatum();
-
- bool res = true;
- if ( element & Label )
- res = res && labelWidget() && labelWidget()->isEnabled();
- if ( element & Units )
- res = res && unitsWidget() && unitsWidget()->isEnabled();
- if ( element & Control )
- res = res && controlWidget() && controlWidget()->isEnabled();
- return res;
-}
-
-/*!
- Enable/Disable subwidgets specified by \aelement.
- Possible values of \aelement: Label, Control, Units or their combinations.
-*/
-void QDS_Datum::setEnabled( const bool on, const int element )
-{
- initDatum();
-
- if ( element & Label && labelWidget() )
- labelWidget()->setEnabled( on );
- if ( element & Units && unitsWidget() )
- unitsWidget()->setEnabled( on );
- if ( element & Control && controlWidget() )
- controlWidget()->setEnabled( on );
-}
-
-/*!
- Enable/Disable control.
-*/
-void QDS_Datum::setEnabled( bool on )
-{
- setEnabled( on, Control );
-}
-
-/*!
- Show/hide subwidgets specified by \aelement.
- Possible values of \aelement: Label, Control, Units or their combinations.
-*/
-void QDS_Datum::setShown( const bool visible, const int flags )
-{
- initDatum();
-
- uint flag = Units;
- while ( flag )
- {
- if ( flags & flag && widget( flag ) )
- widget( flag )->setShown( visible );
- flag = flag >> 1;
- }
-}
-
-/*!
- Show subwidgets specified by \aelement.
- Possible values of \aelement: Label, Control, Units or their combinations.
-*/
-void QDS_Datum::show( const int element )
-{
- setShown( true, element );
-}
-
-/*!
- Hide subwidgets specified by \aelement.
- Possible values of \aelement: Label, Control, Units or their combinations.
-*/
-void QDS_Datum::hide( const int element )
-{
- setShown( false, element );
-}
-
-/*!
- Returns subwidget specified by \aelement.
- Possible values of \aelement: Label, Control, Units.
-*/
-QWidget* QDS_Datum::widget( const int element ) const
-{
- initDatum();
- return wrapper( element );
-}
-
-/*!
- Set the input focus on the control widget.
-*/
-void QDS_Datum::setFocus()
-{
- initDatum();
-
- if ( controlWidget() )
- controlWidget()->setFocus();
-}
-
-/*!
- Returns true if control contains valid value otherwise returns false
- and display warning message box if parameter \amsgBox is set.
-*/
-bool QDS_Datum::isValid( const bool msgBox, const QString& extMsg, const QString& extLabel ) const
-{
- initDatum();
-
- if ( type() == DDS_DicItem::String && isDoubleFormat( format() ) )
- return true;
-
- QString req;
- if ( !dicItem().IsNull() )
- req = toQString( dicItem()->GetRequired() );
-
- bool aState = true;
- QString aStr = getString();
-
- if ( aStr.isEmpty() )
- aState = !( req == QString( "yes" ) || req == QString( "true" ) || req.toInt() );
- else
- aState = validate( aStr );
-
- if ( msgBox && !aState )
- {
- QString info;
- if ( !label().isEmpty() )
- info += tr( "DATA_INCORRECT_VALUE" ).arg( label() );
- else if ( !extLabel.isEmpty() )
- info += tr( "DATA_INCORRECT_VALUE" ).arg( extLabel );
-
- QString typeStr;
- switch ( type() )
- {
- case DDS_DicItem::String:
- typeStr = tr( "DATA_STRING" );
- break;
- case DDS_DicItem::Integer:
- typeStr = tr( "DATA_INTEGER" );
- break;
- case DDS_DicItem::Float:
- typeStr = tr( "DATA_FLOAT" );
- break;
- default:
- typeStr = tr( "DATA_NON_EMPTY" );
- break;
- }
- info += ( info.isEmpty() ? (QString) "" : QString( "\n" ) ) +
- tr( "DATA_SHOULD_BE_VALUE" ).arg( typeStr );
- QString limit;
- if ( type() == DDS_DicItem::Float || type() == DDS_DicItem::Integer )
- {
- QString aMinValue = minValue();
- QString aMaxValue = maxValue();
- if ( !aMinValue.isEmpty() && !aMaxValue.isEmpty() )
- limit = tr( "DATA_RANGE" ).arg( aMinValue ).arg( aMaxValue );
- else if ( !aMinValue.isEmpty() )
- limit = tr( "DATA_MIN_LIMIT" ).arg( aMinValue );
- else if ( !aMaxValue.isEmpty() )
- limit = tr( "DATA_MAX_LIMIT" ).arg( aMaxValue );
- }
- if ( !limit.isEmpty() )
- info += limit;
-
- info += QString( ".\n" ) + tr( "DATA_INPUT_VALUE" );
-
- if ( !extMsg.isEmpty() )
- info += QString( "\n" ) + extMsg;
-
- QString msg;
- for ( uint i = 0; i < info.length(); i++ )
- if ( info.at( i ) == '\n' )
- msg += QString( "<br>" );
- else
- msg += info.at( i );
-
- info = QString( "<p><nobr>%1</nobr></p>" ).arg( msg );
-
- QMessageBox::critical( controlWidget() ? controlWidget()->topLevelWidget() : 0,
- tr( "DATA_ERR_TITLE" ), info, tr( "OK" ) );
- if ( controlWidget() )
- controlWidget()->setFocus();
- }
- return aState;
-}
-
-/*!
- Add widgets to the vertical box layout.
-*/
-void QDS_Datum::addTo( QVBoxLayout* l )
-{
- initDatum();
-
- if ( !l )
- return;
-
- if ( wrapper( Label ) )
- l->addWidget( wrapper( Label ) );
- if ( wrapper( Control ) )
- l->addWidget( wrapper( Control ) );
- if ( wrapper( Units ) )
- l->addWidget( wrapper( Units ) );
-}
-
-/*!
- Add widgets to the horizaontal box layout.
-*/
-void QDS_Datum::addTo( QHBoxLayout* l )
-{
- initDatum();
-
- if ( !l )
- return;
-
- if ( wrapper( Label ) )
- l->addWidget( wrapper( Label ) );
- if ( wrapper( Control ) )
- l->addWidget( wrapper( Control ) );
- if ( wrapper( Units ) )
- l->addWidget( unitsWidget() );
-}
-
-/*!
- Add widgets to the grid layout.
-*/
-void QDS_Datum::addTo( QGridLayout* theLay, const int theRow, const int theCol, bool vertical )
-{
- initDatum();
-
- if ( !theLay )
- return;
-
- int row = theRow;
- int col = theCol;
- if ( wrapper( Label ) )
- {
- theLay->addWidget( wrapper( Label ), row, col );
- vertical ? row++ : col++;
- }
- if ( wrapper( Control ) )
- {
- theLay->addWidget( wrapper( Control ), row, col );
- vertical ? row++ : col++;
- }
- if ( wrapper( Units ) )
- theLay->addWidget( wrapper( Units ), row, col );
-}
-
-/*!
- Set the aligment of Label or Units. For Control nothing happens.
-*/
-void QDS_Datum::setAlignment( const int align, const int type )
-{
- initDatum();
-
- if ( ( type & Label ) && labelWidget() )
- labelWidget()->setAlignment( align );
- if ( ( type & Units ) && unitsWidget() )
- unitsWidget()->setAlignment( align );
-}
-
-/*!
- Perform delayed initialisation. Reimplemented for internal reasons.
-*/
-bool QDS_Datum::eventFilter( QObject* o, QEvent* e )
-{
- if ( o == parent() )
- {
- if ( e->type() == QEvent::Show || e->type() == QEvent::ShowToParent ||
- ( e->type() == QEvent::ChildInserted && ((QChildEvent*)e)->child() == this ) )
- initDatum();
- }
- return QObject::eventFilter( o, e );
-}
-
-/*!
- Notify about parameter value changing.
-*/
-void QDS_Datum::onParamChanged()
-{
-}
-
-/*!
- Perform delayed initialization.
-*/
-void QDS_Datum::onInitDatum()
-{
- initDatum();
-}
-
-/*!
- Notify about subwidgets destroying. Allow to avoid repeated deleting in destructor.
-*/
-void QDS_Datum::onDestroyed( QObject* obj )
-{
- myWrapper.remove( wrapperType( (Wrapper*)obj ) );
-}
-
-/*!
- Returns QLabel widget which contains dictionary item label.
-*/
-QLabel* QDS_Datum::labelWidget() const
-{
- initDatum();
- return myLabel;
-}
-
-/*!
- Returns QLabel widget which contains dictionary item units.
-*/
-QLabel* QDS_Datum::unitsWidget() const
-{
- initDatum();
- return myUnits;
-}
-
-/*!
- Returns QWidget which contains user input data.
-*/
-QWidget* QDS_Datum::controlWidget() const
-{
- initDatum();
- return myControl;
-}
-
-/*!
- Returns the dictionary item from the datum.
-*/
-Handle(DDS_DicItem) QDS_Datum::dicItem() const
-{
- return myDicItem;
-}
-
-/*!
- Set the dictionary item in to the datum.
-*/
-void QDS_Datum::setDicItem( const Handle(DDS_DicItem)& item )
-{
- myDicItem = item;
-}
-
-/*!
- Creates QLabel widget for dictionary item label.
-*/
-QLabel* QDS_Datum::createLabel( QWidget* parent )
-{
- return new QLabel( parent );
-}
-
-/*!
- Creates QLabel widget for dictionary item units.
-*/
-QLabel* QDS_Datum::createUnits( QWidget* parent )
-{
- return new QLabel( parent );
-}
-
-/*!
- Creates and returns validator accordance to datum type of value.
-*/
-QValidator* QDS_Datum::validator( const bool limits ) const
-{
- QValidator* aValidator = 0;
-
- QString fltr = filter();
-
- if ( type() == DDS_DicItem::String )
- {
- QString aFlags;
- QString aFormat = canonicalFormat( format(), aFlags );
-
- int len = -1;
- int pos = aFormat.find( "." );
- if ( pos != -1 )
- {
- QString numStr = aFormat.mid( pos + 1, aFormat.length() - pos - 2 );
- bool ok;
- int numVal = numStr.toInt( &ok );
- if ( ok )
- len = numVal;
- }
-
- QDS_StringValidator* aStrVal = new QDS_StringValidator( fltr, aFlags, (QObject*)this );
- aStrVal->setLength( len );
-
- aValidator = aStrVal;
- }
- else if ( type() == DDS_DicItem::Integer )
- {
- QDS_IntegerValidator* aIntVal = new QDS_IntegerValidator( fltr, (QObject*)this );
-
- bool ok;
- int limit;
- limit = minValue().toInt( &ok );
- if ( ok && limits )
- aIntVal->setBottom( limit );
- limit = maxValue().toInt( &ok );
- if ( ok && limits )
- aIntVal->setTop( limit );
-
- aValidator = aIntVal;
- }
- else if ( type() == DDS_DicItem::Float )
- {
- QDS_DoubleValidator* aFloatVal = new QDS_DoubleValidator( fltr, (QObject*)this );
-
- bool ok;
- double limit;
- limit = minValue().toDouble( &ok );
- if ( ok && limits )
- aFloatVal->setBottom( limit );
- limit = maxValue().toDouble( &ok );
- if ( ok && limits )
- aFloatVal->setTop( limit );
-
- aValidator = aFloatVal;
- }
-
- return aValidator;
-}
-
-/*!
- Checks the given string are valid or not.
-*/
-bool QDS_Datum::validate( const QString& txt ) const
-{
- if ( type() == DDS_DicItem::Unknown ||
- type() == DDS_DicItem::String && isDoubleFormat( format() ) )
- return true;
-
- QValidator* aValidator = validator( true );
-
- if ( !aValidator )
- return true;
-
- int pos = 0;
- QString str( txt );
- bool res = aValidator->validate( str, pos ) == QValidator::Acceptable;
-
- delete aValidator;
-
- return res;
-}
-
-/*!
- Retrieves information from dictionary and create subwidgets using virtual mechanism.
- Virtual mechanism doesn't work in constructor and destructor, therefore this method should
- be called outside the constructor.
-*/
-void QDS_Datum::initialize()
-{
- if ( wrapper( Label ) )
- wrapper( Label )->setWidget( myLabel = createLabel( wrapper( Label ) ) );
- if ( wrapper( Control ) )
- wrapper( Control )->setWidget( myControl = createControl( wrapper( Control ) ) );
- if ( wrapper( Units ) )
- wrapper( Units )->setWidget( myUnits = createUnits( wrapper( Units ) ) );
-
- TCollection_AsciiString comp;
- Handle(DDS_DicItem) item = dicItem();
- if ( !item.IsNull() )
- comp = item->GetComponent();
-
- QString unitSystem;
- Handle(DDS_Dictionary) dic = DDS_Dictionary::Get();
- if ( !dic.IsNull() )
- unitSystem = toQString( comp.IsEmpty() ? dic->GetActiveUnitSystem() :
- dic->GetActiveUnitSystem( comp ) );
-
- unitSystemChanged( unitSystem );
-
- QWidget* ctrl = controlWidget();
- if ( ctrl )
- {
- QString lDescr = longDescription();
- QString sDescr = shortDescription();
- if ( !sDescr.isEmpty() )
- QToolTip::add( ctrl, sDescr );
- if ( !lDescr.isEmpty() )
- QWhatsThis::add( ctrl, lDescr );
- }
-
- if ( labelWidget() && ctrl && !( flags() & NotAccel ) )
- labelWidget()->setBuddy( ctrl );
-}
-
-/*!
- Notification about active unit system changing. Update label and units texts.
-*/
-void QDS_Datum::unitSystemChanged( const QString& unitSystem )
-{
- QString labText = label();
- QString unitText = unitsToText( units() );
-
- if ( flags() & UnitsWithLabel )
- {
- if ( labText.isEmpty() )
- labText = unitText;
- else if ( !unitText.isEmpty() )
- labText = QString( "%1 (%2)" ).arg( labText ).arg( unitText );
- unitText = QString::null;
- }
-
- if ( labelWidget() )
- labelWidget()->setText( labText );
-
- if ( unitsWidget() )
- unitsWidget()->setText( unitText );
-
- reset();
-}
-
-/*!
- Covert units into text presentation.
-*/
-QString QDS_Datum::unitsToText( const QString& uni )
-{
- int pos = -1;
- QString aUnits = uni;
- while ( ( pos = aUnits.find( "**" ) ) != -1 )
- {
- aUnits = aUnits.mid( 0, pos ) + QString( "<tt><font size=+2><sup>" ) +
- aUnits.mid( pos + 2, 1 ) + QString( "</sup></font></tt>" ) +
- aUnits.mid( pos + 3 );
- }
- return aUnits;
-}
-
-/*!
- Covert text presentation into internal units format.
-*/
-QString QDS_Datum::textToUnits( const QString& txt )
-{
- int pos = -1;
- QString aUnits = txt;
- while ( ( pos = aUnits.find( "<sup>" ) ) != -1 )
- {
- aUnits.remove( pos, 5 );
- aUnits.insert( pos, "**" );
- }
- while ( ( pos = aUnits.find( "</sup>" ) ) != -1 )
- aUnits.remove( pos, 6 );
- return aUnits;
-}
-
-/*!
- Format the specified integer as dictionary item value.
-*/
-QString QDS_Datum::format( const int num, const QString& id, const bool convert )
-{
- Handle(DDS_DicItem) anItem;
- int aNum = num;
- QString anUnit;
-
- QString aFormat;
- int aType = DDS_DicItem::Unknown;
- Handle(DDS_Dictionary) aDict = DDS_Dictionary::Get();
- if ( !aDict.IsNull() )
- {
- anItem = aDict->GetDicItem( toAsciiString( id ) );
- if ( !anItem.IsNull() )
- {
- aType = anItem->GetType();
- aFormat = toQString( anItem->GetFormat( false ) );
- if ( convert )
- aNum = ( int )anItem->FromSI( aNum );
- }
- }
-
- return format( aFormat, aType, aNum );
-}
-
-/*!
- Format the specified double as dictionary item value.
-*/
-QString QDS_Datum::format( const double num, const QString& id, const bool convert )
-{
- Handle(DDS_DicItem) anItem;
- double aNum = num;
- QString anUnit;
-
- QString aFormat;
- int aType = DDS_DicItem::Unknown;
- Handle(DDS_Dictionary) aDict = DDS_Dictionary::Get();
- if ( !aDict.IsNull() )
- {
- anItem = aDict->GetDicItem( toAsciiString( id ) );
- if ( !anItem.IsNull() )
- {
- aType = anItem->GetType();
- aFormat = toQString( anItem->GetFormat( false ) );
- if ( convert )
- aNum = anItem->FromSI( aNum );
- }
- }
-
- return format( aFormat, aType, aNum );
-}
-
-/*!
- Format the specified string as dictionary item value.
-*/
-QString QDS_Datum::format( const QString& str, const QString& id, const bool convert )
-{
- Handle(DDS_DicItem) anItem;
- QString aStr = str;
- QString anUnit;
-
- QString aFormat;
- int aType = DDS_DicItem::Unknown;
- Handle(DDS_Dictionary) aDict = DDS_Dictionary::Get();
- if ( !aDict.IsNull() )
- {
- anItem = aDict->GetDicItem( toAsciiString( id ) );
- if ( !anItem.IsNull() )
- {
- aType = anItem->GetType();
- aFormat = toQString( anItem->GetFormat( false ) );
- if ( convert )
- aStr = QString::number( anItem->FromSI( aStr.toDouble() ), 'f', 16 );
- }
- }
-
- return format( aFormat, aType, aStr );
-}
-
-/*!
- Format the given string accordance to dictionary item format.
-*/
-QString QDS_Datum::format( const QString& aFormat, const int aType, const int aValue )
-{
- QString txt;
-
- if ( !aFormat.isEmpty() )
- {
- switch ( aType )
- {
- case DDS_DicItem::Float:
- txt = sprintf( aFormat, (double)aValue );
- txt = txt.stripWhiteSpace();
- break;
- case DDS_DicItem::Integer:
- txt = sprintf( aFormat, aValue );
- txt = txt.stripWhiteSpace();
- break;
- case DDS_DicItem::String:
- default:
- txt = sprintf( aFormat, aValue );
- break;
- }
- }
- else
- txt = QString().setNum( aValue );
-
- return txt;
-}
-
-/*!
- Format the given string accordance to dictionary item format.
-*/
-QString QDS_Datum::format( const QString& aFormat, const int aType, const double aValue )
-{
- QString txt;
-
- if ( !aFormat.isEmpty() )
- {
- switch ( aType )
- {
- case DDS_DicItem::Float:
- txt = QString().sprintf( aFormat, aValue );
- txt = txt.stripWhiteSpace();
- break;
- case DDS_DicItem::Integer:
- txt = QString().sprintf( aFormat, (int)aValue );
- txt = txt.stripWhiteSpace();
- break;
- case DDS_DicItem::String:
- default:
- txt = QString().sprintf( aFormat, aValue );
- break;
- }
- }
- else
- txt = QString().setNum( aValue, 'g', 16 );
-
- return txt;
-}
-
-/*!
- Format the given string accordance to dictionary item format.
-*/
-QString QDS_Datum::format( const QString& aFormat, const int aType, const QString& aValue )
-{
- QString txt = aValue;
-
- if ( aType != DDS_DicItem::String )
- txt = txt.stripWhiteSpace();
-
- if ( aFormat.isEmpty() || txt.isEmpty() )
- return txt;
-
- switch ( aType )
- {
- case DDS_DicItem::Float:
- txt = txt.replace( 'd', 'e' ).replace( 'D', 'E' );
- txt = sprintf( aFormat, txt.toDouble() );
- txt = txt.stripWhiteSpace();
- break;
- case DDS_DicItem::Integer:
- txt = sprintf( aFormat, txt.toInt() );
- txt = txt.stripWhiteSpace();
- break;
- case DDS_DicItem::String:
- txt = sprintf( aFormat, txt );
- break;
- }
-
- return txt;
-}
-
-/*!
- Wrapper around the standard sprintf function.
- Process some non standard flags from format string.
-*/
-QString QDS_Datum::sprintf( const QString& fmt, const int val )
-{
- return QString().sprintf( canonicalFormat( fmt ), val );
-}
-
-/*!
- Wrapper around the standard sprintf function.
- Process some non standard flags from format string.
-*/
-QString QDS_Datum::sprintf( const QString& fmt, const double val )
-{
- return QString().sprintf( canonicalFormat( fmt ), val );
-}
-
-/*!
- Wrapper around the standard sprintf function.
- Process some non standard flags from format string.
-*/
-QString QDS_Datum::sprintf( const QString& fmt, const QString& val )
-{
- QString aFlags;
- QString aFormat = canonicalFormat( fmt, aFlags );
-
- QString txt = val;
-
- QRegExp rx( "^(%[0-9]*.?[0-9]*s)$" );
- if ( aFormat.find( rx ) != -1 )
- {
- // QString().sprintf() always expects string in UTF8 encoding, so we cannot use it here
- char* buf = new char[txt.length() + 1];
- ::sprintf( buf, aFormat.latin1(), (const char*)(txt.local8Bit()) );
- txt = QString::fromLocal8Bit( buf );
-
- delete[] buf;
- }
-
- if ( isDoubleFormat( aFormat ) )
- {
- /*bool isOk;
- double aVal = txt.toDouble( &isOk );
- if ( isOk )
- {
- txt = sprintf( aFormat, aVal );
- txt = txt.replace( 'e', 'D' );
- }*/
- }
-
- if ( aFlags.contains( "u", false ) )
- txt = txt.upper();
- if ( aFlags.contains( "l", false ) )
- txt = txt.lower();
-
- return txt;
-}
-
-/*!
- Returns the canonical sprintf format.
-*/
-QString QDS_Datum::canonicalFormat( const QString& fmt )
-{
- QString flags;
- return canonicalFormat( fmt, flags );
-}
-
-/*!
- Returns the canonical sprintf format and non standard flags.
-*/
-QString QDS_Datum::canonicalFormat( const QString& fmt, QString& flags )
-{
- QString newFmt = fmt;
- flags = QString::null;
-
- QRegExp rx( "^(%[0-9]*.?[0-9]*)([a-z,A-Z]+)[g|c|d|i|o|u|x|e|f|n|p|s|X|E|G]$" );
- if ( rx.search( newFmt ) >= 0 )
- {
- flags = rx.cap( 2 );
- newFmt.remove( rx.pos( 2 ), flags.length() );
- }
- return newFmt;
-}
-
-/*!
- Returns displayable units string for given dictionary item id
-*/
-QString QDS_Datum::units( const QString& id )
-{
- QString anUnit;
- Handle(DDS_DicItem) anItem;
-
- Handle(DDS_Dictionary) aDict = DDS_Dictionary::Get();
- if ( !aDict.IsNull() )
- {
- anItem = aDict->GetDicItem( toAsciiString( id ) );
- if ( !anItem.IsNull() )
- anUnit = unitsToText( toQString( anItem->GetUnits() ) );
- }
- return anUnit;
-}
-
-/*!
- Get prefix string from format.
-*/
-QString QDS_Datum::prefix() const
-{
- return QString::null;
-}
-
-/*!
- Get suffix string from format.
-*/
-QString QDS_Datum::suffix() const
-{
- return QString::null;
-}
-
-/*!
- Get min value.
-*/
-QString QDS_Datum::minValue() const
-{
- QString pref = prefix();
- QString suff = suffix();
-
- QString aMin = minimumValue().stripWhiteSpace();
-
- if ( !pref.isEmpty() && aMin.left( pref.length() ) == pref )
- aMin = aMin.mid( pref.length() );
-
- if ( !suff.isEmpty() && aMin.right( suff.length() ) == suff )
- aMin = aMin.mid( 0, aMin.length() - suff.length() );
-
- return aMin;
-}
-
-/*!
- Get max value.
-*/
-QString QDS_Datum::maxValue() const
-{
- QString pref = prefix();
- QString suff = suffix();
-
- QString aMax = maximumValue().stripWhiteSpace();
-
- if ( !pref.isEmpty() && aMax.left( pref.length() ) == pref )
- aMax = aMax.mid( pref.length() );
-
- if ( !suff.isEmpty() && aMax.right( suff.length() ) == suff )
- aMax = aMax.mid( 0, aMax.length() - suff.length() );
-
- return aMax;
-}
-
-/*!
- Reset the numeric value cache.
-*/
-void QDS_Datum::invalidateCache()
-{
- myTargetValue = QString::null;
-}
-
-/*!
- Remove the acceleartor tags '&' from specified label string \asrc.
-*/
-QString QDS_Datum::removeAccel( const QString& src )
-{
- QString trg = src;
-
- for ( uint i = 0; i < trg.length(); )
- {
- if ( trg.mid( i, 2 ) == QString( "&&" ) )
- i += 2;
- else if ( trg.at( i ) == '&' )
- trg.remove( i, 1 );
- else
- i++;
- }
- return trg;
-}
-
-/*!
- Returns true if given format string \atheFormat has specificator for double values.
-*/
-bool QDS_Datum::isDoubleFormat( const QString& theFormat )
-{
- if ( theFormat.length() > 0 )
- {
- QChar c = theFormat[ (int)( theFormat.length() - 1 ) ];
- return c == 'f' || c == 'g' || c == 'e' || c == 'G' || c == 'E';
- }
- else
- return false;
-}
-
-/*!
- Returns datum flags.
-*/
-int QDS_Datum::flags() const
-{
- return myFlags;
-}
-
-/*!
- Perform intialization if it needed. [internal]
-*/
-void QDS_Datum::initDatum() const
-{
- if ( myInitialised )
- return;
-
- QDS_Datum* that = (QDS_Datum*)this;
- that->myInitialised = true;
- that->initialize();
-
- if ( parent() )
- parent()->removeEventFilter( this );
-}
-
-/*!
- Return wrapper for specified subwidget. [internal]
-*/
-QDS_Datum::Wrapper* QDS_Datum::wrapper( QWidget* wid ) const
-{
- if ( !wid )
- return 0;
-
- Wrapper* wrap = 0;
- for ( QMap<int, Wrapper*>::ConstIterator it = myWrapper.begin(); it != myWrapper.end() && !wrap; ++it )
- {
- if ( it.data() && it.data()->widget() == wid )
- wrap = it.data();
- }
- return wrap;
-}
-
-/*!
- Return wrapper for specified subwidget name. [internal]
-*/
-QDS_Datum::Wrapper* QDS_Datum::wrapper( const int id ) const
-{
- Wrapper* wrap = 0;
- if ( myWrapper.contains( id ) )
- wrap = myWrapper[id];
- return wrap;
-}
-
-/*!
- Return subwidget name for specified wrapper. [internal]
-*/
-int QDS_Datum::wrapperType( QDS_Datum::Wrapper* wrap ) const
-{
- int id = -1;
- for ( QMap<int, Wrapper*>::ConstIterator it = myWrapper.begin(); it != myWrapper.end() && id == -1; ++it )
- {
- if ( it.data() == wrap )
- id = it.key();
- }
- return id;
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 QDS_DATUM_H
-#define QDS_DATUM_H
-
-#include "QDS.h"
-
-#include <qwidget.h>
-#include <qstring.h>
-#include <qvariant.h>
-#include <qguardedptr.h>
-
-#include <DDS_DicItem.h>
-
-class QLabel;
-class QWidget;
-class QValidator;
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-
-class Handle(DDS_Dictionary);
-
-class QDS_EXPORT QDS_Datum : public QObject, public QDS
-{
- Q_OBJECT
-
- class Wrapper;
-
-public:
- QDS_Datum( const QString&, QWidget* = 0, const int = All, const QString& = QString::null );
- virtual ~QDS_Datum();
-
- QString id() const;
- int type() const;
- QString label() const;
- QString units() const;
- QString filter() const;
- QString format() const;
- QString longDescription() const;
- QString shortDescription() const;
-
- QString defaultValue() const;
- QString minimumValue() const;
- QString maximumValue() const;
-
- QStringList options() const;
- QVariant option( const QString& ) const;
- QString optionString( const QString& ) const;
- double optionDouble( const QString& ) const;
- int optionInteger( const QString& ) const;
-
- virtual QVariant value() const;
-
- virtual QString stringValue() const;
- virtual double doubleValue() const;
- virtual int integerValue() const;
-
- QString text() const;
-
- virtual bool isEmpty() const;
-
- virtual void reset();
- virtual void clear();
-
- virtual void setValue( const QVariant& );
-
- virtual void setStringValue( const QString& );
- virtual void setDoubleValue( const double );
- virtual void setIntegerValue( const int );
-
- virtual bool isEnabled( const int = Control ) const;
- virtual void setEnabled( const bool, const int );
-
- void show( const int = All );
- void hide( const int = All );
- virtual void setShown( const bool, const int = All );
-
- QWidget* widget( const int ) const;
- void setFocus();
-
- virtual bool isValid( const bool = true,
- const QString& = QString::null,
- const QString& = QString::null ) const;
- virtual QValidator* validator( const bool = false ) const;
-
- void addTo( QVBoxLayout* );
- void addTo( QHBoxLayout* );
- void addTo( QGridLayout*, const int, const int, const bool = false );
-
- virtual void setAlignment( const int, const int = Label );
-
- static QString unitsToText( const QString& );
- static QString textToUnits( const QString& );
-
- static QString format( const QString&, const QString&, const bool = false );
- static QString format( const int, const QString&, const bool = false );
- static QString format( const double, const QString&, const bool = false );
- static QString units( const QString& );
-
- virtual bool eventFilter( QObject*, QEvent* );
-
- operator QWidget*() const;
-
-signals:
- void paramChanged();
- void paramChanged( QString& );
-
-public slots:
- void setEnabled( bool );
-
-protected slots:
- virtual void onParamChanged();
-
-private slots:
- void onInitDatum();
- void onDestroyed( QObject* );
-
-protected:
- QLabel* labelWidget() const;
- QLabel* unitsWidget() const;
- QWidget* controlWidget() const;
-
- Handle(DDS_DicItem) dicItem() const;
- void setDicItem( const Handle(DDS_DicItem)& );
-
- int flags() const;
-
- void invalidateCache();
-
- virtual QLabel* createLabel( QWidget* );
- virtual QLabel* createUnits( QWidget* );
- virtual QWidget* createControl( QWidget* ) = 0;
-
- virtual QString getString() const = 0;
- virtual void setString( const QString& ) = 0;
-
- virtual bool validate( const QString& ) const;
-
- QString prefix() const;
- QString suffix() const;
- virtual QString minValue() const;
- virtual QString maxValue() const;
-
- static QString format( const QString&, const int, const int );
- static QString format( const QString&, const int, const double );
- static QString format( const QString&, const int, const QString& );
-
- static QString sprintf( const QString&, const int );
- static QString sprintf( const QString&, const double );
- static QString sprintf( const QString&, const QString& );
-
- virtual void unitSystemChanged( const QString& );
-
- void initDatum() const;
-
-private:
- void initialize();
-
- Wrapper* wrapper( QWidget* ) const;
- Wrapper* wrapper( const int ) const;
- int wrapperType( Wrapper* ) const;
-
- static QString removeAccel( const QString& );
- static bool isDoubleFormat( const QString& );
- static QString canonicalFormat( const QString& );
- static QString canonicalFormat( const QString&, QString& );
-
-private:
- typedef QGuardedPtr<QLabel> GuardedLabel;
- typedef QGuardedPtr<QWidget> GuardedWidget;
-
-private:
- QString myId;
- int myFlags;
- Handle(DDS_DicItem) myDicItem;
- QMap<int, Wrapper*> myWrapper;
-
- GuardedLabel myLabel;
- GuardedLabel myUnits;
- GuardedWidget myControl;
-
- QString mySourceValue;
- QString myTargetValue;
-
- bool myInitialised;
-
- friend class QDS;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "QDS_LineEdit.h"
-
-#include <qlineedit.h>
-#include <qvalidator.h>
-
-/*
- class: QDS_LineEdit::Editor
- descr: Internal class inherited from line edit
-*/
-
-class QDS_LineEdit::Editor : public QLineEdit
-{
-public:
- Editor( QWidget* parent = 0 ) : QLineEdit( parent ), myNumber( 2 ) {};
- virtual ~Editor() {};
-
- void setNumber( const int num ) { myNumber = num; };
-
- virtual QSize minimumSizeHint() const
- {
- return QLineEdit::minimumSizeHint().
- expandedTo( QSize( fontMetrics().width( "0" ) * myNumber, 0 ) );
- }
-
- virtual QSize sizeHint() const
- {
- return minimumSizeHint();
- }
-
-private:
- int myNumber;
-};
-
-/*
- \class QDS_LineEdit
-
- Datum with control corresponding to line edit. User can enter parameter value in single line editor.
- User inputted values will be checked by validator according to type if value and parameter properties
- (minimum, maximum, filter, precision, etc). If user input not valid value then this value will be
- displayed in red color.
-*/
-
-/*!
- Constructor. Create line edit datum object with datum identifier \aid under widget \aparent. Parameter \aflags
- define behaviour of datum and set of created subwidgets. Default value of this parameter is QDS::All.
- Parameter \acomp specify the component name which will be used during search of dictionary item.
-*/
-QDS_LineEdit::QDS_LineEdit( const QString& id, QWidget* parent, const int flags, const QString& comp )
-: QDS_Datum( id, parent, flags, comp )
-{
-}
-
-/*!
- Destructor.
-*/
-QDS_LineEdit::~QDS_LineEdit()
-{
-}
-
-/*!
- Notification about active unit system changing. Reimplemented from QDS_Datum.
- Update validator settings for line edit.
-*/
-void QDS_LineEdit::unitSystemChanged( const QString& system )
-{
- QDS_Datum::unitSystemChanged( system );
-
- QLineEdit* le = lineEdit();
- if ( !le )
- return;
-
- delete le->validator();
- le->clearValidator();
- QValidator* valid = validator();
- if ( valid )
- le->setValidator( valid );
-
- QString aFormat = format();
- int num = 0;
- int pos = aFormat.find( '%' );
- if ( pos != -1 )
- {
- pos++;
- QString aLen;
- while ( pos < (int)aFormat.length() && aFormat.at( pos ).isDigit() )
- aLen += aFormat.at( pos++ );
- if ( pos < (int)aFormat.length() && aFormat.at( pos ) == '.' )
- num += 1;
- if ( !aLen.isEmpty() )
- num += aLen.toInt();
- }
-
- int zeroLen = format( format(), type(), 0 ).length();
- int minLen = format( format(), type(), minValue() ).length();
- int maxLen = format( format(), type(), maxValue() ).length();
-
- num = QMAX( QMAX( num, zeroLen ), QMAX( minLen, maxLen ) );
- ((Editor*)le)->setNumber( num );
-}
-
-/*!
- Select all text in the editor.
-*/
-void QDS_LineEdit::selectAll()
-{
- if ( lineEdit() )
- lineEdit()->selectAll();
-}
-
-/*!
- Deselect all text in the editor.
-*/
-void QDS_LineEdit::deselect()
-{
- if ( lineEdit() )
- lineEdit()->deselect();
-}
-
-/*!
- Select or deselect all text in the editor.
-*/
-void QDS_LineEdit::setSelection( const bool on )
-{
- if ( on )
- selectAll();
- else
- deselect();
-}
-
-/*!
- Returns true if the editor has selected text.
-*/
-bool QDS_LineEdit::hasSelection() const
-{
- return lineEdit() ? lineEdit()->hasSelectedText() : false;
-}
-
-/*!
- Set the aligment of line edit. Reimplemented from QDS_Datum.
-*/
-void QDS_LineEdit::setAlignment( const int align, const int type )
-{
- if ( ( type & Control ) && lineEdit() )
- lineEdit()->setAlignment( align );
-
- QDS_Datum::setAlignment( align, type );
-}
-
-/*!
- Returns string value from QLineEdit widget. Reimplemented from QDS_Datum.
-*/
-QString QDS_LineEdit::getString() const
-{
- QString res;
- if ( lineEdit() )
- res = lineEdit()->text();
- return res;
-}
-
-/*!
- Sets the string value into QLineEdit widget. Reimplemented from QDS_Datum.
-*/
-void QDS_LineEdit::setString( const QString& txt )
-{
- if ( lineEdit() )
- lineEdit()->setText( txt );
-}
-
-/*!
- Returns pointer to QLineEdit widget.
-*/
-QLineEdit* QDS_LineEdit::lineEdit() const
-{
- return ::qt_cast<QLineEdit*>( controlWidget() );
-}
-
-/*!
- Create QLineEdit widget as control subwidget. Reimplemented from QDS_Datum.
-*/
-QWidget* QDS_LineEdit::createControl( QWidget* parent )
-{
- Editor* le = new Editor( parent );
- connect( le, SIGNAL( returnPressed() ), this, SIGNAL( returnPressed() ) );
- connect( le, SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) );
- return le;
-}
-
-/*!
- Notify about text changing in line edit.
-*/
-void QDS_LineEdit::onTextChanged( const QString& )
-{
- invalidateCache();
-
- onParamChanged();
- QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
-}
-
-/*!
- Checks the current parameter value on validity. If value is not valid then set text color as red.
-*/
-void QDS_LineEdit::onParamChanged()
-{
- QLineEdit* anEdit = lineEdit();
- if ( !anEdit )
- return;
-
- bool aValid = isValid( false );
-
- QPalette aPal = anEdit->palette();
- if ( !aValid )
- aPal.setColor( QPalette::Active, QColorGroup::Text, QColor( 255, 0, 0 ) );
- else
- aPal.setColor( QPalette::Active, QColorGroup::Text, QColor( 0, 0, 0 ) );
-
- anEdit->setPalette( aPal );
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 QDS_LINEEDIT_H
-#define QDS_LINEEDIT_H
-
-#include "QDS_Datum.h"
-
-class QLineEdit;
-
-class QDS_EXPORT QDS_LineEdit : public QDS_Datum
-{
- Q_OBJECT
-
- Q_PROPERTY( bool Selection READ hasSelection WRITE setSelection )
-
-protected:
- class Editor;
-
-public:
- QDS_LineEdit( const QString&, QWidget* = 0, const int = All, const QString& = QString::null );
- virtual ~QDS_LineEdit();
-
- virtual void deselect();
- virtual void selectAll();
- virtual void setAlignment( const int, const int = Label );
-
- bool hasSelection() const;
- void setSelection( const bool );
-
-signals:
- void returnPressed();
-
-protected slots:
- virtual void onParamChanged();
-
-private slots:
- void onTextChanged( const QString& );
-
-protected:
- virtual QWidget* createControl( QWidget* );
- QLineEdit* lineEdit() const;
-
- virtual QString getString() const;
- virtual void setString( const QString& );
-
- virtual void unitSystemChanged( const QString& );
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "QDS_RadioBox.h"
-
-#include <DDS_Dictionary.h>
-
-#include <TCollection_AsciiString.hxx>
-#include <TColStd_HArray1OfInteger.hxx>
-#include <TColStd_HArray1OfExtendedString.hxx>
-
-#include <qobjectlist.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-
-/*
- \class QDS_RadioBox
-
- Datum with control corresponding to button group with set of exclusive radio buttons.
- This control used for datum with enumerable values. It can be used for datum which has
- type of value 'List'. Each radio button of combobox defined two properties:
- integer identifier and string name. All operations on radio buttons performed via identifier.
-
- If datum label text is specified then it displayed in group box title.
-*/
-
-/*!
- Constructor. Create radio button box datum object with datum identifier \aid under widget \aparent.
- Parameter \aflags define behaviour of datum and set of created subwidgets. Default value of this
- parameter is QDS::Control. Parameter \acomp specify the component name which will be used during
- search of dictionary item.
-*/
-QDS_RadioBox::QDS_RadioBox( const QString& id, QWidget* parent, const int flags, const QString& comp )
-: QDS_Datum( id, parent, flags & ~( Label | Units ), comp )
-{
-}
-
-/*!
- Destructor.
-*/
-QDS_RadioBox::~QDS_RadioBox()
-{
-}
-
-/*!
- Returns number of buttons in radio box. If total is 'false' then only
- visible buttons are taken into account otherwise all buttons.
-*/
-int QDS_RadioBox::count( bool total ) const
-{
- if ( total )
- return myValue.count();
- else
- {
- QPtrList<QRadioButton> bList;
- buttons( bList );
- return bList.count();
- }
-}
-
-/*!
- Returns list of button identifiers \aids. If \atotal is 'false' then only visible
- buttons are taken into account otherwise all buttons.
-*/
-void QDS_RadioBox::values( QValueList<int>& ids, bool total ) const
-{
- ids.clear();
- for ( QIntList::const_iterator it = myDataIds.begin(); it != myDataIds.end(); ++it )
- if ( total || ( myState.contains( *it ) && myState[*it] ) )
- ids.append( *it );
-}
-
-/*!
- Returns visible state of button specified by \aid.
-*/
-bool QDS_RadioBox::state( const int id ) const
-{
- bool state = false;
- if ( myState.contains( id ) )
- state = myState[id];
- return state;
-}
-
-/*!
- Sets the visible state of button specified by \aid. If \aid is -1 then specified
- state will be set to all buttons. If \aappend is set then keep status for other
- buttons otherwise status of other buttons will be cleared.
-*/
-void QDS_RadioBox::setState( const bool on, const int id, const bool append )
-{
- QValueList<int> lst;
- if ( id < 0 )
- {
- for ( IdStateMap::Iterator it = myState.begin(); it != myState.end(); ++it )
- lst.append( it.key() );
- }
- else
- lst.append( id );
-
- setState( on, lst, append );
-}
-
-/*!
- Sets the visible state of buttons specified by list of identifiers \aids.
- If \aappend is set then keep status for other buttons otherwise status of other
- buttons will be cleared.
-*/
-void QDS_RadioBox::setState( const bool on, const QValueList<int>& ids, const bool append )
-{
- if ( ids.isEmpty() && append )
- return;
-
- bool changed = false;
-
- QMap<int, int> aMap;
- for ( uint i = 0; i < ids.count(); i++ )
- aMap.insert( *ids.at( i ), 0 );
-
- for ( IdStateMap::Iterator it = myState.begin(); it != myState.end(); ++it )
- {
- if ( aMap.contains( it.key() ) )
- {
- if ( it.data() != on )
- {
- it.data() = on;
- changed = true;
- }
- }
- else if ( !append && it.data() == on )
- {
- it.data() = !on;
- changed = true;
- }
- }
- if ( changed )
- updateRadioBox();
-}
-
-/*!
- Sets the custom user buttons into the radio box. User buttons like standard dictionary
- button from list will be added into the radio box. This functionality allow to user override
- buttons.
-*/
-void QDS_RadioBox::setValues( const QValueList<int>& ids, const QStringList& names )
-{
- if ( ids.count() != names.count() )
- return;
-
- myUserIds = ids;
- myUserNames = names;
-}
-
-/*!
- This is an overloaded member function, provided for convenience.
- It behaves essentially like the above function. It creates
- QValueList (0, 1, 2 ... ) and call previous method
-*/
-void QDS_RadioBox::setValues( const QStringList& names )
-{
- QValueList< int > ids;
- for ( int i = 0, n = names.count(); i < n; i++ )
- ids.append( i );
- setValues( ids, names );
-}
-
-/*!
- Returns string from radio box. Reimplemented. String which contains identifier of
- currently selected button returned.
-*/
-QString QDS_RadioBox::getString() const
-{
- QString res;
- QButtonGroup* bg = buttonGroup();
- if ( bg )
- {
- int id = bg->selectedId();
- if ( id != -1 )
- res = QString::number( id );
- }
- return res;
-}
-
-/*!
- Sets the string into radio box. Reimplemented. Button with identifier from specified
- string \atxt became selected in radio box.
-*/
-void QDS_RadioBox::setString( const QString& txt )
-{
- QButtonGroup* bg = buttonGroup();
- if ( !bg )
- return;
-
- int oldId = bg->selectedId();
-
- if ( txt.isEmpty() )
- {
- QPtrList<QRadioButton> bList;
- buttons( bList );
- for ( QPtrListIterator<QRadioButton> it( bList ); it.current(); ++it )
- it.current()->setChecked( false );
- }
- else
- {
- bool ok;
- int id = txt.toInt( &ok );
- if ( !ok )
- id = -1;
-
- bool block = signalsBlocked();
- blockSignals( true );
- bg->setButton( id );
- blockSignals( block );
- }
-
- int newId = bg->selectedId();
-
- if ( oldId != newId )
- {
- onParamChanged();
- QString str = getString();
- emit activated( newId );
- emit paramChanged();
- emit paramChanged( str );
- }
-}
-
-/*!
- Returns pointer to QButtonGroup widget.
-*/
-QButtonGroup* QDS_RadioBox::buttonGroup() const
-{
- return ::qt_cast<QButtonGroup*>( controlWidget() );
-}
-
-/*!
- Create QButtonGroup widget as control subwidget.
-*/
-QWidget* QDS_RadioBox::createControl( QWidget* parent )
-{
- QButtonGroup* bg = new QButtonGroup( 1, Qt::Vertical, "", parent );
- bg->setExclusive( true );
- bg->setRadioButtonExclusive( true );
- return bg;
-}
-
-/*!
- Notification about active unit system changing. Reimplemented from QDS_Datum.
- Update radio box content.
-*/
-void QDS_RadioBox::unitSystemChanged( const QString& system )
-{
- QDS_Datum::unitSystemChanged( system );
-
- Handle(TColStd_HArray1OfInteger) anIds;
- Handle(TColStd_HArray1OfExtendedString) aValues, anIcons;
-
- Handle(DDS_DicItem) aDicItem = dicItem();
- if ( !aDicItem.IsNull() )
- aDicItem->GetListOfValues( aValues, anIds, anIcons );
-
- myValue.clear();
- myDataIds.clear();
-
- QMap<int, QString> userMap;
- QIntList::iterator iIt = myUserIds.begin();
- QStringList::iterator sIt = myUserNames.begin();
- for ( ; iIt != myUserIds.end() && sIt != myUserNames.end(); ++iIt, ++sIt )
- userMap.insert( *iIt, *sIt );
-
- if ( !anIds.IsNull() && !aValues.IsNull() &&
- anIds->Length() == aValues->Length() )
- {
- for ( int i = anIds->Lower(); i <= anIds->Upper(); i++ )
- {
- QString aValue;
- int id = anIds->Value( i );
- if ( userMap.contains( id ) )
- aValue = userMap[id];
- else
- aValue = toQString( aValues->Value( i ) );
-
- myDataIds.append( id );
- myValue.insert( id, aValue );
- myState.insert( id, true );
- }
- }
-
- for ( iIt = myUserIds.begin(); iIt != myUserIds.end(); ++iIt )
- {
- int id = *iIt;
- if ( !myValue.contains( id ) )
- {
- myDataIds.append( id );
- myValue.insert( id, userMap[id] );
- }
- }
-
- QIntList del, add;
- for ( IdStateMap::Iterator it1 = myState.begin(); it1 != myState.end(); ++it1 )
- if ( !myValue.contains( it1.key() ) )
- del.append( it1.key() );
-
- for ( IdValueMap::Iterator it2 = myValue.begin(); it2 != myValue.end(); ++it2 )
- if ( !myState.contains( it2.key() ) )
- add.append( it2.key() );
-
- for ( QIntList::iterator iter1 = del.begin(); iter1 != del.end(); ++iter1 )
- myState.remove( *iter1 );
-
- for ( QIntList::iterator iter2 = add.begin(); iter2 != add.end(); ++iter2 )
- myState.insert( *iter2, true );
-
- QButtonGroup* bg = buttonGroup();
- if ( bg )
- bg->setTitle( label() );
-
- updateRadioBox();
-}
-
-/*!
- Notify about activation radio button.
-*/
-void QDS_RadioBox::onToggled( bool on )
-{
- if ( !on )
- return;
-
- onParamChanged();
- emit paramChanged();
- QString str = getString();
- emit paramChanged( str );
-}
-
-/*!
- Updates RadioBox after have change of visible state or buttons have been inserted/removed.
-*/
-void QDS_RadioBox::updateRadioBox()
-{
- QButtonGroup* bg = buttonGroup();
- if ( !bg )
- return;
-
- int curId = bg->selectedId();
-
- QPtrList<QRadioButton> bList;
- buttons( bList );
- for ( QPtrListIterator<QRadioButton> itr( bList ); itr.current(); ++itr )
- delete itr.current();
-
- for ( QIntList::const_iterator it = myDataIds.begin(); it != myDataIds.end(); ++it )
- {
- int id = *it;
- if ( !myValue.contains( id ) || !myState.contains( id ) || !myState[id] )
- continue;
-
- QRadioButton* rb = new QRadioButton( myValue[id], bg );
- bg->insert( rb, id );
-
- connect( rb, SIGNAL( toggled( bool ) ), this, SLOT( onToggled( bool ) ) );
- }
-
- if ( curId != -1 )
- {
- int id = curId;
- if ( !bg->find( id ) )
- {
- QPtrList<QRadioButton> bList;
- buttons( bList );
- if ( !bList.isEmpty() )
- id = bg->id( bList.getFirst() );
- }
-
- bool block = signalsBlocked();
- blockSignals( true );
- bg->setButton( id );
- blockSignals( block );
- }
-
- if ( curId != bg->selectedId() )
- {
- onParamChanged();
- emit paramChanged();
- emit paramChanged( getString() );
- }
-}
-
-/*!
- Returns the list of the radio buttons from the button group.
-*/
-void QDS_RadioBox::buttons( QPtrList<QRadioButton>& lst ) const
-{
- lst.setAutoDelete( false );
- lst.clear();
-
- QButtonGroup* bg = buttonGroup();
- if ( !bg )
- return;
-
- QObjectList* objs = bg->queryList( "QRadioButton" );
- if ( objs )
- {
- for ( QObjectListIt it( *objs ); it.current(); ++it )
- {
- QRadioButton* rb = ::qt_cast<QRadioButton*>( it.current() );
- if ( rb )
- lst.append( rb );
- }
- }
- delete objs;
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 QDS_RADIOBOX_H
-#define QDS_RADIOBOX_H
-
-#include "QDS_Datum.h"
-
-#include <Qtx.h>
-
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
-
-#ifdef WNT
-#pragma warning( disable:4251 )
-#endif
-
-class QButtonGroup;
-class QRadioButton;
-
-class QDS_EXPORT QDS_RadioBox : public QDS_Datum
-{
- Q_OBJECT
-
-public:
- QDS_RadioBox( const QString&, QWidget* = 0, const int = Control, const QString& = QString::null );
- virtual ~QDS_RadioBox();
-
- int count( bool = false ) const;
- void values( QValueList<int>&, bool = false ) const;
-
- int columns() const;
- void setColumns( const int );
-
- bool state( const int ) const;
- void setState( const bool, const int, const bool = true );
- void setState( const bool, const QValueList<int>&, const bool = true );
- void setValues( const QValueList<int>&, const QStringList& );
- void setValues( const QStringList& );
-
-signals:
- void activated( int );
-
-protected slots:
- virtual void onToggled( bool );
-
-protected:
- QButtonGroup* buttonGroup() const;
- virtual QWidget* createControl( QWidget* );
- void buttons( QPtrList<QRadioButton>& ) const;
-
- virtual QString getString() const;
- virtual void setString( const QString& );
-
- virtual void unitSystemChanged( const QString& );
-
-private:
- void updateRadioBox();
-
-private:
- typedef QMap<int, QString> IdValueMap;
- typedef QMap<int, bool> IdStateMap;
-
-private:
- IdValueMap myValue;
- IdStateMap myState;
-
- QIntList myDataIds;
- QIntList myUserIds;
- QStringList myUserNames;
-};
-
-#ifdef WNT
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "QDS_SpinBox.h"
-
-#include <QtxIntSpinBox.h>
-
-#include <qvalidator.h>
-
-/*
- \class QDS_SpinBox
-
- Datum with control corresponding to spin box. This control used for integer numbers.
- User can input data directly in spin box or can modify current value with given
- increment.
-*/
-
-/*!
- Constructor. Create spin box datum object with datum identifier \aid under widget \aparent. Parameter \aflags
- define behaviour of datum and set of created subwidgets. Default value of this parameter is QDS::All.
- Parameter \acomp specify the component name which will be used during search of dictionary item.
-*/
-QDS_SpinBox::QDS_SpinBox( const QString& id, QWidget* parent, const int flags, const QString& comp )
-: QDS_Datum( id, parent, flags, comp )
-{
-}
-
-/*!
- Destructor.
-*/
-QDS_SpinBox::~QDS_SpinBox()
-{
-}
-
-/*!
- Returns string from QSpinBox widget. Reimplemented.
-*/
-QString QDS_SpinBox::getString() const
-{
- QString res;
- QtxIntSpinBox* aSpinBox = spinBox();
- if ( aSpinBox && !aSpinBox->isCleared() )
- {
- res = aSpinBox->text();
- if ( !aSpinBox->suffix().isEmpty() )
- res.remove( res.find( aSpinBox->suffix() ), aSpinBox->suffix().length() );
- if ( !aSpinBox->prefix().isEmpty() )
- res.remove( res.find( aSpinBox->prefix() ), aSpinBox->prefix().length() );
- }
- return res;
-}
-
-/*!
- Sets the string into QSpinBox widget. Reimplemented.
-*/
-void QDS_SpinBox::setString( const QString& txt )
-{
- if ( !spinBox() )
- return;
-
- spinBox()->setCleared( txt.isEmpty() );
- if ( !txt.isEmpty() )
- spinBox()->setValue( txt.toInt() );
-}
-
-/*!
- Returns pointer to QSpinBox widget.
-*/
-QtxIntSpinBox* QDS_SpinBox::spinBox() const
-{
- return ::qt_cast<QtxIntSpinBox*>( controlWidget() );
-}
-
-/*!
- Create QSpinBox widget as control subwidget. Reimplemented.
-*/
-QWidget* QDS_SpinBox::createControl( QWidget* parent )
-{
- QtxIntSpinBox* aSpinBox = new QtxIntSpinBox( parent );
- aSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- connect( aSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( onValueChanged( int ) ) );
- return aSpinBox;
-}
-
-/*!
- Notify about value changing in spin box.
-*/
-void QDS_SpinBox::onValueChanged( int val )
-{
- onParamChanged();
- QString str = QString::number( val );
- emit paramChanged();
- emit paramChanged( str );
-}
-
-/*!
- Sets the increment step.
-*/
-void QDS_SpinBox::setStep( const int step )
-{
- if ( spinBox() )
- spinBox()->setLineStep( step );
-}
-
-/*!
- Returns the increment step.
-*/
-int QDS_SpinBox::step() const
-{
- int s = 0;
- if ( spinBox() )
- s = spinBox()->lineStep();
- return s;
-}
-
-/*!
- Notification about active unit system changing. Reimplemented from QDS_Datum.
- Update validator and spin box parameters: suffix, prefix, minimum, maximum.
-*/
-void QDS_SpinBox::unitSystemChanged( const QString& system )
-{
- QDS_Datum::unitSystemChanged( system );
-
- QSpinBox* sb = spinBox();
- if ( sb )
- {
- delete sb->validator();
- QValidator* valid = validator();
- sb->setValidator( valid );
-
- sb->setSuffix( suffix() );
- sb->setPrefix( prefix() );
- sb->setMinValue( minValue().toInt() );
- sb->setMaxValue( maxValue().toInt() );
- }
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 QDS_SPINBOX_H
-#define QDS_SPINBOX_H
-
-#include "QDS_Datum.h"
-
-class QtxIntSpinBox;
-
-class QDS_EXPORT QDS_SpinBox : public QDS_Datum
-{
- Q_OBJECT
-
-public:
- QDS_SpinBox( const QString&, QWidget* = 0, const int = All, const QString& = QString::null );
- virtual ~QDS_SpinBox();
-
- int step() const;
- void setStep( const int );
-
-private slots:
- void onValueChanged( int );
-
-protected:
- QtxIntSpinBox* spinBox() const;
-
- virtual QWidget* createControl( QWidget* );
-
- virtual QString getString() const;
- virtual void setString( const QString& );
-
- virtual void unitSystemChanged( const QString& );
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "QDS_SpinBoxDbl.h"
-
-#include <DDS_Dictionary.h>
-
-#include <qvalidator.h>
-
-#include <QtxDblSpinBox.h>
-
-/*
- \class QDS_SpinBoxDbl
-
- Datum with control corresponding to spin box. This control used for double numbers.
- User can input data directly in spin box or can modify current value with given
- increment.
-*/
-
-/*!
- Constructor. Create spin box datum object with datum identifier \aid under widget \aparent. Parameter \aflags
- define behaviour of datum and set of created subwidgets. Default value of this parameter is QDS::All.
- Parameter \acomp specify the component name which will be used during search of dictionary item.
-*/
-QDS_SpinBoxDbl::QDS_SpinBoxDbl( const QString& id, QWidget* parent, const int flags, const QString& comp )
-: QDS_Datum( id, parent, flags, comp )
-{
-}
-
-/*!
- Destructor.
-*/
-QDS_SpinBoxDbl::~QDS_SpinBoxDbl()
-{
-}
-
-/*!
- Returns string from QSpinBox widget. Reimplemented.
-*/
-QString QDS_SpinBoxDbl::getString() const
-{
- QString res;
- QtxDblSpinBox* sb = spinBox();
- if ( sb && !sb->isCleared() )
- {
- bool hasFocus = sb->hasFocus();
- if ( hasFocus )
- sb->clearFocus();
-
- res = sb->text();
- if ( !sb->suffix().isEmpty() )
- res.remove( res.find( sb->suffix() ), sb->suffix().length() );
- if ( !sb->prefix().isEmpty() )
- res.remove( res.find( sb->prefix() ), sb->prefix().length() );
-
- if ( hasFocus )
- sb->setFocus();
- }
-
- return res;
-}
-
-/*!
- Sets the string into QSpinBox widget. Reimplemented.
-*/
-void QDS_SpinBoxDbl::setString( const QString& txt )
-{
- if ( !spinBox() )
- return;
-
- spinBox()->setCleared( txt.isEmpty() );
- if ( !txt.isEmpty() )
- spinBox()->setValue( txt.toDouble() );
-}
-
-/*!
- Returns pointer to QtxDblSpinBox widget.
-*/
-QtxDblSpinBox* QDS_SpinBoxDbl::spinBox() const
-{
- return ::qt_cast<QtxDblSpinBox*>( controlWidget() );
-}
-
-/*!
- Create QSpinBox widget as control subwidget. Reimplemented.
-*/
-QWidget* QDS_SpinBoxDbl::createControl( QWidget* parent )
-{
- QtxDblSpinBox* aSpinBox = new QtxDblSpinBox( parent );
- aSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- connect( aSpinBox, SIGNAL( valueChanged( double ) ), this, SLOT( onValueChanged( double ) ) );
- return aSpinBox;
-}
-
-/*!
- Notify about value changing in spin box.
-*/
-void QDS_SpinBoxDbl::onValueChanged( double )
-{
- onParamChanged();
- QString str = getString();
-
- emit paramChanged();
- emit paramChanged( str );
-}
-
-/*!
- Returns the increment step.
-*/
-double QDS_SpinBoxDbl::step() const
-{
- double s = 0;
- if ( spinBox() )
- s = spinBox()->lineStep();
- return s;
-}
-
-/*!
- Sets the increment step.
-*/
-void QDS_SpinBoxDbl::setStep( const double step )
-{
- if ( spinBox() )
- spinBox()->setLineStep( step );
-}
-
-/*!
- Notification about active unit system changing. Reimplemented from QDS_Datum.
- Update validator and spin box parameters: suffix, prefix, minimum, maximum.
-*/
-void QDS_SpinBoxDbl::unitSystemChanged( const QString& system )
-{
- QDS_Datum::unitSystemChanged( system );
-
- QtxDblSpinBox* sb = spinBox();
- if ( !sb )
- return;
-
- delete sb->validator();
- QValidator* valid = validator();
- sb->setValidator( valid );
-
- sb->setSuffix( suffix() );
- sb->setPrefix( prefix() );
-
- Standard_Integer aPreci = 1;
- Handle(DDS_DicItem) aDicItem = dicItem();
- if ( !aDicItem.IsNull() )
- aPreci = aDicItem->GetPrecision();
-
- sb->setPrecision( aPreci );
-
- sb->setLineStep( .1 );
- sb->setMinValue( minValue().isEmpty() ? -DBL_MAX : minValue().toDouble() );
- sb->setMaxValue( maxValue().isEmpty() ? DBL_MAX : maxValue().toDouble() );
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 QDS_PINBOXDBL_H
-#define QDS_PINBOXDBL_H
-
-#include "QDS_Datum.h"
-
-class QtxDblSpinBox;
-
-class QDS_EXPORT QDS_SpinBoxDbl : public QDS_Datum
-{
- Q_OBJECT
-
-public:
- QDS_SpinBoxDbl( const QString&, QWidget* = 0, const int = All, const QString& = QString::null );
- virtual ~QDS_SpinBoxDbl();
-
- double step() const;
- void setStep( const double );
-
-private slots:
- void onValueChanged( double );
-
-protected:
- QtxDblSpinBox* spinBox() const;
- virtual QWidget* createControl( QWidget* );
-
- virtual QString getString() const;
- virtual void setString( const QString& );
-
- virtual void unitSystemChanged( const QString& );
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "QDS_Table.h"
-
-#include "QDS_LineEdit.h"
-
-class QDS_Table::DeleteFilter : public QObject
-{
-public:
- DeleteFilter( QObject* = 0 );
- virtual ~DeleteFilter();
-
- virtual bool eventFilter( QObject*, QEvent* );
-};
-
-QDS_Table::DeleteFilter::DeleteFilter( QObject* parent )
-: QObject( parent )
-{
-}
-
-QDS_Table::DeleteFilter::~DeleteFilter()
-{
-}
-
-bool QDS_Table::DeleteFilter::eventFilter( QObject* o, QEvent* e )
-{
- if ( e->type() == QEvent::DeferredDelete )
- return true;
- else
- return false;
-}
-
-QDS_Table::QDS_Table( QWidget* parent, const char* name )
-: QtxTable( parent, name ),
-myHorEdit( 0 ),
-myVerEdit( 0 ),
-myTableEdit( 0 ),
-myKeepEdits( false )
-{
-}
-
-QDS_Table::QDS_Table( int r, int c, QWidget* parent, const char* name )
-: QtxTable( r, c, parent, name ),
-myHorEdit( 0 ),
-myVerEdit( 0 ),
-myTableEdit( 0 ),
-myKeepEdits( false )
-{
- myRowEdit.resize( r );
- myColEdit.resize( c );
-}
-
-QDS_Table::~QDS_Table()
-{
-}
-
-QDS_Datum* QDS_Table::horizontalHeaderEditor() const
-{
- return myHorEdit;
-}
-
-QDS_Datum* QDS_Table::verticalHeaderEditor() const
-{
- return myVerEdit;
-}
-
-QDS_Datum* QDS_Table::headerEditor( const Orientation o ) const
-{
- return o == Horizontal ? myHorEdit : myVerEdit;
-}
-
-void QDS_Table::setVerticalHeaderEditor( QDS_Datum* dat )
-{
- setHeaderEditor( Vertical, dat );
-}
-
-void QDS_Table::setHorizontalHeaderEditor( QDS_Datum* dat )
-{
- setHeaderEditor( Horizontal, dat );
-}
-
-void QDS_Table::setHeaderEditor( QDS_Datum* dat )
-{
- setHeaderEditor( Vertical, dat );
- setHeaderEditor( Horizontal, dat );
-}
-
-void QDS_Table::setHeaderEditor( const Orientation o, QDS_Datum* dat )
-{
- if ( headerEditor( o ) == dat )
- return;
-
- if ( isHeaderEditing() )
- endEditHeader();
-
- if ( o == Horizontal )
- myHorEdit = dat;
- else
- myVerEdit = dat;
-
- initEditor( dat );
-}
-
-QDS_Datum* QDS_Table::tableEditor() const
-{
- return myTableEdit;
-}
-
-QDS_Datum* QDS_Table::rowEditor( const int row ) const
-{
- if ( row < 0 || row >= (int)myRowEdit.size() )
- return 0;
-
- return myRowEdit.at( row );
-}
-
-QDS_Datum* QDS_Table::columnEditor( const int col ) const
-{
- if ( col < 0 || col >= (int)myColEdit.size() )
- return 0;
-
- return myColEdit.at( col );
-}
-
-QDS_Datum* QDS_Table::cellEditor( const int row, const int col ) const
-{
- if ( !myCellEdit.contains( row ) )
- return 0;
-
- const DatumMap& map = myCellEdit[row];
- return map.contains( col ) ? map[col] : 0;
-}
-
-void QDS_Table::setTableEditor( QDS_Datum* dat )
-{
- if ( tableEditor() == dat )
- return;
-
- if ( isEditing() && !cellEditor( currEditRow(), currEditCol() ) &&
- !columnEditor( currEditCol() ) && !rowEditor( currEditRow() ) )
- endEdit( currEditRow(), currEditCol(), false, false );
-
- myTableEdit = dat;
- initEditor( dat );
-}
-
-void QDS_Table::setRowEditor( const int row, QDS_Datum* dat )
-{
- if ( row < 0 || row >= (int)myRowEdit.size() || rowEditor( row ) == dat )
- return;
-
- if ( isEditing() && row == currEditRow()&&
- !cellEditor( currEditRow(), currEditCol() ) )
- endEdit( currEditRow(), currEditCol(), false, false );
-
- myRowEdit.insert( row, dat );
- initEditor( dat );
-}
-
-void QDS_Table::setColumnEditor( const int col, QDS_Datum* dat )
-{
- if ( col < 0 || col >= (int)myColEdit.size() || columnEditor( col ) == dat )
- return;
-
- if ( isEditing() && col == currEditCol()&&
- !cellEditor( currEditRow(), currEditCol() ) )
- endEdit( currEditRow(), currEditCol(), false, false );
-
- myColEdit.insert( col, dat );
- initEditor( dat );
-}
-
-void QDS_Table::setCellEditor( const int row, const int col, QDS_Datum* dat )
-{
- if ( row < 0 || row >= numRows() || col < 0 || col >= numCols() || cellEditor( row, col ) == dat )
- return;
-
- if ( isEditing() && currEditRow() == row && currEditCol() == col && actualCellEditor( row, col ) != dat )
- endEdit( currEditRow(), currEditCol(), false, false );
-
- if ( !myCellEdit.contains( row ) )
- myCellEdit.insert( row, DatumMap() );
-
- myCellEdit[row].insert( col, dat );
- initEditor( dat );
-}
-
-QDS_Datum* QDS_Table::actualCellEditor( const int row, const int col ) const
-{
- QDS_Datum* dat = cellEditor( row, col );
- if ( !dat )
- dat = columnEditor( col );
- if ( !dat )
- dat = rowEditor( row );
- if ( !dat )
- dat = tableEditor();
- return dat;
-}
-
-void QDS_Table::setNumRows( int r )
-{
- int old = numRows();
- QtxTable::setNumRows( r );
-
- if ( isKeepEditors() )
- myRowEdit.resize( QMAX( (int)myRowEdit.size(), r ) );
- else
- {
- myRowEdit.resize( r );
- for ( int i = r + 1; i <= old; i++ )
- myCellEdit.remove( i );
- }
-}
-
-void QDS_Table::setNumCols( int c )
-{
- int old = numCols();
- QtxTable::setNumCols( c );
-
- if ( isKeepEditors() )
- myColEdit.resize( QMAX( (int)myColEdit.size(), c ) );
- else
- {
- myColEdit.resize( c );
- for ( CellMap::Iterator it = myCellEdit.begin(); it != myCellEdit.end(); ++it )
- {
- DatumMap& map = it.data();
- for ( int i = c + 1; i <= old; i++ )
- map.remove( i );
- }
- }
-}
-
-void QDS_Table::clearCellWidget( int row, int col )
-{
- QDS_Datum* dat = actualCellEditor( row, col );
- if ( dat )
- dat->hide();
-
- QtxTable::clearCellWidget( row, col );
-}
-
-bool QDS_Table::isKeepEditors() const
-{
- return myKeepEdits;
-}
-
-void QDS_Table::setKeepEditors( const bool on )
-{
- myKeepEdits = on;
-}
-
-QWidget* QDS_Table::createHeaderEditor( QHeader* header, const int sect, const bool init )
-{
- if ( !header )
- return 0;
-
- QDS_Datum* dat = headerEditor( header->orientation() );
- QWidget* wid = dat ? dat->widget( QDS::Control ) : 0;
- if ( wid )
- {
- if ( init )
- dat->setStringValue( header->label( sect ) );
- else
- dat->clear();
- dat->setProperty( "Selection", true );
- }
- else
- wid = QtxTable::createHeaderEditor( header, sect, init );
-
- return wid;
-}
-
-QWidget* QDS_Table::createEditor( int row, int col, bool init ) const
-{
- QDS_Datum* dat = actualCellEditor( row, col );
- QWidget* wid = dat ? dat->widget( QDS::Control ) : 0;
- if ( wid )
- {
- if ( init )
- dat->setStringValue( text( row, col ) );
- else
- dat->clear();
- dat->setProperty( "Selection", true );
- }
- else
- wid = QtxTable::createEditor( row, col, init );
-
- return wid;
-}
-
-void QDS_Table::endEdit( int row, int col, bool accept, bool )
-{
- QtxTable::endEdit( row, col, accept, true );
-}
-
-void QDS_Table::setCellContentFromEditor( int row, int col )
-{
- QDS_Datum* dat = actualCellEditor( row, col );
- if ( dat )
- setText( row, col, dat->stringValue() );
- else
- QtxTable::setCellContentFromEditor( row, col );
-}
-
-void QDS_Table::setHeaderContentFromEditor( QHeader* header, const int sect, QWidget* editor )
-{
- if ( !header )
- return;
-
- QDS_Datum* dat = headerEditor( header->orientation() );
- if ( dat )
- header->setLabel( sect, dat->stringValue() );
- else
- QtxTable::setHeaderContentFromEditor( header, sect, editor );
-}
-
-void QDS_Table::initEditor( QDS_Datum* dat )
-{
- if ( !dat )
- return;
-
- dat->hide();
-
- static QGuardedPtr<DeleteFilter> _filter = 0;
- if ( !_filter )
- _filter = new DeleteFilter( 0 );
-
- if ( dat->widget( QDS::Control ) )
- dat->widget( QDS::Control )->installEventFilter( _filter );
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 QDS_TABLE_H
-#define QDS_TABLE_H
-
-#include "QDS_Datum.h"
-
-#include <QtxTable.h>
-
-#include <qmap.h>
-#include <qptrvector.h>
-
-class QDS_EXPORT QDS_Table : public QtxTable
-{
- class DeleteFilter;
-
- Q_OBJECT
-
- Q_PROPERTY( bool KeepEditors READ isKeepEditors WRITE setKeepEditors )
-
-public:
- QDS_Table( QWidget* = 0, const char* = 0 );
- QDS_Table( int, int, QWidget* = 0, const char* = 0 );
- virtual ~QDS_Table();
-
- QDS_Datum* verticalHeaderEditor() const;
- QDS_Datum* horizontalHeaderEditor() const;
- QDS_Datum* headerEditor( const Orientation ) const;
-
- void setVerticalHeaderEditor( QDS_Datum* );
- void setHorizontalHeaderEditor( QDS_Datum* );
-
- void setHeaderEditor( QDS_Datum* );
- virtual void setHeaderEditor( const Orientation, QDS_Datum* );
-
- QDS_Datum* tableEditor() const;
- virtual void setTableEditor( QDS_Datum* );
-
- QDS_Datum* rowEditor( const int ) const;
- QDS_Datum* columnEditor( const int ) const;
-
- virtual void setRowEditor( const int, QDS_Datum* );
- virtual void setColumnEditor( const int, QDS_Datum* );
-
- QDS_Datum* cellEditor( const int, const int ) const;
- virtual void setCellEditor( const int, const int, QDS_Datum* );
-
- QDS_Datum* actualCellEditor( const int, const int ) const;
-
- virtual void setNumRows( int );
- virtual void setNumCols( int );
- virtual void clearCellWidget( int, int );
-
- bool isKeepEditors() const;
- void setKeepEditors( const bool );
-
-protected:
- virtual QWidget* createHeaderEditor( QHeader*, const int, const bool = true );
- virtual QWidget* createEditor( int, int, bool ) const;
- virtual void endEdit( int, int, bool, bool );
- virtual void setCellContentFromEditor( int, int );
- virtual void setHeaderContentFromEditor( QHeader*, const int, QWidget* );
-
-private:
- void initEditor( QDS_Datum* );
- QDS_Datum* datum( const QWidget* ) const;
-
-private:
- typedef QPtrVector<QDS_Datum> DatumVector;
- typedef QMap<int, QDS_Datum*> DatumMap;
- typedef QMap<int, DatumMap> CellMap;
-
-private:
- QDS_Datum* myHorEdit;
- QDS_Datum* myVerEdit;
- DatumVector myRowEdit;
- DatumVector myColEdit;
- CellMap myCellEdit;
- QDS_Datum* myTableEdit;
- bool myKeepEdits;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "QDS_TextEdit.h"
-
-#include <qtextedit.h>
-
-/*
- \class QDS_TextEdit
-
- Datum with control corresponding to text edit. User can enter parameter value in multiple line editor.
-*/
-
-/*!
- Constructor. Create text edit datum object with datum identifier \aid under widget \aparent.
- Parameter \aflags define behaviour of datum and set of created subwidgets. Default value of this
- parameter is QDS::All. Parameter \acomp specify the component name which will be used during search
- of dictionary item.
-*/
-QDS_TextEdit::QDS_TextEdit( const QString& id, QWidget* parent, const int flags, const QString& comp )
-: QDS_Datum( id, parent, flags, comp )
-{
-}
-
-/*!
- Destructor.
-*/
-QDS_TextEdit::~QDS_TextEdit()
-{
-}
-
-/*!
- Returns string from QTextEdit widget. Reimplemented from QDS_Datum.
-*/
-QString QDS_TextEdit::getString() const
-{
- QString res;
- if ( textEdit() )
- res = textEdit()->text();
- return res;
-}
-
-/*!
- Sets the string into QTextEdit widget. Reimplemented from QDS_Datum.
-*/
-void QDS_TextEdit::setString( const QString& txt )
-{
- if ( textEdit() )
- textEdit()->setText( txt );
-}
-
-/*!
- Returns pointer to QTextEdit widget.
-*/
-QTextEdit* QDS_TextEdit::textEdit() const
-{
- return ::qt_cast<QTextEdit*>( controlWidget() );
-}
-
-/*!
- Create QTextEdit widget as control subwidget.
-*/
-QWidget* QDS_TextEdit::createControl( QWidget* parent )
-{
- QTextEdit* te = new QTextEdit( parent );
- connect( te, SIGNAL( textChanged() ), this, SLOT( onTextChanged() ) );
- return te;
-}
-
-/*!
- Notify about text changing in text edit.
-*/
-void QDS_TextEdit::onTextChanged()
-{
- invalidateCache();
-
- onParamChanged();
-
- QString str = getString();
-
- emit paramChanged();
- emit paramChanged( str );
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 QDS_TEXTEEDIT_H
-#define QDS_TEXTEEDIT_H
-
-#include "QDS_Datum.h"
-
-class QTextEdit;
-
-class QDS_EXPORT QDS_TextEdit : public QDS_Datum
-{
- Q_OBJECT
-
-public:
- QDS_TextEdit( const QString&, QWidget* = 0, const int = All, const QString& = QString::null );
- virtual ~QDS_TextEdit();
-
-signals:
- void returnPressed();
-
-private slots:
- void onTextChanged();
-
-protected:
- QTextEdit* textEdit() const;
- virtual QWidget* createControl( QWidget* );
-
- virtual QString getString() const;
- virtual void setString( const QString& );
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 "QDS_Validator.h"
-
-/*!
- \class QDS_IntegerValidator
-
- This class to provide validation of user inputted string for datum with 'Integer'
- value type according to datum properties: minimum value, maximum value, filter.
-
- Inherits from QIntValidator.
-*/
-
-/*!
- Constructor. Create empty validator object.
-*/
-QDS_IntegerValidator::QDS_IntegerValidator( QObject* p )
-: QIntValidator( p )
-{
-}
-
-/*!
- Constructor. Create validator object with filter string \af.
-*/
-QDS_IntegerValidator::QDS_IntegerValidator( const QString& f, QObject* p )
-: QIntValidator( p ),
-myFilter( f )
-{
-}
-
-/*!
- Destructor.
-*/
-QDS_IntegerValidator::~QDS_IntegerValidator()
-{
-}
-
-/*!
- Validate the inputed string \ainput. Reimplemented from QIntValidator. Perform
- standard check by QIntValidator::validate(). If returned state is not Invalid and
- filter specified then perform validation with filter by QRegExpValidator.
-
- Returns Invalid if input is invalid according to this validator's rules,
- Intermediate if it is likely that a little more editing will make the input acceptable
- and Acceptable if the input is valid.
-*/
-QValidator::State QDS_IntegerValidator::validate( QString& input, int& pos ) const
-{
- State rgState = Acceptable;
- State ivState = QIntValidator::validate( input, pos );
- if ( ivState != Invalid && !myFilter.isEmpty() )
- rgState = QRegExpValidator( QRegExp( myFilter ), 0 ).validate( input, pos );
-
- ivState = QMIN( ivState, rgState );
-
- return ivState;
-}
-
-/*!
- \class QDS_DoubleValidator
-
- This class to provide validation of user inputted string for datum with 'Float'
- value type according to datum properties: minimum value, maximum value, precision, filter.
-
- Inherits from QDoubleValidator.
-*/
-
-/*!
- Constructor. Create empty validator object.
-*/
-QDS_DoubleValidator::QDS_DoubleValidator( QObject* p )
-: QDoubleValidator( p )
-{
-}
-
-/*!
- Constructor. Create validator object with filter string \af.
-*/
-QDS_DoubleValidator::QDS_DoubleValidator( const QString& f, QObject* p )
-: QDoubleValidator( p ),
-myFilter( f )
-{
-}
-
-/*!
- Destructor.
-*/
-QDS_DoubleValidator::~QDS_DoubleValidator()
-{
-}
-
-/*!
- Validate the inputed string \ainput. Reimplemented from QDoubleValidator. Perform
- standard check by QDoubleValidator::validate(). If returned state is not Invalid and
- filter specified then perform validation with filter by QRegExpValidator.
-
- Returns Invalid if input is invalid according to this validator's rules,
- Intermediate if it is likely that a little more editing will make the input acceptable
- and Acceptable if the input is valid.
-*/
-QValidator::State QDS_DoubleValidator::validate( QString& input, int& pos ) const
-{
- State rgState = Acceptable;
- State dvState = QDoubleValidator::validate( input, pos );
- if ( dvState != Invalid && !myFilter.isEmpty() )
- rgState = QRegExpValidator( QRegExp( myFilter ), 0 ).validate( input, pos );
-
- dvState = QMIN( dvState, rgState );
-
- return dvState;
-}
-
-/*!
- \class QDS_StringValidator
-
- This class to provide validation of user inputted string for datum with 'String'
- value type according to datum properties: format, filter.
-
- Inherits from QDoubleValidator.
-*/
-
-/*!
- Constructor. Create empty validator object.
-*/
-QDS_StringValidator::QDS_StringValidator( QObject* p )
-: QValidator( p ),
-myLen( -1 )
-{
-}
-
-/*!
- Constructor. Create validator object with filter string \af.
-*/
-QDS_StringValidator::QDS_StringValidator( const QString& f, QObject* p )
-: QValidator( p ),
-myFlags( f ),
-myLen( -1 )
-{
-}
-
-/*!
- Constructor. Create validator object with filter string \aft and format flags \afg.
-*/
-QDS_StringValidator::QDS_StringValidator( const QString& ft, const QString& fg, QObject* p )
-: QValidator( p ),
-myLen( -1 ),
-myFilter( ft ),
-myFlags( fg )
-{
-}
-
-/*!
- Destructor.
-*/
-QDS_StringValidator::~QDS_StringValidator()
-{
-}
-
-/*!
- Returns valid string length. If length not specified -1 returned.
-*/
-int QDS_StringValidator::length() const
-{
- return myLen;
-}
-
-/*!
- Sets the valid string length \al. If value less than zero valid string
- length not specified.
-*/
-void QDS_StringValidator::setLength( const int l )
-{
- myLen = l;
-}
-
-/*!
- Validate the inputed string \ainput. Reimplemented from QValidator. Convert specified
- string to upper/lower case if the format flags contains specificator 'u'/'l'.
- If valid string lenght is specified then check given string length. If
- filter specified then perform validation with filter by QRegExpValidator.
-
- Returns Invalid if input is invalid according to this validator's rules,
- Intermediate if it is likely that a little more editing will make the input acceptable
- and Acceptable if the input is valid.
-*/
-QValidator::State QDS_StringValidator::validate( QString& input, int& pos ) const
-{
- if ( input.isEmpty() )
- return Acceptable;
-
- QString orig = input;
- if ( myFlags.contains( 'u', false ) )
- input = input.upper();
- if ( myFlags.contains( 'l', false ) )
- input = input.lower();
-
- State rgState = Acceptable;
- State svState = orig == input ? Acceptable : Intermediate;
-
- if ( myLen >= 0 && (int)input.length() > myLen )
- svState = Intermediate;
-
- if ( !myFilter.isEmpty() )
- rgState = QRegExpValidator( QRegExp( myFilter ), 0 ).validate( input, pos );
-
- svState = QMIN( svState, rgState );
-
- return svState;
-}
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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 QDS_VALIDATOR_H
-#define QDS_VALIDATOR_H
-
-#include "QDS.h"
-
-#include <qvalidator.h>
-
-/*!
- class QDS_IntegerValidator
-*/
-class QDS_EXPORT QDS_IntegerValidator : public QIntValidator
-{
-public:
- QDS_IntegerValidator( QObject* p = 0 );
- QDS_IntegerValidator( const QString& f, QObject* p = 0 );
- virtual ~QDS_IntegerValidator();
-
- virtual State validate( QString&, int& ) const;
-
-private:
- QString myFilter;
-};
-
-/*!
- class QDS_DoubleValidator
-*/
-class QDS_DoubleValidator : public QDoubleValidator
-{
-public:
- QDS_DoubleValidator( QObject* p = 0 );
- QDS_DoubleValidator( const QString& f, QObject* p = 0 );
- virtual ~QDS_DoubleValidator();
-
- virtual State validate( QString&, int& ) const;
-
-private:
- QString myFilter;
-};
-
-/*!
- class QDS_StringValidator
-*/
-class QDS_EXPORT QDS_StringValidator : public QValidator
-{
-public:
- QDS_StringValidator( QObject* p = 0 );
- QDS_StringValidator( const QString& f, QObject* p = 0 );
- QDS_StringValidator( const QString& ft, const QString& fg, QObject* p = 0 );
- virtual ~QDS_StringValidator();
-
- virtual State validate( QString&, int& ) const;
-
- int length() const;
- void setLength( const int );
-
-private:
- int myLen;
- QString myFlags;
- QString myFilter;
-};
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# This is a Qt message file in .po format. Each msgid starts with
-# a scope. This scope should *NOT* be translated - eg. "Foo::Bar"
-# would be translated to "Pub", not "Foo::Pub".
-msgid ""
-msgstr ""
-"Project-Id-Version: example-Qt-message-extraction\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 1999-02-23 15:38+0200\n"
-"Last-Translator: \n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-# -------------------------------------------------------------
-
-msgid "QDS_Datum::DATA_ERR_TITLE"
-msgstr "Incorrect parameter value"
-
-msgid "QDS_Datum::DATA_INCORRECT_VALUE"
-msgstr "Value of parameter \"%1\" is incorrect."
-
-msgid "QDS_Datum::DATA_INPUT_VALUE"
-msgstr "Please, input correct value."
-
-msgid "QDS_Datum::DATA_SHOULD_BE_VALUE"
-msgstr "Should be%1 value"
-
-msgid "QDS_Datum::DATA_FLOAT"
-msgstr " real"
-
-msgid "QDS_Datum::DATA_INTEGER"
-msgstr " integer"
-
-msgid "QDS_Datum::DATA_STRING"
-msgstr " non-empty string"
-
-msgid "QDS_Datum::DATA_NON_EMPTY"
-msgstr " non-empty"
-
-msgid "QDS_Datum::DATA_MIN_LIMIT"
-msgstr " is greater than %1"
-
-msgid "QDS_Datum::DATA_MAX_LIMIT"
-msgstr " is less than %1"
-
-msgid "QDS_Datum::DATA_RANGE"
-msgstr " in range [%1, %2]"
-
-# -------------------------------------------------------------
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : suit
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-# header files
-
-salomeinclude_HEADERS= Qtx.h \
- QtxAction.h \
- QtxColorScale.h \
- QtxComboBox.h \
- QtxDblSpinBox.h \
- QtxDialog.h \
- QtxDockAction.h \
- QtxDockWindow.h \
- QtxGroupBox.h \
- QtxIntSpinBox.h \
- QtxListAction.h \
- QtxListBox.h \
- QtxListOfOperations.h \
- QtxLogoMgr.h \
- QtxMenuButton.h \
- QtxMRUAction.h \
- QtxOperations.h \
- QtxPathDialog.h \
- QtxPopupMgr.h \
- QtxResourceMgr.h \
- QtxStdOperations.h \
- QtxTable.h \
- QtxToolBar.h \
- QtxToolTip.h \
- QtxParser.h \
- QtxPopupMenu.h \
- QtxActionMgr.h \
- QtxActionMenuMgr.h \
- QtxActionToolMgr.h \
- QtxMainWindow.h \
- QtxWorkspaceAction.h \
- QtxWorkstackAction.h \
- QtxListResourceEdit.h \
- QtxWorkstack.h \
- QtxResourceEdit.h \
- QtxListView.h \
- QtxDirListEditor.h \
- QtxDblValidator.h \
- QtxSplash.h
-
-# Libraries targets
-
-lib_LTLIBRARIES= libqtx.la
-
-dist_libqtx_la_SOURCES= \
- Qtx.cxx \
- QtxAction.cxx \
- QtxColorScale.cxx \
- QtxComboBox.cxx \
- QtxDblSpinBox.cxx \
- QtxDialog.cxx \
- QtxDockAction.cxx \
- QtxDockWindow.cxx \
- QtxGroupBox.cxx \
- QtxIntSpinBox.cxx \
- QtxListAction.cxx \
- QtxListBox.cxx \
- QtxListOfOperations.cxx \
- QtxLogoMgr.cxx \
- QtxMenuButton.cxx \
- QtxMRUAction.cxx \
- QtxPathDialog.cxx \
- QtxPopupMgr.cxx \
- QtxResourceMgr.cxx \
- QtxStdOperations.cxx \
- QtxTable.cxx \
- QtxToolBar.cxx \
- QtxToolTip.cxx \
- QtxOperations.cxx \
- QtxParser.cxx \
- QtxPopupMenu.cxx \
- QtxActionMgr.cxx \
- QtxActionMenuMgr.cxx \
- QtxActionToolMgr.cxx \
- QtxMainWindow.cxx \
- QtxWorkspaceAction.cxx \
- QtxWorkstackAction.cxx \
- QtxListResourceEdit.cxx \
- QtxResourceEdit.cxx \
- QtxWorkstack.cxx \
- QtxListView.cxx \
- QtxDirListEditor.cxx \
- QtxDblValidator.cxx \
- QtxSplash.cxx
-
-MOC_FILES= \
- QtxAction_moc.cxx \
- QtxColorScale_moc.cxx \
- QtxComboBox_moc.cxx \
- QtxDblSpinBox_moc.cxx \
- QtxDialog_moc.cxx \
- QtxDockAction_moc.cxx \
- QtxDockWindow_moc.cxx \
- QtxGroupBox_moc.cxx \
- QtxIntSpinBox_moc.cxx \
- QtxListAction_moc.cxx \
- QtxListBox_moc.cxx \
- QtxLogoMgr_moc.cxx \
- QtxMenuButton_moc.cxx \
- QtxMRUAction_moc.cxx \
- QtxPathDialog_moc.cxx \
- QtxPopupMgr_moc.cxx \
- QtxPopupMenu_moc.cxx \
- QtxTable_moc.cxx \
- QtxToolBar_moc.cxx \
- QtxToolTip_moc.cxx \
- QtxActionMgr_moc.cxx \
- QtxActionMenuMgr_moc.cxx \
- QtxActionToolMgr_moc.cxx \
- QtxMainWindow_moc.cxx \
- QtxWorkspaceAction_moc.cxx \
- QtxWorkstackAction_moc.cxx \
- QtxWorkstack_moc.cxx \
- QtxListView_moc.cxx \
- QtxListResourceEdit_moc.cxx \
- QtxDirListEditor_moc.cxx \
- QtxDblValidator_moc.cxx \
- QtxSplash_moc.cxx
-nodist_libqtx_la_SOURCES= $(MOC_FILES)
-
-libqtx_la_CPPFLAGS=$(QT_INCLUDES)
-
-libqtx_la_LDFLAGS=$(QT_MT_LIBS)
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxDblSpinBox.cxx
-// Author: Sergey TELKOV
-
-#include "QtxDblSpinBox.h"
-
-#include <qlineedit.h>
-#include <qvalidator.h>
-#include <qapplication.h>
-
-#include <float.h>
-
-/*!
- \class QtxDblSpinBox::Validator [internal]
- Validator for QtxDblSpinBox (getted from Trolltech Qt - SpinBoxValidator)
-*/
-class QtxDblSpinBox::Validator : public QDoubleValidator
-{
-public:
- Validator( QtxDblSpinBox* sb, const char* name )
- : QDoubleValidator( sb, name ), spinBox( sb ) {}
-
- virtual State validate( QString& str, int& pos ) const;
-
-private:
- QtxDblSpinBox* spinBox;
-};
-
-
-/*!
- Checks string and \return QValidator::State
-*/
-QValidator::State QtxDblSpinBox::Validator::validate( QString& str, int& pos ) const
-{
- QString pref = spinBox->prefix();
- QString suff = spinBox->suffix();
- uint overhead = pref.length() + suff.length();
- State state = Invalid;
-
- if ( overhead == 0 )
- state = QDoubleValidator::validate( str, pos );
- else
- {
- if ( str.length() >= overhead && str.startsWith( pref ) &&
- str.right( suff.length() ) == suff )
- {
- QString core = str.mid( pref.length(), str.length() - overhead );
- int corePos = pos - pref.length();
- state = QDoubleValidator::validate( core, corePos );
- pos = corePos + pref.length();
- str.replace( pref.length(), str.length() - overhead, core );
- }
- else
- {
- state = QDoubleValidator::validate( str, pos );
- if ( state == Invalid )
- {
- QString special = spinBox->specialValueText().stripWhiteSpace();
- QString candidate = str.stripWhiteSpace();
- if ( special.startsWith( candidate ) )
- {
- if ( candidate.length() == special.length() )
- state = Acceptable;
- else
- state = Intermediate;
- }
- }
- }
- }
- return state;
-}
-
-/*!
- Constructor
-*/
-QtxDblSpinBox::QtxDblSpinBox( QWidget* parent, const char* name )
-: QSpinBox( parent, name ),
-myCleared( false ),
-myBlocked( false ),
-myPrecision( 0 )
-{
- myMin = -DBL_MAX;
- myMax = DBL_MAX;
- myStep = QRangeControl::lineStep();
- myValue = 0;
- setValidator( new Validator( this, "double_spinbox_validator" ) );
- rangeChange();
- updateDisplay();
-
- connect( editor(), SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) );
-}
-
-/*!
- Constructor
-*/
-QtxDblSpinBox::QtxDblSpinBox( double min, double max, double step, QWidget* parent, const char* name )
-: QSpinBox( parent, name ),
-myMin( min ),
-myMax( max ),
-myStep( step ),
-myCleared( false ),
-myBlocked( false ),
-myPrecision( 0 )
-{
- myValue = myMin;
- setValidator( new Validator( this, "double_spinbox_validator" ) );
- rangeChange();
- updateDisplay();
-
- connect( editor(), SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) );
-}
-
-/*!
- Destructor
-*/
-QtxDblSpinBox::~QtxDblSpinBox()
-{
-}
-
-/*!
- \return min value of spin box
-*/
-double QtxDblSpinBox::minValue() const
-{
- return myMin;
-}
-
-/*!
- \return max value of spin box
-*/
-double QtxDblSpinBox::maxValue() const
-{
- return myMax;
-}
-
-/*!
- Changes min value of spin box
- \param min - new min value
-*/
-void QtxDblSpinBox::setMinValue( int min )
-{
- setMinValue( (double)min );
-}
-
-/*!
- Changes min value of spin box
- \param min - new min value
-*/
-void QtxDblSpinBox::setMinValue( double min )
-{
- if ( myMin != min )
- {
- myMin = min;
- rangeChange();
- }
-}
-
-/*!
- Changes max value of spin box
- \param max - new max value
-*/
-void QtxDblSpinBox::setMaxValue( int max )
-{
- setMaxValue( (double)max );
-}
-
-/*!
- Changes max value of spin box
- \param max - new max value
-*/
-void QtxDblSpinBox::setMaxValue( double max )
-{
- if ( myMax != max )
- {
- myMax = max;
- rangeChange();
- }
-}
-
-/*!
- Changes min and max value of spin box
- \param min - new min value
- \param max - new max value
-*/
-void QtxDblSpinBox::setRange( int min, int max )
-{
- setRange( (double)min, (double)max );
-}
-
-/*!
- Changes min and max value of spin box
- \param min - new min value
- \param max - new max value
-*/
-void QtxDblSpinBox::setRange( double min, double max )
-{
- if ( myMin != min || myMax != max )
- {
- myMin = min;
- myMax = max;
- rangeChange();
- }
-}
-
-/*!
- \return step of spin box
-*/
-double QtxDblSpinBox::lineStep() const
-{
- return myStep;
-}
-
-/*!
- Changes step of spin box
- \param step - new step
-*/
-void QtxDblSpinBox::setLineStep( int step )
-{
- setLineStep( (double)step );
-}
-
-/*!
- Changes step of spin box
- \param step - new step
-*/
-void QtxDblSpinBox::setLineStep( double step )
-{
- myStep = step;
-}
-
-/*!
- \return value of spin box
-*/
-double QtxDblSpinBox::value() const
-{
- QSpinBox::value();
-
- return myValue;
-}
-
-/*!
- Changes value of spin box
- \param val - new value of spin box
-*/
-void QtxDblSpinBox::setValue( int val )
-{
- setValue( (double)val );
-}
-
-/*!
- Changes value of spin box
- \param val - new value of spin box
-*/
-void QtxDblSpinBox::setValue( double val )
-{
- myCleared = false;
- double prevVal = myValue;
- myValue = bound( val );
- if ( prevVal != myValue )
- valueChange();
-}
-
-/*!
- Adds step to value
-*/
-void QtxDblSpinBox::stepUp()
-{
- interpretText();
- if ( wrapping() && myValue + myStep > myMax )
- setValue( myMin );
- else
- setValue( myValue + myStep );
-}
-
-/*!
- Subtracks step from value
-*/
-void QtxDblSpinBox::stepDown()
-{
- interpretText();
- if ( wrapping() && myValue - myStep < myMin )
- setValue( myMax );
- else
- setValue( myValue - myStep );
-}
-
-/*!
- \return number of digit after comma
-*/
-int QtxDblSpinBox::precision() const
-{
- return myPrecision;
-}
-
-/*!
- Changes number of digit after comma
- \param prec - new digit number
-*/
-void QtxDblSpinBox::setPrecision( const int prec )
-{
- int newPrec = QMAX( prec, 0 );
- int oldPrec = QMAX( myPrecision, 0 );
- myPrecision = prec;
- if ( newPrec != oldPrec )
- updateDisplay();
-}
-
-/*!
- \return true if spin box is cleared
-*/
-bool QtxDblSpinBox::isCleared() const
-{
- return myCleared;
-}
-
-/*!
- Changes cleared status of spin box
- \param on - new status
-*/
-void QtxDblSpinBox::setCleared( const bool on )
-{
- if ( myCleared == on )
- return;
-
- myCleared = on;
- updateDisplay();
-}
-
-/*!
- Selects all content of spin box editor
-*/
-void QtxDblSpinBox::selectAll()
-{
-#if QT_VER >= 3
- QSpinBox::selectAll();
-#else
- editor()->selectAll();
-#endif
-}
-
-/*!
- Custom event filter, updates text of spin box editor
-*/
-bool QtxDblSpinBox::eventFilter( QObject* o, QEvent* e )
-{
- if ( !myCleared || o != editor() || !editor()->text().stripWhiteSpace().isEmpty() )
- {
- bool state = QSpinBox::eventFilter( o, e );
- if ( e->type() == QEvent::FocusOut && o == editor() )
- updateDisplay();
- return state;
- }
-
- if ( e->type() == QEvent::FocusOut || e->type() == QEvent::Leave || e->type() == QEvent::Hide )
- return false;
-
- if ( e->type() == QEvent::KeyPress &&
- ( ((QKeyEvent*)e)->key() == Key_Tab || ((QKeyEvent*)e)->key() == Key_BackTab ) )
- {
- QApplication::sendEvent( this, e );
- return true;
- }
-
- return QSpinBox::eventFilter( o, e );
-}
-
-/*!
- Updates text of editor
-*/
-void QtxDblSpinBox::updateDisplay()
-{
- if ( myBlocked )
- return;
-
- bool upd = editor()->isUpdatesEnabled();
- editor()->setUpdatesEnabled( false );
-
- bool isBlock = myBlocked;
- myBlocked = true;
-
- QString txt = currentValueText();
-
- if ( myValue >= myMax )
- QSpinBox::setValue( QSpinBox::maxValue() );
- else if ( myValue <= myMin )
- QSpinBox::setValue( QSpinBox::minValue() );
- else
- QSpinBox::setValue( ( QSpinBox::minValue() + QSpinBox::maxValue() ) / 2 );
-
- QSpinBox::updateDisplay();
-
- editor()->setUpdatesEnabled( upd );
-
- editor()->setText( myCleared ? QString::null : txt );
- if ( !myCleared && editor()->hasFocus() )
- {
- if ( editor()->text() == specialValueText() )
- editor()->selectAll();
- else
- editor()->setSelection( prefix().length(), editor()->text().length() - prefix().length() - suffix().length() );
- }
- else
- editor()->setCursorPosition( 0 );
-
- myBlocked = isBlock;
-}
-
-/*!
- Sets double value by text in editor
-*/
-void QtxDblSpinBox::interpretText()
-{
- myCleared = false;
-
- bool ok = true;
- bool done = false;
- double newVal = 0;
- if ( !specialValueText().isEmpty() )
- {
- QString s = QString( text() ).stripWhiteSpace();
- QString t = QString( specialValueText() ).stripWhiteSpace();
- if ( s == t )
- {
- newVal = minValue();
- done = true;
- }
- }
- if ( !done )
- newVal = mapTextToDoubleValue( &ok );
- if ( ok )
- setValue( newVal );
- updateDisplay();
-}
-
-/*!
- Emits signal "valueChanged"
-*/
-void QtxDblSpinBox::valueChange()
-{
- updateDisplay();
- emit valueChanged( myValue );
- emit valueChanged( currentValueText() );
-}
-
-/*!
- Attune parameters on range changing
-*/
-void QtxDblSpinBox::rangeChange()
-{
- double min = QMIN( myMin, myMax );
- double max = QMAX( myMin, myMax );
- myMin = min;
- myMax = max;
- QDoubleValidator* v = ::qt_cast<QDoubleValidator*>( validator() );
- if ( v )
- v->setRange( myMin, myMax );
-
- if ( myMin == myMax )
- QSpinBox::setRange( 0, 0 );
- else
- QSpinBox::setRange( 0, 2 );
-
- setValue( myValue );
- updateDisplay();
-}
-
-/*!
- \return text of editor
-*/
-QString QtxDblSpinBox::currentValueText()
-{
- QString s;
- if ( (myValue == minValue()) && !specialValueText().isEmpty() )
- s = specialValueText();
- else
- {
- s = prefix();
- s.append( mapValueToText( myValue ) );
- s.append( suffix() );
- }
- return s;
-}
-
-/*!
- Converts number to string
- \param v - number to be converted
-*/
-QString QtxDblSpinBox::mapValueToText( double v )
-{
- QString s;
- s.setNum( v, myPrecision >= 0 ? 'f' : 'g', myPrecision == 0 ? 6 : QABS( myPrecision ) );
- return removeTrailingZeroes( s );
-}
-
-/*!
- Converts value to string
-*/
-QString QtxDblSpinBox::mapValueToText( int )
-{
- QString s;
- s.setNum( myValue, myPrecision >= 0 ? 'f' : 'g', myPrecision == 0 ? 6 : QABS( myPrecision ) );
- return removeTrailingZeroes( s );
-}
-
-/*!
- Converts current text of editor to double
-*/
-double QtxDblSpinBox::mapTextToDoubleValue( bool* ok )
-{
- QString s = text();
- double newVal = s.toDouble( ok );
- if ( !(*ok) && !( !prefix() && !suffix() ) )
- {
- s = cleanText();
- newVal = s.toDouble( ok );
- }
- return newVal;
-}
-
-/*!
- \return value corrected in accordance with borders
- \param val - value to be corrected
-*/
-double QtxDblSpinBox::bound( double val )
-{
- double newVal = val;
- if ( newVal > myMax )
- newVal = myMax;
- if ( newVal < myMin )
- newVal = myMin;
- return newVal;
-}
-
-/*!
- Custom handler for leave event
-*/
-void QtxDblSpinBox::leaveEvent( QEvent* e )
-{
- if ( !myCleared )
- QSpinBox::leaveEvent( e );
-}
-
-/*!
- Custom handler for wheel event
-*/
-void QtxDblSpinBox::wheelEvent( QWheelEvent* e )
-{
- if ( !isEnabled() )
- return;
-
- QSpinBox::wheelEvent( e );
- updateDisplay();
-}
-
-/*!
- SLOT: called if text is changed
-*/
-void QtxDblSpinBox::onTextChanged( const QString& str )
-{
- if ( !myBlocked )
- myCleared = false;
-}
-
-/*!
- \return string without excess zeros in start and in end
-*/
-QString QtxDblSpinBox::removeTrailingZeroes( const QString& src ) const
-{
- QString delim( "." );
-
- int idx = src.findRev( delim );
- if ( idx == -1 )
- return src;
-
- QString iPart = src.left( idx );
- QString fPart = src.mid( idx + 1 );
-
- while ( !fPart.isEmpty() && fPart.at( fPart.length() - 1 ) == '0' )
- fPart.remove( fPart.length() - 1, 1 );
-
- QString res = iPart;
- if ( !fPart.isEmpty() )
- res += delim + fPart;
-
- return res;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxDblSpinBox.h
-// Author: Sergey TELKOV
-
-#ifndef QTXDBLSPINBOX_H
-#define QTXDBLSPINBOX_H
-
-#include "Qtx.h"
-
-#include <qspinbox.h>
-
-/*!
- \class QtxDblSpinBox
- Spin box for real numbers.
-*/
-class QTX_EXPORT QtxDblSpinBox : public QSpinBox
-{
- Q_OBJECT
-
- class Validator;
-
-public:
- typedef enum QSpinBox::ButtonSymbols ButtonSymbols;
-
-public:
- QtxDblSpinBox( QWidget* = 0, const char* = 0 );
- QtxDblSpinBox( double, double, double = 1, QWidget* = 0, const char* = 0 );
- virtual ~QtxDblSpinBox();
-
- double minValue() const;
- double maxValue() const;
- void setMinValue( int );
- void setMaxValue( int );
- void setMinValue( double );
- void setMaxValue( double );
- void setRange( int, int );
- virtual void setRange( double, double );
-
- double lineStep() const;
- void setLineStep( int );
- virtual void setLineStep( double );
-
- double value() const;
-
- int precision() const;
- virtual void setPrecision( const int );
-
- bool isCleared() const;
- virtual void setCleared( const bool );
-
- virtual bool eventFilter( QObject*, QEvent* );
-
-signals:
- void valueChanged( double );
- void valueChanged( const QString& );
-
-public slots:
- virtual void stepUp();
- virtual void stepDown();
- virtual void selectAll();
- virtual void setValue( int );
- virtual void setValue( double );
-
-protected slots:
- virtual void onTextChanged( const QString& );
-
-protected:
- virtual void updateDisplay();
- virtual void interpretText();
-
- virtual void valueChange();
- virtual void rangeChange();
-
- QString currentValueText();
- virtual QString mapValueToText( int );
- virtual QString mapValueToText( double );
- virtual double mapTextToDoubleValue( bool* );
-
- virtual void leaveEvent( QEvent* );
- virtual void wheelEvent( QWheelEvent* );
-
- double bound( double );
-
- QString removeTrailingZeroes( const QString& ) const;
-
-private:
- double myMin;
- double myMax;
- double myStep;
- double myValue;
- bool myCleared;
- bool myBlocked;
- int myPrecision;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxDblValidator.cxx
-// Author: Alexandre SOLOVYOV
-
-#include "QtxDblValidator.h"
-
-/*!
- Constructor
- \param bot - minimal possible value
- \param top - maximal possible value
- \param dec - number of digits
- \param o - parent object
- \param name - name of validator
-*/
-QtxDblValidator::QtxDblValidator( const double bot, const double top, const int dec,
- QObject* o, const char* name )
-: QDoubleValidator( bot, top, dec, o, name )
-{
-}
-
-/*!
- Destructor
-*/
-QtxDblValidator::~QtxDblValidator()
-{
-}
-
-/*!
- Corrects string: if it represent double value less then bottom, it becomes equal to bottom,
- if it is more then top, it becomes equal to top, if it isn't number is becomes '0'
-*/
-void QtxDblValidator::fixup( QString& str ) const
-{
- bool ok = false;
- double d = str.toDouble( &ok );
- if( ok )
- {
- if( d<bottom() )
- str = QString::number( bottom() );
- else if( d>top() )
- str = QString::number( top() );
- }
- else
- str = "0";
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxDblValidator.h
-// Author: Alexandre SOLOVYOV
-
-#ifndef QTX_DOUBLE_VALIDATOR
-#define QTX_DOUBLE_VALIDATOR
-
-#include "Qtx.h"
-
-#include <qvalidator.h>
-
-class QTX_EXPORT QtxDblValidator : public QDoubleValidator
-{
- Q_OBJECT
-
-public:
- QtxDblValidator( const double, const double, const int,
- QObject*, const char* = 0 );
- ~QtxDblValidator();
-
- virtual void fixup( QString& ) const;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "QtxDirListEditor.h"
-
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include <qfiledialog.h>
-#include <qapplication.h>
-
-#define MARGIN_SIZE 11
-#define SPACING_SIZE 6
-#define SPACER_SIZE 5
-
-static const char* delete_icon[] = {
-"16 16 3 1",
-"` c #810000",
-" c none",
-"# c #ffffff",
-" ",
-" ",
-" ``# ``# ",
-" ````# ``# ",
-" ````# ``# ",
-" ```# `# ",
-" `````# ",
-" ```# ",
-" `````# ",
-" ```# ``# ",
-" ```# ``# ",
-" ```# `# ",
-" ```# `# ",
-" `# `# ",
-" ",
-" "
-};
-
-static const char* insert_icon[] = {
-"16 16 5 1",
-"` c #000000",
-". c #ffff00",
-"# c #9d9da1",
-" c none",
-"b c #ffffff",
-" ",
-" ",
-" # #b #. ",
-" # #.#.` ` ` ",
-" .#.b#### ` ",
-" ### .. ",
-" . # .# ` ",
-" #` #. ",
-" # ` ",
-" ` ",
-" ` ",
-" ` ",
-" ` ",
-" ` ` ` ` ` ` ",
-" ",
-" "
-};
-
-static const char* movedown_icon[] = {
-"16 16 2 1",
-"` c #000000",
-" c none",
-" ",
-" ",
-" ``` ",
-" ``` ",
-" ``` ",
-" ``` ",
-" ``` ",
-" ``` ",
-" ``````````` ",
-" ````````` ",
-" ``````` ",
-" ````` ",
-" ``` ",
-" ` ",
-" ",
-" "
-};
-
-static const char* moveup_icon[] = {
-"16 16 2 1",
-"` c #000000",
-" c none",
-" ",
-" ",
-" ` ",
-" ``` ",
-" ````` ",
-" ``````` ",
-" ````````` ",
-" ``````````` ",
-" ``` ",
-" ``` ",
-" ``` ",
-" ``` ",
-" ``` ",
-" ``` ",
-" ",
-" "
-};
-
-/*!
- Constructor
-*/
-QtxDirListEditor::QtxDirListEditor( QWidget* parent )
-: QWidget( parent )
-{
- myEdited = false;
- myLastSelected = 0;
- myEdit = 0;
- myBtn = 0;
-
- QGridLayout* topLayout = new QGridLayout(this);
- topLayout->setMargin(0);
- topLayout->setSpacing(0);
-
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
-
- myDirList = new QListBox(this);
- myDirList->setSelectionMode(QListBox::Single);
- myDirList->setHScrollBarMode(QListBox::AlwaysOff);
- myDirList->horizontalScrollBar()->installEventFilter(this);
- myDirList->verticalScrollBar()->installEventFilter(this);
- myDirList->insertItem(tr("<empty>"));
- myDirList->installEventFilter(this);
-
- QHBoxLayout* ctrlLayout = new QHBoxLayout;
- ctrlLayout->setMargin(0);
- ctrlLayout->setSpacing(0);
-
- // QLabel* lab = new QLabel(myDirList, tr("DIRECTORIES_LBL"), this);
-
- QToolButton* insertBtn = new QToolButton(this);
- insertBtn->setIconSet(QPixmap( insert_icon ));
- insertBtn->setAutoRaise(true);
-
- QToolButton* deleteBtn = new QToolButton(this);
- deleteBtn->setIconSet(QPixmap( delete_icon ));
- deleteBtn->setAutoRaise(true);
-
- QToolButton* upBtn = new QToolButton(this);
- upBtn->setIconSet(QPixmap( moveup_icon ));
- upBtn->setAutoRaise(true);
-
- QToolButton* downBtn = new QToolButton(this);
- downBtn->setIconSet(QPixmap( movedown_icon ));
- downBtn->setAutoRaise(true);
-
- // ctrlLayout->addWidget(lab);
- ctrlLayout->addItem(new QSpacerItem(SPACER_SIZE, SPACER_SIZE, QSizePolicy::Expanding, QSizePolicy::Minimum));
- ctrlLayout->addWidget(insertBtn);
- ctrlLayout->addWidget(deleteBtn);
- ctrlLayout->addWidget(upBtn);
- ctrlLayout->addWidget(downBtn);
-
- QHBoxLayout* btnLayout = new QHBoxLayout;
- btnLayout->setMargin(0);
- btnLayout->setSpacing(6);
-
- topLayout->addLayout(ctrlLayout, 0, 0);
- topLayout->addWidget(myDirList, 1, 0);
- topLayout->addLayout(btnLayout, 2, 0);
-
- connect(myDirList, SIGNAL(mouseButtonClicked(int, QListBoxItem*, const QPoint&)),
- this, SLOT(onMouseButtonClicked(int, QListBoxItem*, const QPoint&)));
- connect(myDirList, SIGNAL(doubleClicked(QListBoxItem*)),
- this, SLOT(onDblClicked(QListBoxItem*)));
-
- connect(insertBtn, SIGNAL(clicked()), this, SLOT(onInsert()));
- connect(deleteBtn, SIGNAL(clicked()), this, SLOT(onDelete()));
- connect(upBtn, SIGNAL(clicked()), this, SLOT(onUp()));
- connect(downBtn, SIGNAL(clicked()), this, SLOT(onDown()));
-}
-
-/*!
- Destructor
-*/
-QtxDirListEditor::~QtxDirListEditor()
-{
-}
-
-/*!
- Gets list of paths
-*/
-void QtxDirListEditor::getPathList(QStringList& list)
-{
- // Finish the path editing
- if (myEdit) {
- validate(true);
-
- myEdit->deleteLater();
- myBtn->deleteLater();
- myEdit = 0;
- myBtn = 0;
- myEdited = false;
- myDirList->setFocus();
- }
-
- list.clear();
- for (unsigned i = 0; i < myDirList->count()-1; i++)
- list.append(myDirList->text(i));
-}
-
-/*!
- Sets list of paths
-*/
-void QtxDirListEditor::setPathList(const QStringList& list) {
- myDirList->clear();
- myDirList->insertItem(tr("<empty>"));
- for (unsigned i = 0; i < list.count(); i++)
- myDirList->insertItem(list[i], myDirList->count()-1);
-}
-
-/*!
- Validates entered path, returns true if OK
-*/
-bool QtxDirListEditor::validate( const bool quietMode )
-{
- if ( myEdited )
- {
- QString dirPath = QFileInfo( myEdit->text().stripWhiteSpace() ).filePath();
-/*
-#ifndef WNT
- if ( dirPath.startsWith( "~") ) {
- dirPath = dirPath.remove(0,1);
- QString user;
- int slashPos = dirPath.find("/");
- if ( slashPos >= 0 ) {
- user = dirPath.left(slashPos);
- dirPath = dirPath.mid(slashPos);
- }
- else {
- user = dirPath;
- dirPath = "";
- }
- if ( user.isEmpty() )
- user = getenv( "USER" );
-
- struct passwd* user_data = getpwnam( user.latin1() );
- if ( user_data == NULL ) {
- // unknown user or something another error
- QMessageBox::critical(this,
- tr("Error"),
- tr("Unknown user %1").arg(user),
- tr("Ok"));
- myEdit->setFocus();
- return false;
- }
- dirPath = user_data->pw_dir + dirPath;
- }
-#endif
-*/
- QDir dir(dirPath);
- QListBoxItem* found = 0;
- for (unsigned i = 0; i < myDirList->count()-1; i++) {
- QDir aDir(myDirList->text(i));
- if ( aDir.canonicalPath().isNull() && myDirList->text(i) == dir.absPath() ||
- !aDir.canonicalPath().isNull() && aDir.exists() && aDir.canonicalPath() == dir.canonicalPath()) {
- found = myDirList->item(i);
- break;
- }
- }
- if (dirPath.isEmpty()) {
- if (found) {
- // it should be last (empty) item in the list - nothing to do
- return true;
- }
- else {
- // delete directory from the list
- removeDir(myLastSelected);
- return true;
- }
- }
- else {
- if (found) {
- if (found != myLastSelected) {
- // it is forbidden to add directory more then once
- if ( !quietMode )
- QMessageBox::critical(this,
- tr("Error"),
- tr("Directory already specified."),
- tr("Ok"));
- myEdit->setFocus();
- return false;
- }
- }
- else {
- if (!dir.exists()) {
- if ( !quietMode && QMessageBox::information(this,
- tr("Warning"),
- tr("%1\n\nThe directory doesn't exist.\nAdd directory anyway?").arg(dir.absPath()),
- tr("Yes"), tr("No"), QString::null, 1, 1) == 1) {
- myEdit->setFocus();
- return false;
- }
- }
- // append
- appendDir(myLastSelected, dir.absPath());
- }
- }
- }
- return true;
-}
-
-/*!
- Appends/changes directory
-*/
-void QtxDirListEditor::appendDir(QListBoxItem* item, const QString& dir) {
- int index = myDirList->index(item);
- if (index >= 0 && index < (int)myDirList->count()) {
- if (index == (int)myDirList->count()-1) {
- // it is the last item (new), well, insert it before the last (empty)
- myDirList->insertItem(dir, myDirList->count()-1);
- }
- else {
- // change item
- myDirList->changeItem(dir, index);
- }
- }
-}
-
-/*!
- Removes directory from list
-*/
-void QtxDirListEditor::removeDir(QListBoxItem* item) {
- // do not remove last item (empty)
- int index = myDirList->index(item);
- if (index >= 0 && index < (int)myDirList->count()-1) {
- delete item;
- myLastSelected = myDirList->item(index);
- myDirList->setSelected(myLastSelected, true);
- }
-}
-
-/*!
- Resize event
-*/
-void QtxDirListEditor::resizeEvent(QResizeEvent* event) {
- QWidget::resizeEvent(event);
- if ( myEdited ) {
- myEdit->resize(myDirList->viewport()->width()-myBtn->sizeHint().width(), myEdit->height());
- myBtn->move(myEdit->width(), myEdit->y());
- }
-}
-
-/*!
- Called when user clicks inside directories list box
-*/
-void QtxDirListEditor::onMouseButtonClicked(int button,
- QListBoxItem* item,
- const QPoint& point) {
- if (myEdited) {
- if (!validate()) {
- myDirList->setCurrentItem(myLastSelected);
- myDirList->setSelected(myLastSelected, true);
- return;
- }
- delete myEdit;
- delete myBtn;
- myEdit = 0;
- myBtn = 0;
- myEdited = false;
- myDirList->setFocus();
- }
- if (item) {
- myDirList->setCurrentItem(item);
- myDirList->setSelected(item, true);
- myDirList->ensureCurrentVisible();
- qApp->processEvents();
- if (button == LeftButton && myLastSelected == item) {
- QRect ir = myDirList->itemRect(myLastSelected);
-
- myEdit = new QLineEdit(myDirList->viewport());
- myBtn = new QToolButton(myDirList->viewport());
- myBtn->setText(" ... ");
- connect(myBtn, SIGNAL(clicked()), this, SLOT(onBtnClicked()));
- myEdit->setGeometry(0,
- ir.top()-(myEdit->sizeHint().height()-ir.height())/2,
- myDirList->viewport()->width()-myBtn->sizeHint().width(),
- myEdit->sizeHint().height());
- myBtn->setGeometry (myEdit->width(),
- ir.top()-(myEdit->sizeHint().height()-ir.height())/2,
- myBtn->sizeHint().width(),
- myEdit->sizeHint().height());
- connect(myEdit, SIGNAL(returnPressed()), this, SLOT(onEditFinished()));
- myEdited = true;
- myEdit->show();
- myBtn->show();
- if (myDirList->index(myLastSelected) != (int)myDirList->count()-1)
- myEdit->setText(myLastSelected->text());
- myEdit->selectAll();
- myEdit->setCursorPosition(myEdit->text().length());
- myEdit->installEventFilter(this);
- myEdit->setFocus();
- }
- }
- else {
- myDirList->clearSelection();
- }
- myLastSelected = item;
-}
-
-/*!
- Called when user double-clicks on any item
-*/
-void QtxDirListEditor::onDblClicked(QListBoxItem* item) {
- onMouseButtonClicked(LeftButton, item, QPoint(0,0));
-}
-
-/*!
- <...> (Browse dir) button slot
-*/
-void QtxDirListEditor::onBtnClicked() {
- QString dir = myEdit->text().stripWhiteSpace().isEmpty() ?
- QString::null :
- myEdit->text().stripWhiteSpace();
-
- dir = QFileDialog::getExistingDirectory(dir, this, 0, tr("Select directory"), true);
-
- if (!dir.isEmpty()) {
- myEdit->setText(dir);
- myEdit->selectAll();
- myEdit->setCursorPosition(myEdit->text().length());
- }
-}
-
-/*!
- Called when user finises editing of path by pressing <Enter>
-*/
-void QtxDirListEditor::onEditFinished() {
- if (myEdit) {
- if (!validate()) {
- myDirList->setCurrentItem(myLastSelected);
- myDirList->setSelected(myLastSelected, true);
- return;
- }
- myEdit->deleteLater();
- myBtn->deleteLater();
- myEdit = 0;
- myBtn = 0;
- myEdited = false;
- myDirList->setFocus();
- }
-}
-
-/*!
- Event filter
-*/
-bool QtxDirListEditor::eventFilter(QObject* object, QEvent* event) {
- if ( myEdited ) {
- if (event->type() == QEvent::MouseButtonPress || event->type() == QEvent::MouseButtonDblClick) {
- if (object == myDirList->horizontalScrollBar() || object == myDirList->verticalScrollBar()) {
- if (!validate()) {
- myDirList->setCurrentItem(myLastSelected);
- myDirList->setSelected(myLastSelected, true);
- return true;
- }
- delete myEdit;
- delete myBtn;
- myEdit = 0;
- myBtn = 0;
- myEdited = false;
- myDirList->setFocus();
- }
- }
- else if (event->type() == QEvent::KeyPress) {
- QKeyEvent* ke = (QKeyEvent*)event;
- if (ke->key() == Key_Tab)
- return true;
- if (object == myDirList) {
- return true;
- }
- else if (object == myEdit) {
- if ( ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_PageUp || ke->key() == Key_PageDown ||
- ( ke->key() == Key_Home || ke->key() == Key_End || ke->key() == Key_Prior || ke->key() == Key_Next ) &&
- (ke->state() & ControlButton) ) {
- return true;
- }
- else if ( ke->key() == Key_Escape ) {
- delete myEdit;
- delete myBtn;
- myEdit = 0;
- myBtn = 0;
- myEdited = false;
- myDirList->setFocus();
- return true;
- }
- }
- }
- }
- return QWidget::eventFilter(object, event);
-}
-
-/*!
- <Insert> button slot
-*/
-void QtxDirListEditor::onInsert() {
- if (!myEdited) {
- myLastSelected = 0;
- onMouseButtonClicked(LeftButton, myDirList->item(myDirList->count()-1), QPoint(0,0));
- onMouseButtonClicked(LeftButton, myDirList->item(myDirList->count()-1), QPoint(0,0));
- }
-}
-
-/*!
- <Delete> button slot
-*/
-void QtxDirListEditor::onDelete() {
- if (!myEdited && myDirList->currentItem() >=0) {
- removeDir(myDirList->item(myDirList->currentItem()));
- myDirList->setFocus();
- }
-}
-
-/*!
- <Move up> button slot
-*/
-void QtxDirListEditor::onUp() {
- if (!myEdited && myLastSelected) {
- int index = myDirList->currentItem();
- if (index > 0 && index < (int)myDirList->count()-1 && myDirList->isSelected(index)) {
- QString t = myDirList->text(index-1);
- myDirList->changeItem(myDirList->text(index), index-1);
- myDirList->changeItem(t, index);
- myDirList->setCurrentItem(index-1);
- myLastSelected = myDirList->item(index-1);
- myDirList->setSelected(myLastSelected, true);
- myDirList->setFocus();
- }
- }
-}
-
-/*!
- <Move down> button slot
-*/
-void QtxDirListEditor::onDown() {
- if (!myEdited && myLastSelected) {
- int index = myDirList->currentItem();
- if (index >= 0 && index < (int)myDirList->count()-2 && myDirList->isSelected(index)) {
- QString t = myDirList->text(index+1);
- myDirList->changeItem(myDirList->text(index), index+1);
- myDirList->changeItem(t, index);
- myDirList->setCurrentItem(index+1);
- myLastSelected = myDirList->item(index+1);
- myDirList->setSelected(myLastSelected, true);
- myDirList->setFocus();
- }
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 QTX_DIRLISTEDITOR_H
-#define QTX_DIRLISTEDITOR_H
-
-#include "Qtx.h"
-
-#include <qwidget.h>
-#include <qtoolbutton.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qcombobox.h>
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- * \brief The GUI implementation of the directory list
- */
-class QTX_EXPORT QtxDirListEditor : public QWidget {
-
- Q_OBJECT
-
-public:
-
- /*!
- * \brief Constructor
- * \param parent - the parent of the widget
- */
- QtxDirListEditor(QWidget* parent);
-
- /*!
- * \brief Destructor
- */
- ~QtxDirListEditor();
-
- /*!
- * \brief Gets list of paths
- * \param list - the returned reference to the list of paths
- */
- void getPathList(QStringList& list);
-
- /*!
- * \brief Sets list of paths
- * \param list - the list of paths to set
- */
- void setPathList(const QStringList& list);
-
- /*!
- * \brief Event filter, redefined from QObject class
- */
- bool eventFilter(QObject* object, QEvent* event);
-
-protected:
-
- /*!
- * \brief Validates entered path
- * \retval bool - returns status (true if OK)
- */
- bool validate( const bool quietMode = false );
-
- /*!
- * \brief Appends/changes path
- * \param item - the item in QListBox
- * \param dir - the path
- */
- void appendDir(QListBoxItem* item, const QString& dir);
-
- /*!
- * \brief Removes directory from list
- * \param item - the item in QListBox
- */
- void removeDir(QListBoxItem* item);
-
- /*!
- * \brief Resize event handler, reimplemented from QWidget
- * \param event - the resize event
- */
- void resizeEvent(QResizeEvent* event);
-
-protected slots:
-
- /*!
- * \brief Called when user clicks inside directories list box
- */
- void onMouseButtonClicked(int, QListBoxItem*, const QPoint&);
-
- /*!
- * \brief Called when user double-clicks on any item
- */
- void onDblClicked(QListBoxItem*);
-
- /*!
- * \brief <...> (Browse dir) button slot
- */
- void onBtnClicked();
-
- /*!
- * \brief Ccalled when user finises editing of path by pressing <Enter>
- */
- void onEditFinished();
-
- /*!
- * \brief <Insert> button slot
- */
- void onInsert();
-
- /*!
- * \brief <Delete> button slot
- */
- void onDelete();
-
- /*!
- * \brief <Move up> button slot
- */
- void onUp();
-
- /*!
- * \brief <Move down> button slot
- */
- void onDown();
-
-private:
- QListBox* myDirList; //!< directory list
- QLineEdit* myEdit; //!< path edit box
- QToolButton* myBtn; //!< browse pah button
- bool myEdited; //!< edit mode flag
- QListBoxItem* myLastSelected; //!< last selected row
-
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxDockWindow.cxx
-// Author: Sergey TELKOV
-
-#include "QtxDockWindow.h"
-
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qdockarea.h>
-#include <qmainwindow.h>
-#include <qapplication.h>
-
-/*!
- \class QtxDockWindow::Watcher [Internal]
- Internal object with event filter.
-*/
-class QtxDockWindow::Watcher : public QObject
-{
-public:
- Watcher( QtxDockWindow* );
-
- void shown( QtxDockWindow* );
- void hided( QtxDockWindow* );
-
- virtual bool eventFilter( QObject*, QEvent* );
-
-protected:
- virtual void customEvent( QCustomEvent* );
-
-private:
- void installFilters();
-
- void showContainer();
- void hideContainer();
-
- void updateIcon();
- void updateCaption();
- void updateVisibility();
-
-private:
- QtxDockWindow* myCont;
- bool myState;
- bool myEmpty;
- bool myVisible;
-};
-
-/*!
- Constructor
-*/
-QtxDockWindow::Watcher::Watcher( QtxDockWindow* cont )
-: QObject( cont ), myCont( cont ),
-myState( true ),
-myEmpty( true )
-{
- if ( myCont->mainWindow() )
- myState = myCont->mainWindow()->appropriate( myCont );
-
- myCont->installEventFilter( this );
- myVisible = myCont->isVisibleTo( myCont->parentWidget() );
-
- installFilters();
-}
-
-/*!
- Custom event filter
-*/
-bool QtxDockWindow::Watcher::eventFilter( QObject* o, QEvent* e )
-{
- if ( o == myCont &&
- ( e->type() == QEvent::Show || e->type() == QEvent::ShowToParent ||
- e->type() == QEvent::Hide || e->type() == QEvent::HideToParent ||
- e->type() == QEvent::ChildInserted ) )
- QApplication::postEvent( this, new QCustomEvent( QEvent::User ) );
-
- if ( o != myCont && e->type() == QEvent::IconChange )
- updateIcon();
-
- if ( o != myCont && e->type() == QEvent::CaptionChange )
- updateCaption();
-
- if ( ( o != myCont && ( e->type() == QEvent::Hide || e->type() == QEvent::HideToParent ) ) ||
- ( o == myCont && ( e->type() == QEvent::ChildRemoved ) ) ||
- ( e->type() == QEvent::Show || e->type() == QEvent::ShowToParent ) )
- updateVisibility();
-
- return false;
-}
-
-/*!
- Sets internal status to shown
-*/
-void QtxDockWindow::Watcher::shown( QtxDockWindow* dw )
-{
- if ( dw != myCont )
- return;
-
- myVisible = true;
-}
-
-/*!
- Sets internal status to hidden
-*/
-void QtxDockWindow::Watcher::hided( QtxDockWindow* dw )
-{
- if ( dw != myCont )
- return;
-
- myVisible = false;
-}
-
-/*!
- Shows corresponding dock window
-*/
-void QtxDockWindow::Watcher::showContainer()
-{
- if ( !myCont )
- return;
-
- QtxDockWindow* cont = myCont;
- myCont = 0;
- cont->show();
- myCont = cont;
-}
-
-/*!
- Hides corresponding dock window
-*/
-void QtxDockWindow::Watcher::hideContainer()
-{
- if ( !myCont )
- return;
-
- QtxDockWindow* cont = myCont;
- myCont = 0;
- cont->hide();
- myCont = cont;
-}
-
-/*!
- Event filter of custom events
-*/
-void QtxDockWindow::Watcher::customEvent( QCustomEvent* e )
-{
- installFilters();
-
- updateIcon();
- updateCaption();
- updateVisibility();
-}
-
-/*!
- Installs this object as event filter to all widgets inside corresponding main window
-*/
-void QtxDockWindow::Watcher::installFilters()
-{
- if ( !myCont )
- return;
-
- QBoxLayout* bl = myCont->boxLayout();
- if ( !bl )
- return;
-
- for ( QLayoutIterator it = bl->iterator(); it.current(); ++it )
- {
- if ( it.current()->widget() )
- it.current()->widget()->installEventFilter( this );
- }
-}
-
-/*!
- Updates visibility of all widgets inside corresponding main window
-*/
-void QtxDockWindow::Watcher::updateVisibility()
-{
- if ( !myCont )
- return;
-
- QBoxLayout* bl = myCont->boxLayout();
- if ( !bl )
- return;
-
- bool vis = false;
- for ( QLayoutIterator it = bl->iterator(); it.current() && !vis; ++it )
- vis = it.current()->widget() && it.current()->widget()->isVisibleTo( myCont );
-
- QMainWindow* mw = myCont->mainWindow();
- if ( mw && myEmpty == vis )
- {
- myEmpty = !vis;
- if ( !myEmpty )
- mw->setAppropriate( myCont, myState );
- else
- {
- myState = mw->appropriate( myCont );
- mw->setAppropriate( myCont, false );
- }
- }
-
- vis = !myEmpty && myVisible;
- if ( vis != myCont->isVisibleTo( myCont->parentWidget() ) )
- vis ? showContainer() : hideContainer();
-}
-
-/*!
- Updates icon of corresponding main window
-*/
-void QtxDockWindow::Watcher::updateIcon()
-{
- if ( !myCont || !myCont->widget() )
- return;
-
- const QPixmap* ico = myCont->widget()->icon();
- myCont->setIcon( ico ? *ico : QPixmap() );
-}
-
-/*!
- Updates caption of corresponding main window
-*/
-void QtxDockWindow::Watcher::updateCaption()
-{
- if ( myCont && myCont->widget() && !myCont->widget()->caption().isNull() )
- myCont->setCaption( myCont->widget()->caption() );
-}
-
-/*!
- Constructor
-*/
-QtxDockWindow::QtxDockWindow( Place p, QWidget* parent, const char* name, WFlags f )
-: QDockWindow( p, parent, name, f ),
-myWatcher( 0 ),
-myStretch( false )
-{
-}
-
-/*!
- Constructor
-*/
-QtxDockWindow::QtxDockWindow( const bool watch, QWidget* parent, const char* name, WFlags f )
-: QDockWindow( InDock, parent, name, f ),
-myWatcher( 0 ),
-myStretch( false )
-{
- if ( watch )
- myWatcher = new Watcher( this );
-}
-
-/*!
- Constructor
-*/
-QtxDockWindow::QtxDockWindow( QWidget* parent, const char* name, WFlags f )
-: QDockWindow( InDock, parent, name, f ),
-myWatcher( 0 ),
-myStretch( false )
-{
-}
-
-/*!
- Destructor
-*/
-QtxDockWindow::~QtxDockWindow()
-{
-}
-
-/*!
- Sets the dock window's main widget
- \param wid - new main widget
-*/
-void QtxDockWindow::setWidget( QWidget* wid )
-{
- if ( wid )
- {
- if ( wid->parentWidget() != this )
- wid->reparent( this, QPoint( 0, 0 ), wid->isVisibleTo( wid->parentWidget() ) );
- if ( myWatcher )
- {
- setCaption( wid->caption() );
- if ( wid->icon() )
- setIcon( *wid->icon() );
- }
- }
-
- QDockWindow::setWidget( wid );
-}
-
-/*!
- \return true if the dock window is stretchable
-*/
-bool QtxDockWindow::isStretchable() const
-{
- return myStretch;
-}
-
-/*!
- Sets the dock window "stretchable" state
- \param on - new state
-*/
-void QtxDockWindow::setStretchable( const bool on )
-{
- if ( myStretch == on )
- return;
-
- myStretch = on;
-
- boxLayout()->setStretchFactor( widget(), myStretch ? 1 : 0 );
-
- if ( myStretch != isHorizontalStretchable() ||
- myStretch != isVerticalStretchable() )
- {
- if ( orientation() == Horizontal )
- setHorizontalStretchable( myStretch );
- else
- setVerticalStretchable( myStretch );
- }
-}
-
-/*!
- \return the recommended size for the widget
-*/
-QSize QtxDockWindow::sizeHint() const
-{
- QSize sz = QDockWindow::sizeHint();
-
- if ( place() == InDock && isStretchable() && area() )
- {
- if ( orientation() == Horizontal )
- sz.setWidth( area()->width() );
- else
- sz.setHeight( area()->height() );
- }
-
- return sz;
-}
-
-/*!
- \return the recommended minimum size for the widget
-*/
-QSize QtxDockWindow::minimumSizeHint() const
-{
- QSize sz = QDockWindow::minimumSizeHint();
-
- if ( orientation() == Horizontal )
- sz = QSize( 0, QDockWindow::minimumSizeHint().height() );
- else
- sz = QSize( QDockWindow::minimumSizeHint().width(), 0 );
-
- if ( place() == InDock && isStretchable() && area() )
- {
- if ( orientation() == Horizontal )
- sz.setWidth( area()->width() );
- else
- sz.setHeight( area()->height() );
- }
-
- return sz;
-}
-
-/*!
- \return corresponding main window
-*/
-QMainWindow* QtxDockWindow::mainWindow() const
-{
- QMainWindow* mw = 0;
-
- QWidget* wid = parentWidget();
- while ( !mw && wid )
- {
- if ( wid->inherits( "QMainWindow" ) )
- mw = (QMainWindow*)wid;
- wid = wid->parentWidget();
- }
-
- return mw;
-}
-
-/*!
- Shows window
-*/
-void QtxDockWindow::show()
-{
- if ( myWatcher )
- myWatcher->shown( this );
-
- QDockWindow::show();
-}
-
-/*!
- Hides window
-*/
-void QtxDockWindow::hide()
-{
- if ( myWatcher )
- myWatcher->hided( this );
-
- QDockWindow::hide();
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxDockWindow.h
-// Author: Sergey TELKOV
-
-#include "Qtx.h"
-
-#include <qdockwindow.h>
-
-class QTX_EXPORT QtxDockWindow : public QDockWindow
-{
- Q_OBJECT
-
- class Watcher;
-
-public:
- QtxDockWindow( Place = InDock, QWidget* = 0, const char* = 0, WFlags = 0 );
- QtxDockWindow( const bool, QWidget*, const char* = 0, WFlags = 0 );
- QtxDockWindow( QWidget*, const char* = 0, WFlags = 0 );
- virtual ~QtxDockWindow();
-
- virtual void setWidget( QWidget* );
-
- bool isStretchable() const;
- virtual void setStretchable( const bool );
-
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
-
- QMainWindow* mainWindow() const;
-
-public slots:
- virtual void show();
- virtual void hide();
-
-private:
- Watcher* myWatcher;
- bool myStretch;
-};
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxListBox.cxx
-// Author: Sergey TELKOV
-
-#include "QtxListBox.h"
-
-#include <qpixmap.h>
-#include <qlineedit.h>
-
-/*!
- Constructor
-*/
-QtxListBox::QtxListBox( QWidget* parent, const char* name, WFlags f )
-: QListBox( parent, name, f ),
-myEditor( 0 ),
-myEditIndex( -1 ),
-myEditState( false ),
-myEditDefault( true ),
-myModifEnabled( true )
-{
- connect( this, SIGNAL( contentsMoving( int, int ) ),
- this, SLOT( onContentsMoving( int, int ) ) );
-}
-
-/*!
- Destructor
-*/
-QtxListBox::~QtxListBox()
-{
-}
-
-/*!
- \return true if editing is enabled
-*/
-bool QtxListBox::isEditEnabled() const
-{
- return myEditState;
-}
-
-/*!
- Enables/disables editing
- \param on - new state
-*/
-void QtxListBox::setEditEnabled( bool on )
-{
- if ( isEditEnabled() == on )
- return;
-
- myEditState = on;
-
- if ( !isEditEnabled() )
- endEdition( defaultEditAction() );
-}
-
-/*!
- \return default edit action
- \sa setDefaultEditAction()
-*/
-bool QtxListBox::defaultEditAction() const
-{
- return myEditDefault;
-}
-
-/*!
- Changes default edit action.
- Pressing of ENTER button always accepts new value of edited item.
- But other ways, such as focus out or edition of other item accepts
- new value of edited item only if "default edit action" is true
- \param def - new value
-*/
-void QtxListBox::setDefaultEditAction( bool def )
-{
- myEditDefault = def;
-}
-
-/*!
- \return modification enabled state
- \sa setModificationEnabled()
-*/
-bool QtxListBox::isModificationEnabled() const
-{
- return myModifEnabled;
-}
-
-/*!
- Changes "modification enabled" state
- If it is true, then pressing of CTRL + { Up, Down, Home, End } allows move items in list
- \param on - new state
-*/
-void QtxListBox::setModificationEnabled( bool on )
-{
- myModifEnabled = on;
-}
-
-/*!
- \return current edited item
-*/
-QListBoxItem* QtxListBox::editedItem() const
-{
- return item( editedIndex() );
-}
-
-/*!
- \return current edited index
-*/
-int QtxListBox::editedIndex() const
-{
- return myEditIndex;
-}
-
-/*!
- Starts edition of item
- \param idx - index of item
-*/
-void QtxListBox::startEdition( const int idx )
-{
- if ( idx < 0 || editedIndex() == idx || !isEditEnabled() )
- return;
-
- QLineEdit* ed = editor();
- if ( !ed )
- return;
-
- endEdition( defaultEditAction() );
-
- myEditIndex = idx;
-
- ensureItemVisible( myEditIndex );
-
- ed->setText( text( myEditIndex ) );
- updateEditor();
- ed->show();
-
- ed->setFocus();
-}
-
-/*!
- Starts edition of item
- \param item - item to be edited
-*/
-void QtxListBox::startEdition( const QListBoxItem* item )
-{
- startEdition( index( item ) );
-}
-
-/*!
- Finishes edition of item
- \param action - if it is true, then new values must be accepted
-*/
-void QtxListBox::endEdition( const bool action )
-{
- int idx = editedIndex();
- QLineEdit* ed = editor();
-
- if ( idx < 0 || !ed )
- return;
-
- myEditIndex = -1;
-
- ed->hide();
-
- if ( action )
- {
- int cur = currentItem();
-
- if ( pixmap( idx ) )
- changeItem( *pixmap( idx ), ed->text(), idx );
- else
- changeItem( ed->text(), idx );
-
- setCurrentItem( cur );
-
- emit itemEdited( idx );
- emit itemEdited( item( idx ) );
- }
-}
-
-/*!
- Ensures that the item is visible.
- \param idx - index of item
-*/
-void QtxListBox::ensureItemVisible( const int idx )
-{
- if ( idx < 0 )
- return;
-
- if ( itemVisible( idx ) )
- return;
-
- setTopItem( idx );
-}
-
-/*!
- Ensures that the item is visible.
- \param item - item to be made visible
-*/
-void QtxListBox::ensureItemVisible( const QListBoxItem* item )
-{
- ensureItemVisible( index( item ) );
-}
-
-/*!
- \return validator of item editor
-*/
-const QValidator* QtxListBox::validator() const
-{
- const QValidator* v = 0;
- if ( editor() )
- v = editor()->validator();
- return v;
-}
-
-/*!
- Removes validator of item editor
-*/
-void QtxListBox::clearValidator()
-{
- if ( editor() )
- editor()->clearValidator();
-}
-
-/*!
- Changes validator of item editor
- \param v - new validator
-*/
-void QtxListBox::setValidator( const QValidator* v )
-{
- if ( editor() )
- editor()->setValidator( v );
-}
-
-/*!
- Moves item to top
- \param idx - index of item
-*/
-void QtxListBox::moveItemToTop( const int idx )
-{
- moveItem( idx, -idx );
-}
-
-/*!
- Moves item to bottom
- \param idx - index of item
-*/
-void QtxListBox::moveItemToBottom( const int idx )
-{
- moveItem( idx, count() - idx );
-}
-
-/*!
- Moves item
- \param idx - index of item
- \param step - changing of position
-*/
-void QtxListBox::moveItem( const int idx, const int step )
-{
- QListBoxItem* i = item( idx );
- if ( !i || step == 0 )
- return;
-
- QListBoxItem* cur = item( currentItem() );
-
- takeItem( i );
- insertItem( i, QMAX( 0, idx + step ) );
-
- setCurrentItem( index( cur ) );
-
- int pos = index( i );
- if ( myEditIndex == idx )
- myEditIndex = pos;
-
- updateEditor();
-
- if ( idx != pos )
- emit itemMoved( idx, pos );
-}
-
-/*!
- Inserts empty item
- \param i - position of item (if it is less than 0, then current position is used)
-*/
-void QtxListBox::createItem( const int i )
-{
- if ( !isEditEnabled() )
- return;
-
- int idx = i < 0 ? currentItem() : i;
- idx = idx < 0 ? count() : idx;
- idx = QMIN( (int)count(), idx );
-
- insertItem( "", idx );
- setCurrentItem( idx );
- startEdition( idx );
-}
-
-/*!
- Removes item
- \param i - position of item (if it is less than 0, then current position is used)
-*/
-void QtxListBox::deleteItem( const int i )
-{
- if ( !isEditEnabled() )
- return;
-
- int idx = i < 0 ? currentItem() : i;
- if ( idx < 0 )
- return;
-
- if ( editedIndex() == idx )
- endEdition( defaultEditAction() );
-
- removeItem( idx );
- updateEditor();
-}
-
-/*!
- Scrolls the content so that the point is in the top-left corner.
- \param x, y - point co-ordinates
-*/
-void QtxListBox::setContentsPos( int x, int y )
-{
- QListBox::setContentsPos( x, y );
-
- updateEditor();
-}
-
-/*!
- Custom event filter, performs finish of edition on focus out, escape/return/enter pressing
-*/
-bool QtxListBox::eventFilter( QObject* o, QEvent* e )
-{
- if ( editor() == o )
- {
- if ( e->type() == QEvent::FocusOut )
- endEdition( defaultEditAction() );
-
- if ( e->type() == QEvent::KeyPress )
- {
- QKeyEvent* ke = (QKeyEvent*)e;
- if ( ke->key() == Key_Escape )
- endEdition( false );
- else if ( ke->key() == Key_Enter || ke->key() == Key_Return )
- endEdition( true );
- }
- }
-
- return QListBox::eventFilter( o, e );
-}
-
-/*!
- Custom key press event handler
- Allows to move items by CTRL + { Up, Down, Home, End }
-*/
-void QtxListBox::keyPressEvent( QKeyEvent* e )
-{
- if ( e->key() == Key_Up && e->state() & ControlButton && isModificationEnabled() )
- moveItem( currentItem(), -1 );
- else if ( e->key() == Key_Down && e->state() & ControlButton && isModificationEnabled() )
- moveItem( currentItem(), 1 );
- else if ( e->key() == Key_Home && e->state() & ControlButton && isModificationEnabled() )
- moveItemToTop( currentItem() );
- else if ( e->key() == Key_End && e->state() & ControlButton && isModificationEnabled() )
- moveItemToBottom( currentItem() );
- else if ( e->key() == Key_Insert && e->state() & ControlButton )
- createItem( currentItem() );
- else if ( e->key() == Key_Delete && e->state() & ControlButton )
- deleteItem( currentItem() );
- else
- QListBox::keyPressEvent( e );
-}
-
-/*!
- Custom resize event handler
-*/
-void QtxListBox::viewportResizeEvent( QResizeEvent* e )
-{
- QListBox::viewportResizeEvent( e );
-
- updateEditor();
-}
-
-/*!
- Custom mouse double click event handler
-*/
-void QtxListBox::mouseDoubleClickEvent( QMouseEvent* e )
-{
- if ( isEditEnabled() )
- startEdition( itemAt( e->pos() ) );
- else
- QListBox::mouseDoubleClickEvent( e );
-}
-
-/*!
- Updates editor on contents moving
-*/
-void QtxListBox::onContentsMoving( int, int )
-{
- updateEditor();
-}
-
-/*!
- \return item editor
-*/
-QLineEdit* QtxListBox::editor() const
-{
- if ( !myEditor )
- {
- QtxListBox* that = (QtxListBox*)this;
- that->createEditor();
- }
- return myEditor;
-}
-
-/*!
- Creates item editor
-*/
-void QtxListBox::createEditor()
-{
- if ( myEditor )
- return;
-
- myEditor = new QLineEdit( viewport() );
-
- myEditor->setLineWidth( 1 );
- myEditor->setMidLineWidth( 0 );
- myEditor->setFrameStyle( QFrame::Box | QFrame::Plain );
- myEditor->installEventFilter( this );
-
- myEditor->hide();
-
- addChild( myEditor );
-}
-
-/*!
- Updates item editor
-*/
-void QtxListBox::updateEditor()
-{
- if ( !editedItem() || !editor() )
- return;
-
- QRect r = itemRect( editedItem() );
- if ( !r.isValid() )
- return;
-
- int m = editor()->lineWidth();
- r.addCoords( m, 0, 0, 0 );
-
- const QPixmap* pix = pixmap( editedIndex() );
- if ( pix )
- r.addCoords( pix->width() + 2, 0, 0, 0 );
-
- editor()->setGeometry( r );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxListBox.h
-// Author: Sergey TELKOV
-
-#ifndef QTXLISTBOX_H
-#define QTXLISTBOX_H
-
-#include "Qtx.h"
-
-#include <qlistbox.h>
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-class QLineEdit;
-class QValidator;
-
-class QTX_EXPORT QtxListBox : public QListBox
-{
- Q_OBJECT
-
-public:
- QtxListBox( QWidget* = 0, const char* = 0, WFlags = 0 );
- virtual ~QtxListBox();
-
- bool isEditEnabled() const;
- bool defaultEditAction() const;
- bool isModificationEnabled() const;
-
- QListBoxItem* editedItem() const;
- int editedIndex() const;
-
- void startEdition( const int );
- void startEdition( const QListBoxItem* );
- void endEdition( const bool );
-
- void ensureItemVisible( const int );
- void ensureItemVisible( const QListBoxItem* );
-
- virtual bool eventFilter( QObject*, QEvent* );
-
- const QValidator* validator() const;
-
- void moveItemToTop( const int );
- void moveItemToBottom( const int );
- void moveItem( const int, const int );
-
- void createItem( const int = -1 );
- void deleteItem( const int = -1 );
-
-signals:
- void itemEdited( int );
- void itemEdited( QListBoxItem* );
- void itemMoved( int, int );
-
-public slots:
- virtual void setEditEnabled( bool );
- virtual void setDefaultEditAction( bool );
- virtual void setModificationEnabled( bool );
-
- virtual void clearValidator();
- virtual void setValidator( const QValidator* );
- virtual void setContentsPos( int, int );
-
-private slots:
- void onContentsMoving( int, int );
-
-protected:
- virtual void keyPressEvent( QKeyEvent* );
- virtual void viewportResizeEvent( QResizeEvent* );
- virtual void mouseDoubleClickEvent( QMouseEvent* );
-
-private:
- QLineEdit* editor() const;
- void createEditor();
- void updateEditor();
-
-private:
- QLineEdit* myEditor;
- int myEditIndex;
- bool myEditState;
- bool myEditDefault;
- bool myModifEnabled;
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "QtxListOfOperations.h"
-#include <stdarg.h>
-
-/*!
- Constructor
-*/
-QtxListOfOperations::QtxListOfOperations()
-{
-}
-
-/*!
- Destructor
-*/
-QtxListOfOperations::~QtxListOfOperations()
-{
-}
-
-/*!
- \return fills list with brackets symbols
- \param list - list to be filled
- \param open - if it is true, it is necessary to fill with open brackets otherwise with close
-*/
-void QtxListOfOperations::bracketsList( QStringList& list, bool open ) const
-{
- OperationSetsIterator anIt = mySets.begin(),
- aLast = mySets.end();
- QStringList custom;
- for( ; anIt!=aLast; anIt++ )
- {
- custom.clear();
- (*anIt).myOperations->bracketsList( custom, open );
- QStringList::const_iterator aSIt = custom.begin(),
- aSLast = custom.end();
- for( ; aSIt!=aSLast; aSIt++ )
- if( list.contains( *aSIt )==0 )
- list.append( *aSIt );
- }
-}
-
-/*!
- Fills list with operation names
-*/
-void QtxListOfOperations::opersList( QStringList& list ) const
-{
- OperationSetsIterator anIt = mySets.begin(),
- aLast = mySets.end();
- QStringList custom;
- for( ; anIt!=aLast; anIt++ )
- {
- custom.clear();
- (*anIt).myOperations->opersList( custom );
- QStringList::const_iterator aSIt = custom.begin(),
- aSLast = custom.end();
- for( ; aSIt!=aSLast; aSIt++ )
- if( list.contains( *aSIt )==0 )
- list.append( *aSIt );
- }
-}
-
-/*!
- Create some value by it's string representation
-*/
-bool QtxListOfOperations::createValue( const QString& str, QtxValue& val ) const
-{
- bool ok;
- OperationSetsIterator anIt = mySets.begin(),
- aLast = mySets.end();
- for( ; anIt!=aLast; anIt++ )
- {
- ok = (*anIt).myOperations->createValue( str, val );
- if( ok )
- break;
- }
- return ok;
-}
-
-/*!
- \return priority of operation
-*/
-int QtxListOfOperations::prior( const QString& op, bool isBin ) const
-{
- OperationSetsIterator anIt = mySets.begin(),
- aLast = mySets.end();
- int prior = 0;
- for( ; anIt!=aLast; anIt++ )
- {
- prior = (*anIt).myOperations->prior( op, isBin );
- if( prior>0 )
- {
- prior+=(*anIt).myAddPrior;
- break;
- }
- }
- return prior>0 ? prior : 0;
-}
-
-/*!
- \return whether values with passed types are valid for arguments of operation
- \param op - name of operation
- \param t1 - type of first argument
- \param t2 - type of second argument
-*/
-QtxParser::Error QtxListOfOperations::isValid( const QString& op,
- const QVariant::Type t1,
- const QVariant::Type t2 ) const
-{
- OperationSetsIterator anIt = mySets.begin(),
- aLast = mySets.end();
- QtxParser::Error err = QtxParser::OK;
- for( ; anIt!=aLast; anIt++ )
- {
- err = (*anIt).myOperations->isValid( op, t1, t2 );
- if( err==QtxParser::OK )
- break;
- }
- return err;
-}
-
-/*!
- Calculates result of operation
- \return one of error states
- \param op - name of operation
- \param v1 - first operation argument (must be used also to store result)
- \param v2 - second operation argument
-*/
-QtxParser::Error QtxListOfOperations::calculate( const QString& op,
- QtxValue& v1,
- QtxValue& v2 ) const
-{
- const char* deb = op.latin1();
-
- OperationSetsIterator anIt = mySets.begin(),
- aLast = mySets.end();
- QtxValue nv1, nv2;
- for( ; anIt!=aLast; anIt++ )
- {
- nv1 = v1;
- nv2 = v2;
- if( (*anIt).myOperations->isValid( op, v1.type(), v2.type() ) == QtxParser::OK )
- {
- QtxParser::Error err = (*anIt).myOperations->calculate( op, nv1, nv2 );
- if( err==QtxParser::OK || err==QtxParser::InvalidResult )
- {
- QString oop = (*anIt).myName;
- const char* ooo = oop.latin1();
- v1 = nv1; v2 = nv2;
- return err;
- }
- }
- }
- return QtxParser::InvalidOperation;
-}
-
-/*!
- Clears list of operations
-*/
-void QtxListOfOperations::clear()
-{
- mySets.clear();
-}
-
-/*!
- \return true if list contains operations
- \param name - name of operation
-*/
-bool QtxListOfOperations::has( const QString& name ) const
-{
- OperationSetsIterator anIt = mySets.begin(),
- aLast = mySets.end();
- for( ; anIt!=aLast; anIt++ )
- if( (*anIt).myName == name )
- return true;
- return false;
-}
-
-/*!
- Appends operations to list
- \param name - name of operations
- \param oper - operations
- \param prior - additional prior
-*/
-void QtxListOfOperations::append( const QString& name, QtxOperations* oper,
- int prior )
-{
- insert( name, oper, prior );
-}
-
-/*!
- Prepends operations to list
- \param name - name of operations
- \param oper - operations
- \param prior - additional prior
-*/
-void QtxListOfOperations::prepend( const QString& name, QtxOperations* oper,
- int prior )
-{
- insert( name, oper, prior, 0 );
-}
-
-/*!
- Inserts operations to list
- \param name - name of operations
- \param oper - operations
- \param prior - additional prior
- \param pos - insert position
-*/
-void QtxListOfOperations::insert( const QString& name, QtxOperations* oper,
- int prior, int pos )
-{
- if( has( name ) || oper==NULL || prior<0 )
- return;
-
- OperationSet op;
- op.myName = name;
- op.myOperations = oper;
- op.myAddPrior = prior;
- if( pos<0 )
- mySets.append( op );
- else
- mySets.insert( mySets.at( pos ), op );
-}
-
-/*!
- Removes operations from list
- \param name - name of operations
-*/
-void QtxListOfOperations::remove( const QString& name )
-{
- OperationSets::iterator anIt = mySets.begin(),
- aLast = mySets.end();
- for( ; anIt!=aLast; anIt++ )
- if( (*anIt).myName == name )
- {
- mySets.erase( anIt );
- break;
- }
-}
-
-/*!
- \return count of operations in list
-*/
-int QtxListOfOperations::count() const
-{
- return mySets.count();
-}
-
-/*!
- \return operations by name
- \name - name of operations
-*/
-QtxOperations* QtxListOfOperations::operations( const QString& name ) const
-{
- OperationSetsIterator anIt = mySets.begin(),
- aLast = mySets.end();
- for( ; anIt!=aLast; anIt++ )
- if( (*anIt).myName == name )
- return (*anIt).myOperations;
- return NULL;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxListOfOperations.h
-// Author: Alexander SOLOVYOV
-
-#ifndef __QTX_LIST_OF_OPERATIONS_HEADER__
-#define __QTX_LIST_OF_OPERATIONS_HEADER__
-
-#include "Qtx.h"
-#include "QtxOperations.h"
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-
-/*!
- Class: QtxListOfOperations
-
- This class provides special variant of QtxOperations. It contains list of QtxOperations* with
- fixed order. When it is necessary to calculate operation or get it's priority, this operation is
- being found starting from first item. It makes possible to create unions of operations. Every QtxOperations*
- has priority, which is added to priority of operation, so that it makes possible to increase priority of
- whole group of operations
-*/
-class QTX_EXPORT QtxListOfOperations : public QtxOperations
-{
-public:
- QtxListOfOperations();
- virtual ~QtxListOfOperations();
-
- virtual void opersList( QStringList& ) const;
- virtual void bracketsList( QStringList&, bool open ) const;
-
- virtual bool createValue( const QString&, QtxValue& ) const;
- virtual int prior ( const QString&, bool isBin ) const;
- virtual QtxParser::Error isValid( const QString&,
- const QVariant::Type,
- const QVariant::Type ) const;
- virtual QtxParser::Error calculate( const QString&, QtxValue&, QtxValue& ) const;
-
- void clear ();
- bool has ( const QString& ) const;
- void append ( const QString&, QtxOperations*, int prior );
- void prepend( const QString&, QtxOperations*, int prior );
- void insert ( const QString&, QtxOperations*, int prior, int pos = -1 );
- void remove ( const QString& );
- int count () const;
- QtxOperations* operations( const QString& ) const;
-
-private:
- typedef struct
- {
- QString myName;
- QtxOperations* myOperations;
- int myAddPrior;
-
- } OperationSet;
-
- typedef QValueList< OperationSet > OperationSets;
- typedef OperationSets::const_iterator OperationSetsIterator;
-
- OperationSets mySets;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxListResourceEdit.cxx
-// Author: Sergey TELKOV
-
-#include "QtxListResourceEdit.h"
-
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qtabwidget.h>
-#include <qvalidator.h>
-#include <qobjectlist.h>
-#include <qcolordialog.h>
-#include <qwidgetstack.h>
-#include <qtoolbutton.h>
-#include <qfontdialog.h>
-#include <qfontdatabase.h>
-#include <qfileinfo.h>
-#include <qfiledialog.h>
-#include <qapplication.h>
-
-#include "QtxIntSpinBox.h"
-#include "QtxDblSpinBox.h"
-#include "QtxComboBox.h"
-#include "QtxDirListEditor.h"
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::QtxListResourceEdit( QtxResourceMgr* mgr, QWidget* parent )
-: QFrame( parent ),
-QtxResourceEdit( mgr )
-{
- QVBoxLayout* main = new QVBoxLayout( this, 0, 5 );
- QGroupBox* base = new QGroupBox( 1, Qt::Vertical, "", this );
- base->setFrameStyle( QFrame::NoFrame );
- base->setInsideMargin( 0 );
- main->addWidget( base );
-
- myList = new QListBox( base );
- myStack = new QWidgetStack( base );
-
- myList->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) );
- myStack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
-
- myList->setSelectionMode( QListBox::Single );
-
- connect( myList, SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
-
- setFocusProxy( myList );
-
- updateState();
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::~QtxListResourceEdit()
-{
-}
-
-/*!
- Sets value to widget
- \param id - id of widget
- \param prop - name of resource
- \param val - value of resource
-*/
-void QtxListResourceEdit::setItemProperty( const int id, const QString& prop, const QVariant& val )
-{
- Item* i = item( id );
- if ( !i )
- return;
-
- bool prev = i->isEmpty();
-
- QtxResourceEdit::setItemProperty( id, prop, val );
-
- bool next = i->isEmpty();
-
- if ( prev != next )
- updateVisible();
-}
-
-/*!
- SLOT: called if main list selection changed, raises resource group widgets
-*/
-void QtxListResourceEdit::onSelectionChanged()
-{
- QString title = myList->text( myList->index( myList->selectedItem() ) );
- if ( title.isEmpty() )
- return;
-
- Item* i = 0;
- QPtrList<Item> lst;
- childItems( lst );
- for ( QPtrListIterator<Item> it( lst ); it.current() && !i; ++it )
- {
- if ( it.current()->title() == title )
- i = it.current();
- }
-
- if ( i )
- myStack->raiseWidget( i->id() );
-}
-
-/*!
- Custom activity after item addition
- \param i - added item
-*/
-void QtxListResourceEdit::itemAdded( QtxResourceEdit::Item* i )
-{
- if ( !i )
- return;
-
- QPtrList<Item> items;
- childItems( items );
-
- if ( items.contains( i ) || items.contains( i->parentItem() ) )
- updateVisible();
-}
-
-/*!
- Creates and \return category
- \param title - category title
-*/
-QtxResourceEdit::Item* QtxListResourceEdit::createItem( const QString& title, const int )
-{
- Item* i = item( title, -1 );
- if ( i )
- return i;
-
- Category* category = new Category( this, myStack );
- myStack->addWidget( category, category->id() );
-
- updateVisible();
-
- if ( !myList->selectedItem() )
- myList->setSelected( 0, true );
-
- updateState();
-
- return category;
-}
-
-/*!
- Emits signal about resource changing
- \param map - map of changed resources
-*/
-void QtxListResourceEdit::changedResources( const QMap<Item*, QString>& map )
-{
- QMap<int, QString> idMap;
- for ( QMap<Item*, QString>::ConstIterator it = map.begin(); it != map.end(); ++it )
- {
- idMap.insert( it.key()->id(), it.data() );
-
- emit resourceChanged( it.key()->id() );
-
- QString sec, param;
- it.key()->resource( sec, param );
- emit resourceChanged( sec, param );
- }
-
- emit resourcesChanged( idMap );
-}
-
-/*!
- Updates widgets with accordance with main list selection
-*/
-void QtxListResourceEdit::updateState()
-{
- if ( myList->selectedItem() && myStack->visibleWidget() )
- myStack->show();
- else
- myStack->hide();
-
- myList->setShown( myList->count() > 1 );
-}
-
-/*!
- Updates visibility state
-*/
-void QtxListResourceEdit::updateVisible()
-{
- QPtrList<Item> items;
- childItems( items );
-
- QString name = myList->text( myList->index( myList->selectedItem() ) );
-
- myList->clear();
- for ( QPtrListIterator<Item> it( items ); it.current(); ++it )
- {
- if ( it.current()->isEmpty() )
- continue;
-
- myList->insertItem( it.current()->title() );
- }
-
- int idx = -1;
- for ( int i = 0; i < (int)myList->count() && idx == -1; i++ )
- {
- if ( myList->text( i ) == name )
- idx = i;
- }
-
- myList->setSelected( QMAX( idx, 0 ), true );
-
- updateState();
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::Category::Category( QtxListResourceEdit* edit, QWidget* parent )
-: QFrame( parent ),
-Item( edit )
-{
- QVBoxLayout* main = new QVBoxLayout( this );
- QGroupBox* base = new QGroupBox( 1, Qt::Horizontal, "", this );
- base->setFrameStyle( QFrame::NoFrame );
- base->setInsideMargin( 0 );
- main->addWidget( base, 1 );
-
- myTabs = new QTabWidget( base );
- myInfo = new QLabel( base );
-
- myInfo->setAlignment( Qt::AlignCenter );
- myInfo->setFrameStyle( QFrame::WinPanel | QFrame::Raised );
- myInfo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
-
- updateState();
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::Category::~Category()
-{
-}
-
-/*!
- \return true if it is empty
-*/
-bool QtxListResourceEdit::Category::isEmpty() const
-{
- return Item::isEmpty() && myInfo->text().isEmpty();
-}
-
-/*!
- \return category type
-*/
-int QtxListResourceEdit::Category::type() const
-{
- return -1;
-}
-
-/*!
- Default empty implementation of resources storing
-*/
-void QtxListResourceEdit::Category::store()
-{
-}
-
-/*!
- Default empty implementation of resources retrieving
-*/
-void QtxListResourceEdit::Category::retrieve()
-{
-}
-
-/*!
- \return value of property
- \param prop - property name
-*/
-QVariant QtxListResourceEdit::Category::property( const QString& prop ) const
-{
- QVariant var;
- if ( prop == QString( "information" ) || prop == QString( "info" ) )
- var = myInfo->text();
- return var;
-}
-
-/*!
- Sets property value
- \param name - name of property
- \param var - value of property
-*/
-void QtxListResourceEdit::Category::setProperty( const QString& name, const QVariant& var )
-{
- QVariant prop = var;
- if ( !prop.cast( QVariant::String ) )
- return;
-
- if ( name == QString( "information" ) || name == QString( "info" ) )
- myInfo->setText( prop.toString() );
-
- updateState();
-}
-
-/*!
- Creates new tab
- \param title - name of tab
-*/
-QtxResourceEdit::Item* QtxListResourceEdit::Category::createItem( const QString& title, const int )
-{
- Item* i = item( title, id() );
- if ( i )
- return i;
-
- Tab* tab = new Tab( resourceEdit(), this, this );
- myTabs->addTab( tab, title );
-
- updateState();
-
- return tab;
-}
-
-/*!
- Updates category
-*/
-void QtxListResourceEdit::Category::updateState()
-{
- if ( myTabs->count() )
- myTabs->show();
- else
- myTabs->hide();
-
- if ( !myTabs->count() && !myInfo->text().isEmpty() )
- myInfo->show();
- else
- myInfo->hide();
-}
-
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::Tab::Tab( QtxResourceEdit* edit, Item* pItem, QWidget* parent )
-: QFrame( parent ),
-Item( edit, pItem )
-{
- QVBoxLayout* main = new QVBoxLayout( this );
- QVBox* vbox = new QVBox( this );
- vbox->setMargin( 5 );
- myMainFrame = vbox;
- main->addWidget( myMainFrame );
- main->addStretch( 1 );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::Tab::~Tab()
-{
-}
-
-/*!
- \return tab type
-*/
-int QtxListResourceEdit::Tab::type() const
-{
- return -1;
-}
-
-/*!
- Default empty implementation of resources storing
-*/
-void QtxListResourceEdit::Tab::store()
-{
-}
-
-/*!
- Default empty implementation of resources retrieving
-*/
-void QtxListResourceEdit::Tab::retrieve()
-{
-}
-
-/*!
- Delayed initialization of a widget
-*/
-void QtxListResourceEdit::Tab::polish()
-{
- QFrame::polish();
-
- adjustLabels();
-}
-
-/*!
- Creates new group
- \param title - name of group
-*/
-QtxResourceEdit::Item* QtxListResourceEdit::Tab::createItem( const QString& title, const int )
-{
- Item* i = item( title, id() );
- if ( i )
- return i;
-
- Group* group = new Group( title, resourceEdit(), this, myMainFrame );
-
- return group;
-}
-
-/*!
- Adjusts sizes of labels
-*/
-void QtxListResourceEdit::Tab::adjustLabels()
-{
- QObjectList* labels = queryList( "QLabel" );
- if ( labels )
- {
- int w = 0;
- for ( QObjectListIt it1( *labels ); it1.current(); ++it1 )
- {
- if ( it1.current()->isWidgetType() )
- {
- QWidget* wid = (QWidget*)it1.current();
- w = QMAX( w, wid->sizeHint().width() );
- }
- }
- for ( QObjectListIt it2( *labels ); it2.current(); ++it2 )
- {
- if ( it2.current()->isWidgetType() )
- {
- QWidget* wid = (QWidget*)it2.current();
- wid->setMinimumWidth( w );
- }
- }
- delete labels;
- }
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::Group::Group( const QString& title, QtxResourceEdit* edit, Item* pItem, QWidget* parent )
-: QGroupBox( 2, Qt::Horizontal, title, parent ),
-Item( edit, pItem )
-{
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::Group::~Group()
-{
-}
-
-/*!
- \return group type
-*/
-int QtxListResourceEdit::Group::type() const
-{
- return -1;
-}
-
-/*!
- Default empty implementation of resources storing
-*/
-void QtxListResourceEdit::Group::store()
-{
-}
-
-/*!
- Default empty implementation of resources retrieving
-*/
-void QtxListResourceEdit::Group::retrieve()
-{
-}
-
-/*!
- \return value of property
- \param prop - property name
-*/
-QVariant QtxListResourceEdit::Group::property( const QString& prop ) const
-{
- QVariant var;
- if ( prop == "columns" )
- var = QVariant( columns() );
- else if ( prop == "orientation" )
- var = QVariant( orientation() );
- else if ( prop == "frame" )
- var = QVariant( frameStyle() != QFrame::NoFrame );
- return var;
-}
-
-/*!
- Sets property value
- \param name - name of property
- \param var - value of property
-*/
-void QtxListResourceEdit::Group::setProperty( const QString& name, const QVariant& var )
-{
- QVariant prop = var;
- if ( !prop.cast( QVariant::Int ) )
- return;
-
- if ( name == QString( "columns" ) && prop.cast( QVariant::Int ) && prop.toInt() > 0 )
- setColumns( prop.toInt() );
- else if ( name == QString( "orientation" ) && prop.cast( QVariant::Int ) )
- {
- int o = prop.toInt();
- if ( o == Qt::Horizontal || o == Qt::Vertical )
- setOrientation( (Orientation)o );
- }
- else if ( name == "frame" && prop.cast( QVariant::Bool ) )
- {
- setInsideMargin( prop.toBool() ? 5 : 0 );
- QGroupBox::setTitle( prop.toBool() ? Item::title() : QString::null );
- setFrameStyle( prop.toBool() ? QFrame::Box | QFrame::Sunken : QFrame::NoFrame );
- }
-}
-
-/*!
- Sets title of group
- \param title - new title of group
-*/
-void QtxListResourceEdit::Group::setTitle( const QString& title )
-{
- Item::setTitle( title );
- QGroupBox::setTitle( title );
-}
-
-/*!
- Creates new item
- \param title - title of new item
- \type - type of new item
-*/
-QtxResourceEdit::Item* QtxListResourceEdit::Group::createItem( const QString& title, const int type )
-{
- Item* item = 0;
-
- switch ( type )
- {
- case Color:
- item = new ColorItem( title, resourceEdit(), this, this );
- break;
- case Bool:
- item = new StateItem( title, resourceEdit(), this, this );
- break;
- case String:
- item = new StringItem( title, resourceEdit(), this, this );
- break;
- case Selector:
- item = new SelectItem( title, resourceEdit(), this, this );
- break;
- case DblSpin:
- item = new DoubleSpinItem( title, resourceEdit(), this, this );
- break;
- case IntSpin:
- item = new IntegerSpinItem( title, resourceEdit(), this, this );
- break;
- case Double:
- item = new DoubleEditItem( title, resourceEdit(), this, this );
- break;
- case Integer:
- item = new IntegerEditItem( title, resourceEdit(), this, this );
- break;
- case Space:
- item = new Spacer( resourceEdit(), this, this );
- break;
- case GroupBox:
- item = new Group( title, resourceEdit(), this, this );
- break;
- case Font:
- item = new FontItem( title, resourceEdit(), this, this );
- break;
- case DirList:
- item = new DirListItem( title, resourceEdit(), this, this );
- break;
- case File:
- item = new FileItem( title, resourceEdit(), this, this );
- break;
- }
-
- return item;
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::PrefItem::PrefItem( const int type, QtxResourceEdit* edit, Item* pi, QWidget* parent )
-: QHBox( parent ),
-Item( edit, pi ),
-myType( type )
-{
- setSpacing( 5 );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::PrefItem::~PrefItem()
-{
-}
-
-/*!
- \return preference item type
-*/
-int QtxListResourceEdit::PrefItem::type() const
-{
- return myType;
-}
-
-/*!
- Doesn't create item, \return 0 by default
-*/
-QtxResourceEdit::Item* QtxListResourceEdit::PrefItem::createItem( const QString&, const int )
-{
- return 0;
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::Spacer::Spacer( QtxResourceEdit* edit, Item* pItem, QWidget* parent )
-: PrefItem( Space, edit, pItem, parent )
-{
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::Spacer::~Spacer()
-{
-}
-
-/*!
- Default empty implementation of resources storing
-*/
-void QtxListResourceEdit::Spacer::store()
-{
-}
-
-/*!
- Default empty implementation of resources retrieving
-*/
-void QtxListResourceEdit::Spacer::retrieve()
-{
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::SelectItem::SelectItem( const QString& title, QtxResourceEdit* edit,
- Item* pItem, QWidget* parent )
-: PrefItem( Selector, edit, pItem, parent )
-{
- new QLabel( title, this );
- myList = new QComboBox( false, this );
- myList->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::SelectItem::~SelectItem()
-{
-}
-
-/*!
- Stores value to resource manager
-*/
-void QtxListResourceEdit::SelectItem::store()
-{
- int idx = myList->currentItem();
- if ( idx >= 0 )
- setInteger( myIndex.contains( idx ) ? myIndex[idx] : idx );
-}
-
-/*!
- Retrieve value to resource manager
-*/
-void QtxListResourceEdit::SelectItem::retrieve()
-{
- int id = getInteger( -1 );
-
- for ( QMap<int, int>::ConstIterator it = myIndex.begin(); it != myIndex.end(); ++it )
- {
- if ( it.data() == id ) {
- myList->setCurrentItem( it.key() );
- return;
- }
- }
- if ( id >= 0 )
- myList->setCurrentItem( id );
-}
-
-/*!
- \return value of property
- \param prop - property name
-*/
-QVariant QtxListResourceEdit::SelectItem::property( const QString& name ) const
-{
- QVariant val;
- if ( name == QString( "strings" ) )
- {
- QStringList lst;
- for ( int i = 0; i < (int)myList->count(); i++ )
- lst.append( myList->text( i ) );
- val = QVariant( lst );
- }
- else if ( name == QString( "indexes" ) )
- {
- QValueList<QVariant> lst;
- for ( int i = 0; i < (int)myList->count(); i++ )
- lst.append( myIndex.contains( i ) ? myIndex[i] : 0 );
- val = QVariant( lst );
- }
- return val;
-}
-
-/*!
- Sets property value
- \param name - name of property
- \param var - value of property
-*/
-void QtxListResourceEdit::SelectItem::setProperty( const QString& name, const QVariant& val )
-{
- if ( name == QString( "strings" ) )
- setStrings( val );
- else if ( name == QString( "indexes" ) )
- setIndexes( val );
-}
-
-/*!
- Sets property "strings" - items for selection in combo box
- \param var - must be string list: list of items
-*/
-void QtxListResourceEdit::SelectItem::setStrings( const QVariant& var )
-{
- if ( var.type() != QVariant::StringList )
- return;
-
- setStrings( var.toStringList() );
-}
-
-/*!
- Sets property "indexes" - corresponding indices of items in combo box
- \param var - must be list of integer variants: list of indices
-*/
-void QtxListResourceEdit::SelectItem::setIndexes( const QVariant& var )
-{
- if ( var.type() != QVariant::List )
- return;
-
- QValueList<QVariant> varList = var.toList();
- QValueList<int> lst;
- for ( QValueList<QVariant>::const_iterator it = varList.begin(); it != varList.end(); ++it )
- {
- if ( (*it).canCast( QVariant::Int ) )
- lst.append( (*it).toInt() );
- }
- setIndexes( lst );
-}
-
-/*!
- Sets property "strings" - items for selection in combo box
- \param lst - list of items
-*/
-void QtxListResourceEdit::SelectItem::setStrings( const QStringList& lst )
-{
- myList->clear();
- myList->insertStringList( lst );
-}
-
-/*!
- Sets property "indexes" - corresponding indices of items in combo box
- \param var - list of indices
-*/
-void QtxListResourceEdit::SelectItem::setIndexes( const QValueList<int>& lst )
-{
- myIndex.clear();
-
- int idx = 0;
- for ( QValueList<int>::const_iterator it = lst.begin(); it != lst.end(); ++it, idx++ )
- myIndex.insert( idx, *it );
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::StateItem::StateItem( const QString& title, QtxResourceEdit* edit,
- Item* pItem, QWidget* parent )
-: PrefItem( Bool, edit, pItem, parent )
-{
- myState = new QCheckBox( title, this );
- myState->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::StateItem::~StateItem()
-{
-}
-
-/*!
- Stores value to resource manager
-*/
-void QtxListResourceEdit::StateItem::store()
-{
- setBoolean( myState->isChecked() );
-}
-
-/*!
- Retrieve value to resource manager
-*/
-void QtxListResourceEdit::StateItem::retrieve()
-{
- myState->setChecked( getBoolean() );
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::StringItem::StringItem( const QString& title, QtxResourceEdit* edit,
- Item* pItem, QWidget* parent )
-: PrefItem( String, edit, pItem, parent )
-{
- new QLabel( title, this );
- myString = new QLineEdit( this );
- myString->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::StringItem::~StringItem()
-{
-}
-
-/*!
- Stores value to resource manager
-*/
-void QtxListResourceEdit::StringItem::store()
-{
- setString( myString->text() );
-}
-
-/*!
- Retrieve value to resource manager
-*/
-void QtxListResourceEdit::StringItem::retrieve()
-{
- myString->setText( getString() );
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::IntegerEditItem::IntegerEditItem( const QString& title, QtxResourceEdit* edit, Item* pItem, QWidget* parent )
-: PrefItem( Integer, edit, pItem, parent )
-{
- new QLabel( title, this );
- myInteger = new QLineEdit( this );
- myInteger->setValidator( new QIntValidator( myInteger ) );
- myInteger->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::IntegerEditItem::~IntegerEditItem()
-{
-}
-
-/*!
- Stores value to resource manager
-*/
-void QtxListResourceEdit::IntegerEditItem::store()
-{
- setString( myInteger->text() );
-}
-
-/*!
- Retrieve value to resource manager
-*/
-void QtxListResourceEdit::IntegerEditItem::retrieve()
-{
- myInteger->setText( getString() );
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::IntegerSpinItem::IntegerSpinItem( const QString& title, QtxResourceEdit* edit, Item* pItem, QWidget* parent )
-: PrefItem( IntSpin, edit, pItem, parent )
-{
- new QLabel( title, this );
- myInteger = new QtxIntSpinBox( this );
- myInteger->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::IntegerSpinItem::~IntegerSpinItem()
-{
-}
-
-/*!
- Stores value to resource manager
-*/
-void QtxListResourceEdit::IntegerSpinItem::store()
-{
- setInteger( myInteger->value() );
-}
-
-/*!
- Retrieve value to resource manager
-*/
-void QtxListResourceEdit::IntegerSpinItem::retrieve()
-{
- myInteger->setValue( getInteger() );
-}
-
-/*!
- \return value of property
- \param prop - property name
-*/
-QVariant QtxListResourceEdit::IntegerSpinItem::property( const QString& name ) const
-{
- QVariant var;
- if ( name == QString( "minimum" ) || name == QString( "min" ) )
- var = QVariant( myInteger->minValue() );
- else if ( name == QString( "maximum" ) || name == QString( "max" ) )
- var = QVariant( myInteger->maxValue() );
- else if ( name == QString( "step" ) )
- var = QVariant( myInteger->lineStep() );
- else if ( name == QString( "special" ) )
- var = QVariant( myInteger->specialValueText() );
- else if ( name == QString( "prefix" ) )
- var = QVariant( myInteger->prefix() );
- else if ( name == QString( "suffix" ) )
- var = QVariant( myInteger->suffix() );
- return var;
-}
-
-/*!
- Sets property value
- \param name - name of property
- \param var - value of property
-*/
-void QtxListResourceEdit::IntegerSpinItem::setProperty( const QString& name, const QVariant& var )
-{
- QVariant prop = var;
-
- if ( ( name == QString( "minimum" ) || name == QString( "min" ) ) && prop.cast( QVariant::Int ) )
- myInteger->setMinValue( prop.toInt() );
- else if ( ( name == QString( "maximum" ) || name == QString( "max" ) ) && prop.cast( QVariant::Int ) )
- myInteger->setMaxValue( prop.toInt() );
- else if ( name == QString( "step" ) && prop.cast( QVariant::Int ) && prop.toInt() > 0 )
- myInteger->setLineStep( prop.toInt() );
- else if ( name == QString( "special" ) && prop.cast( QVariant::String ) )
- myInteger->setSpecialValueText( prop.toString() );
- else if ( name == QString( "prefix" ) && prop.cast( QVariant::String ) )
- myInteger->setPrefix( prop.toString() );
- else if ( name == QString( "suffix" ) && prop.cast( QVariant::String ) )
- myInteger->setSuffix( prop.toString() );
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::DoubleEditItem::DoubleEditItem( const QString& title, QtxResourceEdit* edit,
- Item* pItem, QWidget* parent )
-: PrefItem( Double, edit, pItem, parent )
-{
- new QLabel( title, this );
- myDouble = new QLineEdit( this );
- myDouble->setValidator( new QDoubleValidator( myDouble ) );
- myDouble->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::DoubleEditItem::~DoubleEditItem()
-{
-}
-
-/*!
- Stores value to resource manager
-*/
-void QtxListResourceEdit::DoubleEditItem::store()
-{
- setString( myDouble->text() );
-}
-
-/*!
- Retrieve value to resource manager
-*/
-void QtxListResourceEdit::DoubleEditItem::retrieve()
-{
- myDouble->setText( getString() );
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::DoubleSpinItem::DoubleSpinItem( const QString& title, QtxResourceEdit* edit,
- Item* pItem, QWidget* parent )
-: PrefItem( DblSpin, edit, pItem, parent )
-{
- new QLabel( title, this );
- myDouble = new QtxDblSpinBox( this );
- myDouble->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::DoubleSpinItem::~DoubleSpinItem()
-{
-}
-
-/*!
- Stores value to resource manager
-*/
-void QtxListResourceEdit::DoubleSpinItem::store()
-{
- setDouble( myDouble->value() );
-}
-
-/*!
- Retrieve value to resource manager
-*/
-void QtxListResourceEdit::DoubleSpinItem::retrieve()
-{
- myDouble->setValue( getDouble() );
-}
-
-/*!
- \return value of property
- \param prop - property name
-*/
-QVariant QtxListResourceEdit::DoubleSpinItem::property( const QString& name ) const
-{
- QVariant var;
- if ( name == QString( "minimum" ) || name == QString( "min" ) )
- var = QVariant( myDouble->minValue() );
- else if ( name == QString( "maximum" ) || name == QString( "max" ) )
- var = QVariant( myDouble->maxValue() );
- else if ( name == QString( "precision" ) )
- var = QVariant( myDouble->precision() );
- else if ( name == QString( "step" ) )
- var = QVariant( myDouble->lineStep() );
- else if ( name == QString( "special" ) )
- var = QVariant( myDouble->specialValueText() );
- else if ( name == QString( "prefix" ) )
- var = QVariant( myDouble->prefix() );
- else if ( name == QString( "suffix" ) )
- var = QVariant( myDouble->suffix() );
- return var;
-}
-
-/*!
- Sets property value
- \param name - name of property
- \param var - value of property
-*/
-void QtxListResourceEdit::DoubleSpinItem::setProperty( const QString& name, const QVariant& var )
-{
- QVariant prop = var;
-
- if ( ( name == QString( "minimum" ) || name == QString( "min" ) ) && prop.cast( QVariant::Double ) )
- myDouble->setMinValue( prop.toDouble() );
- else if ( ( name == QString( "maximum" ) || name == QString( "max" ) ) && prop.cast( QVariant::Double ) )
- myDouble->setMaxValue( prop.toDouble() );
- else if ( name == QString( "step" ) && prop.cast( QVariant::Double ) && prop.toDouble() > 0 )
- myDouble->setLineStep( prop.toDouble() );
- else if ( name == QString( "precision" ) && prop.cast( QVariant::Int ) && prop.toInt() > 0 )
- myDouble->setPrecision( prop.toInt() );
- else if ( name == QString( "special" ) && prop.cast( QVariant::String ) )
- myDouble->setSpecialValueText( prop.toString() );
- else if ( name == QString( "prefix" ) && prop.cast( QVariant::String ) )
- myDouble->setPrefix( prop.toString() );
- else if ( name == QString( "suffix" ) && prop.cast( QVariant::String ) )
- myDouble->setSuffix( prop.toString() );
-}
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::ColorItem::ColorItem( const QString& title, QtxResourceEdit* edit,
- Item* pItem, QWidget* parent )
-: PrefItem( Color, edit, pItem, parent )
-{
- /*!
- \class QtxListResourceEdit::ColorItem::ColorSelector
- \brief Label, showing color and allowing to pick color with help of standard color dialog
- */
- class ColorSelector : public QLabel
- {
- public:
- ColorSelector( QWidget* parent = 0 ) : QLabel( parent )
- {
- setFrameStyle( WinPanel | Raised );
- }
- virtual ~ColorSelector() {}
- virtual QSize minimumSizeHint() const
- {
- return QLabel::minimumSizeHint() + QSize( 0, 2 );
- }
-
- protected:
- virtual void mousePressEvent( QMouseEvent* e )
- {
- if ( e->button() == LeftButton )
- {
- setFrameStyle( WinPanel | Sunken );
- QColor c = QColorDialog::getColor( paletteBackgroundColor(), this );
- if ( c.isValid() )
- setPaletteBackgroundColor( c );
-
- setFrameStyle( WinPanel | Raised );
- }
- }
- };
-
- new QLabel( title, this );
- myColor = new ColorSelector( this );
- myColor->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::ColorItem::~ColorItem()
-{
-}
-
-/*!
- Stores value to resource manager
-*/
-void QtxListResourceEdit::ColorItem::store()
-{
- setColor( myColor->paletteBackgroundColor() );
-}
-
-/*!
- Retrieve value to resource manager
-*/
-void QtxListResourceEdit::ColorItem::retrieve()
-{
- myColor->setPaletteBackgroundColor( getColor() );
-}
-
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::FontItem::FontItem( const QString& title, QtxResourceEdit* edit,
- Item* pItem, QWidget* parent )
-: PrefItem( Font, edit, pItem, parent )
-{
- new QLabel( title, this );
- myFamilies = new QtxComboBox( false, this );
- mySizes = new QtxComboBox( true, this );
- mySizes->setInsertionPolicy( QComboBox::NoInsertion );
- myBold = new QCheckBox( tr( "Bold" ), this );
- myItalic = new QCheckBox( tr( "Italic" ), this );
- myUnderline = new QCheckBox( tr( "Shadow" ), this );
- myPreview = new QToolButton( this );
- myPreview->setText( "..." );
-
- myFamilies->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
- mySizes->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
-
- connect( myFamilies, SIGNAL( activated( int ) ), this, SLOT( onActivateFamily( int ) ) );
- connect( myPreview, SIGNAL( clicked() ), this, SLOT( onPreview() ) );
-
- setProperty( "system", ( bool )true );
- setProperty( "widget_flags", ( int )All );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::FontItem::~FontItem()
-{
-}
-
-/*!
- Stores value to resource manager
-*/
-void QtxListResourceEdit::FontItem::store()
-{
- QFont f( family(), size() );
- bool bold, italic, underline;
- params( bold, italic, underline );
- f.setBold( bold );
- f.setItalic( italic );
- f.setUnderline( underline );
- Item::setFont( f );
-}
-
-/*!
- Retrieve value to resource manager
-*/
-void QtxListResourceEdit::FontItem::retrieve()
-{
- QFont f = getFont();
- setFamily( f.family() );
- setSize( f.pointSize() );
- setParams( f.bold(), f.italic(), f.underline() );
-}
-
-/*!
- \return value of property
- \param prop - property name
-*/
-QVariant QtxListResourceEdit::FontItem::property( const QString& name ) const
-{
- if( name=="system" )
- return myIsSystem;
-
- else if( name=="widget_flags" )
- return ( int )myFlags;
-
- if( myIsSystem )
- {
- if( name=="families" )
- {
- QFontDatabase fdb;
- return fdb.families();
- }
-
- else if( name=="default_family" )
- {
- QFontDatabase fdb;
- QStringList fam = fdb.families();
- if( fam.count()>0 )
- return fam.first();
- else
- return QString::null;
- }
-
- else
- {
- QStringList parts = QStringList::split( ":", name );
- if( parts.count()==2 )
- {
- if( parts[1]=="default_bold" || parts[1]=="default_italic" || parts[1]=="default_underline" )
- return false;
-
- else if( parts[1]=="sizes" )
- {
- QFontDatabase fdb;
- QValueList<int> sizes = fdb.pointSizes( parts[0] );
- QValueList<QVariant> vsizes;
- QValueList<int>::const_iterator anIt = sizes.begin(),
- aLast = sizes.end();
- for( ; anIt!=aLast; anIt++ )
- vsizes.append( *anIt );
-
- return vsizes;
- }
-
- else if( parts[1]=="default_size" )
- {
- if( parts[0].isEmpty() )
- return 0;
-
- QFontDatabase fdb;
- QValueList<int> sizes = fdb.pointSizes( parts[0] );
- if( sizes.count()>0 )
- return sizes.first();
- else
- return 0;
- }
- }
- }
- }
-
- else if( myProperties.contains( name ) )
- return myProperties[ name ];
-
- return QVariant();
-}
-
-/*!
- Sets property value
- \param name - name of property
- \param var - value of property
-*/
-void QtxListResourceEdit::FontItem::setProperty( const QString& name, const QVariant& value )
-{
- if( name=="system" )
- {
- if( !value.canCast( QVariant::Bool ) )
- return;
-
- bool isSystem = value.toBool();
- if( myIsSystem==isSystem )
- return;
-
- myIsSystem = isSystem;
-
- QVariant families = property( "families" );
- QString fam = family();
-
- myFamilies->clear();
- if( families.canCast( QVariant::StringList ) )
- {
- QStringList list = families.toStringList();
- myFamilies->insertStringList( list );
- }
-
- setFamily( fam );
- setSize( -1 ); //set default size
- }
-
- else if( name=="widget_flags" )
- {
- if( !value.canCast( QVariant::Int ) )
- return;
-
- int wf = value.toInt();
-
- myFlags = wf;
- myFamilies ->setShown( wf & Family );
- mySizes ->setShown( wf & Size );
- mySizes->lineEdit()->setReadOnly( ( wf & UserSize )==0 );
- myBold ->setShown( wf & Bold );
- myItalic ->setShown( wf & Italic );
- myUnderline->setShown( wf & Underline );
- bool isSystem = property( "system" ).canCast( QVariant::Bool ) ? property( "system" ).toBool() : false;
- myPreview->setShown( ( wf & Preview ) && isSystem );
-
- internalUpdate();
- }
-
- else
- myProperties[ name ] = value;
-}
-
-/*!
- Sets family of font
- \param f - new family
-*/
-void QtxListResourceEdit::FontItem::setFamily( const QString& f )
-{
- QString curtext;
- if( myFamilies->isShown() )
- {
- if( myFamilies->listBox()->findItem( f, Qt::ExactMatch ) )
- curtext = f;
- }
- else
- {
- QVariant deffam = property( "default_family" );
- if( deffam.canCast( QVariant::String ) )
- curtext = deffam.toString();
- }
-
- if ( curtext.isEmpty() )
- curtext = (QApplication::font()).family();
-
- int idx = -1;
- for ( int i = 0; i < (int)myFamilies->count() && idx < 0; i++ )
- {
- if ( myFamilies->text( i ) == curtext )
- idx = i;
- }
-
- if ( idx >= 0 )
- myFamilies->setCurrentItem( idx );
-
- onActivateFamily( idx );
-}
-
-/*!
- \return family of font
-*/
-QString QtxListResourceEdit::FontItem::family() const
-{
- return myFamilies->currentText();
-}
-
-/*!
- Sets size of font
- \param s - new size of font
-*/
-void QtxListResourceEdit::FontItem::setSize( const int s )
-{
- int cursize = -1;
- if( mySizes->isShown() && s>0 )
- {
- if( ( myFlags & UserSize ) || mySizes->listBox()->findItem( QString( "%1" ).arg( s ), Qt::ExactMatch ) )
- cursize = s;
- }
- else
- {
- QVariant defsize = property( QString( "%1:default_size" ).arg( family() ) );
- if( defsize.canCast( QVariant::Int ) )
- cursize = defsize.toInt();
- }
-
- mySizes->setCurrentText( cursize>0 ? QString( "%1" ).arg( cursize ) : "" );
-}
-
-/*!
- \return size of font
-*/
-int QtxListResourceEdit::FontItem::size() const
-{
- QString s = mySizes->currentText();
- bool ok;
- int pSize = s.toInt( &ok );
- return ( ok ? pSize : 0 );
-}
-
-/*!
- Sets font parameters
- \param bold - is font bold
- \param italic - is font italic
- \param underline - is font underlined
-*/
-void QtxListResourceEdit::FontItem::setParams( const bool bold, const bool italic, const bool underline )
-{
- bool curbold = false, curitalic = false, curunderline = false;
- if( myBold->isShown() )
- curbold = bold;
- else
- {
- QVariant def = property( QString( "%1:default_bold" ).arg( family() ) );
- if( def.canCast( QVariant::Bool ) )
- curbold = def.toBool();
- }
- if( myItalic->isShown() )
- curitalic = italic;
- else
- {
- QVariant def = property( QString( "%1:default_italic" ).arg( family() ) );
- if( def.canCast( QVariant::Bool ) )
- curitalic = def.toBool();
- }
- if( myUnderline->isShown() )
- curunderline = underline;
- else
- {
- QVariant def = property( QString( "%1:default_underline" ).arg( family() ) );
- if( def.canCast( QVariant::Bool ) )
- curunderline = def.toBool();
- }
- myBold->setChecked( curbold );
- myItalic->setChecked( curitalic );
- myUnderline->setChecked( curunderline );
-}
-
-/*!
- \return font parameters
- \param bold - is font bold
- \param italic - is font italic
- \param underline - is font underlined
-*/
-void QtxListResourceEdit::FontItem::params( bool& bold, bool& italic, bool& underline )
-{
- bold = myBold->isChecked();
- italic = myItalic->isChecked();
- underline = myUnderline->isChecked();
-}
-
-/*!
- Updates internal selection of font properties
-*/
-void QtxListResourceEdit::FontItem::internalUpdate()
-{
- setFamily( family() );
- setSize( size() );
- bool b1, b2, b3;
- params( b1, b2, b3 );
- setParams( b1, b2, b3 );
-}
-
-/*!
- SLOT: called if family is activated, updates list of possible sizes
-*/
-void QtxListResourceEdit::FontItem::onActivateFamily( int )
-{
- QVariant sizes = property( QString( "%1:sizes" ).arg( family() ) );
-
- int s = size();
- mySizes->clear();
- if( sizes.canCast( QVariant::List ) )
- {
- QValueList<QVariant> list = sizes.toList();
- QStringList sizeItems;
- QValueList<QVariant>::const_iterator anIt = list.begin(),
- aLast = list.end();
- for( ; anIt!=aLast; anIt++ )
- if( (*anIt).canCast( QVariant::Int ) && (*anIt).toInt()>0 )
- sizeItems.append( QString( "%1" ).arg( (*anIt).toInt() ) );
- mySizes->insertStringList( sizeItems );
- }
- setSize( s );
-}
-
-/*!
- SLOT: called if it is necessary to show font preview
-*/
-void QtxListResourceEdit::FontItem::onPreview()
-{
- QFont f( family(), size() );
- bool bold, italic, underline;
- params( bold, italic, underline );
- f.setBold( bold );
- f.setItalic( italic );
- f.setUnderline( underline );
-
- bool ok;
- f = QFontDialog::getFont( &ok, f );
-
- if( ok )
- {
- setFamily( f.family() );
- setSize( f.pointSize() );
- setParams( f.bold(), f.italic(), f.underline() );
- }
-}
-
-
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::DirListItem::DirListItem( const QString& title, QtxResourceEdit* edit, Item* pItem, QWidget* parent )
-: PrefItem( Font, edit, pItem, parent )
-{
- myDirListEditor = new QtxDirListEditor( this );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::DirListItem::~DirListItem()
-{
-}
-
-/*!
- Stores value to resource manager
-*/
-void QtxListResourceEdit::DirListItem::store()
-{
- QStringList list;
- myDirListEditor->getPathList(list);
- setString( QString(list.join(";")) );
-}
-
-/*!
- Retrieve value to resource manager
-*/
-void QtxListResourceEdit::DirListItem::retrieve()
-{
- myDirListEditor->setPathList(QStringList::split(";", getString()));
-}
-
-
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::FileItem::FileItem( const QString& title, QtxResourceEdit* edit,
- Item* pItem, QWidget* parent )
-: PrefItem( Font, edit, pItem, parent ),
- myFlags( QFileInfo::ReadUser ),
- myIsExisting( true ),
- myIsReadOnly ( true ),
- myFileDlg( 0 )
-{
- new QLabel( title, this );
- myFile = new QLineEdit( this );
- myFile->setValidator( new FileValidator( this, myFile ) );
- myFile->setReadOnly( myIsReadOnly );
- myOpenFile = new QToolButton( this );
- myOpenFile->setText( "..." );
- connect( myOpenFile, SIGNAL( clicked() ), this, SLOT( onOpenFile() ) );
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::FileItem::~FileItem()
-{
- if( myFileDlg )
- delete myFileDlg;
-}
-
-/*!
- Stores value to resource manager
-*/
-void QtxListResourceEdit::FileItem::store()
-{
- setString( myFile->text() );
-}
-
-/*!
- Retrieve value to resource manager
-*/
-void QtxListResourceEdit::FileItem::retrieve()
-{
- myFile->setText( getString() );
-}
-
-/*!
- \return value of property
- \param prop - property name
-*/
-QVariant QtxListResourceEdit::FileItem::property( const QString& name ) const
-{
- if( name=="filter" )
- return myFilter;
- else if( name=="existing" )
- return myIsExisting;
- else if( name=="flags" )
- return myFlags;
- else if( name=="readOnly")
- return myIsReadOnly;
-
- return QVariant();
-}
-
-/*!
- Sets property value
- \param name - name of property
- \param var - value of property
-*/
-void QtxListResourceEdit::FileItem::setProperty( const QString& name, const QVariant& value )
-{
- if( name=="filter" )
- {
- if( value.canCast( QVariant::String ) )
- {
- myFilter.clear();
- myFilter.append( value.toString() );
- }
- else if( value.canCast( QVariant::StringList ) )
- myFilter = value.toStringList();
- }
- else if( name=="existing" && value.canCast( QVariant::Bool ) )
- myIsExisting = value.toBool();
-
- else if( name=="flags" && value.canCast( QVariant::UInt ) )
- myFlags = value.toUInt();
-
- else if( name=="readOnly" && value.canCast( QVariant::Bool) ) {
- myIsReadOnly = value.toBool();
- myFile->setReadOnly( myIsReadOnly );
- }
-}
-
-/*!
- SLOT: called if user click "Open File" button, shows dialog
-*/
-void QtxListResourceEdit::FileItem::onOpenFile()
-{
- if( !myFileDlg )
- {
- myFileDlg = new QFileDialog( "." );
- connect( myFileDlg, SIGNAL( fileHighlighted( const QString& ) ), this, SLOT( onFileSelected( const QString& ) ) );
- }
-
- myFileDlg->setCaption( title() );
- myFileDlg->setFilters( myFilter );
- myFileDlg->setMode( myIsExisting ? QFileDialog::ExistingFile : QFileDialog::AnyFile );
-
- if( myFileDlg->exec()==QDialog::Accepted )
- {
- QString selFile = QDir::convertSeparators( myFileDlg->selectedFile() );
- myFile->setText( selFile );
- }
-}
-
-/*!
- \return true if file satisfies permissions
- \param f - file name
-*/
-bool QtxListResourceEdit::FileItem::isFileCorrect( const QString& f ) const
-{
- bool res = false;
- QFileInfo info( f );
- if( !myIsExisting || info.exists() )
- res = info.isFile() && info.permission( myFlags );
-
- return res;
-}
-
-/*!
- SLOT: called if user has selected file in file dialog, checks file permissions and passes it's name to widget
- \param f - file name
-*/
-void QtxListResourceEdit::FileItem::onFileSelected( const QString& f )
-{
- if( myFileDlg && !isFileCorrect( f ) )
- myFileDlg->setSelection( "" );
-}
-
-
-/*!
- Constructor
-*/
-QtxListResourceEdit::FileItem::FileValidator::FileValidator( FileItem* item, QObject* parent )
-: QValidator( parent ),
- myItem( item )
-{
-}
-
-/*!
- Destructor
-*/
-QtxListResourceEdit::FileItem::FileValidator::~FileValidator()
-{
-}
-
-/*!
- Check file permissions
- \param f - file name
-*/
-QValidator::State QtxListResourceEdit::FileItem::FileValidator::validate( QString& f, int& ) const
-{
- if( myItem && myItem->isFileCorrect( f ) )
- return QValidator::Acceptable;
- else
- return QValidator::Intermediate;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxListResourceEdit.h
-// Author: Sergey TELKOV
-
-#ifndef QTXLISTRESOURCEEDIT_H
-#define QTXLISTRESOURCEEDIT_H
-
-#include "QtxResourceEdit.h"
-
-#include <qmap.h>
-#include <qhbox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qvalidator.h>
-
-class QLabel;
-class QListBox;
-class QLineEdit;
-class QCheckBox;
-class QComboBox;
-class QTabWidget;
-class QWidgetStack;
-
-class QtxIntSpinBox;
-class QtxDblSpinBox;
-
-class QtxDirListEditor;
-
-/*!
- \class QtxListResourceEdit
- GUI implementation of QtxResourceEdit - manager of resources
-*/
-
-class QTX_EXPORT QtxListResourceEdit : public QFrame, public QtxResourceEdit
-{
- Q_OBJECT
-
-public:
- class Tab;
- class Group;
- class Category;
- class PrefItem;
-
- class Spacer;
- class ColorItem;
- class StateItem;
- class SelectItem;
- class StringItem;
- class DoubleSpinItem;
- class DoubleEditItem;
- class IntegerSpinItem;
- class IntegerEditItem;
- class FontItem;
- class FileItem;
- class DirListItem;
-
- enum { Space, Bool, Color, String, Selector, DblSpin, IntSpin, Double, Integer, GroupBox, Font, DirList, File, User };
-
-public:
- QtxListResourceEdit( QtxResourceMgr*, QWidget* = 0 );
- virtual ~QtxListResourceEdit();
-
- virtual void setItemProperty( const int, const QString&, const QVariant& );
-
-signals:
- void resourceChanged( int );
- void resourceChanged( QString&, QString& );
- void resourcesChanged( const QMap<int, QString>& );
-
-private slots:
- void onSelectionChanged();
-
-protected:
- virtual void itemAdded( Item* );
- virtual Item* createItem( const QString&, const int );
- virtual void changedResources( const QMap<Item*, QString>& );
-
-private:
- void updateState();
- void updateVisible();
-
-private:
- QListBox* myList;
- QWidgetStack* myStack;
-};
-
-/*!
- \class QtxListResourceEdit::Category
- GUI implementation of 'Category' frame
-*/
-
-class QtxListResourceEdit::Category : public QFrame, public Item
-{
-public:
- Category( QtxListResourceEdit*, QWidget* = 0 );
- virtual ~Category();
-
- virtual bool isEmpty() const;
-
- virtual int type() const;
- virtual void store();
- virtual void retrieve();
-
- virtual QVariant property( const QString& ) const;
- virtual void setProperty( const QString&, const QVariant& );
-
-protected:
- virtual Item* createItem( const QString&, const int );
-
-private:
- void updateState();
-
-private:
- QLabel* myInfo;
- QTabWidget* myTabs;
-};
-
-/*!
- \class QtxListResourceEdit::Tab
- GUI implementation of resources tab.
-*/
-
-class QtxListResourceEdit::Tab : public QFrame, public Item
-{
-public:
- Tab( QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~Tab();
-
- virtual int type() const;
- virtual void store();
- virtual void retrieve();
-
-public:
- virtual void polish();
-
-protected:
- virtual Item* createItem( const QString&, const int );
-
-private:
- void adjustLabels();
-
-private:
- QWidget* myMainFrame;
-};
-
-/*!
- \class QtxListResourceEdit::Group
- GUI implementation of resources group.
-*/
-
-class QtxListResourceEdit::Group : public QGroupBox, public Item
-{
-public:
- Group( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~Group();
-
- virtual int type() const;
- virtual void store();
- virtual void retrieve();
-
- virtual QVariant property( const QString& ) const;
- virtual void setProperty( const QString&, const QVariant& );
-
- virtual void setTitle( const QString& );
-
-protected:
- virtual Item* createItem( const QString&, const int );
-};
-
-/*!
- \class QtxListResourceEdit::PrefItem
- Base class for preferences items.
-*/
-
-class QtxListResourceEdit::PrefItem : public QHBox, public Item
-{
-public:
- PrefItem( const int, QtxResourceEdit*, Item* = 0, QWidget* = 0 );
- virtual ~PrefItem();
-
- virtual int type() const;
-
-protected:
- virtual Item* createItem( const QString&, const int );
-
-private:
- int myType;
-};
-
-/*!
- \class QtxListResourceEdit::Spacer
- GUI implementation of resources spacer.
-*/
-
-class QtxListResourceEdit::Spacer : public PrefItem
-{
-public:
- Spacer( QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~Spacer();
-
- virtual void store();
- virtual void retrieve();
-};
-
-/*!
- \class QtxListResourceEdit::SelectItem
- GUI implementation of resources selector item.
-*/
-
-class QtxListResourceEdit::SelectItem : public PrefItem
-{
-public:
- SelectItem( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~SelectItem();
-
- virtual void store();
- virtual void retrieve();
-
- virtual QVariant property( const QString& ) const;
- virtual void setProperty( const QString&, const QVariant& );
-
-private:
- void setStrings( const QVariant& );
- void setIndexes( const QVariant& );
-
- void setStrings( const QStringList& );
- void setIndexes( const QValueList<int>& );
-
-private:
- QComboBox* myList;
- QMap<int, int> myIndex;
-};
-
-/*!
- \class QtxListResourceEdit::StateItem
- GUI implementation of resources bool item.
-*/
-class QtxListResourceEdit::StateItem : public PrefItem
-{
-public:
- StateItem( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~StateItem();
-
- virtual void store();
- virtual void retrieve();
-
-private:
- QCheckBox* myState;
-};
-
-/*!
- \class QtxListResourceEdit::StringItem
- GUI implementation of resources string item.
-*/
-
-class QtxListResourceEdit::StringItem : public PrefItem
-{
-public:
- StringItem( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~StringItem();
-
- virtual void store();
- virtual void retrieve();
-
-private:
- QLineEdit* myString;
-};
-
-/*!
- \class QtxListResourceEdit::IntegerEditItem
- GUI implementation of resources integer item.
-*/
-
-class QtxListResourceEdit::IntegerEditItem : public PrefItem
-{
-public:
- IntegerEditItem( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~IntegerEditItem();
-
- virtual void store();
- virtual void retrieve();
-
-private:
- QLineEdit* myInteger;
-};
-
-/*!
- \class QtxListResourceEdit::IntegerSpinItem
- GUI implementation of resources integer item.
-*/
-
-class QtxListResourceEdit::IntegerSpinItem : public PrefItem
-{
-public:
- IntegerSpinItem( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~IntegerSpinItem();
-
- virtual void store();
- virtual void retrieve();
-
- virtual QVariant property( const QString& ) const;
- virtual void setProperty( const QString&, const QVariant& );
-
-private:
- QtxIntSpinBox* myInteger;
-};
-
-/*!
- \class QtxListResourceEdit::DoubleEditItem
- GUI implementation of resources double item.
-*/
-
-class QtxListResourceEdit::DoubleEditItem : public PrefItem
-{
-public:
- DoubleEditItem( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~DoubleEditItem();
-
- virtual void store();
- virtual void retrieve();
-
-private:
- QLineEdit* myDouble;
-};
-
-/*!
- \class QtxListResourceEdit::DoubleSpinItem
- GUI implementation of resources double item.
-*/
-
-class QtxListResourceEdit::DoubleSpinItem : public PrefItem
-{
-public:
- DoubleSpinItem( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~DoubleSpinItem();
-
- virtual void store();
- virtual void retrieve();
-
- virtual QVariant property( const QString& ) const;
- virtual void setProperty( const QString&, const QVariant& );
-
-private:
- QtxDblSpinBox* myDouble;
-};
-
-/*!
- \class QtxListResourceEdit::ColorItem
- GUI implementation of resources color item.
-*/
-
-class QtxListResourceEdit::ColorItem : public PrefItem
-{
-public:
- ColorItem( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~ColorItem();
-
- virtual void store();
- virtual void retrieve();
-
-private:
- QWidget* myColor;
-};
-
-class QtxComboBox;
-class QToolButton;
-
-/*!
- \class QtxListResourceEdit::FontItem
- GUI implementation of resources font item.
-*/
-class QtxListResourceEdit::FontItem : public PrefItem
-{
- Q_OBJECT
-
-public:
- typedef enum
- {
- Family = 0x01,
- Size = 0x02,
- UserSize = 0x04,
- Bold = 0x08,
- Italic = 0x10,
- Underline = 0x20,
- Preview = 0x40,
-
- All = Family | Size | UserSize | Bold | Italic | Underline | Preview
-
- } WidgetFlags;
-
-public:
- FontItem( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~FontItem();
-
- virtual void store();
- virtual void retrieve();
-
- virtual QVariant property( const QString& ) const;
- virtual void setProperty( const QString&, const QVariant& );
-
-private slots:
- void onActivateFamily( int );
- void onPreview();
-
-private:
- void setFamily( const QString& );
- QString family() const;
- void setSize( const int );
- int size() const;
- void setParams( const bool, const bool, const bool );
- void params( bool&, bool&, bool& );
- void internalUpdate();
-
-private:
- int myFlags;
- bool myIsSystem;
- QtxComboBox *myFamilies, *mySizes;
- QCheckBox *myBold, *myItalic, *myUnderline;
- QToolButton *myPreview;
- QMap<QString, QVariant> myProperties;
-};
-
-
-/*!
- \class QtxListResourceEdit
- \brief GUI implementation of resources directory list item.
-*/
-class QtxListResourceEdit::DirListItem : public PrefItem
-{
- Q_OBJECT
-
-public:
-
- /*!
- * \brief Constructor
- */
- DirListItem( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- /*!
- * \brief Destructor
- */
- virtual ~DirListItem();
-
- /*!
- * \brief Stores the data
- */
- virtual void store();
-
- /*!
- * \brief Retrieves the data
- */
- virtual void retrieve();
-
-private:
- QtxDirListEditor* myDirListEditor; //!< The widget wich implements in GUI the list of directories
-};
-
-class QtxComboBox;
-class QToolButton;
-class QFileDialog;
-
-/*!
- \class QtxListResourceEdit::FontItem
- GUI implementation of resources font item.
-*/
-
-class QtxListResourceEdit::FileItem : public PrefItem
-{
- Q_OBJECT
-
-private:
- /*!
- \class QtxListResourceEdit::FileItem::FileValidator
- custom file validator: checks files on some rights
- */
-
- class FileValidator : public QValidator
- {
- public:
- FileValidator( FileItem*, QObject* );
- ~FileValidator();
-
- virtual QValidator::State validate( QString&, int& ) const;
-
- private:
- FileItem* myItem;
- };
-
-public:
- FileItem( const QString&, QtxResourceEdit*, Item*, QWidget* = 0 );
- virtual ~FileItem();
-
- virtual void store();
- virtual void retrieve();
-
- virtual QVariant property( const QString& ) const;
- virtual void setProperty( const QString&, const QVariant& );
-
- virtual bool isFileCorrect( const QString& ) const;
-
-private slots:
- void onOpenFile();
- void onFileSelected( const QString& );
-
-private:
- uint myFlags;
- bool myIsReadOnly;
- QStringList myFilter;
- bool myIsExisting;
- QLineEdit* myFile;
- QToolButton* myOpenFile;
- QFileDialog* myFileDlg;
-};
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "QtxListView.h"
-
-#include <qheader.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-
-static const char* list_xpm[] = {
-"16 16 6 1",
-". c None",
-"a c #E3E9EB",
-"b c #798391",
-"c c #EBEBEB",
-"d c #ABB4BE",
-"e c #030E1F",
-"................",
-"................",
-"................",
-"...aaaaaaaaaa...",
-"..abbbbbbbbbbe..",
-"..abecbecbecbe..",
-"..abbbbbbbbbbe..",
-"..abecbecbecbe..",
-"..abecaaaaaaaa..",
-"..abeccdbbbbbb..",
-"..abecccdbbbbe..",
-"..abbbbe.dbbe...",
-"...eeeee..de....",
-"................",
-"................",
-"................" };
-
-/*!
- Constructor
-*/
-QtxListView::QtxListView( const int state, QWidget* parent, const char* name, WFlags f )
-: QListView( parent, name, f ),
-myButton( 0 ),
-myHeaderState( state )
-{
- initialize();
-}
-
-/*!
- Constructor
-*/
-QtxListView::QtxListView( QWidget* parent, const char* name, WFlags f )
-: QListView( parent, name, f ),
-myButton( 0 ),
-myHeaderState( HeaderAuto )
-{
- initialize();
-}
-
-/*!
- Initialization
-*/
-void QtxListView::initialize()
-{
- if ( myHeaderState == HeaderButton )
- {
- QPixmap p( list_xpm );
-
- QPushButton* but = new QPushButton( this );
- but->setDefault( false );
- but->setFlat( true );
- but->setIconSet( p );
- but->setBackgroundPixmap( p );
- if ( p.mask() )
- but->setMask( *p.mask() );
- myButton = but;
-
- connect( myButton, SIGNAL( clicked() ), this, SLOT( onButtonClicked() ) );
- }
- else
- {
- header()->installEventFilter( this );
- }
-
- myPopup = new QPopupMenu( this );
- connect( myPopup, SIGNAL( activated( int ) ), this, SLOT( onShowHide( int ) ) );
- connect( header(), SIGNAL( sizeChange( int, int, int ) ), this, SLOT( onHeaderResized() ) );
-}
-
-/*!
- Destructor
-*/
-QtxListView::~QtxListView()
-{
-}
-
-/*!
- Add new column
- \param label - column title
- \param width - column width
-*/
-int QtxListView::addColumn( const QString& label, int width )
-{
- int res = QListView::addColumn( label, width );
- for ( int i = myAppropriate.count(); i <= res; i++ )
- myAppropriate.append( 1 );
- onHeaderResized();
- return res;
-}
-
-/*!
- Add new column
- \param iconset - column icon
- \param label - column title
- \param width - column width
-*/
-int QtxListView::addColumn( const QIconSet& iconset, const QString& label, int width )
-{
- int res = QListView::addColumn( iconset, label, width );
- for ( int i = myAppropriate.count(); i <= res; i++ )
- myAppropriate.append( 1 );
- onHeaderResized();
- return res;
-}
-
-/*!
- Removes column
- \param index - column index
-*/
-void QtxListView::removeColumn( int index )
-{
- QListView::removeColumn( index );
- if ( index >= 0 && index < (int)myAppropriate.count() )
- myAppropriate.remove( myAppropriate.at( index ) );
- onHeaderResized();
-}
-
-/*!
- \return true if column is situated in popup for show/hide columns
-*/
-bool QtxListView::appropriate( const int index ) const
-{
- return index >= 0 && index < (int)myAppropriate.count() && myAppropriate[index];
-}
-
-/*!
- Sets appropriate state: whether column is situated in popup for show/hide columns
- \param index - column index
- \param on - new state
-*/
-void QtxListView::setAppropriate( const int index, const bool on )
-{
- if ( index < 0 || index >= (int)myAppropriate.count() )
- return;
-
- myAppropriate[index] = on ? 1 : 0;
-}
-
-/*!
- Resizes list view and header
-*/
-void QtxListView::resize( int w, int h )
-{
- QListView::resize( w, h );
- onHeaderResized();
-}
-
-/*!
- Shows list view
-*/
-void QtxListView::show()
-{
- QListView::show();
- onHeaderResized();
-}
-
-/*!
- Update on resize contents
-*/
-void QtxListView::resizeContents( int w, int h )
-{
-/*
- if ( myButton && myButton->isVisibleTo( myButton->parentWidget() ) )
- {
- if ( header()->orientation() == Qt::Horizontal )
- w += myButton->width();
- else
- h += myButton->width();
- }
-*/
- QListView::resizeContents( w, h );
-
- onHeaderResized();
-}
-
-/*!
- Shows column
- \param ind - column index
-*/
-void QtxListView::show( int ind )
-{
- setShown( ind, true );
-}
-
-/*!
- Hides column
- \param ind - column index
-*/
-void QtxListView::hide( int ind )
-{
- setShown( ind, false );
-}
-
-/*!
- \return true if column is shown
- \param ind - column index
-*/
-bool QtxListView::isShown( int ind ) const
-{
- if ( ind>=0 && ind<header()->count() )
- return columnWidth( ind ) > 0 || header()->isResizeEnabled( ind );
- else
- return false;
-}
-
-/*!
- Shows/hides column
- \param ind - column index
- \param sh - new is shown state
-*/
-void QtxListView::setShown( int ind, bool sh )
-{
- if( ind<0 || ind>=header()->count() || isShown( ind )==sh )
- return;
-
- ColumnData& data = myColumns[ind];
- if ( sh )
- {
- int w = data.width;
- bool resizeable = data.resizeable;
- myColumns.remove( ind );
-
- setColumnWidth( ind, w );
- header()->setResizeEnabled( resizeable, ind );
- }
- else
- {
- int w = columnWidth( ind );
- bool r = header()->isResizeEnabled( ind );
- setColumnWidth( ind, 0 );
- header()->setResizeEnabled( false, ind );
- data.width = w;
- data.resizeable = r;
- }
- updateContents();
-}
-
-/*!
- Changes column width
- \param c - column index
- \param w - new width
-*/
-void QtxListView::setColumnWidth( int c, int w )
-{
- if ( myColumns.contains( c ) )
- myColumns[c].width = w;
-
- QListView::setColumnWidth( c, !myColumns.contains( c ) ? w : 0 );
-}
-
-/*!
- \return the recommended size for the widget
-*/
-QSize QtxListView::sizeHint() const
-{
- QSize sz = QListView::sizeHint();
-
- if ( myButton && myButton->isVisibleTo( myButton->parentWidget() ) )
- sz.setWidth( sz.width() + 2 + myButton->width() );
-
- return sz;
-}
-
-/*!
- \return the recommended minimum size for the widget
-*/
-QSize QtxListView::minimumSizeHint() const
-{
- QSize sz = QListView::minimumSizeHint();
-
- if ( myButton && myButton->isVisibleTo( myButton->parentWidget() ) )
- sz.setWidth( sz.width() + 2 + myButton->width() );
-
- return sz;
-}
-
-/*!
- SLOT: called if header is resized
-*/
-void QtxListView::onHeaderResized()
-{
- if ( myHeaderState == HeaderAuto )
- {
- int c = 0;
- for ( int i = 0; i < columns(); i++ )
- {
- if ( !header()->label( i ).isEmpty() ||
- ( header()->iconSet( i ) && !header()->iconSet( i )->isNull() ) )
- c++;
- }
-
- if ( c > 1 )
- header()->show();
- else
- header()->hide();
- }
-
- if ( !myButton || !header()->isVisibleTo( this ) )
- return;
-
- int lw = lineWidth();
- int h = header()->size().height() - 1;
- myButton->setFixedSize( h, h );
-
- int x = header()->headerWidth() - header()->offset() + 2;
- if ( x < header()->width() - h )
- x = header()->width() - h;
-
- if ( myHeaderState == HeaderButton )
- {
- if ( header()->orientation() == Qt::Horizontal )
- myButton->move( lw+x, lw );
- else
- myButton->move( lw, lw+x );
- }
-}
-
-/*!
- Shows popup filled with column names to show/hide column
- \param x, y - position of popup
-*/
-void QtxListView::showPopup( const int x, const int y )
-{
- myPopup->clear();
- for ( int i = 0; i < columns(); i++ )
- {
- if ( appropriate( i ) )
- {
- int id = myPopup->insertItem( header()->label( i ), i );
- myPopup->setItemChecked( id, isShown( i ) );
- }
- }
-
- if( myPopup->count() )
- myPopup->exec( mapToGlobal( QPoint( x, y ) ) );
-}
-
-/*!
- SLOT: shows popup on button ".." click
-*/
-void QtxListView::onButtonClicked()
-{
- if ( myHeaderState != HeaderButton )
- return;
-
- int x = myButton->x(),
- y = myButton->y() + myButton->height();
-
- showPopup( x, y );
-}
-
-/*!
- SLOT: called on popup action is activated, toggles shown state of column
- \param id - column index
-*/
-void QtxListView::onShowHide( int id )
-{
- //if ( myHeaderState != HeaderButton )
- // return;
-
- setShown( id, !isShown( id ) );
-}
-
-/*!
- Receives all resize events sent to the viewport
-*/
-void QtxListView::viewportResizeEvent( QResizeEvent* e )
-{
- QListView::viewportResizeEvent( e );
- onHeaderResized();
-}
-
-/*!
- Custom event filter, shows popup on right button click
-*/
-bool QtxListView::eventFilter( QObject* o, QEvent* e )
-{
- if( o==header() && e->type()==QEvent::MouseButtonPress )
- {
- QMouseEvent* me = ( QMouseEvent* )e;
- if( me->button()==Qt::RightButton )
- {
- showPopup( me->x()+2, me->y()+2 );
- return true;
- }
- }
-
- return QListView::eventFilter( o, e );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 QTXLISTVIEW_H
-#define QTXLISTVIEW_H
-
-#include "Qtx.h"
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-#include <qlistview.h>
-#include <qiconset.h>
-
-class QButton;
-class QPopupMenu;
-
-class QTX_EXPORT QtxListView : public QListView
-{
- Q_OBJECT
-
-public:
- enum { HeaderAuto, HeaderButton, NoHeaderButton };
-
-public:
- QtxListView( QWidget* = 0, const char* = 0, WFlags = 0 );
- QtxListView( const int, QWidget* = 0, const char* = 0, WFlags = 0 );
- virtual ~QtxListView();
-
- virtual int addColumn( const QString&, int = -1 );
- virtual int addColumn( const QIconSet&, const QString&, int width = -1 );
-
- virtual void removeColumn( int );
-
- virtual void resize( int, int );
-
- void show( int );
- void hide( int );
-
- bool isShown( int ) const;
- void setShown( int, bool );
-
- bool appropriate( const int ) const;
- virtual void setAppropriate( const int, const bool );
-
- virtual void setColumnWidth( int, int );
-
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
-
-public slots:
- virtual void show();
- virtual void resizeContents( int, int );
-
-protected slots:
- void onHeaderResized();
- void onButtonClicked();
- void onShowHide( int );
-
-protected:
- virtual void viewportResizeEvent( QResizeEvent* );
- virtual bool eventFilter( QObject*, QEvent* );
- virtual void showPopup( const int x, const int y );
-
-private:
- typedef struct { int width; bool resizeable; } ColumnData;
- typedef QMap<int, ColumnData> ColumnsMap;
-
-private:
- void initialize();
-
-private:
- QPopupMenu* myPopup;
- QButton* myButton;
- ColumnsMap myColumns;
- QIntList myAppropriate;
- int myHeaderState;
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxMenuButton.cxx
-// Author: Sergey TELKOV
-
-#include "QtxMenuButton.h"
-
-#include <qstyle.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qpointarray.h>
-#include <qapplication.h>
-
-class QtxMenuButton::PopupMenu : public QPopupMenu
-{
-public:
- PopupMenu( QtxMenuButton* mb ) : QPopupMenu( mb ), myMenuButton( mb ) {};
- virtual ~PopupMenu() {};
-
- virtual void setMinimumSize( int, int );
-
-private:
- QtxMenuButton* myMenuButton;
-};
-
-/*!
- Sets the widget's minimum size
- \param w - width
- \param h - height
-*/
-void QtxMenuButton::PopupMenu::setMinimumSize( int w, int h )
-{
- if ( myMenuButton->isAlignWidth() &&
- ( myMenuButton->position() == Top || myMenuButton->position() == Bottom ) )
- w = QMAX( w, myMenuButton->width() );
-
- QPopupMenu::setMinimumSize( w, h );
-}
-
-
-/*!
- Constructor
- \param pos - position
- \param parent - parent widget
- \param name - name
-*/
-QtxMenuButton::QtxMenuButton( int pos, QWidget* parent, const char* name )
-: QPushButton( parent, name ),
-myPos( pos )
-{
- initialize();
-}
-
-/*!
- Constructor
- \param text - button text
- \param parent - parent widget
- \param name - name
-*/
-QtxMenuButton::QtxMenuButton( const QString& text, QWidget* parent, const char* name )
-: QPushButton( parent, name ),
-myPos( Bottom )
-{
- setText( text );
- initialize();
-}
-
-/*!
- Constructor
- \param pos - position
- \param text - button text
- \param parent - parent widget
- \param name - name
-*/
-QtxMenuButton::QtxMenuButton( int pos, const QString& text, QWidget* parent, const char* name )
-: QPushButton( parent, name ),
-myPos( pos )
-{
- setText( text );
- initialize();
-}
-
-/*!
- Constructor
- \param parent - parent widget
- \param name - name
-*/
-QtxMenuButton::QtxMenuButton( QWidget* parent, const char* name )
-: QPushButton( parent, name ),
-myPos( Bottom )
-{
- initialize();
-}
-
-/*!
- Destructor
-*/
-QtxMenuButton::~QtxMenuButton()
-{
-}
-
-/*!
- Initialization
-*/
-void QtxMenuButton::initialize()
-{
- myArrow = true;
- myAlign = true;
-
- setAutoDefault( false );
- myPopup = new PopupMenu( this );
- myPopup->hide();
-
- connect( myPopup, SIGNAL( activated( int ) ), this, SIGNAL( activated( int ) ) );
- connect( this, SIGNAL( clicked() ), this, SLOT( onShowPopup() ) );
-}
-
-/*!
- \return position
-*/
-int QtxMenuButton::position() const
-{
- return myPos;
-}
-
-/*!
- \return true if align is enabled
-*/
-bool QtxMenuButton::isAlignWidth() const
-{
- return myAlign;
-}
-
-/*!
- \return true if arrow is shown
-*/
-bool QtxMenuButton::isArrowEnabled() const
-{
- return myArrow;
-}
-
-/*!
- Changes position
- \param pos - new position
-*/
-void QtxMenuButton::setPosition( const int pos )
-{
- if ( myPos == pos )
- return;
-
- myPos = pos;
- if ( myPopup->isVisible() )
- onShowPopup();
-}
-
-/*!
- Changes align state
- \param on - new align state
-*/
-void QtxMenuButton::setAlignWidth( const bool on )
-{
- if ( myAlign == on )
- return;
-
- myAlign = on;
- updateGeometry();
-}
-
-/*!
- Enables/disable arrow
- \param on - new enabled state
-*/
-void QtxMenuButton::setArrowEnabled( const bool on )
-{
- if ( myArrow == on )
- return;
-
- myArrow = on;
- repaint();
-}
-
-/*!
- Clears popup
-*/
-void QtxMenuButton::clear()
-{
- if ( myPopup )
- myPopup->clear();
- onShowPopup();
- updateGeometry();
-}
-
-/*!
- Removes item from popup
- \param id - item id
-*/
-void QtxMenuButton::removeItem( int id )
-{
- if ( myPopup )
- myPopup->removeItem( id );
- updateGeometry();
-}
-
-/*!
- Inserts separator into popup
- \param id - position
-*/
-int QtxMenuButton::insertSeparator( int id )
-{
- int res = -1;
- if ( myPopup )
- res = myPopup->insertSeparator( id );
- return res;
-}
-
-/*!
- Inserts item into popup
- \param t - menu text
- \param id - item id
- \param index - position
-*/
-int QtxMenuButton::insertItem( const QString& t, int id, int index )
-{
- int resId = -1;
- if ( myPopup )
- resId = myPopup->insertItem( t, id, index );
-
- if ( resId != -1 )
- updateGeometry();
-
- return resId;
-}
-
-/*!
- Inserts item into popup
- \param is - icons
- \param t - menu text
- \param id - item id
- \param index - position
-*/
-int QtxMenuButton::insertItem( const QIconSet& is, const QString& t, int id, int index )
-{
- int resId = -1;
- if ( myPopup )
- resId = myPopup->insertItem( is, t, id, index );
-
- if ( resId != -1 )
- updateGeometry();
-
- return resId;
-}
-
-/*!
- SLOT: calls when button is clicked, shows popup
-*/
-void QtxMenuButton::onShowPopup()
-{
- if ( !myPopup || !myPopup->count() )
- {
- myPopup->hide();
- return;
- }
-
- QPoint p = mapToGlobal( QPoint( 0, 0 ) );
- int x = p.x();
- int y = p.y() + 1;
- int margin = 0;
- int xoffset = 0;
- int yoffset = 0;
- switch ( position() )
- {
- case Left:
- xoffset = -1 * ( myPopup->sizeHint().width() + margin );
- break;
- case Right:
- xoffset = width() + margin;
- break;
- case Top:
- yoffset = -1 * ( myPopup->sizeHint().height() + margin );
- break;
- case Bottom:
- default:
- yoffset = height() + margin;
- break;
- }
- int dw = QApplication::desktop()->width();
- int dh = QApplication::desktop()->height();
- x = QMIN( QMAX( x + xoffset, 0 ), dw );
- y = QMIN( QMAX( y + yoffset, 0 ), dh );
-
- myPopup->exec( QPoint( x, y ) );
-}
-
-/*!
- Custom event handler
-*/
-bool QtxMenuButton::event( QEvent* e )
-{
- if ( e->type() == QEvent::MouseButtonPress ||
- e->type() == QEvent::MouseButtonDblClick ||
- e->type() == QEvent::MouseButtonRelease )
- {
- onShowPopup();
- return false;
- }
-
- return QPushButton::event( e );
-}
-
-/*!
- \return the recommended size for the widget
-*/
-QSize QtxMenuButton::sizeHint() const
-{
- QSize sz = QPushButton::sizeHint();
- if ( ( position() == Top || position() == Bottom ) && myPopup && myAlign )
- sz = QSize( QMAX( sz.width(), myPopup->sizeHint().width() ), sz.height() );
-
- return sz;
-}
-
-/*!
- \return the recommended minimum size for the widget
-*/
-QSize QtxMenuButton::minimumSizeHint() const
-{
- QSize sz = QPushButton::minimumSizeHint();
- if ( ( position() == Top || position() == Bottom ) && myPopup && myAlign )
- sz = QSize( QMAX( sz.width(), myPopup->sizeHint().width() ), sz.height() );
-
- return sz;
-}
-
-/*!
- Custom resize event handler
-*/
-void QtxMenuButton::resizeEvent( QResizeEvent* re )
-{
- if ( re )
- QPushButton::resizeEvent( re );
-
- if ( ( position() == Top || position() == Bottom ) && myPopup && myAlign )
- myPopup->setMinimumWidth( re ? re->size().width() : width() );
-}
-
-/*!
- \return corresponding popup
-*/
-QPopupMenu* QtxMenuButton::popup() const
-{
- return myPopup;
-}
-
-/*!
- Draws label
-*/
-void QtxMenuButton::drawButtonLabel( QPainter* p )
-{
- QPushButton::drawButtonLabel( p );
-/*
- QStyle::SFlags flags = QStyle::Style_Default;
- if ( isEnabled() )
- flags |= QStyle::Style_Enabled;
- if ( hasFocus() )
- flags |= QStyle::Style_HasFocus;
-*/
-#if QT_VER < 3
- QRect r = rect();
-#else
- QRect r = style().subRect( QStyle::SR_PushButtonContents, this );
-#endif
-
- if ( myArrow && myPopup && myPopup->count() )
- {
- int w = 7;
- int h = 7;
- int margin = 5;
-
- QRect ar( 0, 0, w, h );
- if ( position() == Left || position() == Top )
- r.moveBy( ar.width() + 2 * margin, 0 );
- else
- ar.moveBy( r.width() - ar.width() - 2 * margin, 0 );
-
- r.setWidth( r.width() - ar.width() - 2 * margin );
-
- ar.moveBy( margin, ( height() - h ) / 2 );
-
- QPointArray arrow( 3 );
- switch ( position() )
- {
- case Left:
- arrow.putPoints( 0, 3, ar.left(), ar.top() + ar.height() / 2, ar.right(), ar.top(), ar.right(), ar.bottom() );
- break;
- case Right:
- arrow.putPoints( 0, 3, ar.left(), ar.top(), ar.left(), ar.bottom(), ar.right(), ar.top() + ar.height() / 2 );
- break;
- case Top:
- arrow.putPoints( 0, 3, ar.left(), ar.bottom(), ar.right(), ar.bottom(), ar.left() + ar.width() / 2, ar.top() );
- break;
- case Bottom:
- default:
- arrow.putPoints( 0, 3, ar.left(), ar.top(), ar.right(), ar.top(), ar.left() + ar.width() / 2, ar.bottom() );
- break;
- }
-
- p->setPen( colorGroup().text() );
- p->setBrush( colorGroup().text() );
- p->drawPolygon( arrow, true );
- }
-
-// style().drawControl( QStyle::CE_PushButtonLabel, p, this, r, colorGroup(), flags );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxMenuButton.h
-// Author: Sergey TELKOV
-
-#ifndef QTXMENUBUTTON_H
-#define QTXMENUBUTTON_H
-
-#include "Qtx.h"
-
-#include <qpushbutton.h>
-
-class QIconSet;
-class QPopupMenu;
-
-class QTX_EXPORT QtxMenuButton : public QPushButton
-{
- Q_OBJECT
-
- class PopupMenu;
-
-public:
- enum { Left, Right, Top, Bottom };
-
-public:
- QtxMenuButton( int, QWidget* = 0, const char* = 0 );
- QtxMenuButton( const QString&, QWidget* = 0, const char* = 0 );
- QtxMenuButton( int, const QString&, QWidget* = 0, const char* = 0 );
- QtxMenuButton( QWidget* = 0, const char* = 0 );
- virtual ~QtxMenuButton();
-
- int position() const;
- void setPosition( const int );
-
- bool isAlignWidth() const;
- void setAlignWidth( const bool );
-
- bool isArrowEnabled() const;
- void setArrowEnabled( const bool );
-
- void clear();
- void removeItem( int );
- int insertSeparator( int = -1 );
- int insertItem( const QString&, int = -1, int = -1 );
- int insertItem( const QIconSet&, const QString&, int = -1, int = -1 );
-
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
-
-signals:
- void activated( int );
-
-private slots:
- void onShowPopup();
-
-protected:
- QPopupMenu* popup() const;
- virtual bool event( QEvent* );
- virtual void resizeEvent( QResizeEvent* );
- virtual void drawButtonLabel( QPainter* );
-
-private:
- void initialize();
-
-private:
- int myPos;
- bool myArrow;
- bool myAlign;
- QPopupMenu* myPopup;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "QtxOperations.h"
-
-/*!
- Default constructor
-*/
-QtxOperations::QtxOperations()
-{
-}
-
-/*!
- Destructor
-*/
-QtxOperations::~QtxOperations()
-{
-}
-
-/*!
- Creates QtxValue by it's string representation
-*/
-bool QtxOperations::createValue( const QString& str, QtxValue& v ) const
-{
- v = str;
- return false;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxOperations.h
-// Author: Alexander SOLOVYOV
-
-#ifndef __QTX_OPERATIONS_HEADER__
-#define __QTX_OPERATIONS_HEADER__
-
-#include "Qtx.h"
-#include "QtxParser.h"
-
-class QTX_EXPORT QtxOperations
-{
-public:
- QtxOperations();
- virtual ~QtxOperations();
-
- virtual void opersList( QStringList& ) const = 0;
- //list of possible operations
-
- virtual void bracketsList( QStringList&, bool open ) const = 0;
- //list of open/close brackets
-
- virtual bool createValue( const QString&, QtxValue& ) const;
- //by default, the String value will be set, it corresponds to parameter
- //base method returns false (always parameter)
- //successor's method returns true if it has created custom value
- //or call base if it hasn't
-
- virtual int prior( const QString&, bool isBin ) const = 0;
- //returns prioritet of operation;
- //if operation is impossible, it must return 0 or less
-
- virtual QtxParser::Error isValid( const QString&,
- const QVariant::Type,
- const QVariant::Type ) const = 0;
- //return OK if this parameter types is valid for operation
- //return OperandsNotMatch or InvalidOperation otherwise
-
- virtual QtxParser::Error calculate( const QString&, QtxValue&, QtxValue& ) const = 0;
- //process binary operation with values
- //for unary operation the second QtxValue will be passed as invalid
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "QtxParser.h"
-#include "QtxOperations.h"
-
-/*!
- Constructor
-*/
-QtxParser::QtxParser( QtxOperations* operations, const QString& expr )
-: myOperations( operations )
-{
- if( myOperations )
- {
- setLastError( OK );
- setExpr( expr );
- }
- else
- setLastError( OperationsNull );
-}
-
-/*!
- Destructor
-*/
-QtxParser::~QtxParser()
-{
-}
-
-/*!
- Search elements of list as substrings starting on 'offset'
- \returns the least position of substrings inside string
- \param list - list of substrings
- \param str - string where search
- \param offset - starting index for search
- \param matchLen - the length of appropriate substring
- \param listind - list index of appropriate substring
-*/
-int QtxParser::search( const QStringList& list, const QString& str, int offset,
- int& matchLen, int& listind )
-{
- QStringList::const_iterator anIt = list.begin(), aLast = list.end();
- int min = -1;
- for( int ind = 0; anIt!=aLast; anIt++, ind++ )
- {
- //const char* where = str.latin1(), *what = (*anIt).latin1();
- int pos = str.find( *anIt, offset );
- if( pos>=0 && ( min < 0 || min > pos ||
- ( min==pos && matchLen< (int)(*anIt).length() ) ) )
- {
- min = pos;
- listind = ind;
- matchLen = (*anIt).length();
- }
- }
- if( min<0 )
- matchLen = 0;
- return min;
-}
-
-/*!
- \return substring
- \param str - string
- \param pos - start position of substring
- \param len - length of substring
-*/
-QString QtxParser::note( const QString& str, int pos, int len )
-{
- return str.mid( pos, len ).stripWhiteSpace();
-}
-
-/*!
- First step of parsing: finding tokens, determining its types and creating of unsorted pseudo-postfix (with brackets)
- \param expr - string expression
- \param post - postfix to be created
-*/
-bool QtxParser::prepare( const QString& expr, Postfix& post )
-{
- int pos = 0, len = expr.length();
- QValueStack< int > aBracketStack;
- QStringList anOpers, anOpenBr, aCloseBr;
- if( myOperations )
- {
- myOperations->bracketsList( anOpenBr, true );
- myOperations->bracketsList( aCloseBr, false );
- myOperations->opersList( anOpers );
- }
- else
- {
- setLastError( OperationsNull );
- return false;
- }
-
- while( pos < len && lastError()==OK )
- {
- PostfixItem item;
- while( expr[ pos ].isSpace() && pos<len ) pos++;
- if( pos>=len )
- break;
-
- int mBrLen = 0, mLen = 0, br_ind = -1, op_ind = -1;
- int oPos = search( anOpenBr, expr, pos, mBrLen, br_ind ),
- cPos = oPos==pos ? -1 : search( aCloseBr, expr, pos, mBrLen, br_ind ),
- opPos = search( anOpers, expr, pos, mLen, op_ind );
-
- if( expr[ pos ]=="'" )
- {
- int vpos = pos+1;
- while ( vpos< (int)expr.length() && expr[ vpos ]!="'" )
- vpos++;
-
- mLen = vpos-pos+1;
-
- int res = myOperations->createValue( note( expr, pos, mLen ), item.myValue );
- item.myType = res ? Value : Param;
- post.append( item );
- pos = vpos+1;
- continue;
- }
-
- if( oPos==pos )
- {
- aBracketStack.push( br_ind );
- item.myValue = note( expr, pos, mBrLen );
- item.myType = Open;
- post.append( item );
- }
-
- else if( cPos==pos )
- {
- if( aBracketStack.count()==0 )
- {
- setLastError( ExcessClose );
- break;
- }
- if( br_ind!=aBracketStack.top() )
- {
- setLastError( BracketsNotMatch );
- break;
- }
- else
- {
- aBracketStack.pop();
- item.myValue = note( expr, pos, mBrLen );
- item.myType = Close;
- post.append( item );
- }
- }
- else
- mBrLen = 0;
-
- if( opPos==pos )
- {
- mBrLen = 0;
- item.myValue = note( expr, pos, mLen );
- item.myType = Binary;
- //the type is set by default;
- //the method setOperationTypes will set correct types
-
- if( oPos==pos )
- post.insert( post.at( post.count()-1 ), item );
- else
- post.append( item );
- }
- else
- {
- mLen = 0;
- if( oPos!=pos && cPos!=pos )
- {
- int i;
- for( i=pos+1; i<(int)expr.length(); i++ )
- if( expr[ i ].isSpace() )
- break;
-
- int vpos = i;
- if( oPos>=0 && oPos<vpos )
- vpos = oPos;
- if( cPos>=0 && cPos<vpos )
- vpos = cPos;
- if( opPos>=0 && opPos<vpos )
- vpos = opPos;
-
- while( vpos<(int)expr.length() &&
- ( expr[vpos].isLetter() || expr[vpos].isDigit() || expr[vpos]=='_' ) )
- vpos++;
-
- mLen = vpos-pos;
- bool res = myOperations->createValue( note( expr, pos, mLen ), item.myValue );
- item.myType = res ? Value : Param;
- post.append( item );
- }
- }
-
- pos+=mBrLen+mLen;
- }
-
- //Bracket checking
- PostfixIterator anIt = post.begin(),
- aLast = post.end();
- int brValue = 0;
- for( ; anIt!=aLast; anIt++ )
- if( (*anIt).myType==Open )
- brValue++;
- else if( (*anIt).myType==Close )
- if( brValue>0 )
- brValue--;
- else
- {
- setLastError( ExcessClose );
- break;
- }
- if( brValue>0 )
- setLastError( CloseExpected );
-
- return lastError()==OK;
-}
-
-/*!
- Second step of parsing: determining types of operations
- \param post - unsorted postfix
-*/
-bool QtxParser::setOperationTypes( Postfix& post )
-{
- Postfix::iterator aStart = post.begin(),
- aLast = post.end(),
- anIt = aStart, aPrev, aNext;
- QStringList anOpen, aClose;
- if( myOperations )
- {
- myOperations->bracketsList( anOpen, true );
- myOperations->bracketsList( aClose, false );
- }
- else
- return false;
-
- for( ; anIt!=aLast; anIt++ )
- {
- aPrev = anIt; aPrev--;
- aNext = anIt; aNext++;
- if( (*anIt).myType != Binary )
- continue;
-
- if( ( anIt==aStart || (*aPrev).myType == Open ||
- (*aPrev).myType == Pre ||
- (*aPrev).myType == Binary )
- &&
- aNext!=aLast && ( (*aNext).myType == Value ||
- (*aNext).myType == Param ||
- (*aNext).myType == Open ||
- (*aNext).myType == Binary ) )
- (*anIt).myType = Pre;
-
- else if( anIt!=aStart && ( (*aPrev).myType == Close ||
- (*aPrev).myType == Param ||
- (*aPrev).myType == Value ||
- (*aPrev).myType == Pre ||
- (*aPrev).myType == Post ||
- (*aPrev).myType == Binary )
- &&
- ( aNext==aLast || (*aNext).myType == Close ) )
- (*anIt).myType = Post;
-
- if( anOpen.contains( ( *anIt ).myValue.toString() )>0 )
- (*anIt).myType = Pre;
- else if( aClose.contains( ( *anIt ).myValue.toString() )>0 )
- (*anIt).myType = Post;
- }
-
- return lastError()==OK;
-}
-
-/*!
- \return how many global brackets there is (for example '((2+3))' has 2 global brackets)
- \param post - postfix to be checked
- \param f - start index to search
- \param l - last index to search
-*/
-int QtxParser::globalBrackets( const QtxParser::Postfix& post, int f, int l )
-{
- int i,
- start_br = 0,
- fin_br = 0,
- br = 0,
- br_num = 0,
- min_br_num = (l-f+1)*5;
-
- for( i=f; i<=l; i++ )
- if( post[ i ].myType==QtxParser::Open )
- start_br++;
- else
- break;
- for( i=l; i>=f; i-- )
- if( post[ i ].myType==QtxParser::Close )
- fin_br++;
- else
- break;
-
- br = start_br<fin_br ? start_br : fin_br;
- for( i=f+br; i<=l-br; i++ )
- {
- if( post[i].myType==QtxParser::Open )
- br_num++;
- else if( post[i].myType==QtxParser::Close )
- br_num--;
- if( br_num<min_br_num )
- min_br_num = br_num;
- }
-
- return br+min_br_num;
-}
-
-/*!
- Third step of parsing: sorting of postfix in order to convert it to real postfix
- \param post - source postfix
- \param res - destination postfix
- \param anOpen - list of open brackets
- \param aClose - list of close brackets
- \param f - start index of postfix to sorting
- \param l - last index of postfix to sorting
-*/
-bool QtxParser::sort( const Postfix& post, Postfix& res,
- const QStringList& anOpen,
- const QStringList& aClose,
- int f, int l )
-{
- if( l<f )
- return true;
-
- if( f<0 )
- f = 0;
- if( l<0 )
- l = post.count()-1;
-
- int br = globalBrackets( post, f, l );
- f+=br; l-=br;
-
- if( f==l && f>=0 )
- res.append( post[ f ] );
- if( l<=f )
- return true;
-
- if( myOperations )
- {
- int min = -1;
- QIntList argmin;
- QValueList< PostfixItemType > min_types;
-
- //Find operation with minimal priority
- //PostfixIterator anIt = post.at( f ),
- // aLast = post.at( l+1 );
- for( int i=0, j=f; j<=l; i++, j++ )
- {
- const PostfixItem& item = post[ j ];
- PostfixItemType tt = item.myType;
- if( tt==Binary || tt==Pre || tt==Post )
- {
- int cur_pr = myOperations->prior( item.myValue.toString(), tt==Binary );
- if( cur_pr>0 )
- {
- if( min<0 || min>=cur_pr )
- {
- if( min==cur_pr )
- {
- argmin.append( f+i );
- min_types.append( tt );
- }
- else
- {
- min = cur_pr;
- argmin.clear(); argmin.append( f+i );
- min_types.clear(); min_types.append( tt );
- }
- }
- }
- else
- {
- setLastError( InvalidOperation );
- break;
- }
- }
- else if( tt==Open )
- {
- QString opBr = item.myValue.toString();
- int ind = anOpen.findIndex( opBr ), brValue = 0;
- while( j<=l )
- {
- const PostfixItem& anItem = post[ j ];
- if( anItem.myType==Open )
- brValue++;
-
- if( anItem.myType==Close )
- {
- brValue--;
- QString clBr = anItem.myValue.toString();
- if( aClose.findIndex( clBr )==ind && brValue==0 )
- break;
- }
- i++; j++;
- }
- if( brValue>0 )
- {
- setLastError( CloseExpected );
- break;
- }
- }
- }
-
- if( lastError()==OK )
- if( min>=0 )
- {
- QValueList< Postfix > parts;
- QIntList::const_iterator anIt = argmin.begin(),
- aLast = argmin.end();
- Postfix one;
- bool ok = sort( post, one, anOpen, aClose, f, *anIt - 1 );
- parts.append( one );
- one.clear();
- for( ; anIt!=aLast && ok; anIt++ )
- {
- QIntList::const_iterator aNext = anIt; aNext++;
- ok = sort( post, one, anOpen, aClose, *anIt + 1, aNext==aLast ? l : *aNext - 1 );
- parts.append( one );
- one.clear();
- }
- if( !ok )
- return false;
-
- QValueList< Postfix >::const_iterator aPIt = parts.begin();
- QValueList< PostfixItemType >::const_iterator aTIt = min_types.begin();
- QValueStack< PostfixItem > aStack;
- res += (*aPIt); aPIt++;
- anIt = argmin.begin();
- for( ; anIt!=aLast; anIt++, aPIt++, aTIt++ )
- {
- if( *aTIt==Pre )
- if( anOpen.contains( post[ *anIt ].myValue.toString() )==0 )
- {
- res+=(*aPIt);
- aStack.push( post[ *anIt ] );
- }
- else
- {
- res.append( post[ *anIt ] );
- res+=(*aPIt);
- }
- else
- {
- res+=(*aPIt);
- while( !aStack.isEmpty() )
- {
- res.append( aStack.top() );
- aStack.pop();
- }
- res.append( post[ *anIt ] );
- }
- }
- while( !aStack.isEmpty() )
- {
- res.append( aStack.top() );
- aStack.pop();
- }
- }
- else
- { //there are no operations
- PostfixIterator anIt = post.at( f ),
- aLast = post.at( l+1 );
- for( ; anIt!=aLast; anIt++ )
- if( (*anIt).myType==Value || (*anIt).myType==Param )
- res.append( *anIt );
- }
- }
- else
- setLastError( OperationsNull );
-
- return lastError()==OK;
-}
-
-/*!
- Build posfix by expression
- \param expr - string expression
-*/
-bool QtxParser::parse( const QString& expr )
-{
- myPost.clear();
-
- Postfix p;
- QStringList opens, closes;
-
- if( myOperations )
- {
- setLastError( OK );
- myOperations->bracketsList( opens, true );
- myOperations->bracketsList( closes, false );
- }
- else
- {
- setLastError( OperationsNull );
- return false;
- }
-
- //return prepare( expr, myPost ) && setOperationTypes( myPost );
- return prepare( expr, p ) && setOperationTypes( p ) &&
- sort( p, myPost, opens, closes );
-}
-
-/*!
- Calculate operation
- \param op - operation name
- \param v1 - first argument (it is not valid for unary prefix operations and it is used to store result)
- \param v2 - second argument (it is not valid for unary postfix operations)
-*/
-bool QtxParser::calculate( const QString& op, QtxValue& v1, QtxValue& v2 )
-{
- Error err = myOperations->isValid( op, v1.type(), v2.type() );
- if( err==OK )
- setLastError( myOperations->calculate( op, v1, v2 ) );
- else
- setLastError( err );
-
- return lastError()==OK;
-}
-
-/*!
- Calculates expression without postfix rebuilding
- \return QtxValue as result (it is invalid if there were errors during calculation)
-*/
-QtxValue QtxParser::calculate()
-{
- setLastError( OK );
-
- QStringList anOpen, aClose;
- if( myOperations )
- {
- myOperations->bracketsList( anOpen, true );
- myOperations->bracketsList( aClose, false );
- }
- else
- {
- setLastError( OperationsNull );
- return QtxValue();
- }
-
- QtxValueStack aStack;
- PostfixIterator anIt = myPost.begin(),
- aLast = myPost.end();
- for( ; anIt!=aLast && lastError()==OK; anIt++ )
- {
- QString nn = (*anIt).myValue.toString();
- if( (*anIt).myType==Param )
- {
- if( has( nn ) )
- {
- QVariant& v = myParameters[ nn ];
- if( v.isValid() )
- aStack.push( v );
- else
- setLastError( InvalidToken );
- }
- else
- setLastError( InvalidToken );
- }
-
- else if( (*anIt).myType==Value )
- aStack.push( (*anIt).myValue );
-
- else if( (*anIt).myType==Pre || (*anIt).myType==Post )
- {
- if( anOpen.contains( nn )>0 )
- {
- QtxValue inv;
- if( calculate( nn, inv, inv ) )
- aStack.push( QtxValue() );
- }
- else if( aClose.contains( nn )>0 )
- {
- QValueList< QtxValue > set;
- while( true )
- {
- if( aStack.count()==0 )
- {
- setLastError( StackUnderflow );
- break;
- }
- if( aStack.top().isValid() )
- {
- set.append( aStack.top() );
- aStack.pop();
- }
- else
- {
- aStack.pop();
- break;
- }
- }
-
- QtxValue qSet = set, inv;
- if( calculate( nn, qSet, inv ) )
- aStack.push( set );
- }
- else if( aStack.count()>=1 )
- {
- QtxValue inv;
- QtxValue* v1 = &aStack.top(), *v2 = &inv; //"post-" case
- if( (*anIt).myType==Pre )
- {
- v2 = &aStack.top(); v1 = &inv;
- }
-
- calculate( nn, *v1, *v2 );
- }
- else
- setLastError( StackUnderflow );
- }
-
- else if( (*anIt).myType==Binary )
- {
- if( aStack.count()>=2 )
- {
- QVariant v2 = aStack.top(); aStack.pop();
- calculate( nn, aStack.top(), v2 );
- }
- else
- setLastError( StackUnderflow );
- }
- }
-
- QtxValue res;
- if( lastError()==OK )
- {
- int count = aStack.count();
- if( count==0 )
- setLastError( StackUnderflow );
- else if( count==1 )
- res = aStack.top();
- else
- setLastError( ExcessData );
- }
- return res;
-}
-
-/*!
- Change expression, rebuild postfix and calculate it
- \return QtxValue as result (it is invalid if there were errors during calculation)
-*/
-QtxValue QtxParser::calculate( const QString& expr )
-{
- setExpr( expr );
- return calculate();
-}
-
-/*!
- Change expression and rebuild postfix
-*/
-bool QtxParser::setExpr( const QString& expr )
-{
- return parse( expr );
-}
-
-/*!
- \return true, if parser contain parameter
- \param name - name of parameter
-*/
-bool QtxParser::has( const QString& name ) const
-{
- return myParameters.contains( name.stripWhiteSpace() );
-}
-
-/*!
- Sets parameter value
- \param name - name of parameter
- \param value - value of parameter
-*/
-void QtxParser::set( const QString& name, const QtxValue& value )
-{
- myParameters[ name.stripWhiteSpace() ] = value;
-}
-
-/*!
- Removes parameter
- \param name - name of parameter
-*/
-bool QtxParser::remove( const QString& name )
-{
- QString sname = name.stripWhiteSpace();
- bool res = has( sname );
- if( res )
- myParameters.remove( sname );
- return res;
-}
-
-/*!
- \return value of parameter (result is invalid if there is no such parameter)
- \param name - name of parameter
-*/
-QtxValue QtxParser::value( const QString& name ) const
-{
- QString sname = name.stripWhiteSpace();
- if( has( sname ) )
- return myParameters[ sname ].toString();
- else
- return QtxValue();
-}
-
-/*!
- Searches first parameter with assigned invalid QtxValue
- \return true if it is found
- \param name - variable to return name of parameter
-*/
-bool QtxParser::firstInvalid( QString& name ) const
-{
- QMap< QString, QtxValue >::const_iterator anIt = myParameters.begin(),
- aLast = myParameters.end();
- for( ; anIt!=aLast; anIt++ )
- if( !anIt.data().isValid() )
- {
- name = anIt.key();
- return true;
- }
- return false;
-}
-
-/*!
- Removes all parameters with assigned invalid QtxValues
-*/
-void QtxParser::removeInvalids()
-{
- QStringList toDelete;
- QMap< QString, QtxValue >::const_iterator anIt = myParameters.begin(),
- aLast = myParameters.end();
- for( ; anIt!=aLast; anIt++ )
- if( !anIt.data().isValid() )
- toDelete.append( anIt.key() );
-
- QStringList::const_iterator aLIt = toDelete.begin(),
- aLLast = toDelete.end();
- for( ; aLIt!=aLLast; aLIt++ )
- myParameters.remove( *aLIt );
-}
-
-/*!
- \return last error occured during parsing
-*/
-QtxParser::Error QtxParser::lastError() const
-{
- return myLastError;
-}
-
-/*!
- Sets last error occured during parsing (for internal using only)
-*/
-void QtxParser::setLastError( QtxParser::Error err )
-{
- myLastError = err;
-}
-
-/*!
- \return string dump of internal parser postfix
-*/
-QString QtxParser::dump() const
-{
- return dump( myPost );
-}
-
-/*!
- \return string dump of postfix
- \param post - postfix to be dumped
-*/
-QString QtxParser::dump( const Postfix& post ) const
-{
- QString res;
-
- if( myOperations )
- {
- PostfixIterator anIt = post.begin(),
- aLast = post.end();
- for( ; anIt!=aLast; anIt++ )
- {
- if( (*anIt).myType == Value &&
- ( ( *anIt ).myValue.type()==QVariant::String ||
- ( *anIt ).myValue.type()==QVariant::CString ) )
- res += "'" + ( *anIt ).myValue.toString() + "'";
- else
- res += ( *anIt ).myValue.toString();
- if( (*anIt).myType == Pre )
- res += "(pre)";
- else if( (*anIt).myType == Post )
- res += "(post)";
- else if( (*anIt).myType == Binary )
- res += "(bin)";
-
- res += "_";
- }
- }
- return res;
-}
-
-/*!
- Fills list with names of parameters
- \param list - list to be filled
-*/
-void QtxParser::paramsList( QStringList& list )
-{
- PostfixIterator anIt = myPost.begin(),
- aLast = myPost.end();
- for( ; anIt!=aLast; anIt++ )
- if( (*anIt).myType==Param )
- {
- QString name = (*anIt).myValue.toString();
- if( list.contains( name )==0 )
- list.append( name );
- }
-}
-
-/*!
- Removes all parameters
-*/
-void QtxParser::clear()
-{
- myParameters.clear();
-}
-
-/*!
- \return string representation for list of QtxValues
- \param list - list to be converted
-*/
-QString QtxParser::toString( const QValueList< QtxValue >& list )
-{
- QValueList< QtxValue >::const_iterator anIt = list.begin(),
- aLast = list.end();
- QString res = "set : [ ";
- for( ; anIt!=aLast; anIt++ )
- res+=(*anIt).toString()+" ";
- res+="]";
- return res;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxParser.h
-// Author: Alexander SOLOVYOV
-
-#ifndef __QTX_PARSER_HEADER__
-#define __QTX_PARSER_HEADER__
-
-#include "Qtx.h"
-#include <qvaluestack.h>
-#include <qvariant.h>
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-
-class QtxOperations;
-
-/*! \var QtxValue
- \brief Alias for QVariant
-*/
-typedef QVariant QtxValue;
-
-
-/*!
- \class QtxParser
-
- This class allows to calculate values of expressions using different set of operations.
- It is provided some of standard set of operations (arithmetics, logic, strings, etc - in QtxStdOperations.h).
- This parser allows to use parameters with help of methods has(), set(), remove(), value(). It uses
- postfix representation of expressions and uses class QtxOperations in order to make certain operation
- Every instance of parser contains only one postfix, so that if expression has been changed, then postfix
- must be rebuilt. In order to increase performance of frequent calculation for many of expressions it is
- recommended to use different instances of parser for expressions
-
-*/
-class QTX_EXPORT QtxParser
-{
-public:
- /*!
- \enum Error
- \brief Errors during parsing
- */
- typedef enum
- {
- OK, /*! \var All right */
- OperandsNotMatch, /*! \var Types of arguments are invalid for this operation */
- InvalidResult, /*! \var Operation cannot find result (for example, division by zero) */
- InvalidOperation, /*! \var Name of operation is unknown */
- OperationsNull, /*! \var Internal operations pointer of parser is null */
- InvalidToken, /*! \var It isn't operation, parameter of value */
- CloseExpected, /*! \var Close bracket is expected */
- ExcessClose, /*! \var The one of close bracket is excess */
- BracketsNotMatch, /*! \var Last open and this close bracket are different, for example [) */
- StackUnderflow, /*! \var There is no arguments in stack for operation */
- ExcessData /*! \var The parsing is finished, but there is more then one value in stack */
-
- } Error;
-
-public:
- QtxParser( QtxOperations*, const QString& = QString::null );
- virtual ~QtxParser();
-
- QtxValue calculate();
- QtxValue calculate( const QString& );
- bool setExpr( const QString& );
-
- virtual void clear();
- virtual bool has ( const QString& name ) const;
- virtual void set ( const QString& name, const QtxValue& value );
- virtual bool remove( const QString& name );
- virtual QtxValue value ( const QString& name ) const;
-
- bool firstInvalid( QString& ) const;
- void removeInvalids();
- QString dump() const;
- Error lastError() const;
- void paramsList( QStringList& );
-
- static QString toString( const QValueList< QtxValue >& );
-
-protected:
- /*!
- \enum PostfixItemType
- \brief Types of postfix representation elements
- */
- typedef enum
- {
- Value, /*! \var Value (number, string, etc.)*/
- Param, /*! \var Parameter */
- Open, /*! \var Open bracket */
- Close, /*! \var Close bracket */
- Pre, /*! \var Unary prefix operation */
- Post, /*! \var Unary postfix operation */
- Binary /*! \var Binary operation */
-
- } PostfixItemType;
-
- /*! \var postfix representation element */
- typedef struct
- {
- QtxValue myValue;
- PostfixItemType myType;
-
- } PostfixItem;
-
- /*! \var postfix representation */
- typedef QValueList< PostfixItem > Postfix;
-
- /*! \var postfix representation iterator */
- typedef Postfix::const_iterator PostfixIterator;
-
-protected:
- QString dump( const Postfix& ) const;
- virtual bool prepare( const QString&, Postfix& );
- virtual bool setOperationTypes( Postfix& );
- virtual bool sort( const Postfix&, Postfix&,
- const QStringList&, const QStringList&,
- int f=-1, int l=-1 );
-
- virtual bool parse( const QString& );
- virtual void setLastError( const Error );
-
- bool calculate( const QString&, QtxValue&, QtxValue& );
-
- static int search ( const QStringList&, const QString&, int offset,
- int& matchLen, int& listind );
- static QString note ( const QString& str, int pos, int len );
- static int globalBrackets( const Postfix&, int, int );
-
-private:
- /*! \var stack of QtxValues */
- typedef QValueStack < QtxValue > QtxValueStack;
-
-private:
- QtxOperations* myOperations;
- QMap< QString, QtxValue > myParameters;
- Error myLastError;
- Postfix myPost;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "QtxPopupMenu.h"
-
-#include <qpainter.h>
-
-/*!
- Class: QtxPopupMenu::TitleMenuItem [Internal]
- Descr: Custom menu item for popup title.
-*/
-
-class QtxPopupMenu::TitleMenuItem : public QCustomMenuItem
-{
-public:
- TitleMenuItem( const QString&, const QIconSet&, const int );
- virtual ~TitleMenuItem();
-
- virtual bool fullSpan() const;
- virtual bool isSeparator() const;
- virtual void setFont( const QFont& );
-
- virtual void paint( QPainter*, const QColorGroup&, bool, bool, int, int, int, int );
- virtual QSize sizeHint();
-
-private:
- QString myText;
- QIconSet myIcon;
- QFont myFont;
- int myAlign;
-};
-
-/*!
- Constructor
-*/
-QtxPopupMenu::TitleMenuItem::TitleMenuItem( const QString& txt, const QIconSet& ico, const int align )
-: QCustomMenuItem(),
-myText( txt ),
-myIcon( ico ),
-myAlign( align )
-{
-}
-
-/*!
- Destructor
-*/
-QtxPopupMenu::TitleMenuItem::~TitleMenuItem()
-{
-}
-
-/*!
- \return TRUE if this item wants to span the entire popup menu width
-*/
-bool QtxPopupMenu::TitleMenuItem::fullSpan() const
-{
- return true;
-}
-
-/*!
- \return TRUE if this item is just a separator
-*/
-bool QtxPopupMenu::TitleMenuItem::isSeparator() const
-{
- return false;
-}
-
-/*!
- Changes font of item
- \param font - new font
-*/
-void QtxPopupMenu::TitleMenuItem::setFont( const QFont& font )
-{
- myFont = font;
- myFont.setBold( true );
-}
-
-/*!
- Draws item
-*/
-void QtxPopupMenu::TitleMenuItem::paint( QPainter* p, const QColorGroup& cg,
- bool act, bool enabled, int x, int y, int w, int h )
-{
- QFont f = p->font();
- p->setFont( myFont );
-
- p->fillRect( x, y, w, h, cg.brush( QColorGroup::Dark ) );
-
- p->setPen( cg.shadow() );
- p->drawRect( x, y, w, h );
-
- int m = 3;
- int s = 3;
- int iw = p->fontMetrics().width( myText ) + ( myIcon.isNull() ? 0 : myIcon.pixmap().width() + s );
- int ih = QMAX( ( myIcon.isNull() ? 0 : myIcon.pixmap().height() ), p->fontMetrics().height() );
-
- int ix = x;
- int iy = y + m;
-
- if ( myAlign & AlignLeft )
- ix = x;
- else if ( myAlign & AlignRight )
- ix = x + ( w - iw );
- else if ( myAlign & AlignHCenter )
- ix = x + ( w - iw ) / 2;
-
- if ( myAlign & AlignTop )
- iy = y;
- else if ( myAlign & AlignBottom )
- iy = y + ( h - ih - m );
- else if ( myAlign & AlignVCenter )
- iy = y + ( h - ih ) / 2;
-
- if ( !myIcon.isNull() )
- {
- p->drawPixmap( ix, iy + ( ih - myIcon.pixmap().height() ) / 2, myIcon.pixmap() );
- ix += myIcon.pixmap().width() + s;
- }
-
- p->setPen( cg.brightText() );
- p->drawText( ix, iy + ( ih - p->fontMetrics().height() ) / 2 +
- p->fontMetrics().ascent(), myText, 0, -1 );
-
- p->setFont( f );
-}
-
-/*!
- \return the recommended size for item
-*/
-QSize QtxPopupMenu::TitleMenuItem::sizeHint()
-{
- QFontMetrics fM( myFont );
-
- int m = 3;
- int s = 3;
- int w = fM.width( myText ) + ( myIcon.isNull() ? 0 : myIcon.pixmap().width() + s );
- int h = QMAX( ( myIcon.isNull() ? 0 : myIcon.pixmap().height() ), fM.height() ) + 2 * m;
-
- return QSize( w, h );
-}
-
-/*!
- Constructor
-*/
-QtxPopupMenu::QtxPopupMenu( QWidget* parent, const char* name )
-: QPopupMenu( parent, name ),
-myId( -1 ),
-myPolicy( TitleAuto ),
-myAlign( AlignCenter )
-{
-}
-
-/*!
- Destructor
-*/
-QtxPopupMenu::~QtxPopupMenu()
-{
-}
-
-/*!
- \return popup menu title
-*/
-QString QtxPopupMenu::titleText() const
-{
- return myText;
-}
-
-/*!
- \return popup menu icon
-*/
-QIconSet QtxPopupMenu::titleIcon() const
-{
- return myIcon;
-}
-
-/*!
- \return popup menu title policy
-*/
-int QtxPopupMenu::titlePolicy() const
-{
- return myPolicy;
-}
-
-/*!
- \return popup menu title alignment
-*/
-int QtxPopupMenu::titleAlignment() const
-{
- return myAlign;
-}
-
-/*!
- Changes title text
- \param txt - new text
-*/
-void QtxPopupMenu::setTitleText( const QString& txt )
-{
- if ( myText == txt )
- return;
-
- myText = txt;
-
- updateTitle();
-}
-
-/*!
- Changes title icon
- \param icon - new icon
-*/
-void QtxPopupMenu::setTitleIcon( const QIconSet& ico )
-{
- myIcon = ico;
-
- updateTitle();
-}
-
-/*!
- Changes title policy
- \param p - new policy
-*/
-void QtxPopupMenu::setTitlePolicy( const int p )
-{
- if ( myPolicy == p )
- return;
-
- myPolicy = p;
-
- updateTitle();
-}
-
-/*!
- Changes title alignment
- \param a - new alignment
-*/
-void QtxPopupMenu::setTitleAlignment( const int a )
-{
- if ( myAlign == a )
- return;
-
- myAlign = a;
-
- updateTitle();
-}
-
-/*!
- Shows menu
-*/
-void QtxPopupMenu::show()
-{
- insertTitle();
-
- QPopupMenu::show();
-}
-
-/*!
- Hides menu
-*/
-void QtxPopupMenu::hide()
-{
- QPopupMenu::hide();
-
- removeTitle();
-}
-
-/*!
- Creates title item
- \param txt - item text
- \param icon - item icon
- \param align - item alignment
-*/
-QtxPopupMenu::TitleMenuItem* QtxPopupMenu::createTitleItem( const QString& txt, const QIconSet& ico,
- const int align ) const
-{
- return new TitleMenuItem( txt, ico, align );
-}
-
-/*!
- Inserts title item to popup menu
-*/
-void QtxPopupMenu::insertTitle()
-{
- if ( myId != -1 || titlePolicy() == TitleOff ||
- ( titlePolicy() == TitleAuto && titleText().stripWhiteSpace().isEmpty() ) )
- return;
-
- TitleMenuItem* item = createTitleItem( titleText(), titleIcon(), titleAlignment() );
-
- myId = insertItem( item, -1, 0 );
- setItemEnabled( myId, false );
-}
-
-/*!
- Removes title item from popup menu
-*/
-void QtxPopupMenu::removeTitle()
-{
- if ( myId == -1 )
- return;
-
- removeItem( myId );
- myId = -1;
-}
-
-/*!
- Updates title item
-*/
-void QtxPopupMenu::updateTitle()
-{
- if ( myId != -1 )
- {
- removeTitle();
- insertTitle();
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 QTXPOPUPMENU_H
-#define QTXPOPUPMENU_H
-
-#include "Qtx.h"
-
-#include <qstring.h>
-#include <qiconset.h>
-#include <qpopupmenu.h>
-
-class QTX_EXPORT QtxPopupMenu : public QPopupMenu
-{
- Q_OBJECT
-
-protected:
- class TitleMenuItem;
-
-public:
- enum { TitleAuto, TitleOn, TitleOff };
-
-public:
- QtxPopupMenu( QWidget* = 0, const char* = 0 );
- virtual ~QtxPopupMenu();
-
- QString titleText() const;
- QIconSet titleIcon() const;
-
- int titlePolicy() const;
- int titleAlignment() const;
-
- virtual void setTitleText( const QString& );
- virtual void setTitleIcon( const QIconSet& );
-
- virtual void setTitlePolicy( const int );
- virtual void setTitleAlignment( const int );
-
-public slots:
- virtual void show();
- virtual void hide();
-
-protected:
- virtual TitleMenuItem* createTitleItem( const QString&, const QIconSet&, const int ) const;
-
-private:
- void updateTitle();
- void insertTitle();
- void removeTitle();
-
-private:
- int myId;
- QString myText;
- QIconSet myIcon;
- int myAlign;
- int myPolicy;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxResourceEdit.cxx
-// Author: Sergey TELKOV
-
-#include "QtxResourceEdit.h"
-
-#include "QtxResourceMgr.h"
-
-
-/*!
- Constructor
-*/
-QtxResourceEdit::QtxResourceEdit( QtxResourceMgr* mgr )
-: myResMgr( mgr )
-{
-}
-
-/*!
- Destructor
-*/
-QtxResourceEdit::~QtxResourceEdit()
-{
- ItemMap items;
- for ( ItemMap::ConstIterator it = myItems.begin(); it != myItems.end(); ++it )
- items.insert( it.key(), it.data() );
-
- for ( ItemMap::ConstIterator itr = items.begin(); itr != items.end(); ++itr )
- if ( myItems.contains( itr.key() ) )
- delete itr.data();
-}
-
-/*!
- \return assigned resource manager
-*/
-QtxResourceMgr* QtxResourceEdit::resourceMgr() const
-{
- return myResMgr;
-}
-
-/*!
- Adds new item
- \param label - label of widget to edit preference
- \param pId - parent item id
- \param type - type of item
- \param section - section of resource assigned with item
- \param param - name of resource assigned with item
-*/
-int QtxResourceEdit::addItem( const QString& label, const int pId, const int type,
- const QString& section, const QString& param )
-{
- Item* i = createItem( label, type, pId );
- if ( !i )
- return -1;
-
- if ( !myItems.contains( i->id() ) )
- {
- myItems.insert( i->id(), i );
-
- i->setTitle( label );
- i->setResource( section, param );
-
- if ( !i->parentItem() && !myChildren.contains( i ) )
- myChildren.append( i );
-
- itemAdded( i );
- }
-
- return i->id();
-}
-
-/*!
- \return value of item property
- \param id - item id
- \propName - propertyName
-*/
-QVariant QtxResourceEdit::itemProperty( const int id, const QString& propName ) const
-{
- QVariant propValue;
- Item* i = item( id );
- if ( i )
- propValue = i->property( propName );
- return propValue;
-}
-
-/*!
- Sets value of item property
- \param id - item id
- \propName - propertyName
- \propValue - new value of property
-*/
-void QtxResourceEdit::setItemProperty( const int id, const QString& propName, const QVariant& propValue )
-{
- Item* i = item( id );
- if ( i )
- i->setProperty( propName, propValue );
-}
-
-/*!
- \return resource assigned with item
- \param id - item id
- \param section - to return section of resource
- \param param - to return name of resource
-*/
-void QtxResourceEdit::resource( const int id, QString& sec, QString& param ) const
-{
- Item* i = item( id );
- if ( i )
- i->resource( sec, param );
-}
-
-/*!
- Stores all values to resource manager
-*/
-void QtxResourceEdit::store()
-{
- QMap<Item*, QString> before;
- resourceValues( before );
-
- for ( ItemMap::ConstIterator it = myItems.begin(); it != myItems.end(); ++it )
- it.data()->store();
-
- QMap<Item*, QString> after;
- resourceValues( after );
-
- QMap<Item*, QString> changed;
- differentValues( before, after, changed );
-
- changedResources( changed );
-}
-
-/*!
- Retrieve all values from resource manager
-*/
-void QtxResourceEdit::retrieve()
-{
- for ( ItemMap::ConstIterator it = myItems.begin(); it != myItems.end(); ++it )
- it.data()->retrieve();
-}
-
-/*!
- Stores all values to backup container
-*/
-void QtxResourceEdit::toBackup()
-{
- myBackup.clear();
- resourceValues( myBackup );
-}
-
-/*!
- Retrieve all values from backup container
-*/
-void QtxResourceEdit::fromBackup()
-{
- QMap<Item*, QString> before;
- resourceValues( before );
-
- setResourceValues( myBackup );
-
- QMap<Item*, QString> after;
- resourceValues( after );
-
- QMap<Item*, QString> changed;
- differentValues( before, after, changed );
-
- changedResources( changed );
-}
-
-/*!
- Updates resource edit (default implementation is empty)
-*/
-void QtxResourceEdit::update()
-{
-}
-
-/*!
- \return item by it's id
- \param id - item id
-*/
-QtxResourceEdit::Item* QtxResourceEdit::item( const int id ) const
-{
- Item* i = 0;
- if ( myItems.contains( id ) )
- i = myItems[id];
- return i;
-}
-
-/*!
- \return item by it's title (finds first item)
- \param title - item title
-*/
-QtxResourceEdit::Item* QtxResourceEdit::item( const QString& title ) const
-{
- Item* i = 0;
- for ( ItemMap::ConstIterator it = myItems.begin(); it != myItems.end() && !i; ++it )
- {
- if ( it.data()->title() == title )
- i = it.data();
- }
- return i;
-}
-
-/*!
- \return item by it's title and parent id
- \param title - item title
- \param pId - parent id
-*/
-QtxResourceEdit::Item* QtxResourceEdit::item( const QString& title, const int pId ) const
-{
- Item* i = 0;
- Item* pItem = item( pId );
- for ( ItemMap::ConstIterator it = myItems.begin(); it != myItems.end() && !i; ++it )
- {
- if ( it.data()->parentItem() == pItem && it.data()->title() == title )
- i = it.data();
- }
- return i;
-}
-
-/*!
- Creates item
- \return new item
- \param label - text of label for new item
- \param type - type of new item
- \param pId - parent id
-*/
-QtxResourceEdit::Item* QtxResourceEdit::createItem( const QString& label, const int type, const int pId )
-{
- Item* i = 0;
- if ( pId < 0 )
- i = createItem( label, type );
- else
- {
- Item* pItem = item( pId );
- if ( pItem )
- {
- i = pItem->createItem( label, type );
- pItem->insertChild( i );
- }
- }
-
- return i;
-}
-
-/*!
- Removes item
- \param item - item to be removed
-*/
-void QtxResourceEdit::removeItem( Item* item )
-{
- if ( !item )
- return;
-
- myChildren.remove( item );
- myItems.remove( item->id() );
-
- itemRemoved( item );
-}
-
-/*!
- \return children items of resource edit
- \param lst - list of items to be filled with children
-*/
-void QtxResourceEdit::childItems( QPtrList<Item>& lst ) const
-{
- lst.clear();
- for ( QPtrListIterator<Item> it( myChildren ); it.current(); ++it )
- lst.append( it.current() );
-}
-
-/*!
- \return all resources values from widgets
- \param map - map to be filled by resources values
-*/
-void QtxResourceEdit::resourceValues( QMap<int, QString>& map ) const
-{
- QString sect, name;
- for ( ItemMap::ConstIterator it = myItems.begin(); it != myItems.end(); ++it )
- {
- it.data()->resource( sect, name );
- if( myResMgr->hasValue( sect, name ) )
- map.insert( it.key(), it.data()->resourceValue() );
- }
-}
-
-/*!
- \return all resources values from widgets
- \param map - map to be filled by resources values
-*/
-void QtxResourceEdit::resourceValues( QMap<Item*, QString>& map ) const
-{
- QString sect, name;
- for ( ItemMap::ConstIterator it = myItems.begin(); it != myItems.end(); ++it )
- {
- it.data()->resource( sect, name );
- if( myResMgr->hasValue( sect, name ) )
- map.insert( it.data(), it.data()->resourceValue() );
- }
-}
-
-/*!
- Sets to widgets all resources values from map
- \param map - map with resources values
-*/
-void QtxResourceEdit::setResourceValues( QMap<int, QString>& map ) const
-{
- for ( QMap<int, QString>::ConstIterator it = map.begin(); it != map.end(); ++it )
- {
- Item* i = item( it.key() );
- if ( i )
- i->setResourceValue( it.data() );
- }
-}
-
-/*!
- Sets to widgets all resources values from map
- \param map - map with resources values
-*/
-void QtxResourceEdit::setResourceValues( QMap<Item*, QString>& map ) const
-{
- for ( QMap<Item*, QString>::ConstIterator it = map.begin(); it != map.end(); ++it )
- it.key()->setResourceValue( it.data() );
-}
-
-/*!
- Compares two map of resources values and finds different ones
- \param map1 - first map
- \param map2 - second map
- \param resMap - map to be filled with different values
- \param fromFirst - if it is true, then resMap will be filled with values from first map, otherwise - from second
-*/
-void QtxResourceEdit::differentValues( const QMap<int, QString>& map1, const QMap<int, QString>& map2,
- QMap<int, QString>& resMap, const bool fromFirst ) const
-{
- resMap.clear();
- const QMap<int, QString>& later = fromFirst ? map1 : map2;
- const QMap<int, QString>& early = fromFirst ? map2 : map1;
-
- for ( QMap<int, QString>::ConstIterator it = later.begin(); it != later.end(); ++it )
- {
- if ( !early.contains( it.key() ) || early[it.key()] != it.data() )
- resMap.insert( it.key(), it.data() );
- }
-}
-
-/*!
- Compares two map of resources values and finds different ones
- \param map1 - first map
- \param map2 - second map
- \param resMap - map to be filled with different values
- \param fromFirst - if it is true, then resMap will be filled with values from first map, otherwise - from second
-*/
-void QtxResourceEdit::differentValues( const QMap<Item*, QString>& map1, const QMap<Item*, QString>& map2,
- QMap<Item*, QString>& resMap, const bool fromFirst ) const
-{
- resMap.clear();
- const QMap<Item*, QString>& later = fromFirst ? map1 : map2;
- const QMap<Item*, QString>& early = fromFirst ? map2 : map1;
-
- for ( QMap<Item*, QString>::ConstIterator it = later.begin(); it != later.end(); ++it )
- {
- if ( !early.contains( it.key() ) || early[it.key()] != it.data() )
- resMap.insert( it.key(), it.data() );
- }
-}
-
-/*!
- Makes some activity on resource changing (called from store() method)
- \sa store()
-*/
-void QtxResourceEdit::changedResources( const QMap<Item*, QString>& )
-{
-}
-
-/*!
- Some activity on item addition (default implementation is empty)
-*/
-void QtxResourceEdit::itemAdded( Item* )
-{
-}
-
-/*!
- Some activity on item removing (default implementation is empty)
-*/
-void QtxResourceEdit::itemRemoved( Item* )
-{
-}
-
-/*!
- Constructor
-*/
-QtxResourceEdit::Item::Item( QtxResourceEdit* edit, Item* parent )
-: myEdit( edit ),
-myParent( 0 )
-{
- myId = generateId();
-
- if ( parent )
- parent->insertChild( this );
-}
-
-/*!
- Destructor
-*/
-QtxResourceEdit::Item::~Item()
-{
- if ( resourceEdit() )
- resourceEdit()->removeItem( this );
-}
-
-/*!
- \return id of item
-*/
-int QtxResourceEdit::Item::id() const
-{
- return myId;
-}
-
-/*!
- \return parent item
-*/
-QtxResourceEdit::Item* QtxResourceEdit::Item::parentItem() const
-{
- return myParent;
-}
-
-/*!
- Appends child and (if necessary) removes item from old parent
- \param item - item to be added
-*/
-void QtxResourceEdit::Item::insertChild( Item* item )
-{
- if ( !item || myChildren.contains( item ) )
- return;
-
- if ( item->parentItem() && item->parentItem() != this )
- item->parentItem()->removeChild( item );
-
- item->myParent = this;
- myChildren.append( item );
-}
-
-/*!
- Removes child
- \param item - item to be removed
-*/
-void QtxResourceEdit::Item::removeChild( Item* item )
-{
- if ( !item || !myChildren.contains( item ) )
- return;
-
- myChildren.remove( item );
- item->myParent = 0;
-}
-
-/*!
- Fills list with children items
- \param lst - list to be filled with
-*/
-void QtxResourceEdit::Item::childItems( QPtrList<Item>& lst ) const
-{
- for ( ItemListIterator it( myChildren ); it.current(); ++it )
- lst.append( it.current() );
-}
-
-/*!
- \return true if there is no children of this item
-*/
-bool QtxResourceEdit::Item::isEmpty() const
-{
- return myChildren.isEmpty();
-}
-
-/*!
- \return title of item
-*/
-QString QtxResourceEdit::Item::title() const
-{
- return myTitle;
-}
-
-/*!
- \return assigned resource placement
- \param sec - to return section
- \param param - to return param name
-*/
-void QtxResourceEdit::Item::resource( QString& sec, QString& param ) const
-{
- sec = myResSection;
- param = myResParameter;
-}
-
-/*!
- Sets item title
- \param title - new item title
-*/
-void QtxResourceEdit::Item::setTitle( const QString& title )
-{
- myTitle = title;
-}
-
-/*!
- Assigns new resource to item
- \param sec - section
- \param sec - param name
-*/
-void QtxResourceEdit::Item::setResource( const QString& sec, const QString& param )
-{
- myResSection = sec;
- myResParameter = param;
-}
-
-/*!
- Updates item (default implementation is empty)
-*/
-void QtxResourceEdit::Item::update()
-{
-}
-
-/*!
- \return property value
-*/
-QVariant QtxResourceEdit::Item::property( const QString& ) const
-{
- return QVariant();
-}
-
-/*!
- Sets property value
-*/
-void QtxResourceEdit::Item::setProperty( const QString&, const QVariant& )
-{
-}
-
-/*!
- \return value of assigned resource
-*/
-QString QtxResourceEdit::Item::resourceValue() const
-{
- return getString();
-}
-
-/*!
- Sets value of assigned resource
- \param val - new value
-*/
-void QtxResourceEdit::Item::setResourceValue( const QString& val )
-{
- setString( val );
-}
-
-/*!
- \return corresponding resource manager
-*/
-QtxResourceMgr* QtxResourceEdit::Item::resourceMgr() const
-{
- QtxResourceMgr* resMgr = 0;
- if ( resourceEdit() )
- resMgr = resourceEdit()->resourceMgr();
- return resMgr;
-}
-
-/*!
- \return corresponding resource edit
-*/
-QtxResourceEdit* QtxResourceEdit::Item::resourceEdit() const
-{
- return myEdit;
-}
-
-/*!
- \return integer value of resource corresponding to item
- \param val - default value (it is returned if there is no such resource)
-*/
-int QtxResourceEdit::Item::getInteger( const int val ) const
-{
- QtxResourceMgr* resMgr = resourceMgr();
- return resMgr ? resMgr->integerValue( myResSection, myResParameter, val ) : val;
-}
-
-/*!
- \return double value of resource corresponding to item
- \param val - default value (it is returned if there is no such resource)
-*/
-double QtxResourceEdit::Item::getDouble( const double val ) const
-{
- QtxResourceMgr* resMgr = resourceMgr();
- return resMgr ? resMgr->doubleValue( myResSection, myResParameter, val ) : val;
-}
-
-/*!
- \return boolean value of resource corresponding to item
- \param val - default value (it is returned if there is no such resource)
-*/
-bool QtxResourceEdit::Item::getBoolean( const bool val ) const
-{
- QtxResourceMgr* resMgr = resourceMgr();
- return resMgr ? resMgr->booleanValue( myResSection, myResParameter, val ) : val;
-}
-
-/*!
- \return string value of resource corresponding to item
- \param val - default value (it is returned if there is no such resource)
-*/
-QString QtxResourceEdit::Item::getString( const QString& val ) const
-{
- QtxResourceMgr* resMgr = resourceMgr();
- return resMgr ? resMgr->stringValue( myResSection, myResParameter, val ) : val;
-}
-
-/*!
- \return color value of resource corresponding to item
- \param val - default value (it is returned if there is no such resource)
-*/
-QColor QtxResourceEdit::Item::getColor( const QColor& val ) const
-{
- QtxResourceMgr* resMgr = resourceMgr();
- return resMgr ? resMgr->colorValue( myResSection, myResParameter, val ) : val;
-}
-
-/*!
- \return font value of resource corresponding to item
- \param val - default value (it is returned if there is no such resource)
-*/
-QFont QtxResourceEdit::Item::getFont( const QFont& val ) const
-{
- QtxResourceMgr* resMgr = resourceMgr();
- return resMgr ? resMgr->fontValue( myResSection, myResParameter, val ) : val;
-}
-
-/*!
- Sets value of resource
- \param val - value
-*/
-void QtxResourceEdit::Item::setInteger( const int val )
-{
- QtxResourceMgr* resMgr = resourceMgr();
- if ( resMgr )
- resMgr->setValue( myResSection, myResParameter, val );
-}
-
-/*!
- Sets value of resource
- \param val - value
-*/
-void QtxResourceEdit::Item::setDouble( const double val )
-{
- QtxResourceMgr* resMgr = resourceMgr();
- if ( resMgr )
- resMgr->setValue( myResSection, myResParameter, val );
-}
-
-/*!
- Sets value of resource
- \param val - value
-*/
-void QtxResourceEdit::Item::setBoolean( const bool val )
-{
- QtxResourceMgr* resMgr = resourceMgr();
- if ( resMgr )
- resMgr->setValue( myResSection, myResParameter, val );
-}
-
-/*!
- Sets value of resource
- \param val - value
-*/
-void QtxResourceEdit::Item::setString( const QString& val )
-{
- QtxResourceMgr* resMgr = resourceMgr();
- if ( resMgr )
- resMgr->setValue( myResSection, myResParameter, val );
-}
-
-/*!
- Sets value of resource
- \param val - value
-*/
-void QtxResourceEdit::Item::setColor( const QColor& val )
-{
- QtxResourceMgr* resMgr = resourceMgr();
- if ( resMgr )
- resMgr->setValue( myResSection, myResParameter, val );
-}
-
-/*!
- Sets value of resource
- \param val - value
-*/
-void QtxResourceEdit::Item::setFont( const QFont& val )
-{
- QtxResourceMgr* resMgr = resourceMgr();
- if ( resMgr )
- resMgr->setValue( myResSection, myResParameter, val );
-}
-
-/*!
- \return other item
- \param id - other item id
-*/
-QtxResourceEdit::Item* QtxResourceEdit::Item::item( const int id ) const
-{
- return resourceEdit() ? resourceEdit()->item( id ) : 0;
-}
-
-/*!
- \return other item
- \param title - other item title
-*/
-QtxResourceEdit::Item* QtxResourceEdit::Item::item( const QString& title ) const
-{
- return resourceEdit() ? resourceEdit()->item( title ) : 0;
-}
-
-/*!
- \return other item
- \param title - other item title
- \param id - parent item id
-*/
-QtxResourceEdit::Item* QtxResourceEdit::Item::item( const QString& title, const int id ) const
-{
- return resourceEdit() ? resourceEdit()->item( title, id ) : 0;
-}
-
-/*!
- \return free item id
-*/
-int QtxResourceEdit::Item::generateId()
-{
- static int _id = 0;
- return _id++;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxResourceEdit.h
-// Author: Sergey TELKOV
-
-#ifndef QTXRESOURCEEDIT_H
-#define QTXRESOURCEEDIT_H
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-#include "Qtx.h"
-
-class QString;
-class QtxResourceMgr;
-
-#include <qcolor.h>
-#include <qvariant.h>
-#include <qfont.h>
-
-/*!
- \class QtxResourceEdit
- Class for managing preferences items
-*/
-class QTX_EXPORT QtxResourceEdit
-{
-public:
- class Item;
-
-public:
- QtxResourceEdit( QtxResourceMgr* );
- virtual ~QtxResourceEdit();
-
- QtxResourceMgr* resourceMgr() const;
-
- virtual int addItem( const QString& label, const int pId = -1, const int = -1,
- const QString& section = QString::null,
- const QString& param = QString::null );
-
- QVariant itemProperty( const int, const QString& ) const;
- virtual void setItemProperty( const int, const QString&, const QVariant& );
-
- void resource( const int, QString&, QString& ) const;
-
- virtual void store();
- virtual void retrieve();
-
- virtual void update();
-
- virtual void toBackup();
- virtual void fromBackup();
-
-protected:
- Item* item( const int ) const;
- Item* item( const QString& ) const;
- Item* item( const QString&, const int ) const;
-
- virtual Item* createItem( const QString&, const int ) = 0;
-
- void resourceValues( QMap<int, QString>& ) const;
- void resourceValues( QMap<Item*, QString>& ) const;
-
- void setResourceValues( QMap<int, QString>& ) const;
- void setResourceValues( QMap<Item*, QString>& ) const;
-
- void differentValues( const QMap<int, QString>&, const QMap<int, QString>&,
- QMap<int, QString>&, const bool fromFirst = false ) const;
- void differentValues( const QMap<Item*, QString>&, const QMap<Item*, QString>&,
- QMap<Item*, QString>&, const bool fromFirst = false ) const;
-
- virtual void changedResources( const QMap<Item*, QString>& );
-
- virtual void itemAdded( Item* );
- virtual void itemRemoved( Item* );
-
- void childItems( QPtrList<Item>& ) const;
-
-private:
- void removeItem( Item* );
- Item* createItem( const QString&, const int, const int );
-
-private:
- typedef QMap<int, Item*> ItemMap;
-
-private:
- ItemMap myItems;
- QtxResourceMgr* myResMgr;
- QMap<Item*, QString> myBackup;
- QPtrList<Item> myChildren;
-
- friend class QtxResourceEdit::Item;
-};
-
-/*!
- \class QtxResourceEditor::Item
- Class for incapsulation of one preference item
-*/
-
-class QTX_EXPORT QtxResourceEdit::Item
-{
-public:
- Item( QtxResourceEdit*, Item* = 0 );
- virtual ~Item();
-
- int id() const;
- virtual int type() const = 0;
-
- Item* parentItem() const;
- void childItems( QPtrList<Item>& ) const;
-
- virtual bool isEmpty() const;
-
- QString title() const;
- void resource( QString&, QString& ) const;
-
- virtual void setTitle( const QString& );
- virtual void setResource( const QString&, const QString& );
-
- virtual void update();
-
- virtual QVariant property( const QString& ) const;
- virtual void setProperty( const QString&, const QVariant& );
-
- virtual void store() = 0;
- virtual void retrieve() = 0;
-
- virtual Item* createItem( const QString&, const int ) = 0;
-
- QString resourceValue() const;
- void setResourceValue( const QString& );
-
- virtual void insertChild( Item* );
- virtual void removeChild( Item* );
-
-protected:
- QtxResourceMgr* resourceMgr() const;
- QtxResourceEdit* resourceEdit() const;
-
- int getInteger( const int = 0 ) const;
- double getDouble( const double = 0.0 ) const;
- bool getBoolean( const bool = false ) const;
- QColor getColor( const QColor& = QColor() ) const;
- QFont getFont( const QFont& = QFont() ) const;
- QString getString( const QString& = QString::null ) const;
-
- void setInteger( const int );
- void setDouble( const double );
- void setBoolean( const bool );
- void setColor( const QColor& );
- void setFont( const QFont& );
- void setString( const QString& );
-
- Item* item( const int ) const;
- Item* item( const QString& ) const;
- Item* item( const QString&, const int ) const;
-
-protected:
- typedef QPtrList<Item> ItemList;
- typedef QPtrListIterator<Item> ItemListIterator;
-
-private:
- static int generateId();
-
-private:
- int myId;
- Item* myParent;
- ItemList myChildren;
-
- QString myTitle;
- QString myResSection;
- QString myResParameter;
-
- QtxResourceEdit* myEdit;
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "QtxStdOperations.h"
-
-#include <math.h>
-#include <stdlib.h>
-
-/*!
- Default constructor
-*/
-QtxStdOperations::QtxStdOperations()
-{
-}
-
-/*!
- Destructor
-*/
-QtxStdOperations::~QtxStdOperations()
-{
-}
-
-/*!
- Fills list of brackets treated as open (when 'open' is 'true') or close ('open' is 'false')
-*/
-void QtxStdOperations::bracketsList( QStringList& list, bool open ) const
-{
- if( open )
- list.append( "(" );
- else
- list.append( ")" );
-}
-
-/*!
- Fills list with operation names by copying of internal list of operations
-*/
-void QtxStdOperations::opersList( QStringList& list ) const
-{
- list += myOpers;
-}
-
-/*!
- Add operation names from list to internal list of operations
-*/
-void QtxStdOperations::addOperations( const QStringList& list )
-{
- QStringList::const_iterator anIt = list.begin(),
- aLast = list.end();
- for( ; anIt!=aLast; anIt++ )
- if( myOpers.contains( *anIt )==0 )
- myOpers.append( *anIt );
-}
-
-/*!
- Append operation names from 'list' to internal list of operations
-*/
-void QtxStdOperations::addTypes( const ListOfTypes& list )
-{
- ListOfTypes::const_iterator anIt = list.begin(),
- aLast = list.end();
- for( ; anIt!=aLast; anIt++ )
- if( myTypes.contains( *anIt )==0 )
- myTypes.append( *anIt );
-}
-
-/*!
- \return whether values with passed types are valid for arguments of operation
- \param op - name of operation
- \param t1 - type of first argument
- \param t2 - type of second argument
-*/
-QtxParser::Error QtxStdOperations::isValid( const QString& op,
- const QVariant::Type t1,
- const QVariant::Type t2 ) const
-{
- if( ( t1==QVariant::Invalid || myTypes.contains( t1 ) ) &&
- ( t2==QVariant::Invalid || myTypes.contains( t2 ) ) &&
- ( t1!=QVariant::Invalid || t2!=QVariant::Invalid ) )
- if( prior( op, t1!=QVariant::Invalid && t2!=QVariant::Invalid ) > 0 )
- return QtxParser::OK;
- else
- return QtxParser::InvalidOperation;
- else
- return QtxParser::OperandsNotMatch;
-}
-
-
-
-
-
-
-
-
-/*!
- Default constructor
-*/
-QtxArithmetics::QtxArithmetics()
-: QtxStdOperations()
-{
- QStringList aList;
- aList.append( "+" );
- aList.append( "-" );
- aList.append( "*" );
- aList.append( "/" );
- aList.append( "=" );
- aList.append( "<" );
- aList.append( ">" );
- aList.append( "<=" );
- aList.append( ">=" );
- aList.append( "<>" );
- aList.append( "!=" ); // same as "<>" - for C++ addicts
- addOperations( aList );
-
- ListOfTypes aTypes;
- aTypes.append( QVariant::Int );
- aTypes.append( QVariant::UInt );
- aTypes.append( QVariant::Double );
- addTypes( aTypes );
-}
-
-/*!
- Destructor
-*/
-QtxArithmetics::~QtxArithmetics()
-{
-}
-
-/*!
- Creates numbers by it's string representation [redefined virtual]
-*/
-bool QtxArithmetics::createValue( const QString& str, QtxValue& v ) const
-{
- bool ok = false;
- v = str.toInt( &ok );
-
- if( !ok )
- {
- v = str.toDouble( &ok );
- if( !ok )
- ok = QtxStdOperations::createValue( str, v );
- }
- return ok;
-}
-
-/*!
- \return priority of arithmetic operation 'op'.
- \param isBin indicate whether the operation is binary
-*/
-int QtxArithmetics::prior( const QString& op, bool isBin ) const
-{
- if( isBin )
- if( op=="<" || op==">" || op=="=" ||
- op=="<=" || op==">=" || op=="<>" || op=="!=" )
- return 1;
- else if( op=="+" || op=="-" )
- return 2;
- else if( op=="*" || op=="/" )
- return 3;
- else
- return 0;
- else if( op=="+" || op=="-" )
- return 5;
- else
- return 0;
-}
-
-void set( QVariant& v1, bool v2 )
-{
- v1 = QVariant( v2, 0 );
-}
-
-/*!
- Calculates result of operation
- \return one of error states
- \param op - name of operation
- \param v1 - first operation argument (must be used also to store result)
- \param v2 - second operation argument
-*/
-QtxParser::Error QtxArithmetics::calculate( const QString& op,
- QtxValue& v1, QtxValue& v2 ) const
-{
- QtxParser::Error err = QtxParser::OK;
-
- if( v1.isValid() && v2.isValid() )
- // binary operations
- if( ( v1.type()==QVariant::Int || v1.type()==QVariant::UInt ) &&
- ( v2.type()==QVariant::Int || v2.type()==QVariant::UInt ) )
- {
- int _v1 = v1.toInt(),
- _v2 = v2.toInt();
-
- if( op=="+" )
- v1 = _v1 + _v2;
- else if( op=="-" )
- v1 = _v1 - _v2;
- else if( op=="*" )
- v1 = _v1 * _v2;
- else if( op=="/" )
- if( _v2!=0 )
- if( _v1%_v2==0 )
- v1 = _v1 / _v2;
- else
- v1 = double( _v1 ) / double( _v2 );
- else
- err = QtxParser::InvalidResult;
- else if( op=="<" )
- set( v1, _v1<_v2 );
- else if( op==">" )
- set( v1, _v1>_v2 );
- else if( op=="=" )
- set( v1, _v1==_v2 );
- else if( op=="<=" )
- set( v1, _v1<=_v2 );
- else if( op==">=" )
- set( v1, _v1>=_v2 );
- else if( op=="<>" || op=="!=" )
- set( v1, _v1!=_v2 );
- }
- else if( ( v1.type()==QVariant::Int || v1.type()==QVariant::Double ) &&
- ( v2.type()==QVariant::Int || v2.type()==QVariant::Double ) )
- {
- double _v1 = v1.toDouble(),
- _v2 = v2.toDouble();
-
- if( op=="+" )
- v1 = _v1 + _v2;
- else if( op=="-" )
- v1 = _v1 - _v2;
- else if( op=="*" )
- v1 = _v1 * _v2;
- else if( op=="/" )
- if( _v2!=0 )
- v1 = _v1 / _v2;
- else
- err = QtxParser::InvalidResult;
- else if( op=="<" )
- set( v1, _v1<_v2 );
- else if( op==">" )
- set( v1, _v1>_v2 );
- else if( op=="=" )
- set( v1, _v1==_v2 );
- else if( op=="<=" )
- set( v1, _v1<=_v2 );
- else if( op==">=" )
- set( v1, _v1>=_v2 );
- else if( op=="<>" || op=="!=" )
- set( v1, _v1!=_v2 );
- }
- else
- // prefix operations
- if( op=="-" )
- if( v2.type()==QVariant::Int )
- v2 = -v2.toInt();
- else if( v2.type()==QVariant::Double )
- v2 = -v2.toDouble();
-
- return err;
-}
-
-
-
-
-
-
-
-
-
-
-
-/*!
- Default constructor
-*/
-QtxLogic::QtxLogic()
-: QtxStdOperations()
-{
- QStringList aList;
- aList.append( "and" );
- aList.append( "&&" );
- aList.append( "or" );
- aList.append( "||" );
- aList.append( "xor" );
- aList.append( "not" );
- aList.append( "!" );
- aList.append( "imp" );
- aList.append( "=" );
- addOperations( aList );
-
- ListOfTypes aTypes;
- aTypes.append( QVariant::Bool );
- aTypes.append( QVariant::Int );
- aTypes.append( QVariant::UInt );
- addTypes( aTypes );
-}
-
-/*!
- Destructor
-*/
-QtxLogic::~QtxLogic()
-{
-}
-
-/*!
- Creates value 'true' or 'false' it's string representation [redefined virtual]
-*/
-bool QtxLogic::createValue( const QString& str, QtxValue& v ) const
-{
- bool ok = true;
- if( str.lower()=="true" )
- v = QtxValue( true, 0 );
- else if( str.lower()=="false" )
- v = QtxValue( false, 0 );
- else
- ok = QtxStdOperations::createValue( str, v );
-
- return ok;
-}
-
-/*!
- \return priority of arithmetic operation 'op'.
- \param isBin indicate whether the operation is binary
-*/
-int QtxLogic::prior( const QString& op, bool isBin ) const
-{
- if( isBin )
- if( op=="and" || op=="or" || op=="xor" ||
- op=="&&" || op=="||" ||
- op=="imp" )
- return 1;
- else if( op=="=" )
- return 2;
- else
- return 0;
- else if( op=="not" || op=="!" )
- return 5;
- else
- return 0;
-}
-
-bool boolean_value( const QtxValue& v )
-{
- if( v.type()==QVariant::Bool )
- return v.toBool();
- else if( v.type()==QVariant::Int )
- return v.toInt()!=0;
- else if( v.type()==QVariant::UInt )
- return v.toUInt()!=0;
- else
- return false;
-}
-
-/*!
- Calculates result of operation
- \return one of error states
- \param op - name of operation
- \param v1 - first operation argument (must be used also to store result)
- \param v2 - second operation argument
-*/
-QtxParser::Error QtxLogic::calculate( const QString& op,
- QtxValue& v1, QtxValue& v2 ) const
-{
- QtxParser::Error err = QtxParser::OK;
- bool val1 = boolean_value( v1 ),
- val2 = boolean_value( v2 );
- if( v1.isValid() && v2.isValid() )
- {
- if( op=="and" || op=="&&" )
- set( v1, val1 && val2 );
- else if( op=="or" || op=="||" )
- set( v1, val1 || val2 );
- else if( op=="xor" )
- set( v1, ( !val1 && val2 ) || ( val1 && !val2 ) );
- else if( op=="imp" )
- set( v1, !val1 || val2 );
- else if( op=="=" )
- set( v1, val1==val2 );
- }
- else
- if( op=="not" || op=="!" )
- set( v2, !val2 );
-
- return err;
-}
-
-
-
-
-
-
-/*!
- Default constructor
-*/
-QtxFunctions::QtxFunctions()
-: QtxStdOperations()
-{
- QStringList aList;
- aList.append( "sqrt" );
- aList.append( "abs" );
- aList.append( "sin" );
- aList.append( "cos" );
- aList.append( "rad2grad" );
- aList.append( "grad2rad" );
- addOperations( aList );
-
- ListOfTypes aTypes;
- aTypes.append( QVariant::Int );
- aTypes.append( QVariant::Double );
- addTypes( aTypes );
-}
-
-/*!
- Destructor
-*/
-QtxFunctions::~QtxFunctions()
-{
-}
-
-/*!
- Creates numbers by it's string representation [redefined virtual]
-*/
-bool QtxFunctions::createValue( const QString& str, QtxValue& v ) const
-{
- bool ok = false;
- v = str.toInt( &ok );
-
- if( !ok )
- {
- v = str.toDouble( &ok );
- if( !ok )
- ok = QtxStdOperations::createValue( str, v );
- }
- return ok;
-}
-
-/*!
- \return priority of arithmetic operation 'op'.
- \param isBin indicate whether the operation is binary
-*/
-int QtxFunctions::prior( const QString& op, bool isBin ) const
-{
- if( isBin )
- return 0;
- else if( op=="sqrt" || op=="abs" || op=="sin" || op=="cos" ||
- op=="rad2grad" || op=="grad2rad" )
- return 1;
- else
- return 0;
-}
-
-/*!
- Calculates result of operation
- \return one of error states
- \param op - name of operation
- \param v1 - first operation argument (must be used also to store result)
- \param v2 - second operation argument
-*/
-QtxParser::Error QtxFunctions::calculate( const QString& op,
- QtxValue& v1, QtxValue& v2 ) const
-{
- QtxParser::Error err = QtxParser::OK;
- double val = v2.toDouble();
- if( op=="sqrt" )
- if( val>=0 )
- v2 = sqrt( val );
- else
- err = QtxParser::InvalidResult;
- else if( op=="abs" )
- if( v2.type()==QVariant::Int )
- v2 = abs( v2.toInt() );
- else
- v2 = fabs( v2.toDouble() );
- else if( op=="sin" )
- v2 = sin( val );
- else if( op=="cos" )
- v2 = cos( val );
- else if( op=="grad2rad" )
- v2 = val * 3.14159256 / 180.0;
- else if( op=="rad2grad" )
- v2 = val * 180.0 / 3.14159256;
-
- return err;
-}
-
-
-
-
-
-
-
-
-/*!
- Default constructor
-*/
-QtxStrings::QtxStrings()
-: QtxStdOperations()
-{
- QStringList aList;
- aList.append( "+" );
- aList.append( "=" );
- aList.append( "<" );
- aList.append( ">" );
- aList.append( "<=" );
- aList.append( ">=" );
- aList.append( "<>" );
- aList.append( "!=" ); // same as "<>" - for C++ addicts
- aList.append( "length" );
- aList.append( "lower" );
- aList.append( "upper" );
- addOperations( aList );
-
- ListOfTypes aTypes;
- aTypes.append( QVariant::Int );
- aTypes.append( QVariant::Double );
- aTypes.append( QVariant::String );
- aTypes.append( QVariant::CString );
- addTypes( aTypes );
-}
-
-
-/*!
- Destructor
-*/
-QtxStrings::~QtxStrings()
-{
-}
-
-/*!
- Creates string QtxValue by it's Qt string representation [redefined virtual]
-*/
-bool QtxStrings::createValue( const QString& str, QtxValue& v ) const
-{
- QChar st = str[0],
- fin = str[ ( int )( str.length()-1 ) ];
- if( st=="'" && fin=="'" )
- {
- v = str.mid( 1, str.length()-2 );
- return true;
- }
- else
- return QtxStdOperations::createValue( str, v );
-}
-
-/*!
- \return priority of arithmetic operation 'op'.
- \param isBin indicate whether the operation is binary
-*/
-int QtxStrings::prior( const QString& op, bool isBin ) const
-{
- if( isBin )
- if( op=="+" )
- return 2;
- else if( op=="=" || op=="<" || op==">" ||
- op=="<=" || op==">=" || op=="<>" || op=="!=" )
- return 1;
- else
- return 0;
- else
- if( op=="length" || op=="lower" || op=="upper" )
- return 5;
- else
- return 0;
-}
-
-/*!
- Calculates result of operation
- \return one of error states
- \param op - name of operation
- \param v1 - first operation argument (must be used also to store result)
- \param v2 - second operation argument
-*/
-QtxParser::Error QtxStrings::calculate( const QString& op,
- QtxValue& v1, QtxValue& v2 ) const
-{
- QtxParser::Error err = QtxParser::OK;
- if( v1.isValid() && v2.isValid() )
- {
- QString _v1 = v1.toString(),
- _v2 = v2.toString();
- if( op=="+" )
- v1 = _v1 + _v2;
- else if( op=="=" )
- set( v1, _v1==_v2 );
- else if( op=="<" )
- set( v1, _v1<_v2 );
- else if( op==">" )
- set( v1, _v1>_v2 );
- else if( op=="<>" || op=="!=" )
- set( v1, _v1!=_v2 );
- else if( op=="<=" )
- set( v1, _v1<_v2 || _v1==_v2 );
- else if( op==">=" )
- set( v1, _v1>_v2 || _v1==_v2 );
- }
- else if( !v1.isValid() && v2.isValid() )
- {
- QString val = v2.toString();
- if( op=="length" )
- v2 = ( int )val.length();
- else if( op=="lower" )
- v2 = val.lower();
- else if( op=="upper" )
- v2 = val.upper();
- }
-
- return err;
-}
-
-
-
-
-
-
-/*!
- Default constructor
-*/
-QtxSets::QtxSets()
-{
- QStringList aList;
- aList.append( "{" );
- aList.append( "}" );
- aList.append( "=" );
- aList.append( "<>" );
- aList.append( "!=" ); // same as "<>" - for C++ addicts
- aList.append( "+" );
- aList.append( "-" );
- aList.append( "*" );
- aList.append( "in" );
- aList.append( "count" );
- addOperations( aList );
-
- ListOfTypes aTypes;
- aTypes.append( QVariant::List );
- addTypes( aTypes );
-}
-
-/*!
- Destructor
-*/
-QtxSets::~QtxSets()
-{
-}
-
-/*!
- Fills list of brackets treated as open (when 'open' is 'true') or close ('open' is 'false')
-*/
-void QtxSets::bracketsList( QStringList& list, bool open ) const
-{
- if( open )
- list.append( "{" );
- else
- list.append( "}" );
- QtxStdOperations::bracketsList( list, open );
-}
-
-/*!
- Creates set of QtxValues by their string representation [redefined virtual]
-*/
-bool QtxSets::createValue( const QString& str, QtxValue& val ) const
-{
- return QtxStdOperations::createValue( str, val );
-}
-
-/*!
- \return priority of arithmetic operation 'op'.
- \param isBin indicate whether the operation is binary
-*/
-int QtxSets::prior( const QString& op, bool isBin ) const
-{
- if( isBin )
- if( op=="=" || op=="<>" || op=="!=" )
- return 1;
- else if( op=="+" || op=="-" || op=="*" )
- return 2;
- else if( op=="in" )
- return 3;
- else
- return 0;
-
- else
- if( op=="{" || op=="}" )
- return 5;
- else if( op=="count" )
- return 4;
- else
- return 0;
-}
-
-/*!
- \return whether values with passed types are valid for arguments of operation
- \param op - name of operation
- \param t1 - type of first argument
- \param t2 - type of second argument
-*/
-QtxParser::Error QtxSets::isValid( const QString& op,
- const QVariant::Type t1,
- const QVariant::Type t2 ) const
-{
- if( op=="{" )
- return QtxParser::OK;
- else if( op=="in" )
- if( t1!=QVariant::Invalid && t2==QVariant::List )
- return QtxParser::OK;
- else
- return QtxParser::OperandsNotMatch;
- else
- return QtxStdOperations::isValid( op, t1, t2 );
-}
-
-/*!
- Adds new value 'v' to set 'set' [static]
-*/
-void QtxSets::add( ValueSet& set, const QtxValue& v )
-{
- if( v.isValid() && set.contains( v )==0 )
- set.append( v );
-}
-
-/*!
- Adds values from set 's2' to set 's1'
-*/
-void QtxSets::add( ValueSet& s1, const ValueSet& s2 )
-{
- ValueSet::const_iterator anIt = s2.begin(),
- aLast = s2.end();
- for( ; anIt!=aLast; anIt++ )
- add( s1, *anIt );
-}
-
-/*!
- Removes value 'v' from set 'set'
-*/
-void QtxSets::remove( ValueSet& set, const QtxValue& v )
-{
- set.remove( v );
-}
-
-/*!
- Removes values of set 's2' from set 's1'
-*/
-void QtxSets::remove( ValueSet& s1, const ValueSet& s2 )
-{
- ValueSet::const_iterator anIt = s2.begin(),
- aLast = s2.end();
- for( ; anIt!=aLast; anIt++ )
- s1.remove( *anIt );
-}
-
-/*!
- Calculates result of operation
- \return one of error states
- \param op - name of operation
- \param v1 - first operation argument (must be used also to store result)
- \param v2 - second operation argument
-*/
-QtxParser::Error QtxSets::calculate( const QString& op, QtxValue& v1, QtxValue& v2 ) const
-{
- QtxParser::Error err = QtxParser::OK;
-
- if( op!="{" )
- if( op=="}" )
- {
- ValueSet aNewList;
- add( aNewList, v1.toList() );
- v1 = aNewList;
- }
-
- else if( op=="=" || op=="<>" || op=="!=" || op=="+" || op=="-" || op=="*" )
- {
- ValueSet aNewList;
- add( aNewList, v1.toList() );
-
- if( op=="=" || op=="<>" || op=="!=" || op=="-" )
- {
- remove( aNewList, v2.toList() );
-
- if( op=="=" )
- set( v1, aNewList.isEmpty() && v1.toList().count()==v2.toList().count() );
- else if( op=="<>" || op=="!=" )
- set( v1, !aNewList.isEmpty() || v1.toList().count()!=v2.toList().count() );
- else
- v1 = aNewList;
- }
- else if( op=="+" )
- {
- add( aNewList, v2.toList() );
- v1 = aNewList;
- }
- else if( op=="*" )
- {
- ValueSet toDelete;
- add( toDelete, aNewList );
- remove( toDelete, v2.toList() );
- remove( aNewList, toDelete );
- v1 = aNewList;
- }
- }
- else if( op=="count" )
- v2 = ( int )v2.toList().count();
- else if( op=="in" )
- {
- if( v1.type()==QVariant::List )
- {
- bool res = true;
- ValueSet::const_iterator anIt = v1.toList().begin(),
- aLast = v1.toList().end();
- for( ; anIt!=aLast && res; anIt++ )
- res = v2.toList().contains( *anIt )>0;
-
- set( v1, res );
- }
- else
- {
- const QValueList< QVariant >& list = v2.toList();
- v1 = ( bool )( list.find( v1 )!=list.end() );
- }
- }
-
- return err;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QtxStdOperations.h
-// Author: Alexander SOLOVYOV
-
-#ifndef __QTX_STD_OPERATIONS_HEADER__
-#define __QTX_STD_OPERATIONS_HEADER__
-
-#include "Qtx.h"
-#include "QtxOperations.h"
-
-/*!
- \class QtxStdOperations
- Provides simplified interface for standard operations.
- Conatins list of operation names, priority and possible types
-*/
-class QTX_EXPORT QtxStdOperations : public QtxOperations
-{
-public:
- QtxStdOperations();
- virtual ~QtxStdOperations();
-
- virtual void opersList( QStringList& ) const;
- virtual void bracketsList( QStringList&, bool open ) const;
-
- virtual QtxParser::Error isValid( const QString&,
- const QVariant::Type,
- const QVariant::Type ) const;
-protected:
- typedef QValueList< QVariant::Type > ListOfTypes;
-
- void addOperations( const QStringList& );
- void addTypes( const ListOfTypes& );
-
-private:
- QStringList myOpers;
- ListOfTypes myTypes;
-};
-
-/*!
- \class QtxArithmetics
- Provides set of arithmetic operations for parser
-*/
-class QTX_EXPORT QtxArithmetics : public QtxStdOperations
-{
-public:
- QtxArithmetics();
- virtual ~QtxArithmetics();
-
- virtual bool createValue( const QString&, QtxValue& ) const;
- virtual int prior( const QString&, bool isBin ) const;
- virtual QtxParser::Error calculate( const QString&, QtxValue&, QtxValue& ) const;
-};
-
-/*!
- \class QtxLogic
- Provides set of logic operations for parser
-*/
-class QTX_EXPORT QtxLogic : public QtxStdOperations
-{
-public:
- QtxLogic();
- virtual ~QtxLogic();
-
- virtual bool createValue( const QString&, QtxValue& ) const;
- virtual int prior( const QString&, bool isBin ) const;
- virtual QtxParser::Error calculate( const QString&, QtxValue&, QtxValue& ) const;
-};
-
-/*!
- \class QtxFunctions
- Provides set of more complex operations for parser (sqrt, sin, cos, etc)
-*/
-class QTX_EXPORT QtxFunctions : public QtxStdOperations
-{
-public:
- QtxFunctions();
- virtual ~QtxFunctions();
-
- virtual bool createValue( const QString&, QtxValue& ) const;
- virtual int prior( const QString&, bool isBin ) const;
- virtual QtxParser::Error calculate( const QString&, QtxValue&, QtxValue& ) const;
-};
-
-/*!
- \class QtxStrings
- Provides set of string operations for parser
-*/
-class QTX_EXPORT QtxStrings : public QtxStdOperations
-{
-public:
- QtxStrings();
- virtual ~QtxStrings();
-
- virtual bool createValue( const QString&, QtxValue& ) const;
- virtual int prior( const QString&, bool isBin ) const;
- virtual QtxParser::Error calculate( const QString&, QtxValue&, QtxValue& ) const;
-};
-
-/*!
- \class QtxSets
- Provides set of operations with sets for parser
-*/
-class QTX_EXPORT QtxSets : public QtxStdOperations
-{
-public:
- typedef QValueList< QtxValue > ValueSet;
-
-public:
- QtxSets();
- virtual ~QtxSets();
-
- virtual void bracketsList( QStringList&, bool open ) const;
- virtual bool createValue( const QString&, QtxValue& ) const;
- virtual int prior( const QString&, bool isBin ) const;
- virtual QtxParser::Error isValid( const QString&,
- const QVariant::Type,
- const QVariant::Type ) const;
- virtual QtxParser::Error calculate( const QString&, QtxValue&, QtxValue& ) const;
-
- static void add( ValueSet&, const QtxValue& );
- static void add( ValueSet&, const ValueSet& );
- static void remove( ValueSet&, const QtxValue& );
- static void remove( ValueSet&, const ValueSet& );
-};
-
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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 $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libQxGraph.la
-
-salomeinclude_HEADERS= \
- QxGraph_ActiveItem.h \
- QxGraph_Prs.h \
- QxGraph_Canvas.h \
- QxGraph_CanvasView.h \
- QxGraph_ViewWindow.h \
- QxGraph_ViewManager.h \
- QxGraph_ViewModel.h \
- QxGraph_Def.h \
- QxGraph.h
-
-dist_libQxGraph_la_SOURCES= \
- QxGraph_Prs.cxx \
- QxGraph_Canvas.cxx \
- QxGraph_CanvasView.cxx \
- QxGraph_ViewWindow.cxx \
- QxGraph_ViewManager.cxx \
- QxGraph_ViewModel.cxx
-
-MOC_FILES= \
- QxGraph_Canvas_moc.cxx \
- QxGraph_CanvasView_moc.cxx \
- QxGraph_ViewWindow_moc.cxx \
- QxGraph_ViewManager_moc.cxx \
- QxGraph_ViewModel_moc.cxx
-
-nodist_libQxGraph_la_SOURCES= $(MOC_FILES)
-
-dist_salomeres_DATA= \
- resources/view_fitall.png \
- resources/view_fitarea.png \
- resources/view_glpan.png \
- resources/view_pan.png \
- resources/view_reset.png \
- resources/view_zoom.png
-
-nodist_salomeres_DATA= \
- QxGraph_images.qm \
- QxGraph_msg_en.qm
-
-libQxGraph_la_CPPFLAGS=$(QT_INCLUDES) $(CAS_CPPFLAGS) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) \
- -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT
-libQxGraph_la_LDFLAGS=$(QT_MT_LIBS) ../SUIT/libsuit.la
+++ /dev/null
-// SALOME QxGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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
-//
-
-#ifdef WNT
-#ifdef QXGRAPH_EXPORTS
-#define QXGRAPH_EXPORT __declspec(dllexport)
-#else
-#define QXGRAPH_EXPORT __declspec(dllimport)
-#endif
-#else
-#define QXGRAPH_EXPORT
-#endif
-
-#ifdef WNT
-#pragma warning ( disable:4251 )
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 QXGRAPH_ACTIVEITEM_H
-#define QXGRAPH_ACTIVEITEM_H
-
-#include "QxGraph.h"
-
-#include <qpoint.h>
-#include <qwmatrix.h>
-#include <qevent.h>
-
-class QXGRAPH_EXPORT QxGraph_ActiveItem
-{
- public:
- QxGraph_ActiveItem() {}
- ~QxGraph_ActiveItem() {}
-
- virtual bool isMoveable() = 0;
- virtual void beforeMoving() = 0;
- virtual void afterMoving() = 0;
-
- virtual bool isResizable(QPoint thePoint, int& theCursorType) { return false; }
- virtual bool isResizing() { return false; }
- virtual void beforeResizing(int theCursorType) {}
- virtual void resize(QPoint thePoint) {}
- virtual void afterResizing() {}
-
- virtual void hilight(const QPoint& theMousePos, const bool toHilight = true) = 0;
- virtual void select(const QPoint& theMousePos, const bool toSelect = true) = 0;
- virtual void showPopup(QWidget* theParent, QMouseEvent* theEvent, const QPoint& theMousePos = QPoint()) = 0;
-
- virtual QString getToolTipText(const QPoint& theMousePos, QRect& theRect) const = 0;
-
- virtual bool arePartsOfOtherItem(QxGraph_ActiveItem* theSecondItem) { return false; }
-
- void setTMatrix(QWMatrix theMatrix) { myTMatrix = theMatrix; }
- QWMatrix getTMatrix() const { return myTMatrix; }
-
- private:
- QWMatrix myTMatrix; // canvas view's current transformation matrix
-};
-
-#endif
+++ /dev/null
-// SALOME QxGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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 "QxGraph_Canvas.h"
-#include "QxGraph_Def.h"
-#include "QxGraph_Prs.h"
-
-#include <SUIT_ResourceMgr.h>
-
-#include <qobjectlist.h>
-#include <QxGraph_CanvasView.h>
-
-/*!
- Constructor
-*/
-QxGraph_Canvas::QxGraph_Canvas(SUIT_ResourceMgr* theMgr) :
- QCanvas()
-{
- printf("Construct QxGraph_Canvas\n");
-
- resize(GRAPH_WIDTH, GRAPH_HEIGHT);
- setDoubleBuffering(true);
-
- QColor aColor = theMgr->colorValue( "QxGraph", "Background", DEF_BACK_COLOR );
- setBackgroundColor(aColor);
-}
-
-/*!
- Destructor
-*/
-QxGraph_Canvas::~QxGraph_Canvas()
-{
- /*QObjectList* aNodeList = queryList("QObject");
- QObjectListIt aIt(*aNodeList);
- QObject* anObj;
- while ( (anObj = aIt.current()) != 0 ) {
- ++aIt;
- aNodeList->removeRef(anObj);
- delete anObj;
- }
- delete aNodeList;*/
-
- myPrsList.setAutoDelete(true);
- myPrsList.clear();
-}
-
-/*!
- Add view
-*/
-void QxGraph_Canvas::addView(QCanvasView* theView)
-{
- myViews.append( theView );
- QCanvas::addView(theView);
- theView->setPaletteBackgroundColor(backgroundColor().light(120));
-}
-
-/*!
- Remove view
-*/
-void QxGraph_Canvas::removeView( QCanvasView* theView )
-{
- myViews.remove( theView );
-}
-
-/*!
- Remove item
-*/
-void QxGraph_Canvas::removeItem( QCanvasItem* theItem )
-{
- QValueList< QCanvasView* >::iterator anIter;
- for ( anIter = myViews.begin(); anIter != myViews.end(); ++anIter )
- {
- QxGraph_CanvasView* aView = dynamic_cast<QxGraph_CanvasView*>( *anIter );
- if ( aView )
- aView->itemRemoved( theItem );
- }
-
- QCanvas::removeItem( theItem );
-}
-
-/*!
- Get Prs object with index theIndex
-*/
-QxGraph_Prs* QxGraph_Canvas::getPrs(int theIndex)
-{
- QxGraph_Prs* aRetPrs = 0;
- if ( theIndex >= 0 && theIndex < myPrsList.count() )
- aRetPrs = myPrsList.at(theIndex);
- return aRetPrs;
-}
+++ /dev/null
-// SALOME QxGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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 QXGRAPH_CANVAS_H
-#define QXGRAPH_CANVAS_H
-
-#include "QxGraph.h"
-
-#include <qcanvas.h>
-#include <qptrlist.h>
-
-class SUIT_ResourceMgr;
-class QxGraph_Prs;
-
-class QXGRAPH_EXPORT QxGraph_Canvas : public QCanvas {
- Q_OBJECT
-
- public:
- QxGraph_Canvas(SUIT_ResourceMgr*);
- virtual ~QxGraph_Canvas();
-
- virtual void addView(QCanvasView* theView);
- virtual void removeView(QCanvasView*);
-
- QPtrList<QxGraph_Prs> getPrsList() const { return myPrsList; }
- QxGraph_Prs* getPrs(int theIndex = 0);
- void addPrs(QxGraph_Prs* thePrs) { myPrsList.append(thePrs); }
-
- virtual void removeItem( QCanvasItem* );
-
-private:
-
- QValueList< QCanvasView* > myViews;
- QPtrList<QxGraph_Prs> myPrsList;
-
-};
-
-#endif
+++ /dev/null
-// SALOME QxGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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 "QxGraph_CanvasView.h"
-#include "QxGraph_Canvas.h"
-#include "QxGraph_ViewWindow.h"
-#include "QxGraph_ActiveItem.h"
-#include "QxGraph_Def.h"
-
-#include <qwmatrix.h>
-#include <math.h>
-
-const char* imageZoomCursor[] = {
-"32 32 3 1",
-". c None",
-"a c #000000",
-"# c #ffffff",
-"................................",
-"................................",
-".#######........................",
-"..aaaaaaa.......................",
-"................................",
-".............#####..............",
-"...........##.aaaa##............",
-"..........#.aa.....a#...........",
-".........#.a.........#..........",
-".........#a..........#a.........",
-"........#.a...........#.........",
-"........#a............#a........",
-"........#a............#a........",
-"........#a............#a........",
-"........#a............#a........",
-".........#...........#.a........",
-".........#a..........#a.........",
-".........##.........#.a.........",
-"........#####.....##.a..........",
-".......###aaa#####.aa...........",
-"......###aa...aaaaa.......#.....",
-".....###aa................#a....",
-"....###aa.................#a....",
-"...###aa...............#######..",
-"....#aa.................aa#aaaa.",
-".....a....................#a....",
-"..........................#a....",
-"...........................a....",
-"................................",
-"................................",
-"................................",
-"................................"};
-
-const char* imageCrossCursor[] = {
- "32 32 3 1",
- ". c None",
- "a c #000000",
- "# c #ffffff",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "...............#................",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- ".......#################........",
- "........aaaaaaa#aaaaaaaaa.......",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "................a...............",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................"};
-
-/*!
- Constructor
-*/
-QxGraph_CanvasView::QxGraph_CanvasView(QxGraph_Canvas* theCanvas, QxGraph_ViewWindow* theViewWindow) :
- QCanvasView(theCanvas, theViewWindow, 0, Qt::WRepaintNoErase),
- myCurrentItem(0),
- myHilightedItem(0),
- mySelectedItem(0),
- myMovingDone(false),
- myCenter(0,0)
-{
- printf("Construct QxGraph_CanvasView\n");
- setName("QxGraph_CanvasView");
-
- myOperation = NOTHING;
- myCursor = cursor();
- mySelectedRect = 0;
-
- myTimer = new QTimer(this);
- connect(myTimer, SIGNAL(timeout()), this, SLOT(onTimeout()));
-
- viewport()->setMouseTracking(true);
-}
-
-/*!
- Destructor
-*/
-QxGraph_CanvasView::~QxGraph_CanvasView()
-{
-}
-
-void QxGraph_CanvasView::contentsMousePressEvent(QMouseEvent* theEvent)
-{
- myPoint = inverseWorldMatrix().map(theEvent->pos());
- myGlobalPoint = theEvent->globalPos();
- myCurrentItem = 0;
-
- if ( theEvent->button() == Qt::MidButton && theEvent->state() == Qt::ControlButton
- ||
- myOperation == PANVIEW )
- { // Panning
- if ( myOperation != PANVIEW ) {
- myOperation = PANVIEW;
- myCursor = cursor(); // save old cursor
- QCursor panCursor (Qt::SizeAllCursor);
- setCursor(panCursor);
- }
- return;
- }
-
- if ( myOperation == PANGLOBAL )
- { // Global panning
- return;
- }
-
- if ( myOperation == WINDOWFIT )
- { // Fit area
- return;
- }
-
- if ( theEvent->button() == Qt::LeftButton && theEvent->state() == Qt::ControlButton
- ||
- myOperation == ZOOMVIEW )
- { // Zoom
- if ( myOperation != ZOOMVIEW ) {
- myOperation = ZOOMVIEW;
- myCursor = cursor(); // save old cursor
- QPixmap zoomPixmap (imageZoomCursor);
- QCursor zoomCursor (zoomPixmap);
- setCursor(zoomCursor);
-
- // the center of the view before zooming
- int aXVCenter = viewport()->width()/2;
- int aYVCenter = viewport()->height()/2;
- myCenter = viewportToContents(QPoint(aXVCenter,aYVCenter));
- }
- return;
- }
-
- if ( theEvent->button() == Qt::LeftButton )
- {
- QCanvasItemList aList = canvas()->collisions(myPoint);
- // to move items on canvas view
- for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) {
- QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
- int aCursorType;
- if ( anActItem && anActItem->isResizable(myPoint,aCursorType) )
- { // resize itself only active items if it is resizable
- anActItem->beforeResizing(aCursorType);
- myCurrentItem = *it;
- return;
- }
- else if ( anActItem && anActItem->isMoveable() )
- { // move itself only active items if it is moveable
- anActItem->beforeMoving();
- myCurrentItem = *it;
- return;
- }
- }
- }
-}
-
-void QxGraph_CanvasView::contentsMouseMoveEvent(QMouseEvent* theEvent)
-{
- QPoint aPoint = inverseWorldMatrix().map(theEvent->pos());
- QPoint aGlobalPoint = theEvent->globalPos();
-
- if (myTimer->isActive()) myTimer->stop();
-
- if ( myOperation == PANVIEW )
- { // Panning
- scrollBy(myGlobalPoint.x() - aGlobalPoint.x(),
- myGlobalPoint.y() - aGlobalPoint.y());
- myGlobalPoint = aGlobalPoint;
- myMovingDone = true;
- return;
- }
-
- if ( myOperation == WINDOWFIT )
- { // Fit within rectangle
- int aLX, aTY; //left x and top y
- if (myPoint.x() < aPoint.x()) aLX = myPoint.x();
- else aLX = aPoint.x();
- if (myPoint.y() < aPoint.y()) aTY = myPoint.y();
- else aTY = aPoint.y();
- QRect aRect(aLX, aTY, abs(myPoint.x()-aPoint.x()), abs(myPoint.y()-aPoint.y()));
- QCanvasRectangle* aRect1 = new QCanvasRectangle(aRect, canvas());
-
- //hide old selected rectangle
- if (mySelectedRect)
- mySelectedRect->hide();
- //draw new selected rectangle
- QPen pen(Qt::black,1,Qt::SolidLine);
- aRect1->setPen(pen);
- aRect1->setZ(1E+6);
- aRect1->show();
-
- mySelectedRect = aRect1;
- canvas()->update();
-
- return;
- }
-
- if ( myOperation == ZOOMVIEW )
- { // Zoom
- QCanvasItemList aList = canvas()->allItems();
- for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it)
- (*it)->hide();
-
- int aXContCenter = myCenter.x();
- int aYContCenter = myCenter.y();
-
- QWMatrix m = worldMatrix();
-
- double dx = aGlobalPoint.x() - myGlobalPoint.x();
- double s = 1. + fabs(dx)*( (m.m11() < 1) ? m.m11() : 1. )/70.;
- if (dx < 0) s = 1./s;
-
- int aXContCenterScaled = aXContCenter*s;
- int aYContCenterScaled = aYContCenter*s;
-
- m.scale(s, s);
- setWorldMatrix(m);
-
- center(aXContCenterScaled,aYContCenterScaled);
-
- myCenter.setX(aXContCenterScaled);
- myCenter.setY(aYContCenterScaled);
-
- // remember the canvas view's current transformation matrix in all canvas items
- aList = canvas()->allItems();
- for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) {
- QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
- if ( anActItem ) anActItem->setTMatrix(m);
- (*it)->show();
- }
-
- myGlobalPoint = aGlobalPoint;
- myMovingDone = true;
-
- return;
- }
-
- if ( myCurrentItem )
- {
- QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( myCurrentItem );
- if ( anActItem && anActItem->isResizing() )
- { // to resize items on canvas view
- anActItem->resize(aPoint);
- myMovingDone = true;
- return;
- }
-
- // to move items on canvas view
- if ( myCurrentItem->x() && myCurrentItem->y() ) {
- double cx = myCurrentItem->x() - myPoint.x();
- double cy = myCurrentItem->y() - myPoint.y();
-
- if (aPoint.x()+cx < 0) aPoint.setX(-(int)cx);
- if (aPoint.y()+cy < 0) aPoint.setY(-(int)cy);
- }
- myCurrentItem->moveBy(aPoint.x() - myPoint.x(),
- aPoint.y() - myPoint.y());
- myMovingDone = true;
- myPoint = aPoint;
- canvas()->update();
-
- // scroll contents if mouse is outside
- QRect r(contentsX(), contentsY(), visibleWidth(), visibleHeight());
- if (!r.contains(theEvent->pos())) {
- int dx = 0, dy = 0;
- if (theEvent->pos().x() < r.left()) dx = theEvent->pos().x() - r.left();
- if (theEvent->pos().x() > r.right()) dx = theEvent->pos().x() - r.right();
- if (theEvent->pos().y() < r.top()) dy = theEvent->pos().y() - r.top();
- if (theEvent->pos().y() > r.bottom()) dy = theEvent->pos().y() - r.bottom();
- scrollBy(dx, dy);
- // start timer to scroll in silent mode
- myDX = dx; myDY = dy;
- myTimer->start(100);
- }
-
- return;
- }
- else
- {
- QCanvasItemList aList = canvas()->collisions(aPoint);
- // perform actions for active items
- bool isHilightPerformed = false;
-
- for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) {
- QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
-
- if (!isHilightPerformed && anActItem) {
- // hilight
- anActItem->hilight(aPoint);
- if (anActItem != myHilightedItem) {
- if (myHilightedItem)
- myHilightedItem->hilight(aPoint, false);
- myHilightedItem = anActItem;
- }
- isHilightPerformed = true;
-
- // show tooltip
- QxGraph_ToolTip* aToolTip = new QxGraph_ToolTip(this);
- aToolTip->maybeTip(aPoint);
- }
-
- int aCursorType;
- if ( anActItem && anActItem->isResizable(aPoint,aCursorType) ) {
- // set resize cursor
- QCursor resizeCursor;
- switch (aCursorType)
- {
- case 1: //left
- case 3: //right
- resizeCursor = QCursor(Qt::SizeHorCursor);
- break;
- case 2: //top
- case 4: //bottom
- resizeCursor = QCursor(Qt::SizeVerCursor);
- break;
- case 5: //left-top
- case 7: //right-bottom
- resizeCursor = QCursor(Qt::SizeFDiagCursor);
- break;
- case 6: //right-top
- case 8: //left-bottom
- resizeCursor = QCursor(Qt::SizeBDiagCursor);
- break;
- default :
- resizeCursor = QCursor(Qt::ArrowCursor);
- break;
- }
- setCursor(resizeCursor);
- return;
- }
- else {
- // reset old cursor
- setCursor(QCursor(Qt::ArrowCursor));
- return;
- }
- }
-
- if (!isHilightPerformed && myHilightedItem) {
- myHilightedItem->hilight(aPoint, false);
- myHilightedItem = 0;
- QToolTip::hide(); //@ temporary solution
- }
-
- if ( cursor().shape() == Qt::SizeVerCursor || cursor().shape() == Qt::SizeHorCursor
- || cursor().shape() == Qt::SizeBDiagCursor || cursor().shape() == Qt::SizeFDiagCursor)
- setCursor(QCursor(Qt::ArrowCursor));
- }
-}
-
-/*!
- This method is called by QxGraph_Canvas when item is removed.
- QxGraph_CanvasView updates its own data accordingly
-*/
-void QxGraph_CanvasView::itemRemoved( QCanvasItem* theItem )
-{
- if ( myCurrentItem == theItem )
- myCurrentItem = 0;
-
- QxGraph_ActiveItem* anActiveItem = dynamic_cast<QxGraph_ActiveItem*>( theItem );
- if ( anActiveItem )
- {
- if ( myHilightedItem == anActiveItem )
- myHilightedItem = 0;
- if ( mySelectedItem == anActiveItem )
- mySelectedItem = 0;
- }
-}
-
-void QxGraph_CanvasView::setSelectedItem( QxGraph_ActiveItem* theItem )
-{
- mySelectedItem = theItem;
-}
-
-QxGraph_ActiveItem* QxGraph_CanvasView::getSelectedItem() const
-{
- return mySelectedItem;
-}
-
-void QxGraph_CanvasView::contentsMouseReleaseEvent(QMouseEvent* theEvent)
-{
- QPoint aPoint = inverseWorldMatrix().map(theEvent->pos());
-
- if (myTimer->isActive()) myTimer->stop();
-
- if (myCurrentItem)
- { // to move items on canvas view
- QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( myCurrentItem );
- if ( anActItem && anActItem->isResizing() )
- {
- anActItem->afterResizing();
- // reset old cursor
- setCursor(QCursor(Qt::ArrowCursor));
- }
- else if ( anActItem && anActItem->isMoveable() )
- anActItem->afterMoving();
- }
- myCurrentItem = 0;
-
- if ( myOperation == PANVIEW )
- { // Panning
- myOperation = NOTHING;
- viewport()->setMouseTracking(true);
- setCursor(myCursor);
-
- emit viewOperationDone();
- }
-
- if ( myOperation == PANGLOBAL )
- { // Global panning
- myOperation = NOTHING;
- center( theEvent->x(), theEvent->y() );
- setCursor(myCursor);
-
- emit viewOperationDone();
- }
-
- if ( myOperation == WINDOWFIT )
- { // Fit within rectangle
- myOperation = NOTHING;
-
- if (mySelectedRect) {
- mySelectedRect->hide();
- mySelectedRect = 0;
- //canvas()->update();
- }
-
- //myPoint is the start point for selecting rectangle now
- int aLX, aTY; //left x and top y
- if (myPoint.x() < aPoint.x()) aLX = myPoint.x();
- else aLX = aPoint.x();
- if (myPoint.y() < aPoint.y()) aTY = myPoint.y();
- else aTY = aPoint.y();
-
- //calculate width and height for new view and new zoom factor
- double aXzoom = ((double)visibleWidth())/((double)(abs(myPoint.x()-aPoint.x())));
- double aYzoom = ((double)visibleHeight())/((double)(abs(myPoint.y()-aPoint.y())));
- if (aXzoom > aYzoom) aXzoom = aYzoom;
-
- QWMatrix m;
- m.scale(aXzoom, aXzoom);
- setWorldMatrix(m);
-
- // remember the canvas view's current transformation matrix in all canvas items
- QCanvasItemList aList = canvas()->allItems();
- for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) {
- QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
- if ( anActItem ) anActItem->setTMatrix(m);
- }
-
- setContentsPos((int)(aLX*aXzoom), (int)(aTY*aYzoom));
-
- canvas()->update();
-
- viewport()->setMouseTracking(true);
- setCursor(myCursor);
-
- emit viewOperationDone();
- }
-
- if ( myOperation == ZOOMVIEW )
- { // Zoom
- myOperation = NOTHING;
- viewport()->setMouseTracking(true);
- setCursor(myCursor);
-
- emit viewOperationDone();
- }
-
- if ( theEvent->button() == RightButton )
- {
- // Selection mechanism
- QCanvasItemList aList = canvas()->collisions(aPoint);
- bool isSelectionPerformed = false;
-
- for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) {
- QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
- if (!isSelectionPerformed && anActItem)
- {
- anActItem->select(aPoint);
- if (anActItem != mySelectedItem)
- {
- if (mySelectedItem && isSelectedItemInCanvas() &&
- !mySelectedItem->arePartsOfOtherItem(anActItem)) mySelectedItem->select(aPoint, false);
- mySelectedItem = anActItem;
-
- // unhilight hilighted item if selection was performed
- if (myHilightedItem) {
- myHilightedItem->hilight(aPoint, false);
- myHilightedItem = 0;
- }
- }
- isSelectionPerformed = true;
- }
- }
-
- if (!isSelectionPerformed)
- {
- if ( mySelectedItem )
- {
- if ( isSelectedItemInCanvas() ) mySelectedItem->select(aPoint, false);
- mySelectedItem = 0;
- }
-
- // Background popup
- printf("Background popup\n");
- QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
- theEvent->pos(), theEvent->globalPos(),
- theEvent->state() );
- if ( getViewWindow() )
- getViewWindow()->contextPopupEvent(&aEvent); // => emit contextMenuRequested( &aEvent );
- }
- else
- { // show context popup for the selected item
- mySelectedItem->showPopup(viewport(), theEvent, aPoint);
- }
- }
-
- if ( theEvent->button() == LeftButton && !myMovingDone )
- {
- // Selection mechanism
- QCanvasItemList aList = canvas()->collisions(aPoint);
-
- if ( aList.empty() && mySelectedItem )
- {
- if ( isSelectedItemInCanvas() ) mySelectedItem->select(aPoint, false);
- mySelectedItem = 0;
- }
- else
- {
- for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) {
- QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
- if (anActItem)
- {
- anActItem->select(aPoint);
- if (anActItem != mySelectedItem)
- {
- if (mySelectedItem && isSelectedItemInCanvas() &&
- !mySelectedItem->arePartsOfOtherItem(anActItem)) mySelectedItem->select(aPoint, false);
- mySelectedItem = anActItem;
- }
- break;
- }
- }
- }
- }
-
- myMovingDone = false;
-}
-
-void QxGraph_CanvasView::contentsMouseDoubleClickEvent(QMouseEvent* theEvent)
-{
-
-}
-
-bool QxGraph_CanvasView::isSelectedItemInCanvas()
-{
- // check if mySelectedItem is included into the canvas:
- // if yes => unselect it
- // if no => do nothing
- bool anIsInCanvas = false;
- QCanvasItemList aListC = canvas()->allItems();
- for (QCanvasItemList::Iterator itC = aListC.begin(); itC != aListC.end(); ++itC) {
- QxGraph_ActiveItem* anActItemC = dynamic_cast<QxGraph_ActiveItem*>( *itC );
- if ( anActItemC && anActItemC == mySelectedItem ) {
- anIsInCanvas = true;
- break;
- }
- }
- return anIsInCanvas;
-}
-
-void QxGraph_CanvasView::activateFitAll()
-{
- //myOperation = FITALL;
- int w = 0, h = 0;
- QCanvasItemList l = canvas()->allItems();
- for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) {
- QRect r = (*it)->boundingRect();
- if (w < r.right()) w = r.right();
- if (h < r.bottom()) h = r.bottom();
- }
- w += GRAPH_MARGIN; h += GRAPH_MARGIN;
- double s = ((double)visibleWidth())/((double)w);
- double s1 = ((double)visibleHeight())/((double)h);
- if (s > s1) s = s1;
-
- setContentsPos(0,0);
- QWMatrix m;
- m.scale(s, s);
- setWorldMatrix(m);
-
- // remember the canvas view's current transformation matrix in all canvas items
- QCanvasItemList aList = canvas()->allItems();
- for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) {
- QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
- if ( anActItem ) anActItem->setTMatrix(m);
- }
-
- canvas()->update();
- //myOperation = NOTHING;
-
- emit viewOperationDone();
-}
-
-void QxGraph_CanvasView::activateFitRect()
-{
- myOperation = WINDOWFIT;
- viewport()->setMouseTracking(false);
- myCursor = cursor(); // save old cursor
- QCursor handCursor (Qt::PointingHandCursor);
- setCursor(handCursor);
-}
-
-void QxGraph_CanvasView::activateZoom()
-{
- myOperation = ZOOMVIEW;
- viewport()->setMouseTracking(false);
- myCursor = cursor(); // save old cursor
- QPixmap zoomPixmap (imageZoomCursor);
- QCursor zoomCursor (zoomPixmap);
- setCursor(zoomCursor);
-}
-
-void QxGraph_CanvasView::activatePanning()
-{
- myOperation = PANVIEW;
- viewport()->setMouseTracking(false);
- myCursor = cursor(); // save old cursor
- QCursor panCursor (Qt::SizeAllCursor);
- setCursor(panCursor);
-}
-
-void QxGraph_CanvasView::activateGlobalPanning()
-{
- myOperation = PANGLOBAL;
- myCursor = cursor(); // save old cursor
- QPixmap globalPanPixmap (imageCrossCursor);
- QCursor glPanCursor (globalPanPixmap);
- setCursor(glPanCursor);
-}
-
-void QxGraph_CanvasView::activateReset()
-{
- //myOperation = RESETVIEW;
- setContentsPos(0,0);
- QWMatrix m;
- setWorldMatrix(m);
-
- // remember the canvas view's current transformation matrix in all canvas items
- QCanvasItemList aList = canvas()->allItems();
- for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) {
- QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
- if ( anActItem ) anActItem->setTMatrix(m);
- }
-
- //myOperation = NOTHING;
-
- emit viewOperationDone();
-}
-
-void QxGraph_CanvasView::onTimeout()
-{
- if (myCurrentItem) {
- scrollBy(myDX, myDY);
-
- double cx, cy;
- inverseWorldMatrix().map((double)myDX, (double)myDY, &cx, &cy);
- if (myCurrentItem->x()+cx < 0) cx = -myCurrentItem->x();
- if (myCurrentItem->y()+cy < 0) cy = -myCurrentItem->y();
- myCurrentItem->moveBy(cx, cy);
- myPoint.setX(myPoint.x()+(int)cx);
- myPoint.setY(myPoint.y()+(int)cy);
- canvas()->update();
- }
-}
-
-QxGraph_ViewWindow* QxGraph_CanvasView::getViewWindow() const
-{
- return dynamic_cast<QxGraph_ViewWindow*>( parent() );
-}
-
-/*!
- Shows tooltip if necessary
-*/
-void QxGraph_ToolTip::maybeTip(const QPoint& theMousePos) {
- QCanvasItemList aList = ((QCanvasView*)parentWidget())->canvas()->collisions(theMousePos);
-
- for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) {
- QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
- if (anActItem)
- {
- QRect aRect;
- QString aText = anActItem->getToolTipText(theMousePos, aRect);
- int avX, avY;
- QWMatrix aWM = ((QCanvasView*)parentWidget())->worldMatrix();
- ((QCanvasView*)parentWidget())->contentsToViewport((int)(aRect.left()*aWM.m11()),
- (int)(aRect.top()*aWM.m22()),
- avX, avY);
- QRect aTipRect(avX, avY, (int)(aRect.width()*aWM.m11()), (int)(aRect.height()*aWM.m22()));
- if (!aText.isEmpty())
- tip(aTipRect, aText);
- return;
- }
- }
-}
-
-
-
+++ /dev/null
-// SALOME QxGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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 QXGRAPH_CANVASVIEW_H
-#define QXGRAPH_CANVASVIEW_H
-
-#include "QxGraph.h"
-
-#include <qcanvas.h>
-#include <qcursor.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-
-class QxGraph_Canvas;
-class QxGraph_ViewWindow;
-class QxGraph_ActiveItem;
-
-class QXGRAPH_EXPORT QxGraph_CanvasView : public QCanvasView {
- Q_OBJECT
-
- public:
- enum OperationType{ NOTHING, PANVIEW, ZOOMVIEW, PANGLOBAL,
- WINDOWFIT, FITALLVIEW, RESETVIEW };
-
- QxGraph_CanvasView(QxGraph_Canvas* theCanvas, QxGraph_ViewWindow* theViewWindow);
- virtual ~QxGraph_CanvasView();
-
- QxGraph_ViewWindow* getViewWindow() const;
-
- void activateFitAll();
- void activateFitRect();
- void activateZoom();
- void activatePanning();
- void activateGlobalPanning();
- void activateReset();
-
- void itemRemoved( QCanvasItem* );
-
- void setSelectedItem( QxGraph_ActiveItem* theItem );
- QxGraph_ActiveItem* getSelectedItem() const;
-
- signals:
- void viewOperationDone();
-
- public slots:
- void onTimeout();
- //void changeBackground();
-
- protected:
- void contentsMousePressEvent(QMouseEvent* theEvent);
- void contentsMouseMoveEvent(QMouseEvent* theEvent);
- void contentsMouseReleaseEvent(QMouseEvent* theEvent);
- void contentsMouseDoubleClickEvent(QMouseEvent* theEvent);
-
- bool isSelectedItemInCanvas();
-
- private:
- // for moving items
- QCanvasItem* myCurrentItem;
- QPoint myPoint;
- QPoint myGlobalPoint;
- bool myMovingDone;
- QPoint myCenter;
-
- // for control toolbar actions
- OperationType myOperation;
- QCursor myCursor;
- QCanvasRectangle* mySelectedRect;
-
- // for automatic content scrolling if mouse is outside
- QTimer* myTimer;
- int myDX;
- int myDY;
-
- // for hilight
- QxGraph_ActiveItem* myHilightedItem;
-
- // for selection
- QxGraph_ActiveItem* mySelectedItem;
-};
-
-
-class QxGraph_ToolTip: public QToolTip {
-
- public:
- QxGraph_ToolTip(QWidget* theWidget, QToolTipGroup* theGroup = 0):
- QToolTip(theWidget, theGroup) {}
- ~QxGraph_ToolTip() { remove(parentWidget()); }
-
- virtual void maybeTip(const QPoint& theMousePos);
-};
-
-#endif
+++ /dev/null
-// SALOME QxGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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 QXGRAPH_DEF_H
-#define QXGRAPH_DEF_H
-
-#define DEF_BACK_COLOR QColor(144, 208, 211)
-#define RECTANGLE_BODY QColor(255,249,147)
-
-#define GRAPH_WIDTH 1250
-#define GRAPH_HEIGHT 950
-
-#define GRAPH_MARGIN 50
-
-#endif
+++ /dev/null
-// SALOME QxGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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 "QxGraph_Prs.h"
-
-#include "QxGraph_Canvas.h"
-#include "QxGraph_Def.h" // for debug only
-
-#include "SUIT_Session.h" // for debug only
-
-/*!
- Constructor
-*/
-QxGraph_Prs::QxGraph_Prs(QxGraph_Canvas* theCanvas):
- myCanvas(theCanvas),
- myDMode(0),
- needUpdate(true)
-{
- myCanvas->addPrs(this);
-}
-
-/*!
- Destructor
-*/
-QxGraph_Prs::~QxGraph_Prs()
-{
- for ( DMode2ItemList::iterator it1 = myDisplayMap.begin();
- it1 != myDisplayMap.end();
- it1++ )
- {
- for ( std::list<QCanvasItem*>::iterator it2 = (*it1).second.begin();
- it2 != (*it1).second.end();
- it2++ )
- {
- QCanvasItem* anItem = *it2;
- if ( anItem ) delete anItem;
- }
- }
-
- myDisplayMap.clear();
-}
-
-/*!
- Add item to display in the view with index theDMode
-*/
-void QxGraph_Prs::addItem(QCanvasItem* theItem, int theDMode)
-{
- if ( theDMode == -1 ) // add item for the current display mode
- myDisplayMap[myDMode].push_back(theItem);
- else
- myDisplayMap[theDMode].push_back(theItem);
-}
-
-/*!
- Remove item from the view with index theDMode
-*/
-void QxGraph_Prs::removeItem(QCanvasItem* theItem, int theDMode)
-{
- if ( theDMode == -1 ) // remove item from the current display mode
- myDisplayMap[myDMode].remove(theItem);
- else
- myDisplayMap[theDMode].remove(theItem);
-}
-
-/*! Adds all the items of this presentation for the current display mode
- * to the canvas.
- */
-void QxGraph_Prs::show()
-{
- if ( isToUpdate() )
- update();
-
- for ( std::list<QCanvasItem*>::iterator it = myDisplayMap[myDMode].begin();
- it != myDisplayMap[myDMode].end();
- it++ )
- {
- QCanvasItem* anItem = *it;
- if ( anItem )
- {
- anItem->setCanvas( myCanvas );
- anItem->show();
- }
- }
-}
-
-/*! Removes all the items belonging to this presentation from the canvas.
- */
-void QxGraph_Prs::hide()
-{
- for ( DMode2ItemList::iterator it1 = myDisplayMap.begin();
- it1 != myDisplayMap.end();
- it1++ )
- {
- for ( std::list<QCanvasItem*>::iterator it2 = (*it1).second.begin();
- it2 != (*it1).second.end();
- it2++ )
- {
- QCanvasItem* anItem = *it2;
- if ( anItem )
- {
- anItem->setCanvas( 0 );
- }
- }
- }
-}
-
-/*! Prepare for full recomputation of the presentation
- */
-void QxGraph_Prs::setToUpdate( const bool theFlag )
-{
- needUpdate = theFlag;
-}
-
-/*! Re-fills the presentation with items.
- * Base implementation just resets <needUpdate> flag.
- * It should be called at the end by re-implementations.
- */
-void QxGraph_Prs::update()
-{
- setToUpdate( false );
-}
-
-/*!
- Add a QCanvasRectangle item for display mode DMode
-*/
-QCanvasItem* QxGraph_Prs::addRectangleItem(QRect theRect, int theDMode)
-{
- QCanvasRectangle* aRectItem;
- if ( myCanvas )
- {
- QCanvasRectangle* aRectItem = new QCanvasRectangle(theRect, myCanvas);
- aRectItem->setZ(0);
- aRectItem->show();
- myCanvas->update();
-
- // test drawing features: brush, pen ...
- QBrush aBr(SUIT_Session::session()->resourceMgr()->colorValue( "QxGraph", "NodeBody", RECTANGLE_BODY ));
- aRectItem->setBrush(aBr);
- }
- addItem(aRectItem);
- return aRectItem;
-}
-
-/*!
- Add a QCanvasPolygon item for display mode DMode
-*/
-QCanvasItem* QxGraph_Prs::addPolygonItem(QPointArray thePA, int theDMode)
-{
- QCanvasPolygon* aPolyItem;
- if ( myCanvas )
- {
- aPolyItem = new QCanvasPolygon(myCanvas);
- aPolyItem->setZ(0);
- aPolyItem->setPoints(thePA);
- aPolyItem->show();
- myCanvas->update();
-
- // test drawing features: brush, pen ...
- QBrush aBr(SUIT_Session::session()->resourceMgr()->colorValue( "QxGraph", "NodeBody", RECTANGLE_BODY ));
- aPolyItem->setBrush(aBr);
- QPen aPen(Qt::black,2);
- aPolyItem->setPen(aPen);
- }
- addItem(aPolyItem);
- return aPolyItem;
-}
-
-/*!
- Add a QCanvasLine item for display mode DMode
-*/
-QCanvasItem* QxGraph_Prs::addLineItem(QPoint theStart, QPoint theEnd, int theDMode)
-{
- QCanvasLine* aLineItem;
- if ( myCanvas )
- {
- aLineItem = new QCanvasLine(myCanvas);
- aLineItem->setZ(0);
- aLineItem->setPoints(theStart.x(), theStart.y(), theEnd.x(), theEnd.y());
- aLineItem->show();
- myCanvas->update();
-
- // test drawing features: brush, pen ...
- QPen aPen(Qt::black,2);
- aLineItem->setPen(aPen);
- }
- addItem(aLineItem);
- return aLineItem;
-}
-
-/*!
- Add a QCanvasEllipse item for display mode DMode
-*/
-QCanvasItem* QxGraph_Prs::addEllipseItem(int theW, int theH, int theStartAngle, int theAngle, int theDMode)
-{
- QCanvasEllipse* aEllipseItem;
- if ( myCanvas )
- {
- aEllipseItem = new QCanvasEllipse(theW, theH, theStartAngle, theAngle, myCanvas);
- aEllipseItem->setZ(0);
- aEllipseItem->show();
- myCanvas->update();
-
- // test drawing features: brush, pen ...
- QBrush aBr(SUIT_Session::session()->resourceMgr()->colorValue( "QxGraph", "NodeBody", RECTANGLE_BODY ));
- aEllipseItem->setBrush(aBr);
- QPen aPen(Qt::black,2);
- aEllipseItem->setPen(aPen);
- }
- addItem(aEllipseItem);
- return aEllipseItem;
-}
-
-/*!
- Add a QCanvasText item for display mode DMode
-*/
-QCanvasItem* QxGraph_Prs::addTextItem(QString theText, int theDMode)
-{
- QCanvasText* aTextItem;
- if ( myCanvas )
- {
- aTextItem = new QCanvasText(theText, myCanvas);
- aTextItem->setZ(0);
- aTextItem->show();
- myCanvas->update();
-
- // test drawing features: font, color, text flags ...
- aTextItem->setColor(Qt::darkBlue);
- //aTextItem->setFont(QFont("Times"/*"Helvetica"*/, 14, QFont::Normal, true));
- }
- addItem(aTextItem);
- return aTextItem;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 QXGRAPH_PRS_H
-#define QXGRAPH_PRS_H
-
-#include <QxGraph.h>
-
-#include <qcanvas.h>
-#include <map>
-#include <list>
-
-class QxGraph_Canvas;
-
-class QXGRAPH_EXPORT QxGraph_Prs
-{
- public:
- QxGraph_Prs(QxGraph_Canvas*);
- virtual ~QxGraph_Prs();
-
- QxGraph_Canvas* getCanvas() const { return myCanvas; }
-
- void addItem(QCanvasItem* theItem, int theDMode = -1);
- void removeItem(QCanvasItem* theItem, int theDMode = -1);
-
- /* add items for display mode theDMode
- if theDMode is equal to -1 add item for the current (active) display mode */
- QCanvasItem* addRectangleItem(QRect theRect, int theDMode = -1);
- QCanvasItem* addPolygonItem(QPointArray thePA, int theDMode = -1);
- QCanvasItem* addLineItem(QPoint theStart, QPoint theEnd, int theDMode = -1);
- QCanvasItem* addEllipseItem(int theW, int theH, int theStartAngle, int theAngle, int theDMode = -1);
- QCanvasItem* addTextItem(QString theText, int theDMode = -1);
-
- typedef std::map< int, std::list<QCanvasItem*> > DMode2ItemList;
-
- const DMode2ItemList& getDisplayMap() const { return myDisplayMap; }
- const std::list<QCanvasItem*>& getItems(int theDMode) { return myDisplayMap[theDMode]; }
-
- void setDMode(int theDMode) { myDMode = theDMode; }
- int getDMode() const { return myDMode; }
-
- virtual void show();
- virtual void hide();
- virtual void setToUpdate( const bool );
- bool isToUpdate() { return needUpdate; }
-
-protected:
- virtual void update();
-
-private:
- QxGraph_Canvas* myCanvas;
- DMode2ItemList myDisplayMap;
-
- int myDMode;
- bool needUpdate;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "QxGraph_ViewManager.h"
-
-/*!
- Constructor
-*/
-QxGraph_ViewManager::QxGraph_ViewManager( SUIT_Study* theStudy,
- SUIT_Desktop* theDesktop,
- SUIT_ViewModel* theViewModel )
- : SUIT_ViewManager( theStudy, theDesktop, theViewModel )
-{
-}
-
-/*!
- Destructor
-*/
-QxGraph_ViewManager::~QxGraph_ViewManager()
-{
-}
-
-/*!
- Sets view name
- \param theView - view to assign name
-*/
-void QxGraph_ViewManager::setViewName(SUIT_ViewWindow* theView)
-{
- int aPos = myViews.find(theView);
- theView->setCaption( QString( "QxGraph scene:%1 - viewer:%2" ).arg( myId ).arg(aPos+1));
-}
-
-/*!
- Fills popup menu with custom actions
- \param popup - popup menu to be filled with
-*/
-void QxGraph_ViewManager::contextMenuPopup( QPopupMenu* thePopup)
-{
- SUIT_ViewManager::contextMenuPopup( thePopup );
- // to be implemented
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 QXGRAPH_VIEWMANAGER_H
-#define QXGRAPH_VIEWMANAGER_H
-
-#include "QxGraph.h"
-
-#include "QxGraph_ViewModel.h"
-#include "SUIT_ViewManager.h"
-
-class SUIT_Desktop;
-
-class QXGRAPH_EXPORT QxGraph_ViewManager : public SUIT_ViewManager
-{
- Q_OBJECT
-
-public:
- QxGraph_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop, SUIT_ViewModel* theViewModel = 0 );
- ~QxGraph_ViewManager();
-
- virtual void contextMenuPopup( QPopupMenu* thePopup );
-
-protected:
- void setViewName(SUIT_ViewWindow* theView);
-
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "QxGraph_ViewModel.h"
-#include "QxGraph_ViewWindow.h"
-#include "QxGraph_Canvas.h"
-#include "QxGraph_CanvasView.h"
-#include "QxGraph_Def.h"
-#include "QxGraph_Prs.h"
-
-#include "SUIT_Desktop.h"
-#include "SUIT_ViewWindow.h"
-#include "SUIT_Session.h"
-
-#include <qcolordialog.h>
-#include <qpopupmenu.h>
-#include <qcanvas.h> // for addRectangleItem(...) method (can be removed in the future)
-
-/*!
- Constructor
-*/
-QxGraph_Viewer::QxGraph_Viewer()
- :SUIT_ViewModel(),
- myCanvas(0),
- myCurrentView(0)
-{
- printf("Construct QxGraph_Viewer\n");
- //myCanvases.setAutoDelete(true);
- //myCanvasViews.setAutoDelete(true);
-}
-
-/*!
- Destructor
-*/
-QxGraph_Viewer::~QxGraph_Viewer()
-{
- if ( myCanvas ) delete myCanvas;
- //if ( !myCanvases.isEmpty() ) myCanvases.clear();
- if ( !myCanvasViews.isEmpty() ) myCanvasViews.clear();
- myCurrentView = 0;
-}
-
-/*!
- Start initialization of view window
- \param view - view window to be initialized
-*/
-void QxGraph_Viewer::initView( QxGraph_ViewWindow* view )
-{
- if ( view )
- {
- view->initLayout();
-
- /*
- // test add items into the current canvas view
- QRect aRect(100,200,200,100);
- QCanvasItem* aRectItem = aPrs->addRectangleItem(aRect);
- //delete aRectItem;
-
- QPointArray aPA(6);
- aPA.putPoints(0, 6, 400,100, 500,70, 600,100, 600,200, 500,230, 400,200);
- QCanvasItem* aPolyItem = aPrs->addPolygonItem(aPA);
- //delete aPolyItem;
-
- QPoint aStart(500,300), aEnd(700,250);
- QCanvasItem* aLineItem = aPrs->addLineItem(aStart, aEnd);
- //delete aLineItem;
-
- QCanvasItem* aEllipseItem = aPrs->addEllipseItem(200, 100, 30*16, 120*16);
- aEllipseItem->setX(400);
- aEllipseItem->setY(400);
- //delete aEllipseItem;
-
- QCanvasItem* aTextItem = aPrs->addTextItem("This is a QCanvasText item");
- aTextItem->setX(100);
- aTextItem->setY(500);
- //delete aTextItem;
- */
- }
-}
-
-/*!
- Creates new view window
- \param theDesktop - main window of application
-*/
-SUIT_ViewWindow* QxGraph_Viewer::createView(SUIT_Desktop* theDesktop)
-{
- QxGraph_ViewWindow* aRes = new QxGraph_ViewWindow( theDesktop, this );
- initView( aRes );
- return aRes;
-}
-
-/*!
- Set view with index theIndex from myCanvasViews as current view
- \param theIndex - the index of the view in the list
-*/
-void QxGraph_Viewer::setCurrentView(int theIndex)
-{
- if ( theIndex >= 0 && theIndex < myCanvasViews.count() )
- {
- myCurrentView = myCanvasViews.at(theIndex);
- myViewManager->getActiveView()->setCentralWidget(myCurrentView);
- }
-}
-
-/*!
- Builds popup for QxGraph viewer
-*/
-void QxGraph_Viewer::contextMenuPopup(QPopupMenu* thePopup)
-{
- printf("QxGraph_Viewer::contextMenuPopup\n");
- thePopup->insertItem( tr( "MEN_CHANGE_BACKGROUND" ), this, SLOT( onChangeBgColor() ) );
-
- thePopup->insertSeparator();
-
- QxGraph_ViewWindow* aView = (QxGraph_ViewWindow*)(myViewManager->getActiveView());
- if ( aView && !aView->getToolBar()->isVisible() )
- thePopup->insertItem( tr( "MEN_SHOW_TOOLBAR" ), this, SLOT( onShowToolbar() ) );
-}
-
-/*!
- SLOT: called if background color is to be changed changed, passes new color to current canvas view
-*/
-void QxGraph_Viewer::onChangeBgColor()
-{
- QxGraph_ViewWindow* aView = (QxGraph_ViewWindow*)(myViewManager->getActiveView());
- if( !aView )
- return;
- QColor aColorActive = aView->backgroundColor();
-
- QColor selColor = QColorDialog::getColor( aColorActive, aView);
- if ( selColor.isValid() )
- aView->setBackgroundColor(selColor);
-}
-
-/*!
- SLOT: called when popup item "Show toolbar" is activated, shows toolbar of active view window
-*/
-void QxGraph_Viewer::onShowToolbar() {
- QxGraph_ViewWindow* aView = (QxGraph_ViewWindow*)(myViewManager->getActiveView());
- if ( aView )
- aView->getToolBar()->show();
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 QXGRAPH_VIEWMODEL_H
-#define QXGRAPH_VIEWMODEL_H
-
-#include "QxGraph.h"
-
-#include "SUIT_ViewModel.h"
-
-class QCanvasItem; // for addRectangleItem(...) method (can be removed in the future)
-
-class QxGraph_Canvas;
-class QxGraph_CanvasView;
-class QxGraph_ViewWindow;
-class QxGraph_Prs;
-
-class QXGRAPH_EXPORT QxGraph_Viewer: public SUIT_ViewModel
-{
- Q_OBJECT
-
- public:
- static QString Type() { return "QxGraphViewer"; }
-
- QxGraph_Viewer();
- virtual ~QxGraph_Viewer();
-
- virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
- virtual QString getType() const { return Type(); }
-
- virtual void contextMenuPopup(QPopupMenu*);
-
- QxGraph_Canvas* getCanvas() const { return myCanvas; }
- void setCanvas(QxGraph_Canvas* theCanvas) { myCanvas = theCanvas; }
- //QPtrList<QxGraph_Canvas> getCanvases() { return myCanvases; }
- //void setCanvases(QPtrList<QxGraph_Canvas> theCanvases) { myCanvases = theCanvases; }
-
- //void addCanvas(QxGraph_Canvas* theCanvas) { myCanvases.append(theCanvas); }
- //void removeCanvas(QxGraph_Canvas* theCanvas) { myCanvases.remove(theCanvas); }
-
- QPtrList<QxGraph_CanvasView> getCanvasViews() { return myCanvasViews; }
- void setCanvasViews(QPtrList<QxGraph_CanvasView> theViews) { myCanvasViews = theViews; }
-
- void addView(QxGraph_CanvasView* theView) { myCanvasViews.append(theView); }
- void removeView(QxGraph_CanvasView* theView) { myCanvasViews.remove(theView); }
-
- QxGraph_CanvasView* getCurrentView() const { return myCurrentView; }
- void setCurrentView(QxGraph_CanvasView* theView) { myCurrentView = theView; }
- void setCurrentView(int theIndex);
-
- protected:
- void initView(QxGraph_ViewWindow* view);
-
- protected slots:
- void onShowToolbar();
- void onChangeBgColor();
-
- private:
- QxGraph_Canvas* myCanvas;
- //QPtrList<QxGraph_Canvas> myCanvases;
- QPtrList<QxGraph_CanvasView> myCanvasViews;
-
- QxGraph_CanvasView* myCurrentView;
-
-};
-
-#endif
+++ /dev/null
-// SALOME QxGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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 "QxGraph_ViewWindow.h"
-#include "QxGraph_Def.h"
-#include "QxGraph_Canvas.h"
-#include "QxGraph_CanvasView.h"
-
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_Session.h>
-#include <SUIT_ToolButton.h>
-
-//QT Include
-#include <qlayout.h>
-#include <qcolor.h>
-//#include <qcolordialog.h>
-
-using namespace std;
-
-/*!
- Constructor
-*/
-QxGraph_ViewWindow::QxGraph_ViewWindow( SUIT_Desktop* theDesktop, QxGraph_Viewer* theModel)
- : SUIT_ViewWindow( theDesktop )
-{
- printf("Construct QxGraph_ViewWindow\n");
- myViewModel = theModel;
-}
-
-/*!
- Initialization
-*/
-void QxGraph_ViewWindow::initLayout()
-{
- initCanvas();
- initCanvasViews();
-
- myToolBar = new QToolBar(this);
- myToolBar->setCloseMode(QDockWindow::Undocked);
- myToolBar->setLabel(tr("LBL_TOOLBAR_LABEL"));
- createActions();
- createToolBar();
-}
-
-/*!
- Canvas initialization
-*/
-void QxGraph_ViewWindow::initCanvas()
-{
- if ( myViewModel )
- myViewModel->setCanvas( new QxGraph_Canvas(resMgr()) );
- //myViewModel->addCanvas( new QxGraph_Canvas(resMgr()) );
-}
-
-/*!
- Canvas views initialization
-*/
-void QxGraph_ViewWindow::initCanvasViews()
-{
- if ( myViewModel )
- {
- for (int i = 0; i < 2; i++)
- {
- //QxGraph_Canvas* aCanvas = new QxGraph_Canvas(resMgr());
- //myViewModel->addCanvas( aCanvas );
-
- QxGraph_CanvasView* aCanvasView = new QxGraph_CanvasView( myViewModel->getCanvas(), this );
- //QxGraph_CanvasView* aCanvasView = new QxGraph_CanvasView( aCanvas, this );
- myViewModel->addView(aCanvasView);
-
- aCanvasView->hide();
- }
-
- // the first view is shown and is the current
- myViewModel->getCanvasViews().first()->show();
- myViewModel->setCurrentView( myViewModel->getCanvasViews().first() );
-
- /* test for 1 view -->
- QxGraph_CanvasView* aCanvasView = new QxGraph_CanvasView( myViewModel->getCanvas(), this );
- myViewModel->addView(aCanvasView);
- myViewModel->setCurrentView(aCanvasView);
- test for 1 view <-- */
-
- setCentralWidget( myViewModel->getCurrentView() );
-
- /*if ( inherits( "QMainWindow" ) ) {
- printf("== > 1\n");
- ( ( QMainWindow* )this )->setCentralWidget( myViewModel->getCurrentView() );
- }
- else {
- printf("== > 2\n");
- QBoxLayout* layout = new QVBoxLayout( this );
- layout->addWidget( myViewModel->getCurrentView() );
- }*/
- }
-}
-
-/*!
- Creates actions of QxGraph view window
-*/
-void QxGraph_ViewWindow::createActions()
-{
- if (!myActionsMap.isEmpty()) return;
- SUIT_ResourceMgr* aResMgr = resMgr();
- QtxAction* aAction;
-
- // FitAll
- aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_FITALL" ) ),
- tr( "MNU_FITALL" ), 0, this);
- aAction->setStatusTip(tr("DSC_FITALL"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitAll()));
- myActionsMap[ FitAllId ] = aAction;
-
- // FitRect
- aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_FITAREA" ) ),
- tr( "MNU_FITRECT" ), 0, this);
- aAction->setStatusTip(tr("DSC_FITRECT"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitArea()));
- myActionsMap[ FitRectId ] = aAction;
-
- // Zoom
- aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_ZOOM" ) ),
- tr( "MNU_ZOOM_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_ZOOM_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewZoom()));
- myActionsMap[ ZoomId ] = aAction;
-
- // Panning
- aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_PAN" ) ),
- tr( "MNU_PAN_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_PAN_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewPan()));
- myActionsMap[ PanId ] = aAction;
-
- // Global Panning
- aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_GLOBALPAN" ) ),
- tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewGlobalPan()));
- myActionsMap[ GlobalPanId ] = aAction;
-
- // Reset
- aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_RESET" ) ),
- tr( "MNU_RESET_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_RESET_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewReset()));
- myActionsMap[ ResetId ] = aAction;
-}
-
-/*!
- Creates toolbar of QxGraph view window
-*/
-void QxGraph_ViewWindow::createToolBar()
-{
- SUIT_ToolButton* aScaleBtn = new SUIT_ToolButton(myToolBar, "scale");
- aScaleBtn->AddAction(myActionsMap[FitAllId]);
- aScaleBtn->AddAction(myActionsMap[FitRectId]);
- aScaleBtn->AddAction(myActionsMap[ZoomId]);
-
- SUIT_ToolButton* aPanningBtn = new SUIT_ToolButton(myToolBar, "pan");
- aPanningBtn->AddAction(myActionsMap[PanId]);
- aPanningBtn->AddAction(myActionsMap[GlobalPanId]);
-
- myActionsMap[ResetId]->addTo(myToolBar);
-}
-
-/*!
- Destructor
-*/
-QxGraph_ViewWindow::~QxGraph_ViewWindow() {}
-
-/*!
- Reset the active view
-*/
-void QxGraph_ViewWindow::onViewReset()
-{
- printf( "QxGraph_ViewWindow::onViewReset\n" );
- if ( myViewModel && myViewModel->getCurrentView() )
- myViewModel->getCurrentView()->activateReset();
-}
-
-/*!
- Sets a new center of the active view
-*/
-void QxGraph_ViewWindow::onViewGlobalPan()
-{
- printf( "QxGraph_ViewWindow::onViewGlobalPan\n" );
- if ( myViewModel && myViewModel->getCurrentView() )
- myViewModel->getCurrentView()->activateGlobalPanning();
-}
-
-/*!
- Zooms the active view
-*/
-void QxGraph_ViewWindow::onViewZoom()
-{
- printf( "QxGraph_ViewWindow::onViewZoom\n" );
- if ( myViewModel && myViewModel->getCurrentView() )
- myViewModel->getCurrentView()->activateZoom();
-}
-
-/*!
- Moves the active view
-*/
-void QxGraph_ViewWindow::onViewPan()
-{
- printf( "QxGraph_ViewWindow::onViewPan\n" );
- if ( myViewModel && myViewModel->getCurrentView() )
- myViewModel->getCurrentView()->activatePanning();
-}
-
-/*!
- Fits all obejcts within a rectangular area of the active view
-*/
-void QxGraph_ViewWindow::onViewFitArea()
-{
- printf( "QxGraph_ViewWindow::onViewFitArea\n" );
- if ( myViewModel && myViewModel->getCurrentView() )
- myViewModel->getCurrentView()->activateFitRect();
-}
-
-/*!
- Fits all objects in the active view
-*/
-void QxGraph_ViewWindow::onViewFitAll()
-{
- printf( "QxGraph_ViewWindow::onViewFitAll\n" );
- if ( myViewModel && myViewModel->getCurrentView() )
- myViewModel->getCurrentView()->activateFitAll();
-}
-
-/*!
- Set background of the viewport
-*/
-void QxGraph_ViewWindow::setBackgroundColor( const QColor& color )
-{
- if ( myViewModel && myViewModel->getCurrentView()) {
- myViewModel->getCurrentView()->canvas()->setBackgroundColor(color);
- myViewModel->getCurrentView()->setPaletteBackgroundColor(color.light(120));
- }
-}
-
-/*!
- Returns background of the viewport
-*/
-QColor QxGraph_ViewWindow::backgroundColor() const
-{
- if ( myViewModel && myViewModel->getCurrentView())
- return myViewModel->getCurrentView()->canvas()->backgroundColor();
- return QColor();
-}
-
-/*!
- Custom resize event handler
-*/
-void QxGraph_ViewWindow::resizeEvent( QResizeEvent* theEvent )
-{
- // QMainWindow::resizeEvent( theEvent );
- //if ( myView ) myView->resizeView( theEvent );
-}
-
-/*!
- Get resource manager
-*/
-SUIT_ResourceMgr* QxGraph_ViewWindow::resMgr() const
-{
- return SUIT_Session::session()->resourceMgr();
-}
-
+++ /dev/null
-// SALOME QxGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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 QXGRAPH_VIEWWINDOW_H
-#define QXGRAPH_VIEWWINDOW_H
-
-#include "QxGraph.h"
-#include "QxGraph_ViewModel.h"
-
-#include "SUIT_ViewWindow.h"
-
-#include "QtxAction.h"
-
-#include <qaction.h>
-
-#ifdef WIN32
-#pragma warning ( disable:4251 )
-#endif
-
-class SUIT_ResourceMgr;
-
-class QXGRAPH_EXPORT QxGraph_ViewWindow : public SUIT_ViewWindow {
- Q_OBJECT
-
- public:
- QxGraph_ViewWindow(SUIT_Desktop* theDesktop, QxGraph_Viewer* theModel);
- virtual ~QxGraph_ViewWindow();
-
- void setBackgroundColor( const QColor& );
- QColor backgroundColor() const;
-
- QToolBar* getToolBar() { return myToolBar; }
-
- SUIT_ResourceMgr* resMgr() const;
-
- QxGraph_Viewer* getViewModel() const { return myViewModel; }
- void setViewModel(QxGraph_Viewer* theViewModel) { myViewModel = theViewModel; }
-
- virtual void initLayout();
-
- void contextPopupEvent(QContextMenuEvent* theEvent) { emit contextMenuRequested( theEvent); }
-
- public slots:
- void onViewFitAll();
- void onViewFitArea();
- void onViewZoom();
- void onViewPan();
- void onViewGlobalPan();
- void onViewReset();
-
- protected:
- void resizeEvent( QResizeEvent* theEvent );
-
- virtual void initCanvas();
- virtual void initCanvasViews();
-
- private:
- void createActions();
- void createToolBar();
-
- //! Actions ID
- enum { FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, ResetId };
- typedef QMap<int, QtxAction*> ActionsMap;
-
- ActionsMap myActionsMap;
- QToolBar* myToolBar;
-
- QxGraph_Viewer* myViewModel;
-
-};
-
-#ifdef WIN32
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QxGraph_images.po
-// Created: 03/02/2007
-// Author: Margarita Karpunina
-// Copyright (C) CEA 2007
-
-
-msgid "ICON_QXGRAPH_FITALL"
-msgstr "view_fitall.png"
-
-msgid "ICON_QXGRAPH_FITAREA"
-msgstr "view_fitarea.png"
-
-msgid "ICON_QXGRAPH_ZOOM"
-msgstr "view_zoom.png"
-
-msgid "ICON_QXGRAPH_PAN"
-msgstr "view_pan.png"
-
-msgid "ICON_QXGRAPH_GLOBALPAN"
-msgstr "view_glpan.png"
-
-msgid "ICON_QXGRAPH_RESET"
-msgstr "view_reset.png"
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: QxGraph_msg_en.po
-// Created: 03/02/2007
-// Author: Margarita Karpunina
-// Copyright (C) CEA 2007
-
-msgid "LBL_TOOLBAR_LABEL"
-msgstr "View Operations"
-
-msgid "DSC_RESET_VIEW"
-msgstr "Reset View Point"
-
-msgid "MNU_RESET_VIEW"
-msgstr "Reset"
-
-msgid "DSC_PAN_VIEW"
-msgstr "Panning the view"
-
-msgid "MNU_PAN_VIEW"
-msgstr "Panning"
-
-msgid "MEN_CHANGE_BACKGROUND"
-msgstr "Change background..."
+++ /dev/null
-// SALOME RegistryDisplay : GUI for Registry server implementation
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : HelpWindow.cxx
-// Author : Pascale NOYRET, EDF
-// Module : SALOME
-// $Header$
-
-# include "HelpWindow.hxx"
-# include "utilities.h"
-
-# include <qtextview.h>
-# include <qpushbutton.h>
-# include <qtextstream.h>
-# include <qfile.h>
-
-using namespace std;
-
-/*!
- Constructor
-*/
-HelpWindow::HelpWindow(QWidget* parent, const char* name )
- : QMainWindow( parent, name, WType_TopLevel | WDestructiveClose )
-{
- BEGIN_OF("Constructeur HelpWindow");
-
- setCaption( tr( "Help" ) );
-
- myTextView = new QTextView( this, "myTextView" );
- QPalette pal = myTextView->palette();
- QColorGroup cg = pal.active();
- cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
- cg.setColor( QColorGroup::HighlightedText, Qt::white );
- cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
- cg.setColor( QColorGroup::Text, Qt::black );
- pal.setActive ( cg );
- cg = pal.inactive();
- cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
- cg.setColor( QColorGroup::HighlightedText, Qt::white );
- cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
- cg.setColor( QColorGroup::Text, Qt::black );
- pal.setInactive( cg );
- cg = pal.disabled();
- cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
- cg.setColor( QColorGroup::HighlightedText, Qt::white );
- cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
- cg.setColor( QColorGroup::Text, Qt::black );
- pal.setDisabled( cg );
- myTextView->setPalette( pal );
-
- setCentralWidget( myTextView );
- setMinimumSize( 450, 250 );
-
- QFile f ( "tmp.txt" );
- if ( f.open( IO_ReadOnly ) )
- {
- QTextStream t( &f );
- while ( !t.eof() )
- {
- myTextView->append(t.readLine());
- }
- }
- f.close();
-
- END_OF("Constructeur HelpWindow");
-}
-
-/*!
- Destructor
-*/
-HelpWindow::~HelpWindow()
-{
- BEGIN_OF("Destructeur HelpWindow");
- END_OF("Destructeur HelpWindow");
-};
-
-/*!
- Sets text
-*/
-void HelpWindow::setText( const QString& text )
-{
- myTextView->setText( text );
-}
-
-
+++ /dev/null
-// SALOME RegistryDisplay : GUI for Registry server implementation
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : HelpWindow.hxx
-// Author : Pascale NOYRET, EDF
-// Module : SALOME
-// $Header$
-
-#ifndef __HELPWINDOW_H__
-#define __HELPWINDOW_H__
-
-#include <qapplication.h>
-#include <qmainwindow.h>
-
-class QTextView;
-
-class HelpWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- HelpWindow( QWidget* parent = 0, const char* name = 0);
- ~HelpWindow();
-
- void setText( const QString& text );
- QTextView* textView() const { return myTextView; }
-
-private:
- QTextView* myTextView;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// SALOME RegistryDisplay : GUI for Registry server implementation
-//
-// File : IntervalWindow.cxx
-// Author : Oksana TCHEBANOVA
-// Module : SALOME
-
-#include <IntervalWindow.hxx>
-
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-# include "utilities.h"
-
-#define MARGIN_SIZE 11
-#define SPACING_SIZE 6
-#define MIN_SPIN_WIDTH 100
-
-/*!
- Constructor
-*/
-IntervalWindow::IntervalWindow ( QWidget* parent )
- : QDialog( parent, "IntervalWindow" , true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose )
-{
- BEGIN_OF("IntervalWindow constructor")
- setCaption( tr( "Refresh Interval" ) );
- setSizeGripEnabled( true );
-
- QGridLayout* topLayout = new QGridLayout( this );
- topLayout->setSpacing( SPACING_SIZE );
- topLayout->setMargin( MARGIN_SIZE );
-
- QGroupBox* intervalGrp = new QGroupBox( this, "intervalGrp" );
- intervalGrp->setColumnLayout( 0, Qt::Horizontal );//Vertical
- intervalGrp->layout()->setSpacing( 0 );
- intervalGrp->layout()->setMargin( 0 );
- QGridLayout* intervalGrpLayout = new QGridLayout( intervalGrp->layout() );
- 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, "buttonOk" );
- myButtonOk->setText( tr( "BUT_OK" ) );
- myButtonOk->setAutoDefault( TRUE );
- myButtonOk->setDefault( TRUE );
-
- myButtonCancel = new QPushButton( this, "buttonCancel" );
- myButtonCancel->setText( tr( "BUT_CANCEL" ) );
- myButtonCancel->setAutoDefault( TRUE );
-
- QLabel* TextLabel = new QLabel( intervalGrp, "TextLabel" );
- TextLabel->setText( tr( "Please, enter a number of seconds:" ) );
-
- mySpinBox = new QSpinBox( 1, 999999999, 1, intervalGrp, "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 );
-
- END_OF("IntervalWindow constructor")
-}
-
-/*!
- Destructor
-*/
-IntervalWindow::~IntervalWindow() {}
-
-/*!
- Sets start interval size
-*/
-void IntervalWindow::setValue(const int size)
-{
- mySpinBox->setValue(size);
-}
-
-/*!
- Gets interval size
-*/
-int IntervalWindow::getValue()
-{
- return mySpinBox->value();
-}
-
-/*!
- gets a pointer to myButtonOk
-*/
-QPushButton* IntervalWindow::Ok()
-{
- return myButtonOk;
-}
-
-/*!
- gets a pointer to myButtonCancel
-*/
-QPushButton* IntervalWindow::Cancel()
-{
- return myButtonCancel;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// SALOME RegistryDisplay : GUI for Registry server implementation
-//
-// File : IntervalWindow.hxx
-// Author : Oksana TCHEBANOVA
-// Module : SALOME
-
-#ifndef IntervalWindow_HeaderFile
-#define IntervalWindow_HeaderFile
-
-# include <qwidget.h>
-# include <qdialog.h>
-# include <qpushbutton.h>
-# include <qspinbox.h>
-
-#ifndef WNT
-using namespace std;
-#endif
-
-class IntervalWindow : public QDialog
-{
- Q_OBJECT
-
-public:
- IntervalWindow( QWidget* parent = 0 );
- ~IntervalWindow();
-
- QPushButton* Ok();
- QPushButton* Cancel();
-
- int getValue();
- void setValue( int );
-
-private:
- QSpinBox* mySpinBox;
- QPushButton* myButtonOk;
- QPushButton* myButtonCancel;
-};
-
-#endif
+++ /dev/null
-# SALOME RegistryDisplay : GUI for Registry server implementation
-#
-# Copyright (C) 2003 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
-#
-#
-#
-# File : Makefile.in
-# Author : Paul RASCLE, EDF
-# Module : SALOME
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libRegistryDisplay.la
-
-salomeinclude_HEADERS= \
- HelpWindow.hxx \
- IntervalWindow.hxx \
- RegWidget.h
-
-dist_libRegistryDisplay_la_SOURCES= \
- HelpWindow.cxx \
- RegWidget.cxx \
- RegWidgetFactory.cxx \
- IntervalWindow.cxx
-
-MOC_FILES = RegWidget_moc.cxx
-nodist_libRegistryDisplay_la_SOURCES= $(MOC_FILES)
-
-libRegistryDisplay_la_CPPFLAGS=$(QT_INCLUDES) @KERNEL_CXXFLAGS@ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@\
- -I$(top_builddir)/salome_adm/unix -I$(top_builddir)/idl
-libRegistryDisplay_la_LDFLAGS=$(QT_MT_LIBS) $(KERNEL_LDFLAGS) -lSalomeNS -lOpUtil -lSalomeIDLKernel
+++ /dev/null
-// SALOME RegistryDisplay : GUI for Registry server implementation
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : RegWidget.cxx
-// Author : Pascale NOYRET, EDF
-// Module : SALOME
-// $Header$
-
-# include <qpushbutton.h>
-# include <qlistview.h>
-# include <qtabwidget.h>
-# include <qstatusbar.h>
-# include <qtextview.h>
-# include <qtimer.h>
-# include <qinputdialog.h>
-# include <qtoolbar.h>
-# include <qdir.h>
-# include <qtooltip.h>
-
-# include "SALOME_NamingService.hxx"
-# include "ServiceUnreachable.hxx"
-# include "Utils_SINGLETON.hxx"
-# include "Utils_CommException.hxx"
-
-# include "utilities.h"
-# include "OpUtil.hxx"
-
-# include "RegWidget.h"
-# include "HelpWindow.hxx"
-# include "IntervalWindow.hxx"
-using namespace std;
-
-typedef int PIXELS;
-RegWidget* RegWidget::myRegWidgetPtr = 0;
-QString addSlash( const QString& );
-QString findFile( QString filename );
-
-#define BOLD( text ) ( QString( "<b>" ) + QString( text ) + QString( "</b>" ) )
-
-static const char* const time_data[] = {
-"16 16 6 1",
-". c None",
-"b c None",
-"# c #000000",
-"a c #4c4c4c",
-"d c #878787",
-"c c #ffffff",
-".....#####ab....",
-"...##cc#dc##ab..",
-"..#ccc###dcc#ab.",
-".#ccccc#dcccc#a.",
-".#ccccc#dcccc#ab",
-"#cccccc#dccccc#a",
-"#cccccc#dccc#c#a",
-"#c##ccc########a",
-"#ccddcccdddd#d#a",
-"#cccccccccccdc#a",
-".#ccccccccccc#aa",
-".#ccccc#ccccc#a.",
-"..#cccc#dccc#aa.",
-"...##cccdc##aa..",
-".....#####aaa...",
-"......aaaaa....."};
-
-static const char* const close_data[] = {
-"16 16 6 1",
-"d c None",
-". c None",
-"# c #000000",
-"a c #4c4c4c",
-"c c #5b5b5b",
-"b c #ffffff",
-".....#####a.....",
-"...##bbbbb##a...",
-"..#bbbbbbbbb#a..",
-".#b#cbbbbbb#d#a.",
-".#bc#cbbbb#cb#a.",
-"#bbbc#cbb#cbbb#a",
-"#bbbbc#c#cbbbb#a",
-"#bbbbbc#cbbbbb#a",
-"#bbbbc#c#cbbbb#a",
-"#bbb#ccbb##bbb#a",
-".#b#c#bbbbc#b#aa",
-".#bc#bbbbbb#c#a.",
-"..#bbbbbbbbb#aa.",
-"...##bbbbb##aa..",
-".....#####aaa...",
-"......aaaaa....."};
-
-static const char* const refresh_data[] = {
-"16 16 5 1",
-". c None",
-"# c #000000",
-"a c #4c4c4c",
-"c c #878787",
-"b c #ffffff",
-".....#####a.....",
-"...##bb#bb##a...",
-"..#bbbbc#bbb#a..",
-".#bbbb####cbb#a.",
-".#bbb#cc#cbbb#a.",
-"#bbb#cb#cbbbbb#a",
-"#bb#cbbbbbb#bb#a",
-"#bb#cbbbbbb#cb#a",
-"#bb#cbbbbbb#cb#a",
-"#bbbbbb#bb#cbb#a",
-".#bbbb#cb#cbb#aa",
-".#bbb####cbbb#a.",
-"..#bbb#cbbbb#aa.",
-"...##bb#cb##aa..",
-".....#####aaa...",
-"......aaaaa....."};
-
-/*!
- Creates components list
-*/
-
-Registry::Components_var MakeRegistry( CORBA::ORB_var &orb )
-{
-
- const char *registryName="Registry" ;
-
- SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
- naming.init_orb( orb ) ;
-
- // Recuperation de la reference de l'objet
- CORBA::Object_var object = 0 ;
- try
- {
- SCRUTE(registryName) ;
- object = naming.Resolve( registryName ) ;
- if(CORBA::is_nil(object)) throw CommException( "unable to find the RegistryService" ) ;
- }
- catch( const ServiceUnreachable &ex )
- {
- MESSAGE( ex.what() )
- exit( EXIT_FAILURE ) ;
- }
- catch( const CORBA::Exception &exx )
- {
- exit( EXIT_FAILURE ) ;
- }
-
- // Specialisation de l'objet generique
-
- return Registry::Components::_narrow( object ) ;
-}
-
-/*!
- Only one global registry window should exist at the moment
- This method creates registry window if necessary and returns it
- [ static ]
-*/
-RegWidget* RegWidget::GetRegWidget( CORBA::ORB_var &orb , QWidget *parent, const char *name )
-{
- if ( !myRegWidgetPtr )
- myRegWidgetPtr = new RegWidget( orb, parent, name );
- return myRegWidgetPtr;
-}
-
-/*!
- Constructor
-*/
-RegWidget::RegWidget(CORBA::ORB_var &orb, QWidget *parent, const char *name )
- : QMainWindow( parent, name, WType_TopLevel | WDestructiveClose ),
- _VarComponents( MakeRegistry(orb) ),
- _clients(0), _history(0), _parent( parent ),
- _tabWidget(0), _refresh(0), _interval(0),
- myInfoWindow(0), myHelpWindow(0), myIntervalWindow(0)
-{
- QString aFile = findFile("default.png");
- /* char* dir = getenv( "CSF_ResourcesDefaults" );
- QString path( "" );
- if ( dir ) {
- QDir qDir( dir );
- path = qDir.filePath( "default.png" );
- }*/
- QPixmap pm ( aFile );
- if ( !pm.isNull() )
- setIcon( pm );
-
- // pixmap for buttons
- QPixmap image_refresh ( ( const char** ) refresh_data );
- QPixmap image_interval( ( const char** ) time_data );
- QPixmap image_close ( ( const char** ) close_data );
-
- // Buttons definition
- QToolBar* topbar = new QToolBar( tr("Toolbar"), this );
- setDockEnabled( topbar, DockTornOff, false );
- setDockMenuEnabled( false );
-
- _refresh = new QPushButton( tr( "Refresh" ), topbar );
- _refresh->setIconSet( image_refresh );
- _refresh->setFocusPolicy( NoFocus );
- connect( _refresh, SIGNAL( clicked() ), this, SLOT( slotListeSelect() ) );
- QToolTip::add( _refresh, "", toolTipGroup(), tr("Immediately updates list of components") );
-
- /* 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") );
- */
-
- _interval = new QPushButton( tr( "Interval" ), topbar );
- _interval->setIconSet( image_interval );
- _interval->setFocusPolicy( NoFocus );
- connect( _interval, SIGNAL( clicked() ), this, SLOT( slotSelectRefresh() ) );
- QToolTip::add( _interval, "", toolTipGroup(), tr("Changes refresh interval") );
-
- topbar->addSeparator();
- _close = new QPushButton( tr("Close"), topbar );
- _close->setIconSet( image_close );
- _close->setFocusPolicy( NoFocus );
- connect( _close, SIGNAL( clicked() ), this, SLOT( close() ) );
- QToolTip::add( _close, "", toolTipGroup(), tr("Closes Registry window") );
-
- // Display area and associated slots definition
- _tabWidget = new QTabWidget( this );
- _clients = new QListView( _tabWidget );
- SetListe();
- _history = new QListView( _tabWidget );
- SetListeHistory();
-
- _tabWidget->addTab( _clients, tr( "Running" ) );
- _tabWidget->addTab( _history, tr( "History" ) );
- connect( _tabWidget, SIGNAL( currentChanged( QWidget* )), this, SLOT( slotListeSelect() ) );
- connect( _clients, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( slotClientChanged( QListViewItem* ) ) );
- connect( _history, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( slotHistoryChanged( QListViewItem* ) ) );
- setCentralWidget( _tabWidget );
-
- // 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 );
-
- PIXELS xpos = 160 ;
- PIXELS ypos = 100 ;
- PIXELS largeur = 800 ;
- PIXELS hauteur = 350 ;
- setGeometry( xpos, ypos, largeur, hauteur ) ;
- setCaption( name ) ;
- statusBar()->message(" ");
-}
-
-/*!
- Destructor
-*/
-RegWidget::~RegWidget()
-{
- MESSAGE("Debut du Destructeur");
- _counter->stop();
- myRegWidgetPtr = 0;
-};
-
-/*!
- Event filter
-*/
-bool 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() == Key_Enter || ke->key() == Key_Return ) {
- slotClientChanged( _clients->currentItem() );
- }
- }
- else if ( object == _history && event->type() == QEvent::KeyPress ) {
- QKeyEvent* ke = (QKeyEvent*)event;
- if ( ke->key() == Key_Enter || ke->key() == Key_Return ) {
- slotHistoryChanged( _history->currentItem() );
- }
- }
- }
- return QMainWindow::eventFilter( object, event );
-}
-
-/*!
- Searches item in the list and returns it's index or -1 if not found
-*/
-int RegWidget::numitem(const QString &name, const QString &pid, const QString &machine,const Registry::AllInfos *listclient)
-{
- BEGIN_OF("numitem");
- for (CORBA::ULong i=0; i<listclient->length(); 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) )
- {
- END_OF("numitem");
- return i;
- }
- }
- END_OF("numitem");
- return -1;
-}
-
-/*!
- Returns text, containing information about client [ static ]
-*/
-QString RegWidget::setlongText( const Registry::Infos &c_info)
-{
- BEGIN_OF("setlongText");
- ASSERT( c_info.name != NULL );
- QString a = QString( "<hr><h2>" ) + tr( "Code" ) + QString( " : " );
- a.append( QString( c_info.name ) );
- a.append( "</h1><hr><br>" );
- 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( "<br>" );
-
- 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( " )<br> " ) + tr( "in directory" ) + QString( " " ));
- a.append( BOLD( c_info.cdir ) );
-
- time_t aTime;
- a.append( QString( "<br>" ) + 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( "<br>" );
-
- 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 ) );
- a.append( "<br>" );
- 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( "<br>" );
- delete [] t3;
- }
- else
- {
- a.append( tr( "still running" ) + QString( "<br>" ) );
- }
-
- 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( ")<br>" ) );
- }
- END_OF("setlongText");
- return a;
-
-}
-
-/*!
- Close event
-*/
-void RegWidget::closeEvent( QCloseEvent *e)
-{
- BEGIN_OF("closeEvent");
- if ( myInfoWindow )
- myInfoWindow->close();
- if ( myHelpWindow )
- myHelpWindow->close();
- if (myIntervalWindow)
- myIntervalWindow->close();
- e->accept();
- END_OF("closeEvent");
-};
-
-/*!
- Setups Clients list
-*/
-void RegWidget::SetListe()
-{
- BEGIN_OF("SetListe");
- _clients->installEventFilter( this );
- _clients->setAllColumnsShowFocus( true );
- _clients->addColumn( tr( "Component" ), -1);
- _clients->addColumn( tr( "PID" ), -1 );
- _clients->addColumn( tr( "User Name" ), -1 );
- _clients->addColumn( tr( "Machine" ), -1 );
- _clients->addColumn( tr( "begins" ), -1 );
- _clients->addColumn( tr( "hello" ) , -1 );
- _clients->setColumnAlignment( 1, Qt::AlignRight );
- END_OF("SetListe");
-}
-
-/*!
- Setups History list
-*/
-void RegWidget::SetListeHistory()
-{
- BEGIN_OF("SetListeHistory")
- _history->installEventFilter( this );
- _history->setAllColumnsShowFocus( true );
- _history->addColumn( tr( "Component" ), -1);
- _history->addColumn( tr( "PID" ), -1 );
- _history->addColumn( tr( "User Name" ), -1 );
- _history->addColumn( tr( "Machine" ), -1 );
- _history->addColumn( tr( "begins" ), -1 );
- _history->addColumn( tr( "ends" ), -1 );
- _history->setColumnAlignment( 1, Qt::AlignRight );
- END_OF("SetListeHistory")
-}
-
-/*!
- Updates History list
-*/
-void RegWidget::InfoHistory()
-{
-
- BEGIN_OF("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 ] = ' ';
- QListViewItem * item = new QListViewItem(_history, QString(c_info.name),\
- a, QString(c_info.pwname), QString(c_info.machine), \
- QString(t1), QString(t2));
- item=0 ;
- delete [] t1;
- delete [] t2;
-
- }
- }
- catch( ... )
- {
- _interval->setDisabled( TRUE ) ;
- _refresh->setDisabled( TRUE ) ;
- _counter->stop();
- MESSAGE("Sorry, No more Registry Server") ;
- statusBar()->message( tr( "Sorry, No more Registry Server" ) ) ;
- }
- END_OF("InfoHistory")
-}
-
-/*!
- Updates clients list
-*/
-void RegWidget::InfoReg()
-{
- BEGIN_OF("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 ] = ' ';
- QListViewItem * item = new QListViewItem(_clients, QString(c_info.name),\
- a, QString(c_info.pwname), QString(c_info.machine), \
- QString(t1), QString(t2));
- item=0 ;
- delete [] t1;
- delete [] t2;
-
- }
- }
- catch( ... )
- {
- _interval->setDisabled( TRUE ) ;
- _refresh->setDisabled( TRUE ) ;
- _counter->stop();
- MESSAGE("Sorry, No more Registry Server") ;
- statusBar()->message( tr( "Sorry, No more Registry Server" ) ) ;
- }
- END_OF("InfoReg")
-}
-
-/*!
- Called when <Refresh> button is clicked
-*/
-void RegWidget::slotListeSelect()
-{
- try
- {
- ASSERT(_tabWidget->currentPage() != NULL);
- if (_tabWidget->currentPage () == _clients) InfoReg();
- else if (_tabWidget->currentPage () == _history) InfoHistory();
- }
- catch( ... )
- {
- MESSAGE("Sorry, No more Registry Server") ;
- statusBar()->message( tr( "Sorry, No more Registry Server" ) ) ;
- }
-}
-
-/*!
- Called when <Interval> button is clicked (changing refresh interval)
-*/
-void RegWidget::slotSelectRefresh()
-{
- BEGIN_OF("slotSelectRefresh");
- myIntervalWindow = new 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() ) );
- END_OF("slotSelectRefresh");
-}
-
-/*!
- SLOT: called when button OK is clicked in interval window
-*/
-void RegWidget::slotIntervalOk()
-{
- BEGIN_OF("slotIntervalOk");
- myRefreshInterval = myIntervalWindow->getValue();
- _counter->changeInterval( myRefreshInterval * 1000 );
- SCRUTE(myRefreshInterval);
- myIntervalWindow->close();
- END_OF("slotIntervalOk");
-}
-/*!
- Called when <Help> button is clicked
-*/
-void RegWidget::slotHelp()
-{
- BEGIN_OF("slotHelp()");
-
- if ( !myHelpWindow ) {
- myHelpWindow = new HelpWindow( this );
- myHelpWindow->installEventFilter( this );
- }
- myHelpWindow->show();
- myHelpWindow->raise();
- myHelpWindow->setActiveWindow();
-
- END_OF("slotHelp()") ;
-}
-
-/*!
- Called when user clicks on item in <Running> list
-*/
-void RegWidget::slotClientChanged( QListViewItem* item )
-{
- BEGIN_OF("slotClientChanged()") ;
-
- if ( item <= 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)) ;
-
- 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 InfoWindow( this );
- myInfoWindow->installEventFilter( this );
- }
- QString a = tr( "More about" ) + QString( " " ) + QString( c_info.name );
- myInfoWindow->setCaption(a);
- myInfoWindow->setText( RegWidget::setlongText( c_info) );
- myInfoWindow->show();
- myInfoWindow->raise();
- myInfoWindow->setActiveWindow();
-
- blockSignals( false ); // enabling signals again
-
- END_OF("slotClientChanged()") ;
- return ;
-}
-
-/*!
- Called when user clicks on item in <History> list
-*/
-void RegWidget::slotHistoryChanged( QListViewItem* item )
-{
-
- BEGIN_OF("slotHistoryChanged()") ;
-
- if ( item <= 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)) ;
- 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 InfoWindow( this );
- myInfoWindow->installEventFilter( this );
- }
- QString a = tr( "More about" ) + QString( " " ) + QString( c_info.name );
- myInfoWindow->setCaption(a);
- myInfoWindow->setText( RegWidget::setlongText( c_info ) );
- myInfoWindow->show();
- myInfoWindow->raise();
- myInfoWindow->setActiveWindow();
-
- blockSignals( false ); // enabling signals again
-
- END_OF("slotHistoryChanged()") ;
- return ;
-}
-
-/*!
- Constructor
-*/
-InfoWindow::InfoWindow( QWidget* parent, const char* name )
- : QMainWindow( parent, name, WType_TopLevel | WDestructiveClose )
-{
- BEGIN_OF("InfoWindow");
- myTextView = new QTextView( this, "myTextView" );
- setCentralWidget( myTextView );
- setMinimumSize( 450, 250 );
- END_OF("InfoWindow");
-}
-
-/*!
- Sets text
-*/
-void InfoWindow::setText( const QString& text )
-{
- myTextView->setText( text );
-}
-
-/*!
- Key press event
-*/
-void InfoWindow::keyPressEvent( QKeyEvent * e )
-{
- QMainWindow::keyPressEvent( e );
- if ( e->key() == Key_Escape )
- close();
-}
-
-static const char* SEPARATOR = ":";
-
-QString findFile( QString filename )
-{
- QString dir;
- char* cenv;
-
- // Try ${HOME}/.salome/resources directory
- cenv = getenv( "HOME" );
- if ( cenv ) {
- dir.sprintf( "%s", cenv );
- if ( !dir.isEmpty() ) {
- dir = addSlash(dir) ;
- dir = dir + ".salome" ;
- dir = addSlash(dir) ;
- dir = dir + "resources" ;
- dir = addSlash(dir) ;
- QFileInfo fileInfo( dir + filename );
- if ( fileInfo.isFile() && fileInfo.exists() )
- return fileInfo.filePath();
- }
- }
- // Try ${SALOME_SITE_DIR}/share/salome/resources directory
- cenv = getenv( "SALOME_SITE_DIR" );
- if ( cenv ) {
- dir.sprintf( "%s", cenv );
- if ( !dir.isEmpty() ) {
- dir = addSlash(dir) ;
- dir = dir + "share" ;
- dir = addSlash(dir) ;
- cenv = getenv("SALOME_SITE_NAME");
- if (cenv) dir = dir + cenv;
- else dir = dir + "salome" ;
- dir = addSlash(dir) ;
- dir = dir + "resources" ;
- dir = addSlash(dir) ;
- QFileInfo fileInfo( dir + filename );
- if ( fileInfo.isFile() && fileInfo.exists() )
- return fileInfo.filePath();
- }
- }
- // Try ${KERNEL_ROOT_DIR}/share/salome/resources directory
- cenv = getenv( "KERNEL_ROOT_DIR" );
- if ( cenv ) {
- dir.sprintf( "%s", cenv );
- if ( !dir.isEmpty() ) {
- dir = addSlash(dir) ;
- dir = dir + "share" ;
- dir = addSlash(dir) ;
- dir = dir + "salome" ;
- dir = addSlash(dir) ;
- dir = dir + "resources" ;
- dir = addSlash(dir) ;
- dir = dir + "kernel" ;
- dir = addSlash(dir) ;
- QFileInfo fileInfo( dir + filename );
- if ( fileInfo.isFile() && fileInfo.exists() )
- return fileInfo.filePath();
- }
- }
-
- //SRN Added support for SALOMEGUI
- cenv = getenv( "SALOMEGUI_ROOT_DIR" );
- if ( cenv ) {
- dir.sprintf( "%s", cenv );
- if ( !dir.isEmpty() ) {
- dir = addSlash(dir) ;
- dir = dir + "share" ;
- dir = addSlash(dir) ;
- dir = dir + "salome" ;
- dir = addSlash(dir) ;
- dir = dir + "resources" ;
- dir = addSlash(dir) ;
- QFileInfo fileInfo( dir + filename );
- if ( fileInfo.isFile() && fileInfo.exists() )
- return fileInfo.filePath();
- }
- }
-
- // Try CSF_SaloameResources env.var directory ( or directory list )
- cenv = getenv( "CSF_SalomeResources" );
- if ( cenv ) {
- dir.sprintf( "%s", cenv );
- if ( !dir.isEmpty() ) {
- QStringList dirList = QStringList::split( SEPARATOR, dir, false ); // skip empty entries
- for ( int i = 0; i < dirList.count(); i++ ) {
- QFileInfo fileInfo( addSlash( dirList[ i ] ) + filename );
- if ( fileInfo.isFile() && fileInfo.exists() )
- return fileInfo.filePath();
- }
- }
- }
- return filename;
-}
-QString addSlash( const QString& path )
-{
- if (!path.isNull()) {
-#ifdef WNT
- QChar slash ('\\');
-#else
- QChar slash ('/');
-#endif
- if ( path.at(path.length()-1) != slash )
- return path + slash;
- }
- return path;
-}
+++ /dev/null
-// SALOME RegistryDisplay : GUI for Registry server implementation
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : RegWidget.h
-// Author : Pascale NOYRET, EDF
-// Module : SALOME
-// $Header$
-
-# ifndef __REGWIDGET_H__
-# define __REGWIDGET_H__
-# include <qapplication.h>
-# include <qmainwindow.h>
-
-#include <SALOMEconfig.h>
-#include CORBA_CLIENT_HEADER(SALOME_Registry)
-
-#include <IntervalWindow.hxx>
-
-class QTabWidget;
-class QListView;
-class QListViewItem;
-class QWidget;
-class QTimer;
-class QCloseEvent;
-class QTextView;
-#if QT_VERSION > 300
-class QPushButton;
-#endif
-class HelpWindow;
-class InfoWindow;
-
-class RegWidget : public QMainWindow
-{
- Q_OBJECT
-
-public:
- RegWidget( CORBA::ORB_var &orb , QWidget *parent = 0, const char *name = 0 );
- ~RegWidget();
- void SetListe();
- void SetListeHistory();
- void InfoReg();
- void InfoHistory();
-
- bool eventFilter( QObject* object, QEvent* event );
-
- static RegWidget* GetRegWidget( CORBA::ORB_var &orb , QWidget *parent = 0, const char *name = 0 );
-
-public slots:
- void slotHelp();
- void slotListeSelect();
- void slotClientChanged( QListViewItem* );
- void slotHistoryChanged( QListViewItem* );
- 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* c_info );
- void closeEvent( QCloseEvent *e);
-
-protected :
- QListView* _clients;
- QListView* _history;
- QWidget* _parent;
- QTabWidget* _tabWidget;
- QPushButton* _refresh;
- QPushButton* _interval;
- QPushButton* _close;
- QTimer* _counter;
- Registry::AllInfos* _serverhistory;
- Registry::AllInfos* _serverclients;
- InfoWindow* myInfoWindow;
- HelpWindow* myHelpWindow;
- IntervalWindow* myIntervalWindow;
- int myRefreshInterval;
-
-private:
- const Registry::Components_var _VarComponents;
- static RegWidget* myRegWidgetPtr;
-};
-
-class InfoWindow : public QMainWindow {
-public:
- InfoWindow( QWidget* parent = 0, const char* name = 0);
-
- void setText( const QString& text );
- QTextView* textView() const { return myTextView; }
-
-protected:
- void keyPressEvent( QKeyEvent * e );
-
-private:
- QTextView* myTextView;
-
-};
-
-#endif
+++ /dev/null
-// SALOME RegistryDisplay : GUI for Registry server implementation
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : RegWidgetFactory.cxx
-// Author : Pascale NOYRET, EDF
-// Module : SALOME
-// $Header$
-
-# include "RegWidget.h"
-# include "utilities.h"
-
-using namespace std;
-
-extern "C"
-{
-
-void OnGUIEvent( CORBA::ORB_var &orb, QWidget *parent, const char *name )
-{
- // N.B. parent can be 0
- RegWidget* ptrRegWidget = RegWidget::GetRegWidget( orb, parent, name );
- //ASSERT ( !ptrRegWidget );
- ptrRegWidget->show();
- ptrRegWidget->raise();
- ptrRegWidget->setActiveWindow();
- return;
-}
-
-}
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vadim SANDLER (OCN)
-# Module : SalomeApp
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-bin_PROGRAMS= ResourceExporter
-
-dist_ResourceExporter_SOURCES=ResourceExporter.cxx
-
-ResourceExporter_CPPFLAGS= $(QT_INCLUDES) -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT
-
-ResourceExporter_LDFLAGS= $(QT_MT_LIBS)
-ResourceExporter_LDADD= ../SUIT/libsuit.la ../Qtx/libqtx.la
+++ /dev/null
-// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-//
-// 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
-//
-/*!
- File: ResourceExporter.cxx
- Created: 27/06/05
- Author: Vadim SANDLER
- Copyright (C) CEA 2005
-
- This tool provides command-line interface allowing to modify user preferences.
- The tool can be used by the compilation procedures in order to set default preferences for the module.
-
- Usage:
- ResourceExporter <parameters-list>
- Parameters have the following format:
- '<section>:<name>=<new_value>' - to set <new_value> for the user
- preference <name> from the <section> section;
- '<section>:<name>+=<value>[|<separator>]' - the <value> is appended to the current value
- of the preference <name> from the <section> section;
- separator is used to concatenate old and new values,
- by default comma (',') symbol is used
- '-<section>:<name>' - to remove user preference <name> from the <section>
- section. Note that only use preference file is
- influenced, you may need to use '<section>:<name>=""'
- option
- The number of parameters is limeted only by maximum possible length of the command line.
-*/
-
-#include "SUIT_ResourceMgr.h"
-#include <qfile.h>
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qapplication.h>
-#include <iostream>
-
-/*!
- \return the SALOME version number
-*/
-static QString salomeVersion()
-{
- QString path( ::getenv( "GUI_ROOT_DIR" ) );
- if ( !path.isEmpty() )
- path += QDir::separator();
- path += QString( "bin/salome/VERSION" );
-
- QFile vf( path );
- if ( !vf.open( IO_ReadOnly ) )
- return QString::null;
-
- QString line;
- vf.readLine( line, 1024 );
- vf.close();
-
- if ( line.isEmpty() )
- return QString::null;
-
- while ( !line.isEmpty() && line.at( line.length() - 1 ) == QChar( '\n' ) )
- line.remove( line.length() - 1, 1 );
-
- QString ver;
- int idx = line.findRev( ":" );
- if ( idx != -1 )
- ver = line.mid( idx + 1 ).stripWhiteSpace();
-
- return ver;
-}
-
-/*!
- print the help information
-*/
-static void help()
-{
- std::cout << "" << std::endl;
- std::cout << "ResourceExporter: provides command-line interface to modify user preferences." << std::endl;
- std::cout << "" << std::endl;
- std::cout << "Usage:" << std::endl;
- std::cout << " ResourceExporter <parameters-list>" << std::endl;
- std::cout << "Parameters have the following format:" << std::endl;
- std::cout << " '<section>:<name>=<new_value>' - to set <new_value> for the user " << std::endl;
- std::cout << " preference <name> from the <section> section;" << std::endl;
- std::cout << " '<section>:<name>+=<value>[|<separator>]' - the <value> is appended to the current value " << std::endl;
- std::cout << " of the preference <name> from the <section> section;" << std::endl;
- std::cout << " separator is used to concatenate old and new values," << std::endl;
- std::cout << " by default comma (',') symbol is used" << std::endl;
- std::cout << " '-<section>:<name>' - to remove user preference <name> from the <section>" << std::endl;
- std::cout << " section. Note that only use preference file is " << std::endl;
- std::cout << " influenced, you may need to use '<section>:<name>=""'" << std::endl;
- std::cout << " option" << std::endl;
- std::cout << "The number of parameters is limeted only by maximum possible length of the command line." << std::endl;
- std::cout << "" << std::endl;
-}
-
-/*!
- application main() function
-*/
-int main( int argc, char** argv )
-{
- QApplication app( argc, argv );
- if ( argc > 1 ) {
- SUIT_ResourceMgr* resMgr = new SUIT_ResourceMgr( QString( "SalomeApp" ), QString( "%1Config" ) );
- resMgr->setVersion( salomeVersion() );
- resMgr->setCurrentFormat( QString( "xml" ) );
- resMgr->loadLanguage();
- for ( int i = 1; i < argc; i ++ ) {
- QString anArg = QString( argv[i] ).stripWhiteSpace();
- if ( anArg.startsWith( "-" ) ) {
- anArg.remove( 0, 1 );
- if ( anArg.contains( ":" ) ) {
- QStringList vals = QStringList::split( ":", anArg );
- QString section = vals[ 0 ].stripWhiteSpace();
- QString param = vals[ 1 ].stripWhiteSpace();
- if ( section.isEmpty() || param.isEmpty() ) continue;
- resMgr->remove( section, param );
- }
- }
- else if ( anArg.contains( "+=" ) ) {
- QStringList vals = QStringList::split( "+=", anArg );
- if ( vals[ 0 ].contains( ":" ) ) {
- QStringList vals1 = QStringList::split( ":", vals[ 0 ] );
- QString section = vals1[ 0 ].stripWhiteSpace();
- QString param = vals1[ 1 ].stripWhiteSpace();
- QString newValue = vals [ 1 ].stripWhiteSpace();
- QString separ = ","; // default separator
- if ( newValue.contains( "|" ) ) {
- QStringList vals2 = QStringList::split( "|", newValue );
- newValue = vals2[ 0 ].stripWhiteSpace();
- separ = vals2[ 1 ].stripWhiteSpace();
- }
- if ( section.isEmpty() || param.isEmpty() || newValue.isEmpty() || separ.isEmpty() ) continue;
- QString value = resMgr->stringValue( section, param );
- QStringList valsOld = QStringList::split( separ, value );
- QStringList valsNew = QStringList::split( separ, newValue );
- for ( int i = 0; i < (int)valsNew.count(); i++ )
- if ( !valsOld.contains( valsNew[i] ) )
- valsOld.append( valsNew[i] );
- resMgr->setValue( section, param, valsOld.join( separ ) );
- }
- }
- else if ( anArg.contains( "=" ) ) {
- QStringList vals = QStringList::split( "=", anArg );
- if ( vals[ 0 ].contains( ":" ) ) {
- QStringList vals1 = QStringList::split( ":", vals[ 0 ] );
- QString section = vals1[ 0 ].stripWhiteSpace();
- QString param = vals1[ 1 ].stripWhiteSpace();
- QString value = vals [ 1 ].stripWhiteSpace();
- if ( section.isEmpty() || param.isEmpty() ) continue;
- resMgr->setValue( section, param, value );
- }
- }
- }
- resMgr->save();
- delete resMgr;
- }
- else {
- help();
- }
- return 0;
-}
+++ /dev/null
-# SALOME SALOME_PY : binding of VTK graphics and Python
-#
-# Copyright (C) 2003 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
-#
-#
-#
-# File : Makefile.in
-# Author : Paul RASCLE, EDF
-# Module : SALOME
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES= libSalomePy.la
-dist_libSalomePy_la_SOURCES= SalomePy.cxx
-
-libSalomePy_la_CPPFLAGS=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(VTK_INCLUDES) \
- $(OGL_INCLUDES) $(CAS_CXXFLAGS) $(BOOST_CPPFLAGS) @KERNEL_CXXFLAGS@ \
- -DHAVE_CONFIG_H -I$(srcdir)/../SalomeApp -I$(srcdir)/../LightApp \
- -I$(srcdir)/../Event -I$(srcdir)/../Session -I$(srcdir)/../SVTK \
- -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT -I$(srcdir)/../CAM \
- -I$(srcdir)/../STD -I$(srcdir)/../VTKViewer -I$(srcdir)/../OBJECT \
- @CAS_CPPFLAGS@ \
- -I$(top_builddir)/salome_adm/unix @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
-libSalomePy_la_LDFLAGS=$(PYTHON_LIBS) $(QT_MT_LIBS) $(VTK_LIBS) $(OGL_LIBS) \
- ../SalomeApp/libSalomeApp.la \
- -lvtkCommonPythonD -lvtkGraphicsPythonD -lvtkImagingPythonD
+++ /dev/null
-// SALOME SALOME_PY : binding of VTK graphics and Python
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SalomePy.cxx
-// Author : Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-
-#include <Python.h>
-#include <vtkPythonUtil.h>
-
-#include <vtkVersion.h>
-#include <vtkRenderer.h>
-#include <vtkRenderWindow.h>
-#include <vtkRenderWindowInteractor.h>
-
-#include "SALOME_Event.hxx"
-
-#include "SUIT_Session.h"
-#include "SalomeApp_Application.h"
-#include "SalomeApp_Study.h"
-
-#include "SVTK_ViewManager.h"
-#include "SVTK_ViewWindow.h"
-
-using namespace std;
-
-#define PUBLISH_ENUM(i) \
-{ \
- PyObject *w; \
- int rc; \
- if ( ( w = PyInt_FromLong( i ) ) == NULL ) return; \
- rc = PyDict_SetItemString( aModuleDict, #i, w ); \
- Py_DECREF( w ); \
- if ( rc < 0 ) return; \
-}
-
-// enumeration : view type
-enum {
- ViewFront, // fron view
- ViewBack, // back view
- ViewTop, // top view
- ViewBottom, // bottom view
- ViewRight, // right view
- ViewLeft // left view
-};
-
-
-/*!
- VSR : 19.04.05 : Reimplemented for new SALOME GUI (SUIT-based)
- All methods are implemented using Event mechanism:
- - getRenderer()
- - getRenderWindow()
- - getRenderWindowInteractor()
- - showTrihedron()
- These methods (except showTrihedron() ) open new VTK viewer
- if there is no one opened.
- In case of error all methods return None object in Python.
-*/
-
-static PyObject* GetPyClass(const char* theClassName){
- static PyObject *aVTKModule = NULL;
- if(!aVTKModule){
- if (VTK_MAJOR_VERSION > 3)
- aVTKModule = PyImport_ImportModule("libvtkRenderingPython");
- else
- aVTKModule = PyImport_ImportModule("libVTKGraphicsPython");
- if(PyErr_Occurred()){
- PyErr_Print();
- return NULL;
- }
- }
- PyObject* aVTKDict = PyModule_GetDict(aVTKModule);
- char* aClassName = const_cast<char*>(theClassName);
- PyObject* aPyClass = PyDict_GetItemString(aVTKDict,aClassName);
- //Py_DECREF(aVTKModule);
- return aPyClass;
-}
-
-// internal enum: find or create VTK window
-enum { __Find, // try to find only
- __FindOrCreate, // try to find: if not found - create new
- __Create }; // try to find: if not found - create new
-
-static SVTK_ViewWindow* GetVTKViewWindow( int toCreate = __FindOrCreate ) {
- SVTK_ViewWindow* aVW = NULL;
- if ( SUIT_Session::session() ) {
- // get application
- SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
- if ( anApp ) {
- // get active study
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
- if ( aStudy ) {
- // find or create VTK view manager
- if ( toCreate == __Create ) {
- SVTK_ViewManager* aVM = dynamic_cast<SVTK_ViewManager*>( anApp->createViewManager( "VTKViewer" ) );
- if ( aVM ) {
- aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getActiveView() );
- if ( !aVW )
- aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->createViewWindow() );
- // VSR : When new view window is created it can be not active yet at this moment,
- // so the following is a some workaround
- if ( !aVW && !aVM->getViews().isEmpty() )
- aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getViews()[ 0 ] );
- }
- }
- else {
- SVTK_ViewManager* aVM = dynamic_cast<SVTK_ViewManager*>( anApp->getViewManager( "VTKViewer", toCreate == __FindOrCreate ) );
- if ( aVM ) {
- aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getActiveView() );
- // VSR : When new view window is created it can be not active yet at this moment,
- // so the following is a some workaround
- if ( !aVW && !aVM->getViews().isEmpty() )
- aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getViews()[ 0 ] );
- }
- }
- }
- }
- }
- return aVW;
-}
-
-/*!
- Get VTK renderer.
- Always opens new VTK window if <toCreate> parameter is non zero.
- Otherwise opens new VTK window only if there is no one opened.
-*/
-class TGetRendererEvent: public SALOME_Event {
-public:
- typedef PyObject* TResult;
- TResult myResult;
- int myCreate;
- TGetRendererEvent( bool toCreate )
- : myResult( Py_None ), myCreate( toCreate ) {}
- virtual void Execute() {
- if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( myCreate ? __Create : __FindOrCreate ) ) {
- PyObject* aPyClass = GetPyClass("vtkRenderer");
- vtkRenderer* aVTKObject = aVTKViewWindow->getRenderer();
- myResult = PyVTKObject_New(aPyClass,aVTKObject);
- }
- }
-};
-extern "C" PyObject *libSalomePy_getRenderer(PyObject *self, PyObject *args)
-{
- PyObject* aResult = Py_None;
- int toCreate = 0;
- if ( !PyArg_ParseTuple(args, "|i:getRenderer", &toCreate) )
- PyErr_Print();
- else
- aResult = ProcessEvent( new TGetRendererEvent( toCreate ) );
- return aResult;
-}
-
-/*!
- Get VTK render window.
- Always opens new VTK window if <toCreate> parameter is non zero.
- Otherwise opens new VTK window only if there is no one opened.
-*/
-class TGetRenderWindowEvent: public SALOME_Event {
-public:
- typedef PyObject* TResult;
- TResult myResult;
- int myCreate;
- TGetRenderWindowEvent( bool toCreate )
- : myResult( Py_None ), myCreate( toCreate ) {}
- virtual void Execute() {
- if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( myCreate ? __Create : __FindOrCreate ) ) {
- PyObject* aPyClass = GetPyClass("vtkRenderWindow");
- vtkRenderWindow* aVTKObject = aVTKViewWindow->getRenderWindow();
- myResult = PyVTKObject_New(aPyClass,aVTKObject);
- }
- }
-};
-extern "C" PyObject *libSalomePy_getRenderWindow(PyObject *self, PyObject *args)
-{
- PyObject* aResult = Py_None;
- int toCreate = 0;
- if ( !PyArg_ParseTuple(args, "|i:getRenderWindow", &toCreate) )
- PyErr_Print();
- else
- aResult = ProcessEvent( new TGetRenderWindowEvent( toCreate ) );
- return aResult;
-}
-
-/*!
- Get VTK render window interactor.
- Always opens new VTK window if <toCreate> parameter is non zero.
- Otherwise opens new VTK window only if there is no one opened.
-*/
-class TGetRenderWindowInteractorEvent: public SALOME_Event {
-public:
- typedef PyObject* TResult;
- TResult myResult;
- int myCreate;
- TGetRenderWindowInteractorEvent( bool toCreate )
- : myResult( Py_None ), myCreate( toCreate ) {}
- virtual void Execute() {
- if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( myCreate ? __Create : __FindOrCreate ) ) {
- PyObject* aPyClass = GetPyClass("vtkRenderWindowInteractor");
- vtkRenderWindowInteractor* aVTKObject = aVTKViewWindow->getInteractor();
- myResult = PyVTKObject_New(aPyClass,aVTKObject);
- }
- }
-};
-extern "C" PyObject *libSalomePy_getRenderWindowInteractor(PyObject *self, PyObject *args)
-{
- PyObject* aResult = Py_None;
- int toCreate = 0;
- if ( !PyArg_ParseTuple(args, "|i:getRenderWindowInteractor", &toCreate) )
- PyErr_Print();
- else
- aResult = ProcessEvent( new TGetRenderWindowInteractorEvent( toCreate ) );
- return aResult;
-}
-
-/*!
- Show/hide trihedron in the current VTK viewer (if there is one)
-*/
-extern "C" PyObject *libSalomePy_showTrihedron(PyObject *self, PyObject *args)
-{
- class TEvent: public SALOME_Event {
- public:
- int myShow;
- TEvent( int bShow )
- : myShow( bShow ) {}
- virtual void Execute() {
- if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( __Find ) ) {
- if ( aVTKViewWindow->isTrihedronDisplayed() != myShow )
- aVTKViewWindow->onViewTrihedron();
- }
- }
- };
-
- PyObject* aResult = Py_None;
- int bShow = 0;
- if ( !PyArg_ParseTuple(args, "i:showTrihedron", &bShow) )
- PyErr_Print();
- else
- ProcessVoidEvent( new TEvent( bShow ) );
- return aResult;
-}
-
-/*!
- Fit all the contents in the current VTK viewer (if there is one)
-*/
-extern "C" PyObject *libSalomePy_fitAll(PyObject *self, PyObject *args)
-{
- class TEvent: public SALOME_Event {
- public:
- TEvent() {}
- virtual void Execute() {
- if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( __Find ) ) {
- aVTKViewWindow->onFitAll();
- }
- }
- };
-
- ProcessVoidEvent( new TEvent() );
- return Py_None;
-}
-
-/*!
- Set view type fot the current VTK viewer (if there is one)
-*/
-extern "C" PyObject *libSalomePy_setView(PyObject *self, PyObject *args)
-{
- class TEvent: public SALOME_Event {
- public:
- long myType;
- TEvent( long type ) : myType( type) {}
- virtual void Execute() {
- if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( __Find ) ) {
- switch( myType ) {
- case ViewFront:
- aVTKViewWindow->onFrontView(); break;
- case ViewBack:
- aVTKViewWindow->onBackView(); break;
- case ViewTop:
- aVTKViewWindow->onTopView(); break;
- case ViewBottom:
- aVTKViewWindow->onBottomView(); break;
- case ViewRight:
- aVTKViewWindow->onRightView(); break;
- case ViewLeft:
- aVTKViewWindow->onLeftView(); break;
- default:
- PyErr_Format(PyExc_ValueError,"setView%: wrong parameter value; must be between %d and %d", ViewFront, ViewLeft );
- break;
- }
- }
- }
- };
-
- long type = -1;
- if ( !PyArg_ParseTuple(args, "l:setView", &type) )
- PyErr_Print();
- else {
- ProcessVoidEvent( new TEvent( type ) );
- if( PyErr_Occurred() )
- PyErr_Print();
- }
- return Py_None;
-}
-
-/*!
- Reset contents of the current VTK viewer (if there is one)
- to the default state
-*/
-extern "C" PyObject *libSalomePy_resetView(PyObject *self, PyObject *args)
-{
- class TEvent: public SALOME_Event {
- public:
- TEvent() {}
- virtual void Execute() {
- if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( __Find ) ) {
- aVTKViewWindow->onResetView();
- }
- }
- };
-
- ProcessVoidEvent( new TEvent() );
- return Py_None;
-}
-
-/*!
- Library initialization
-*/
-static PyMethodDef Module_Methods[] =
-{
- { "getRenderer", libSalomePy_getRenderer, METH_VARARGS },
- { "getRenderWindow", libSalomePy_getRenderWindow, METH_VARARGS },
- { "getRenderWindowInteractor", libSalomePy_getRenderWindowInteractor, METH_VARARGS },
- { "showTrihedron", libSalomePy_showTrihedron, METH_VARARGS },
- { "fitAll", libSalomePy_fitAll, METH_NOARGS },
- { "setView", libSalomePy_setView, METH_VARARGS },
- { "resetView", libSalomePy_resetView, METH_NOARGS },
- { NULL, NULL }
-};
-
-extern "C" void initlibSalomePy()
-{
- static char modulename[] = "libSalomePy";
- // init module
- PyObject* aModule = Py_InitModule(modulename, Module_Methods);
- if( PyErr_Occurred() ) {
- PyErr_Print();
- return;
- }
- // get module's dictionary
- PyObject *aModuleDict = PyModule_GetDict( aModule );
- if ( aModuleDict == NULL )
- return;
- // add View type enumeration
- PUBLISH_ENUM( ViewFront );
- PUBLISH_ENUM( ViewBack );
- PUBLISH_ENUM( ViewTop );
- PUBLISH_ENUM( ViewBottom );
- PUBLISH_ENUM( ViewRight );
- PUBLISH_ENUM( ViewLeft );
-}
+++ /dev/null
-# Copyright (C) 2003 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
-#
-#
-#
-# File : Makefile.in
-# Author : Patrick GOLDBRONN (CEA)
-# Module : SALOME
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-SUBDIRS = SALOME_PYQT_GUI SalomePyQt
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Nicolas REJNERI
-# Module : SALOME
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-# Sip flags
-SIP_FLAGS = -t WS_X11 -t $(QT_VERS) $(PYQT_SIPFLAGS) -s ".cc" -c . -I $(PYQT_SIPS)
-
-######################
-
-# Library target
-lib_LTLIBRARIES= libSalomePyQtGUI.la
-
-
-# Sip sources
-if IS_SIP_V4
-SIP_SRC = sipSalomePyQtGUIcmodule.cc
-SIP_FILES = SALOME_PYQT_GUI.sip
-else !IS_SIP_V4
-SIP_SRC = SalomePyQtGUIcmodule.cc
-SIP_FILES = SALOME_PYQT_GUI.sip
-endif
-
-EXTRA_DIST+= $(SIP_FILES)
-
-salomeinclude_HEADERS = \
- SALOME_PYQT_GUI.h \
- SALOME_PYQT_PyInterp.h \
- SALOME_PYQT_Module.h
-
-dist_libSalomePyQtGUI_la_SOURCES= \
- SALOME_PYQT_PyInterp.cxx \
- SALOME_PYQT_Module.cxx
-
-dist_libSalomePyQtGUI_la_SOURCES: $(SIP_SRC)
-
-# moc pre-processing
-MOC_FILES= SALOME_PYQT_Module_moc.cxx
-nodist_libSalomePyQtGUI_la_SOURCES= $(MOC_FILES) $(SIP_SRC)
-
-libSalomePyQtGUI_la_CPPFLAGS= $(QT_INCLUDES) $(SIP_INCLUDES) $(PYTHON_INCLUDES) \
- $(CAS_CPPFLAGS) $(VTK_INCLUDES) $(OGL_INCLUDES) $(BOOST_CPPFLAGS) \
- -DHAVE_CONFIG_H @KERNEL_CXXFLAGS@ -D__CALL_OLD_METHODS__ \
- -I$(srcdir)/../../PyInterp -I$(srcdir)/../../SalomeApp \
- -I$(srcdir)/../../SUIT -I$(srcdir)/../../Qtx -I$(srcdir)/../../LightApp \
- -I$(srcdir)/../../SalomeApp -I$(srcdir)/../../CAM -I$(srcdir)/../../STD \
- -I$(top_builddir)/salome_adm/unix @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
-libSalomePyQtGUI_la_LIBADD= $(PYTHON_LIBS) $(SIP_LIBS) $(PYQT_LIBS) $(VTK_LIBS) \
- $(OGL_LIBS) ../../PyInterp/libPyInterp.la ../../SalomeApp/libSalomeApp.la
-
-##################################
-
-# Custom build step: generate C++ wrapping according to $(SIP_FILES)
-
-$(SIP_SRC): $(SIP_FILES)
- $(SIP) $(SIP_FLAGS) $<
-
-$(dist_libSalomePyQtGUI_la_SOURCES): $(SIP_SRC)
-
-###################################
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-#if !defined ( SALOME_PYQT_GUI_H )
-#define SALOME_PYQT_GUI_H
-
-// ========================================================
-// set dllexport type for Win platform
-#ifdef WNT
-
-#ifdef SALOME_PYQT_EXPORTS
-#define SALOME_PYQT_EXPORT __declspec(dllexport)
-#else
-#define SALOME_PYQT_EXPORT __declspec(dllimport)
-#endif
-
-#else // WNT
-
-#define SALOME_PYQT_EXPORT
-
-#endif // WNT
-
-// ========================================================
-// avoid warning messages
-#ifdef WNT
-#pragma warning (disable : 4786)
-#pragma warning (disable : 4251)
-#endif
-
-#endif // SALOME_PYQT_GUI_H
+++ /dev/null
-%Module SalomePyQtGUI
-
-%Import qtmod.sip
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "PyInterp_Dispatcher.h"
-#include "SALOME_PYQT_Module.h"
-
-
-#include "SUIT_ResourceMgr.h"
-#include "STD_MDIDesktop.h"
-#include "STD_TabDesktop.h"
-#include "SalomeApp_Application.h"
-#include "SalomeApp_Study.h"
-#include "LightApp_Preferences.h"
-
-#include "QtxWorkstack.h"
-#include "QtxActionMenuMgr.h"
-#include "QtxActionToolMgr.h"
-#include <SALOME_LifeCycleCORBA.hxx>
-#include <Container_init_python.hxx>
-
-#include <qfile.h>
-#include <qdom.h>
-#include <qworkspace.h>
-#include <qmenubar.h>
-#include <qpopupmenu.h>
-
-#ifndef WIN32
-#include "SALOME_PYQT_SipDefs.h"
-#endif
-#include "sipAPISalomePyQtGUI.h"
-
-#include <sip.h>
-#if SIP_VERSION < 0x040700
-#include "sipqtQWidget.h"
-#include "sipqtQPopupMenu.h"
-#endif
-
-#include <CORBA.h>
-
-using namespace std;
-
-/*!
- \var __DEFAULT_NAME__ - Default name of the module, replaced at the moment of module creation
-*/
-const char* __DEFAULT_NAME__ = "SALOME_PYQT_Module";
-
-/*!
- \var __DEFAULT_GROUP__ - Default menu group number
-*/
-const int __DEFAULT_GROUP__ = 40;
-
-// If __CALL_OLD_METHODS__ macro is not defined the invoking of obsolete Python
-// module's methods like setSetting(), definePopup(), etc. is blocked.
-// This macro is defined by default (in Makefile)
-#ifdef __CALL_OLD_METHODS__
-const bool IsCallOldMethods = true;
-#else
-const bool IsCallOldMethods = false;
-#endif
-
-// NB: Python requests.
-// General rule for Python requests created by SALOME_PYQT_Module:
-// all requests should be executed SYNCHRONOUSLY within the main GUI thread.
-// However, it is obligatory that ANY Python call is wrapped with a request object,
-// so that ALL Python API calls are serialized with PyInterp_Dispatcher.
-
-/*!
- \class SALOME_PYQT_XmlHandler
- The class for parsing of the XML resource files.
- Used for backward compatibility with existing Python modules.
-*/
-class SALOME_PYQT_XmlHandler
-{
-public:
- SALOME_PYQT_XmlHandler( SALOME_PYQT_Module* module, const QString& fileName );
- void createActions();
- void clearActions();
- void createPopup ( QPopupMenu* menu,
- const QString& context,
- const QString& parent,
- const QString& object );
-
-protected:
- void createToolBar ( QDomNode& parentNode );
- void createMenu ( QDomNode& parentNode,
- const int parentMenuId = -1,
- QPopupMenu* parentPopup = 0 );
-
- void insertPopupItems( QDomNode& parentNode,
- QPopupMenu* menu );
-
-private:
- SALOME_PYQT_Module* myModule;
- QDomDocument myDoc;
- QStringList myMenuItems;
- QStringList myCurrentMenu;
- bool myMenuCreated;
-};
-
-// SALOME_PYQT_Module class implementation (implements CAM_Module API for
-// all Python-based SALOME module
-
-// While the SalomePyQtGUI library is not imported in Python it's initialization function
-// should be called manually (and only once) in order to initialize global sip data
-// and to get C API from sip : sipBuildResult for example
-#if defined(SIP_VERS_v4_old) || defined(SIP_VERS_v4_new)
-#define INIT_FUNCTION initSalomePyQtGUI
-#if defined(SIP_STATIC_MODULE)
-extern "C" void INIT_FUNCTION();
-#else
-PyMODINIT_FUNC INIT_FUNCTION();
-#endif
-#else
-#define INIT_FUNCTION initlibSalomePyQtGUIc
-extern "C" void INIT_FUNCTION();
-#endif
-
-/*!
- * This function creates an instance of SALOME_PYQT_Module object by request
- * of and application object when the module is loaded.
- */
-extern "C" {
- SALOME_PYQT_EXPORT CAM_Module* createModule() {
- static bool alreadyInitialized = false;
- if ( !alreadyInitialized ) {
- // call only once (see above) !
- PyEval_RestoreThread( KERNEL_PYTHON::_gtstate );
- INIT_FUNCTION();
- PyEval_ReleaseThread( KERNEL_PYTHON::_gtstate );
- alreadyInitialized = !alreadyInitialized;
- }
- return new SALOME_PYQT_Module();
- }
-}
-
-/*!
- * Static variables definition
- */
-SALOME_PYQT_Module::InterpMap SALOME_PYQT_Module::myInterpMap;
-SALOME_PYQT_Module* SALOME_PYQT_Module::myInitModule = 0;
-
-/*!
- * Little trick : provide an access to being activated Python module from outside;
- * needed by the SalomePyQt library :(
-*/
-SALOME_PYQT_Module* SALOME_PYQT_Module::getInitModule()
-{
- return myInitModule;
-}
-
-/*!
- * Constructor
- */
-SALOME_PYQT_Module::SALOME_PYQT_Module()
- : SalomeApp_Module( __DEFAULT_NAME__ ),
- myModule( 0 ),
- myXmlHandler ( 0 ),
- myLastActivateStatus( true )
-{
-}
-
-/*!
- * Destructor
- */
-SALOME_PYQT_Module::~SALOME_PYQT_Module()
-{
- if ( myXmlHandler )
- delete myXmlHandler;
-}
-
-/*!
- * Initialization of the module.
- * Inherited from CAM_Module.
- *
- * This method is used for creation of the menus, toolbars and other staff.
- * There are two ways:
- * - for obsolete modules this method first tries to read <module>_<language>.xml
- * resource file which contains a menu, toolbars and popup menus description.
- * - new modules can create menus by by calling the corresponding methods of SalomePyQt
- * Python API in the Python module's initialize() method which is called from here.
- * NOTE: if postponed modules loading is not used, the active study might be not defined
- * yet at this stage, so initialize() method should not perform any study-based initialization.
- */
-void SALOME_PYQT_Module::initialize( CAM_Application* app )
-{
- MESSAGE( "SALOME_PYQT_Module::initialize" );
-
- SalomeApp_Module::initialize( app );
-
- // Try to get XML resource file name
- SUIT_ResourceMgr* aResMgr = getApp()->resourceMgr();
- QString aLang = aResMgr->stringValue( "language", "language", QString::null );
- if ( aLang.isEmpty() ) aLang = QString( "en" );
- QString aName = name( "" );
- QString aFileName = aName + "_" + aLang + ".xml";
- aFileName = aResMgr->path( "resources", aName, aFileName );
-
- // create XML handler instance
- if ( !myXmlHandler && !aFileName.isEmpty() && QFile::exists( aFileName ) )
- myXmlHandler = new SALOME_PYQT_XmlHandler( this, aFileName );
-
- // perform internal initialization and call module's initialize() method
- // InitializeReq: request class for internal init() operation
- class InitializeReq : public PyInterp_Request
- {
- public:
- InitializeReq( CAM_Application* _app,
- SALOME_PYQT_Module* _obj )
- : PyInterp_Request( 0, true ), // this request should be processed synchronously (sync == true)
- myApp( _app ),
- myObj( _obj ) {}
-
- protected:
- virtual void execute()
- {
- myObj->init( myApp );
- }
-
- private:
- CAM_Application* myApp;
- SALOME_PYQT_Module* myObj;
- };
-
- // Posting the request
- PyInterp_Dispatcher::Get()->Exec( new InitializeReq( app, this ) );
-}
-
-/*!
- * Activation of the module.
- * Inherited from CAM_Module.
- */
-bool SALOME_PYQT_Module::activateModule( SUIT_Study* theStudy )
-{
- MESSAGE( "SALOME_PYQT_Module::activateModule" );
-
- bool res = SalomeApp_Module::activateModule( theStudy );
-
- if ( !res )
- return res;
-
- // reset the activation status to the default value
- myLastActivateStatus = true;
-
- // ActivateReq: request class for internal activate() operation
- class ActivateReq : public PyInterp_Request
- {
- public:
- ActivateReq( SUIT_Study* _study,
- SALOME_PYQT_Module* _obj )
- : PyInterp_Request( 0, true ), // this request should be processed synchronously (sync == true)
- myStudy ( _study ),
- myObj ( _obj ) {}
-
- protected:
- virtual void execute()
- {
- myObj->activate( myStudy );
- }
-
- private:
- SUIT_Study* myStudy;
- SALOME_PYQT_Module* myObj;
- };
-
- // Posting the request
- PyInterp_Dispatcher::Get()->Exec( new ActivateReq( theStudy, this ) );
-
- if ( !lastActivationStatus() )
- return false;
-
- // activate menus, toolbars, etc
- setMenuShown( true );
- setToolShown( true );
-
- if ( menuMgr() )
- connect( menuMgr(), SIGNAL( menuHighlighted( int, int ) ),
- this, SLOT( onMenuHighlighted( int, int ) ) );
- connect( getApp(), SIGNAL( preferenceChanged( const QString&, const QString&, const QString& ) ),
- this, SLOT( preferenceChanged( const QString&, const QString&, const QString& ) ) );
-
- // create menus & toolbars from XML file if required
- if ( myXmlHandler )
- myXmlHandler->createActions();
-
- // CustomizeReq: request class for internal customize() operation
- class CustomizeReq : public PyInterp_Request
- {
- public:
- CustomizeReq( SUIT_Study* _study,
- SALOME_PYQT_Module* _obj )
- : PyInterp_Request( 0, true ), // this request should be processed synchronously (sync == true)
- myStudy ( _study ),
- myObj ( _obj ) {}
-
- protected:
- virtual void execute()
- {
- myObj->customize( myStudy );
- }
-
- private:
- SUIT_Study* myStudy;
- SALOME_PYQT_Module* myObj;
- };
-
- // Posting the request
- PyInterp_Dispatcher::Get()->Exec( new CustomizeReq( theStudy, this ) );
-
- return true;
-}
-
-/*!
- * Deactivation of the module.
- * Inherited from CAM_Module.
- */
-bool SALOME_PYQT_Module::deactivateModule( SUIT_Study* theStudy )
-{
- MESSAGE( "SALOME_PYQT_Module::deactivateModule" );
-
- if ( menuMgr() )
- disconnect( menuMgr(), SIGNAL( menuHighlighted( int, int ) ),
- this, SLOT( onMenuHighlighted( int, int ) ) );
- disconnect( getApp(), SIGNAL( preferenceChanged( const QString&, const QString&, const QString& ) ),
- this, SLOT( preferenceChanged( const QString&, const QString&, const QString& ) ) );
-
- // remove menus & toolbars created from XML file if required
- if ( myXmlHandler )
- myXmlHandler->clearActions();
-
- // deactivate menus, toolbars, etc
- setMenuShown( false );
- setToolShown( false );
-
- // DeactivateReq: request class for internal deactivate() operation
- class DeactivateReq : public PyInterp_LockRequest
- {
- public:
- DeactivateReq( PyInterp_base* _py_interp,
- SUIT_Study* _study,
- SALOME_PYQT_Module* _obj )
- : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
- myStudy ( _study ),
- myObj ( _obj ) {}
-
- protected:
- virtual void execute()
- {
- myObj->deactivate( myStudy );
- }
-
- private:
- SUIT_Study* myStudy;
- SALOME_PYQT_Module* myObj;
- };
-
- // Posting the request
- PyInterp_Dispatcher::Get()->Exec( new DeactivateReq( myInterp, theStudy, this ) );
-
- return SalomeApp_Module::deactivateModule( theStudy );
-}
-
-/*!
- * Returns the status of last trying of module activation.
- * Before fisrt activation - status is false
-*/
-bool SALOME_PYQT_Module::lastActivationStatus() const
-{
- return myLastActivateStatus;
-}
-
-/*!
- Preferences changing (application) - called when preference is changed
-*/
-void SALOME_PYQT_Module::preferenceChanged( const QString& module,
- const QString& section,
- const QString& setting )
-{
- MESSAGE( "SALOME_PYQT_Module::preferenceChanged");
-
- // perform synchronous request to Python event dispatcher
- class Event : public PyInterp_LockRequest
- {
- public:
- Event( PyInterp_base* _py_interp,
- SALOME_PYQT_Module* _obj,
- const QString& _section,
- const QString& _setting )
- : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
- myObj ( _obj ),
- mySection( _section ),
- mySetting( _setting ) {}
-
- protected:
- virtual void execute()
- {
- myObj->prefChanged( mySection, mySetting );
- }
-
- private:
- SALOME_PYQT_Module* myObj;
- QString mySection, mySetting;
- };
-
- if ( module != moduleName() ) {
- // Module's preferences are processed by preferencesChanged() method
- // ...
- // Posting the request only if dispatcher is not busy!
- // Executing the request synchronously
- if ( !PyInterp_Dispatcher::Get()->IsBusy() )
- PyInterp_Dispatcher::Get()->Exec( new Event( myInterp, this, section, setting ) );
- }
-}
-
-/*!
- * Called when study desktop is activated.
- * Used for notifying about changing of the active study.
- */
-void SALOME_PYQT_Module::studyActivated()
-{
- // StudyChangedReq: request class for internal studyChanged() operation
- class StudyChangedReq : public PyInterp_Request
- {
- public:
- StudyChangedReq( SUIT_Study* _study,
- SALOME_PYQT_Module* _obj )
- : PyInterp_Request( 0, true ), // this request should be processed synchronously (sync == true)
- myStudy ( _study ),
- myObj ( _obj ) {}
-
- protected:
- virtual void execute()
- {
- myObj->studyChanged( myStudy );
- }
-
- private:
- SUIT_Study* myStudy;
- SALOME_PYQT_Module* myObj;
- };
-
- // Posting the request
- PyInterp_Dispatcher::Get()->Exec( new StudyChangedReq( application()->activeStudy(), this ) );
-}
-
-/*!
- * Processes GUI action (from main menu, toolbar or context popup menu)
- */
-void SALOME_PYQT_Module::onGUIEvent()
-{
- // get sender action
- const QObject* obj = sender();
- if ( !obj || !obj->inherits( "QAction" ) )
- return;
- QAction* action = (QAction*)obj;
-
- // get action ID
- int id = actionId( action );
- MESSAGE( "SALOME_PYQT_Module::onGUIEvent: id = " << id );
-
- // perform synchronous request to Python event dispatcher
- class GUIEvent : public PyInterp_LockRequest
- {
- public:
- GUIEvent( PyInterp_base* _py_interp,
- SALOME_PYQT_Module* _obj,
- int _id )
- : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
- myId ( _id ),
- myObj ( _obj ) {}
-
- protected:
- virtual void execute()
- {
- myObj->guiEvent( myId );
- }
-
- private:
- int myId;
- SALOME_PYQT_Module* myObj;
- };
-
- // Posting the request
- PyInterp_Dispatcher::Get()->Exec( new GUIEvent( myInterp, this, id ) );
-}
-
-/*!
- * Processes GUI action (from context popup menu, only for XML-based actions!)
- */
-void SALOME_PYQT_Module::onGUIEvent( int id )
-{
- // perform synchronous request to Python event dispatcher
- class GUIEvent : public PyInterp_LockRequest
- {
- public:
- GUIEvent( PyInterp_base* _py_interp,
- SALOME_PYQT_Module* _obj,
- int _id )
- : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
- myId ( _id ),
- myObj ( _obj ) {}
-
- protected:
- virtual void execute()
- {
- myObj->guiEvent( myId );
- }
-
- private:
- int myId;
- SALOME_PYQT_Module* myObj;
- };
-
- // Posting the request
- PyInterp_Dispatcher::Get()->Exec( new GUIEvent( myInterp, this, id ) );
-}
-
-/*!
- * Menu highlight processing
- */
-void SALOME_PYQT_Module::onMenuHighlighted( int menu, int submenu )
-{
- if ( !action( menu ) && registered( menu, submenu ) ) {
- // perform synchronous request to Python event dispatcher
- class MenuHighlightEvent : public PyInterp_LockRequest
- {
- public:
- MenuHighlightEvent( PyInterp_base* _py_interp,
- SALOME_PYQT_Module* _obj,
- int _menu,
- int _submenu )
- : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
- myMenu ( _menu ),
- mySubMenu( _submenu ),
- myObj ( _obj ) {}
-
- protected:
- virtual void execute()
- {
- myObj->menuHighlight( myMenu, mySubMenu );
- }
-
- private:
- int myMenu;
- int mySubMenu;
- SALOME_PYQT_Module* myObj;
- };
-
- // Posting the request
- PyInterp_Dispatcher::Get()->Exec( new MenuHighlightEvent( myInterp, this, menu, submenu ) );
- }
-}
-
-/*!
- Context popup menu request.
- Called when user activates popup menu in some window (view, object browser, etc).
- */
-void SALOME_PYQT_Module::contextMenuPopup( const QString& theContext, QPopupMenu* thePopupMenu, QString& /*title*/ )
-{
- MESSAGE( "SALOME_PYQT_Module::contextMenuPopup : " << theContext.latin1() );
- // perform synchronous request to Python event dispatcher
- class PopupMenuEvent : public PyInterp_LockRequest
- {
- public:
- PopupMenuEvent( PyInterp_base* _py_interp,
- SALOME_PYQT_Module* _obj,
- const QString& _context,
- QPopupMenu* _popup )
- : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
- myContext( _context ),
- myPopup ( _popup ),
- myObj ( _obj ) {}
-
- protected:
- virtual void execute()
- {
- myObj->contextMenu( myContext, myPopup );
- }
-
- private:
- SALOME_PYQT_Module* myObj;
- QString myContext;
- QPopupMenu* myPopup;
- };
-
- // Posting the request only if dispatcher is not busy!
- // Executing the request synchronously
- if ( !PyInterp_Dispatcher::Get()->IsBusy() )
- PyInterp_Dispatcher::Get()->Exec( new PopupMenuEvent( myInterp, this, theContext, thePopupMenu ) );
-}
-
-/*!
- * Export preferences for the Python module.
- * Called only once when the first instance of the module is created.
- */
-void SALOME_PYQT_Module::createPreferences()
-{
- MESSAGE( "SALOME_PYQT_Module::createPreferences");
- // perform synchronous request to Python event dispatcher
- class Event : public PyInterp_LockRequest
- {
- public:
- Event( PyInterp_base* _py_interp,
- SALOME_PYQT_Module* _obj )
- : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
- myObj ( _obj ) {}
-
- protected:
- virtual void execute()
- {
- myObj->initPreferences();
- }
-
- private:
- SALOME_PYQT_Module* myObj;
- };
-
- // Posting the request only if dispatcher is not busy!
- // Executing the request synchronously
- if ( !PyInterp_Dispatcher::Get()->IsBusy() )
- PyInterp_Dispatcher::Get()->Exec( new Event( myInterp, this ) );
-}
-
-/*!
- * Defines the dockable window associated with the module.
- * To fill the list of windows the correspondind Python module's windows()
- * method is called from SALOME_PYQT_Module::init() method.
- * By default, ObjectBrowser, PythonConsole and LogWindow are provided.
- */
-void SALOME_PYQT_Module::windows( QMap<int, int>& mappa ) const
-{
- // First clear the output parameters
- QMap<int, int>::ConstIterator it;
- for ( it = myWindowsMap.begin(); it != myWindowsMap.end(); ++it ) {
- mappa[ it.key() ] = it.data();
- }
-}
-
-/*!
- * Defines the compatible views which should be opened on module activation.
- * To fill the list of views the correspondind Python module's views()
- * method is called from SALOME_PYQT_Module::init() method.
- * By default, the list is empty.
- */
-void SALOME_PYQT_Module::viewManagers( QStringList& listik ) const
-{
- for ( QStringList::ConstIterator it = myViewMgrList.begin(); it != myViewMgrList.end(); ++it ) {
- listik.append( *it );
- }
-}
-
-/*!
- Preferences changing (module) - called when the module's preferences are changed
-*/
-void SALOME_PYQT_Module::preferencesChanged( const QString& section, const QString& setting )
-{
- MESSAGE( "SALOME_PYQT_Module::preferencesChanged");
-
- // perform synchronous request to Python event dispatcher
- class Event : public PyInterp_LockRequest
- {
- public:
- Event( PyInterp_base* _py_interp,
- SALOME_PYQT_Module* _obj,
- const QString& _section,
- const QString& _setting )
- : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
- myObj ( _obj ),
- mySection( _section ),
- mySetting( _setting ) {}
-
- protected:
- virtual void execute()
- {
- myObj->prefChanged( mySection, mySetting );
- }
-
- private:
- SALOME_PYQT_Module* myObj;
- QString mySection, mySetting;
- };
-
- // Posting the request only if dispatcher is not busy!
- // Executing the request synchronously
- if ( !PyInterp_Dispatcher::Get()->IsBusy() )
- PyInterp_Dispatcher::Get()->Exec( new Event( myInterp, this, section, setting ) );
-}
-
-
-/*!
- * Performs internal initialization
- * - initializes/gets the Python interpreter (one per study)
- * - imports the Python module
- * - passes the workspace widget to the Python module
- * - calls Python module's initialize() method
- * - calls Python module's windows() method
- * - calls Python module's views() method
- */
-void SALOME_PYQT_Module::init( CAM_Application* app )
-{
- // reset interpreter to NULL
- myInterp = NULL;
-
- // get study Id
- SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( app );
- if ( !anApp )
- return;
-
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- if ( !aStudy )
- return;
- int aStudyId = aStudy ? aStudy->studyDS()->StudyId() : 0;
-
- // initialize Python subinterpreter (on per study) and put it in <myInterp> variable
- initInterp( aStudyId );
- if ( !myInterp )
- return; // Error
-
- // import Python GUI module
- importModule();
- if ( !myModule )
- return; // Error
-
- myInitModule = this;
-
- // then call Python module's initialize() method
- // ... first get python lock
- PyLockWrapper aLock = myInterp->GetLockWrapper();
- // ... (the Python module is already imported)
- // ... finally call Python module's initialize() method
- if(PyObject_HasAttrString(myModule , "initialize")){
- PyObjWrapper res( PyObject_CallMethod( myModule, "initialize", "" ) );
- if( !res ) {
- PyErr_Print();
- }
- }
-
- // get the windows list from the Python module by calling windows() method
- // ... first put default values
- myWindowsMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::DockLeft );
- myWindowsMap.insert( SalomeApp_Application::WT_PyConsole, Qt::DockBottom );
- myWindowsMap.insert( SalomeApp_Application::WT_LogWindow, Qt::DockBottom );
-
- if(PyObject_HasAttrString(myModule , "windows")){
- PyObjWrapper res1( PyObject_CallMethod( myModule, "windows", "" ) );
- if( !res1 ) {
- PyErr_Print();
- }
- else {
- myWindowsMap.clear();
- if ( PyDict_Check( res1 ) ) {
- PyObject* key;
- PyObject* value;
- int pos = 0;
- while ( PyDict_Next( res1, &pos, &key, &value ) ) {
- // parse the return value
- // it should be a map: {integer:integer}
- int aKey, aValue;
- if( key && PyInt_Check( key ) && value && PyInt_Check( value ) ) {
- aKey = PyInt_AsLong( key );
- aValue = PyInt_AsLong( value );
- myWindowsMap[ aKey ] = aValue;
- }
- }
- }
- }
- }
- // get the windows list from the Python module by calling views() method
- if(PyObject_HasAttrString(myModule , "views")){
- PyObjWrapper res2( PyObject_CallMethod( myModule, "views", "" ) );
- if( !res2 ) {
- PyErr_Print();
- }
- else {
- // parse the return value
- // result can be one string...
- if ( PyString_Check( res2 ) ) {
- myViewMgrList.append( PyString_AsString( res2 ) );
- }
- // ... or list of strings
- else if ( PyList_Check( res2 ) ) {
- int size = PyList_Size( res2 );
- for ( int i = 0; i < size; i++ ) {
- PyObject* value = PyList_GetItem( res2, i );
- if( value && PyString_Check( value ) ) {
- myViewMgrList.append( PyString_AsString( value ) );
- }
- }
- }
- }
- }
- myInitModule = 0;
-}
-
-/*!
- * Performs internal activation:
- * - initializes/gets the Python interpreter (one per study)
- * - imports the Python GUI module
- * - calls Python module's activate() method (for new modules)
- */
-void SALOME_PYQT_Module::activate( SUIT_Study* theStudy )
-{
- // get study Id
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( theStudy );
- int aStudyId = aStudy ? aStudy->studyDS()->StudyId() : 0;
-
- // initialize Python subinterpreter (on per study) and put it in <myInterp> variable
- initInterp( aStudyId );
- if ( !myInterp )
- return; // Error
-
- // import Python GUI module
- importModule();
- if ( !myModule )
- return; // Error
-
- // get python lock
- PyLockWrapper aLock = myInterp->GetLockWrapper();
-
- // call Python module's activate() method (for the new modules)
- if(PyObject_HasAttrString(myModule , "activate")){
- PyObject* res1 = PyObject_CallMethod( myModule, "activate", "" );
- if ( !res1 || !PyBool_Check( res1 ) ) {
- PyErr_Print();
- //= true: for support of old modules
- myLastActivateStatus = true;
- }
- else {
- //detect return status
- myLastActivateStatus = PyObject_IsTrue( res1 );
- }
- }
-}
-
-/*!
- * Performs additional customization after module is activated:
- * - gets the Python interpreter (one per study)
- * - imports the Python GUI module
- * - calls Python module's setSettings() method (obsolete function, used for compatibility with old code)
- */
-void SALOME_PYQT_Module::customize ( SUIT_Study* theStudy )
-{
- // get study Id
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( theStudy );
- int aStudyId = aStudy ? aStudy->studyDS()->StudyId() : 0;
-
- // initialize Python subinterpreter (on per study) and put it in <myInterp> variable
- initInterp( aStudyId );
- if ( !myInterp )
- return; // Error
-
- // import Python GUI module
- importModule();
- if ( !myModule )
- return; // Error
-
- if ( IsCallOldMethods ) { // __CALL_OLD_METHODS__
- // call Python module's setWorkspace() method
- setWorkSpace();
- } //__CALL_OLD_METHODS__
-
- // get python lock
- PyLockWrapper aLock = myInterp->GetLockWrapper();
-
- if ( IsCallOldMethods ) { //__CALL_OLD_METHODS__
- // call Python module's setSettings() method (obsolete)
- if(PyObject_HasAttrString(myModule , "setSettings")){
- PyObjWrapper res( PyObject_CallMethod( myModule, "setSettings", "" ) );
- if( !res ) {
- PyErr_Print();
- }
- }
- } //__CALL_OLD_METHODS__
-}
-
-/*!
- * Performs internal deactivation:
- * - calls Python module's deactivate() method
- */
-void SALOME_PYQT_Module::deactivate( SUIT_Study* theStudy )
-{
- // check if the subinterpreter is initialized and Python module is imported
- if ( !myInterp || !myModule ) {
- // Error! Python subinterpreter should be initialized and module should be imported first!
- return;
- }
- // then call Python module's deactivate() method
- if(PyObject_HasAttrString(myModule , "deactivate")){
- PyObjWrapper res( PyObject_CallMethod( myModule, "deactivate", "" ) );
- if( !res ) {
- PyErr_Print();
- }
- }
-}
-
-/*!
- * Called when active the study is actived (user brings its desktop to top)
- * - initializes/gets the Python interpreter (one per study)
- * - imports the Python GUI module
- * - calls Python module's activeStudyChanged() method
- */
-void SALOME_PYQT_Module::studyChanged( SUIT_Study* theStudy )
-{
- // get study Id
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( theStudy );
- int aStudyId = aStudy ? aStudy->studyDS()->StudyId() : 0;
-
- // initialize Python subinterpreter (on per study) and put it in <myInterp> variable
- initInterp( aStudyId );
- if ( !myInterp )
- return; // Error
-
- // import Python GUI module
- importModule();
- if ( !myModule )
- return; // Error
-
- if ( IsCallOldMethods ) { // __CALL_OLD_METHODS__
- // call Python module's setWorkspace() method
- setWorkSpace();
- } //__CALL_OLD_METHODS__
-
- // get python lock
- PyLockWrapper aLock = myInterp->GetLockWrapper();
-
- // call Python module's activeStudyChanged() method
- if(PyObject_HasAttrString(myModule , "activeStudyChanged")){
- PyObjWrapper res( PyObject_CallMethod( myModule, "activeStudyChanged", "i", aStudyId ) );
- if( !res ) {
- PyErr_Print();
- }
- }
-}
-
-/*!
- * Get module engine, returns nil var if engine is not found in LifeCycleCORBA
- */
-Engines::Component_var SALOME_PYQT_Module::getEngine() const
-{
- Engines::Component_var comp;
- // temporary solution
- try {
- comp = getApp()->lcc()->FindOrLoad_Component( "FactoryServerPy", name( "" ) );
- }
- catch (CORBA::Exception&) {
- }
- return comp;
-}
-
-/*!
- * Get module engine IOR, returns empty string if engine is not found in LifeCycleCORBA
- */
-QString SALOME_PYQT_Module::engineIOR() const
-{
- QString anIOR = QString::null;
- if ( !CORBA::is_nil( getEngine() ) )
- return QString( getApp()->orb()->object_to_string( getEngine() ) );
- return QString( "" );
-}
-
-/*!
- * Processes context popup menu request
- * - calls Python module's definePopup(...) method (obsolete function, used for compatibility with old code)
- * to define the popup menu context
- * - parses XML resourses file (if exists) and fills the popup menu with the items)
- * - calls Python module's customPopup(...) method (obsolete function, used for compatibility with old code)
- * to allow module to customize the popup menu
- * - for new modules calls createPopupMenu() function to allow the modules to build the popup menu
- * by using insertItem(...) Qt functions.
- */
-void SALOME_PYQT_Module::contextMenu( const QString& theContext, QPopupMenu* thePopupMenu )
-{
- // Python interpreter should be initialized and Python module should be
- // import first
- if ( !myInterp || !myModule )
- return;
-
- QString aContext( "" ), aObject( "" ), aParent( theContext );
-
- if ( IsCallOldMethods && PyObject_HasAttrString(myModule , "definePopup") ) { //__CALL_OLD_METHODS__
- // call definePopup() Python module's function
- // this is obsolete function, used only for compatibility reasons
- PyObjWrapper res(PyObject_CallMethod( myModule,
- "definePopup",
- "sss",
- aContext.latin1(),
- aObject.latin1(),
- aParent.latin1() ) );
- if( !res ) {
- PyErr_Print();
- }
- else {
- // parse return value
- char *co, *ob, *pa;
- if( PyArg_ParseTuple( res, "sss", &co, &ob, &pa ) ) {
- aContext = co;
- aObject = ob;
- aParent = pa;
- }
- }
- } //__CALL_OLD_METHODS__
-
- // first try to create menu via XML parser:
- // we create popup menus without help of QtxPopupMgr
- if ( myXmlHandler )
- myXmlHandler->createPopup( thePopupMenu, aContext, aParent, aObject );
-
- PyObjWrapper sipPopup( sipBuildResult( 0, "M", thePopupMenu, sipClass_QPopupMenu ) );
-
- // then call Python module's createPopupMenu() method (for new modules)
- if ( PyObject_HasAttrString(myModule , "createPopupMenu") ) {
- PyObjWrapper res1( PyObject_CallMethod( myModule,
- "createPopupMenu",
- "Os",
- sipPopup.get(),
- aContext.latin1() ) );
- if( !res1 ) {
- PyErr_Print();
- }
- }
-
- if ( IsCallOldMethods && PyObject_HasAttrString(myModule , "customPopup") ) { //__CALL_OLD_METHODS__
- // call customPopup() Python module's function
- // this is obsolete function, used only for compatibility reasons
- PyObjWrapper res2( PyObject_CallMethod( myModule,
- "customPopup",
- "Osss",
- sipPopup.get(),
- aContext.latin1(),
- aObject.latin1(),
- aParent.latin1() ) );
- if( !res2 ) {
- PyErr_Print();
- }
- } //__CALL_OLD_METHODS__
-}
-
-/*!
- * Processes GUI event
- * - calls Python module's OnGUIEvent() method
- */
-void SALOME_PYQT_Module::guiEvent( const int theId )
-{
- // Python interpreter should be initialized and Python module should be
- // import first
- if ( !myInterp || !myModule )
- return;
-
- if ( PyObject_HasAttrString(myModule , "OnGUIEvent") ) {
- PyObjWrapper res( PyObject_CallMethod( myModule, "OnGUIEvent", "i", theId ) );
- if( !res ) {
- PyErr_Print();
- }
- }
-}
-
-/*!
- * Menu highlight processing
- * - calls Python module's menuActivated(int,int) method
- */
-void SALOME_PYQT_Module::menuHighlight( const int menu, const int submenu )
-{
- // Python interpreter should be initialized and Python module should be
- // import first
- if ( !myInterp || !myModule )
- return;
-
- if ( PyObject_HasAttrString(myModule , "menuHighlight") ) {
- PyObjWrapper res( PyObject_CallMethod( myModule, "menuHighlight", "ii", menu, submenu ) );
- if( !res ) {
- PyErr_Print();
- }
- }
-}
-
-/*!
- * Initialises preferences for the module
- * - calls Python module's createPreferences() method
- */
-void SALOME_PYQT_Module::initPreferences()
-{
- // Python interpreter should be initialized and Python module should be
- // import first
- if ( !myInterp || !myModule )
- return;
-
- // temporary set myInitModule because createPreferences() method
- // might be called during the module intialization process
- myInitModule = this;
-
- if ( PyObject_HasAttrString(myModule , "createPreferences") ) {
- PyObjWrapper res( PyObject_CallMethod( myModule, "createPreferences", "" ) );
- if( !res ) {
- PyErr_Print();
- }
- }
-
- myInitModule = 0;
-}
-
-/*!
- * Initialises python subinterpreter (one per study)
- */
-void SALOME_PYQT_Module::initInterp( int theStudyId )
-{
- // check study Id
- if ( !theStudyId ) {
- // Error! Study Id must not be 0!
- myInterp = NULL;
- return;
- }
- // try to find the subinterpreter
- if( myInterpMap.find( theStudyId ) != myInterpMap.end() ) {
- // found!
- myInterp = myInterpMap[ theStudyId ];
- return;
- }
- // not found - create a new one!
- ///////////////////////////////////////////////////////////////////
- // Attention: the creation of Python interpretor must be protected
- // by a C++ Lock because of C threads
- ///////////////////////////////////////////////////////////////////
- myInterp = new SALOME_PYQT_PyInterp();
- myInterp->initialize();
- myInterpMap[ theStudyId ] = myInterp;
-
- // import 'salome' module and call 'salome_init' method;
- // do it only once on interpreter creation
- // ... first get python lock
- PyLockWrapper aLock = myInterp->GetLockWrapper();
- // ... then import a module
- PyObjWrapper aMod = PyImport_ImportModule( "salome" );
- if( !aMod ) {
- // Error!
- PyErr_Print();
- return;
- }
- // ... then call a method
- int embedded = 1;
- PyObjWrapper aRes( PyObject_CallMethod( aMod, "salome_init", "ii", theStudyId, embedded ) );
- if( !aRes ) {
- // Error!
- PyErr_Print();
- return;
- }
-}
-
-/*!
- * Imports Python GUI module and remember the reference to the module
- * !!! initInterp() should be called first!!!
- */
-void SALOME_PYQT_Module::importModule()
-{
- // check if the subinterpreter is initialized
- if ( !myInterp ) {
- // Error! Python subinterpreter should be initialized first!
- myModule = 0;
- return;
- }
- // import Python GUI module and puts it in <myModule> attribute
- // ... first get python lock
- PyLockWrapper aLock = myInterp->GetLockWrapper();
- // ... then import a module
- QString aMod = QString( name("") ) + "GUI";
- myModule = PyImport_ImportModule( (char*)( aMod.latin1() ) );
- if( !myModule ) {
- // Error!
- PyErr_Print();
- return;
- }
-}
-
-/*!
- * Calls <module>.setWorkSpace() method with PyQt QWidget object to use with
- * interpreter.
- * !!! initInterp() and importModule() should be called first!!!
- */
-void SALOME_PYQT_Module::setWorkSpace()
-{
- // check if the subinterpreter is initialized and Python module is imported
- if ( !myInterp || !myModule ) {
- // Error! Python subinterpreter should be initialized and module should be imported first!
- return;
- }
-
- // call setWorkspace() method
- // ... first get python lock
- PyLockWrapper aLock = myInterp->GetLockWrapper();
-
- // ... then try to import SalomePyQt module. If it's not possible don't go on.
- PyObjWrapper aQtModule( PyImport_ImportModule( "SalomePyQt" ) );
- if( !aQtModule ) {
- // Error!
- PyErr_Print();
- return;
- }
-
- if ( IsCallOldMethods ) { //__CALL_OLD_METHODS__
- // ... then get workspace object
- QWidget* aWorkspace = 0;
- if ( getApp()->desktop()->inherits( "STD_MDIDesktop" ) ) {
- STD_MDIDesktop* aDesktop = dynamic_cast<STD_MDIDesktop*>( getApp()->desktop() );
- if ( aDesktop )
- aWorkspace = aDesktop->workspace();
- }
- else if ( getApp()->desktop()->inherits( "STD_TabDesktop" ) ) {
- STD_TabDesktop* aDesktop = dynamic_cast<STD_TabDesktop*>( getApp()->desktop() );
- if ( aDesktop )
- aWorkspace = aDesktop->workstack();
- }
- PyObjWrapper pyws( sipBuildResult( 0, "M", aWorkspace, sipClass_QWidget ) );
- // ... and finally call Python module's setWorkspace() method (obsolete)
- if ( PyObject_HasAttrString(myModule , "setWorkSpace") ) {
- PyObjWrapper res( PyObject_CallMethod( myModule, "setWorkSpace", "O", pyws.get() ) );
- if( !res ) {
- PyErr_Print();
- }
- }
- } //__CALL_OLD_METHODS__
-}
-
-/*!
- * Preference changing callback function
- * - calls Python module's preferenceChanged(string,string,string) method
- */
-void SALOME_PYQT_Module::prefChanged( const QString& section, const QString& setting )
-{
- // Python interpreter should be initialized and Python module should be
- // import first
- if ( !myInterp || !myModule )
- return;
-
- if ( PyObject_HasAttrString(myModule , "preferenceChanged") ) {
- PyObjWrapper res( PyObject_CallMethod( myModule,
- "preferenceChanged",
- "ss",
- section.latin1(),
- setting.latin1() ) );
- if( !res ) {
- PyErr_Print();
- }
- }
-}
-
-/*!
- * Returns default menu group
- */
-int SALOME_PYQT_Module::defaultMenuGroup()
-{
- return __DEFAULT_GROUP__;
-}
-
-/*!
- * The next methods call the parent implementation.
- * This is done to open protected methods from CAM_Module class.
- * Also these methods are used to register created from outside menus
- * in order to enable dynamic menus handling.
- */
-
-
-/*! Create tool bar with name \a name, if it was't created before.
- * \retval -1 - if tool manager was't be created.
- */
-int SALOME_PYQT_Module::createTool( const QString& name )
-{
- return SalomeApp_Module::createTool( name );
-}
-/*! Create tool.
- * Insert QAction with id \a id from action map(myActionMap) to tool manager.
- *\param id - integer
- *\param tBar - integer
- *\param idx - integer
- *\retval integer id of new action in tool manager.
- *\retval Return -1 if something wrong.
- */
-int SALOME_PYQT_Module::createTool( const int id, const int tBar, const int idx )
-{
- return SalomeApp_Module::createTool( id, tBar, idx );
-}
-/*! Create tool.
- * Insert QAction with id \a id from action map(myActionMap) to tool manager.
- *\param id - integer
- *\param tBar - QString&
- *\param idx - integer
- *\retval integer id of new action in tool manager.
- *\retval Return -1 if something wrong.
- */
-int SALOME_PYQT_Module::createTool( const int id, const QString& tBar, const int idx )
-{
- return SalomeApp_Module::createTool( id, tBar, idx );
-}
-/*! Create tool. Register action \a a with id \a id.
- * Insert QAction to tool manager.
- *\param a - QAction
- *\param tBar - integer
- *\param id - integer
- *\param idx - integer
- *\retval integer id of new action in tool manager.
- *\retval Return -1 if something wrong.
- */
-int SALOME_PYQT_Module::createTool( QAction* a, const int tBar, const int id, const int idx )
-{
- return SalomeApp_Module::createTool( a, tBar, id, idx );
-}
-/*! Create tool. Register action \a a with id \a id.
- * Insert QAction to tool manager.
- *\param a - QAction
- *\param tBar - QString&
- *\param id - integer
- *\param idx - integer
- *\retval integer id of new action in tool manager.
- *\retval Return -1 if something wrong.
- */
-int SALOME_PYQT_Module::createTool( QAction* a, const QString& tBar, const int id, const int idx )
-{
- return SalomeApp_Module::createTool( a, tBar, id, idx );
-}
-
-int SALOME_PYQT_Module::createMenu( const QString& subMenu, const int menu, const int id, const int group, const int idx, const bool constantMenu )
-{
- bool exists = hasMenu( subMenu, menu );
- int regId = SalomeApp_Module::createMenu( subMenu, menu, id, group, idx, true );
- if ( !exists )
- registerMenu( regId, menu, constantMenu );
- return regId;
-}
-
-int SALOME_PYQT_Module::createMenu( const QString& subMenu, const QString& menu, const int id, const int group, const int idx, const bool constantMenu )
-{
- QStringList menus = QStringList::split( "|", menu, false );
- int pid = -1;
- for (int i = 0; i < menus.count(); i++ ) {
- pid = createMenu( menus[i], pid, -1, -1, -1, constantMenu );
- if ( pid == -1 ) break;
- }
- if ( pid != -1 )
- pid = createMenu( subMenu, pid, id, group, idx, constantMenu );
- return pid;
-}
-
-int SALOME_PYQT_Module::createMenu( const int id, const int menu, const int group, const int idx, const bool constantMenu )
-{
- int regId = SalomeApp_Module::createMenu( id, menu, group, idx );
- if ( regId != -1 )
- registerMenu( regId, menu, constantMenu );
- return regId;
-}
-
-int SALOME_PYQT_Module::createMenu( const int id, const QString& menu, const int group, const int idx, const bool constantMenu )
-{
- QStringList menus = QStringList::split( "|", menu, false );
- int pid = -1;
- for (int i = 0; i < menus.count(); i++ ) {
- pid = createMenu( menus[i], pid, -1, -1, -1, constantMenu );
- if ( pid == -1 ) break;
- }
- if ( pid != -1 )
- pid = createMenu( id, pid, group, idx, constantMenu );
- return pid;
-}
-
-int SALOME_PYQT_Module::createMenu( QAction* a, const int menu, const int id, const int group, const int idx, const bool constantMenu )
-{
- int regId = SalomeApp_Module::createMenu( a, menu, id, group, idx );
- if ( regId != -1 )
- registerMenu( regId, menu, constantMenu );
- return regId;
-}
-
-int SALOME_PYQT_Module::createMenu( QAction* a, const QString& menu, const int id, const int group, const int idx, const bool constantMenu )
-{
- QStringList menus = QStringList::split( "|", menu, false );
- int pid = -1;
- for (int i = 0; i < menus.count(); i++ ) {
- pid = createMenu( menus[i], pid, -1, -1, -1, constantMenu );
- if ( pid == -1 ) break;
- }
- if ( pid != -1 )
- pid = createMenu( a, pid, id, group, idx, constantMenu );
- return pid;
-}
-
-QAction* SALOME_PYQT_Module::createSeparator()
-{
- return SalomeApp_Module::separator();
-}
-
-QAction* SALOME_PYQT_Module::action( const int id ) const
-{
- return SalomeApp_Module::action( id );
-}
-
-int SALOME_PYQT_Module::actionId( const QAction* a ) const
-{
- return SalomeApp_Module::actionId( a );
-}
-
-QAction* SALOME_PYQT_Module::createAction( const int id, const QString& text, const QString& icon,
- const QString& menu, const QString& tip, const int key,
- const bool toggle )
-{
- QIconSet anIcon = loadIcon( icon );
- QAction* a = action( id );
- if ( a ) {
- if ( a->text().isEmpty() && !text.isEmpty() ) a->setText( text );
- if ( a->menuText().isEmpty() && !menu.isEmpty() ) a->setMenuText( menu );
- if ( a->iconSet().isNull() && !anIcon.isNull() ) a->setIconSet( anIcon );
- if ( a->statusTip().isEmpty() && !tip.isNull() ) a->setStatusTip( tip );
- if ( a->accel().isEmpty() && key ) a->setAccel( key );
- if ( a->isToggleAction() != toggle ) a->setToggleAction( toggle );
- disconnect( a, SIGNAL( activated() ), this, SLOT( onGUIEvent() ) );
- connect( a, SIGNAL( activated() ), this, SLOT( onGUIEvent() ) );
- }
- else {
- a = SalomeApp_Module::createAction( id, text, anIcon, menu, tip, key, getApp()->desktop(), toggle, this, SLOT( onGUIEvent() ) );
- }
- return a;
-}
-
-/*!
- * Load icon from resource file
- */
-QIconSet SALOME_PYQT_Module::loadIcon( const QString& fileName )
-{
- QIconSet anIcon;
- if ( !fileName.isEmpty() ) {
- QPixmap pixmap = getApp()->resourceMgr()->loadPixmap( name(""), tr( fileName ) );
- if ( !pixmap.isNull() )
- anIcon = QIconSet( pixmap );
- }
- return anIcon;
-}
-
-/*!
- * Returns TRUE if menu already exists
- */
-bool SALOME_PYQT_Module::hasMenu( const QString& subMenu, const int menu )
-{
- return menuMgr() && menuMgr()->containsMenu( subMenu, menu );
-}
-
-/*!
- * Register the menu
- */
-void SALOME_PYQT_Module::registerMenu( const int id, const int menu, const bool constantMenu )
-{
- QAction* a = action( id );
- QAction* s = separator();
- if ( a && a == s )
- return;
- if ( !registered( id, menu ) )
- myMenus[menu].append( MenuId( id, constantMenu ) );
-}
-
-/*!
- * Unregister the menu
- */
-void SALOME_PYQT_Module::unregisterMenu( const int id, const int menu )
-{
- if ( myMenus.find( menu ) != myMenus.end() ) {
- MenuIdList::iterator lit;
- for ( lit = myMenus[menu].begin(); lit != myMenus[menu].end(); ++lit ) {
- if ( (*lit).id == id ) {
- myMenus[menu].remove( lit );
- return;
- }
- }
- }
-}
-
-/*!
- * Returns TRUE if the menu is registered
- */
-bool SALOME_PYQT_Module::registered( const int id, const int menu )
-{
- MenuMap::iterator mit;
- for ( mit = myMenus.begin(); mit != myMenus.end(); ++mit ) {
- MenuIdList::iterator lit;
- for ( lit = mit.data().begin(); lit != mit.data().end(); ++lit ) {
- if ( (*lit).id == id && ( menu == 0 || mit.key() == menu ) )
- return true;
- }
- }
- return false;
-}
-
-/*!
- * Returns TRUE if the menu is constant (not removed by clearMenu()).
- * This concerns the menus which are created from XML files.
- */
-bool SALOME_PYQT_Module::isConstantMenu( const int id, const int menu )
-{
- if ( myMenus.find( menu ) != myMenus.end() ) {
- MenuIdList& l = myMenus[ menu ];
- MenuIdList::iterator lit;
- for ( lit = l.begin(); lit != l.end(); ++lit ) {
- if ( (*lit).id == id && (*lit).constantMenu )
- return true;
- }
- }
- return false;
-}
-
-/*!
- * Displays/hides the module's menus.
- */
-void SALOME_PYQT_Module::setMenuShown( const bool show )
-{
- QtxActionMenuMgr* mMgr = menuMgr();
- if ( !mMgr )
- return;
-
- bool upd = mMgr->isUpdatesEnabled();
- mMgr->setUpdatesEnabled( false );
-
- SalomeApp_Module::setMenuShown( show );
-
- for ( MenuMap::iterator mit = myMenus.begin(); mit != myMenus.end(); ++mit ) {
- MenuIdList::iterator lit;
- for ( lit = mit.data().begin(); lit != mit.data().end(); ++lit )
- if ( !action( (*lit).id ) )
- mMgr->setShown( (*lit).id, show );
- }
-
- mMgr->setUpdatesEnabled( upd );
- if ( upd )
- mMgr->update();
-}
-
-/*!
- * Displays/hides the module's toolbars.
- */
-void SALOME_PYQT_Module::setToolShown( const bool show )
-{
- SalomeApp_Module::setToolShown( show );
-}
-
-/*!
- * Clears the given menu.
- * If <id> = 0 : clear all items in the <menu> menu
- * If <menu> = 0 : clear all menus recursively starting from top-level.
- * If <removeActions> = 0 : also unregister all removed actions (not delete!).
- */
-bool SALOME_PYQT_Module::clearMenu( const int id, const int menu, const bool removeActions )
-{
- QAction* a = action( id );
- QAction* s = separator();
- typedef QValueList<int> IntList;
- if ( a && a != s ) {
- // action
- IntList menus;
- if ( menu != 0 ) {
- if ( registered( id, menu ) ) menus.append( menu );
- }
- else {
- MenuMap::iterator mit;
- for ( mit = myMenus.begin(); mit != myMenus.end(); ++mit )
- if ( registered( id, mit.key() ) ) menus.append( mit.key() );
- }
- for ( int i = 0; i < menus.count(); i++ ) {
- if ( !isConstantMenu( id, menus[i] ) ) {
- menuMgr()->remove( menuMgr()->actionId( a ), menus[ i ] );
- unregisterMenu( id, menus[i] );
- }
- }
- if ( !registered( id ) && removeActions )
- unregisterAction( id );
- }
- else {
- // menu
- if ( id == 0 ) {
- if ( menu == 0 ) {
- // clear all menus recursively starting from top-level (main menu)
- IntList l = myMenus.keys();
- IntList::iterator lit;
- for ( lit = l.begin(); lit != l.end(); ++lit )
- clearMenu( 0, *lit, removeActions );
- }
- else {
- if ( myMenus.find( menu ) != myMenus.end() ) {
- // remove all items in the parent menu
- IntList l;
- MenuIdList::iterator lit;
- for ( lit = myMenus[menu].begin(); lit != myMenus[menu].end(); ++lit )
- l.append( (*lit).id );
- for ( int i = 0; i < l.count(); i++ )
- clearMenu( l[i], menu, removeActions );
- if ( myMenus[menu].empty() )
- myMenus.remove( menu );
- }
- }
- }
- else {
- MenuMap::iterator mit;
- for ( mit = myMenus.begin(); mit != myMenus.end(); ++mit ) {
- MenuIdList::iterator lit;
- for ( lit = mit.data().begin(); lit != mit.data().end(); ++lit ) {
- if ( (*lit).id == id && ( menu == 0 || mit.key() == menu ) ) {
- clearMenu( 0, id, removeActions ); // first remove all sub-menus
- if ( !isConstantMenu( id, mit.key() ) ) {
- menuMgr()->remove( id, mit.key() );
- mit.data().remove( lit );
- break;
- }
- }
- }
- }
- }
- }
- return false;
-}
-
-/*!
- * The next methods call the parent implementation.
- * This is done to open protected methods from LightApp_Module class.
- */
-
-int SALOME_PYQT_Module::addGlobalPreference( const QString& label )
-{
- LightApp_Preferences* pref = preferences();
- if ( !pref )
- return -1;
-
- return pref->addPreference( label, -1 );
-}
-
-int SALOME_PYQT_Module::addPreference( const QString& label )
-{
- return SalomeApp_Module::addPreference( label );
-}
-
-int SALOME_PYQT_Module::addPreference( const QString& label,
- const int pId, const int type,
- const QString& section,
- const QString& param )
-{
- return SalomeApp_Module::addPreference( label, pId, type, section, param );
-}
-
-QVariant SALOME_PYQT_Module::preferenceProperty( const int id,
- const QString& prop ) const
-{
- QVariant v = SalomeApp_Module::preferenceProperty( id, prop );
- return v;
-}
-
-void SALOME_PYQT_Module::setPreferenceProperty( const int id,
- const QString& prop,
- const QVariant& var )
-{
- SalomeApp_Module::setPreferenceProperty( id, prop, var );
-}
-
-// SALOME_PYQT_XmlHandler class implementation
-
-// gets an tag name for the dom element [ static ]
-// returns an empty string if the element does not have tag name
-static QString tagName( const QDomElement& element ) {
- return element.tagName().stripWhiteSpace();
-}
-
-// gets an attribute by it's name for the dom element [ static ]
-// returns an empty string if the element does not have such attribute
-static QString attribute( const QDomElement& element, const QString& attName ) {
- return element.attribute( attName ).stripWhiteSpace();
-}
-
-// checks the given value for the boolean value [ static ]
-// returns TRUE if string represents boolean value:
-// - "true", "yes" or "1" for true
-// - "false", "no" or "0" for false
-// second parameter allows to check certain boolean value
-// - 1: true
-// - 0: false
-// - other value is not taken into account
-static bool checkBool( const QString& value, const int check = -1 ) {
- QString v = value.lower();
- if ( ( v == "true" || v == "yes" || v == "1" ) && ( check != 0 ) )
- return true;
- if ( ( v == "false" || v == "no" || v == "0" ) && ( check != 1 ) )
- return true;
- return false;
-}
-
-// checks the given value for the integer value [ static ]
-// returns -1 if item is empty or presents and invalid number
-static int checkInt( const QString& value, const int def = -1, const int shift = -1 )
-{
- bool bOk;
- int val = value.toInt( &bOk );
- if ( !bOk ) val = def;
- if ( shift > 0 && bOk && val < 0 )
- val += shift;
- return val;
-}
-
-/*!
- * Constructor
- */
-SALOME_PYQT_XmlHandler::SALOME_PYQT_XmlHandler( SALOME_PYQT_Module* module,
- const QString& fileName )
- : myModule( module ),
- myMenuCreated( false )
-{
- if (fileName.isEmpty() )
- return;
- QFile aFile( fileName );
- if ( !aFile.open( IO_ReadOnly ) )
- return;
- if ( !myDoc.setContent( &aFile ) ) {
- aFile.close();
- return;
- }
- aFile.close();
-}
-
-/*!
- * Called by SALOME_PYQT_Module::activate() in order to create actions
- * (menus, toolbars, popup menus)
- */
-void SALOME_PYQT_XmlHandler::createActions()
-{
- // check flag : are menus already created?
- if ( myMenuCreated && !IsCallOldMethods )
- return;
-
- // get document element
- QDomElement aDocElem = myDoc.documentElement();
-
- // create main menu actions
- QDomNodeList aMenuList = aDocElem.elementsByTagName( "menu-item" );
- for ( int i = 0; i < aMenuList.count(); i++ ) {
- QDomNode n = aMenuList.item( i );
- createMenu( n );
- }
-
- // create toolbars actions
- QDomNodeList aToolsList = aDocElem.elementsByTagName( "toolbar" );
- for ( int i = 0; i < aToolsList.count(); i++ ) {
- QDomNode n = aToolsList.item( i );
- createToolBar( n );
- }
- // set flag : menus are already created
- myMenuCreated = true;
-}
-
-/*!
- * Called by SALOME_PYQT_Module::deactivate() in order to remove actions
- * (menus, toolbars, popup menus)
- */
-void SALOME_PYQT_XmlHandler::clearActions()
-{
- for ( uint i = 0; i < myMenuItems.count(); i++ ) {
- QMenuData* md = dynamic_cast<QMenuData*>( myModule->getApp()->desktop()->menuBar() );
- QStringList menus = QStringList::split( ":", myMenuItems[ i ] );
- for ( uint j = 0; j < menus.count(); j++) {
- int id = menus[ j ].toInt();
- QMenuData* smd;
- QMenuItem* mi = md->findItem( id, &smd );
- if ( mi && md == smd ) {
- if ( j == menus.count()-1 || !mi->popup() ) { // last item or not popup
- md->removeItem( id );
- break;
- }
- else if ( mi->popup() )
- md = dynamic_cast<QMenuData*>( mi->popup() );
- }
- else
- break;
- }
- }
- myMenuItems.clear();
-}
-
-/*!
- * Creates popup menu
- */
-void SALOME_PYQT_XmlHandler::createPopup( QPopupMenu* menu,
- const QString& context,
- const QString& parent,
- const QString& object )
-{
- // get document element
- QDomElement aDocElem = myDoc.documentElement();
-
- // get popup menus actions
- QDomNodeList aPopupList = aDocElem.elementsByTagName( "popupmenu" );
- for ( int i = 0; i < aPopupList.count(); i++ ) {
- QDomNode n = aPopupList.item( i );
- if ( !n.isNull() && n.isElement() ) {
- QDomElement e = n.toElement();
- QString lab = attribute( e, "label-id" );
- QString ctx = attribute( e, "context-id" );
- QString prt = attribute( e, "parent-id" );
- QString obj = attribute( e, "object-id" );
- if ( ctx == context && prt == parent && obj == object ) {
- insertPopupItems( n, menu );
- break;
- }
- }
- }
-}
-
-/*!
- Create main menu with child actions
- */
-void SALOME_PYQT_XmlHandler::createMenu( QDomNode& parentNode,
- const int parentMenuId,
- QPopupMenu* parentPopup )
-{
- if ( !myModule )
- return;
-
- if ( parentNode.isNull() )
- return;
-
- QDomElement parentElement = parentNode.toElement();
- if ( !parentElement.isNull() ) {
- QString plabel = attribute( parentElement, "label-id" );
- int pid = checkInt( attribute( parentElement, "item-id" ) );
- int ppos = checkInt( attribute( parentElement, "pos-id" ) );
- int group = checkInt( attribute( parentElement, "group-id" ),
- myModule->defaultMenuGroup() );
- if ( !plabel.isEmpty() ) {
- QPopupMenu* popup = 0;
- int menuId = -1;
- // create menu
- if ( IsCallOldMethods ) { // __CALL_OLD_METHODS__
- SUIT_Desktop* desktop = myModule->getApp()->desktop();
- if ( parentMenuId == -1 ) { // top-level menu
- QMenuBar* mb = desktop->menuBar();
- QMenuItem* mi = mb->findItem( pid );
- if ( mi ) popup = mi->popup();
- if ( !popup ) {
- popup = new QPopupMenu( desktop );
- ppos = checkInt( attribute( parentElement, "pos-id" ), -1, mb->count() );
- menuId = mb->insertItem( plabel, popup, pid, ppos );
- myCurrentMenu.push_back( QString::number( menuId ) );
- myMenuItems.append( myCurrentMenu.join( ":" ) );
- }
- else {
- menuId = pid;
- myCurrentMenu.push_back( QString::number( menuId ) );
- }
- }
- else {
- // parentPopup should not be 0 here!
- QMenuItem* mi = parentPopup->findItem( pid );
- if ( mi ) popup = mi->popup();
- if ( !popup ) {
- popup = new QPopupMenu( desktop );
- ppos = checkInt( attribute( parentElement, "pos-id" ), -1, popup->count() );
- menuId = parentPopup->insertItem( plabel, popup, pid, ppos );
- myCurrentMenu.push_back( QString::number( menuId ) );
- myMenuItems.append( myCurrentMenu.join( ":" ) );
- }
- else {
- menuId = pid;
- myCurrentMenu.push_back( QString::number( menuId ) );
- }
- }
- }
- else { //!__CALL_OLD_METHODS__
- menuId = myModule->createMenu( plabel, // label
- parentMenuId, // parent menu ID, should be -1 for main menu
- pid, // ID
- group, // group ID
- ppos, // position
- true ); // create constant menu (not removed by clearMenu())
- } // __CALL_OLD_METHODS__
- QDomNode node = parentNode.firstChild();
- while ( !node.isNull() ) {
- if ( node.isElement() ) {
- QDomElement elem = node.toElement();
- QString aTagName = tagName( elem );
- if ( aTagName == "popup-item" ) {
- int id = checkInt( attribute( elem, "item-id" ) );
- int pos = checkInt( attribute( elem, "pos-id" ) );
- int group = checkInt( attribute( elem, "group-id" ),
- myModule->defaultMenuGroup() );
- QString label = attribute( elem, "label-id" );
- QString icon = attribute( elem, "icon-id" );
- QString tooltip = attribute( elem, "tooltip-id" );
- QString accel = attribute( elem, "accel-id" );
- bool toggle = checkBool( attribute( elem, "toggle-id" ) );
- ////QString execute = attribute( elem, "execute-action" ); // not used
-
- // -1 action ID is not allowed : it means that <item-id> attribute is missed in the XML file!
- // also check if the action with given ID is already created
- if ( id != -1 ) {
- if ( IsCallOldMethods ) { // __CALL_OLD_METHODS__
- QIconSet iconSet = myModule->loadIcon( icon );
- pos = checkInt( attribute( elem, "pos-id" ), -1, popup->count() );
- int aid = iconSet.isNull() ? popup->insertItem( label,
- myModule,
- SLOT( onGUIEvent(int) ),
- QKeySequence( accel ),
- id,
- pos ) :
- popup->insertItem( iconSet,
- label,
- myModule,
- SLOT( onGUIEvent(int) ),
- QKeySequence( accel ),
- id,
- pos );
- myCurrentMenu.push_back( QString::number( aid ) );
- myMenuItems.append( myCurrentMenu.join( ":" ) );
- myCurrentMenu.pop_back();
- if ( toggle )
- popup->setItemChecked( aid, checkBool( attribute( elem, "toggle-id" ), 1 ) );
- }
- else { //!__CALL_OLD_METHODS__
- // create menu action
- QAction* action = myModule->createAction( id, // ID
- tooltip, // tooltip
- icon, // icon
- label, // menu text
- tooltip, // status-bar text
- QKeySequence( accel ), // keyboard accelerator
- toggle ); // toogled action
- myModule->createMenu( action, // action
- menuId, // parent menu ID
- id, // ID (same as for createAction())
- group, // group ID
- pos, // position
- true ); // create constant menu (not removed by clearMenu())
- } // __CALL_OLD_METHODS__
- }
- }
- else if ( aTagName == "submenu" ) {
- // create sub-menu
- createMenu( node, menuId, popup );
- }
- else if ( aTagName == "separator" ) {
- // create menu separator
- int id = checkInt( attribute( elem, "item-id" ) ); // separator can have ID
- int pos = checkInt( attribute( elem, "pos-id" ) );
- int group = checkInt( attribute( elem, "group-id" ),
- myModule->defaultMenuGroup() );
- if ( IsCallOldMethods ) { // __CALL_OLD_METHODS__
- pos = checkInt( attribute( elem, "pos-id" ), -1, popup->count() );
- int sid = popup->insertSeparator( pos );
- myCurrentMenu.push_back( QString::number( sid ) );
- myMenuItems.append( myCurrentMenu.join( ":" ) );
- myCurrentMenu.pop_back();
- }
- else { //!__CALL_OLD_METHODS__
- QAction* action = myModule->createSeparator();
- myModule->createMenu( action, // separator action
- menuId, // parent menu ID
- id, // ID
- group, // group ID
- pos, // position
- true ); // create constant menu (not removed by clearMenu())
- } // __CALL_OLD_METHODS__
- }
- }
- node = node.nextSibling();
- }
- myCurrentMenu.pop_back();
- }
- }
-}
-
-/*!
- Create a toolbar with child actions
- */
-void SALOME_PYQT_XmlHandler::createToolBar( QDomNode& parentNode )
-{
- if ( !myModule )
- return;
-
- if ( parentNode.isNull() )
- return;
-
- QDomElement parentElement = parentNode.toElement();
- if ( !parentElement.isNull() ) {
- QString aLabel = attribute( parentElement, "label-id" );
- if ( !aLabel.isEmpty() ) {
- // create toolbar
- int tbId = myModule->createTool( aLabel );
- QDomNode node = parentNode.firstChild();
- while ( !node.isNull() ) {
- if ( node.isElement() ) {
- QDomElement elem = node.toElement();
- QString aTagName = tagName( elem );
- if ( aTagName == "toolbutton-item" ) {
- int id = checkInt( attribute( elem, "item-id" ) );
- int pos = checkInt( attribute( elem, "pos-id" ) );
- QString label = attribute( elem, "label-id" );
- QString icon = attribute( elem, "icon-id" );
- QString tooltip = attribute( elem, "tooltip-id" );
- QString accel = attribute( elem, "accel-id" );
- bool toggle = checkBool( attribute( elem, "toggle-id" ) );
- ////QString execute = attribute( elem, "execute-action" ); // not used
-
- // -1 action ID is not allowed : it means that <item-id> attribute is missed in the XML file!
- // also check if the action with given ID is already created
- if ( id != -1 ) {
- // create toolbar action
- QAction* action = myModule->createAction( id, // ID
- tooltip, // tooltip
- icon, // icon
- label, // menu text
- tooltip, // status-bar text
- QKeySequence( accel ), // keyboard accelerator
- toggle ); // toogled action
- myModule->createTool( action, tbId, -1, pos );
- }
- }
- else if ( aTagName == "separatorTB" || aTagName == "separator" ) {
- // create toolbar separator
- int pos = checkInt( attribute( elem, "pos-id" ) );
- QAction* action = myModule->createSeparator();
- myModule->createTool( action, tbId, -1, pos );
- }
- }
- node = node.nextSibling();
- }
- }
- }
-}
-
-/*!
- * Fill popup menu with items
- */
-void SALOME_PYQT_XmlHandler::insertPopupItems( QDomNode& parentNode, QPopupMenu* menu )
-{
- if ( !myModule )
- return;
-
- if ( parentNode.isNull() )
- return;
-
- // we create popup menus without help of QtxPopupMgr
- QDomNode node = parentNode.firstChild();
- while ( !node.isNull() ) {
- if ( node.isElement() ) {
- QDomElement elem = node.toElement();
- QString aTagName = tagName( elem );
- if ( aTagName == "popup-item" ) {
- // insert a command item
- int id = checkInt( attribute( elem, "item-id" ) );
- int pos = checkInt( attribute( elem, "pos-id" ) );
- QString label = attribute( elem, "label-id" );
- QString icon = attribute( elem, "icon-id" );
- /////QString tooltip = attribute( elem, "tooltip-id" ); // not used
- QString accel = attribute( elem, "accel-id" );
- /////bool toggle = checkBool( attribute( elem, "toggle-id" ) ); // not used
- /////QString execute = attribute( elem, "execute-action" ); // not used
-
- QIconSet anIcon;
- if ( !icon.isEmpty() ) {
- QPixmap pixmap = myModule->getApp()->resourceMgr()->loadPixmap( myModule->name(""), icon );
- if ( !pixmap.isNull() )
- anIcon = QIconSet( pixmap );
- }
-
- // -1 action ID is not allowed : it means that <item-id> attribute is missed in the XML file!
- // also check if the action with given ID is already created
- if ( id != -1 ) {
- menu->insertItem( anIcon, label, myModule, SLOT( onGUIEvent(int) ), QKeySequence( accel ), id, pos );
- }
- }
- else if ( aTagName == "submenu" ) {
- // create sub-menu
- int id = checkInt( attribute( elem, "item-id" ) );
- int pos = checkInt( attribute( elem, "pos-id" ) );
- QString label = attribute( elem, "label-id" );
- QString icon = attribute( elem, "icon-id" );
-
- QIconSet anIcon;
- if ( !icon.isEmpty() ) {
- QPixmap pixmap = myModule->getApp()->resourceMgr()->loadPixmap( myModule->name(""), icon );
- if ( !pixmap.isNull() )
- anIcon = QIconSet( pixmap );
- }
-
- QPopupMenu* newPopup = new QPopupMenu( menu, label );
- menu->insertItem( anIcon, label, newPopup, id, pos );
- insertPopupItems( node, newPopup );
- }
- else if ( aTagName == "separator" ) {
- // create menu separator
- int pos = checkInt( attribute( elem, "pos-id" ) );
- menu->insertSeparator( pos );
- }
- }
- node = node.nextSibling();
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOME_PYQT_MODULE_H
-#define SALOME_PYQT_MODULE_H
-
-#include "SALOME_PYQT_GUI.h"
-
-#include "SALOME_PYQT_PyInterp.h" // this include must be first (see PyInterp_base.h)!
-#include "SalomeApp_Module.h"
-#include <map>
-#include <qaction.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qmap.h>
-
-#include <SALOMEconfig.h>
-#include CORBA_CLIENT_HEADER(SALOME_Component)
-
-class SALOME_PYQT_XmlHandler;
-
-class SALOME_PYQT_EXPORT SALOME_PYQT_Module: public SalomeApp_Module
-{
- Q_OBJECT;
-
- /******************************
- * Data
- ******************************/
-
-private:
- typedef std::map<int, SALOME_PYQT_PyInterp*> InterpMap;
-
- /* study-to-subinterpreter map */
- static InterpMap myInterpMap;
- /* current Python subinterpreter */
- SALOME_PYQT_PyInterp* myInterp;
- /* Python GUI module loaded */
- PyObjWrapper myModule;
- /* Python GUI being initialized (not zero only during the initialization)*/
- static SALOME_PYQT_Module* myInitModule;
-
- /* own menus list */
- struct MenuId
- {
- int id;
- bool constantMenu;
- MenuId() : id( -1 ), constantMenu( false ) {}
- MenuId( const int _id, const bool _constantMenu )
- : id( _id ), constantMenu( _constantMenu ) {}
- };
- typedef QValueList<MenuId> MenuIdList;
- typedef QMap<int,MenuIdList> MenuMap;
- MenuMap myMenus;
-
- /* XML resource file parser */
- SALOME_PYQT_XmlHandler* myXmlHandler;
- /* windows map*/
- QMap<int, int> myWindowsMap;
- /* compatible view managers list */
- QStringList myViewMgrList;
-
- /* status of last trying of module activation*/
- bool myLastActivateStatus;
-
- /******************************
- * Construction/destruction
- ******************************/
-
-public:
- /* constructor */
- SALOME_PYQT_Module();
- /* destructor */
- ~SALOME_PYQT_Module();
-
- /* get module engine */
- Engines::Component_var getEngine() const;
-
- /******************************
- * Inherited from SalomeApp_Module
- ******************************/
-
-public:
- /* little trick : provide an access to being activated Python module from outside;
- needed by the SalomePyQt library :(
- */
- static SALOME_PYQT_Module* getInitModule();
-
- /* initialization */
- void initialize ( CAM_Application* );
-
- /* getting windows list */
- void windows ( QMap<int, int>& ) const;
- /* getting compatible viewer managers list */
- void viewManagers( QStringList& ) const;
-
- /* context popup menu request */
- void contextMenuPopup( const QString&, QPopupMenu*, QString& );
-
- /* create preferences */
- void createPreferences();
-
- /* get module engine IOR */
- virtual QString engineIOR() const;
-
- /* called when study desktop is activated */
- virtual void studyActivated();
-
- /* returns default menu group */
- static int defaultMenuGroup();
-
- /* working with toolbars : open protected methods */
- int createTool( const QString& );
- int createTool( const int, const int, const int = -1 );
- int createTool( const int, const QString&, const int = -1 );
- int createTool( QAction*, const int, const int = -1, const int = -1 );
- int createTool( QAction*, const QString&, const int = -1, const int = -1 );
-
- /* working with menus : open protected methods */
- int createMenu( const QString&, const int, const int = -1, const int = -1, const int = -1, const bool = false );
- int createMenu( const QString&, const QString&, const int = -1, const int = -1, const int = -1, const bool = false );
- int createMenu( const int, const int, const int = -1, const int = -1, const bool = false );
- int createMenu( const int, const QString&, const int = -1, const int = -1, const bool = false );
- int createMenu( QAction*, const int, const int = -1, const int = -1, const int = -1, const bool = false );
- int createMenu( QAction*, const QString&, const int = -1, const int = -1, const int = -1, const bool = false );
-
- /* clear given menu */
- bool clearMenu( const int = 0, const int = 0, const bool = true );
-
- /* create separator : open protected method */
- QAction* createSeparator();
-
- /* working with actions : open protected methods */
- QAction* action( const int ) const;
- int actionId( const QAction* ) const;
- QAction* createAction( const int, const QString&, const QString&, const QString&,
- const QString&, const int, const bool = false );
- /* load icon from resource file */
- QIconSet loadIcon( const QString& fileName );
-
- /* working with preferences : open protected methods */
- int addGlobalPreference( const QString& );
- int addPreference( const QString& );
- int addPreference( const QString&, const int, const int = -1,
- const QString& = QString::null,
- const QString& = QString::null );
- QVariant preferenceProperty( const int, const QString& ) const;
- void setPreferenceProperty( const int, const QString&, const QVariant& );
-
- /* Show/hide menus/toolbars */
- void setMenuShown( const bool );
- void setToolShown( const bool );
-
- /* Preferences changing (module) */
- void preferencesChanged( const QString&, const QString& );
-
-public slots:
- /* activation */
- virtual bool activateModule( SUIT_Study* );
- /* deactivation */
- virtual bool deactivateModule( SUIT_Study* );
-
- /* Preferences changing (application) */
- void preferenceChanged( const QString&, const QString&, const QString& );
-
- /******************************
- * Internal methods
- ******************************/
-
-public slots:
- /* GUI action processing slots */
- void onGUIEvent();
- void onGUIEvent( int );
-
-protected:
- /* Menu processing */
- bool hasMenu( const QString&, const int );
- void registerMenu( const int, const int, const bool = false );
- void unregisterMenu( const int, const int );
- bool registered( const int, const int = 0 );
- bool isConstantMenu( const int, const int );
-
-protected slots:
- void onMenuHighlighted( int, int );
-
-private:
- /* internal initizalition */
- void init ( CAM_Application* );
- /* internal activation */
- void activate ( SUIT_Study* );
-
- /* getting status of last module activation */
- bool lastActivationStatus() const;
-
- /* internal deactivation */
- void deactivate ( SUIT_Study* );
- /* customization */
- void customize ( SUIT_Study* );
- /* study activation */
- void studyChanged( SUIT_Study* );
- /* context popup menu processing */
- void contextMenu( const QString&, QPopupMenu* );
- /* GUI event processing */
- void guiEvent( const int );
- /* Menu highlight processing */
- void menuHighlight( const int, const int );
- /* Init preferences */
- void initPreferences();
-
- /* initialize a Python subinterpreter */
- void initInterp ( int );
- /* import a Python GUI module */
- void importModule();
- /* set workspace to Python GUI module */
- void setWorkSpace();
-
- /* preferences changing */
- void prefChanged( const QString&, const QString& );
-
- friend class SALOME_PYQT_XmlHandler;
-};
-
-#endif // SALOME_PYQT_MODULE_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// File : SALOME_PYQT_PyInterp.cxx
-// Author : Christian CAREMOLI, Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-
-#include "SALOME_PYQT_PyInterp.h" // this include must be first (see PyInterp_base.h)!
-#include "utilities.h"
-#include "Container_init_python.hxx"
-
-using namespace std;
-
-
-/*!
- * constructor : the main SALOME Python interpreter is used for PyQt GUI.
- * calls initialize method defined in base class, which calls virtual methods
- * initstate & initcontext redefined here
- */
-SALOME_PYQT_PyInterp::SALOME_PYQT_PyInterp(): PyInterp_base()
-{
-}
-
-SALOME_PYQT_PyInterp::~SALOME_PYQT_PyInterp()
-{
-}
-
-bool SALOME_PYQT_PyInterp::initState()
-{
- /*
- * The GIL is assumed to not be held on the call
- * The GIL is acquired in initState and will be held on initState exit
- * It is the caller responsability to release the lock on exit if needed
- */
- SCRUTE(KERNEL_PYTHON::_gtstate);
- _tstate = KERNEL_PYTHON::_gtstate;
- PyEval_AcquireThread(_tstate);
- SCRUTE(_tstate);
- PyEval_ReleaseThread(_tstate);
- return true;
-}
-
-bool SALOME_PYQT_PyInterp::initContext()
-{
- /*
- * The GIL is assumed to be held
- * It is the caller responsability to acquire the GIL before calling initContext
- * It will still be held on initContext exit
- */
- _g = PyDict_New(); // create interpreter dictionnary context
- PyObject *bimod = PyImport_ImportModule("__builtin__");
- PyDict_SetItemString(_g, "__builtins__", bimod);
- Py_DECREF(bimod);
- return true;
-}
-
-int SALOME_PYQT_PyInterp::run(const char *command)
-{
- MESSAGE("compile");
- PyObject *code = Py_CompileString((char *)command,"PyGUI",Py_file_input);
- if(!code){
- // Une erreur s est produite en general SyntaxError
- PyErr_Print();
- return -1;
- }
- //#if PY_VERSION_HEX < 0x02040000 // python version earlier than 2.4.0
- // PyObject *r = PyEval_EvalCode(code,_g,_g);
- //#else
- PyObject *r = PyEval_EvalCode((PyCodeObject *)code,_g,_g);
- //#endif
- Py_DECREF(code);
- if(!r){
- // Une erreur s est produite a l execution
- PyErr_Print();
- return -1 ;
- }
- Py_DECREF(r);
- return 0;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOME_PYQT_PYINTERP_H
-#define SALOME_PYQT_PYINTERP_H
-
-#include "SALOME_PYQT_GUI.h"
-
-#include "PyInterp_base.h" // this include must be first (see PyInterp_base.h)!
-
-class SALOME_PYQT_EXPORT SALOME_PYQT_PyInterp : public PyInterp_base
-{
- public:
- SALOME_PYQT_PyInterp();
- ~SALOME_PYQT_PyInterp();
-
- int run(const char *command);
-
- protected:
- virtual bool initState();
- virtual bool initContext();
-};
-
-#endif // SALOME_PYQT_PYINTERP_H
+++ /dev/null
-#define SIP_VERS_@SIP_VERS@
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Nicolas REJNERI
-# Module : SALOME
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-# Sip flags
-SIP_FLAGS = -t WS_X11 -t $(QT_VERS) $(PYQT_SIPFLAGS) -s ".cc" -c . -I $(PYQT_SIPS)
-
-# Sip common sources
-SIP_SRC = sipSalomePyQtSalomePyQt.cc \
- sipSalomePyQtSALOME_Selection.cc \
- sipSalomePyQtQtxAction.cc
-
-# Sip version-specific sources
-if IS_SIP_V4
-SIP_SRC += sipSalomePyQtcmodule.cc
-else !IS_SIP_V4
-SIP_SRC += SalomePyQtcmodule.cc
-endif
-
-# Sip/moc sources and Sip definition files
-if IS_SIP_V4
-if IS_SIP_NEW
-MOC_SRC =
-MOC_H =
-SIP_FILES = SalomePyQt_v4.sip
-else !IS_SIP_NEW
-MOC_SRC = sipSalomePyQtcmodule_moc.cxx
-MOC_H = sipSalomePyQtcmodule.h
-SIP_FILES = SalomePyQt_v4.sip
-endif
-else !IS_SIP_V4
-SIP_FILES = SalomePyQt.sip
-if IS_SIP_NEW
-MOC_SRC = SalomePyQtcmodule_moc.cxx
-MOC_H = SalomePyQtcmodule.h
-else !IS_SIP_NEW
-MOC_SRC = sipSalomePyQtProxySalomePyQt_moc.cxx
-MOC_H = sipSalomePyQtProxySalomePyQt.h
-endif
-endif
-
-EXTRA_DIST+= SalomePyQt.sip SalomePyQt_v4.sip
-
-# Libraries targets
-MOC_FILES= SalomePyQt_moc.cxx
-
-COMMON_CPP_FLAGS=$(QT_INCLUDES) $(SIP_INCLUDES) $(PYTHON_INCLUDES) \
- $(CAS_CPPFLAGS) $(VTK_INCLUDES) $(OGL_INCLUDES) $(BOOST_CPPFLAGS) \
- -DHAVE_CONFIG_H @KERNEL_CXXFLAGS@ -I$(top_builddir)/salomeadn/unix \
- -I$(top_builddir)/idl \
- -I$(srcdir)/../../SUIT -I$(srcdir)/../../CAM -I$(srcdir)/../../STD \
- -I$(srcdir)/../../Qtx -I$(srcdir)/../../SalomeApp -I$(srcdir)/../../Event \
- -I$(srcdir)/../../SalomeSession -I$(srcdir)/../../LogWindow \
- -I$(srcdir)/../../VTKViewer -I$(srcdir)/../../TOOLSGUI \
- -I$(srcdir)/../SALOME_PYQT_GUI -I$(srcdir)/../../PyInterp \
- -I$(srcdir)/../../LightApp -I$(srcdir)/../../ObjBrowser \
- -I$(srcdir)/../../OBJECT \
- -I$(top_builddir)/salome_adm/unix @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
-
-COMMON_LIBS=$(PYTHON_LIBS) $(SIP_LIBS) $(PYQT_LIBS) $(VTK_LIBS) \
- $(OGL_LIBS) ../../SUIT/libsuit.la ../../CAM/libCAM.la ../../STD/libstd.la \
- ../../Qtx/libqtx.la ../../SalomeApp/libSalomeApp.la ../../Event/libEvent.la \
- ../../Session/libSalomeSession.la ../../LogWindow/libLogWindow.la \
- ../../VTKViewer/libVTKViewer.la ../../TOOLSGUI/libToolsGUI.la \
- ../SALOME_PYQT_GUI/libSalomePyQtGUI.la
-
-if IS_SIP_V4
-
-lib_LTLIBRARIES = libSalomePyQt.la
-dist_libSalomePyQt_la_SOURCES= SalomePyQt.cxx
-nodist_libSalomePyQt_la_SOURCES= $(MOC_FILES) $(SIP_SRC) $(MOC_SRC)
-libSalomePyQt_la_CPPFLAGS = $(COMMON_CPP_FLAGS)
-libSalomePyQt_la_LIBADD = $(COMMON_LIBS)
-
-else !IS_SIP_V4
-
-lib_LTLIBRARIES = libSalomePyQtcmodule.la
-dist_libSalomePyQtcmodule_la_SOURCES= SalomePyQt.cxx
-nodist_libSalomePyQtcmodule_la_SOURCES= $(MOC_FILES) $(SIP_SRC) $(MOC_SRC)
-libSalomePyQtcmodule_la_CPPFLAGS = $(MY_CPP_FLAGS)
-libSalomePyQtcmodule_la_LIBADD = $(COMMON_LIBS)
-
-endif
-
-if IS_SIP_V4
-else
-nodist_sharedpkgpython_PYTHON= SalomePyQt.py
-endif
-
-# Custom build step: generate C++ wrapping according to $(SIP_FILES)
-$(SIP_SRC): $(SIP_FILES)
- $(SIP) $(SIP_FLAGS) $<
-
-$(MOC_H): $(SIP_FILES)
- $(SIP) $(SIP_FLAGS) $<
-
-if IS_SIP_V4
-install-exec-hook: $(libdir)/SalomePyQt.so
-$(libdir)/SalomePyQt.so:
- (cd $(libdir); ln -s libSalomePyQt.so SalomePyQt.so;)
-else !IS_SIP_V4
-install-exec-hook: $(libdir)/SalomePyQtcmodule.so
-$(libdir)/SalomePyQt.so:
- (cd $(libdir); ln -sf libSalomePyQtcmodule.so SalomePyQt.so;)
-endif
-
-$(SIP_SRC): $(MOC_SRC)
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SALOME_PYQT_Module.h" // this include must be first!!!
-#include "SalomePyQt.h"
-
-#include <qapplication.h>
-#include <qmenubar.h>
-#include <qwidget.h>
-#include <qpopupmenu.h>
-#include <qimage.h>
-#include <qstringlist.h>
-
-#include "SALOME_Event.hxx"
-
-#include "SUIT_Session.h"
-#include "SUIT_Desktop.h"
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_Tools.h"
-#include "STD_MDIDesktop.h"
-#include "SalomeApp_Application.h"
-#include "SalomeApp_Study.h"
-#include "LightApp_SelectionMgr.h"
-#include "OB_Browser.h"
-#include "QtxAction.h"
-#include "LogWindow.h"
-
-using namespace std;
-
-/*!
- \return active application object [ static ]
-*/
-static SalomeApp_Application* getApplication() {
- if ( SUIT_Session::session() )
- return dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
- return NULL;
-}
-
-/*!
- \return active study or 0 if there is no study opened [ static ]
-*/
-static SalomeApp_Study* getActiveStudy()
-{
- if ( getApplication() )
- return dynamic_cast<SalomeApp_Study*>( getApplication()->activeStudy() );
- return 0;
-}
-
-static QMap<SalomeApp_Application*, SALOME_Selection*> SelMap;
-
-/*!
- Creates or finds the selection object (one per study).
-*/
-SALOME_Selection* SALOME_Selection::GetSelection( SalomeApp_Application* app )
-{
- SALOME_Selection* sel = 0;
- if ( app && SelMap.find( app ) != SelMap.end() )
- sel = SelMap[ app ];
- else
- sel = SelMap[ app ] = new SALOME_Selection( app );
- return sel;
-}
-
-/*!
- Selection constructor.
-*/
-SALOME_Selection::SALOME_Selection( QObject* p ) : QObject( p ), mySelMgr( 0 )
-{
- SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( p );
- if ( app ) {
- mySelMgr = app->selectionMgr();
- connect( mySelMgr, SIGNAL( selectionChanged() ), this, SIGNAL( currentSelectionChanged() ) );
- connect( mySelMgr, SIGNAL( destroyed() ), this, SLOT ( onSelMgrDestroyed() ) );
- }
-}
-/*!
- Selection destructor. Removes selection object from the map.
-*/
-SALOME_Selection::~SALOME_Selection()
-{
- SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( parent() );
- if ( app && SelMap.find( app ) != SelMap.end() )
- SelMap.remove( app );
-}
-
-/*!
- Watches for the selection manager destroying when study is closed.
-*/
-void SALOME_Selection::onSelMgrDestroyed()
-{
- mySelMgr = 0;
-}
-
-/*!
- Clears the selection.
-*/
-void SALOME_Selection::Clear()
-{
- class TEvent: public SALOME_Event {
- LightApp_SelectionMgr* mySelMgr;
- public:
- TEvent( LightApp_SelectionMgr* selMgr )
- : mySelMgr( selMgr ) {}
- virtual void Execute() {
- if ( mySelMgr )
- mySelMgr->clearSelected();
- }
- };
- ProcessVoidEvent( new TEvent( mySelMgr ) );
-}
-
-/*!
- Clears the selection.
-*/
-void SALOME_Selection::ClearIObjects()
-{
- Clear();
-}
-
-/*!
- Removes all selection filters.
-*/
-void SALOME_Selection::ClearFilters()
-{
- class TEvent: public SALOME_Event {
- LightApp_SelectionMgr* mySelMgr;
- public:
- TEvent( LightApp_SelectionMgr* selMgr )
- : mySelMgr( selMgr ) {}
- virtual void Execute() {
- if ( mySelMgr )
- mySelMgr->clearFilters();
- }
- };
- ProcessVoidEvent( new TEvent( mySelMgr ) );
-}
-
-/*!
- \return desktop (0 if error)
-*/
-class TGetDesktopEvent: public SALOME_Event {
-public:
- typedef QWidget* TResult;
- TResult myResult;
- TGetDesktopEvent() : myResult( 0 ) {}
- virtual void Execute() {
- if ( getApplication() )
- myResult = (QWidget*)( getApplication()->desktop() );
- }
-};
-
-/*!
- \return desktop
-*/
-QWidget* SalomePyQt::getDesktop()
-{
- return ProcessEvent( new TGetDesktopEvent() );
-}
-
-/*!
- \return workspace widget (0 if error)
-*/
-class TGetMainFrameEvent: public SALOME_Event {
-public:
- typedef QWidget* TResult;
- TResult myResult;
- TGetMainFrameEvent() : myResult( 0 ) {}
- virtual void Execute() {
- if ( getApplication() ) {
- SUIT_Desktop* aDesktop = getApplication()->desktop();
- myResult = (QWidget*)( aDesktop->centralWidget() );
- }
- }
-};
-
-/*!
- \return workspace widget (0 if error)
-*/
-QWidget* SalomePyQt::getMainFrame()
-{
- return ProcessEvent( new TGetMainFrameEvent() );
-}
-
-/*!
- SalomePyQt::getMainMenuBar
- Gets main menu. Returns 0 in error.
-*/
-class TGetMainMenuBarEvent: public SALOME_Event {
-public:
- typedef QMenuBar* TResult;
- TResult myResult;
- TGetMainMenuBarEvent() : myResult( 0 ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- myResult = anApp->desktop()->menuBar();
- }
- }
-};
-
-/*!
- \return main menu
- \retval 0 in error.
-*/
-QMenuBar* SalomePyQt::getMainMenuBar()
-{
- return ProcessEvent( new TGetMainMenuBarEvent() );
-}
-
-/*!
- SalomePyQt::getPopupMenu
- Gets an main menu's child popup menu by its id
-*/
-class TGetPopupMenuEvent: public SALOME_Event {
-public:
- typedef QPopupMenu* TResult;
- TResult myResult;
- MenuName myMenuName;
- TGetPopupMenuEvent( const MenuName menu ) : myResult( 0 ), myMenuName( menu ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- QMenuBar* menuBar = anApp->desktop()->menuBar();
- if ( menuBar ) {
- QString menu;
- switch( myMenuName) {
- case File:
- menu = QObject::tr( "MEN_DESK_FILE" ); break;
- case View:
- menu = QObject::tr( "MEN_DESK_VIEW" ); break;
- case Edit:
- menu = QObject::tr( "MEN_DESK_EDIT" ); break;
- case Preferences:
- menu = QObject::tr( "MEN_DESK_PREFERENCES" ); break;
- case Tools:
- menu = QObject::tr( "MEN_DESK_TOOLS" ); break;
- case Window:
- menu = QObject::tr( "MEN_DESK_WINDOW" ); break;
- case Help:
- menu = QObject::tr( "MEN_DESK_HELP" ); break;
- }
- for ( int i = 0; i < menuBar->count() && !myResult; i++ ) {
- QMenuItem* item = menuBar->findItem( menuBar->idAt( i ) );
- if ( item && item->text() == menu && item->popup() )
- myResult = item->popup();
- }
- }
- }
- }
-};
-
-/*!
- \return popup menu
- \param menu - menu name
-*/
-QPopupMenu* SalomePyQt::getPopupMenu( const MenuName menu )
-{
- return ProcessEvent( new TGetPopupMenuEvent( menu ) );
-}
-
-/*!
- SalomePyQt::getStudyId
- Returns active study's ID or 0 if there is no active study.
-*/
-class TGetStudyIdEvent: public SALOME_Event {
-public:
- typedef int TResult;
- TResult myResult;
- TGetStudyIdEvent() : myResult( 0 ) {}
- virtual void Execute() {
- if ( SalomeApp_Study* aStudy = getActiveStudy() ) {
- myResult = aStudy->studyDS()->StudyId();
- }
- }
-};
-
-/*!
- SalomePyQt::getStudyId
- Returns active study's ID or 0 if there is no active study.
-*/
-int SalomePyQt::getStudyId()
-{
- return ProcessEvent( new TGetStudyIdEvent() );
-}
-
-/*!
- SalomePyQt::getSelection
- Creates a Selection object (to provide a compatibility with previous SALOME GUI).
-*/
-class TGetSelectionEvent: public SALOME_Event {
-public:
- typedef SALOME_Selection* TResult;
- TResult myResult;
- TGetSelectionEvent() : myResult( 0 ) {}
- virtual void Execute() {
- myResult = SALOME_Selection::GetSelection( getApplication() );
- }
-};
-
-/*!
- Creates a Selection object (to provide a compatibility with previous SALOME GUI).
- \return just created selection object
-*/
-SALOME_Selection* SalomePyQt::getSelection()
-{
- return ProcessEvent( new TGetSelectionEvent() );
-}
-
-/*!
- SalomePyQt::putInfo
- Puts an information message to the desktop's status bar
- (with optional delay parameter given in seconds)
-*/
-class TPutInfoEvent: public SALOME_Event {
- QString myMsg;
- int mySecs;
-public:
- TPutInfoEvent( const QString& msg, const int sec = 0 ) : myMsg( msg ), mySecs( sec ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- anApp->putInfo( myMsg, mySecs * 1000 );
- }
- }
-};
-
-/*!
- Puts an information message to the desktop's status bar
- (with optional delay parameter given in seconds)
- \param msg - message text
- \param sec - delay in seconds
-*/
-void SalomePyQt::putInfo( const QString& msg, const int sec )
-{
- ProcessVoidEvent( new TPutInfoEvent( msg, sec ) );
-}
-
-/*!
- SalomePyQt::getActiveComponent
- Returns an active component name or empty string if there is no active component
-*/
-class TGetActiveComponentEvent: public SALOME_Event {
-public:
- typedef QString TResult;
- TResult myResult;
- TGetActiveComponentEvent() {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- if ( CAM_Module* mod = anApp->activeModule() ) {
- myResult = mod->name("");
- }
- }
- }
-};
-
-/*!
- \return an active component name or empty string if there is no active component
-*/
-const QString SalomePyQt::getActiveComponent()
-{
- return ProcessEvent( new TGetActiveComponentEvent() );
-}
-
-/*!
- SalomePyQt::updateObjBrowser
- Updates an Object Browser of a given study.
- If <studyId> <= 0 the active study's object browser is updated.
- <updateSelection> parameter is obsolete parameter and currently not used. To be removed lately.
-*/
-void SalomePyQt::updateObjBrowser( const int studyId, bool updateSelection )
-{
- class TEvent: public SALOME_Event {
- int myStudyId;
- bool myUpdateSelection;
- public:
- TEvent( const int studyId, bool updateSelection )
- : myStudyId( studyId ), myUpdateSelection( updateSelection ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- if ( getActiveStudy() && myStudyId <= 0 )
- myStudyId = getActiveStudy()->id();
- if ( myStudyId > 0 ) {
- QPtrList<SUIT_Application> apps = SUIT_Session::session()->applications();
- QPtrListIterator<SUIT_Application> it( apps );
- for( ; it.current(); ++it ) {
- SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( it.current() );
- if ( anApp && anApp->activeStudy() && anApp->activeStudy()->id() == myStudyId )
- anApp->updateObjectBrowser();
- }
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent( studyId, updateSelection ) );
-}
-
-const char* DEFAULT_SECTION = "SalomePyQt";
-
-/*!
- SalomePyQt::addStringSetting
- Adds a string setting to the application preferences
- <autoValue> parameter is obsolete parameter and currently not used. To be removed lately.
- This function is obsolete. Use addSetting() instead.
-*/
-void SalomePyQt::addStringSetting( const QString& name, const QString& value, bool autoValue )
-{
- class TEvent: public SALOME_Event {
- QString myName;
- QString myValue;
- bool myAutoValue;
- public:
- TEvent( const QString& name, const QString& value, bool autoValue )
- : myName( name ), myValue( value ), myAutoValue( autoValue ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- QStringList sl = QStringList::split( ":", myName );
- QString _sec = sl.count() > 1 ? sl[ 0 ].stripWhiteSpace() : QString( DEFAULT_SECTION );
- QString _nam = sl.count() > 1 ? sl[ 1 ].stripWhiteSpace() : sl.count() > 0 ? sl[ 0 ].stripWhiteSpace() : QString( "" );
- if ( !_sec.isEmpty() && !_nam.isEmpty() )
- resMgr->setValue( _sec, _nam, myValue );
- }
- }
- };
- ProcessVoidEvent( new TEvent( name, value, autoValue ) );
-}
-
-/*!
- SalomePyQt::addIntSetting
- Adds an integer setting to the application preferences
- <autoValue> parameter is obsolete parameter and currently not used. To be removed lately.
- This function is obsolete. Use addSetting() instead.
-*/
-void SalomePyQt::addIntSetting( const QString& name, const int value, bool autoValue)
-{
- class TEvent: public SALOME_Event {
- QString myName;
- int myValue;
- bool myAutoValue;
- public:
- TEvent( const QString& name, const int value, bool autoValue )
- : myName( name ), myValue( value ), myAutoValue( autoValue ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- QStringList sl = QStringList::split( ":", myName );
- QString _sec = sl.count() > 1 ? sl[ 0 ].stripWhiteSpace() : QString( DEFAULT_SECTION );
- QString _nam = sl.count() > 1 ? sl[ 1 ].stripWhiteSpace() : sl.count() > 0 ? sl[ 0 ].stripWhiteSpace() : QString( "" );
- if ( !_sec.isEmpty() && !_nam.isEmpty() )
- resMgr->setValue( _sec, _nam, myValue );
- }
- }
- };
- ProcessVoidEvent( new TEvent( name, value, autoValue ) );
-}
-
-/*!
- SalomePyQt::addDoubleSetting
- Adds an double setting to the application preferences
- <autoValue> parameter is obsolete parameter and currently not used. To be removed lately.
- This function is obsolete. Use addSetting() instead.
-*/
-void SalomePyQt::addDoubleSetting( const QString& name, const double value, bool autoValue )
-{
- class TEvent: public SALOME_Event {
- QString myName;
- double myValue;
- bool myAutoValue;
- public:
- TEvent( const QString& name, const double value, bool autoValue )
- : myName( name ), myValue( value ), myAutoValue( autoValue ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- QStringList sl = QStringList::split( ":", myName );
- QString _sec = sl.count() > 1 ? sl[ 0 ].stripWhiteSpace() : QString( DEFAULT_SECTION );
- QString _nam = sl.count() > 1 ? sl[ 1 ].stripWhiteSpace() : sl.count() > 0 ? sl[ 0 ].stripWhiteSpace() : QString( "" );
- if ( !_sec.isEmpty() && !_nam.isEmpty() )
- resMgr->setValue( _sec, _nam, myValue );
- }
- }
- };
- ProcessVoidEvent( new TEvent( name, value, autoValue ) );
-}
-
-/*!
- SalomePyQt::addBoolSetting
- Adds an boolean setting to the application preferences
- <autoValue> parameter is obsolete parameter and currently not used. To be removed lately.
- This function is obsolete. Use addSetting() instead.
-*/
-void SalomePyQt::addBoolSetting( const QString& name, const bool value, bool autoValue )
-{
- class TEvent: public SALOME_Event {
- QString myName;
- bool myValue;
- bool myAutoValue;
- public:
- TEvent( const QString& name, const bool value, bool autoValue )
- : myName( name ), myValue( value ), myAutoValue( autoValue ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- QStringList sl = QStringList::split( ":", myName );
- QString _sec = sl.count() > 1 ? sl[ 0 ].stripWhiteSpace() : QString( DEFAULT_SECTION );
- QString _nam = sl.count() > 1 ? sl[ 1 ].stripWhiteSpace() : sl.count() > 0 ? sl[ 0 ].stripWhiteSpace() : QString( "" );
- if ( !_sec.isEmpty() && !_nam.isEmpty() )
- resMgr->setValue( _sec, _nam, myValue );
- }
- }
- };
- ProcessVoidEvent( new TEvent( name, value, autoValue ) );
-}
-
-/*!
- SalomePyQt::removeSettings
- Removes a setting from the application preferences
- This function is obsolete. Use removeSetting() instead.
-*/
-void SalomePyQt::removeSettings( const QString& name )
-{
- class TEvent: public SALOME_Event {
- QString myName;
- public:
- TEvent( const QString& name ) : myName( name ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- QStringList sl = QStringList::split( ":", myName );
- QString _sec = sl.count() > 1 ? sl[ 0 ].stripWhiteSpace() : QString( DEFAULT_SECTION );
- QString _nam = sl.count() > 1 ? sl[ 1 ].stripWhiteSpace() : sl.count() > 0 ? sl[ 0 ].stripWhiteSpace() : QString( "" );
- if ( !_sec.isEmpty() && !_nam.isEmpty() )
- resMgr->remove( _sec, _nam );
- }
- }
- };
- ProcessVoidEvent( new TEvent( name ) );
-}
-
-/*!
- SalomePyQt::getSetting
- Gets a setting value (as string)
- This function is obsolete. Use stringSetting(), integerSetting(),
- boolSetting(), stringSetting() or colorSetting() instead.
-*/
-class TGetSettingEvent: public SALOME_Event {
-public:
- typedef QString TResult;
- TResult myResult;
- QString myName;
- TGetSettingEvent( const QString& name ) : myName( name ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- QStringList sl = QStringList::split( ":", myName );
- QString _sec = sl.count() > 1 ? sl[ 0 ].stripWhiteSpace() : QString( DEFAULT_SECTION );
- QString _nam = sl.count() > 1 ? sl[ 1 ].stripWhiteSpace() : sl.count() > 0 ? sl[ 0 ].stripWhiteSpace() : QString( "" );
- myResult = ( !_sec.isEmpty() && !_nam.isEmpty() ) ? resMgr->stringValue( _sec, _nam, "" ) : QString( "" );
- }
- }
-};
-
-/*!
- \return a setting value (as string)
- This function is obsolete. Use stringSetting(), integerSetting(),
- boolSetting(), stringSetting() or colorSetting() instead.
-*/
-QString SalomePyQt::getSetting( const QString& name )
-{
- return ProcessEvent( new TGetSettingEvent( name ) );
-}
-
-/*!
- SalomePyQt::addSetting
- Adds a double setting to the application preferences
-*/
-void SalomePyQt::addSetting( const QString& section, const QString& name, const double value )
-{
- class TEvent: public SALOME_Event {
- QString mySection;
- QString myName;
- double myValue;
- public:
- TEvent( const QString& section, const QString& name, double value )
- : mySection( section ), myName( name ), myValue( value ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- if ( !mySection.isEmpty() && !myName.isEmpty() )
- resMgr->setValue( mySection, myName, myValue );
- }
- }
- };
- ProcessVoidEvent( new TEvent( section, name, value ) );
-}
-
-/*!
- SalomePyQt::addSetting
- Adds an integer setting to the application preferences
-*/
-void SalomePyQt::addSetting( const QString& section, const QString& name, const int value )
-{
- class TEvent: public SALOME_Event {
- QString mySection;
- QString myName;
- int myValue;
- public:
- TEvent( const QString& section, const QString& name, int value )
- : mySection( section ), myName( name ), myValue( value ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- if ( !mySection.isEmpty() && !myName.isEmpty() )
- resMgr->setValue( mySection, myName, myValue );
- }
- }
- };
- ProcessVoidEvent( new TEvent( section, name, value ) );
-}
-
-/*!
- SalomePyQt::addSetting
- Adds a boolean setting to the application preferences
- (note: the last "dumb" parameter is used in order to avoid
- sip compilation error because of conflicting int and bool types)
-*/
-void SalomePyQt::addSetting( const QString& section, const QString& name, const bool value, const int )
-{
- class TEvent: public SALOME_Event {
- QString mySection;
- QString myName;
- bool myValue;
- public:
- TEvent( const QString& section, const QString& name, bool value )
- : mySection( section ), myName( name ), myValue( value ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- if ( !mySection.isEmpty() && !myName.isEmpty() )
- resMgr->setValue( mySection, myName, myValue );
- }
- }
- };
- ProcessVoidEvent( new TEvent( section, name, value ) );
-}
-
-/*!
- SalomePyQt::addSetting
- Adds a string setting to the application preferences
-*/
-void SalomePyQt::addSetting( const QString& section, const QString& name, const QString& value )
-{
- class TEvent: public SALOME_Event {
- QString mySection;
- QString myName;
- QString myValue;
- public:
- TEvent( const QString& section, const QString& name, const QString& value )
- : mySection( section ), myName( name ), myValue( value ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- if ( !mySection.isEmpty() && !myName.isEmpty() )
- resMgr->setValue( mySection, myName, myValue );
- }
- }
- };
- ProcessVoidEvent( new TEvent( section, name, value ) );
-}
-
-/*!
- SalomePyQt::addSetting
- Adds a color setting to the application preferences
-*/
-void SalomePyQt::addSetting( const QString& section, const QString& name, const QColor& value )
-{
- class TEvent: public SALOME_Event {
- QString mySection;
- QString myName;
- QColor myValue;
- public:
- TEvent( const QString& section, const QString& name, const QColor& value )
- : mySection( section ), myName( name ), myValue( value ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- if ( !mySection.isEmpty() && !myName.isEmpty() )
- resMgr->setValue( mySection, myName, myValue );
- }
- }
- };
- ProcessVoidEvent( new TEvent( section, name, value ) );
-}
-
-/*!
- SalomePyQt::integerSetting
- Gets an integer setting from the application preferences
-*/
-class TGetIntSettingEvent: public SALOME_Event {
-public:
- typedef int TResult;
- TResult myResult;
- QString mySection;
- QString myName;
- TResult myDefault;
- TGetIntSettingEvent( const QString& section, const QString& name, const int def )
- : mySection( section ), myName( name ), myDefault( def ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- myResult = ( !mySection.isEmpty() && !myName.isEmpty() ) ? resMgr->integerValue( mySection, myName, myDefault ) : myDefault;
- }
- }
-};
-
-/*!
- \return an integer setting from the application preferences
-*/
-int SalomePyQt::integerSetting( const QString& section, const QString& name, const int def )
-{
- return ProcessEvent( new TGetIntSettingEvent( section, name, def ) );
-}
-
-/*!
- SalomePyQt::doubleSetting
- Gets a double setting from the application preferences
-*/
-class TGetDblSettingEvent: public SALOME_Event {
-public:
- typedef double TResult;
- TResult myResult;
- QString mySection;
- QString myName;
- TResult myDefault;
- TGetDblSettingEvent( const QString& section, const QString& name, const double def )
- : mySection( section ), myName( name ), myDefault( def ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- myResult = ( !mySection.isEmpty() && !myName.isEmpty() ) ? resMgr->doubleValue( mySection, myName, myDefault ) : myDefault;
- }
- }
-};
-
-/*!
- \return an double setting from the application preferences
-*/
-double SalomePyQt::doubleSetting( const QString& section, const QString& name, const double def )
-{
- return ProcessEvent( new TGetDblSettingEvent( section, name, def ) );
-}
-
-/*!
- SalomePyQt::boolSetting
- Gets a boolean setting from the application preferences
-*/
-class TGetBoolSettingEvent: public SALOME_Event {
-public:
- typedef bool TResult;
- TResult myResult;
- QString mySection;
- QString myName;
- TResult myDefault;
- TGetBoolSettingEvent( const QString& section, const QString& name, const bool def )
- : mySection( section ), myName( name ), myDefault( def ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- myResult = ( !mySection.isEmpty() && !myName.isEmpty() ) ? resMgr->booleanValue( mySection, myName, myDefault ) : myDefault;
- }
- }
-};
-
-/*!
- \return an boolean setting from the application preferences
-*/
-bool SalomePyQt::boolSetting( const QString& section, const QString& name, const bool def )
-{
- return ProcessEvent( new TGetBoolSettingEvent( section, name, def ) );
-}
-
-/*!
- SalomePyQt::stringSetting
- Gets a string setting from the application preferences
-*/
-class TGetStrSettingEvent: public SALOME_Event {
-public:
- typedef QString TResult;
- TResult myResult;
- QString mySection;
- QString myName;
- TResult myDefault;
- TGetStrSettingEvent( const QString& section, const QString& name, const QString& def )
- : mySection( section ), myName( name ), myDefault( def ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- myResult = ( !mySection.isEmpty() && !myName.isEmpty() ) ? resMgr->stringValue( mySection, myName, myDefault ) : myDefault;
- }
- }
-};
-
-/*!
- \return an string setting from the application preferences
-*/
-QString SalomePyQt::stringSetting( const QString& section, const QString& name, const QString& def )
-{
- return ProcessEvent( new TGetStrSettingEvent( section, name, def ) );
-}
-
-/*!
- SalomePyQt::colorSetting
- Gets a color setting from the application preferences
-*/
-class TGetColorSettingEvent: public SALOME_Event {
-public:
- typedef QColor TResult;
- TResult myResult;
- QString mySection;
- QString myName;
- TResult myDefault;
- TGetColorSettingEvent( const QString& section, const QString& name, const QColor& def )
- : mySection( section ), myName( name ), myDefault( def ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- myResult = ( !mySection.isEmpty() && !myName.isEmpty() ) ? resMgr->colorValue( mySection, myName, myDefault ) : myDefault;
- }
- }
-};
-
-/*!
- \return a color setting from the application preferences
-*/
-QColor SalomePyQt::colorSetting ( const QString& section, const QString& name, const QColor& def )
-{
- return ProcessEvent( new TGetColorSettingEvent( section, name, def ) );
-}
-
-/*!
- SalomePyQt::removeSetting
- Removes a setting from the application preferences
-*/
-void SalomePyQt::removeSetting( const QString& section, const QString& name )
-{
- class TEvent: public SALOME_Event {
- QString mySection;
- QString myName;
- public:
- TEvent( const QString& section, const QString& name ) : mySection( section ), myName( name ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- if ( !mySection.isEmpty() && !myName.isEmpty() )
- resMgr->remove( mySection, myName );
- }
- }
- };
- ProcessVoidEvent( new TEvent( section, name ) );
-}
-
-/*!
- SalomePyQt::hasSetting
- Returns True if the settings exists
-*/
-class THasColorSettingEvent: public SALOME_Event {
-public:
- typedef bool TResult;
- TResult myResult;
- QString mySection;
- QString myName;
- THasColorSettingEvent( const QString& section, const QString& name )
- : mySection( section ), myName( name ) {}
- virtual void Execute() {
- if ( SUIT_Session::session() ) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- myResult = resMgr->hasValue( mySection, myName );
- }
- }
-};
-bool SalomePyQt::hasSetting( const QString& section, const QString& name )
-{
- return ProcessEvent( new THasColorSettingEvent( section, name ) );
-}
-
-/*!
- SalomePyQt::getFileName
- Displays 'Open/Save file' dialog box and returns a user's choice (file name)
-*/
-class TGetFileNameEvent: public SALOME_Event {
-public:
- typedef QString TResult;
- TResult myResult;
- QWidget* myParent;
- QString myInitial;
- QStringList myFilters;
- QString myCaption;
- bool myOpen;
- TGetFileNameEvent( QWidget* parent,
- const QString& initial,
- const QStringList& filters,
- const QString& caption,
- bool open )
- : myParent ( parent ),
- myInitial( initial ),
- myFilters( filters ),
- myCaption( caption ),
- myOpen ( open ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- myResult = anApp->getFileName( myOpen, myInitial, myFilters.join(";;"), myCaption, myParent );
- }
- }
-};
-
-/*!
- Displays 'Open/Save file' dialog box and returns a user's choice (file name)
-*/
-QString SalomePyQt::getFileName( QWidget* parent,
- const QString& initial,
- const QStringList& filters,
- const QString& caption,
- bool open )
-{
- return ProcessEvent( new TGetFileNameEvent( parent, initial, filters, caption, open ) );
-}
-
-/*!
- SalomePyQt::getOpenFileNames
- Displays 'Open files' dialog box and returns a user's choice (a list of file names)
-*/
-class TGetOpenFileNamesEvent: public SALOME_Event {
-public:
- typedef QStringList TResult;
- TResult myResult;
- QWidget* myParent;
- QString myInitial;
- QStringList myFilters;
- QString myCaption;
- TGetOpenFileNamesEvent( QWidget* parent,
- const QString& initial,
- const QStringList& filters,
- const QString& caption )
- : myParent ( parent ),
- myInitial( initial ),
- myFilters( filters ),
- myCaption( caption ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- myResult = anApp->getOpenFileNames( myInitial, myFilters.join(";;"), myCaption, myParent );
- }
- }
-};
-
-/*!
- Displays 'Open files' dialog box and returns a user's choice (a list of file names)
-*/
-QStringList SalomePyQt::getOpenFileNames( QWidget* parent,
- const QString& initial,
- const QStringList& filters,
- const QString& caption )
-{
- return ProcessEvent( new TGetOpenFileNamesEvent( parent, initial, filters, caption ) );
-}
-
-/*!
- SalomePyQt::getExistingDirectory
- Displays 'Get Directory' dialog box and returns a user's choice (a directory name)
-*/
-class TGetExistingDirectoryEvent: public SALOME_Event {
-public:
- typedef QString TResult;
- TResult myResult;
- QWidget* myParent;
- QString myInitial;
- QString myCaption;
- TGetExistingDirectoryEvent( QWidget* parent,
- const QString& initial,
- const QString& caption )
- : myParent ( parent ),
- myInitial( initial ),
- myCaption( caption ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- myResult = anApp->getDirectory( myInitial, myCaption, myParent );
- }
- }
-};
-
-/*!
- Displays 'Get Directory' dialog box and returns a user's choice (a directory name)
-*/
-QString SalomePyQt::getExistingDirectory( QWidget* parent,
- const QString& initial,
- const QString& caption )
-{
- return ProcessEvent( new TGetExistingDirectoryEvent( parent, initial, caption ) );
-}
-
-/*!
- SalomePyQt::helpContext
- Opens external browser to display 'context help' information
- current implementation does nothing.
-*/
-void SalomePyQt::helpContext( const QString& source, const QString& context ) {
- class TEvent: public SALOME_Event {
- QString mySource;
- QString myContext;
- public:
- TEvent( const QString& source, const QString& context )
- : mySource( source ), myContext( context ) {}
- virtual void Execute() {
- if ( /*SalomeApp_Application* anApp =*/ getApplication() ) {
- // VSR: TODO
- // anApp->helpContext( mySource, myContext );
- }
- }
- };
- ProcessVoidEvent( new TEvent( source, context ) );
-}
-
-/*!
- SalomePyQt::dumpView
- Dumps the contents of the currently active view to the image file
- in the given format (JPEG, PNG, BMP are supported)
-*/
-class TDumpViewEvent: public SALOME_Event {
-public:
- typedef bool TResult;
- TResult myResult;
- QString myFileName;
- TDumpViewEvent( const QString& filename )
- : myResult ( false ), myFileName( filename ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SUIT_ViewManager* vm = anApp->activeViewManager();
- if ( vm ) {
- SUIT_ViewWindow* vw = vm->getActiveView();
- if ( vw ) {
- QImage im = vw->dumpView();
- if ( !im.isNull() && !myFileName.isEmpty() ) {
- QString fmt = SUIT_Tools::extension( myFileName ).upper();
- if ( fmt.isEmpty() ) fmt = QString( "BMP" ); // default format
- if ( fmt == "JPG" ) fmt = "JPEG";
- myResult = im.save( myFileName, fmt.latin1() );
- }
- }
- }
- }
- }
-};
-
-/*!
- Dumps the contents of the currently active view to the image file
- in the given format (JPEG, PNG, BMP are supported)
-*/
-bool SalomePyQt::dumpView( const QString& filename )
-{
- return ProcessEvent( new TDumpViewEvent( filename ) );
-}
-
-/*!
- SalomePyQt::defaultMenuGroup
- Returns default menu group
-*/
-class TDefMenuGroupEvent: public SALOME_Event {
-public:
- typedef int TResult;
- TResult myResult;
- TDefMenuGroupEvent() : myResult( -1 ) {}
- virtual void Execute() {
- myResult = SALOME_PYQT_Module::defaultMenuGroup();
- }
-};
-
-/*!
- \return default menu group
-*/
-int SalomePyQt::defaultMenuGroup()
-{
- return ProcessEvent( new TDefMenuGroupEvent() );
-}
-
-/*!
- SalomePyQt::createTool
- These methods allow operating with the toolbars:
- - create a new toolbar or get the existing one (the toolbar name is passed as parameter);
- this method returns an id of the toolbar;
- - add action with given id (must be created previously) and optional index to the existing toolbar
- (toobar is identified either by its id or by its name)
- these methods return an id of the action.
- If error occurs, the -1 value is returned.
-*/
-class CrTool
-{
-public:
- CrTool( const QString& tBar )
- : myCase( 0 ), myTbName( tBar ) {}
- CrTool( const int id, const int tBar, const int idx )
- : myCase( 1 ), myId( id ), myTbId( tBar ), myIndex( idx ) {}
- CrTool( const int id, const QString& tBar, const int idx )
- : myCase( 2 ), myId( id ), myTbName( tBar ), myIndex( idx ) {}
- CrTool( QtxAction* action, const int tbId, const int id, const int idx )
- : myCase( 3 ), myAction( action ), myTbId( tbId ), myId( id ), myIndex( idx ) {}
- CrTool( QtxAction* action, const QString& tBar, const int id, const int idx )
- : myCase( 4 ), myAction( action ), myTbName( tBar ), myId( id ), myIndex( idx ) {}
-
- int execute( SALOME_PYQT_Module* module ) const
- {
- if ( module ) {
- switch ( myCase ) {
- case 0:
- return module->createTool( myTbName );
- case 1:
- return module->createTool( myId, myTbId, myIndex );
- case 2:
- return module->createTool( myId, myTbName, myIndex );
- case 3:
- return module->createTool( myAction, myTbId, myId, myIndex );
- case 4:
- return module->createTool( myAction, myTbName, myId, myIndex );
- }
- }
- return -1;
- }
-private:
- int myCase;
- QString myTbName;
- int myTbId;
- QtxAction* myAction;
- int myId;
- int myIndex;
-};
-class TCreateToolEvent: public SALOME_Event {
-public:
- typedef int TResult;
- TResult myResult;
- const CrTool& myCrTool;
- TCreateToolEvent( const CrTool& crTool )
- : myResult( -1 ), myCrTool( crTool ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- myResult = myCrTool.execute( module );
- }
- }
-};
-
-/*!
- create new toolbar or get existing by name
-*/
-int SalomePyQt::createTool( const QString& tBar )
-{
- return ProcessEvent( new TCreateToolEvent( CrTool( tBar ) ) );
-}
-/*! add action with id and index to the existing tollbar
-*/
-int SalomePyQt::createTool( const int id, const int tBar, const int idx )
-{
- return ProcessEvent( new TCreateToolEvent( CrTool( id, tBar, idx ) ) );
-}
-/*! add action with id and index to the existing tollbar
-*/
-int SalomePyQt::createTool( const int id, const QString& tBar, const int idx )
-{
- return ProcessEvent( new TCreateToolEvent( CrTool( id, tBar, idx ) ) );
-}
-/*! add action with id and index to the existing tollbar
-*/
-int SalomePyQt::createTool( QtxAction* a, const int tBar, const int id, const int idx )
-{
- return ProcessEvent( new TCreateToolEvent( CrTool( a, tBar, id, idx ) ) );
-}
-/*! add action with id and index to the existing tollbar
-*/
-int SalomePyQt::createTool( QtxAction* a, const QString& tBar, const int id, const int idx )
-{
- return ProcessEvent( new TCreateToolEvent( CrTool( a, tBar, id, idx ) ) );
-}
-
-/*!
- SalomePyQt::createMenu
- These methods allow operating with the main menu:
- - create a new menu or submenu or get the existing one (the parent menu name or id is passed as parameter,
- if it is empty or -1, it means that main menu is created, otherwise submenu is created);
- this method returns an id of the menu/submenu;
- - add action with given id (must be created previously) and optional index and group number to the existing menu
- or submenu (menu name or id us passed as parameter)
- these methods return an id of the action.
- If error occurs, the -1 value is returned.
-*/
-class CrMenu
-{
-public:
- CrMenu( const QString& subMenu, const int menu, const int id, const int group, const int idx )
- : myCase( 0 ), mySubMenuName( subMenu ), myMenuId( menu ), myId( id ), myGroup( group ), myIndex( idx ) {}
- CrMenu( const QString& subMenu, const QString& menu, const int id, const int group, const int idx )
- : myCase( 1 ), mySubMenuName( subMenu ), myMenuName( menu ), myId( id ), myGroup( group ), myIndex( idx ) {}
- CrMenu( const int id, const int menu, const int group, const int idx )
- : myCase( 2 ), myId( id ), myMenuId( menu ), myGroup( group ), myIndex( idx ) {}
- CrMenu( const int id, const QString& menu, const int group, const int idx )
- : myCase( 3 ), myId( id ), myMenuName( menu ), myGroup( group ), myIndex( idx ) {}
- CrMenu( QtxAction* action, const int menu, const int id, const int group, const int idx )
- : myCase( 4 ), myAction( action ), myMenuId( menu ), myId( id ), myGroup( group ), myIndex( idx ) {}
- CrMenu( QtxAction* action, const QString& menu, const int id, const int group, const int idx )
- : myCase( 5 ), myAction( action ), myMenuName( menu ), myId( id ), myGroup( group ), myIndex( idx ) {}
-
- int execute( SALOME_PYQT_Module* module ) const
- {
- if ( module ) {
- switch ( myCase ) {
- case 0:
- return module->createMenu( mySubMenuName, myMenuId, myId, myGroup, myIndex );
- case 1:
- return module->createMenu( mySubMenuName, myMenuName, myId, myGroup, myIndex );
- case 2:
- return module->createMenu( myId, myMenuId, myGroup, myIndex );
- case 3:
- return module->createMenu( myId, myMenuName, myGroup, myIndex );
- case 4:
- return module->createMenu( myAction, myMenuId, myId, myGroup, myIndex );
- case 5:
- return module->createMenu( myAction, myMenuName, myId, myGroup, myIndex );
- }
- }
- return -1;
- }
-private:
- int myCase;
- QString myMenuName;
- int myMenuId;
- QString mySubMenuName;
- int myGroup;
- QtxAction* myAction;
- int myId;
- int myIndex;
-};
-class TCreateMenuEvent: public SALOME_Event {
-public:
- typedef int TResult;
- TResult myResult;
- const CrMenu& myCrMenu;
- TCreateMenuEvent( const CrMenu& crMenu )
- : myResult( -1 ), myCrMenu( crMenu ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- myResult = myCrMenu.execute( module );
- }
- }
-};
-int SalomePyQt::createMenu( const QString& subMenu, const int menu, const int id, const int group, const int idx )
-{
- return ProcessEvent( new TCreateMenuEvent( CrMenu( subMenu, menu, id, group, idx ) ) );
-}
-
-int SalomePyQt::createMenu( const QString& subMenu, const QString& menu, const int id, const int group, const int idx )
-{
- return ProcessEvent( new TCreateMenuEvent( CrMenu( subMenu, menu, id, group, idx ) ) );
-}
-
-int SalomePyQt::createMenu( const int id, const int menu, const int group, const int idx )
-{
- return ProcessEvent( new TCreateMenuEvent( CrMenu( id, menu, group, idx ) ) );
-}
-
-int SalomePyQt::createMenu( const int id, const QString& menu, const int group, const int idx )
-{
- return ProcessEvent( new TCreateMenuEvent( CrMenu( id, menu, group, idx ) ) );
-}
-
-int SalomePyQt::createMenu( QtxAction* a, const int menu, const int id, const int group, const int idx )
-{
- return ProcessEvent( new TCreateMenuEvent( CrMenu( a, menu, id, group, idx ) ) );
-}
-
-int SalomePyQt::createMenu( QtxAction* a, const QString& menu, const int id, const int group, const int idx )
-{
- return ProcessEvent( new TCreateMenuEvent( CrMenu( a, menu, id, group, idx ) ) );
-}
-
-/*!
- SalomePyQt::createSeparator
- Create a separator action which can be then used in the menu or toolbar.
-*/
-class TCreateSepEvent: public SALOME_Event {
-public:
- typedef QtxAction* TResult;
- TResult myResult;
- TCreateSepEvent()
- : myResult( 0 ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- if ( module )
- myResult = (QtxAction*)module->createSeparator();
- }
- }
-};
-QtxAction* SalomePyQt::createSeparator()
-{
- return ProcessEvent( new TCreateSepEvent() );
-}
-
-/*!
- SalomePyQt::createAction
- Create an action which can be then used in the menu or toolbar:
- - id : the unique id action to be registered to;
- - menuText : action text which should appear in menu;
- - tipText : text which should appear in the tooltip;
- - statusText : text which should appear in the status bar when action is activated;
- - icon : the name of the icon file (the actual icon file name can be coded in the translation files);
- - key : the key accelrator for the action
- - toggle : if true the action is checkable
-*/
-class TCreateActionEvent: public SALOME_Event {
-public:
- typedef QtxAction* TResult;
- TResult myResult;
- int myId;
- QString myMenuText;
- QString myTipText;
- QString myStatusText;
- QString myIcon;
- int myKey;
- bool myToggle;
- TCreateActionEvent( const int id, const QString& menuText, const QString& tipText,
- const QString& statusText, const QString& icon, const int key, const bool toggle )
- : myResult( 0 ), myId( id ), myMenuText( menuText ), myTipText( tipText ),
- myStatusText( statusText ), myIcon( icon ), myKey( key ), myToggle( toggle ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- if ( module )
- myResult = (QtxAction*)module->createAction( myId, myTipText, myIcon, myMenuText, myStatusText, myKey, myToggle );
- }
- }
-};
-QtxAction* SalomePyQt::createAction( const int id, const QString& menuText,
- const QString& tipText, const QString& statusText,
- const QString& icon, const int key, const bool toggle )
-{
- return ProcessEvent( new TCreateActionEvent( id, menuText, tipText, statusText, icon, key, toggle ) );
-}
-
-/*!
- SalomePyQt::action
- Get an action by its id. Returns 0 if the action with such id was not registered.
-*/
-class TActionEvent: public SALOME_Event {
-public:
- typedef QtxAction* TResult;
- TResult myResult;
- int myId;
- TActionEvent( const int id )
- : myResult( 0 ), myId( id ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- if ( module )
- myResult = (QtxAction*)module->action( myId );
- }
- }
-};
-QtxAction* SalomePyQt::action( const int id )
-{
- return ProcessEvent( new TActionEvent( id ) );
-}
-
-/*!
- SalomePyQt::actionId
- Get an action id. Returns -1 if the action was not registered.
-*/
-class TActionIdEvent: public SALOME_Event {
-public:
- typedef int TResult;
- TResult myResult;
- const QtxAction* myAction;
- TActionIdEvent( const QtxAction* action )
- : myResult( -1 ), myAction( action ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- if ( module )
- myResult = module->actionId( myAction );
- }
- }
-};
-int SalomePyQt::actionId( const QtxAction* a )
-{
- return ProcessEvent( new TActionIdEvent( a ) );
-}
-
-/*!
- SalomePyQt::clearMenu
- Clears given menu (recursively if necessary)
-*/
-class TClearMenuEvent: public SALOME_Event {
-public:
- typedef bool TResult;
- TResult myResult;
- int myId;
- int myMenu;
- bool myRemoveActions;
- TClearMenuEvent( const int id, const int menu, const bool removeActions )
- : myResult( false ), myId( id ), myMenu( menu ), myRemoveActions( removeActions ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- if ( module )
- myResult = module->clearMenu( myId, myMenu, myRemoveActions );
- }
- }
-};
-bool SalomePyQt::clearMenu( const int id, const int menu, const bool removeActions )
-{
- return ProcessEvent( new TClearMenuEvent( id, menu, removeActions ) );
-}
-
-/*!
- SalomePyQt::addGlobalPreference
- Adds global (not module) preferences group
- */
-class TAddGlobalPrefEvent: public SALOME_Event {
-public:
- typedef int TResult;
- TResult myResult;
- QString myLabel;
- TAddGlobalPrefEvent( const QString& label )
- : myResult( -1 ), myLabel( label ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- if ( module )
- myResult = module->addGlobalPreference( myLabel );
- }
- }
-};
-int SalomePyQt::addGlobalPreference( const QString& label )
-{
- return ProcessEvent( new TAddGlobalPrefEvent( label ) );
-}
-
-/*!
- SalomePyQt::addPreference
- Adds preference
- */
-class TAddPrefEvent: public SALOME_Event {
-public:
- typedef int TResult;
- TResult myResult;
- QString myLabel;
- TAddPrefEvent( const QString& label )
- : myResult( -1 ), myLabel( label ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- if ( module )
- myResult = module->addPreference( myLabel );
- }
- }
-};
-int SalomePyQt::addPreference( const QString& label )
-{
- return ProcessEvent( new TAddPrefEvent( label ) );
-}
-
-/*!
- SalomePyQt::addPreference
- Adds preference
- */
-class TAddPrefParamEvent: public SALOME_Event {
-public:
- typedef int TResult;
- TResult myResult;
- QString myLabel;
- int myPId;
- int myType;
- QString mySection;
- QString myParam;
- TAddPrefParamEvent( const QString& label,
- const int pId, const int type,
- const QString& section,
- const QString& param )
- : myResult( -1 ),
- myLabel( label ), myPId( pId ), myType( type ),
- mySection( section ), myParam ( param ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- if ( module )
- myResult = module->addPreference( myLabel, myPId, myType, mySection, myParam );
- }
- }
-};
-int SalomePyQt::addPreference( const QString& label, const int pId, const int type,
- const QString& section, const QString& param )
-{
- return ProcessEvent( new TAddPrefParamEvent( label, pId, type, section, param ) );
-}
-
-/*!
- SalomePyQt::preferenceProperty
- Gets the property value for the given (by id) preference
- */
-class TPrefPropEvent: public SALOME_Event {
-public:
- typedef QVariant TResult;
- TResult myResult;
- int myId;
- QString myProp;
- TPrefPropEvent( const int id, const QString& prop )
- : myId( id ), myProp( prop )
- {
- myResult = QVariant();
- }
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- if ( module )
- myResult = module->preferenceProperty( myId, myProp );
- }
- }
-};
-QVariant SalomePyQt::preferenceProperty( const int id, const QString& prop )
-{
- return ProcessEvent( new TPrefPropEvent( id, prop ) );
-}
-
-/*!
- SalomePyQt::setPreferenceProperty
- Sets the property value for the given (by id) preference
- */
-void SalomePyQt::setPreferenceProperty( const int id,
- const QString& prop,
- const QVariant& var )
-{
- class TEvent: public SALOME_Event {
- int myId;
- QString myProp;
- QVariant myVar;
- public:
- TEvent( const int id, const QString& prop, const QVariant& var )
- : myId( id ), myProp( prop ), myVar( var ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- if ( module )
- module->setPreferenceProperty( myId, myProp, myVar );
- }
- }
- };
- ProcessVoidEvent( new TEvent( id, prop, var) );
-}
-
-/*!
- SalomePyQt::addPreferenceProperty
- Adds the property value to the list of values
- for the given (by id) preference
-
- This method allows creating properties which are QValueList<QVariant>
- - there is no way to pass such values directly to QVariant parameter
- from Python
- */
-void SalomePyQt::addPreferenceProperty( const int id,
- const QString& prop,
- const int idx,
- const QVariant& var )
-{
- class TEvent: public SALOME_Event {
- int myId;
- QString myProp;
- int myIdx;
- QVariant myVar;
- public:
- TEvent( const int id, const QString& prop, const int idx, const QVariant& var )
- : myId( id ), myProp( prop ), myIdx( idx), myVar( var ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
- if ( !module )
- module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
- if ( module ) {
- QVariant var = module->preferenceProperty( myId, myProp );
- if ( var.isValid() ) {
- if ( var.type() == QVariant::StringList ) {
- QStringList sl = var.asStringList();
- if ( myIdx >= 0 && myIdx < sl.count() )
- sl[myIdx] = myVar.asString();
- else
- sl.append( myVar.asString() );
- module->setPreferenceProperty( myId, myProp, sl );
- }
- else if ( var.type() == QVariant::List ) {
- QValueList<QVariant> vl = var.asList();
- if ( myIdx >= 0 && myIdx < vl.count() )
- vl[myIdx] = myVar;
- else
- vl.append( myVar );
- module->setPreferenceProperty( myId, myProp, vl );
- }
- }
- else {
- QValueList<QVariant> vl;
- vl.append( myVar );
- module->setPreferenceProperty( myId, myProp, vl );
- }
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent( id, prop, idx, var) );
-}
-
-/*!
- SalomePyQt::message
- Puts the message to the Log output window
- */
-void SalomePyQt::message( const QString& msg, bool addSeparator )
-{
- class TEvent: public SALOME_Event {
- QString myMsg;
- bool myAddSep;
- public:
- TEvent( const QString& msg, bool addSeparator )
- : myMsg( msg ), myAddSep( addSeparator ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- LogWindow* lw = anApp->logWindow();
- if ( lw )
- lw->putMessage( myMsg, myAddSep );
- }
- }
- };
- ProcessVoidEvent( new TEvent( msg, addSeparator ) );
-}
-
-/*!
- SalomePyQt::clearMessages
- Removes all the messages from the Log output window
- */
-void SalomePyQt::clearMessages()
-{
- class TEvent: public SALOME_Event {
- public:
- TEvent() {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- LogWindow* lw = anApp->logWindow();
- if ( lw )
- lw->clear();
- }
- }
- };
- ProcessVoidEvent( new TEvent() );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOME_PYQT_H
-#define SALOME_PYQT_H
-
-#include <qstring.h>
-#include <qobject.h>
-#include <qcolor.h>
-
-#include <LightApp_Application.h>
-#include <LightApp_Preferences.h>
-
-class LightApp_SelectionMgr;
-class SalomeApp_Application;
-class QMenuBar;
-class QPopupMenu;
-class QWidget;
-class QtxAction;
-
-class SALOME_Selection : public QObject
-{
- Q_OBJECT
-
-public:
- ~SALOME_Selection();
- static SALOME_Selection* GetSelection( SalomeApp_Application* );
-
- void Clear();
- void ClearIObjects();
- void ClearFilters();
-
-signals:
- void currentSelectionChanged();
-
-private slots:
- void onSelMgrDestroyed();
-
-private:
- LightApp_SelectionMgr* mySelMgr;
- SALOME_Selection( QObject* );
-};
-
-enum MenuName {
- File = 1,
- View = 2,
- Edit = 3,
- Preferences = 4,
- Tools = 5,
- Window = 6,
- Help = 7
-};
-
-enum {
- WT_ObjectBrowser = LightApp_Application::WT_ObjectBrowser,
- WT_PyConsole = LightApp_Application::WT_PyConsole,
- WT_LogWindow = LightApp_Application::WT_LogWindow,
- WT_User = LightApp_Application::WT_User
-};
-
-enum {
- PT_Space = LightApp_Preferences::Space,
- PT_Bool = LightApp_Preferences::Bool,
- PT_Color = LightApp_Preferences::Color,
- PT_String = LightApp_Preferences::String,
- PT_Selector = LightApp_Preferences::Selector,
- PT_DblSpin = LightApp_Preferences::DblSpin,
- PT_IntSpin = LightApp_Preferences::IntSpin,
- PT_Double = LightApp_Preferences::Double,
- PT_Integer = LightApp_Preferences::Integer,
- PT_GroupBox = LightApp_Preferences::GroupBox,
- PT_Font = LightApp_Preferences::Font,
- PT_DirList = LightApp_Preferences::DirList,
- PT_File = LightApp_Preferences::File,
- PT_User = LightApp_Preferences::User
-};
-
-class SalomePyQt
-{
-public:
- static QWidget* getDesktop();
- static QWidget* getMainFrame();
- static QMenuBar* getMainMenuBar();
- static QPopupMenu* getPopupMenu( const MenuName );
- static SALOME_Selection* getSelection();
- static int getStudyId();
- static void putInfo( const QString&, const int = 0 );
- static const QString getActiveComponent();
- static void updateObjBrowser( const int = 0, bool = true );
-
- static QString getFileName ( QWidget*, const QString&, const QStringList&, const QString&, bool );
- static QStringList getOpenFileNames ( QWidget*, const QString&, const QStringList&, const QString& );
- static QString getExistingDirectory( QWidget*, const QString&, const QString& );
-
- static void helpContext( const QString&, const QString& );
-
- static bool dumpView( const QString& );
-
- static int defaultMenuGroup();
-
- static int createTool( const QString& );
- static int createTool( const int, const int, const int = -1 );
- static int createTool( const int, const QString&, const int = -1 );
- static int createTool( QtxAction*, const int, const int = -1, const int = -1 );
- static int createTool( QtxAction*, const QString&, const int = -1, const int = -1 );
-
- static int createMenu( const QString&, const int = -1,
- const int = -1, const int = -1, const int = -1 );
- static int createMenu( const QString&, const QString& = QString::null,
- const int = -1, const int = -1, const int = -1 );
- static int createMenu( const int, const int = -1,
- const int = -1, const int = -1 );
- static int createMenu( const int, const QString& = QString::null,
- const int = -1, const int = -1 );
- static int createMenu( QtxAction*, const int, const int = -1,
- const int = -1, const int = -1 );
- static int createMenu( QtxAction*, const QString&, const int = -1,
- const int = -1, const int = -1 );
-
- static QtxAction* createSeparator();
-
- static QtxAction* createAction( const int, const QString&,
- const QString& = QString::null, const QString& = QString::null,
- const QString& = QString::null, const int = 0, const bool = false );
-
- static QtxAction* action( const int );
- static int actionId( const QtxAction* );
-
- static bool clearMenu( const int = 0, const int = 0,
- const bool = true );
-
- static void addSetting ( const QString&, const QString&, const double );
- static void addSetting ( const QString&, const QString&, const int );
- static void addSetting ( const QString&, const QString&, const bool, const int );
- static void addSetting ( const QString&, const QString&, const QString& );
- static void addSetting ( const QString&, const QString&, const QColor& );
- static int integerSetting( const QString&, const QString&, const int = 0 );
- static double doubleSetting ( const QString&, const QString&, const double = 0 );
- static bool boolSetting ( const QString&, const QString&, const bool = 0 );
- static QString stringSetting ( const QString&, const QString&, const QString& = QString("") );
- static QColor colorSetting ( const QString&, const QString&, const QColor& = QColor() );
- static void removeSetting ( const QString&, const QString& );
- static bool hasSetting ( const QString&, const QString& );
- // obsolete
- static void addStringSetting( const QString&, const QString&, bool = true );
- static void addIntSetting ( const QString&, const int, bool = true );
- static void addBoolSetting ( const QString&, const bool, bool = true );
- static void addDoubleSetting( const QString&, const double, bool = true );
- static void removeSettings ( const QString& );
- static QString getSetting ( const QString& );
-
- static int addGlobalPreference( const QString& );
- static int addPreference( const QString& );
- static int addPreference( const QString&,
- const int, const int = -1,
- const QString& = QString::null,
- const QString& = QString::null );
- static QVariant preferenceProperty( const int, const QString& );
- static void setPreferenceProperty( const int,
- const QString&,
- const QVariant& );
- static void addPreferenceProperty( const int,
- const QString&,
- const int,
- const QVariant& );
-
- static void message( const QString&, bool = true );
- static void clearMessages();
-};
-
-#endif // SALOME_PYQT_H
+++ /dev/null
-//=============================================================================
-// File : SalomePyQt.sip
-// Created : 25/04/05
-// Author : Vadim SANDLER
-// Project : SALOME
-// Copyright : 2003-2005 CEA/DEN, EDF R&D
-// $Header : $
-//=============================================================================
-
-%Module SalomePyQt
-
-%Import qtmod.sip
-
-class SALOME_Selection : QObject
-{
-%HeaderCode
-#include <SalomePyQt.h>
-%End
-
-public:
- void Clear();
- void ClearIObjects();
- void ClearFilters();
-
-private:
- SALOME_Selection( QObject* /TransferThis/ );
-
-signals:
- void currentSelectionChanged();
-};
-
-enum MenuName {
- File = 1,
- View = 2,
- Edit = 3,
- Preferences = 4,
- Tools = 5,
- Window = 6,
- Help = 7
-};
-
-enum WindowType {
- WT_ObjectBrowser,
- WT_PyConsole,
- WT_LogWindow,
- WT_User
-};
-
-enum PrefType {
- PT_Space,
- PT_Bool,
- PT_Color,
- PT_String,
- PT_Selector,
- PT_DblSpin,
- PT_IntSpin,
- PT_Double,
- PT_Integer,
- PT_GroupBox,
- PT_Font,
- PT_DirList,
- PT_File,
- PT_User
-};
-
-class QtxAction : QAction
-{
-%TypeHeaderCode
-#include <QtxAction.h>
-%End
-
-private:
- QtxAction(const QtxAction &);
-};
-
-class SalomePyQt
-{
-%HeaderCode
-#include <SalomePyQt.h>
-%End
-
-public:
- static QWidget* getDesktop();
- static QWidget* getMainFrame();
- static QMenuBar* getMainMenuBar();
- static QPopupMenu* getPopupMenu( const MenuName );
- static SALOME_Selection* getSelection() /Factory/;
- static int getStudyId();
- static void putInfo( const QString&, int = 0 );
- static const QString getActiveComponent();
- static void updateObjBrowser( int = 0, bool = true );
-
- static QString getFileName ( QWidget*, const QString&, const QStringList&, const QString&, bool );
- static QStringList getOpenFileNames ( QWidget*, const QString&, const QStringList&, const QString& );
- static QString getExistingDirectory( QWidget*, const QString&, const QString& );
-
- static void helpContext( const QString&, const QString& );
-
- static bool dumpView( const QString& );
-
- static int defaultMenuGroup();
-
- static int createTool( const QString& );
- static int createTool( const int, const int, int = -1 );
- static int createTool( const int, const QString&, int = -1 );
- static int createTool( QtxAction*, const int, int = -1, int = -1 );
- static int createTool( QtxAction*, const QString&, int = -1, int = -1 );
-
- static int createMenu( const QString&, const int,
- int = -1, int = -1, int = -1 );
- static int createMenu( const QString&, const QString&,
- int = -1, int = -1, int = -1 );
- static int createMenu( const int, const int,
- int = -1, int = -1 );
- static int createMenu( const int, const QString&,
- int = -1, int = -1 );
- static int createMenu( QtxAction*, const int, int = -1,
- int = -1, int = -1 );
- static int createMenu( QtxAction*, const QString&, int = -1,
- int = -1, int = -1 );
-
- static QtxAction* createSeparator();
-
- static QtxAction* createAction( const int, const QString&,
- const QString& = QString::null, const QString& = QString::null,
- const QString& = QString::null, int = 0, bool = false );
-
- static QtxAction* action( const int );
- static int actionId( const QtxAction* );
-
- static bool clearMenu( int = 0, int = 0,
- bool = true );
-
- static void addSetting ( const QString&, const QString&, const double );
- static void addSetting ( const QString&, const QString&, const int /Constrained/ );
- static void addSetting ( const QString&, const QString&, const bool, const int );
- static void addSetting ( const QString&, const QString&, const QString& );
- static void addSetting ( const QString&, const QString&, const QColor& );
- static int integerSetting( const QString&, const QString&, int = 0 );
- static double doubleSetting ( const QString&, const QString&, double = 0 );
- static bool boolSetting ( const QString&, const QString&, bool = false );
- static QString stringSetting ( const QString&, const QString&, const QString& = QString("") );
- static QColor colorSetting ( const QString&, const QString&, const QColor& = QColor() );
- static void removeSetting ( const QString&, const QString& );
- static bool hasSetting ( const QString&, const QString& );
-
-// obsolete
- static void addStringSetting( const QString&, const QString&, bool = true );
- static void addIntSetting ( const QString&, const int, bool = true );
- static void addDoubleSetting( const QString&, const double, bool = true );
- static void addBoolSetting ( const QString&, const bool, bool = true );
- static void removeSettings ( const QString& );
- static QString getSetting ( const QString& );
-
- static int addGlobalPreference( const QString& );
- static int addPreference( const QString& );
- static int addPreference( const QString&, const int, int = -1,
- const QString& = QString::null,
- const QString& = QString::null );
- static QVariant preferenceProperty( const int, const QString& );
- static void setPreferenceProperty( const int,
- const QString&,
- const QVariant& );
- static void addPreferenceProperty( const int,
- const QString&,
- const int,
- const QVariant& );
-
- static void message( const QString&, bool = true );
- static void clearMessages();
-};
+++ /dev/null
-//=============================================================================
-// File : SalomePyQt_v4.sip
-// Created : 25/04/05
-// Author : Vadim SANDLER
-// Project : SALOME
-// Copyright : 2003-2005 CEA/DEN, EDF R&D
-// $Header : $
-//=============================================================================
-
-%Module SalomePyQt
-
-%Import qtmod.sip
-
-%ExportedHeaderCode
-#include <SalomePyQt.h>
-%End
-
-class SALOME_Selection : QObject
-{
-%TypeHeaderCode
-#include <SalomePyQt.h>
-%End
-
-public:
- void Clear() /ReleaseGIL/ ;
- void ClearIObjects() /ReleaseGIL/ ;
- void ClearFilters() /ReleaseGIL/ ;
-
-private:
- SALOME_Selection( QObject* /TransferThis/ );
-
-signals:
- void currentSelectionChanged();
-};
-
-//%ExportedHeaderCode
-
-enum MenuName {
- File = 1,
- View = 2,
- Edit = 3,
- Preferences = 4,
- Tools = 5,
- Window = 6,
- Help = 7
-};
-
-enum WindowType {
- WT_ObjectBrowser,
- WT_PyConsole,
- WT_LogWindow,
- WT_User
-};
-
-enum PrefType {
- PT_Space,
- PT_Bool,
- PT_Color,
- PT_String,
- PT_Selector,
- PT_DblSpin,
- PT_IntSpin,
- PT_Double,
- PT_Integer,
- PT_GroupBox,
- PT_Font,
- PT_DirList,
- PT_File,
- PT_User
-};
-
-//%End
-
-class QtxAction : QAction
-{
-%TypeHeaderCode
-#include <QtxAction.h>
-%End
-private:
- QtxAction(const QtxAction &);
-};
-
-class SalomePyQt
-{
-%TypeHeaderCode
-#include <SalomePyQt.h>
-%End
-
-public:
- static QWidget* getDesktop() /ReleaseGIL/ ;
- static QWidget* getMainFrame() /ReleaseGIL/ ;
- static QMenuBar* getMainMenuBar() /ReleaseGIL/ ;
- static QPopupMenu* getPopupMenu( const MenuName ) /ReleaseGIL/ ;
- static SALOME_Selection* getSelection() /Factory,ReleaseGIL/ ;
- static int getStudyId() /ReleaseGIL/ ;
- static void putInfo( const QString&, const int = 0 ) /ReleaseGIL/ ;
- static const QString getActiveComponent() /ReleaseGIL/ ;
- static void updateObjBrowser( const int = 0, bool = true ) /ReleaseGIL/ ;
-
- static QString getFileName ( QWidget*, const QString&, const QStringList&, const QString&, bool ) /ReleaseGIL/ ;
- static QStringList getOpenFileNames ( QWidget*, const QString&, const QStringList&, const QString& ) /ReleaseGIL/ ;
- static QString getExistingDirectory( QWidget*, const QString&, const QString& ) /ReleaseGIL/ ;
-
- static void helpContext( const QString&, const QString& ) /ReleaseGIL/ ;
-
- static bool dumpView( const QString& ) /ReleaseGIL/ ;
-
- static int defaultMenuGroup() /ReleaseGIL/ ;
-
- static int createTool( const QString& ) /ReleaseGIL/ ;
- static int createTool( const int, const int, const int = -1 ) /ReleaseGIL/ ;
- static int createTool( const int, const QString&, const int = -1 ) /ReleaseGIL/ ;
- static int createTool( QtxAction*, const int, const int = -1, const int = -1 ) /ReleaseGIL/ ;
- static int createTool( QtxAction*, const QString&, const int = -1, const int = -1 ) /ReleaseGIL/ ;
-
- static int createMenu( const QString&, const int,
- const int = -1, const int = -1, const int = -1 ) /ReleaseGIL/ ;
- static int createMenu( const QString&, const QString&,
- const int = -1, const int = -1, const int = -1 ) /ReleaseGIL/ ;
- static int createMenu( const int, const int,
- const int = -1, const int = -1 ) /ReleaseGIL/ ;
- static int createMenu( const int, const QString&,
- const int = -1, const int = -1 ) /ReleaseGIL/ ;
- static int createMenu( QtxAction*, const int, const int = -1,
- const int = -1, const int = -1 ) /ReleaseGIL/ ;
- static int createMenu( QtxAction*, const QString&, const int = -1,
- const int = -1, const int = -1 ) /ReleaseGIL/ ;
- static QtxAction* createSeparator() /ReleaseGIL/ ;
-
- static QtxAction* createAction( const int, const QString&,
- const QString& = QString::null, const QString& = QString::null,
- const QString& = QString::null, const int = 0, const bool = false ) /ReleaseGIL/ ;
-
- static QtxAction* action( const int ) /ReleaseGIL/ ;
- static int actionId( const QtxAction* ) /ReleaseGIL/ ;
-
- static bool clearMenu( const int = 0, const int = 0,
- const bool = true ) /ReleaseGIL/ ;
-
- static void addSetting ( const QString&, const QString&, const double ) /ReleaseGIL/ ;
- static void addSetting ( const QString&, const QString&, const int /Constrained/ ) /ReleaseGIL/ ;
- static void addSetting ( const QString&, const QString&, const bool, const int ) /ReleaseGIL/ ;
- static void addSetting ( const QString&, const QString&, const QString& ) /ReleaseGIL/ ;
- static void addSetting ( const QString&, const QString&, const QColor& ) /ReleaseGIL/ ;
- static int integerSetting( const QString&, const QString&, const int = 0 ) /ReleaseGIL/ ;
- static double doubleSetting ( const QString&, const QString&, const double = 0 ) /ReleaseGIL/ ;
- static bool boolSetting ( const QString&, const QString&, const bool = false ) /ReleaseGIL/ ;
- static QString stringSetting ( const QString&, const QString&, const QString& = QString("") ) /ReleaseGIL/ ;
- static QColor colorSetting ( const QString&, const QString&, const QColor& = QColor() ) /ReleaseGIL/ ;
- static void removeSetting ( const QString&, const QString& ) /ReleaseGIL/ ;
- static bool hasSetting ( const QString&, const QString& ) /ReleaseGIL/ ;
-
-// obsolete
- static void addStringSetting( const QString&, const QString&, bool = true ) /ReleaseGIL/ ;
- static void addIntSetting ( const QString&, const int, bool = true ) /ReleaseGIL/ ;
- static void addDoubleSetting( const QString&, const double, bool = true ) /ReleaseGIL/ ;
- static void addBoolSetting ( const QString&, const bool, bool = true ) /ReleaseGIL/ ;
- static void removeSettings ( const QString& ) /ReleaseGIL/ ;
- static QString getSetting ( const QString& ) /ReleaseGIL/ ;
-
- static int addGlobalPreference( const QString& ) /ReleaseGIL/ ;
- static int addPreference( const QString& ) /ReleaseGIL/ ;
- static int addPreference( const QString&,
- const int, const int = -1,
- const QString& = QString::null,
- const QString& = QString::null ) /ReleaseGIL/ ;
- static QVariant preferenceProperty( const int, const QString& ) /ReleaseGIL/ ;
- static void setPreferenceProperty( const int,
- const QString&,
- const QVariant& ) /ReleaseGIL/ ;
- static void addPreferenceProperty( const int,
- const QString&,
- const int,
- const QVariant& ) /ReleaseGIL/ ;
-
- static void message( const QString&, bool = true ) /ReleaseGIL/ ;
- static void clearMessages() /ReleaseGIL/ ;
-};
-
+++ /dev/null
-# Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-#
-#
-#
-# File : Help.py
-# Author : Paul RASCLE, EDF
-# Module : SALOME
-# $Header$
-
-class SalomeDoc:
- def __init__(self, aDoc):
- self.doc = aDoc
- def __repr__(self):
- print self.doc
- return "---"
- def salome(self):
- doc_salome = '''
-MODULE : salome
----------------
-module salome gives access to Salome ressources:
-variables:
-
- salome:orb : CORBA
- salome.naming_service : instance of naming Service class
- methods:
- Resolve(name) : find a CORBA object (ior) by its pathname
- Register(name) : register a CORBA object under a pathname
- salome.lcc : instance of lifeCycleCORBA class
- methods:
- FindOrLoadComponent(server,name) :
- obtain an Engine (CORBA object)
- or launch the Engine if not found,
- with a Server name and an Engine name
- salome.sg
- methods:
- updateObjBrowser(bool):
- getActiveStudyId():
- getActiveStudyName():
-
- SelectedCount(): returns number of selected objects
- getSelected(i): returns entry of selected object number i
- getAllSelected(): returns list of entry of selected objects
- AddIObject(Entry): select an existing Interactive object
- RemoveIObject(Entry): remove object from selection
- ClearIObjects(): clear selection
-
- Display(*Entry):
- DisplayOnly(Entry):
- Erase(Entry):
- DisplayAll():
- EraseAll():
-
- IDToObject(Entry): returns CORBA reference from entry
-
- salome.myStudyName : active Study Name
- salome.myStudyId : active Study Id
- salome.myStudy : the active Study itself (CORBA ior)
- methods : defined in SALOMEDS.idl
-
-methods:
- salome.DumpStudy(study) : Dump a study, given the ior
----
-'''
- print doc_salome
-
- def geompy(self):
- doc_geompy = '''
-MODULE : geompy
----------------
-module geompy provides an encapsulation of GEOM Engine methods
-variables:
- geompy.geom : a Geometry Engine, found or loaded
- at first import of module geompy.
- methods : defined in GEOM_Gen.idl
- geompy.myBuilder : a study builder
- geompy.father : GEOM root in current study (salome.myStudy)
-
-methods:
- addToStudy(aShape, aName) : add the shape into the current study
- --- all methods of GEOM_Gen.idl that returns a shape are encapsulated,
- with the same interface : shapes are named with their ior
-'''
- print doc_geompy
-
- def supervision(self):
- doc_supervision = '''
-MODULES : SALOME_SuperVisionEditor and SALOME_SuperVisionExecutor
------------------------------------------------------------------
-this modules provide access to Editor and Executor Engine methods
-
-See SUPERV.idl
-
-In order to run the example (supervisionexample.py)
-
- Type : from supervisionexample import *
- supervisionexample.py contains comments
-
-A new python example avoids references to LifeCycleCORBA
- avoids references to NamingService
- avoids references to ModuleCatalog
- avoids SuperVisionComponent creation
- allows G.Input(...) instead of AddInput(G,...)
- replaces Editor/Executor with Graph
- allows Nodes, Ports and Links CORBA objects
- shortens methods names
- ...
-
- See /SuperVisionTest/resources/GraphExample.py
- and GraphExample.xml
----
-'''
- print doc_supervision
-
-
-
-help = SalomeDoc('''
-Availables modules:
- salome : gives access to Salome ressources
- geompy : encapsulation of GEOM Engine methods
- supervision : gives access to SuperVision Engine
-To obtain specific help on a module "truc", type: help.truc()
-To run an example, type: import example3
-''')
-
+++ /dev/null
-# Copyright (C) 2003 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
-#
-#
-#
-# File : Makefile.in
-# Author : Paul RASCLE, EDF
-# Module : SALOME
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-# ===============================================================
-# Swig targets
-# ===============================================================
-# (cf. http://www.geocities.com/foetsch/python/swig_linux.htm)
-#
-# Step 1: build the wrapping source files with swig
-#
-# libSALOME_LifeCycleCORBA.i -- swig --> swig_wrap.cpp
-# libSALOME_Swig.py
-#
-# Step 2: build the dynamic library from cpp built source files and
-# dependant libraries.
-#
-# swig_wrap.cpp -- gcc --> swig_wrap.o |-- link --> _libSALOME_Swig.la
-# + |
-# dependant libs |
-#
-# The file libSALOME_Swigcmodule.py will be installed in
-# <prefix>/lib/python<version>/site-package/salome.
-# The library will be installed in the same place.
-#
-
-# this option puts it to dist
-#BUILT_SOURCES = swig_wrap.cpp
-
-SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir)
-SWIG_SOURCES = libSALOME_Swig.i
-
-nodist_pkgpython_DATA = libSALOME_Swig.py
-libSALOME_Swig.py: swig_wrap.cpp
-
-# library
-lib_LTLIBRARIES = libSALOME_Swigcmodule.la
-libSALOME_Swigcmodule_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES) SALOMEGUI_Swig.cxx
-nodist_libSALOME_Swigcmodule_la_SOURCES = swig_wrap.cpp
-salomeinclude_HEADERS= SALOMEGUI_Swig.hxx SALOMEGUI_Swig.i
-
-libSALOME_Swigcmodule_la_CPPFLAGS =\
- $(QT_INCLUDES) $(PYTHON_INCLUDES) $(CAS_CPPFLAGS) $(VTK_INCLUDES) \
- $(OGL_INCLUDES) $(BOOST_CPPFLAGS) -DHAVE_CONFIG_H @KERNEL_CXXFLAGS@ \
- -I$(top_builddir)/salome_adm/unix -I$(top_builddir)/idl \
- -I$(srcdir)/../SalomeApp -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT \
- -I$(srcdir)/../ObjBrowser -I$(srcdir)/../LightApp -I$(srcdir)/../SOCC \
- -I$(srcdir)/../SVTK -I$(srcdir)/../Event -I$(srcdir)/../OBJECT \
- -I$(srcdir)/../CAM -I$(srcdir)/../STD -I$(srcdir)/../OCCViewer \
- -I$(srcdir)/../Prs -I$(srcdir)/../VTKViewer -I$(srcdir)/../SPlot2d \
- -I$(srcdir)/../Plot2d \
- @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
-
-libSALOME_Swigcmodule_la_LDFLAGS = -module
-libSALOME_Swigcmodule_la_LIBADD = \
- ../SalomeApp/libSalomeApp.la \
- @PYTHON_LIBS@
-
-swig_wrap.cpp : $(SWIG_SOURCES)
- $(SWIG) $(SWIG_FLAGS) -o $@ $<
-
-CLEANFILES = swig_wrap.cpp
-
-#
-# ===============================================================
-# Files to be installed
-# ===============================================================
-#
-
-# Scripts to be installed.
-dist_salomescript_DATA= \
- examplevtk1.py \
- test_table.py \
- test_big_table.py \
- test_many_objects.py \
- test_remove_ref.py \
- libSALOME_Swig.py
-
-nodist_salomescript_DATA= \
- supervisionexample.py \
- supervisiongeomexample.py
-
-EXTRA_DIST+= \
- supervisionexample.py.in \
- supervisiongeomexample.py.in
-
-sharedpkgpython_PYTHON= SALOMEGUI_shared_modules.py
-
-install-exec-hook: $(libdir)/_libSALOME_Swig.so
-
-$(libdir)/_libSALOME_Swig.so:
- (cd $(libdir); ln -sf libSALOME_Swigcmodule.so _libSALOME_Swig.so;)
+++ /dev/null
-# Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-#
-#
-#
-# File : PyInterp.py
-# Author : Paul RASCLE, EDF
-# Module : SALOME
-# $Header$
-
-import sys
-from omniORB import CORBA
-from LifeCycleCORBA import *
-from libSALOME_Swig import *
-import SALOMEDS
-from SALOME_NamingServicePy import *
-
- #--------------------------------------------------------------------------
-
-def DumpComponent(Study, SO, offset):
- it = Study.NewChildIterator(SO)
- Builder = Study.NewBuilder()
- while it.More():
- CSO = it.Value()
- it.Next()
- anAttr = Builder.FindOrCreateAttribute(CSO, "AttributeName")
- AtName = anAttr._narrow(SALOMEDS.AttributeName)
- t_name = AtName.Value()
- if t_name[0] == 1:
- ofs = 1
- a = ""
- while ofs <= offset:
- a = a + "--"
- ofs = ofs +1
- print a + ">" + CSO.GetID() + " " + t_name[1]
- t_RefSO = CSO.ReferencedObject()
- if t_RefSO[0] == 1:
- RefSO = t_RefSO[1]
- ofs = 1
- a = ""
- while ofs <= offset:
- a = a + " "
- ofs = ofs +1
- print a + ">" + RefSO.GetID()
- DumpComponent(Study, CSO, offset+2)
-
- #--------------------------------------------------------------------------
-
-def DumpStudy(Study):
- itcomp = Study.NewComponentIterator()
- while itcomp.More():
- SC = itcomp.Value()
- itcomp.Next()
- name = SC.ComponentDataType()
- print "-> ComponentDataType is " + name
- DumpComponent(Study, SC, 1)
-
-
- #--------------------------------------------------------------------------
-
-# initialise the ORB
-orb = CORBA.ORB_init([''], CORBA.ORB_ID)
-
-# create an LifeCycleCORBA instance
-lcc = LifeCycleCORBA(orb)
-
-# create an SALOMEGUI_Swig instance
-sg = SALOMEGUI_Swig()
-
-#create an naming service instance
-naming_service = SALOME_NamingServicePy_i(orb)
-
-# get active study name and id
-myStudyName = sg.getActiveStudyName()
-print myStudyName
-
-myStudyId = sg.getActiveStudyId()
-print myStudyId
-
-# get Study Manager reference
-obj = naming_service.Resolve('myStudyManager')
-myStudyManager = obj._narrow(SALOMEDS.StudyManager)
-
-# get active study
-myStudy = myStudyManager.GetStudyByName(myStudyName)
-
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SALOMEGUI_Swig.cxx
-// Author : Vadim SANDLER
-// Module : SALOME
-// $Header$
-
-#include "SALOMEGUI_Swig.hxx"
-
-#include "SUIT_Session.h"
-#include "SUIT_Desktop.h"
-#include "SUIT_DataObjectIterator.h"
-#include "OB_Browser.h"
-#include "SalomeApp_Application.h"
-#include "SalomeApp_Study.h"
-#include "SalomeApp_Module.h"
-#include "SalomeApp_DataObject.h"
-#include "LightApp_SelectionMgr.h"
-#include "SALOME_Prs.h"
-#include "SOCC_ViewModel.h"
-#include "SVTK_ViewModel.h"
-#include "SVTK_ViewWindow.h"
-#include "SOCC_ViewWindow.h"
-#include "SPlot2d_ViewWindow.h"
-
-#include "SALOME_Event.hxx"
-#include "SALOME_ListIO.hxx"
-#include "SALOME_InteractiveObject.hxx"
-#include "SALOME_ListIteratorOfListIO.hxx"
-
-//#include "utilities.h"
-
-#include <SALOMEconfig.h>
-#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
-
-using namespace std;
-
-/*!
- asv : 3.12.04 : added checking for NULL GUI objects in almost all methods.
- In the scope of fixing bug PAL6869.
-
- (PR : modify comments)
- Instance of this class is created every time "import salome" line is typed
- - in IAPP embedded Python interpretor (SALOME_Session_Server executable),
- - in inline Python nodes in Supervisor (in SALOME_Container executable),
- - in stand-alone Python console outside any executable.
- SALOME GUI(desktop and other objects) is only available in SALOME_Session_Server
-
- VSR : 19.04.05 : Reimplemented for new SALOME GUI (SUIT-based)
- All methods are implemeted using Event mechanism.
- Display/Erase methods use SALOME_Prs/SALOME_View mechanism. It is currently
- implemented only for OCC and VTK viewers.
-*/
-
-/*!
- getApplication()
- Returns active application object [ static ]
-*/
-static SalomeApp_Application* getApplication() {
- if ( SUIT_Session::session() )
- return dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
- return NULL;
-}
-
-/*!
- getActiveStudy()
- Gets active study or 0 if there is no study opened [ static ]
-*/
-static SalomeApp_Study* getActiveStudy()
-{
- if ( getApplication() )
- return dynamic_cast<SalomeApp_Study*>( getApplication()->activeStudy() );
- return 0;
-}
-
-/*!
- SALOMEGUI_Swig::SALOMEGUI_Swig
- Constructor
-*/
-SALOMEGUI_Swig::SALOMEGUI_Swig()
-{
-}
-
-/*!
- SALOMEGUI_Swig::~SALOMEGUI_Swig
- Destructor
-*/
-SALOMEGUI_Swig::~SALOMEGUI_Swig()
-{
-}
-
-/*!
- SALOMEGUI_Swig::hasDesktop
- Returns TRUE if GUI is available.
-*/
-class THasDesktopEvent: public SALOME_Event {
-public:
- typedef bool TResult;
- TResult myResult;
- THasDesktopEvent() : myResult( false ) {}
- virtual void Execute() {
- myResult = (bool)( getApplication() && getApplication()->desktop() );
- }
-};
-
-/*!
- \return true if GUI is available.
-*/
-bool SALOMEGUI_Swig::hasDesktop()
-{
- return ProcessEvent( new THasDesktopEvent() );
-}
-
-/*!
- SALOMEGUI_Swig::updateObjBrowser
- Updates active study's Object Browser.
- VSR: updateSelection parameter is currently not used. Will be implemented or removed lately.
-*/
-void SALOMEGUI_Swig::updateObjBrowser( bool /*updateSelection*/ )
-{
- class TEvent: public SALOME_Event {
- public:
- TEvent() {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- anApp->updateObjectBrowser();
- anApp->updateActions(); //SRN: added in order to update the toolbar
- }
- }
- };
- ProcessVoidEvent( new TEvent() );
-}
-
-/*!
- SALOMEGUI_Swig::getActiveStudyId
- Returns active study's ID or 0 if there is no active study.
-*/
-class TGetActiveStudyIdEvent: public SALOME_Event {
-public:
- typedef int TResult;
- TResult myResult;
- TGetActiveStudyIdEvent() : myResult( 0 ) {}
- virtual void Execute() {
- if ( SalomeApp_Study* aStudy = getActiveStudy() ) {
- myResult = aStudy->studyDS()->StudyId();
- }
- }
-};
-
-/*!
- \return active study's ID or 0 if there is no active study.
-*/
-int SALOMEGUI_Swig::getActiveStudyId()
-{
- return ProcessEvent( new TGetActiveStudyIdEvent() );
-}
-
-/*!
- SALOMEGUI_Swig::getActiveStudyName
- Returns active study's name or NULL if there is no active study.
-*/
-class TGetActiveStudyNameEvent: public SALOME_Event {
-public:
- typedef string TResult;
- TResult myResult;
- TGetActiveStudyNameEvent() {}
- virtual void Execute() {
- if ( SalomeApp_Study* aStudy = getActiveStudy() ) {
- myResult = aStudy->studyDS()->Name();
- }
- }
-};
-
-/*!
- \return active study's name or NULL if there is no active study.
-*/
-const char* SALOMEGUI_Swig::getActiveStudyName()
-{
- string result = ProcessEvent( new TGetActiveStudyNameEvent() );
- return result.empty() ? NULL : result.c_str();
-}
-
-/*!
- SALOMEGUI_Swig::getComponentName
- Returns the name of the component by its user name.
-*/
-class TGetModulCatalogEvent: public SALOME_Event {
-public:
- typedef CORBA::Object_var TResult;
- TResult myResult;
- TGetModulCatalogEvent() : myResult(CORBA::Object::_nil()) {}
- virtual void Execute() {
- if (SalomeApp_Application* anApp = getApplication())
- myResult = anApp->namingService()->Resolve("/Kernel/ModulCatalog");
- }
-};
-
-/*!
- \return the name of the component by its user name.
-*/
-const char* SALOMEGUI_Swig::getComponentName( const char* componentUserName )
-{
- CORBA::Object_var anObject = ProcessEvent(new TGetModulCatalogEvent());
- if (!CORBA::is_nil(anObject)) {
- SALOME_ModuleCatalog::ModuleCatalog_var aCatalogue =
- SALOME_ModuleCatalog::ModuleCatalog::_narrow( anObject );
- SALOME_ModuleCatalog::ListOfIAPP_Affich_var aModules = aCatalogue->GetComponentIconeList();
- for ( unsigned int ind = 0; ind < aModules->length(); ind++ ) {
- CORBA::String_var aModuleName = aModules[ ind ].modulename;
- CORBA::String_var aModuleUserName = aModules[ ind ].moduleusername;
- if ( strcmp(componentUserName, aModuleUserName.in()) == 0 )
- return aModuleName._retn();
- }
- }
- return 0;
-}
-
-/*!
- SALOMEGUI_Swig::getComponentUserName
- Returns the user name of the component by its name.
-*/
-const char* SALOMEGUI_Swig::getComponentUserName( const char* componentName )
-{
- CORBA::Object_var anObject = ProcessEvent(new TGetModulCatalogEvent());
- if (!CORBA::is_nil(anObject)) {
- SALOME_ModuleCatalog::ModuleCatalog_var aCatalogue =
- SALOME_ModuleCatalog::ModuleCatalog::_narrow( anObject );
- SALOME_ModuleCatalog::ListOfIAPP_Affich_var aModules = aCatalogue->GetComponentIconeList();
- for ( unsigned int ind = 0; ind < aModules->length(); ind++ ) {
- CORBA::String_var aModuleName = aModules[ ind ].modulename;
- CORBA::String_var aModuleUserName = aModules[ ind ].moduleusername;
- if ( strcmp(componentName, aModuleName.in()) == 0 )
- return aModuleUserName._retn();
- }
- }
- return 0;
-}
-
-/*!
- SALOMEGUI_Swig::SelectedCount
- Returns the number of selected objects.
-*/
-class TSelectedCountEvent: public SALOME_Event {
-public:
- typedef int TResult;
- TResult myResult;
- TSelectedCountEvent() : myResult( 0 ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
- LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr();
- if ( aStudy && aSelMgr ) {
- SALOME_ListIO anIOList;
- aSelMgr->selectedObjects( anIOList );
- myResult = anIOList.Extent();
- }
- }
- }
-};
-
-/*!
- \return the number of selected objects.
-*/
-int SALOMEGUI_Swig::SelectedCount()
-{
- return ProcessEvent( new TSelectedCountEvent() );
-}
-
-/*!
- SALOMEGUI_Swig::getSelected
- Returns the selected object entry by the given index.
-*/
-class TGetSelectedEvent: public SALOME_Event {
-public:
- typedef QString TResult;
- TResult myResult;
- int myIndex;
- TGetSelectedEvent( int theIndex ) : myIndex( theIndex ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
- LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr();
- if ( aStudy && aSelMgr ) {
- SALOME_ListIO anIOList;
- aSelMgr->selectedObjects( anIOList );
- if ( myIndex < anIOList.Extent() ) {
- int index = 0;
- SALOME_ListIteratorOfListIO anIter( anIOList );
- for( ; anIter.More(); anIter.Next(), index++ ) {
- Handle(SALOME_InteractiveObject) anIO = anIter.Value();
- if ( myIndex == index ) {
- myResult = anIO->getEntry();
- return;
- }
- }
- }
- }
- }
- }
-};
-
-/*!
- \return the selected object entry by the given index.
-*/
-const char* SALOMEGUI_Swig::getSelected( int index )
-{
- QString result = ProcessEvent( new TGetSelectedEvent( index ) );
- return result.isEmpty() ? NULL : strdup(result.latin1());
-}
-
-/*!
- Adds an object with the given entry to the selection.
-*/
-void SALOMEGUI_Swig::AddIObject( const char* theEntry )
-{
- class TEvent: public SALOME_Event {
- public:
- QString myEntry;
- TEvent( const char* theEntry ) : myEntry( theEntry ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
- LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr();
- if ( aStudy && aSelMgr ) {
- SALOME_ListIO anIOList;
- anIOList.Append( new SALOME_InteractiveObject( myEntry, "", "" ) );
- aSelMgr->setSelectedObjects( anIOList, true );
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent( theEntry ) );
-}
-
-/*!
- Removes the object with the given entry from the selection.
-*/
-void SALOMEGUI_Swig::RemoveIObject( const char* theEntry )
-{
- class TEvent: public SALOME_Event {
- public:
- QString myEntry;
- TEvent( const char* theEntry ) : myEntry( theEntry ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
- LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr();
- if ( aStudy && aSelMgr ) {
- SALOME_ListIO anIOList;
- // VSR: temporary solution, until LightApp_SelectionMgr::unsetSelectedObjects() method appears
- // Lately this should be replaced by the following:
- // anIOList.Append( new SALOME_InteractiveObject( myEntry, "", "" ) );
- // aSelMgr->unsetSelectedObjects( anIOList );
- ///////////////////////////////////////////////
- aSelMgr->selectedObjects( anIOList );
- SALOME_ListIteratorOfListIO anIter( anIOList );
- for( ; anIter.More(); anIter.Next() ) {
- if ( anIter.Value()->isSame( new SALOME_InteractiveObject( myEntry, "", "" ) ) ) {
- anIOList.Remove( anIter );
- aSelMgr->setSelectedObjects( anIOList, true );
- return;
- }
- }
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent( theEntry ) );
-}
-
-/*!
- Clears selection.
-*/
-void SALOMEGUI_Swig::ClearIObjects()
-{
- class TEvent: public SALOME_Event {
- public:
- TEvent() {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
- LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr();
- if ( aStudy && aSelMgr )
- aSelMgr->clearSelected();
- }
- }
- };
- ProcessVoidEvent( new TEvent() );
-}
-
-/*!
- Displays an object in the current view window
- (the presentable object should be previously created and displayed in this viewer).
- VSR: For the current moment implemented for OCC and VTK viewers only.
-*/
-void SALOMEGUI_Swig::Display( const char* theEntry )
-{
- class TEvent: public SALOME_Event {
- QString myEntry;
- public:
- TEvent( const char* theEntry ) : myEntry( theEntry ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
- if ( window ) {
- SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
- if ( view )
- view->Display( view->CreatePrs( myEntry ) );
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent( theEntry ) );
-}
-
-/*!
- Displays an object in the current view window and erases all other
- (the presentable object should be previously created and displayed in this viewer).
- VSR: For the current moment implemented for OCC and VTK viewers only.
-*/
-void SALOMEGUI_Swig::DisplayOnly( const char* theEntry )
-{
- class TEvent: public SALOME_Event {
- QString myEntry;
- public:
- TEvent( const char* theEntry ) : myEntry( theEntry ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
- if ( window ) {
- SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
- if ( view ) {
- view->EraseAll( false );
- view->Display( view->CreatePrs( myEntry ) );
- }
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent( theEntry ) );
-}
-
-/*!
- Erases an object in the current view window
- (the presentable object should be previously created and displayed in this viewer).
- VSR: For the current moment implemented for OCC and VTK viewers only.
-*/
-void SALOMEGUI_Swig::Erase( const char* theEntry )
-{
- class TEvent: public SALOME_Event {
- QString myEntry;
- public:
- TEvent( const char* theEntry ) : myEntry( theEntry ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
- if ( window ) {
- SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
- if ( view )
- view->Erase( view->CreatePrs( myEntry ) );
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent( theEntry ) );
-}
-
-/*!
- Displays all active module's child objects in the current view window
- (the presentable objects should be previously created and displayed in this viewer).
- VSR: For the current moment implemented for OCC and VTK viewers only.
-*/
-void SALOMEGUI_Swig::DisplayAll()
-{
- class TEvent: public SALOME_Event {
- public:
- TEvent() {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
- SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
- SalomeApp_Module* activeModule = dynamic_cast<SalomeApp_Module*>( anApp->activeModule() );
- if ( study && window && activeModule ) {
- SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
- if ( view ) {
- for ( SUIT_DataObjectIterator it( activeModule->dataModel()->root(), SUIT_DataObjectIterator::DepthLeft ); it.current(); ++it ) {
- SalomeApp_DataObject* obj = dynamic_cast<SalomeApp_DataObject*>( it.current() );
- if ( obj && !obj->entry().isEmpty() )
- view->Display( view->CreatePrs( obj->entry() ) );
- }
- }
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent() );
-}
-
-/*!
- Erases all objects from the current view window
- VSR: For the current moment implemented for OCC and VTK viewers only.
-*/
-void SALOMEGUI_Swig::EraseAll()
-{
- class TEvent: public SALOME_Event {
- public:
- TEvent() {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
- if ( window ) {
- SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
- if ( view )
- view->EraseAll( false );
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent() );
-}
-
-/*!
- Returns TRUE if the object with given entry is in the current viewer.
- VSR: For the current moment implemented for OCC and VTK viewers only.
-*/
-class TIsInViewerEvent: public SALOME_Event {
- QString myEntry;
-public:
- typedef bool TResult;
- TResult myResult;
- TIsInViewerEvent( const char* theEntry ) : myEntry( theEntry ), myResult( false ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
- if ( window ) {
- SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
- if ( view ) {
- SALOME_Prs* aPrs = view->CreatePrs( myEntry );
- myResult = !aPrs->IsNull();
- }
- }
- }
- }
-};
-
-/*!
- \return TRUE if the object with given entry is in the current viewer.
- VSR: For the current moment implemented for OCC and VTK viewers only.
-*/
-bool SALOMEGUI_Swig::IsInCurrentView( const char* theEntry )
-{
- return ProcessEvent( new TIsInViewerEvent( theEntry ) );
-}
-
-/*!
- Updates (repaint) current view
-*/
-void SALOMEGUI_Swig::UpdateView()
-{
- class TEvent: public SALOME_Event {
- public:
- TEvent() {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
- if ( window ) {
- SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
- if ( view )
- view->Repaint();
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent() );
-}
-
-/*!
- Fit all the contents of the current view window
- */
-void SALOMEGUI_Swig::FitAll()
-{
- class TEvent: public SALOME_Event {
- public:
- TEvent() {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
- if ( window ) {
- if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
- (dynamic_cast<SVTK_ViewWindow*>( window ))->onFitAll();
- else if ( dynamic_cast<SOCC_ViewWindow*>( window ) )
- (dynamic_cast<SOCC_ViewWindow*>( window ))->onFitAll();
- else if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
- (dynamic_cast<SPlot2d_ViewWindow*>( window ))->onFitAll();
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent() );
-}
-
-/*!
- Reset current view window to the default state.
- */
-void SALOMEGUI_Swig::ResetView()
-{
- class TEvent: public SALOME_Event {
- public:
- TEvent() {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
- if ( window ) {
- if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
- (dynamic_cast<SVTK_ViewWindow*>( window ))->onResetView();
- else if ( dynamic_cast<SOCC_ViewWindow*>( window ) )
- (dynamic_cast<SOCC_ViewWindow*>( window ))->onResetView();
- else if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
- (dynamic_cast<SPlot2d_ViewWindow*>( window ))->onFitAll();
- // VSR: there is no 'ResetView' functionality for Plot2d viewer,
- // so we use 'FitAll' instead.
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent() );
-}
-
-enum {
- __ViewTop,
- __ViewBottom,
- __ViewLeft,
- __ViewRight,
- __ViewFront,
- __ViewBack
-};
-
-void setView( int view )
-{
- class TEvent: public SALOME_Event {
- private:
- int myView;
- public:
- TEvent( int view ) : myView( view ) {}
- virtual void Execute() {
- if ( SalomeApp_Application* anApp = getApplication() ) {
- SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
- if ( window ) {
- if ( dynamic_cast<SVTK_ViewWindow*>( window ) ) {
- switch( myView ) {
- case __ViewTop:
- (dynamic_cast<SVTK_ViewWindow*>( window ))->onTopView(); break;
- case __ViewBottom:
- (dynamic_cast<SVTK_ViewWindow*>( window ))->onBottomView(); break;
- case __ViewLeft:
- (dynamic_cast<SVTK_ViewWindow*>( window ))->onLeftView(); break;
- case __ViewRight:
- (dynamic_cast<SVTK_ViewWindow*>( window ))->onRightView(); break;
- case __ViewFront:
- (dynamic_cast<SVTK_ViewWindow*>( window ))->onFrontView(); break;
- case __ViewBack:
- (dynamic_cast<SVTK_ViewWindow*>( window ))->onBackView(); break;
- default:
- break;
- }
- }
- else if ( dynamic_cast<SOCC_ViewWindow*>( window ) ) {
- switch( myView ) {
- case __ViewTop:
- (dynamic_cast<SOCC_ViewWindow*>( window ))->onTopView(); break;
- case __ViewBottom:
- (dynamic_cast<SOCC_ViewWindow*>( window ))->onBottomView(); break;
- case __ViewLeft:
- (dynamic_cast<SOCC_ViewWindow*>( window ))->onLeftView(); break;
- case __ViewRight:
- (dynamic_cast<SOCC_ViewWindow*>( window ))->onRightView(); break;
- case __ViewFront:
- (dynamic_cast<SOCC_ViewWindow*>( window ))->onFrontView(); break;
- case __ViewBack:
- (dynamic_cast<SOCC_ViewWindow*>( window ))->onBackView(); break;
- default:
- break;
- }
- }
- }
- }
- }
- };
- ProcessVoidEvent( new TEvent( view ) );
-}
-
-/*!
- Switch current view window to show top view
- */
-void SALOMEGUI_Swig::ViewTop()
-{
- setView( __ViewTop );
-}
-
-/*!
- Switch current view window to show bottom view
- */
-void SALOMEGUI_Swig::ViewBottom()
-{
- setView( __ViewBottom );
-}
-
-/*!
- Switch current view window to show left view
- */
-void SALOMEGUI_Swig::ViewLeft()
-{
- setView( __ViewLeft );
-}
-
-/*!
- Switch current view window to show right view
- */
-void SALOMEGUI_Swig::ViewRight()
-{
- setView( __ViewRight );
-}
-
-/*!
- Switch current view window to show front view
- */
-void SALOMEGUI_Swig::ViewFront()
-{
- setView( __ViewFront );
-}
-
-/*!
- Switch current view window to show back view
- */
-void SALOMEGUI_Swig::ViewBack()
-{
- setView( __ViewBack );
-}
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SALOMEGUI_Swig.hxx
-// Author : Vadim SANDLER
-// Module : SALOME
-// $Header$
-
-#ifndef SALOMEGUI_SWIG_HXX
-#define SALOMEGUI_SWIG_HXX
-
-class SALOMEGUI_Swig
-{
-public:
- /* construction/destruction */
- SALOMEGUI_Swig();
- ~SALOMEGUI_Swig();
-
- /* check GUI */
- bool hasDesktop();
-
- /* update object browser*/
- void updateObjBrowser( bool updateSelection );
-
- /* get active study */
- int getActiveStudyId();
- const char* getActiveStudyName();
-
- /* selection processing */
- int SelectedCount();
- const char* getSelected(int i);
- void AddIObject( const char *Entry );
- void RemoveIObject( const char *Entry );
- void ClearIObjects();
-
- /* display/erase */
- void Display( const char *Entry );
- void DisplayOnly( const char *Entry );
- void Erase( const char *Entry );
- void DisplayAll();
- void EraseAll();
- bool IsInCurrentView( const char *Entry );
- void UpdateView();
-
- /* view operations */
- void FitAll();
- void ResetView();
- void ViewTop();
- void ViewBottom();
- void ViewLeft();
- void ViewRight();
- void ViewFront();
- void ViewBack();
-
- /* get component name/username */
- const char* getComponentName( const char* ComponentUserName );
- const char* getComponentUserName( const char* ComponentName );
-};
-
-#endif // SALOMEGUI_SWIG_HXX
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SALOMEGUI_Swig.i
-// Author : Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-
-%{
-#include "SALOMEGUI_Swig.hxx"
-%}
-
-%include "cpointer.i"
-
-/* Exception handler for all functions */
-%exception {
- class PyAllowThreadsGuard {
- public:
- // Py_BEGIN_ALLOW_THREADS
- PyAllowThreadsGuard() { _save = PyEval_SaveThread(); }
- // Py_END_ALLOW_THREADS
- ~PyAllowThreadsGuard() { PyEval_RestoreThread(_save); }
- private:
- PyThreadState *_save;
- };
-
- PyAllowThreadsGuard guard;
-
- $action
-}
-
-class SALOMEGUI_Swig
-{
- public:
-/* construction/destruction */
- SALOMEGUI_Swig();
- ~SALOMEGUI_Swig();
-
-/* check GUI */
- bool hasDesktop();
-
-/* update object browser*/
- void updateObjBrowser(bool);
-
-/* get active study */
- int getActiveStudyId();
- const char *getActiveStudyName();
-
-/* selection processing */
- int SelectedCount();
- const char *getSelected(int i);
- void AddIObject(const char *Entry);
- void RemoveIObject(const char *Entry);
- void ClearIObjects();
-
-/* display/erase */
- void Display(const char *Entry);
- void DisplayOnly(const char *Entry);
- void Erase(const char *Entry);
- void DisplayAll();
- void EraseAll();
- bool IsInCurrentView(const char *Entry);
- void UpdateView();
-
-/* view operations */
- void FitAll();
- void ResetView();
- void ViewTop();
- void ViewBottom();
- void ViewLeft();
- void ViewRight();
- void ViewFront();
- void ViewBack();
-
-/* get component name/username */
- const char* getComponentName( const char* ComponentUserName );
- const char* getComponentUserName( const char* ComponentName );
-};
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-"""
-
-"""
-
-import SALOME_Session_idl
-
-from import_hook import register_name
-register_name("SalomePyQt")
-
-# this function is required
-
-def init_shared_modules():
- """
- This function initializes shared modules that need to be
- """
- pass
+++ /dev/null
-# Copyright (C) 2003 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
-#
-#
-#
-# File : examplevtk1.py
-# Module : SALOME
-
-import libSalomePy
-ren=libSalomePy.renderer
-#iren=libSalomePy.interactor
-
-from libVTKCommonPython import *
-from libVTKGraphicsPython import *
-cone = vtkConeSource()
-cone.SetResolution(8)
-coneMapper = vtkPolyDataMapper()
-coneMapper.SetInput(cone.GetOutput())
-coneActor = vtkActor()
-coneActor.SetMapper(coneMapper)
-
-ren.AddActor(coneActor)
-iren = vtkRenderWindowInteractor()
-
+++ /dev/null
-// Copyright (C) 2003 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
-//
-//
-//
-// File : libSALOME_Swig.i
-// Author : Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-
-%module libSALOME_Swig
-
-//%include "SALOME_NamingService.i"
-%include "SALOMEGUI_Swig.i"
-
+++ /dev/null
-# Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-#
-#
-#
-# File : salome.py
-# Author : Paul RASCLE, EDF
-# Module : SALOME
-# $Header$
-
-from omniORB import CORBA
-from LifeCycleCORBA import *
-from libSALOME_Swig import *
-import SALOMEDS
-from SALOME_NamingServicePy import *
-
-from SALOME_utilities import *
-
-#--------------------------------------------------------------------------
-
-def DumpComponent(Study, SO, offset):
- it = Study.NewChildIterator(SO)
- Builder = Study.NewBuilder()
- while it.More():
- CSO = it.Value()
- it.Next()
- anAttr = Builder.FindOrCreateAttribute(CSO, "AttributeName")
- AtName = anAttr._narrow(SALOMEDS.AttributeName)
- t_name = AtName.Value()
- if t_name[0] == 1:
- ofs = 1
- a = ""
- while ofs <= offset:
- a = a + "--"
- ofs = ofs +1
- MESSAGE( a + ">" + str(CSO.GetID()) + " " + str(t_name[1]) )
- t_RefSO = CSO.ReferencedObject()
- if t_RefSO[0] == 1:
- RefSO = t_RefSO[1]
- ofs = 1
- a = ""
- while ofs <= offset:
- a = a + " "
- ofs = ofs +1
- MESSAGE( a + ">" + str(RefSO.GetID()) )
- DumpComponent(Study, CSO, offset+2)
-
- #--------------------------------------------------------------------------
-
-def DumpStudy(Study):
- itcomp = Study.NewComponentIterator()
- while itcomp.More():
- SC = itcomp.Value()
- itcomp.Next()
- name = SC.ComponentDataType()
- MESSAGE( "-> ComponentDataType is " + name )
- DumpComponent(Study, SC, 1)
-
-
- #--------------------------------------------------------------------------
-
-def ImportComponentGUI(ComponentName):
- libName = "lib" + ComponentName + "_Swig"
- command = "from " + libName + " import *"
- exec ( command )
- constructor = ComponentName + "_Swig()"
- command = "gui = " + constructor
- exec ( command )
- return gui
-
- #--------------------------------------------------------------------------
-
-def SalomeGUIgetAllSelected(self):
- selNumber = self.SelectedCount()
- listSelected = []
- for i in range(selNumber):
- listSelected.append(self.getSelected(i))
- return listSelected
-
-class SalomeGUI(SALOMEGUI_Swig):
- getAllSelected = SalomeGUIgetAllSelected
-
- #--------------------------------------------------------------------------
-
-def IDToObject(id):
- myObj = None
- mySO = myStudy.FindObjectID(id);
- if mySO is not None:
- ok, anAttr = mySO.FindAttribute("AttributeIOR")
- if ok:
- AtIOR = anAttr._narrow(SALOMEDS.AttributeIOR)
- if AtIOR.Value() != "":
- myObj = orb.string_to_object(AtIOR.Value())
- return myObj
-
-def ObjectToSObject(obj):
- mySO = None
- if obj is not None:
- ior = orb.object_to_string(obj)
- if ior != "":
- mySO = myStudy.FindObjectIOR(ior)
- return mySO
-
-def ObjectToID(obj):
- mySO = ObjectToSObject(obj)
- if mySO:
- return mySO.GetID()
- return ""
-
-def IDToSObject(id):
- mySO = myStudy.FindObjectID(id);
- return mySO
-
- #--------------------------------------------------------------------------
-
-# initialise the ORB
-orb = CORBA.ORB_init([''], CORBA.ORB_ID)
-
-# create an LifeCycleCORBA instance
-lcc = LifeCycleCORBA(orb)
-
-# create an SALOMEGUI_Swig instance
-sg = SalomeGUI()
-
-#create an naming service instance
-naming_service = SALOME_NamingServicePy_i(orb)
-
-# get active study name and id
-myStudyName = sg.getActiveStudyName()
-MESSAGE( myStudyName )
-
-myStudyId = sg.getActiveStudyId()
-MESSAGE( str(myStudyId) )
-
-# get Study Manager reference
-obj = naming_service.Resolve('myStudyManager')
-myStudyManager = obj._narrow(SALOMEDS.StudyManager)
-
-# get active study
-myStudy = myStudyManager.GetStudyByName(myStudyName)
-
+++ /dev/null
-#==============================================================================
-# File : supervisionexample.py
-# Created : 23 nov 2001
-# Author : Jean Rahuel
-# Project : SALOME
-# Copyright : CEA
-#==============================================================================
-
-from SuperV import *
-
-
-
-# load this object with Nodes, Links and Datas stored in GraphEssai.xml
-# (GraphEssai.xml was created with python in SuperVisionTest and GraphEssai.py)
-myGraph = Graph("@ROOT_BUILDDIR@/share/salome/resources/superv/GraphEssai.xml")
-
-#myGraph = Graph("/home/data/jr_HEAD/build/share/salome/resources/superv/GraphEssai.xml")
-# This DataFlow is "valid" : no loop, correct links between Nodes etc...
-
-print myGraph.IsValid()
-
-# Get Nodes
-myGraph.PrintNodes()
-Add,Sub,Mul,Div = myGraph.Nodes()
-
-# Load Datas
-Addx = Add.Input("x",3.)
-Addy = Add.Input("y",4.5)
-Subx = Sub.Input("x",1.5)
-
-# Get Output Port
-Addz = Add.Port('z')
-Subz = Sub.Port('z')
-Mulz = Mul.Port('z')
-Divz = Div.Port('z')
-
-# This DataFlow is "executable" : all pending Ports are defined with Datas
-print myGraph.IsExecutable()
-
-# Starts only execution of that DataFlow and gets control immediatly
-print myGraph.Run()
-
-# That DataFlow is running ==> 0 (false)
-print myGraph.IsDone()
-
-# Events of execution :
-aStatus,aNode,anEvent,aState = myGraph.Event()
-while aStatus :
- print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState
- aStatus,aNode,anEvent,aState = myGraph.Event()
-print myGraph.IsDone()
-
-# Wait for Completion (but it is already done after event loop ...)
-print "Done : ",myGraph.DoneW()
-
-# Get result
-print "Result : ",Divz.ToString()
-
-# Intermediate results :
-print "Intermediate Result Add\z : ",Addz.ToString()
-print "Intermediate Result Sub\z : ",Subz.ToString()
-print "Intermediate Result Mul\z : ",Mulz.ToString()
-
-print " "
-print "Type : print myGraph.IsDone()"
-print " If execution is finished ==> 1 (true)"
-print " "
-print "Type : print Divz.ToString()"
-print " You will get the result"
-print " "
-print "Type : myGraph.PrintPorts()"
-print " to see input and output values of the graph"
-print " "
-print "Type : Add.PrintPorts()"
-print "Type : Sub.PrintPorts()"
-print "Type : Mul.PrintPorts()"
-print "Type : Div.PrintPorts()"
-print " to see input and output values of nodes"
-
-# Export will create newsupervisionexample.xml and the corresponding .py file
-print myGraph.Export("@ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.xml")
-
-print " "
-print "See file @ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.xml"
-print "See file @ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.py"
+++ /dev/null
-
-# Generated python file of Graph GraphGeom2Essai
-
-from SuperV import *
-
-import salome
-
-import geompy
-
-
-geom = lcc.FindOrLoadComponent("FactoryServer", "Geometry")
-geom.GetCurrentStudy(salome.myStudyId)
-
-myBuilder = salome.myStudy.NewBuilder()
-
-# Graph creation
-GraphGeom2Essai = Graph( 'GraphGeom2Essai' )
-print GraphGeom2Essai.SetAuthor( '' )
-print GraphGeom2Essai.SetComment( '' )
-GraphGeom2Essai.Coords( 0 , 0 )
-
-# Creation of Nodes
-MakeSphere = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeSphere' )
-print MakeSphere.SetAuthor( '' )
-print MakeSphere.SetContainer( 'FactoryServer' )
-print MakeSphere.SetComment( '' )
-MakeSphere.Coords( 26 , 13 )
-MakeCopy = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeCopy' )
-print MakeCopy.SetAuthor( '' )
-print MakeCopy.SetContainer( 'FactoryServer' )
-print MakeCopy.SetComment( '' )
-MakeCopy.Coords( 219 , 12 )
-MakeTranslation = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeTranslation' )
-print MakeTranslation.SetAuthor( '' )
-print MakeTranslation.SetContainer( 'FactoryServer' )
-print MakeTranslation.SetComment( '' )
-MakeTranslation.Coords( 219 , 159 )
-MakeFuse = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeFuse' )
-print MakeFuse.SetAuthor( '' )
-print MakeFuse.SetContainer( 'FactoryServer' )
-print MakeFuse.SetComment( '' )
-MakeFuse.Coords( 465 , 106 )
-
-# Creation of intermediate Output variables and of links
-MakeSphereshape = MakeSphere.Port( 'shape' )
-MakeCopyshape1 = GraphGeom2Essai.Link( MakeSphereshape , MakeCopy.Port( 'shape1' ) )
-MakeTranslationshape1 = GraphGeom2Essai.Link( MakeSphereshape , MakeTranslation.Port( 'shape1' ) )
-MakeCopyshape = MakeCopy.Port( 'shape' )
-MakeFuseshape1 = GraphGeom2Essai.Link( MakeCopyshape , MakeFuse.Port( 'shape1' ) )
-MakeTranslationshape = MakeTranslation.Port( 'shape' )
-MakeFuseshape2 = GraphGeom2Essai.Link( MakeTranslationshape , MakeFuse.Port( 'shape2' ) )
-
-# Creation of Input datas
-MakeSpherex1 = MakeSphere.Input( 'x1' , 0)
-MakeSpherey1 = MakeSphere.Input( 'y1' , 0)
-MakeSpherez1 = MakeSphere.Input( 'z1' , 0)
-MakeSphereradius = MakeSphere.Input( 'radius' , 50)
-MakeTranslationx1 = MakeTranslation.Input( 'x1' , 80)
-MakeTranslationy1 = MakeTranslation.Input( 'y1' , 0)
-MakeTranslationz1 = MakeTranslation.Input( 'z1' , 0)
-
-# Missing Input datas : None
-
-# Creation of Output variables
-MakeFuseshape = MakeFuse.Port( 'shape' )
-
-# State of Ports of the Graph
-GraphGeom2Essai.PrintPorts()
-
-# Start asynchronous run
-print GraphGeom2Essai.Run()
-
-# Done ?
-print GraphGeom2Essai.IsDone()
-
-# Events of execution :
-aStatus,aNode,anEvent,aState = GraphGeom2Essai.Event()
-while aStatus :
- print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState
- aStatus,aNode,anEvent,aState = GraphGeom2Essai.Event()
-print GraphGeom2Essai.IsDone()
-
-# Waiting end of execution :
-print GraphGeom2Essai.DoneW()
-
-print " "
-print "Type print GraphGeom2Essai.IsDone()"
-print "1 <==> It's done"
-print " "
-print "Type print GraphGeom2Essai.DoneW()"
-print "Wait until end of execution : 1(success)"
-print " "
-print "Type GraphGeom2Essai.PrintPorts()"
-print " to see input and output values of the graph"
-print " "
-print "Type MakeSphere.PrintPorts()"
-print "Type MakeCopy.PrintPorts()"
-print "Type MakeTranslation.PrintPorts()"
-print "Type MakeFuse.PrintPorts()"
-print " to see input and output values of nodes"
-print " "
-print "Type print GraphGeom2Essai.Export('File-Name')"
-print "You will get a .py and a .xml file of this graph"
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-#
-# 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
-#
-# File : test_big_table.py
-# Author : Vadim SANDLER
-# Module : SALOME
-# $Header$
-
-import salome
-import math
-import SALOMEDS
-
-# >>> Getting study builder ==================================================
-myStudy = salome.myStudy
-myBuilder = myStudy.NewBuilder()
-
-# >>> Creating virtual component =============================================
-myComponent = myStudy.FindComponent("VirtualComponent")
-if not myComponent:
- myComponent = myBuilder.NewComponent("VirtualComponent")
- aName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName")
- aName.SetValue("VirtualComponent")
-
-# >>> Creating object with Table of real[ 200 * 20 ] ========================
-myTRealObject = myBuilder.NewObject(myComponent)
-AName = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeName")
-AName.SetValue("Table Of Real")
-ARealTable = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeTableOfReal")
-myHorNb = 10
-myVerNb = 200
-
-k={}
-for j in range(0,myHorNb):
- k[j] = j*10+1
-ARealTable.AddRow(k.values())
-ARealTable.SetRowTitle(1, "Frequency")
-ARealTable.SetRowUnit(1, "Hz")
-
-for i in range(1,myVerNb+1):
- for j in range(0,myHorNb):
- if j % 2 == 1:
- k[j] = math.log10(j*30*math.pi/180) * 20 + i * 15 + j*5
- else:
- k[j] = math.sin(j*30*math.pi/180) * 20 + i * 15 + j*5
- ARealTable.AddRow(k.values())
- ARealTable.SetRowTitle(i+1, "Power " + str(i))
- ARealTable.SetRowUnit(i+1, "Wt")
-ARealTable.SetTitle("Very useful data")
-
-# >>> Updating Object Browser ================================================
-salome.sg.updateObjBrowser(1)
-
-# ============================================================================
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-#
-# 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
-#
-# File : visu_many_objects.py
-# Author : Vadim SANDLER
-# Module : SALOME
-# $Header$
-
-import salome
-import SALOMEDS
-
-# >>> Getting study builder ==================================================
-myStudy = salome.myStudy
-myBuilder = myStudy.NewBuilder()
-
-# >>> Creating virtual component =============================================
-myComponent = myBuilder.NewComponent("VIRTUAL")
-AName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName")
-AName.SetValue("Virtual")
-ACmt = myBuilder.FindOrCreateAttribute(myComponent, "AttributeComment")
-ACmt.SetValue("Virtual")
-
-# >>> Creating objects =======================================================
-# TO CHANGE TOTAL NUMBER OF OBJECTS, SET PROPER <myNb1>, <myNb2>, <myNb3>
-# IF YOU DON'T WANT TO ADD REFERENCES, SET <myAddRef> = 0
-myNb1 = 20
-myNb2 = 5
-myNb3 = 3
-myAddRef = 1
-
-if myAddRef == 1:
- myContainer = myBuilder.NewObject(myComponent)
- AName = myBuilder.FindOrCreateAttribute(myContainer, "AttributeName")
- AName.SetValue("References")
- ACmt = myBuilder.FindOrCreateAttribute(myContainer, "AttributeComment")
- ACmt.SetValue("Container for objects")
-
-for i in range(0,myNb1):
- myObject1 = myBuilder.NewObject(myComponent)
- AName = myBuilder.FindOrCreateAttribute(myObject1, "AttributeName")
- AName.SetValue("Object "+str(i))
- ACmt = myBuilder.FindOrCreateAttribute(myObject1, "AttributeComment")
- ACmt.SetValue("Virtual object "+str(i))
- if myAddRef == 1:
- myRefObject = myBuilder.NewObject(myContainer)
- myBuilder.Addreference(myRefObject,myObject1);
-
- for j in range(0,myNb2):
- myObject2 = myBuilder.NewObject(myObject1)
- AName = myBuilder.FindOrCreateAttribute(myObject2, "AttributeName")
- AName.SetValue("Object "+str(i)+"-"+str(j))
- ACmt = myBuilder.FindOrCreateAttribute(myObject2, "AttributeComment")
- ACmt.SetValue("Virtual object "+str(i)+"-"+str(j))
- if myAddRef == 1:
- myRefObject = myBuilder.NewObject(myContainer)
- myBuilder.Addreference(myRefObject,myObject2);
-
- for k in range(0,myNb3):
- myObject3 = myBuilder.NewObject(myObject2)
- AName = myBuilder.FindOrCreateAttribute(myObject3, "AttributeName")
- AName.SetValue("Object "+str(i)+"-"+str(j)+"-"+str(k))
- ACmt = myBuilder.FindOrCreateAttribute(myObject3, "AttributeComment")
- ACmt.SetValue("Virtual object "+str(i)+"-"+str(j)+"-"+str(k))
- if myAddRef == 1:
- myRefObject = myBuilder.NewObject(myContainer)
- myBuilder.Addreference(myRefObject,myObject3);
-
-# >>> Updating Object Browser ================================================
-salome.sg.updateObjBrowser(1)
-
-# ============================================================================
-
-
+++ /dev/null
-# Copyright (C) 2003 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
-#
-#
-#
-# File : test_remove_ref.py
-# Module : SALOMEDS
-
-from salome import *
-
-myBuilder = myStudy.NewBuilder()
-
-
-obj1 = myStudy.FindObjectID("0:1")
-if obj1 is None: print "Is null obj1 "
-else: print obj1.GetID()
-
-obj2 = myBuilder.NewObject(obj1)
-print "Obj2 ID = "+obj2.GetID()
-
-myBuilder.Addreference(obj1, obj2)
-
-(f, obj3) = obj1.ReferencedObject()
-
-print "Ref obj ID = "+obj3.GetID()
-
-
-myBuilder.RemoveReference(obj1)
-
-(f, obj4) = obj1.ReferencedObject()
-
-print "Ref is found ", f
-
\ No newline at end of file
+++ /dev/null
-# Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-#
-# 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
-#
-# File : test_table.py
-# Author : Vadim SANDLER
-# Module : SALOME
-# $Header$
-
-import salome
-import math
-import SALOMEDS
-
-# >>> Getting study builder ==================================================
-myStudy = salome.myStudy
-myBuilder = myStudy.NewBuilder()
-
-# >>> Creating virtual component =============================================
-myComponent = myStudy.FindComponent("VirtualComponent")
-if not myComponent:
- myComponent = myBuilder.NewComponent("VirtualComponent")
- aName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName")
- aName.SetValue("VirtualComponent")
-
-# >>> Creating object with Table of integer ==================================
-myTIntObject = myBuilder.NewObject(myComponent)
-AName = myBuilder.FindOrCreateAttribute(myTIntObject, "AttributeName")
-AName.SetValue("Table Of Integer")
-AIntTable = myBuilder.FindOrCreateAttribute(myTIntObject, "AttributeTableOfInteger")
-
-a=[1,2,3,4,5,6,7,8,9,10]
-AIntTable.AddRow(a)
-a=[110,120,130,140,150,160,170,180,190,200]
-AIntTable.AddRow(a)
-a=[-1,272,0,0,-642,10000,13,578,-578,99]
-AIntTable.AddRow(a)
-AIntTable.SetTitle("TEST table of integer")
-AIntTable.SetRowTitle(1,"FR")
-AIntTable.SetRowUnit(1,"m/h")
-AIntTable.SetRowTitle(2,"SR")
-AIntTable.SetRowUnit(2,"s")
-AIntTable.SetRowTitle(3,"TR")
-AIntTable.SetRowUnit(3,"$")
-c=["C1","C2","C3","C4","C5","C6","C7","C8","C9","C10"]
-AIntTable.SetColumnTitles(c)
-
-# >>> Creating object with Table of real =====================================
-myTRealObject = myBuilder.NewObject(myComponent)
-AName = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeName")
-AName.SetValue("Table Of Real")
-ARealTable = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeTableOfReal")
-
-k={}
-l={}
-for j in range(0,20):
- k[j] = j*10+1
- l[j] = "C"+str(j+1)
-ARealTable.AddRow(k.values())
-ARealTable.SetRowTitle(1, "Row 0")
-ARealTable.SetRowUnit(1, "Hz")
-ARealTable.SetColumnTitles(l.values())
-for i in range(1,11):
- for j in range(1,21):
- if j % 2 == 1:
- k[j] = math.log10(j*30*math.pi/180) * 20 + i * 15 + j*5
- else:
- k[j] = math.sin(j*30*math.pi/180) * 20 + i * 15 + j*5
- ARealTable.AddRow(k.values())
- ARealTable.SetRowTitle(i+1, "Row " + str(i))
- ARealTable.SetRowUnit(i+1, "Wt")
-ARealTable.SetTitle("TEST table of real")
-
-# >>> Creating object with integer attribute =================================
-myIntObject = myBuilder.NewObject(myComponent)
-AName = myBuilder.FindOrCreateAttribute(myIntObject, "AttributeName")
-AName.SetValue("Integer")
-AInt = myBuilder.FindOrCreateAttribute(myIntObject, "AttributeInteger")
-AInt.SetValue(123)
-
-# >>> Creating object with real attribute ====================================
-myRealObject = myBuilder.NewObject(myComponent)
-AName = myBuilder.FindOrCreateAttribute(myRealObject, "AttributeName")
-AName.SetValue("Real")
-AReal = myBuilder.FindOrCreateAttribute(myRealObject, "AttributeReal")
-AReal.SetValue(-56.9634)
-
-# >>> Creating object with comment attribute =================================
-myCmtObject = myBuilder.NewObject(myComponent)
-AName = myBuilder.FindOrCreateAttribute(myCmtObject, "AttributeName")
-AName.SetValue("Comment")
-ACmt = myBuilder.FindOrCreateAttribute(myCmtObject, "AttributeComment")
-ACmt.SetValue("Just a comment")
-
-# >>> Updating Object Browser ================================================
-salome.sg.updateObjBrowser(1)
-
-# ============================================================================
-
-
-
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Alexander Solovyov(OCN)
-# Module : SOCC
-# $Header: /dn06/SALOME_CVS/GUI_SRC/src/SOCC/Makefile.in,v 1.1
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES=libSOCC.la
-
-salomeinclude_HEADERS= \
- SOCC.h \
- SOCC_ViewModel.h \
- SOCC_Prs.h \
- SOCC_ViewWindow.h
-
-dist_libSOCC_la_SOURCES= \
- SOCC_ViewModel.cxx \
- SOCC_Prs.cxx \
- SOCC_ViewWindow.cxx
-
-MOC_FILES= \
- SOCC_ViewModel_moc.cxx \
- SOCC_ViewWindow_moc.cxx
-nodist_libSOCC_la_SOURCES= $(MOC_FILES)
-
-libSOCC_la_CPPFLAGS=$(QT_INCLUDES) $(CAS_CPPFLAGS) $(BOOST_CPPFLAGS) \
- -I$(srcdir)/../SUIT -I$(srcdir)/../OBJECT -I$(srcdir)/../Prs \
- -I$(srcdir)/../OCCViewer -I$(srcdir)/../Qtx
-
-libSOCC_la_LDFLAGS=$(QT_MT_LIBS)
-libSOCC_la_LIBADD= ../SUIT/libsuit.la ../OBJECT/libSalomeObject.la \
- ../Prs/libSalomePrs.la ../OCCViewer/libOCCViewer.la
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-#ifdef WNT
-#ifdef SOCC_EXPORTS
-#define SOCC_EXPORT __declspec(dllexport)
-#else
-#define SOCC_EXPORT __declspec(dllimport)
-#endif
-#else
-#define SOCC_EXPORT
-#endif
-
-#if defined WNT
-#pragma warning ( disable: 4251 )
-#endif
+++ /dev/null
-// SALOME OCCViewer : build OCC Viewer into Salome desktop
-//
-// Copyright (C) 2004 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
-//
-//
-//
-// File : SOCC_Prs.cxx
-// Author : Sergey ANIKIN
-// Module : SALOME
-// $Header$
-
-#include "SOCC_Prs.h"
-using namespace std;
-
-/*!
- Default constructor
-*/
-SOCC_Prs::SOCC_Prs()
-{
- myToActivate = true;
-}
-
-/*!
- Standard constructor
-*/
-SOCC_Prs::SOCC_Prs( const Handle(AIS_InteractiveObject)& obj )
-{
- AddObject( obj );
-}
-
-/*!
- Destructor
-*/
-SOCC_Prs::~SOCC_Prs()
-{
- myObjects.Clear();
-}
-
-/*!
- Get interactive objects list
-*/
-void SOCC_Prs::GetObjects( AIS_ListOfInteractive& list ) const
-{
- list = myObjects;
-}
-
-/*!
- Add interactive object
-*/
-void SOCC_Prs::AddObject( const Handle(AIS_InteractiveObject)& obj )
-{
- myObjects.Append( obj );
-}
-
-/*!
- \return 0 if list of the interactive objects is empty [ Reimplemented from SALOME_Prs ]
-*/
-bool SOCC_Prs::IsNull() const
-{
- return myObjects.IsEmpty() == Standard_True;
-}
-
-/*!
- This method is used for activisation/deactivisation of
- objects in the moment of displaying
-*/
-void SOCC_Prs::SetToActivate( const bool toActivate )
-{
- myToActivate = toActivate;
-}
-
-bool SOCC_Prs::ToActivate() const
-{
- return myToActivate;
-}
+++ /dev/null
-// SALOME OCCViewer : build OCC Viewer into Salome desktop
-//
-// Copyright (C) 2004 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
-//
-//
-//
-// File : SOCC_Prs.h
-// Author : Sergey ANIKIN
-// Module : SALOME
-// $Header$
-
-#ifndef SOCC_Prs_H
-#define SOCC_Prs_H
-
-#include "SOCC.h"
-
-#include <SALOME_Prs.h>
-
-#include <AIS_InteractiveObject.hxx>
-#include <AIS_ListOfInteractive.hxx>
-
-class SOCC_EXPORT SOCC_Prs : public SALOME_OCCPrs
-{
-public:
- SOCC_Prs();
- // Default constructor
- SOCC_Prs( const Handle(AIS_InteractiveObject)& obj );
- // Standard constructor
- ~SOCC_Prs();
- // Destructor
-
- void GetObjects( AIS_ListOfInteractive& list ) const;
- // Get interactive objects list
- void AddObject( const Handle(AIS_InteractiveObject)& obj );
- // Add interactive object
-
- bool IsNull() const;
- // Reimplemented from SALOME_Prs
-
- /* This method is used for activisation/deactivisation of
- objects in the moment of displaying */
- void SetToActivate( const bool );
- bool ToActivate() const;
-
-private:
- AIS_ListOfInteractive myObjects; // list of interactive objects
- bool myToActivate;
-};
-
-#endif
-
-
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SOCC_ViewModel.h"
-
-#include "SOCC_Prs.h"
-#include "SOCC_ViewWindow.h"
-
-#include "SUIT_Session.h"
-#include "SUIT_Application.h"
-
-//#include "ToolsGUI.h"
-
-// Temporarily commented to avoid awful dependecy on SALOMEDS
-// TODO: better mechanism of storing display/erse status in a study
-// should be provided...
-//#include <SALOMEconfig.h>
-//#include CORBA_CLIENT_HEADER(SALOMEDS)
-
-#include <AIS_ListIteratorOfListOfInteractive.hxx>
-#include <Visual3d_View.hxx>
-
-#include <SALOME_AISShape.hxx>
-#include <SALOME_AISObject.hxx>
-
-// Temporarily commented to avoid awful dependecy on SALOMEDS
-// TODO: better mechanism of storing display/erse status in a study
-// should be provided...
-//#include <Utils_ORB_INIT.hxx>
-//#include <Utils_SINGLETON.hxx>
-//#include <SALOME_ModuleCatalog_impl.hxx>
-//#include <SALOME_NamingService.hxx>
-
-//#include "SALOMEDSClient.hxx"
-//#include "SALOMEDS_StudyManager.hxx"
-
-#include <AIS_TypeOfIso.hxx>
-
-// in order NOT TO link with SalomeApp, here the code returns SALOMEDS_Study.
-// SalomeApp_Study::studyDS() does it as well, but -- here it is retrieved from
-// SALOMEDS::StudyManager - no linkage with SalomeApp.
-
-// Temporarily commented to avoid awful dependecy on SALOMEDS
-// TODO: better mechanism of storing display/erse status in a study
-// should be provided...
-//static _PTR(Study) getStudyDS()
-//{
-// SALOMEDSClient_Study* aStudy = NULL;
-// _PTR(StudyManager) aMgr( new SALOMEDS_StudyManager() );
-
- // get id of SUIT_Study, if it's a SalomeApp_Study, it will return
- // id of its underlying SALOMEDS::Study
-// SUIT_Application* app = SUIT_Session::session()->activeApplication();
-// if ( !app ) return _PTR(Study)(aStudy);
-// SUIT_Study* stud = app->activeStudy();
-// if ( !stud ) return _PTR(Study)(aStudy);
-// const int id = stud->id(); // virtual method, must return SALOMEDS_Study id
- // get SALOMEDS_Study with this id from StudyMgr
-// return aMgr->GetStudyByID( id );
-//}
-
-/*!
- Constructor
- \param DisplayTrihedron - is trihedron displayed
-*/
-SOCC_Viewer::SOCC_Viewer( bool DisplayTrihedron )
-: OCCViewer_Viewer( DisplayTrihedron )
-{
-}
-
-/*!
- Destructor
-*/
-SOCC_Viewer::~SOCC_Viewer()
-{
-}
-
-/*!
- Hilights/unhilights object in viewer
- \param obj - object to be updated
- \param hilight - if it is true, object will be hilighted, otherwise it will be unhilighted
- \param update - update current viewer
-*/
-bool SOCC_Viewer::highlight( const Handle(SALOME_InteractiveObject)& obj,
- bool hilight, bool upd )
-{
- bool isInLocal = getAISContext()->HasOpenedContext();
- //SUIT_Study* ActiveStudy = SUIT_Application::getDesktop()->getActiveStudy();
- //SALOME_Selection* Sel = SALOME_Selection::Selection( ActiveStudy->getSelection() );
-
- AIS_ListOfInteractive List;
- getAISContext()->DisplayedObjects(List);
-
- AIS_ListIteratorOfListOfInteractive ite(List);
- for ( ; ite.More(); ite.Next() )
- {
- Handle(SALOME_InteractiveObject) anObj =
- Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
-
- if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( obj ) )
- {
- if ( !isInLocal )
- OCCViewer_Viewer::highlight( ite.Value(), hilight, false );
- // highlight subshapes only when local selection is active
- else
- {
- /*if ( ite.Value()->IsKind( STANDARD_TYPE( SALOME_AISShape ) ) )
- {
- Handle(SALOME_AISShape) aSh = Handle(SALOME_AISShape)::DownCast( ite.Value() );
- TColStd_IndexedMapOfInteger MapIndex;
- Sel->GetIndex( IObject, MapIndex );
- aSh->highlightSubShapes( MapIndex, highlight );
- }*/
- }
- break;
- }
- }
-
- if( upd )
- update();
-
- return false;
-}
-
-/*!
- \return true if object is in viewer or in collector
- \param obj - object to be checked
- \param onlyInViewer - search object only in viewer (so object must be displayed)
-*/
-bool SOCC_Viewer::isInViewer( const Handle(SALOME_InteractiveObject)& obj,
- bool onlyInViewer )
-{
- AIS_ListOfInteractive List;
- getAISContext()->DisplayedObjects(List);
-
- if( !onlyInViewer ) {
- AIS_ListOfInteractive List1;
- getAISContext()->ObjectsInCollector(List1);
- List.Append(List1);
- }
-
- AIS_ListIteratorOfListOfInteractive ite(List);
- for ( ; ite.More(); ite.Next() )
- {
- Handle(SALOME_InteractiveObject) anObj =
- Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
-
- if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( obj ) )
- return true;
- }
- return false;
-}
-
-/*!
- \return true if object is displayed in viewer
- \param obj - object to be checked
-*/
-bool SOCC_Viewer::isVisible( const Handle(SALOME_InteractiveObject)& obj )
-{
- AIS_ListOfInteractive List;
- getAISContext()->DisplayedObjects( List );
-
- AIS_ListIteratorOfListOfInteractive ite( List );
- for ( ; ite.More(); ite.Next() )
- {
- Handle(SALOME_InteractiveObject) anObj =
- Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
-
- if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( obj ) )
- return getAISContext()->IsDisplayed( ite.Value() );
- }
-
- return false;
-}
-
-/*!
- Sets color of object
- \param obj - object to be updated
- \param color - new color
- \param update - update current viewer
-*/
-void SOCC_Viewer::setColor( const Handle(SALOME_InteractiveObject)& obj,
- const QColor& color, bool update )
-{
- AIS_ListOfInteractive List;
- getAISContext()->DisplayedObjects(List);
-
- AIS_ListIteratorOfListOfInteractive ite(List);
- for ( ; ite.More(); ite.Next() )
- {
- Handle(SALOME_InteractiveObject) anObj =
- Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
-
- if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( obj ) )
- {
- OCCViewer_Viewer::setColor( ite.Value(), color, update );
- return;
- }
- }
-}
-
-/*!
- Changes display mode of object
- \param obj - object to be processed
- \param mode - new display mode
- \param update - update current viewer
-*/
-void SOCC_Viewer::switchRepresentation( const Handle(SALOME_InteractiveObject)& obj,
- int mode, bool update )
-{
- AIS_ListOfInteractive List;
- getAISContext()->DisplayedObjects(List);
-
- AIS_ListIteratorOfListOfInteractive ite(List);
- for ( ; ite.More(); ite.Next() )
- {
- Handle(SALOME_InteractiveObject) anObj =
- Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
-
- if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( obj ) )
- {
- OCCViewer_Viewer::switchRepresentation( ite.Value(), mode, update );
- return;
- }
- }
-}
-
-/*!
- Changes transparency of object
- \param obj - object to be processed
- \param trans - new transparency
- \param update - update current viewer
-*/
-void SOCC_Viewer::setTransparency( const Handle(SALOME_InteractiveObject)& obj,
- float trans, bool update )
-{
- AIS_ListOfInteractive List;
- getAISContext()->DisplayedObjects( List );
-
- AIS_ListIteratorOfListOfInteractive ite( List );
- for ( ; ite.More(); ite.Next() )
- {
- Handle(SALOME_InteractiveObject) anObj =
- Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
-
- if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( obj ) )
- {
- OCCViewer_Viewer::setTransparency( ite.Value(), trans, update );
- return;
- }
- }
-}
-
-/*!
- Changes name of object
- \param obj - object to be renamed
- \param name - new name
-*/
-void SOCC_Viewer::rename( const Handle(SALOME_InteractiveObject)& obj,
- const QString& name )
-{
- AIS_ListOfInteractive List;
- getAISContext()->DisplayedObjects(List);
-
- AIS_ListIteratorOfListOfInteractive ite(List);
- while (ite.More())
- {
- if (ite.Value()->IsKind(STANDARD_TYPE(SALOME_AISShape)))
- {
- Handle(SALOME_AISShape) aSh = Handle(SALOME_AISShape)::DownCast(ite.Value());
-
- if ( aSh->hasIO() )
- {
- Handle(SALOME_InteractiveObject) IO = aSh->getIO();
- if ( IO->isSame( obj ) )
- {
- aSh->setName( (char*)name.latin1() );
- break;
- }
- }
- }
- else if ( ite.Value()->IsKind( STANDARD_TYPE( SALOME_AISObject ) ) )
- {
- Handle(SALOME_AISObject) aSh = Handle(SALOME_AISObject)::DownCast( ite.Value() );
-
- // Add code here, if someone create a MODULE_AISObject.
- }
- ite.Next();
- }
-}
-
-
-/*!
- Display presentation
- \param prs - presentation
-*/
-void SOCC_Viewer::Display( const SALOME_OCCPrs* prs )
-{
- // try do downcast object
- const SOCC_Prs* anOCCPrs = dynamic_cast<const SOCC_Prs*>( prs );
- if ( !anOCCPrs || anOCCPrs->IsNull() )
- return;
-
- // get SALOMEDS Study
- // Temporarily commented to avoid awful dependecy on SALOMEDS
- // TODO: better mechanism of storing display/erse status in a study
- // should be provided...
- // _PTR(Study) study(getStudyDS());
-
- // get context
- Handle (AIS_InteractiveContext) ic = getAISContext();
-
- // get all displayed objects
- AIS_ListOfInteractive List;
- ic->DisplayedObjects( List );
- // get objects in the collector
- AIS_ListOfInteractive ListCollector;
- ic->ObjectsInCollector( ListCollector );
-
- // get objects to be displayed
- AIS_ListOfInteractive anAISObjects;
- anOCCPrs->GetObjects( anAISObjects );
-
- AIS_ListIteratorOfListOfInteractive aIter( anAISObjects );
- for ( ; aIter.More(); aIter.Next() )
- {
- Handle(AIS_InteractiveObject) anAIS = aIter.Value();
- if ( !anAIS.IsNull() )
- {
- // try to find presentation in the viewer
- bool bDisplayed = false;
- AIS_ListIteratorOfListOfInteractive ite( List );
- for ( ; ite.More(); ite.Next() )
- {
- // compare presentations by handles
- // if the object is already displayed - nothing to do more
- if ( ite.Value() == anAIS )
- {
- // Deactivate object if necessary
- if ( !anOCCPrs->ToActivate() )
- ic->Deactivate( anAIS );
- bDisplayed = true;
- break;
- }
- }
-
- if ( bDisplayed )
- continue;
-
- // then try to find presentation in the collector
- bDisplayed = false;
- ite.Initialize( ListCollector );
- for ( ; ite.More(); ite.Next() )
- {
- // compare presentations by handles
- // if the object is in collector - display it
- if ( ite.Value() == anAIS )
- {
- ic->DisplayFromCollector( anAIS, false );
-
- // Deactivate object if necessary
- if ( !anOCCPrs->ToActivate() )
- ic->Deactivate( anAIS );
- bDisplayed = true;
-
- // Set visibility flag
- // Temporarily commented to avoid awful dependecy on SALOMEDS
- // TODO: better mechanism of storing display/erse status in a study
- // should be provided...
- //Handle(SALOME_InteractiveObject) anObj =
- // Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
- //if ( !anObj.IsNull() && anObj->hasEntry() )
- //{
- // if ( study )
- // ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
- //}
- break;
- }
- }
- if ( bDisplayed )
- continue;
-
- // if object is not displayed and not found in the collector - display it
- if ( anAIS->IsKind( STANDARD_TYPE(AIS_Trihedron) ) )
- {
- Handle(AIS_Trihedron) aTrh = Handle(AIS_Trihedron)::DownCast( anAIS );
- double aNewSize = 100, aSize = 100;
- getTrihedronSize( aNewSize, aSize );
- aTrh->SetSize( aTrh == getTrihedron() ? aNewSize : 0.5 * aNewSize );
- }
-
- ic->Display( anAIS, false );
-
- // Set visibility flag
- // Temporarily commented to avoid awful dependecy on SALOMEDS
- // TODO: better mechanism of storing display/erse status in a study
- // should be provided...
- //Handle(SALOME_InteractiveObject) anObj =
- // Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
- //if ( !anObj.IsNull() && anObj->hasEntry() )
- //{
- // if ( study )
- // ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
- //}
-
- // Deactivate object if necessary
- if ( !anOCCPrs->ToActivate() )
- ic->Deactivate( anAIS );
- }
- }
-}
-
-
-/*!
- Erase presentation
- \param prs - presentation
- \param forced - removes object from context
-*/
-void SOCC_Viewer::Erase( const SALOME_OCCPrs* prs, const bool forced )
-{
- // try do downcast object
- const SOCC_Prs* anOCCPrs = dynamic_cast<const SOCC_Prs*>( prs );
- if ( !anOCCPrs || anOCCPrs->IsNull() )
- return;
-
- // get SALOMEDS Study
- // Temporarily commented to avoid awful dependecy on SALOMEDS
- // TODO: better mechanism of storing display/erse status in a study
- // should be provided...
- // _PTR(Study) study(getStudyDS());
-
- // get context
- Handle(AIS_InteractiveContext) ic = getAISContext();
-
- // get objects to be erased
- AIS_ListOfInteractive anAISObjects;
- anOCCPrs->GetObjects( anAISObjects );
-
- AIS_ListIteratorOfListOfInteractive aIter( anAISObjects );
- for ( ; aIter.More(); aIter.Next() ) {
- Handle(AIS_InteractiveObject) anAIS = aIter.Value();
- if ( !anAIS.IsNull() ) {
- // erase the object from context : move it to collector
- ic->Erase( anAIS, false, forced ? false : true );
-
- // Set visibility flag if necessary
- // Temporarily commented to avoid awful dependecy on SALOMEDS
- // TODO: better mechanism of storing display/erse status in a study
- // should be provided...
- //if ( !forced )
- //{
- // Handle(SALOME_InteractiveObject) anObj =
- // Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
- // if ( !anObj.IsNull() && anObj->hasEntry() )
- // {
- // if ( study )
- // ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
- // }
- //}
- }
- }
-}
-
-
-/*!
- Erase all presentations
- \param forced - removes all objects from context
-*/
-void SOCC_Viewer::EraseAll( const bool forced )
-{
- // get SALOMEDS Study
- // Temporarily commented to avoid awful dependecy on SALOMEDS
- // TODO: better mechanism of storing display/erse status in a study
- // should be provided...
- // _PTR(Study) study(getStudyDS());
-
- // get context
- Handle(AIS_InteractiveContext) ic = getAISContext();
-
- // check if trihedron is displayed
- Standard_Boolean isTrihedronDisplayed = ic->IsDisplayed( getTrihedron() );
-
- // get objects to be erased (all currently displayed objects)
- AIS_ListOfInteractive aList;
- ic->DisplayedObjects( aList );
- AIS_ListIteratorOfListOfInteractive anIter( aList );
- for ( ; anIter.More(); anIter.Next() ) {
- if ( isTrihedronDisplayed && anIter.Value()->DynamicType() == STANDARD_TYPE( AIS_Trihedron ) )
- continue;
-
- // erase an object
- Handle(AIS_InteractiveObject) anIO = anIter.Value();
- ic->Erase( anIO, false, forced ? false : true );
-
- // Set visibility flag if necessary
- // Temporarily commented to avoid awful dependecy on SALOMEDS
- // TODO: better mechanism of storing display/erse status in a study
- // should be provided...
- //if ( !forced ) {
- // Handle(SALOME_InteractiveObject) anObj =
- // Handle(SALOME_InteractiveObject)::DownCast( anIO->GetOwner() );
-
- // if ( !anObj.IsNull() && anObj->hasEntry() ) {
- // if ( study )
- // ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
- // }
- //}
- }
-
- Repaint();
-}
-
-/*!
- Create presentation corresponding to the entry
- \param entry - entry
-*/
-SALOME_Prs* SOCC_Viewer::CreatePrs( const char* entry )
-{
- SOCC_Prs* prs = new SOCC_Prs();
- if ( entry )
- {
- // get context
- Handle(AIS_InteractiveContext) ic = getAISContext();
-
- // get displayed objects
- AIS_ListOfInteractive List;
- ic->DisplayedObjects( List );
- // get objects in the collector
- AIS_ListOfInteractive ListCollector;
- ic->ObjectsInCollector( ListCollector );
- List.Append( ListCollector );
-
- AIS_ListIteratorOfListOfInteractive ite( List );
- for ( ; ite.More(); ite.Next() )
- {
- Handle(SALOME_InteractiveObject) anObj =
- Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
-
- if ( !anObj.IsNull() && anObj->hasEntry() && strcmp( anObj->getEntry(), entry ) == 0 )
- prs->AddObject( ite.Value() );
- }
- }
- return prs;
-}
-
-/*!
- Activates selection of sub shapes
-*/
-void SOCC_Viewer::LocalSelection( const SALOME_OCCPrs* thePrs, const int theMode )
-{
- Handle(AIS_InteractiveContext) ic = getAISContext();
-
- const SOCC_Prs* anOCCPrs = dynamic_cast<const SOCC_Prs*>( thePrs );
- if ( ic.IsNull() )
- return;
-
- // Open local context if there is no one
- bool allObjects = thePrs == 0 || thePrs->IsNull();
- if ( !ic->HasOpenedContext() ) {
- ic->ClearCurrents( false );
- ic->OpenLocalContext( allObjects, true, true );
- }
-
- AIS_ListOfInteractive anObjs;
- // Get objects to be activated
- if ( allObjects )
- ic->DisplayedObjects( anObjs );
- else
- anOCCPrs->GetObjects( anObjs );
-
- // Activate selection of objects from prs
- AIS_ListIteratorOfListOfInteractive aIter( anObjs );
- for ( ; aIter.More(); aIter.Next() ) {
- Handle(AIS_InteractiveObject) anAIS = aIter.Value();
- if ( !anAIS.IsNull() )
- {
- if ( anAIS->IsKind( STANDARD_TYPE( AIS_Shape ) ) )
- {
- ic->Load( anAIS, -1, false );
- ic->Activate( anAIS, AIS_Shape::SelectionMode( (TopAbs_ShapeEnum)theMode ) );
- }
- else if ( anAIS->DynamicType() != STANDARD_TYPE(AIS_Trihedron) )
- {
- ic->Load( anAIS, -1, false );
- ic->Activate( anAIS, theMode );
- }
- }
- }
-}
-
-/*!
- Deactivates selection of sub shapes
-*/
-void SOCC_Viewer::GlobalSelection( const bool update ) const
-{
- Handle(AIS_InteractiveContext) ic = getAISContext();
- if ( !ic.IsNull() )
- {
- ic->CloseAllContexts( false );
- if ( update )
- ic->CurrentViewer()->Redraw();
- }
-}
-
-/*!
- Auxiliary method called before displaying of objects
-*/
-void SOCC_Viewer::BeforeDisplay( SALOME_Displayer* d )
-{
- d->BeforeDisplay( this, SALOME_OCCViewType() );
-}
-
-/*!
- Auxiliary method called after displaying of objects
-*/
-void SOCC_Viewer::AfterDisplay( SALOME_Displayer* d )
-{
- d->AfterDisplay( this, SALOME_OCCViewType() );
-}
-
-/*!
- Get new and current trihedron size corresponding to the current model size
-*/
-bool SOCC_Viewer::getTrihedronSize( double& theNewSize, double& theSize )
-{
- theNewSize = 100;
- theSize = 100;
-
- //SRN: BUG IPAL8996, a usage of method ActiveView without an initialization
- Handle(V3d_Viewer) viewer = getViewer3d();
- viewer->InitActiveViews();
- if(!viewer->MoreActiveViews()) return false;
-
- Handle(V3d_View) view3d = viewer->ActiveView();
- //SRN: END of fix
-
- if ( view3d.IsNull() )
- return false;
-
- double Xmin = 0, Ymin = 0, Zmin = 0, Xmax = 0, Ymax = 0, Zmax = 0;
- double aMaxSide;
-
- view3d->View()->MinMaxValues( Xmin, Ymin, Zmin, Xmax, Ymax, Zmax );
-
- if ( Xmin == RealFirst() || Ymin == RealFirst() || Zmin == RealFirst() ||
- Xmax == RealLast() || Ymax == RealLast() || Zmax == RealLast() )
- return false;
-
- aMaxSide = Xmax - Xmin;
- if ( aMaxSide < Ymax -Ymin ) aMaxSide = Ymax -Ymin;
- if ( aMaxSide < Zmax -Zmin ) aMaxSide = Zmax -Zmin;
-
- float aSizeInPercents = SUIT_Session::session()->resourceMgr()->doubleValue("Viewer","TrihedronSize", 105.);
-
- static float EPS = 5.0E-3;
- theSize = getTrihedron()->Size();
- theNewSize = aMaxSide*aSizeInPercents / 100.0;
-
- return fabs( theNewSize - theSize ) > theSize * EPS ||
- fabs( theNewSize - theSize) > theNewSize * EPS;
-}
-
-
-/*!
- Updates current viewer
-*/
-void SOCC_Viewer::Repaint()
-{
-// onAdjustTrihedron();
- getViewer3d()->Update();
-}
-
-
-/*!
- create SOCC_ViewWindow
-*/
-SUIT_ViewWindow* SOCC_Viewer::createView( SUIT_Desktop* theDesktop )
-{
- SOCC_ViewWindow* view = new SOCC_ViewWindow(theDesktop, this);
- initView( view );
- return view;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SOCC_VIEWMODEL_H
-#define SOCC_VIEWMODEL_H
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-#include "SOCC.h"
-#include "SALOME_Prs.h"
-#include "OCCViewer_ViewModel.h"
-#include "SALOME_InteractiveObject.hxx"
-
-class SOCC_EXPORT SOCC_Viewer: public OCCViewer_Viewer, public SALOME_View
-{
- Q_OBJECT
-
-public:
- SOCC_Viewer( bool DisplayTrihedron = true );
- virtual ~SOCC_Viewer();
-
- /* Selection management */
- bool highlight( const Handle(SALOME_InteractiveObject)&, bool, bool=true );
- bool isInViewer( const Handle(SALOME_InteractiveObject)&, bool=false );
-
- void setColor( const Handle(SALOME_InteractiveObject)&, const QColor&, bool=true );
- void switchRepresentation( const Handle(SALOME_InteractiveObject)&, int, bool=true );
- void setTransparency( const Handle(SALOME_InteractiveObject)&, float, bool=true );
-
- void rename( const Handle(SALOME_InteractiveObject)&, const QString& );
-
- virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
-
- /* Reimplemented from SALOME_View */
- virtual void Display( const SALOME_OCCPrs* );
- virtual void Erase( const SALOME_OCCPrs*, const bool = false );
- virtual void EraseAll( const bool = false );
- virtual SALOME_Prs* CreatePrs( const char* entry = 0 );
- virtual void BeforeDisplay( SALOME_Displayer* d );
- virtual void AfterDisplay ( SALOME_Displayer* d );
- virtual void LocalSelection( const SALOME_OCCPrs*, const int );
- virtual void GlobalSelection( const bool = false ) const;
- virtual bool isVisible( const Handle(SALOME_InteractiveObject)& );
- virtual void Repaint();
-
- // a utility function, used by SALOME_View_s methods
- bool getTrihedronSize( double& theNewSize, double& theSize );
-
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SOCC_ViewWindow.h"
-
-#include "OCCViewer_ViewPort3d.h"
-
-#include "SUIT_Accel.h"
-
-/*!
- Constructor
-*/
-SOCC_ViewWindow
-::SOCC_ViewWindow( SUIT_Desktop* theDesktop,
- OCCViewer_Viewer* theModel)
- : OCCViewer_ViewWindow( theDesktop, theModel )
-{
-}
-
-/*!
- Destructor
-*/
-SOCC_ViewWindow
-::~SOCC_ViewWindow()
-{
-}
-
-/*!
- Performs action
- \param theAction - type of action
-*/
-bool
-SOCC_ViewWindow
-::action( const int theAction )
-{
- const int inc = 10;
- int cx, cy;
- if ( theAction == SUIT_Accel::ZoomIn || theAction == SUIT_Accel::ZoomOut ||
- theAction == SUIT_Accel::RotateLeft || theAction == SUIT_Accel::RotateRight ||
- theAction == SUIT_Accel::RotateUp || theAction == SUIT_Accel::RotateDown ) {
- cx = myViewPort->width() / 2;
- cy = myViewPort->height() / 2;
- }
- switch ( theAction ) {
- case SUIT_Accel::PanLeft :
- myViewPort->pan( -inc, 0 );
- break;
- case SUIT_Accel::PanRight :
- myViewPort->pan( inc, 0 );
- break;
- case SUIT_Accel::PanUp :
- myViewPort->pan( 0, inc );
- break;
- case SUIT_Accel::PanDown :
- myViewPort->pan( 0, -inc );
- break;
- case SUIT_Accel::ZoomIn :
- myViewPort->zoom( cx, cy, cx + inc, cy + inc );
- break;
- case SUIT_Accel::ZoomOut :
- myViewPort->zoom( cx, cy, cx - inc, cy - inc );
- break;
- case SUIT_Accel::ZoomFit :
- myViewPort->fitAll();
- break;
- case SUIT_Accel::RotateLeft :
- myViewPort->startRotation( cx, cy, myCurrPointType, mySelectedPoint );
- myViewPort->rotate( cx - inc, cy, myCurrPointType, mySelectedPoint );
- myViewPort->endRotation();
- break;
- case SUIT_Accel::RotateRight :
- myViewPort->startRotation( cx, cy, myCurrPointType, mySelectedPoint );
- myViewPort->rotate( cx + inc, cy, myCurrPointType, mySelectedPoint );
- myViewPort->endRotation();
- break;
- case SUIT_Accel::RotateUp :
- myViewPort->startRotation( cx, cy, myCurrPointType, mySelectedPoint );
- myViewPort->rotate( cx, cy - inc, myCurrPointType, mySelectedPoint );
- myViewPort->endRotation();
- break;
- case SUIT_Accel::RotateDown :
- myViewPort->startRotation( cx, cy, myCurrPointType, mySelectedPoint );
- myViewPort->rotate( cx, cy + inc, myCurrPointType, mySelectedPoint );
- myViewPort->endRotation();
- break;
- }
- return true;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SOCC_VIEWWINDOW_H
-#define SOCC_VIEWWINDOW_H
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-#include "SOCC.h"
-#include "OCCViewer_ViewWindow.h"
-
-class SOCC_EXPORT SOCC_ViewWindow : public OCCViewer_ViewWindow
-{
- Q_OBJECT;
-
-public:
- SOCC_ViewWindow( SUIT_Desktop*, OCCViewer_Viewer* );
- virtual ~SOCC_ViewWindow();
-
-protected:
- virtual bool action( const int );
-
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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 $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libSPlot2d.la
-
-salomeinclude_HEADERS = \
- SPlot2d.h \
- SPlot2d_Curve.h \
- SPlot2d_Prs.h \
- SPlot2d_ViewModel.h \
- SPlot2d_ViewWindow.h
-
-dist_libSPlot2d_la_SOURCES = \
- SPlot2d_Curve.cxx \
- SPlot2d_Prs.cxx \
- SPlot2d_ViewModel.cxx \
- SPlot2d_ViewWindow.cxx
-
-MOC_FILES = \
- SPlot2d_ViewModel_moc.cxx \
- SPlot2d_ViewWindow_moc.cxx
-nodist_libSPlot2d_la_SOURCES = $(MOC_FILES)
-
-nodist_salomeres_DATA = SPlot2d_msg_en.qm
-
-libSPlot2d_la_CPPFLAGS=$(QT_INCLUDES) $(CAS_CPPFLAGS) $(QWT_INCLUDES) $(BOOST_CPPFLAGS) \
- -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT -I$(srcdir)/../Plot2d -I$(srcdir)/../Prs \
- -I$(srcdir)/../OBJECT
-libSPlot2d_la_LDFLAGS=$(QT_MT_LIBS) $(QWT_LIBS) ../SUIT/libsuit.la ../Plot2d/libPlot2d.la ../Prs/libSalomePrs.la
-
-
-
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-#ifdef WNT
-#ifdef SPLOT2D_EXPORTS
-#define SPLOT2D_EXPORT __declspec(dllexport)
-#else
-#define SPLOT2D_EXPORT __declspec(dllimport)
-#endif
-#else
-#define SPLOT2D_EXPORT
-#endif
-
-#if defined WNT
-#pragma warning ( disable: 4251 )
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : SPlot2d_Curve.cxx
-// Author : Sergey RUIN
-// Module : SUIT
-
-#include "SPlot2d_Curve.h"
-using namespace std;
-
-/*!
- Constructor
-*/
-SPlot2d_Curve::SPlot2d_Curve()
-:Plot2d_Curve()
-{
-}
-
-/*!
- Destructor
-*/
-SPlot2d_Curve::~SPlot2d_Curve()
-{
-}
-
-/*!
- Copy constructor. Makes deep copy of data.
-*/
-SPlot2d_Curve::SPlot2d_Curve( const SPlot2d_Curve& curve )
-{
- myAutoAssign = curve.isAutoAssign();
- myHorTitle = curve.getHorTitle();
- myVerTitle = curve.getVerTitle();
- myHorUnits = curve.getHorUnits();
- myVerUnits = curve.getVerUnits();
- myColor = curve.getColor();
- myMarker = curve.getMarker();
- myLine = curve.getLine();
- myLineWidth = curve.getLineWidth();
- myPoints = curve.getPointList();
- myIO = curve.getIO();
- myTableIO = curve.getTableIO();
-}
-
-/*!
- operator=. Makes deep copy of data.
-*/
-SPlot2d_Curve& SPlot2d_Curve::operator=( const SPlot2d_Curve& curve )
-{
- myAutoAssign = curve.isAutoAssign();
- myHorTitle = curve.getHorTitle();
- myVerTitle = curve.getVerTitle();
- myHorUnits = curve.getHorUnits();
- myVerUnits = curve.getVerUnits();
- myColor = curve.getColor();
- myMarker = curve.getMarker();
- myLine = curve.getLine();
- myLineWidth = curve.getLineWidth();
- myPoints = curve.getPointList();
- myIO = curve.getIO();
- myTableIO = curve.getTableIO();
- return *this;
-}
-
-/*!
- \return corresponding SALOME_InteractiveObject
-*/
-Handle(SALOME_InteractiveObject) SPlot2d_Curve::getIO() const
-{
- return myIO;
-}
-
-/*!
- Sets corresponding SALOME_InteractiveObject
- \param io - SALOME_InteractiveObject
-*/
-void SPlot2d_Curve::setIO( const Handle(SALOME_InteractiveObject)& io )
-{
- myIO = io;
-}
-
-/*!
- \return true if curve has table interactive object
-*/
-bool SPlot2d_Curve::hasTableIO() const
-{
- return !myTableIO.IsNull();
-}
-
-/*!
- \return table interactive object of curve
-*/
-Handle(SALOME_InteractiveObject) SPlot2d_Curve::getTableIO() const
-{
- return myTableIO;
-}
-
-/*!
- Sets table interactive object of curve
- \param io - SALOME_InteractiveObject
-*/
-void SPlot2d_Curve::setTableIO( const Handle(SALOME_InteractiveObject)& io )
-{
- myTableIO = io;
-}
-
-/*!
- \return SALOME_InteractiveObject
-*/
-bool SPlot2d_Curve::hasIO() const
-{
- return !myIO.IsNull();
-}
-
-/*!
- \return table title
-*/
-QString SPlot2d_Curve::getTableTitle() const
-{
- QString title;
- if( hasTableIO() )
- title = getTableIO()->getName();
- return title;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : SPlot2d_Curve.h
-// Author : Sergey RUIN
-// Module : SUIT
-
-#ifndef SPlot2d_Curve_h
-#define SPlot2d_Curve_h
-
-#include "SPlot2d.h"
-
-#include "Plot2d_Curve.h"
-
-#include <qstring.h>
-#include <qcolor.h>
-#include <qmemarray.h>
-#ifndef _Handle_SALOME_InteractiveObject_HeaderFile
-#include <Handle_SALOME_InteractiveObject.hxx>
-#endif
-#include "SALOME_InteractiveObject.hxx"
-
-class SPLOT2D_EXPORT SPlot2d_Curve : public Plot2d_Curve
-{
-public:
-
- SPlot2d_Curve();
- virtual ~SPlot2d_Curve();
- SPlot2d_Curve( const SPlot2d_Curve& curve );
- SPlot2d_Curve& operator= ( const SPlot2d_Curve& curve );
-
- virtual QString getTableTitle() const;
-
- virtual bool hasIO() const;
- virtual Handle(SALOME_InteractiveObject) getIO() const;
- virtual void setIO( const Handle(SALOME_InteractiveObject)& );
-
- virtual bool hasTableIO() const;
- virtual Handle(SALOME_InteractiveObject) getTableIO() const;
- virtual void setTableIO( const Handle(SALOME_InteractiveObject)& );
-
-private:
- Handle(SALOME_InteractiveObject) myIO;
- Handle(SALOME_InteractiveObject) myTableIO;
-};
-
-#endif // SPlot2d_Curve_h
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : SPlot2d_Prs.cxx
-// Author : Sergey RUIN
-// Module : SUIT
-
-#include "SPlot2d_Prs.h"
-#ifndef WNT
-using namespace std;
-#endif
-
-/*!
- Default constructor
-*/
-SPlot2d_Prs::SPlot2d_Prs()
-:Plot2d_Prs()
-{
-}
-
-/*!
- Standard constructor
-*/
-SPlot2d_Prs::SPlot2d_Prs( const Plot2d_Curve* obj )
-:Plot2d_Prs(obj)
-{
-}
-
-/*!
- Standard constructor
-*/
-SPlot2d_Prs::SPlot2d_Prs( const Plot2d_Prs* prs )
-{
- mySecondY = prs->isSecondY();
- myCurves = prs->getCurves();
-}
-
-/*!
- Destructor
-*/
-SPlot2d_Prs::~SPlot2d_Prs()
-{
-}
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : SPlot2d_Prs.h
-// Author : Sergey RUIN
-// Module : SUIT
-
-#ifndef SPLOT2D_PRS_H
-#define SPLOT2D_PRS_H
-
-#include "SPlot2d.h"
-#include "SALOME_Prs.h"
-#include "Plot2d_Prs.h"
-
-#include <qptrlist.h>
-
-class Plot2d_Curve;
-
-class SPLOT2D_EXPORT SPlot2d_Prs : public SALOME_Prs2d, public Plot2d_Prs
-{
-public:
-
- // Default constructor
- SPlot2d_Prs();
-
- // Standard constructor
- SPlot2d_Prs( const Plot2d_Curve* obj );
-
- SPlot2d_Prs( const Plot2d_Prs* prs );
-
- // Destructor
- ~SPlot2d_Prs();
-
- virtual bool IsNull() const { return Plot2d_Prs::IsNull(); }
-
- // Get curves list
- // Note: Depricated method, use method getCurves
- curveList GetObjects() const { return getCurves(); }
-
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : SPlot2d_Viewer.cxx
-// Author : Sergey RUIN
-// Module : SUIT
-
-#include "SPlot2d_ViewModel.h"
-
-#include "SPlot2d_ViewWindow.h"
-
-#include "SPlot2d_Prs.h"
-#include "SUIT_Session.h"
-#include "SUIT_Application.h"
-
-//#include "utilities.h"
-#include "qapplication.h"
-#include <qtoolbar.h>
-#include <qtoolbutton.h>
-#include <qcursor.h>
-#include <qcolordialog.h>
-#include <qwt_math.h>
-#include <qwt_plot_canvas.h>
-#include <stdlib.h>
-
-using namespace std;
-
-//ASL: Temporary commented in order to avoir dependency on SALOMEDS
-
-//#include "SALOMEDSClient.hxx"
-//#include "SALOMEDS_StudyManager.hxx"
-
-// in order NOT TO link with SalomeApp, here the code returns SALOMEDS_Study.
-// SalomeApp_Study::studyDS() does it as well, but -- here it is retrieved from
-// SALOMEDS::StudyManager - no linkage with SalomeApp.
-
-/*static _PTR(Study) getStudyDS()
-{
- SALOMEDSClient_Study* aStudy = NULL;
- _PTR(StudyManager) aMgr( new SALOMEDS_StudyManager() );
-
- // get id of SUIT_Study, if it's a SalomeApp_Study, it will return
- // id of its underlying SALOMEDS::Study
- SUIT_Application* app = SUIT_Session::session()->activeApplication();
- if ( !app ) return _PTR(Study)(aStudy);
- SUIT_Study* stud = app->activeStudy();
- if ( !stud ) return _PTR(Study)(aStudy);
- const int id = stud->id(); // virtual method, must return SALOMEDS_Study id
- // get SALOMEDS_Study with this id from StudyMgr
- return aMgr->GetStudyByID( id );
-} */
-
-/*!
- Constructor
-*/
-SPlot2d_Viewer::SPlot2d_Viewer( bool theAutoDel )
-: Plot2d_Viewer( theAutoDel )
-{
-}
-
-/*!
- Destructor
-*/
-SPlot2d_Viewer::~SPlot2d_Viewer()
-{
-}
-
-/*!
- Renames curve if it is found
-*/
-void SPlot2d_Viewer::rename( const Handle(SALOME_InteractiveObject)& IObject,
- const QString& newName, Plot2d_ViewFrame* fr )
-{
- Plot2d_ViewFrame* aViewFrame = fr ? fr : getActiveViewFrame();
- if( !aViewFrame )
- return;
-
- QIntDictIterator<Plot2d_Curve> it( aViewFrame->getCurves() );
- for( ; it.current(); ++it )
- {
- SPlot2d_Curve* aCurve = dynamic_cast<SPlot2d_Curve*>( it.current() );
- if( aCurve && aCurve->hasIO() && aCurve->getIO()->isSame( IObject ) )
- {
- aCurve->setVerTitle( newName );
- int key = aViewFrame->hasCurve( aCurve );
- if( key )
- aViewFrame->setCurveTitle( key, newName );
- }
-
- if( aCurve && aCurve->hasTableIO() && aCurve->getTableIO()->isSame( IObject ) )
- aCurve->getTableIO()->setName( newName.latin1() );
- }
- aViewFrame->updateTitles();
-}
-
-/*!
- Renames all copies of object in all view windows
- \param IObj - object to be renamed
- \param name - new name
-*/
-void SPlot2d_Viewer::renameAll( const Handle(SALOME_InteractiveObject)& IObj, const QString& name )
-{
- SUIT_ViewManager* vm = getViewManager();
- if ( vm )
- {
- const QPtrVector<SUIT_ViewWindow>& wnds = vm->getViews();
- for ( uint i = 0; i < wnds.size(); i++ )
- {
- Plot2d_ViewWindow* pwnd = dynamic_cast<Plot2d_ViewWindow*>( wnds.at( i ) );
- rename( IObj, name, pwnd->getViewFrame() );
- }
- }
-}
-
-/*!
- Returns true if interactive object is presented in the viewer
-*/
-bool SPlot2d_Viewer::isInViewer( const Handle(SALOME_InteractiveObject)& IObject )
-{
- Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
- if(aViewFrame == NULL) return 0;
-
- if( getCurveByIO( IObject ) != NULL )
- return 1;
- else{
- if(!IObject.IsNull()){
- QIntDictIterator<Plot2d_Curve> it(aViewFrame->getCurves());
- for(; it.current();++it) {
- SPlot2d_Curve* aCurve = dynamic_cast<SPlot2d_Curve*>(it.current());
- if(aCurve->hasIO() && aCurve->getTableIO()->isSame(IObject))
- return 1;
- }
- }
- }
- return 0;
-}
-
-
-/*!
- Actually this method just re-displays curves which refers to the <IObject>
-*/
-void SPlot2d_Viewer::Display( const Handle(SALOME_InteractiveObject)& IObject, bool update )
-{
- Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
- if(aViewFrame == NULL) return;
-
- SPlot2d_Curve* curve = getCurveByIO( IObject );
- if ( curve )
- aViewFrame->updateCurve( curve, update );
-}
-
-/*!
- Actually this method just erases all curves which don't refer to <IOBject>
- and re-displays curve which is of <IObject>
-*/
-void SPlot2d_Viewer::DisplayOnly( const Handle(SALOME_InteractiveObject)& IObject )
-{
- Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
- if(aViewFrame == NULL) return;
-
- Plot2d_Curve* curve = getCurveByIO( IObject );
- QIntDictIterator<Plot2d_Curve> it( aViewFrame->getCurves() );
- for ( ; it.current(); ++it ) {
- if(it.current() != curve)
- aViewFrame->eraseCurve( curve );
- else
- aViewFrame->updateCurve( curve, false );
- }
-
- aViewFrame->Repaint();
-}
-
-/*!
- Removes from the viewer the curves which refer to <IObject>
-*/
-void SPlot2d_Viewer::Erase( const Handle(SALOME_InteractiveObject)& IObject, bool update )
-{
- Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
- if(aViewFrame == NULL) return;
-
- SPlot2d_Curve* curve = getCurveByIO( IObject );
- if ( curve )
- aViewFrame->eraseCurve( curve, update );
-
- // it can be table or container object selected
- //ASL: Temporary commented in order to avoid dependency on SALOMEDS
-/* _PTR(Study) aStudy = getStudyDS();
- _PTR(SObject) aSO = aStudy->FindObjectID(IObject->getEntry());
- if ( aSO ) {
- _PTR(ChildIterator) aIter = aStudy->NewChildIterator( aSO );
- for ( ; aIter->More(); aIter->Next() ) {
- _PTR(SObject) aChildSO = aIter->Value();
- _PTR(SObject) refSO;
- if ( aChildSO->ReferencedObject( refSO ) && refSO )
- aChildSO = refSO;
- curve = getCurveByIO( new SALOME_InteractiveObject( aChildSO->GetID().c_str(), "") );
- if ( curve )
- aViewFrame->eraseCurve( curve, update );
- }
- }
-*/
-
-}
-
-/*!
- Removes all curves from the view
-*/
-void SPlot2d_Viewer::EraseAll(const bool /*forced*/)
-{
- Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
- if(aViewFrame) aViewFrame->EraseAll();
-}
-
-/*!
- Redraws Viewer contents
-*/
-void SPlot2d_Viewer::Repaint()
-{
- Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
- if(aViewFrame) aViewFrame->Repaint();
-}
-
-/*!
- Display presentation
-*/
-void SPlot2d_Viewer::Display( const SALOME_Prs2d* prs )
-{
- Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
- Plot2d_Prs* aPrs = dynamic_cast<Plot2d_Prs*>(const_cast<SALOME_Prs2d*>(prs));
- if(aViewFrame && aPrs) aViewFrame->Display(aPrs);
-}
-
-/*!
- Erase presentation
-*/
-void SPlot2d_Viewer::Erase( const SALOME_Prs2d* prs, const bool )
-{
- Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
- Plot2d_Prs* aPrs = dynamic_cast<Plot2d_Prs*>(const_cast<SALOME_Prs2d*>(prs));
- if(aViewFrame && aPrs) aViewFrame->Erase(aPrs);
-}
-
-/*!
- Create presentation by entry
-*/
-SALOME_Prs* SPlot2d_Viewer::CreatePrs( const char* entry )
-{
- Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
- if(aViewFrame)
- {
- Plot2d_Prs* prs = aViewFrame->CreatePrs(entry);
- if( prs )
- return new SPlot2d_Prs( prs );
- }
-
- return NULL;
-}
-
-/*!
- Axiluary method called before displaying of objects
-*/
-void SPlot2d_Viewer::BeforeDisplay( SALOME_Displayer* d )
-{
- d->BeforeDisplay( this, SALOME_Plot2dViewType() );
-}
-
-/*!
- Axiluary method called after displaying of objects
-*/
-void SPlot2d_Viewer::AfterDisplay( SALOME_Displayer* d )
-{
- d->AfterDisplay( this, SALOME_Plot2dViewType() );
-}
-
-/*!
- Returns true if interactive object is presented in the viewer and displayed
-*/
-bool SPlot2d_Viewer::isVisible( const Handle(SALOME_InteractiveObject)& IObject )
-{
- Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
- if(aViewFrame == NULL) return false;
-
- SPlot2d_Curve* curve = getCurveByIO( IObject );
- return aViewFrame->isVisible( curve );
-}
-
-/*!
- Return interactive obeject if is presented in the viewer
-*/
-Handle(SALOME_InteractiveObject) SPlot2d_Viewer::FindIObject( const char* Entry )
-{
- Handle(SALOME_InteractiveObject) anIO;
- Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
- if(aViewFrame == NULL) return anIO;
-
- QIntDictIterator<Plot2d_Curve> it( aViewFrame->getCurves() );
- for ( ; it.current(); ++it ) {
- SPlot2d_Curve* aCurve = dynamic_cast<SPlot2d_Curve*>(it.current());
- if ( aCurve->hasIO() && !strcmp( aCurve->getIO()->getEntry(), Entry ) ) {
- anIO = aCurve->getIO();
- break;
- }
- }
- return anIO;
-}
-
-/*!
- Returns an active Plot2d ViewFrame or NULL
-*/
-Plot2d_ViewFrame* SPlot2d_Viewer::getActiveViewFrame()
-{
- SUIT_ViewManager* aViewMgr = getViewManager();
- if(aViewMgr) {
- Plot2d_ViewWindow* aViewWnd = dynamic_cast<Plot2d_ViewWindow*>(aViewMgr->getActiveView());
- if(aViewWnd)
- return aViewWnd->getViewFrame();
- }
-
- return NULL;
-}
-
-/*!
- \return curve by object and viewframe
- \param theIObject - object
- \param fr - viewframe
-*/
-SPlot2d_Curve* SPlot2d_Viewer::getCurveByIO( const Handle(SALOME_InteractiveObject)& theIObject,
- Plot2d_ViewFrame* fr )
-{
- if ( !theIObject.IsNull() ) {
- Plot2d_ViewFrame* aViewFrame = fr ? fr : getActiveViewFrame();
- if(aViewFrame) {
- QIntDictIterator<Plot2d_Curve> it( aViewFrame->getCurves() );
- for ( ; it.current(); ++it ) {
- SPlot2d_Curve* aCurve = dynamic_cast<SPlot2d_Curve*>(it.current());
- if(aCurve) {
- if ( aCurve->hasIO() && aCurve->getIO()->isSame( theIObject ) )
- return aCurve;
- }
- }
- }
- }
- return NULL;
-}
-
-/*!
- SLOT: called when action "Clone view" is activated
-*/
-void SPlot2d_Viewer::onCloneView( Plot2d_ViewFrame* clonedVF, Plot2d_ViewFrame* newVF )
-{
- if( !clonedVF || !newVF )
- return;
-
- // 1) Copy all properties of view
-
- newVF->copyPreferences( clonedVF );
-
- // 2) Display all curves displayed in cloned view
-
- QList<Plot2d_Curve> aCurves;
- clonedVF->getCurves( aCurves );
- QList<Plot2d_Curve>::const_iterator anIt = aCurves.begin(), aLast = aCurves.end();
-
- for( ; anIt!=aLast; anIt++ )
- if( clonedVF->isVisible( *anIt ) )
- newVF->displayCurve( *anIt, false );
- newVF->Repaint();
-}
-
-/*!
- create SPlot2d_ViewWindow
-*/
-SUIT_ViewWindow* SPlot2d_Viewer::createView( SUIT_Desktop* theDesktop )
-{
- SPlot2d_ViewWindow* aPlot2dView = new SPlot2d_ViewWindow(theDesktop, this);
- if (getPrs())
- aPlot2dView->getViewFrame()->Display(getPrs());
- return aPlot2dView;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : SPlot2d_ViewModel.h
-// Author : Sergey RUIN
-// Module : SUIT
-
-#ifndef SPlot2d_ViewModel_H
-#define SPlot2d_ViewModel_H
-
-#include "SPlot2d.h"
-
-#include "SALOME_Prs.h"
-#include "Plot2d_ViewModel.h"
-#include "SALOME_InteractiveObject.hxx"
-#include "Plot2d_ViewFrame.h"
-#include "Plot2d_ViewWindow.h"
-#include "SPlot2d_Curve.h"
-
-class SPLOT2D_EXPORT SPlot2d_Viewer : public Plot2d_Viewer, public SALOME_View
-{
- Q_OBJECT
-
-public:
- static QString Type() { return "Plot2d"; }
-
- /* Construction/destruction */
- SPlot2d_Viewer( bool theAutoDel = false );
- virtual ~SPlot2d_Viewer();
-
-public:
- virtual QString getType() const { return Type(); }
-
- /* interactive object management */
- void highlight( const Handle(SALOME_InteractiveObject)& IObject, bool highlight, bool update = true ) {}
- void unHighlightAll() {}
- void rename( const Handle(SALOME_InteractiveObject)&, const QString&, Plot2d_ViewFrame* = 0 );
- void renameAll( const Handle(SALOME_InteractiveObject)&, const QString& );
- bool isInViewer( const Handle(SALOME_InteractiveObject)& IObject );
-
- virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
-
- /* display */
- void Display( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
- void DisplayOnly( const Handle(SALOME_InteractiveObject)& IObject );
- void Erase( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
-
- /* Reimplemented from SALOME_View */
- void Display( const SALOME_Prs2d* );
- void Erase( const SALOME_Prs2d*, const bool = false );
- virtual void EraseAll(const bool = false);
- virtual void Repaint();
- virtual SALOME_Prs* CreatePrs( const char* entry = 0 );
- virtual void BeforeDisplay( SALOME_Displayer* d );
- virtual void AfterDisplay ( SALOME_Displayer* d );
- virtual bool isVisible( const Handle(SALOME_InteractiveObject)& IObject );
-
-
- /* operations */
- SPlot2d_Curve* getCurveByIO( const Handle(SALOME_InteractiveObject)&, Plot2d_ViewFrame* = 0 );
- Plot2d_ViewFrame* getActiveViewFrame();
- Handle(SALOME_InteractiveObject) FindIObject( const char* Entry );
-
-protected slots:
- virtual void onCloneView( Plot2d_ViewFrame*, Plot2d_ViewFrame* );
-};
-
-
-#endif // SPlot2d_ViewModel_H
-
-
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SPlot2d_ViewWindow.h"
-
-#include "Plot2d_ViewFrame.h"
-
-#include "SUIT_Accel.h"
-
-/*!
- Constructor
-*/
-SPlot2d_ViewWindow
-::SPlot2d_ViewWindow( SUIT_Desktop* theDesktop,
- Plot2d_Viewer* theModel)
- : Plot2d_ViewWindow( theDesktop, theModel )
-{
-}
-
-/*!
- Destructor
-*/
-SPlot2d_ViewWindow
-::~SPlot2d_ViewWindow()
-{
-}
-
-/*!
- Performs action
- \param theAction - type of action
-*/
-bool
-SPlot2d_ViewWindow
-::action( const int theAction )
-{
- switch ( theAction ) {
- case SUIT_Accel::PanLeft:
- getViewFrame()->onPanLeft();
- break;
- case SUIT_Accel::PanRight:
- getViewFrame()->onPanRight();
- break;
- case SUIT_Accel::PanUp:
- getViewFrame()->onPanUp();
- break;
- case SUIT_Accel::PanDown:
- getViewFrame()->onPanDown();
- break;
- case SUIT_Accel::ZoomIn:
- getViewFrame()->onZoomIn();
- break;
- case SUIT_Accel::ZoomOut:
- getViewFrame()->onZoomOut();
- break;
- case SUIT_Accel::ZoomFit:
- getViewFrame()->fitAll();
- break;
- }
- return true;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SPLOT2D_VIEWWINDOW_H
-#define SPLOT2D_VIEWWINDOW_H
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-#include "SPlot2d.h"
-#include "Plot2d_ViewWindow.h"
-
-class SPLOT2D_EXPORT SPlot2d_ViewWindow : public Plot2d_ViewWindow
-{
- Q_OBJECT;
-
-public:
- SPlot2d_ViewWindow( SUIT_Desktop*, Plot2d_Viewer* );
- virtual ~SPlot2d_ViewWindow();
-
-protected:
- virtual bool action( const int );
-
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# This is a Qt message file in .po format. Each msgid starts with
-# a scope. This scope should *NOT* be translated - eg. translating
-# from French to English, "Foo::Bar" would be translated to "Pub",
-# not "Foo::Pub".
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2005-06-16 12:01:13 PM MSD\n"
-"PO-Revision-Date: YYYY-MM-DD\n"
-"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : STD
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libstd.la
-
-salomeinclude_HEADERS= \
- STD_Application.h \
- STD.h \
- STD_MDIDesktop.h \
- STD_SDIDesktop.h \
- STD_TabDesktop.h \
- STD_LoadStudiesDlg.h
-
-dist_libstd_la_SOURCES=\
- STD_Application.cxx \
- STD_MDIDesktop.cxx \
- STD_SDIDesktop.cxx \
- STD_TabDesktop.cxx \
- STD_LoadStudiesDlg.cxx
-
-MOC_FILES= \
- STD_Application_moc.cxx \
- STD_MDIDesktop_moc.cxx \
- STD_SDIDesktop_moc.cxx \
- STD_TabDesktop_moc.cxx \
- STD_LoadStudiesDlg_moc.cxx
-
-nodist_libstd_la_SOURCES= $(MOC_FILES)
-
-dist_salomeres_DATA=\
- resources/config \
- resources/cut.png \
- resources/copy.png \
- resources/close.png \
- resources/cursor_rotate.png \
- resources/cursor_zoom.png \
- resources/help.png \
- resources/new.png \
- resources/open.png \
- resources/print.png \
- resources/paste.png \
- resources/redo.png \
- resources/reset.png \
- resources/save.png \
- resources/undo_arrow.png \
- resources/undo.png \
- resources/std.ini
-
-nodist_salomeres_DATA=\
- STD_images.qm \
- STD_msg_en.qm
-
-libstd_la_CPPFLAGS=$(QT_INCLUDES) -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
-libstd_la_LDFLAGS=$(QT_MT_LIBS)
-libstd_la_LIBADD=../SUIT/libsuit.la
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "STD_LoadStudiesDlg.h"
-
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-
-#define SPACING_SIZE 6
-#define MARGIN_SIZE 11
-#define MIN_LISTBOX_WIDTH 150
-#define MIN_LISTBOX_HEIGHT 100
-
-/*!
-* \brief creates a Load study dialog box
-* \param parent a parent widget
-* \param modal bool argument, if true the dialog box is a modal dialog box
-* \param f style flags
-*/
-
-STD_LoadStudiesDlg::STD_LoadStudiesDlg( QWidget* parent, bool modal, WFlags fl )
-: QDialog( parent, "STD_LoadStudiesDlg", modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
-{
- resize( 321, 181 );
- setCaption( tr("DLG_LOAD_STUDY_CAPTION") );
- setSizeGripEnabled( TRUE );
-
- QGridLayout* aTopLayout = new QGridLayout(this);
- aTopLayout->setMargin(MARGIN_SIZE);
- aTopLayout->setSpacing(SPACING_SIZE);
-
- TextLabel1 = new QLabel( this, "TextLabel1" );
- TextLabel1->setGeometry( QRect( 11, 12, 297, 16 ) );
- TextLabel1->setText( tr( "MEN_STUDIES_CHOICE" ) );
-
- QHBoxLayout* aBtnLayout = new QHBoxLayout;
- aBtnLayout->setSpacing( SPACING_SIZE );
- aBtnLayout->setMargin( 0 );
-
- buttonOk = new QPushButton( this, "buttonOk" );
- buttonOk->setText( tr( "BUT_OK" ) );
- buttonOk->setAutoDefault( true );
- buttonOk->setDefault( true );
-
- buttonCancel = new QPushButton( this, "buttonCancel" );
- buttonCancel->setText( tr( "BUT_CANCEL" ) );
- buttonCancel->setAutoDefault( true );
-
- aBtnLayout->addWidget( buttonOk );
- aBtnLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
- aBtnLayout->addWidget( buttonCancel );
-
- ListComponent = new QListBox( this, "ListComponent" );
- ListComponent->setVScrollBarMode(QListBox::AlwaysOn);
- ListComponent->setMinimumSize(MIN_LISTBOX_WIDTH, MIN_LISTBOX_HEIGHT);
- ListComponent->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
- ListComponent->setSelectionMode(QListBox::Single);
-
- aTopLayout->addWidget(TextLabel1, 0, 0);
- aTopLayout->addWidget(ListComponent, 1, 0);
- aTopLayout->addLayout(aBtnLayout, 2, 0);
-
- // signals and slots connections
- connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
-}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 STD_LOADSTUDIESDLG_H
-#define STD_LOADSTUDIESDLG_H
-
-#include <STD.h>
-
-#include <qdialog.h>
-#include <qvariant.h>
-
-class QLabel;
-class QListBox;
-class QPushButton;
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QListBoxItem;
-
-/*!\class STD_LoadStudiesDlg
- * \brief Describes a dialog box that gives a list of opened studies.
- *
- */
-class STD_EXPORT STD_LoadStudiesDlg : public QDialog
-{
- Q_OBJECT
-
-public:
- STD_LoadStudiesDlg( QWidget* parent = 0, bool modal = FALSE, WFlags fl = 0 );
- ~STD_LoadStudiesDlg() {}
-
- /*!\var TextLabel1
- * \brief stores a dialog text label
- */
- QLabel* TextLabel1;
-
- /*!\var buttonOk
- * \brief stores a dialog button OK
- */
- QPushButton* buttonOk;
-
- /*!\var buttonCancel
- * \brief stores a dialog button Cancel
- */
- QPushButton* buttonCancel;
-
- /*!\var ListComponent
- * \brief stores a dialog list compoent
- */
- QListBox* ListComponent;
-
-};
-
-#endif // STD_LOADSTUDIESDLG_H
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# This is a Qt message file in .po format. Each msgid starts with
-# a scope. This scope should *NOT* be translated - eg. "Foo::Bar"
-# would be translated to "Pub", not "Foo::Pub".
-msgid ""
-msgstr ""
-"Project-Id-Version: example-Qt-message-extraction\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 1999-02-23 15:38+0200\n"
-"Last-Translator: \n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-msgid "ICON_DESK_DEFAULTICON"
-msgstr "default.png"
-
-msgid "ICON_APP_DEFAULTICON"
-msgstr "default.png"
-
-msgid "ICON_FILE_NEW"
-msgstr "new.png"
-
-msgid "ICON_FILE_OPEN"
-msgstr "open.png"
-
-msgid "ICON_FILE_SAVE"
-msgstr "save.png"
-
-msgid "ICON_FILE_CLOSE"
-msgstr "close.png"
-
-msgid "ICON_EDIT_CUT"
-msgstr "cut.png"
-
-msgid "ICON_EDIT_COPY"
-msgstr "copy.png"
-
-msgid "ICON_EDIT_PASTE"
-msgstr "paste.png"
-
-msgid "ICON_HELP"
-msgstr "help.png"
-
-msgid "ICON_PRINT"
-msgstr "print.png"
-
-msgid "ICON_RESET"
-msgstr "reset.png"
-
-msgid "ICON_DESK_WINDOW_CASCADE"
-msgstr "cascade.png"
-
-msgid "ICON_DESK_WINDOW_TILE"
-msgstr "tile.png"
-
-msgid "ICON_DESK_WINDOW_VTILE"
-msgstr "vtile.png"
-
-msgid "ICON_DESK_WINDOW_HTILE"
-msgstr "htile.png"
-
-msgid "ICON_DESK_WINDOW_VSPLIT"
-msgstr "vtile.png"
-
-msgid "ICON_DESK_WINDOW_HSPLIT"
-msgstr "htile.png"
-
-msgid "ICON_APP_EDIT_UNDO"
-msgstr "undo.png"
-
-msgid "ICON_APP_EDIT_REDO"
-msgstr "redo.png"
-
-msgid "SUIT_ViewPort::ICON_CURSOR_ROTATE"
-msgstr "cursor_rotate.png"
-
-msgid "SUIT_ViewPort::ICON_CURSOR_ZOOM"
-msgstr "cursor_zoom.png"
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# This is a Qt message file in .po format. Each msgid starts with
-# a scope. This scope should *NOT* be translated - eg. "Foo::Bar"
-# would be translated to "Pub", not "Foo::Pub".
-msgid ""
-msgstr ""
-"Project-Id-Version: example-Qt-message-extraction\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 2007-11-07 18:43+0300\n"
-"Last-Translator: \n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-msgid "INF_READY"
-msgstr "Ready"
-
-msgid "BUT_OK"
-msgstr "&Ok"
-
-msgid "BUT_CANCEL"
-msgstr "&Cancel"
-
-msgid "BUT_CLOSE"
-msgstr "&Close"
-
-msgid "BUT_HELP"
-msgstr "&Help"
-
-msgid "BUT_YES"
-msgstr "&Yes"
-
-msgid "BUT_NO"
-msgstr "&No"
-
-msgid "BUT_APPLY"
-msgstr "&Apply"
-
-msgid "ERR_ERROR"
-msgstr "Error"
-
-msgid "WRN_WARNING"
-msgstr "Warning"
-
-msgid "INF_INFO"
-msgstr "Information"
-
-msgid "FILTER_FILES"
-msgstr "%1 Files (%2)"
-
-msgid "ALL_FILES"
-msgstr "All Files (*.*)"
-
-msgid "INF_CANCELLED"
-msgstr "Cancelled"
-
-msgid "ERR_UNKNOWN"
-msgstr "Unknown error"
-
-## ----------------------------------------------------
-
-msgid "INF_DESK_DOC_CREATE"
-msgstr "Create a new document"
-
-msgid "ERR_APP_NOAPP"
-msgstr "No application"
-
-msgid "INF_DESK_EXIT"
-msgstr "Exit"
-
-msgid "INF_DESK_TOOLBAR_STANDARD"
-msgstr "Standard"
-
-msgid "MEN_DESK_FILE"
-msgstr "&File"
-
-msgid "MEN_DESK_FILE_CLOSE"
-msgstr "&Close"
-
-msgid "MEN_DESK_FILE_EXIT"
-msgstr "E&xit"
-
-msgid "MEN_DESK_FILE_NEW"
-msgstr "&New"
-
-msgid "MEN_DESK_FILE_OPEN"
-msgstr "&Open..."
-
-msgid "MEN_DESK_FILE_PRINT"
-msgstr "&Print"
-
-msgid "MEN_DESK_FILE_SAVE"
-msgstr "&Save"
-
-msgid "MEN_DESK_FILE_SAVEAS"
-msgstr "Save &As..."
-
-msgid "MEN_DESK_EDIT"
-msgstr "&Edit"
-
-msgid "MEN_DESK_EDIT_CUT"
-msgstr "Cu&t"
-
-msgid "MEN_DESK_EDIT_COPY"
-msgstr "&Copy"
-
-msgid "MEN_DESK_EDIT_PASTE"
-msgstr "&Paste"
-
-msgid "MEN_DESK_HELP"
-msgstr "&Help"
-
-msgid "MEN_DESK_HELP_ABOUT"
-msgstr "&About..."
-
-msgid "MEN_DESK_HELP_CONTENTS"
-msgstr "&Contents"
-
-msgid "MEN_DESK_HELP_SEARCH"
-msgstr "&Search..."
-
-msgid "MEN_DESK_VIEW"
-msgstr "&View"
-
-msgid "MEN_DESK_VIEW_TOOLBARS"
-msgstr "T&oolbars"
-
-msgid "MEN_DESK_VIEW_STATUSBAR"
-msgstr "&Status Bar"
-
-msgid "MEN_DESK_VIEW_STDTOOLBAR"
-msgstr "&Standard"
-
-msgid "PRP_DESK_FILE_CLOSE"
-msgstr "Closes the active document"
-
-msgid "PRP_DESK_FILE_EXIT"
-msgstr "Exits the application"
-
-msgid "PRP_DESK_FILE_NEW"
-msgstr "Creates a new document"
-
-msgid "PRP_DESK_FILE_OPEN"
-msgstr "Opens an existing document"
-
-msgid "PRP_DESK_FILE_PRINT"
-msgstr "Prints the active document"
-
-msgid "PRP_DESK_FILE_SAVE"
-msgstr "Saves the active document"
-
-msgid "PRP_DESK_FILE_SAVEAS"
-msgstr "Saves the active document with a new name"
-
-msgid "PRP_DESK_EDIT_CUT"
-msgstr "Cuts the selection and puts it to the Clipboard"
-
-msgid "PRP_DESK_EDIT_COPY"
-msgstr "Copy the selection to the Clipboard"
-
-msgid "PRP_DESK_EDIT_PASTE"
-msgstr "Inserts the Clipboard content at the insertion point"
-
-msgid "PRP_DESK_HELP_ABOUT"
-msgstr "Shows \'About\' dialog"
-
-msgid "PRP_DESK_HELP_CONTENTS"
-msgstr "Shows the whole help contents"
-
-msgid "PRP_DESK_HELP_SEARCH"
-msgstr "Searches help for a topic"
-
-msgid "PRP_DESK_VIEW_STATUSBAR"
-msgstr "Toggles status bar view on/off"
-
-msgid "PRP_DESK_VIEW_STDTOOLBAR"
-msgstr "Toggles standard toolbar on/off"
-
-msgid "QUE_DESK_EXIT"
-msgstr "Are you sure you want to quit SALOME?"
-
-msgid "TOT_DESK_FILE_NEW"
-msgstr "New document"
-
-msgid "TOT_DESK_FILE_OPEN"
-msgstr "Open document"
-
-msgid "TOT_DESK_FILE_CLOSE"
-msgstr "Close document"
-
-msgid "TOT_DESK_FILE_PRINT"
-msgstr "Print document"
-
-msgid "TOT_DESK_FILE_SAVE"
-msgstr "Save document"
-
-msgid "TOT_DESK_FILE_SAVEAS"
-msgstr "Save document as..."
-
-msgid "TOT_DESK_FILE_EXIT"
-msgstr "Exit from application"
-
-msgid "TOT_DESK_EDIT_CUT"
-msgstr "Cut"
-
-msgid "TOT_DESK_EDIT_COPY"
-msgstr "Copy"
-
-msgid "TOT_DESK_EDIT_PASTE"
-msgstr "Paste"
-
-msgid "TOT_DESK_HELP_ABOUT"
-msgstr "About..."
-
-msgid "STD_Application::TOT_DOCK_WINDOWS"
-msgstr "Show / hide dockable windows and toolbars"
-
-msgid "STD_Application::MEN_DOCK_WINDOWS"
-msgstr "Windows and Toolbars"
-
-msgid "ERR_DOC_UNKNOWNTYPE_OPEN"
-msgstr "You are trying to open a document of an unknown type\n( %1 )"
-
-msgid "ERR_DOC_UNKNOWNTYPE_SAVE"
-msgstr "You are trying to save this document under an unknown type\n( %1 )"
-
-msgid "ERR_DOC_PERMISSIONDENIED_SAVE"
-msgstr "Can not save file %1. Permission denied"
-
-msgid "ERR_DOC_DIRWITHNAMEEXIST_SAVE"
-msgstr "Can not save file %1.\nDirectory with this name exist on disc. Try to use another name"
-
-msgid "QUE_DOC_FILEEXISTS"
-msgstr "The file %1 already exists.\nDo you want to overwrite it ?"
-
-msgid "ERR_DESK_NOAPP"
-msgstr "No applications registered"
-
-msgid "DESK_DEFAULTTITLE"
-msgstr "Qt Application Desktop"
-
-msgid "QUE_DOC_ALREADYOPEN"
-msgstr "The document %1 is already open.\nDo you want to reload it ?"
-
-msgid "MEN_DESK_WINDOW"
-msgstr "&Window"
-
-msgid "MEN_DESK_NEWWINDOW"
-msgstr "&New Window"
-
-msgid "TOT_DESK_NEWWINDOW"
-msgstr "Create new Window"
-
-msgid "PRP_DESK_NEWWINDOW"
-msgstr "Create new Window"
-
-msgid "MEN_DESK_WINDOW_CASCADE"
-msgstr "&Cascade"
-
-msgid "PRP_DESK_WINDOW_CASCADE"
-msgstr "Arranges the windows as overlapping tiles"
-
-msgid "MEN_DESK_WINDOW_TILE"
-msgstr "&Tile"
-
-msgid "PRP_DESK_WINDOW_TILE"
-msgstr "Arranges the windows as nonoverlapping tiles"
-
-msgid "MEN_DESK_WINDOW_HTILE"
-msgstr "Tile &Horizontally"
-
-msgid "PRP_DESK_WINDOW_HTILE"
-msgstr "Arranges the windows as nonoverlapping horizontal tiles"
-
-msgid "MEN_DESK_WINDOW_VTILE"
-msgstr "Tile &Vertically"
-
-msgid "PRP_DESK_WINDOW_VTILE"
-msgstr "Arranges the windows as nonoverlapping vertical tiles"
-
-msgid "PRP_DESK_WINDOW_ACTIVATE"
-msgstr "Activates this window"
-
-msgid "MEN_DESK_WINDOW_HSPLIT"
-msgstr "Split &Horizontally"
-
-msgid "PRP_DESK_WINDOW_HSPLIT"
-msgstr "Splits the active window on two horizontal parts"
-
-msgid "MEN_DESK_WINDOW_VSPLIT"
-msgstr "Split &Vertically"
-
-msgid "PRP_DESK_WINDOW_VSPLIT"
-msgstr "Splits the active window on two vertical parts"
-
-msgid "INF_DESK_DOCALREADYOPEN"
-msgstr "A document cannot be saved under a name of a document already opened.\nPlease, type another name for the document you want to save.\n( %1 )"
-
-msgid "MEN_DESK_FILE_MRU"
-msgstr "Recent &Files"
-
-msgid "PRP_DESK_FILE_MRU"
-msgstr "Opens a document"
-
-msgid "STD_Application::ABOUT_INFO"
-msgstr "SUIT Std application"
-
-msgid "MSG_FILE_EXISTS"
-msgstr "File \"%1\" already exists.\nDo you want to overwrite it?"
-
-msgid "MSG_CANT_SAVE"
-msgstr "Can't save file \"%1\"."
-
-msgid "TIT_FILE_SAVEAS"
-msgstr "Save As"
-
-msgid "STD_Application::INF_DOC_MODIFIED"
-msgstr "Document has been modified.\nDo you want to save changes?"
-
-msgid "STD_Application::INF_DOCUMENT_MODIFIED"
-msgstr "Document \"%1\" has been modified.\nDo you want to save changes?"
-
-msgid "STD_Application::INF_DOC_SAVED"
-msgstr "Study %1 saved"
-
-msgid "STD_Application::INF_DOC_SAVING"
-msgstr "Saving study "
-
-msgid "STD_Application::INF_DOC_SAVING_FAILS"
-msgstr "Can't save file \"%1\".\nPossible reason is permission denied or disc full.\nTry to use another file name."
-
-msgid "CLOSE_DLG_SAVE_CLOSE"
-msgstr "&Save && Close"
-
-msgid "CLOSE_DLG_CLOSE"
-msgstr "C&lose w/o saving"
-
-msgid "CLOSE_DLG_UNLOAD"
-msgstr "&Unload"
-
-msgid "TOT_DESK_FILE_LOAD"
-msgstr "Load document"
-
-msgid "PRP_DESK_FILE_LOAD"
-msgstr "Load a document"
-
-msgid "MEN_DESK_FILE_LOAD"
-msgstr "Conn&ect..."
-
-msgid "CLOSE_DLG_CAPTION"
-msgstr "Close active study"
-
-msgid "CLOSE_DLG_DESCRIPTION"
-msgstr "Study is modified. Do you want to save it?"
-
-msgid "DLG_LOAD_STUDY_CAPTION"
-msgstr "Load Study"
-
-msgid "MEN_STUDIES_CHOICE"
-msgstr "Choose existent study."
-
-
-
-
+++ /dev/null
-language=en
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : suit
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libsuit.la
-
-salomeinclude_HEADERS= \
- SUIT.h \
- SUIT_ActionOperation.h \
- SUIT_Application.h \
- SUIT_Convertor.h \
- SUIT_DataObject.h \
- SUIT_DataObjectIterator.h \
- SUIT_DataObjectKey.h \
- SUIT_DataOwner.h \
- SUIT_Desktop.h \
- SUIT_ExceptionHandler.h \
- SUIT_FileDlg.h \
- SUIT_FileValidator.h \
- SUIT_MessageBox.h \
- SUIT_MsgDlg.h \
- SUIT_Operation.h \
- SUIT_OverrideCursor.h \
- SUIT_ParserSettings.h \
- SUIT_PopupClient.h \
- SUIT_ResourceMgr.h \
- SUIT_SelectionMgr.h \
- SUIT_Selector.h \
- SUIT_Session.h \
- SUIT_SmartPtr.h \
- SUIT_Study.h \
- SUIT_ToolButton.h \
- SUIT_Tools.h \
- SUIT_ViewManager.h \
- SUIT_ViewModel.h \
- SUIT_ViewWindow.h \
- SUIT_SelectionFilter.h \
- SUIT_Accel.h \
- SUIT_TreeSync.h
-
-dist_libsuit_la_SOURCES= \
- SUIT_ActionOperation.cxx \
- SUIT_Application.cxx \
- SUIT_DataObject.cxx \
- SUIT_DataObjectIterator.cxx \
- SUIT_DataObjectKey.cxx \
- SUIT_DataOwner.cxx \
- SUIT_Desktop.cxx \
- SUIT_ExceptionHandler.cxx \
- SUIT_FileDlg.cxx \
- SUIT_FileValidator.cxx \
- SUIT_MessageBox.cxx \
- SUIT_MsgDlg.cxx \
- SUIT_Operation.cxx \
- SUIT_OverrideCursor.cxx \
- SUIT_ParserSettings.cxx \
- SUIT_PopupClient.cxx \
- SUIT_ResourceMgr.cxx \
- SUIT_SelectionMgr.cxx \
- SUIT_Selector.cxx \
- SUIT_Session.cxx \
- SUIT_Study.cxx \
- SUIT_ToolButton.cxx \
- SUIT_Tools.cxx \
- SUIT_ViewManager.cxx \
- SUIT_ViewModel.cxx \
- SUIT_ViewWindow.cxx \
- SUIT_SelectionFilter.cxx \
- SUIT_Accel.cxx
-
-MOC_FILES= \
- SUIT_ActionOperation_moc.cxx \
- SUIT_Application_moc.cxx \
- SUIT_DataObject_moc.cxx \
- SUIT_Desktop_moc.cxx \
- SUIT_FileDlg_moc.cxx \
- SUIT_MsgDlg_moc.cxx \
- SUIT_Operation_moc.cxx \
- SUIT_PopupClient_moc.cxx \
- SUIT_Session_moc.cxx \
- SUIT_Study_moc.cxx \
- SUIT_ToolButton_moc.cxx \
- SUIT_ViewModel_moc.cxx \
- SUIT_ViewWindow_moc.cxx \
- SUIT_ViewManager_moc.cxx \
- SUIT_SelectionMgr_moc.cxx \
- SUIT_Selector_moc.cxx \
- SUIT_Accel_moc.cxx
-nodist_libsuit_la_SOURCES=$(MOC_FILES)
-
-dist_salomeres_DATA = \
- resources/cascade.png \
- resources/htile.png \
- resources/vtile.png
-
-nodist_salomeres_DATA = \
- SUIT_images.qm \
- SUIT_msg_en.qm
-
-libsuit_la_CPPFLAGS=$(QT_INCLUDES) -I$(srcdir)/../Qtx
-libsuit_la_LDFLAGS=$(QT_MT_LIBS)
-libsuit_la_LIBADD=../Qtx/libqtx.la
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// SUIT_Convertor.h: interface for the SUIT_Convertor class.
-//
-
-#if !defined(AFX_SUIT_CONVERTOR_H__4C27F4C7_DC7C_4BEF_9DC1_EFB97B387EBF__INCLUDED_)
-#define AFX_SUIT_CONVERTOR_H__4C27F4C7_DC7C_4BEF_9DC1_EFB97B387EBF__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include "SUIT.h"
-#include "SUIT_DataObject.h"
-#include "SUIT_ViewModel.h"
-
-/*! Provides convertation of selected object of specified viewer into SUIT_DataObject.
- * Instance of Convertor class is created by Application according to data type and viewers used.
- */
-class SUIT_Convertor
-{
-public:
- virtual DataObjectList getSelectedObjects(const SUIT_ViewModel* theViewer) = 0;
- virtual void highlight(const SUIT_ViewModel* theViewer, const DataObjectList& theObjList) = 0;
-};
-
-#endif // !defined(AFX_SUIT_CONVERTOR_H__4C27F4C7_DC7C_4BEF_9DC1_EFB97B387EBF__INCLUDED_)
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : SUIT_MsgDlg.cxx
-// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-//
-
-#include "SUIT_MsgDlg.h"
-
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-
-/*!
- \class SUIT_MsgDlg
- \brief Information message dialog box with custom number of buttons.
-
- The class provides a functionality to display message box with the custom number
- of buttons. Each button is identified by the unique non-zero number which can
- be tested after dialog box finishes its execution. Pressing each button except
- causes dialog box to finish execution with return status equal to the button
- identifier. In addition, pressing "Cancel" button finishes dialog box execution
- wih return status 0.
-
- It is also possible to display custom pixmap or icon at the left side of the
- dialog box. Pass the required pixmap to the constructor or use method setPixmap().
-
- The typical usage of the dialog box:
- \code
- SUIT_MsgDlg dlg( this, tr( "Warning!" ),
- tr( "File %s exists. Overwrite?" ).arg( files[i] ),
- QMessageBox::standardIcon( QMessageBox::Warning ) );
- dlg.addButton( "Yes", YesId );
- dlg.addButton( "No", NoId );
- dlg.addButton( "Yes to all", YesAllId );
- dlg.addButton( "No to all", NoAllId );
- int ret = dlg.exec();
- switch( ret ) {
- case YesId:
- // process one file
- processOneFile();
- break;
- case NoId:
- // skip current file processing and proceed to the next file
- break;
- case YesAllId:
- // process all files
- processAllFiles();
- stopped = true;
- break;
- case NoAllId:
- // skip all process all files
- processAllFiles();
- break;
- default:
- // operation is cancelled
- break;
- }
- \endcode
-
- \sa addButton(), setPixmap()
-*/
-
-/*!
- \brief Constructor.
- \param parent parent widget
- \param title dialog box caption
- \param msg dialog box message
- \param icon dialog box icon
-*/
-SUIT_MsgDlg::SUIT_MsgDlg( QWidget* parent,
- const QString& title,
- const QString& msg,
- const QPixmap& icon )
-: QDialog ( parent, "SUIT_MsgDlg", true )
-{
- // title
- setCaption( title );
-
- // icon
- myIconLab = new QLabel( this );
- myIconLab->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
- myIconLab->setScaledContents( false );
- myIconLab->setAlignment( Qt::AlignCenter );
-
- if ( !icon.isNull() )
- myIconLab->setPixmap( icon );
-
- // info message
- myMsgLab = new QLabel( msg, this );
- myMsgLab->setTextFormat( Qt::RichText );
- myMsgLab->setAlignment( Qt::AlignCenter );
-
- // Buttons
- myButtonLayout = new QHBoxLayout();
- myButtonLayout->setMargin( 0 );
- myButtonLayout->setSpacing( 6 );
-
- // <Cancel>
- QPushButton* cancelBtn = new QPushButton( tr( "CANCEL" ), this );
- myButtonLayout->addSpacing( 20 );
- myButtonLayout->addStretch();
- myButtonLayout->addWidget( cancelBtn );
-
- QGridLayout* layout = new QGridLayout( this );
- layout->setMargin( 11 );
- layout->setSpacing( 6 );
-
- layout->addWidget( myIconLab, 0, 0 );
- layout->addWidget( myMsgLab, 0, 1 );
- layout->addMultiCellLayout( myButtonLayout, 1, 1, 0, 1 );
-
- // signals and slots connections
- connect( cancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
-}
-
-/*!
- \brief Destructor.
-*/
-SUIT_MsgDlg::~SUIT_MsgDlg()
-{
-}
-
-/*!
- \brief Add operation button to the dialog box.
-
- If the parameter \a id is equal to -1, then the
- button identifier is generated automatically.
-
- \param btext button text
- \param id button identifier
- \return button identifier
-*/
-int SUIT_MsgDlg::addButton( const QString& btext, const int id )
-{
- static int lastId = 0;
- int bid = id == -1 ? --lastId : id;
-
- QPushButton* b = button( bid );
- if ( b ) {
- myButtons.remove( b );
- delete b;
- }
-
- QPushButton* newButton = new QPushButton( btext, this );
-
- myButtonLayout->insertWidget( myButtons.count(), newButton );
- myButtons.insert( newButton, bid );
- connect( newButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
-
- return bid;
-}
-
-/*!
- \brief Set icon to the dialog box
- \param icon pixmap
-*/
-void SUIT_MsgDlg::setPixmap( const QPixmap& icon )
-{
- myIconLab->setPixmap( icon );
-}
-
-
-/*!
- \brief Called when any dialog button (except \c Cancel)
- is clicked.
-
- Closes the dialog and sets its result code to the identifier
- of the button clicked by the user.
-*/
-void SUIT_MsgDlg::accept()
-{
- QPushButton* btn = ( QPushButton* )sender();
- done( myButtons[ btn ] );
-}
-
-/*!
- \brief Search button with the specified identifier.
- \param id button identifier
- \return button or 0 if \a id is invalid
-*/
-QPushButton* SUIT_MsgDlg::button( const int id ) const
-{
- QPushButton* btn = 0;
- for ( ButtonMap::ConstIterator it = myButtons.begin();
- it != myButtons.end() && !btn; ++it ) {
- if ( it.data() == id )
- btn = it.key();
- }
- return btn;
-}
-
-/*!
- \brief Get information icon label.
- \return information icon label
-*/
-QLabel* SUIT_MsgDlg::iconLabel() const
-{
- return myIconLab;
-}
-
-/*!
- \brief Get information message label.
- \return information message label
-*/
-QLabel* SUIT_MsgDlg::messageLabel() const
-{
- return myMsgLab;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : SUIT_MsgDlg.h
-// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-//
-
-#ifndef SUIT_MSGDLG_H
-#define SUIT_MSGDLG_H
-
-#include "SUIT.h"
-
-#include <qdialog.h>
-#include <qpixmap.h>
-#include <qmap.h>
-
-class QLabel;
-class QPushButton;
-class QHBoxLayout;
-
-class SUIT_EXPORT SUIT_MsgDlg : public QDialog
-{
- Q_OBJECT
-
-public:
- SUIT_MsgDlg( QWidget*, const QString&, const QString&, const QPixmap& = QPixmap() ) ;
- ~SUIT_MsgDlg();
-
- int addButton( const QString&, const int = -1);
- void setPixmap( const QPixmap& );
-
-public slots:
- void accept();
-
-protected:
- QPushButton* button( const int ) const;
- QLabel* iconLabel() const;
- QLabel* messageLabel() const;
-
-private:
- typedef QMap<QPushButton*,int> ButtonMap;
-
-private:
- ButtonMap myButtons;
- QHBoxLayout* myButtonLayout;
- QLabel* myIconLab;
- QLabel* myMsgLab;
-};
-
-#endif // SUIT_MSGDLG_H
-
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SUIT_ParserSettings.cxx
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#include "SUIT_ParserSettings.h"
-
-#include <stdio.h>
-
-// QT Includes
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-
-
-/*! Constructor. Do nothing.*/
-SUIT_ParserSettings::SUIT_ParserSettings()
-{
-}
-
-
-/*!
- Destructor. Do nothing.
-*/
-SUIT_ParserSettings::~SUIT_ParserSettings()
-{
-}
-
-
-/*!
- Gets the contents of a file.
-*/
-QString SUIT_ParserSettings::getContents(QString fileName, bool comments,
- bool sections, bool whiteSpace,
- bool htmlComments)
-{
- QFileInfo fi(fileName);
- QFile f(fi.absFilePath());
- QString s=""; // Buffer for the whole file
-
- if(f.open(IO_ReadOnly)) { // file opened successfully
- QTextStream t(&f); // use a text stream
-
- s = t.read(); // The whole file in a string
- f.close();
-
- if(!comments) s = SUIT_ParserSettings::removeComments(s);
- if(!sections) s = SUIT_ParserSettings::removeSections(s);
- if(!whiteSpace) s = s.simplifyWhiteSpace();
- if(!htmlComments) s = SUIT_ParserSettings::removeHtmlComments(s);
- }
- else {
- // Can't open file
- }
-
- return s;
-}
-
-
-/*!
- Gets the body of a section from a string.
-*/
-QString SUIT_ParserSettings::getSection(QString s, QString sectionName)
-{
- QString result="";
-
- QChar ch; // A single byte of the file
- int bracketCounter=1; // Bracket counter (increase on '{' and decrese on '}'.
- int i; // Current index
- int l=0; // Length of current part we must have
-
- if((i=s.find(sectionName, 0, false)) >= 0 && // Jump to section [styles]
- (i=s.find('{', i)) >= 0 ) {
-
- ++i;
-
- while(i+l<(int)s.length()) {
- ch = s.at(i+l); // Single byte
-
- ++l;
-
- if(ch=='{') ++bracketCounter;
- if(ch=='}') --bracketCounter;
-
- if(bracketCounter==0) break;
- }
-
- result = s.mid(i, l-1);
- }
-
- return result;
-}
-
-
-
-/*!
- Gets the HTML comments out of a file.
-*/
-QString SUIT_ParserSettings::getHtmlComment(QString s)
-{
- QString result="";
- int length; // length of the sub string
- int ind=0;
-
- if((ind =s.find("<!--", ind))>=0 &&
- (ind+=4) &&
- (length=s.find("-->", ind)-ind)!=0) {
-
- result=s.mid(ind, length-3);
- }
-
- return result;
-}
-
-
-
-/*!
- Gets the next String between two given characters. The index-parameter gets moved to the character after
- the stopper or to -1 if the starter / stopper were not found.
-*/
-QString SUIT_ParserSettings::getNextStringBetween(QString s, int& startIndex,
- QChar starter, QChar stopper)
-{
- QString result="";
- int length=0; // length of the sub string
-
- if((startIndex =s.find(starter, startIndex))>=0 &&
- (length=s.find(stopper, startIndex+1)-startIndex)!=0) {
-
- result=s.mid(startIndex+1, length-1);
- startIndex+=2;
- }
-
- return result;
-}
-
-
-/*!
- Gets the next String between the given index and a given stopper character. The index-parameter gets moved to
- the character after the stopper or to -1 if the stopper was not found.
-*/
-QString SUIT_ParserSettings::getNextStringUntil(QString s, int& startIndex, QChar stopper)
-{
- QString result="";
- int length; // length of the sub string
-
- if((length=s.find(stopper, startIndex)-startIndex)!=0) {
- result=s.mid(startIndex, length);
- startIndex++;
- }
-
- return result;
-}
-
-
-/*!
- Removes all comments (between '/ *' and '* /').
-*/
-QString SUIT_ParserSettings::removeComments(QString s)
-{
- QString result="";
- int i1=0, i2;
-
- while((i2=s.find("/*", i1))>=0) {
- result += s.mid(i1, i2-i1);
-
- i1+=2;
- i1=s.find("*/", i1);
- i1+=2;
- }
-
- result += s.mid(i1, s.length()-i1);
-
- return result;
-}
-
-
-
-/*!
- Removes all HTML comments (between '<!--' and '-->') \image html html_comments.gif
-*/
-QString SUIT_ParserSettings::removeHtmlComments(QString s)
-{
- QString result="";
- int i1=0, i2;
-
- while((i2=s.find("<!--", i1))>=0) {
- result += s.mid(i1, i2-i1);
-
- i1+=4;
- i1=s.find("-->", i1);
- i1+=3;
- }
-
- result += s.mid(i1, s.length()-i1);
-
- return result;
-}
-
-
-
-/*!
- Removes all sections ('[section] { }').
-*/
-QString SUIT_ParserSettings::removeSections(QString s)
-{
- QString result="";
-
- QChar ch; // A single byte of the file
- int bracketCounter; // Bracket counter (increase on '{' and decrese on '}'.
- int i=0; // Current index
-
- while(i<(int)s.length()) {
- ch = s.at(i); // Single byte
-
- if(ch=='[') {
- bracketCounter=1;
- while(i<(int)s.length() && ch!=']') { ch = s.at(i); ++i; }
- ++i;
- while(i<(int)s.length() && ch!='{') { ch = s.at(i); ++i; }
- ++i;
-
- while(i<(int)s.length() && bracketCounter!=0) {
- ch = s.at(i);
- if(ch=='{') ++bracketCounter;
- if(ch=='}') --bracketCounter;
- ++i;
- }
- ++i;
- }
- else {
- result+=ch;
- }
-
- ++i;
- }
-
- return result;
-}
-
-
-/*!
- Format plain text into HTML-code with a given maximal width.
- Spaces get replaced with non breaking spaces. Tabulators get filled up
- with non breaking spaces.
-*/
-QString SUIT_ParserSettings::plainTextToHtml(QString s, int autoBreak)
-{
- QString result="\n";
-
- if(!s.isEmpty()) {
- int col=1, i;
-
- for(i=0; i<(int)s.length(); ++i) {
- // Line feed:
- //
- if(s[i]=='\n') {
- result+="<BR>\n";
- col=1;
- }
-
- // Auto break:
- //
- else if(col==autoBreak && autoBreak!=0) {
- result+="<BR>\n";
- result+=s[i];
- col=1;
- }
-
- // Tab:
- //
- else if(s[i]=='\t') {
- while(col%8!=0) { result+=" "; ++col; }
- result+=" ";
- ++col;
- }
-
- // Space:
- //
- else if(s[i]==' ') {
- result+=" ";
- ++col;
- }
-
- // Normal char / special code:
- //
- else {
- if(s[i].isLetter() || s[i].isNumber()) {
- result+=s[i];
- }
- else {
- result+=charToHtml(s[i]);
- }
- ++col;
- }
- }
-
- result+="\n";
- }
-
- return result;
-}
-
-
-/*!
- Converts a special character to html code (e.g.: '»' to "»")
-*/
-QString SUIT_ParserSettings::charToHtml(QChar c)
-{
- QString s;
- QString uc;
- uc.setNum(c.unicode());
- s = "&#" + uc + ";";
- return s;
-}
-
-
-// EOF
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SUIT_ParserSettings.h
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#ifndef SUIT_PARSERSETTINGS_H
-#define SUIT_PARSERSETTINGS_H
-
-#include <qstring.h>
-#include "SUIT.h"
-/*! \brief Text Parser.*/
-class SUIT_EXPORT SUIT_ParserSettings
-{
-public:
- SUIT_ParserSettings();
- ~SUIT_ParserSettings();
-
- static QString getContents(QString fileName, bool comments=true,
- bool sections=true, bool whitespace=true,
- bool htmlComments=true);
- static QString getSection(QString s, QString sectionName);
- static QString getHtmlComment(QString s);
- static QString getNextStringBetween(QString s, int& startIndex, QChar starter, QChar stopper);
- static QString getNextStringUntil(QString s, int& startIndex, QChar stopper);
- static QString removeComments(QString s);
- static QString removeHtmlComments(QString s);
- static QString removeSections(QString s);
- static QString plainTextToHtml(QString s, int autoBreak);
- static QString charToHtml(QChar c);
-
-};
-
-#endif
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# This is a Qt message file in .po format. Each msgid starts with
-# a scope. This scope should *NOT* be translated - eg. "Foo::Bar"
-# would be translated to "Pub", not "Foo::Pub".
-msgid ""
-msgstr ""
-"Project-Id-Version: example-Qt-message-extraction\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 1999-02-23 15:38+0200\n"
-"Last-Translator: \n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-msgid "ICON_DESK_WINDOW_CASCADE"
-msgstr "cascade.png"
-
-msgid "ICON_DESK_WINDOW_VTILE"
-msgstr "vtile.png"
-
-msgid "ICON_DESK_WINDOW_TILE"
-msgstr "htile.png"
-
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# This is a Qt message file in .po format. Each msgid starts with
-# a scope. This scope should *NOT* be translated - eg. "Foo::Bar"
-# would be translated to "Pub", not "Foo::Pub".
-msgid ""
-msgstr ""
-"Project-Id-Version: example-Qt-message-extraction\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 1999-02-23 15:38+0200\n"
-"Last-Translator: \n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-msgid "MEN_DESK_WINDOW"
-msgstr "&Window"
-
-msgid "MEN_DESK_WINDOW_CASCADE"
-msgstr "&Cascade"
-
-msgid "PRP_DESK_WINDOW_CASCADE"
-msgstr "Arranges the windows as overlapping tiles"
-
-msgid "MEN_DESK_WINDOW_TILE"
-msgstr "&Tile"
-
-msgid "PRP_DESK_WINDOW_TILE"
-msgstr "Arranges the windows as nonoverlapping tiles"
-
-msgid "MEN_DESK_WINDOW_VTILE"
-msgstr "Tile &Vertically"
-
-msgid "PRP_DESK_WINDOW_VTILE"
-msgstr "Arranges the windows as nonoverlapping vertical tiles"
-
-msgid "PRP_DESK_WINDOW_ACTIVATE"
-msgstr "Activates this window"
-
-msgid "LAB_QUICK_PATH"
-msgstr "Quick path:"
-
-msgid "BUT_ADD_PATH"
-msgstr "Add path"
-
-msgid "INF_DESK_DOC_OPEN"
-msgstr "Open File"
-
-msgid "INF_DESK_DOC_SAVE"
-msgstr "Save File"
-
-msgid "ERR_ERROR"
-msgstr "Error"
-
-msgid "WRN_WARNING"
-msgstr "Warning"
-
-msgid "ERR_DIR_NOT_EXIST"
-msgstr "The directory \"%1\" does not exist!"
-
-msgid "ERR_FILE_NOT_EXIST"
-msgstr "The file \"%1\" does not exist!"
-
-msgid "ERR_PERMISSION_DENIED"
-msgstr "Can't save file \"%1\".\nPermission denied."
-
-msgid "INF_DIRECTORIES_FILTER"
-msgstr "Directories"
-
-msgid "QUE_FILE_EXISTS"
-msgstr "The file \"%1\" already exists.\nDo you want to overwrite it?"
-
-msgid "TLT_DUMP_VIEW"
-msgstr "Dump View to File"
-
-msgid "TLT_IMAGE_FILES"
-msgstr "Images Files (*.bmp *.png *.jpg *.jpeg)""
-
-msgid "ERR_CANT_DUMP_VIEW"
-msgstr "Can't dump view contents to the file."
-
-msgid "CONTINUE"
-msgstr "Continue"
-
-msgid "CANCEL"
-msgstr "Cancel"
-
-#======================================================================
-
-msgid "SUIT_Study::OPERATION_LAUNCH"
-msgstr "Operation launch"
-
-msgid "SUIT_Study::PREVIOUS_NOT_FINISHED"
-msgstr "Previous operation is not finished and will be aborted"
-
-#======================================================================
-
-
-
-
-
-
-
-
\ No newline at end of file
+++ /dev/null
-// SALOME Utils : general SALOME's definitions and tools
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : utilities.h
-// Author : Antoine YESSAYAN, Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-
-/*! --- Definition macros file to print informations if _DEBUG_ is defined --- */
-
-#ifndef UTILITIES_H
-#define UTILITIES_H
-
-#include <iostream>
-#include <sstream>
-#include <cstdlib>
-
-
-#include "LocalTraceBufferPool.hxx"
-
-/*! \file utilities.h
- * For each message to put in the trace, a specific ostingstream object is \n
- * created and destroyed automatically at the end of the message macro. \n
- * The insert function of LocalTraceBufferPool class gets a buffer in a \n
- * buffer pool (unique with the help of mutexes and semaphores) and copy the \n
- * message in the buffer.\n
- * This buffer is read later by a specific thread in charge of trace print.\n
- * Order of trace entries is globally respected. Nevertheless, if there are \n
- * several threads waiting for a free buffer to trace, the order of \n
- * thread waken up is not garanteed (no fifo or priority rules in Linux Kernel)
- */
-
-#define MESS_INIT(deb) std::ostringstream os; os<<deb
-#define MESS_BEGIN(deb) MESS_INIT(deb)<<__FILE__ <<" ["<<__LINE__<<"] : "
-#define MESS_END std::endl; LocalTraceBufferPool::instance()->insert(NORMAL_MESS, os.str().c_str());
-#define MESS_ABORT std::endl; LocalTraceBufferPool::instance()->insert(ABORT_MESS, os.str().c_str());
-
-// --- Some macros are always defined (without _DEBUG_): for use with release version
-
-#define INFOS(msg) {MESS_BEGIN("- Trace ") << msg << MESS_END}
-#define PYSCRIPT(msg) {MESS_INIT("---PYSCRIPT--- ") << msg << MESS_END}
-#define INTERRUPTION(msg) {MESS_BEGIN("- INTERRUPTION: ")<< msg << MESS_ABORT}
-#define IMMEDIATE_ABORT(code) {std::cout <<std::flush; \
- std::cerr << "- ABORT " << __FILE__ << " [" <<__LINE__<< "] : " << flush; \
- std::cerr << "ABORT return code= "<< code << std::endl; \
- std::exit(code);}
-
-/*! --- To print date and time of compilation of current source --- */
-
-#if defined ( __GNUC__ )
-#define COMPILER "g++"
-#elif defined ( __sun )
-#define COMPILER "CC"
-#elif defined ( __KCC )
-#define COMPILER "KCC"
-#elif defined ( __PGI )
-#define COMPILER "pgCC"
-#elif defined ( __alpha )
-#define COMPILER "cxx"
-#else
-#define COMPILER "undefined"
-#endif
-
-#ifdef INFOS_COMPILATION
-#error INFOS_COMPILATION already defined
-#endif
-
-#define INFOS_COMPILATION { MESS_BEGIN("COMPILED with ") << COMPILER \
- << ", " << __DATE__ \
- << " at " << __TIME__ << MESS_END }
-#ifdef _DEBUG_
-
-/*! @name the following MACROS are useful at debug time*/
-//@{
-#define MESSAGE(msg) {MESS_BEGIN("- Trace ") << msg << MESS_END}
-#define SCRUTE(var) {MESS_BEGIN("- Trace ") << #var << "=" << var <<MESS_END}
-
-#define REPERE ("------- ")
-#define BEGIN_OF(msg) {MESS_BEGIN(REPERE) << "Begin of: " << msg << MESS_END}
-#define END_OF(msg) {MESS_BEGIN(REPERE) << "Normal end of: " << msg << MESS_END}
-
-#ifndef ASSERT
-#define ASSERT(condition) \
- if (!(condition)){INTERRUPTION("CONDITION "<<#condition<<" NOT VERIFIED")}
-#endif /* ASSERT */
-//@}
-
-#else /* ifdef _DEBUG_*/
-
-#define MESSAGE(msg) {}
-#define SCRUTE(var) {}
-#define REPERE
-#define BEGIN_OF(msg) {}
-#define END_OF(msg) {}
-
-#ifndef ASSERT
-#define ASSERT(condition) {}
-#endif /* ASSERT */
-
-#endif /* ifdef _DEBUG_*/
-
-#endif /* ifndef UTILITIES_H */
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : suitApp
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libSUITApp.la
-
-salomeinclude_HEADERS= SUITApp_Application.h
-
-dist_libSUITApp_la_SOURCES= \
- SUITApp.cxx \
- SUITApp_Application.cxx
-
-MOC_FILES=SUITApp_Application_moc.cxx
-nodist_libSUITApp_la_SOURCES= $(MOC_FILES)
-
-nodist_salomeres_DATA= SUITApp_msg_en.qm
-
-libSUITApp_la_CPPFLAGS=$(QT_INCLUDES) $(PYTHON_INCLUDES) \
- -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
-
-libSUITApp_la_LDFLAGS=$(QT_MT_LIBS)
-libSUITApp_la_LIBADD= ../SUIT/libsuit.la ../Qtx/libqtx.la
-
-if ENABLE_PYCONSOLE
-libSUITApp_la_LDFLAGS+= -Xlinker -export-dynamic $(PYTHON_LIBS)
-endif
-
-# Executable
-bin_PROGRAMS= SUITApp
-
-dist_SUITApp_SOURCES=SUITApp.cxx
-
-SUITApp_CPPFLAGS=$(QT_INCLUDES) $(PYTHON_INCLUDES) \
- -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
-
-SUITApp_LDADD= libSUITApp.la ../SUIT/libsuit.la ../Qtx/libqtx.la
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-
-msgid "APP_ERROR"
-msgstr "Error"
-
-msgid "APP_OK"
-msgstr "Ok"
-
-msgid "APP_UNK_EXCEPTION"
-msgstr "Unknown exception"
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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 $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libSUPERVGraph.la
-
-salomeinclude_HEADERS= \
- SUPERVGraph_ViewFrame.h \
- SUPERVGraph_ViewManager.h \
- SUPERVGraph_ViewModel.h \
- SUPERVGraph.h
-
-dist_libSUPERVGraph_la_SOURCES= \
- SUPERVGraph.cxx \
- SUPERVGraph_ViewFrame.cxx \
- SUPERVGraph_ViewManager.cxx \
- SUPERVGraph_ViewModel.cxx
-
-MOC_FILES= \
- SUPERVGraph_moc.cxx \
- SUPERVGraph_ViewFrame_moc.cxx \
- SUPERVGraph_ViewManager_moc.cxx \
- SUPERVGraph_ViewModel_moc.cxx
-nodist_libSUPERVGraph_la_SOURCES= $(MOC_FILES)
-
-dist_salomeres_DATA= \
- resources/view_pan.png \
- resources/view_reset.png
-
-nodist_salomeres_DATA= \
- SUPERVGraph_images.qm \
- SUPERVGraph_msg_en.qm
-
-libSUPERVGraph_la_CPPFLAGS=$(QT_INCLUDES) $(CAS_CPPFLAGS) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) \
- -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT -I$(srcdir)/../OBJECT
-libSUPERVGraph_la_LDFLAGS=$(QT_MT_LIBS) ../SUIT/libsuit.la
+++ /dev/null
-// SALOME SUPERVGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SUPERVGraph.cxx
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#include "SUPERVGraph.h"
-#include "SUPERVGraph_ViewFrame.h"
-
-using namespace std;
-
-/*!
- Creates view
-*/
-SUIT_ViewWindow* SUPERVGraph::createView(SUIT_Desktop* parent)
-{
- return new SUPERVGraph_ViewFrame( parent/*, "vtkView"*/ );
-}
-
-extern "C"
-{
- /*!
- Creates view
- */
- SUIT_ViewWindow* createView(SUIT_Desktop* parent)
- {
- return SUPERVGraph::createView(parent);
- }
-}
+++ /dev/null
-// SALOME SUPERVGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SUPERVGraph.h
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#ifndef SUPERVGraph_HeaderFile
-#define SUPERVGraph_HeaderFile
-
-#include "SUIT_Desktop.h"
-#include "SUIT_ViewWindow.h"
-
-#ifdef WNT
-#ifdef SUPERVGRAPH_EXPORTS
-#define SUPERVGRAPH_EXPORT __declspec(dllexport)
-#else
-#define SUPERVGRAPH_EXPORT __declspec(dllimport)
-#endif
-#else
-#define SUPERVGRAPH_EXPORT
-#endif
-
-#if defined WNT
-#pragma warning ( disable: 4251 )
-#endif
-
-class SUPERVGRAPH_EXPORT SUPERVGraph : public QObject
-{
- Q_OBJECT
-
-public :
-
- /*Standard_EXPORT*/ static SUIT_ViewWindow* createView ( SUIT_Desktop* parent);
-
-};
-
-#endif
+++ /dev/null
-// SALOME SUPERVGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SUPERVGraph_ViewFrame.cxx
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#include "SUPERVGraph_ViewFrame.h"
-
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_Session.h>
-
-//QT Include
-#include <qlayout.h>
-#include <qcolordialog.h>
-
-using namespace std;
-
-
-/*!
- Constructor
-*/
-SUPERVGraph_View::SUPERVGraph_View( QWidget* theParent ): QWidget( theParent )
-{
- init(theParent);
-}
-
-/*!
- Constructor
-*/
-SUPERVGraph_View::SUPERVGraph_View( SUPERVGraph_View* theParent ): QWidget( theParent )
-{
- init(theParent);
-}
-
-/*!
- Builds popup for SUPERVGraph viewer
-*/
-void SUPERVGraph_View::contextMenuPopup( QPopupMenu* )
-{
- // to be implemented
-}
-
-/*!
- Initialization
-*/
-void SUPERVGraph_View::init( QWidget* theParent )
-{
- if ( theParent->inherits( "QMainWindow" ) ) {
- ( ( QMainWindow* )theParent )->setCentralWidget( this );
- }
- else {
- QBoxLayout* layout = new QVBoxLayout( theParent );
- layout->addWidget( this );
- }
-
-}
-
-/*!
- Constructor
-*/
-SUPERVGraph_ViewFrame::SUPERVGraph_ViewFrame( SUIT_Desktop* theDesktop )
- : SUIT_ViewWindow( theDesktop )
-{
- myView = 0;
-
- //myView = new SUPERVGraph_View(this);
- // Set BackgroundColor
- /*
- int R = QAD_CONFIG->getSetting("SUPERVGraph:BackgroundColorRed").toInt();
- int G = QAD_CONFIG->getSetting("SUPERVGraph:BackgroundColorGreen").toInt();
- int B = QAD_CONFIG->getSetting("SUPERVGraph:BackgroundColorBlue").toInt();
- setBackgroundColor(QColor(R,G,B));*/
-
- myToolBar = new QToolBar(this);
- myToolBar->setCloseMode(QDockWindow::Undocked);
- myToolBar->setLabel(tr("LBL_TOOLBAR_LABEL"));
- createActions();
- createToolBar();
-}
-
-/*!
- Creates actions of SUPERVGraph view window
-*/
-void SUPERVGraph_ViewFrame::createActions()
-{
- if (!myActionsMap.isEmpty()) return;
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- QAction* aAction;
-
- // Panning
- aAction = new QAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "SUPERVGraph", tr( "ICON_SUPERVGraph_PAN" ) ),
- tr( "MNU_PAN_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_PAN_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewPan()));
- myActionsMap[ PanId ] = aAction;
-
- // Reset
- aAction = new QAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "SUPERVGraph", tr( "ICON_SUPERVGraph_RESET" ) ),
- tr( "MNU_RESET_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_RESET_VIEW"));
- connect(aAction, SIGNAL(activated()), this, SLOT(onViewReset()));
- myActionsMap[ ResetId ] = aAction;
-}
-
-/*!
- Creates toolbar of SUPERVGraph view window
-*/
-void SUPERVGraph_ViewFrame::createToolBar()
-{
- myActionsMap[PanId]->addTo(myToolBar);
- myActionsMap[ResetId]->addTo(myToolBar);
-}
-
-/*!
- Destructor
-*/
-SUPERVGraph_ViewFrame::~SUPERVGraph_ViewFrame() {}
-
-/*!
- Returns widget containing 3D-Viewer
-*/
-SUPERVGraph_View* SUPERVGraph_ViewFrame::getViewWidget()
-{
- return myView;
-}
-
-
-/*!
- Sets new view widget
- \param theView - new view widget
-*/
-void SUPERVGraph_ViewFrame::setViewWidget( SUPERVGraph_View* theView )
-{
- myView = theView;
-}
-
-
-/*!
- Display/hide Trihedron
-*/
-void SUPERVGraph_ViewFrame::onViewTrihedron()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewTrihedron" )
-}
-
-/*!
- Provides top projection of the active view
-*/
-void SUPERVGraph_ViewFrame::onViewTop()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewTop" )
-}
-
-/*!
- Provides bottom projection of the active view
-*/
-void SUPERVGraph_ViewFrame::onViewBottom()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewBottom" )
-}
-
-/*!
- Provides left projection of the active view
-*/
-void SUPERVGraph_ViewFrame::onViewLeft()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewLeft" )
-}
-
-/*!
- Provides right projection of the active view
-*/
-void SUPERVGraph_ViewFrame::onViewRight()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewRight" )
-}
-
-/*!
- Provides back projection of the active view
-*/
-void SUPERVGraph_ViewFrame::onViewBack()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewBack" )
-}
-
-/*!
- Provides front projection of the active view
-*/
-void SUPERVGraph_ViewFrame::onViewFront()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewFront" )
-}
-
-/*!
- Reset the active view
-*/
-void SUPERVGraph_ViewFrame::onViewReset()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewReset" )
- if (myView)
- myView->ResetView();
-}
-
-/*!
- Rotates the active view
-*/
-void SUPERVGraph_ViewFrame::onViewRotate()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewRotate" )
-}
-
-/*!
- Sets a new center of the active view
-*/
-void SUPERVGraph_ViewFrame::onViewGlobalPan()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewGlobalPan" )
-}
-
-/*!
- Zooms the active view
-*/
-void SUPERVGraph_ViewFrame::onViewZoom()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewZoom" )
-}
-
-/*!
- Moves the active view
-*/
-void SUPERVGraph_ViewFrame::onViewPan()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewPan" )
- if (myView != NULL)
- myView->ActivatePanning();
-}
-
-/*!
- Fits all obejcts within a rectangular area of the active view
-*/
-void SUPERVGraph_ViewFrame::onViewFitArea()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewFitArea" )
-}
-
-/*!
- Fits all objects in the active view
-*/
-void SUPERVGraph_ViewFrame::onViewFitAll()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onViewFitAll" )
-}
-
-/*!
- Set background of the viewport
-*/
-void SUPERVGraph_ViewFrame::setBackgroundColor( const QColor& color )
-{
- if (myView)
- myView->setPaletteBackgroundColor(color);
-}
-
-/*!
- Returns background of the viewport
-*/
-QColor SUPERVGraph_ViewFrame::backgroundColor() const
-{
- if (myView)
- return myView->paletteBackgroundColor();
- return QMainWindow::backgroundColor();
-}
-
-/*!
-*/
-void SUPERVGraph_ViewFrame::onAdjustTrihedron()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::onAdjustTrihedron" )
-}
-
-/*!
- Changes name of object
- \param obj - object to be renamed
- \param name - new name
-*/
-void SUPERVGraph_ViewFrame::rename( const Handle(SALOME_InteractiveObject)& IObject,
- QString newName )
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::rename" )
-}
-
-/*!
- Unhilights all object in viewer
- \param updateviewer - update current viewer
-*/
-void SUPERVGraph_ViewFrame::unHighlightAll()
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::unHighlightAll" )
-}
-
-/*!
- Hilights/unhilights object in viewer
- \param obj - object to be updated
- \param hilight - if it is true, object will be hilighted, otherwise it will be unhilighted
- \param update - update current viewer
-*/
-void SUPERVGraph_ViewFrame::highlight( const Handle(SALOME_InteractiveObject)& IObject,
- bool highlight, bool immediatly )
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::highlight" )
-}
-
-/*!
- \return true if object is in viewer or in collector
- \param obj - object to be checked
- \param onlyInViewer - search object only in viewer (so object must be displayed)
-*/
-bool SUPERVGraph_ViewFrame::isInViewer( const Handle(SALOME_InteractiveObject)& IObject )
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::isInViewer" )
- return false;
-}
-
-/*!
- \return true if object is displayed in viewer
- \param obj - object to be checked
-*/
-bool SUPERVGraph_ViewFrame::isVisible( const Handle(SALOME_InteractiveObject)& IObject )
-{
-// MESSAGE ( "SUPERVGraph_ViewFrame::isVisible" )
- return false;
-}
-
-/*!
- Custom resize event handler
-*/
-void SUPERVGraph_ViewFrame::resizeEvent( QResizeEvent* theEvent )
-{
- QMainWindow::resizeEvent( theEvent );
- if ( myView ) myView->resizeView( theEvent );
-}
+++ /dev/null
-// SALOME SUPERVGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SUPERVGraph_ViewFrame.h
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#ifndef SUPERVGraph_ViewFrame_H
-#define SUPERVGraph_ViewFrame_H
-
-#include "SUPERVGraph.h"
-
-#include "SALOME_InteractiveObject.hxx"
-#include "SUIT_PopupClient.h"
-#include "SUIT_ViewWindow.h"
-
-#include <qaction.h>
-
-#ifdef WIN32
-#pragma warning ( disable:4251 )
-#endif
-
-class SUPERVGRAPH_EXPORT SUPERVGraph_View: public QWidget, public SUIT_PopupClient {
- Q_OBJECT;
- public:
- static QString Type() { return "SUPERVGraphViewer"; }
-
- SUPERVGraph_View(QWidget* theParent);
- SUPERVGraph_View(SUPERVGraph_View* theParent);
-
- virtual void ActivatePanning() = 0;
- virtual void ResetView() = 0;
-
- /* redefine functions from SUIT_PopupClient */
- virtual QString popupClientType() const { return Type(); }
- virtual void contextMenuPopup( QPopupMenu* );
-
- virtual void resizeView( QResizeEvent* theEvent ) {};
-
- protected:
- void init(QWidget* theParent);
-
-};
-
-class SUPERVGRAPH_EXPORT SUPERVGraph_ViewFrame : public SUIT_ViewWindow {
- Q_OBJECT
-
- public:
- SUPERVGraph_ViewFrame(SUIT_Desktop* theDesktop );
- ~SUPERVGraph_ViewFrame();
-
- SUPERVGraph_View* getViewWidget();
- void setViewWidget(SUPERVGraph_View* theView);
-
- void setBackgroundColor( const QColor& );
- QColor backgroundColor() const;
-
- void onAdjustTrihedron( );
-
- /* interactive object management */
- void highlight( const Handle(SALOME_InteractiveObject)& IObject,
- bool highlight, bool immediatly = true );
- void unHighlightAll();
- void rename( const Handle(SALOME_InteractiveObject)& IObject,
- QString newName );
- bool isInViewer( const Handle(SALOME_InteractiveObject)& IObject );
- bool isVisible( const Handle(SALOME_InteractiveObject)& IObject );
-
- /* selection */
- Handle(SALOME_InteractiveObject) FindIObject(const char* Entry) { Handle(SALOME_InteractiveObject) o; return o; };
-
- /* display */
- void Display(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly = true){};
- void DisplayOnly(const Handle(SALOME_InteractiveObject)& IObject){};
- void Erase(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly = true){};
- void DisplayAll(){};
- void EraseAll(){};
- void Repaint() {};
-
- QToolBar* getToolBar() { return myToolBar; }
-
- public slots:
- void onViewPan();
- void onViewZoom();
- void onViewFitAll();
- void onViewFitArea();
- void onViewGlobalPan();
- void onViewRotate();
- void onViewReset();
- void onViewFront();
- void onViewBack();
- void onViewRight();
- void onViewLeft();
- void onViewBottom();
- void onViewTop();
- void onViewTrihedron();
-
- protected:
- void resizeEvent( QResizeEvent* theEvent );
-
- private:
- void createActions();
- void createToolBar();
-
- //! Actions ID
- enum { PanId, ResetId };
- typedef QMap<int, QAction*> ActionsMap;
-
- ActionsMap myActionsMap;
- QToolBar* myToolBar;
-
- SUPERVGraph_View* myView;
-};
-
-#ifdef WIN32
-#pragma warning ( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SUPERVGraph_ViewManager.h"
-
-int SUPERVGraph_ViewManager::myMaxId = 0;
-
-/*!
- Constructor
-*/
-SUPERVGraph_ViewManager::SUPERVGraph_ViewManager( SUIT_Study* theStudy,
- SUIT_Desktop* theDesktop,
- SUIT_ViewModel* theViewModel )
- : SUIT_ViewManager( theStudy, theDesktop, theViewModel )
-{
- myId = ++myMaxId;
-}
-
-/*!
- Destructor
-*/
-SUPERVGraph_ViewManager::~SUPERVGraph_ViewManager()
-{
-}
-
-/*!
- Sets view name
- \param theView - view to assign name
-*/
-void SUPERVGraph_ViewManager::setViewName(SUIT_ViewWindow* theView)
-{
- int aPos = myViews.find(theView);
- theView->setCaption( QString( "SUPERVISION scene:%1 - viewer:%2" ).arg( myId ).arg(aPos+1));
-}
-
-/*!
- Fills popup menu with custom actions
- \param popup - popup menu to be filled with
-*/
-void SUPERVGraph_ViewManager::contextMenuPopup( QPopupMenu* thePopup)
-{
- SUIT_ViewManager::contextMenuPopup( thePopup );
- // to be implemented
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SUPERVGRAPH_VIEWMANAGER_H
-#define SUPERVGRAPH_VIEWMANAGER_H
-
-#include "SUPERVGraph.h"
-
-#include "SUPERVGraph_ViewModel.h"
-#include "SUIT_ViewManager.h"
-
-class SUIT_Desktop;
-
-class SUPERVGRAPH_EXPORT SUPERVGraph_ViewManager : public SUIT_ViewManager
-{
- Q_OBJECT
-
-public:
- SUPERVGraph_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop, SUIT_ViewModel* theViewModel = 0 );
- ~SUPERVGraph_ViewManager();
-
- virtual void contextMenuPopup( QPopupMenu* thePopup );
-
-protected:
- void setViewName(SUIT_ViewWindow* theView);
-
-private:
- static int myMaxId;
- int myId;
-
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SUPERVGraph_ViewModel.h"
-#include "SUPERVGraph_ViewFrame.h"
-#include "SUIT_Desktop.h"
-#include "SUIT_ViewWindow.h"
-
-/*!
- Constructor
-*/
-SUPERVGraph_Viewer::SUPERVGraph_Viewer()
-:SUIT_ViewModel()
-{
-}
-
-/*!
- Destructor
-*/
-SUPERVGraph_Viewer::~SUPERVGraph_Viewer()
-{
-}
-
-/*!
- Creates new view window
- \param theDesktop - main window of application
-*/
-SUIT_ViewWindow* SUPERVGraph_Viewer::createView(SUIT_Desktop* theDesktop)
-{
- SUPERVGraph_ViewFrame* aRes = new SUPERVGraph_ViewFrame( theDesktop );
- return aRes;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SUPERVGRAPH_VIEWMODEL_H
-#define SUPERVGRAPH_VIEWMODEL_H
-
-#include "SUPERVGraph.h"
-
-#include "SUIT_ViewModel.h"
-
-class SUPERVGRAPH_EXPORT SUPERVGraph_Viewer: public SUIT_ViewModel
-{
- Q_OBJECT
-
-public:
- static QString Type() { return "SUPERVGraphViewer"; }
-
- SUPERVGraph_Viewer();
- virtual ~SUPERVGraph_Viewer();
-
- virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
- virtual QString getType() const { return Type(); }
-
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SUPERVGraph_images.po
-// Created: 11/22/2005 10:52:37 PM
-// Author: Margarita Karpunina
-// Copyright (C) CEA 2005
-
-msgid "ICON_SUPERVGraph_PAN"
-msgstr "view_pan.png"
-
-msgid "ICON_SUPERVGraph_RESET"
-msgstr "view_reset.png"
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SUPERVGraph_msg_en.po
-// Created: 11/22/2005 10:55:36 PM
-// Author: Margarita Karpunina
-// Copyright (C) CEA 2005
-
-msgid "LBL_TOOLBAR_LABEL"
-msgstr "View Operations"
-
-msgid "DSC_RESET_VIEW"
-msgstr "Reset View Point"
-
-msgid "MNU_RESET_VIEW"
-msgstr "Reset"
-
-msgid "DSC_PAN_VIEW"
-msgstr "Panning the view"
-
-msgid "MNU_PAN_VIEW"
-msgstr "Panning"
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Alexander Solovyov(OCN)
-# Module : SVTK
-# $Header:
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libSVTK.la
-
-salomeinclude_HEADERS= \
- SVTK.h \
- SVTK_Prs.h \
- SVTK_Actor.h \
- SALOME_Actor.h \
- SVTK_RectPicker.h \
- SVTK_DeviceActor.h \
- SVTK_DialogBase.h \
- SVTK_FontWidget.h \
- SVTK_CubeAxesActor2D.h \
- SVTK_Functor.h \
- SVTK_MainWindow.h \
- SVTK_View.h \
- SVTK_ViewManager.h \
- SVTK_ViewModel.h \
- SVTK_ViewWindow.h \
- SVTK_Renderer.h \
- SVTK_InteractorStyle.h \
- SVTK_RenderWindowInteractor.h \
- SVTK_GenericRenderWindowInteractor.h \
- SVTK_Selector.h \
- SVTK_Selection.h \
- SVTK_SelectionEvent.h \
- SVTK_SpaceMouse.h \
- SVTK_Event.h \
- SVTK_ViewModelBase.h \
- SVTK_SetRotationPointDlg.h \
- SVTK_Extension.h
-
-dist_libSVTK_la_SOURCES= \
- SVTK_Prs.cxx \
- SVTK_Actor.cxx \
- SALOME_Actor.cxx \
- SVTK_RectPicker.cxx \
- SVTK_DeviceActor.cxx \
- SVTK_CubeAxesActor2D.cxx \
- SVTK_NonIsometricDlg.cxx \
- SVTK_UpdateRateDlg.cxx \
- SVTK_CubeAxesDlg.cxx \
- SVTK_DialogBase.cxx \
- SVTK_FontWidget.cxx \
- SVTK_Trihedron.cxx \
- SVTK_MainWindow.cxx \
- SVTK_View.cxx \
- SVTK_ViewManager.cxx \
- SVTK_ViewModel.cxx \
- SVTK_Renderer.cxx \
- SVTK_ViewWindow.cxx \
- SVTK_InteractorStyle.cxx \
- SVTK_RenderWindowInteractor.cxx \
- SVTK_GenericRenderWindowInteractor.cxx \
- SVTK_SpaceMouse.cxx \
- SVTK_Selector.cxx \
- SVTK_SetRotationPointDlg.cxx \
- SVTK_Extension.cxx
-
-EXTRA_DIST+= SVTK_SelectorDef.h SVTK_Trihedron.h
-
-MOC_FILES= \
- SVTK_GenericRenderWindowInteractor_moc.cxx \
- SVTK_RenderWindowInteractor_moc.cxx \
- SVTK_NonIsometricDlg_moc.cxx \
- SVTK_UpdateRateDlg_moc.cxx \
- SVTK_CubeAxesDlg_moc.cxx \
- SVTK_FontWidget_moc.cxx \
- SVTK_DialogBase_moc.cxx \
- SVTK_ViewModelBase_moc.cxx \
- SVTK_ViewManager_moc.cxx \
- SVTK_ViewWindow_moc.cxx \
- SVTK_MainWindow_moc.cxx \
- SVTK_ViewModel_moc.cxx \
- SVTK_View_moc.cxx \
- SVTK_SetRotationPointDlg_moc.cxx
-nodist_libSVTK_la_SOURCES= $(MOC_FILES)
-
-nodist_salomeres_DATA= \
- SVTK_msg_en.qm \
- SVTK_images.qm
-
-libSVTK_la_CPPFLAGS= \
- $(QT_INCLUDES) \
- $(CAS_CPPFLAGS) \
- $(VTK_INCLUDES) \
- $(QWT_INCLUDES) \
- $(BOOST_CPPFLAGS) \
- -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT -I$(srcdir)/../STD \
- -I$(srcdir)/../CAM -I$(srcdir)/../OBJECT -I$(srcdir)/../Prs \
- -I$(srcdir)/../VTKViewer
-
-libSVTK_la_LDFLAGS= \
- $(VTK_LIBS) \
- $(QT_MT_LIBS) \
- $(CAS_KERNEL) $(CAS_VIEWER) \
- $(QWT_LIBS)
-
-libSVTK_la_LIBADD= ../Qtx/libqtx.la ../SUIT/libsuit.la ../STD/libstd.la \
- ../CAM/libCAM.la ../OBJECT/libSalomeObject.la \
- ../Prs/libSalomePrs.la ../VTKViewer/libVTKViewer.la
-
-# Executable
-bin_PROGRAMS = SVTK
-
-dist_SVTK_SOURCES= SVTK.cxx
-
-SVTK_CPPFLAGS=$(libSVTK_la_CPPFLAGS)
-SVTK_LDFLAGS=$(libSVTK_la_LDFLAGS)
-SVTK_LDADD=libSVTK.la $(libSVTK_la_LIBADD)
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : SalomeApp
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-if CPPUNIT_IS_OK
-if GUI_ENABLE_CORBA
- SUBDIRS=Test
-endif
-endif
-
-lib_LTLIBRARIES= libSalomeApp.la
-
-salomeinclude_HEADERS= \
- SalomeApp.h \
- SalomeApp_Application.h \
- SalomeApp_DataModel.h \
- SalomeApp_DataObject.h \
- SalomeApp_Module.h \
- SalomeApp_Study.h \
- SalomeApp_ExceptionHandler.h \
- SalomeApp_EventFilter.h \
- SalomeApp_Tools.h \
- SalomeApp_ImportOperation.h \
- SalomeApp_Filter.h \
- SalomeApp_TypeFilter.h \
- SalomeApp_StudyPropertiesDlg.h \
- SalomeApp_CheckFileDlg.h \
- SalomeApp_VisualState.h \
- SalomeApp_ExitDlg.h
-
-dist_libSalomeApp_la_SOURCES= \
- SalomeApp_Module.cxx \
- SalomeApp_Application.cxx \
- SalomeApp_DataModel.cxx \
- SalomeApp_DataObject.cxx \
- SalomeApp_Study.cxx \
- SalomeApp_ExceptionHandler.cxx \
- SalomeApp_EventFilter.cxx \
- SalomeApp_PyInterp.cxx \
- SalomeApp_Tools.cxx \
- SalomeApp_ImportOperation.cxx \
- SalomeApp_Filter.cxx \
- SalomeApp_TypeFilter.cxx \
- SalomeApp_StudyPropertiesDlg.cxx \
- SalomeApp_ListView.cxx \
- SalomeApp_CheckFileDlg.cxx \
- SalomeApp_VisualState.cxx \
- SalomeApp_ExitDlg.cxx
-
-MOC_FILES= \
- SalomeApp_Application_moc.cxx \
- SalomeApp_DataModel_moc.cxx \
- SalomeApp_Module_moc.cxx \
- SalomeApp_Study_moc.cxx \
- SalomeApp_StudyPropertiesDlg_moc.cxx \
- SalomeApp_ListView_moc.cxx \
- SalomeApp_CheckFileDlg_moc.cxx \
- SalomeApp_ExitDlg_moc.cxx
-
-nodist_libSalomeApp_la_SOURCES= $(MOC_FILES)
-
-dist_salomeres_DATA= \
- resources/SalomeApp.ini \
- resources/SalomeApp.xml
-
-nodist_salomeres_DATA= \
- SalomeApp_images.qm \
- SalomeApp_msg_en.qm
-
-libSalomeApp_la_CPPFLAGS=$(PYTHON_INCLUDES) $(QT_INCLUDES) $(QWT_INCLUDES) \
- $(CAS_CPPFLAGS) $(VTK_INCLUDES) $(BOOST_CPPFLAGS) @KERNEL_CXXFLAGS@ \
- -I$(srcdir)/../LightApp -I$(srcdir)/../CAM -I$(srcdir)/../Qtx \
- -I$(srcdir)/../SUIT -I$(srcdir)/../OBJECT -I$(srcdir)/../SVTK \
- -I$(srcdir)/../STD -I$(srcdir)/../VTKViewer -I$(srcdir)/../ObjBrowser \
- -I$(srcdir)/../PythonConsole -I$(srcdir)/../TOOLSGUI \
- -I$(srcdir)/../PyInterp -I$(srcdir)/../Session -I$(top_builddir)/idl \
- -I$(srcdir)/../Event \
- -I$(srcdir)/../CASCatch \
- -I$(top_builddir)/salome_adm/unix @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @LIBXML_INCLUDES@
-libSalomeApp_la_LDFLAGS=$(PYTHON_LIBS) $(QT_MT_LIBS)
-libSalomeApp_la_LIBADD= $(KERNEL_LDFLAGS) -lOpUtil -lSALOMELocalTrace -lSalomeDSClient \
- ../SUIT/libsuit.la ../STD/libstd.la ../CAM/libCAM.la ../ObjBrowser/libObjBrowser.la \
- ../Prs/libSalomePrs.la ../SPlot2d/libSPlot2d.la ../GLViewer/libGLViewer.la \
- ../OCCViewer/libOCCViewer.la ../VTKViewer/libVTKViewer.la ../OBJECT/libSalomeObject.la \
- ../SVTK/libSVTK.la ../SOCC/libSOCC.la ../PyInterp/libPyInterp.la \
- ../PythonConsole/libPythonConsole.la ../LogWindow/libLogWindow.la \
- ../LightApp/libLightApp.la ../TOOLSGUI/libToolsGUI.la ../CASCatch/libCASCatch.la $(CAS_KERNEL)
-
-EXTRA_DIST+=SalomeApp_PyInterp.h
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SalomeApp.h
-// Created: November, 2004
-// Author: OCC team
-// Copyright (C) CEA 2004
-
-
-// The following ifdef block is the standard way of creating macros which make exporting
-// from a DLL simpler. All files within this DLL are compiled with the SalomeApp_EXPORTS
-// symbol defined on the command line. this symbol should not be defined on any project
-// that uses this DLL. This way any other project whose source files include this file see
-// SalomeApp_API functions as being imported from a DLL, wheras this DLL sees symbols
-// defined with this macro as being exported.
-#ifdef WNT
-
-#ifdef SALOMEAPP_EXPORTS
-#define SALOMEAPP_EXPORT __declspec(dllexport)
-#else
-#define SALOMEAPP_EXPORT __declspec(dllimport)
-#endif
-
-#else
-#define SALOMEAPP_EXPORT
-#endif //WNT
-
-#define APP_VERSION "0.1"
-
-#if defined WNT
-#pragma warning ( disable: 4251 )
-#endif
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SalomeApp_Application.cxx
-// Created: 10/22/2004 3:23:45 PM
-// Author: Sergey LITONIN
-// Copyright (C) CEA 2004
-
-#include "SalomeApp_PyInterp.h" // WARNING! This include must be the first!
-
-#include "SalomeApp_Application.h"
-
-#include "SalomeApp_Study.h"
-#include "SalomeApp_DataModel.h"
-#include "SalomeApp_DataObject.h"
-#include "SalomeApp_EventFilter.h"
-#include "SalomeApp_VisualState.h"
-#include "SalomeApp_ExitDlg.h"
-
-#include "SalomeApp_StudyPropertiesDlg.h"
-
-#include "LightApp_Application.h"
-#include "LightApp_Preferences.h"
-#include "LightApp_WidgetContainer.h"
-#include "LightApp_SelectionMgr.h"
-#include "LightApp_NameDlg.h"
-
-#include "STD_LoadStudiesDlg.h"
-
-#include <SUIT_Tools.h>
-#include <SUIT_Session.h>
-#include <SUIT_MsgDlg.h>
-
-#include <QtxMRUAction.h>
-
-#include <OB_Browser.h>
-#include <OB_ListItem.h>
-
-#include <PythonConsole_PyConsole.h>
-
-#include <SUIT_FileDlg.h>
-#include <SUIT_MessageBox.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_ActionOperation.h>
-
-#include <Utils_ORB_INIT.hxx>
-#include <Utils_SINGLETON.hxx>
-#include <SALOME_ModuleCatalog_impl.hxx>
-#include <SALOME_LifeCycleCORBA.hxx>
-
-#include <qaction.h>
-#include <qcombobox.h>
-#include <qlistbox.h>
-#include <qregexp.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qmessagebox.h>
-
-#include "SALOMEDSClient_ClientFactory.hxx"
-#include "SALOMEDSClient_IParameters.hxx"
-
-#include "SALOME_ListIteratorOfListIO.hxx"
-#include "SALOME_ListIO.hxx"
-
-#include "ToolsGUI_CatalogGeneratorDlg.h"
-#include "ToolsGUI_RegWidget.h"
-
-#include <SALOMEDSClient_ClientFactory.hxx>
-
-#include <vector>
-/*!Internal class that updates object browser item properties */
-class SalomeApp_Updater : public OB_Updater
-{
-public:
- SalomeApp_Updater() : OB_Updater(){};
- virtual ~SalomeApp_Updater(){};
- virtual void update( SUIT_DataObject* theObj, OB_ListItem* theItem );
-};
-
-void SalomeApp_Updater::update( SUIT_DataObject* theObj, OB_ListItem* theItem )
-{
- if( !theObj || !theItem )
- return;
-
- SalomeApp_DataObject* SAObj = dynamic_cast<SalomeApp_DataObject*>( theObj );
- if( !SAObj )
- return;
-
- _PTR(SObject) SObj = SAObj->object();
- if( !SObj )
- return;
- _PTR( GenericAttribute ) anAttr;
-
- // Selectable
- if ( SObj->FindAttribute( anAttr, "AttributeSelectable" ) )
- {
- _PTR(AttributeSelectable) aAttrSel = anAttr;
- theItem->setSelectable( aAttrSel->IsSelectable() );
- }
- // Expandable
- if ( SObj->FindAttribute(anAttr, "AttributeExpandable") )
- {
- _PTR(AttributeExpandable) aAttrExpand = anAttr;
- theItem->setExpandable( aAttrExpand->IsExpandable() );
- }
- // Opened
- //this attribute is not supported in the version of SALOME 3.x
- //if ( SObj->FindAttribute(anAttr, "AttributeOpened") )
- //{
- // _PTR(AttributeOpened) aAttrOpen = anAttr;
- // theItem->setOpen( aAttrOpen->IsOpened() );
- //}
-}
-
-/*!Create new instance of SalomeApp_Application.*/
-extern "C" SALOMEAPP_EXPORT SUIT_Application* createApplication()
-{
- return new SalomeApp_Application();
-}
-
-/*!Constructor.*/
-SalomeApp_Application::SalomeApp_Application()
-: LightApp_Application()
-{
- connect( desktop(), SIGNAL( message( const QString& ) ),
- this, SLOT( onDesktopMessage( const QString& ) ) );
-}
-
-/*!Destructor.
- *\li Destroy event filter.
- */
-SalomeApp_Application::~SalomeApp_Application()
-{
- // Do not destroy. It's a singleton !
- //SalomeApp_EventFilter::Destroy();
-}
-
-/*!Start application.*/
-void SalomeApp_Application::start()
-{
- LightApp_Application::start();
-
- SalomeApp_EventFilter::Init();
-
- static bool isFirst = true;
- if ( isFirst ) {
- isFirst = false;
-
- QString hdffile;
- QStringList pyfiles;
-
- for (int i = 1; i < qApp->argc(); i++) {
- QRegExp rxs ("--study-hdf=(.+)");
- if ( rxs.search( QString(qApp->argv()[i]) ) >= 0 && rxs.capturedTexts().count() > 1 ) {
- QString file = rxs.capturedTexts()[1];
- QFileInfo fi ( file );
- QString extension = fi.extension( false ).lower();
- if ( extension == "hdf" && fi.exists() )
- hdffile = fi.absFilePath();
- }
- else {
- QRegExp rxp ("--pyscript=(.+)");
- if ( rxp.search( QString(qApp->argv()[i]) ) >= 0 && rxp.capturedTexts().count() > 1 ) {
- QStringList files = QStringList::split(",",rxp.capturedTexts()[1],false);
- pyfiles += files;
- }
- }
- }
-
- if ( !hdffile.isEmpty() ) // open hdf file given as parameter
- onOpenDoc( hdffile );
- else if ( pyfiles.count() > 0 ) // create new study
- onNewDoc();
-
- // import/execute python scripts
- if ( pyfiles.count() > 0 && activeStudy() ) {
- SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( activeStudy() );
- if ( appStudy ) {
- _PTR(Study) aStudy = appStudy->studyDS();
- if ( !aStudy->GetProperties()->IsLocked() ) {
- for (uint j = 0; j < pyfiles.count(); j++ ) {
- QFileInfo fi ( pyfiles[j] );
- PythonConsole* pyConsole = pythonConsole();
- if ( pyConsole ) {
- QString extension = fi.extension( false ).lower();
- if ( fi.exists() ) {
- // execute python script
- QString command = QString( "execfile(\"%1\")" ).arg( fi.absFilePath() );
- pyConsole->exec( command );
- }
- else {
- // import python module
- QString command = QString( "import %1" ).arg( pyfiles[j] );
- if ( extension == "py" )
- command = QString( "import %1" ).arg( fi.baseName( true ) );
- pyConsole->exec( command );
- }
- }
- }
- }
- }
- }
- }
-}
-
-/*!Create actions:*/
-void SalomeApp_Application::createActions()
-{
- LightApp_Application::createActions();
-
- SUIT_Desktop* desk = desktop();
-
- //! Save GUI state
- // "Save GUI State" command is moved to VISU module
- // createAction( SaveGUIStateId, tr( "TOT_DESK_FILE_SAVE_GUI_STATE" ), QIconSet(),
- // tr( "MEN_DESK_FILE_SAVE_GUI_STATE" ), tr( "PRP_DESK_FILE_SAVE_GUI_STATE" ),
- // 0, desk, false, this, SLOT( onSaveGUIState() ) );
-
- //! Dump study
- createAction( DumpStudyId, tr( "TOT_DESK_FILE_DUMP_STUDY" ), QIconSet(),
- tr( "MEN_DESK_FILE_DUMP_STUDY" ), tr( "PRP_DESK_FILE_DUMP_STUDY" ),
- CTRL+Key_D, desk, false, this, SLOT( onDumpStudy() ) );
-
- //! Load script
- createAction( LoadScriptId, tr( "TOT_DESK_FILE_LOAD_SCRIPT" ), QIconSet(),
- tr( "MEN_DESK_FILE_LOAD_SCRIPT" ), tr( "PRP_DESK_FILE_LOAD_SCRIPT" ),
- CTRL+Key_T, desk, false, this, SLOT( onLoadScript() ) );
-
- //! Properties
- createAction( PropertiesId, tr( "TOT_DESK_PROPERTIES" ), QIconSet(),
- tr( "MEN_DESK_PROPERTIES" ), tr( "PRP_DESK_PROPERTIES" ),
- CTRL+Key_P, desk, false, this, SLOT( onProperties() ) );
-
- //! Catalog Generator
- createAction( CatalogGenId, tr( "TOT_DESK_CATALOG_GENERATOR" ), QIconSet(),
- tr( "MEN_DESK_CATALOG_GENERATOR" ), tr( "PRP_DESK_CATALOG_GENERATOR" ),
- SHIFT+Key_G, desk, false, this, SLOT( onCatalogGen() ) );
-
- //! Registry Display
- createAction( RegDisplayId, tr( "TOT_DESK_REGISTRY_DISPLAY" ), QIconSet(),
- tr( "MEN_DESK_REGISTRY_DISPLAY" ), tr( "PRP_DESK_REGISTRY_DISPLAY" ),
- /*SHIFT+Key_D*/0, desk, false, this, SLOT( onRegDisplay() ) );
-
- //SRN: BugID IPAL9021, add an action "Load"
- createAction( FileLoadId, tr( "TOT_DESK_FILE_LOAD" ),
- resourceMgr()->loadPixmap( "STD", tr( "ICON_FILE_OPEN" ) ),
- tr( "MEN_DESK_FILE_LOAD" ), tr( "PRP_DESK_FILE_LOAD" ),
- CTRL+Key_L, desk, false, this, SLOT( onLoadDoc() ) );
- //SRN: BugID IPAL9021: End
-
-
- int fileMenu = createMenu( tr( "MEN_DESK_FILE" ), -1 );
-
- // "Save GUI State" command is renamed to "Save VISU State" and
- // creation of menu item is moved to VISU
- // createMenu( SaveGUIStateId, fileMenu, 10, -1 );
-
- createMenu( FileLoadId, fileMenu, 0 ); //SRN: BugID IPAL9021, add a menu item "Load"
-
- createMenu( DumpStudyId, fileMenu, 10, -1 );
- createMenu( separator(), fileMenu, -1, 15, -1 );
- createMenu( LoadScriptId, fileMenu, 10, -1 );
- createMenu( separator(), fileMenu, -1, 15, -1 );
- createMenu( PropertiesId, fileMenu, 10, -1 );
- createMenu( separator(), fileMenu, -1, 15, -1 );
-
- int toolsMenu = createMenu( tr( "MEN_DESK_TOOLS" ), -1, MenuToolsId, 50 );
- createMenu( CatalogGenId, toolsMenu, 10, -1 );
- createMenu( RegDisplayId, toolsMenu, 10, -1 );
- createMenu( separator(), toolsMenu, -1, 15, -1 );
-}
-
-/*! Purpose : SLOT. Open new document with \a aName.*/
-bool SalomeApp_Application::onOpenDoc( const QString& aName )
-{
- bool res = false, toOpen = true, isAlreadyOpen = false;
-
- // Look among opened studies
- if (activeStudy()) { // at least one study is opened
- SUIT_Session* aSession = SUIT_Session::session();
- QPtrList<SUIT_Application> aAppList = aSession->applications();
- QPtrListIterator<SUIT_Application> it (aAppList);
- SUIT_Application* aApp = 0;
- // iterate on all applications
- for (; (aApp = it.current()) && !isAlreadyOpen; ++it) {
- if (aApp->activeStudy()->studyName() == aName) {
- isAlreadyOpen = true; // Already opened, ask user what to do
-
- // The document ... is already open.
- // Do you want to reload it?
- int aAnswer = SUIT_MessageBox::warn2(desktop(), tr("WRN_WARNING"),
- tr("QUE_DOC_ALREADYOPEN").arg(aName),
- tr("BUT_YES"), tr("BUT_NO"), 1, 2, 2);
- if (aAnswer == 1) { // reload
- if (activeStudy()->studyName() == aName && aAppList.count() > 1) {
- // Opened in THIS (active) application.
- STD_Application* app1 = (STD_Application*)aAppList.at(0);
- STD_Application* app2 = (STD_Application*)aAppList.at(1);
- if (!app1 || !app2) {
- // Error
- return false;
- }
- if (app1->activeStudy()->studyName() == aName) {
- // app1 is this application, we need another one
- app1 = app2;
- }
- // Close document of this application. This application will be destroyed.
- onCloseDoc(/*ask = */false);
- // Open the file with another application, as this one will be destroyed.
- return app1->onOpenDoc(aName);
- } else {
- // Opened in another application.
- STD_Application* app = (STD_Application*)aApp;
- if (app)
- app->onCloseDoc(/*ask = */false);
- }
- } else { // do not reload
- // OK, the study will not be reloaded, but we call
- // CAM_Application::onOpenDoc( aName ) all the same.
- // It will activate a desktop of the study <aName>.
- }
- }
- }
- }
-
- // Look among unloaded studies
- if (!isAlreadyOpen) {
- std::vector<std::string> List = studyMgr()->GetOpenStudies();
-
- QString studyName;
- for (unsigned int ind = 0; ind < List.size() && !isAlreadyOpen; ind++) {
- studyName = List[ind].c_str();
- if (aName == studyName) {
- // Already exists unloaded, ask user what to do
- isAlreadyOpen = true;
-
- // The document ... already exists in the study manager.
- // Do you want to reload it?
- int aAnswer = SUIT_MessageBox::warn2(desktop(), tr("WRN_WARNING"),
- tr("QUE_DOC_ALREADYEXIST").arg(aName),
- tr("BUT_YES"), tr("BUT_NO"), 1, 2, 2);
- if (aAnswer == 1) {
- _PTR(Study) aStudy = studyMgr()->GetStudyByName(aName.latin1());
- if (aStudy)
- studyMgr()->Close(aStudy);
- } else {
- toOpen = false;
- }
- }
- }
- }
-
- if (toOpen)
- res = CAM_Application::onOpenDoc( aName );
-
- QAction* a = action( MRUId );
- if ( a && a->inherits( "QtxMRUAction" ) )
- {
- QtxMRUAction* mru = (QtxMRUAction*)a;
- if ( res )
- mru->insert( aName );
- else
- mru->remove( aName );
- }
- return res;
-}
-
-/*!SLOT. Load document.*/
-void SalomeApp_Application::onLoadDoc()
-{
- QString name, studyname, ext;
-
- STD_LoadStudiesDlg aDlg( desktop(), TRUE);
-
- std::vector<std::string> List = studyMgr()->GetOpenStudies();
-
- SUIT_Session* aSession = SUIT_Session::session();
- QPtrList<SUIT_Application> aAppList = aSession->applications();
- SUIT_Application* aApp = 0;
-
- for (unsigned int ind = 0; ind < List.size(); ind++) {
- studyname = List[ind].c_str();
- //Add to list only unloaded studies
- bool isAlreadyOpen = false;
- for ( QPtrListIterator<SUIT_Application> it( aAppList ); it.current() && !isAlreadyOpen; ++it )
- {
- aApp = it.current();
- if(!aApp || !aApp->activeStudy()) continue;
- if ( aApp->activeStudy()->studyName() == studyname ) isAlreadyOpen = true;
- }
-
- if ( !isAlreadyOpen ) aDlg.ListComponent->insertItem( studyname );
- }
-
- int retVal = aDlg.exec();
- studyname = aDlg.ListComponent->currentText();
-
- if (retVal == QDialog::Rejected)
- return;
-
- if ( studyname.isNull() || studyname.isEmpty() )
- return;
-
- name = studyname;
-#ifndef WNT
- //this code replace marker of windows drive and path become invalid therefore
- // defines placed there
- name.replace( QRegExp(":"), "/" );
-#endif
-
- if( LightApp_Application::onLoadDoc( name ) )
- {
- updateWindows();
- updateViewManagers();
- updateObjectBrowser(true);
- }
-}
-
-/*!
- \brief Close application.
-*/
-void SalomeApp_Application::onExit()
-{
- bool killServers = false;
- bool result = true;
-
- if ( exitConfirmation() ) {
- SalomeApp_ExitDlg dlg( desktop() );
- result = dlg.exec() == QDialog::Accepted;
- killServers = dlg.isServersShutdown();
- }
-
- if ( result )
- SUIT_Session::session()->closeSession( SUIT_Session::ASK, killServers );
-}
-
-/*!SLOT. Load document with \a aName.*/
-bool SalomeApp_Application::onLoadDoc( const QString& aName )
-{
- return LightApp_Application::onLoadDoc( aName );
-}
-
-/*!SLOT. Copy objects to study maneger from selection maneger..*/
-void SalomeApp_Application::onCopy()
-{
- SALOME_ListIO list;
- LightApp_SelectionMgr* mgr = selectionMgr();
- mgr->selectedObjects(list);
-
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(activeStudy());
- if(study == NULL) return;
-
- _PTR(Study) stdDS = study->studyDS();
- if(!stdDS) return;
-
- SALOME_ListIteratorOfListIO it( list );
- if(it.More())
- {
- _PTR(SObject) so = stdDS->FindObjectID(it.Value()->getEntry());
- try {
- studyMgr()->Copy(so);
- onSelectionChanged();
- }
- catch(...) {
- }
- }
-}
-
-/*!SLOT. Paste objects to study maneger from selection manager.*/
-void SalomeApp_Application::onPaste()
-{
- SALOME_ListIO list;
- LightApp_SelectionMgr* mgr = selectionMgr();
- mgr->selectedObjects(list);
-
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(activeStudy());
- if(study == NULL) return;
-
- _PTR(Study) stdDS = study->studyDS();
- if(!stdDS) return;
-
- if ( stdDS->GetProperties()->IsLocked() ) {
- SUIT_MessageBox::warn1 ( desktop(),
- QObject::tr("WRN_WARNING"),
- QObject::tr("WRN_STUDY_LOCKED"),
- QObject::tr("BUT_OK") );
- return;
- }
-
- SALOME_ListIteratorOfListIO it( list );
- if(it.More())
- {
- _PTR(SObject) so = stdDS->FindObjectID(it.Value()->getEntry());
- try {
- studyMgr()->Paste(so);
- updateObjectBrowser( true );
- updateActions(); //SRN: BugID IPAL9377, case 3
- }
- catch(...) {
- }
- }
-}
-
-/*! Check if the study is locked */
-void SalomeApp_Application::onCloseDoc( bool ask )
-{
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(activeStudy());
-
- if (study != NULL) {
- _PTR(Study) stdDS = study->studyDS();
- if(stdDS && stdDS->IsStudyLocked()) {
- if ( SUIT_MessageBox::warn2( desktop(),
- QObject::tr( "WRN_WARNING" ),
- QObject::tr( "CLOSE_LOCKED_STUDY" ),
- QObject::tr( "BUT_YES" ),
- QObject::tr( "BUT_NO" ),
- SUIT_YES,
- SUIT_NO,
- SUIT_NO ) == SUIT_NO ) return;
-
- }
- }
-
- LightApp_Application::onCloseDoc( ask );
-}
-
-/*!Sets enable or disable some actions on selection changed.*/
-void SalomeApp_Application::onSelectionChanged()
-{
- SALOME_ListIO list;
- LightApp_SelectionMgr* mgr = selectionMgr();
- mgr->selectedObjects(list);
-
- bool canCopy = false;
- bool canPaste = false;
-
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(activeStudy());
- if (study != NULL) {
- _PTR(Study) stdDS = study->studyDS();
-
- if (stdDS) {
- SALOME_ListIteratorOfListIO it ( list );
-
- if (it.More() && list.Extent() == 1) {
- _PTR(SObject) so = stdDS->FindObjectID(it.Value()->getEntry());
-
- if ( so ) {
- canCopy = studyMgr()->CanCopy(so);
- canPaste = studyMgr()->CanPaste(so);
- }
- }
- }
- }
-
- action(EditCopyId)->setEnabled(canCopy);
- action(EditPasteId)->setEnabled(canPaste);
-}
-
-/*!Delete references.*/
-void SalomeApp_Application::onDeleteInvalidReferences()
-{
- SALOME_ListIO aList;
- LightApp_SelectionMgr* mgr = selectionMgr();
- mgr->selectedObjects( aList, QString::null, false );
-
- if( aList.IsEmpty() )
- return;
-
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(activeStudy());
- _PTR(Study) aStudyDS = aStudy->studyDS();
- _PTR(StudyBuilder) aStudyBuilder = aStudyDS->NewBuilder();
- _PTR(SObject) anObj;
-
- for( SALOME_ListIteratorOfListIO it( aList ); it.More(); it.Next() )
- if ( it.Value()->hasEntry() )
- {
- _PTR(SObject) aSObject = aStudyDS->FindObjectID( it.Value()->getEntry() ), aRefObj = aSObject;
- while( aRefObj && aRefObj->ReferencedObject( anObj ) )
- aRefObj = anObj;
-
- if( aRefObj && aRefObj!=aSObject && QString( aRefObj->GetName().c_str() ).isEmpty() )
- aStudyBuilder->RemoveReference( aSObject );
- }
- updateObjectBrowser();
-}
-
-/*!Private SLOT. */
-void SalomeApp_Application::onOpenWith()
-{
- QApplication::setOverrideCursor( Qt::waitCursor );
- SALOME_ListIO aList;
- LightApp_SelectionMgr* mgr = selectionMgr();
- mgr->selectedObjects(aList);
- if (aList.Extent() != 1)
- {
- QApplication::restoreOverrideCursor();
- return;
- }
- Handle(SALOME_InteractiveObject) aIObj = aList.First();
- QString aModuleName(aIObj->getComponentDataType());
- QString aModuleTitle = moduleTitle(aModuleName);
- activateModule(aModuleTitle);
- QApplication::restoreOverrideCursor();
-}
-
-/*!
- Creates new study
-*/
-SUIT_Study* SalomeApp_Application::createNewStudy()
-{
- SalomeApp_Study* aStudy = new SalomeApp_Study( this );
-
- // Set up processing of major study-related events
- connect( aStudy, SIGNAL( created( SUIT_Study* ) ), this, SLOT( onStudyCreated( SUIT_Study* ) ) );
- connect( aStudy, SIGNAL( opened ( SUIT_Study* ) ), this, SLOT( onStudyOpened ( SUIT_Study* ) ) );
- connect( aStudy, SIGNAL( saved ( SUIT_Study* ) ), this, SLOT( onStudySaved ( SUIT_Study* ) ) );
- connect( aStudy, SIGNAL( closed ( SUIT_Study* ) ), this, SLOT( onStudyClosed ( SUIT_Study* ) ) );
-
- return aStudy;
-}
-
-/*!
- Enable/Disable menu items and toolbar buttons. Rebuild menu
-*/
-void SalomeApp_Application::updateCommandsStatus()
-{
- LightApp_Application::updateCommandsStatus();
-
- // Dump study menu
- QAction* a = action( DumpStudyId );
- if ( a )
- a->setEnabled( activeStudy() );
-
- // Load script menu
- a = action( LoadScriptId );
- if ( a )
- a->setEnabled( activeStudy() );
-
- // Properties menu
- a = action( PropertiesId );
- if( a )
- a->setEnabled( activeStudy() );
-
- // Save GUI state menu
- a = action( SaveGUIStateId );
- if( a )
- a->setEnabled( activeStudy() );
-
- // update state of Copy/Paste menu items
- onSelectionChanged();
-}
-
-/*!
- \class DumpStudyFileDlg
- Private class used in Dump Study operation. Consists 2 check boxes:
- "Publish in study" and "Save GUI parameters"
-*/
-class DumpStudyFileDlg : public SUIT_FileDlg
-{
-public:
- DumpStudyFileDlg( QWidget* parent ) : SUIT_FileDlg( parent, false, true, true )
- {
- QHBox* hB = new QHBox( this );
- myPublishChk = new QCheckBox( tr("PUBLISH_IN_STUDY"), hB );
- mySaveGUIChk = new QCheckBox( tr("SAVE_GUI_STATE"), hB );
- QPushButton* pb = new QPushButton(this);
- addWidgets( new QLabel("", this), hB, pb );
- pb->hide();
- }
- QCheckBox* myPublishChk;
- QCheckBox* mySaveGUIChk;
-};
-
-/*!Private SLOT. On dump study.*/
-void SalomeApp_Application::onDumpStudy( )
-{
- SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( activeStudy() );
- if ( !appStudy ) return;
- _PTR(Study) aStudy = appStudy->studyDS();
-
- QStringList aFilters;
- aFilters.append( tr( "PYTHON_FILES_FILTER" ) );
-
- DumpStudyFileDlg* fd = new DumpStudyFileDlg( desktop() );
- fd->setCaption( tr( "TOT_DESK_FILE_DUMP_STUDY" ) );
- fd->setFilters( aFilters );
- fd->myPublishChk->setChecked( true );
- fd->mySaveGUIChk->setChecked( true );
- QString aFileName;
- while (1) {
- fd->exec();
- fd->raise();
- aFileName = fd->selectedFile();
- if (!aFileName.isEmpty()) {
- if ( (aFileName.find('-', 0) == -1) && (aFileName.find('!', 0) == -1) && (aFileName.find('?', 0) == -1) &&
- (aFileName.find('#', 0) == -1) && (aFileName.find('*', 0) == -1) && (aFileName.find('&', 0) == -1)) {
- break;
- }
- else {
- SUIT_MessageBox::warn1 ( desktop(),
- QObject::tr("WRN_WARNING"),
- tr("WRN_FILE_NAME_BAD"),
- QObject::tr("BUT_OK") );
- }
- }
- else {
- break;
- }
- }
- bool toPublish = fd->myPublishChk->isChecked();
- bool toSaveGUI = fd->mySaveGUIChk->isChecked();
- delete fd;
-
- if ( !aFileName.isEmpty() ) {
- QFileInfo aFileInfo(aFileName);
- int savePoint;
- _PTR(AttributeParameter) ap;
- _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
- if(ip->isDumpPython(appStudy->studyDS())) ip->setDumpPython(appStudy->studyDS()); //Unset DumpPython flag.
- if ( toSaveGUI ) { //SRN: Store a visual state of the study at the save point for DumpStudy method
- ip->setDumpPython(appStudy->studyDS());
- savePoint = SalomeApp_VisualState( this ).storeState(); //SRN: create a temporary save point
- }
- bool res = aStudy->DumpStudy( aFileInfo.dirPath( true ).latin1(), aFileInfo.baseName().latin1(), toPublish);
- if ( toSaveGUI )
- appStudy->removeSavePoint(savePoint); //SRN: remove the created temporary save point.
- if ( !res )
- SUIT_MessageBox::warn1 ( desktop(),
- QObject::tr("WRN_WARNING"),
- tr("WRN_DUMP_STUDY_FAILED"),
- QObject::tr("BUT_OK") );
- }
-}
-
-/*!Private SLOT. On load script.*/
-void SalomeApp_Application::onLoadScript( )
-{
- SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( activeStudy() );
- if ( !appStudy ) return;
- _PTR(Study) aStudy = appStudy->studyDS();
-
- if ( aStudy->GetProperties()->IsLocked() ) {
- SUIT_MessageBox::warn1 ( desktop(),
- QObject::tr("WRN_WARNING"),
- QObject::tr("WRN_STUDY_LOCKED"),
- QObject::tr("BUT_OK") );
- return;
- }
-
- QStringList filtersList;
- filtersList.append(tr("PYTHON_FILES_FILTER"));
- filtersList.append(tr("ALL_FILES_FILTER"));
-
- QString aFile = SUIT_FileDlg::getFileName( desktop(), "", filtersList, tr( "TOT_DESK_FILE_LOAD_SCRIPT" ), true, true );
-
- if ( !aFile.isEmpty() )
- {
- QString command = QString("execfile(\"%1\")").arg(aFile);
-
- PythonConsole* pyConsole = pythonConsole();
-
- if ( pyConsole )
- pyConsole->exec( command );
- }
-}
-
-/*!Private SLOT. On save GUI state.*/
-void SalomeApp_Application::onSaveGUIState()
-{
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( activeStudy() );
- if ( study ) {
- SalomeApp_VisualState( this ).storeState();
- updateSavePointDataObjects( study );
- objectBrowser()->updateTree( study->root() );
- }
- updateActions();
-}
-
-/*!Gets file filter.
- *\retval QString "(*.hdf)"
- */
-QString SalomeApp_Application::getFileFilter() const
-{
- return "(*.hdf)";
-}
-
-/*!Create window.*/
-QWidget* SalomeApp_Application::createWindow( const int flag )
-{
- QWidget* wid = 0;
- if ( flag != WT_PyConsole ) wid = LightApp_Application::createWindow(flag);
-
- SUIT_ResourceMgr* resMgr = resourceMgr();
-
- if ( flag == WT_ObjectBrowser )
- {
- OB_Browser* ob = (OB_Browser*)wid;
- ob->setUpdater( new SalomeApp_Updater() );
- connect( ob->listView(), SIGNAL( doubleClicked( QListViewItem* ) ), this, SLOT( onDblClick( QListViewItem* ) ) );
- bool autoSize = resMgr->booleanValue( "ObjectBrowser", "auto_size", false ),
- autoSizeFirst = resMgr->booleanValue( "ObjectBrowser", "auto_size_first", true );
- for ( int i = SalomeApp_DataObject::CT_Value; i <= SalomeApp_DataObject::CT_RefEntry; i++ )
- {
- ob->addColumn( tr( QString().sprintf( "OBJ_BROWSER_COLUMN_%d", i ) ), i );
- ob->setColumnShown( i, resMgr->booleanValue( "ObjectBrowser",
- QString().sprintf( "visibility_column_%d", i ), true ) );
- }
- ob->setWidthMode( autoSize ? QListView::Maximum : QListView::Manual );
- ob->listView()->setColumnWidthMode( 0, autoSizeFirst ? QListView::Maximum : QListView::Manual );
- ob->resize( desktop()->width()/3, ob->height() );
- }
- else if ( flag == WT_PyConsole )
- {
- PythonConsole* pyCons = new PythonConsole( desktop(), new SalomeApp_PyInterp() );
- pyCons->setCaption( tr( "PYTHON_CONSOLE" ) );
- wid = pyCons;
- pyCons->resize( pyCons->width(), desktop()->height()/4 );
- //pyCons->connectPopupRequest(this, SLOT(onConnectPopupRequest(SUIT_PopupClient*, QContextMenuEvent*)));
- }
- return wid;
-}
-
-/*!Create preferences.*/
-void SalomeApp_Application::createPreferences( LightApp_Preferences* pref )
-{
- LightApp_Application::createPreferences(pref);
-
- if ( !pref )
- return;
-
- int salomeCat = pref->addPreference( tr( "PREF_CATEGORY_SALOME" ) );
- int obTab = pref->addPreference( tr( "PREF_TAB_OBJBROWSER" ), salomeCat );
- int defCols = pref->addPreference( tr( "PREF_GROUP_DEF_COLUMNS" ), obTab );
- for ( int i = SalomeApp_DataObject::CT_Value; i <= SalomeApp_DataObject::CT_RefEntry; i++ )
- {
- pref->addPreference( tr( QString().sprintf( "OBJ_BROWSER_COLUMN_%d", i ) ), defCols,
- LightApp_Preferences::Bool, "ObjectBrowser", QString().sprintf( "visibility_column_%d", i ) );
- }
- pref->setItemProperty( defCols, "columns", 1 );
-
- // adding preference to LightApp_Application handled preferences.. a bit of hacking with resources..
- int genTab = pref->addPreference( LightApp_Application::tr( "PREF_TAB_GENERAL" ), salomeCat );
- int studyGroup = pref->addPreference( LightApp_Application::tr( "PREF_GROUP_STUDY" ), genTab );
- pref->addPreference( tr( "PREF_STORE_VISUAL_STATE" ), studyGroup, LightApp_Preferences::Bool, "Study", "store_visual_state" );
-}
-
-/*!Update desktop title.*/
-void SalomeApp_Application::updateDesktopTitle() {
- QString aTitle = applicationName();
- QString aVer = applicationVersion();
- if ( !aVer.isEmpty() )
- aTitle += QString( " " ) + aVer;
-
- if ( activeStudy() )
- {
- QString sName = SUIT_Tools::file( activeStudy()->studyName().stripWhiteSpace(), false );
- if ( !sName.isEmpty() ) {
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(activeStudy());
- if ( study ) {
- _PTR(Study) stdDS = study->studyDS();
- if(stdDS) {
- if ( stdDS->GetProperties()->IsLocked() ) {
- aTitle += QString( " - [%1 (%2)]").arg( sName ).arg( tr( "STUDY_LOCKED" ) );
- } else {
- aTitle += QString( " - [%1]" ).arg( sName );
- }
- }
- }
- }
- }
-
- desktop()->setCaption( aTitle );
-}
-
-/*!
- \brief Show dialog box to propose possible user actions when study is closed.
- \param docName study name
- \return chosen action ID
- \sa closeAction()
-*/
-int SalomeApp_Application::closeChoice( const QString& docName )
-{
- SUIT_MsgDlg dlg( desktop(), tr( "APPCLOSE_CAPTION" ), tr ( "APPCLOSE_DESCRIPTION" ),
- QMessageBox::standardIcon( QMessageBox::Information ) );
- dlg.addButton( tr ( "APPCLOSE_SAVE" ), CloseSave );
- dlg.addButton( tr ( "APPCLOSE_CLOSE" ), CloseDiscard );
- dlg.addButton( tr ( "APPCLOSE_UNLOAD" ), CloseUnload );
-
- return dlg.exec();
-}
-
-/*!
- \brief Process user actions selected from the dialog box when study is closed.
- \param choice chosen action ID
- \param closePermanently "forced study closing" flag
- \return operation status
- \sa closeChoice()
-*/
-bool SalomeApp_Application::closeAction( const int choice, bool& closePermanently )
-{
- bool res = true;
- switch( choice )
- {
- case CloseSave:
- if ( activeStudy()->isSaved() )
- onSaveDoc();
- else if ( !onSaveAsDoc() )
- res = false;
- break;
- case CloseDiscard:
- break;
- case CloseUnload:
- closePermanently = false;
- break;
- case CloseCancel:
- default:
- res = false;
- }
- return res;
-}
-
-/*!
- \brief Get module activation actions
- \return map <action_id><action_name> where
- - action_id is unique non-zero action identifier
- - action_name is action title
- \sa moduleActionSelected()
-*/
-QMap<int, QString> SalomeApp_Application::activateModuleActions() const
-{
- QMap<int, QString> opmap = LightApp_Application::activateModuleActions();
- opmap.insert( LoadStudyId, tr( "ACTIVATE_MODULE_OP_LOAD" ) );
- return opmap;
-}
-
-/*!
- \brief Process module activation action.
- \param id action identifier
- \sa activateModuleActions()
-*/
-void SalomeApp_Application::moduleActionSelected( const int id )
-{
- if ( id == LoadStudyId )
- onLoadDoc();
- else
- LightApp_Application::moduleActionSelected( id );
-}
-
-/*!Gets CORBA::ORB_var*/
-CORBA::ORB_var SalomeApp_Application::orb()
-{
- ORB_INIT& init = *SINGLETON_<ORB_INIT>::Instance();
- static CORBA::ORB_var _orb = init( qApp->argc(), qApp->argv() );
- return _orb;
-}
-
-/*!Create and return SALOMEDS_StudyManager.*/
-SALOMEDSClient_StudyManager* SalomeApp_Application::studyMgr()
-{
- static _PTR(StudyManager) _sm;
- if(!_sm) _sm = ClientFactory::StudyManager();
- return _sm.get();
-}
-
-/*!Create and return SALOME_NamingService.*/
-SALOME_NamingService* SalomeApp_Application::namingService()
-{
- static SALOME_NamingService* _ns = new SALOME_NamingService( orb() );
- return _ns;
-}
-
-/*!Create and return SALOME_LifeCycleCORBA.*/
-SALOME_LifeCycleCORBA* SalomeApp_Application::lcc()
-{
- static SALOME_LifeCycleCORBA* _lcc = new SALOME_LifeCycleCORBA( namingService() );
- return _lcc;
-}
-
-/*!Return default engine IOR for light modules*/
-QString SalomeApp_Application::defaultEngineIOR()
-{
- /// Look for a default module engine (needed for CORBAless modules to use SALOMEDS persistence)
- QString anIOR( "" );
- CORBA::Object_ptr anEngine = namingService()->Resolve( "/SalomeAppEngine" );
- if ( !CORBA::is_nil( anEngine ) )
- {
- CORBA::String_var objStr = orb()->object_to_string( anEngine );
- anIOR = QString( objStr.in() );
- }
- return anIOR;
-}
-
-/*!Private SLOT. On preferences.*/
-void SalomeApp_Application::onProperties()
-{
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( activeStudy() );
- if( !study )
- return;
-
- _PTR(StudyBuilder) SB = study->studyDS()->NewBuilder();
- SB->NewCommand();
-
- SalomeApp_StudyPropertiesDlg aDlg( desktop() );
- int res = aDlg.exec();
- if( res==QDialog::Accepted && aDlg.isChanged() )
- SB->CommitCommand();
- else
- SB->AbortCommand();
-
- //study->updateCaptions();
- updateDesktopTitle();
- updateActions();
-}
-
-/*!Insert items in popup, which necessary for current application*/
-void SalomeApp_Application::contextMenuPopup( const QString& type, QPopupMenu* thePopup, QString& title )
-{
- LightApp_Application::contextMenuPopup( type, thePopup, title );
-
- OB_Browser* ob = objectBrowser();
- if ( !ob || type != ob->popupClientType() )
- return;
-
- // Get selected objects
- SALOME_ListIO aList;
- LightApp_SelectionMgr* mgr = selectionMgr();
- mgr->selectedObjects( aList, QString::null, false );
-
- // add GUI state commands: restore, rename
- if ( aList.Extent() == 1 && aList.First()->hasEntry() &&
- QString( aList.First()->getEntry() ).startsWith( tr( "SAVE_POINT_DEF_NAME" ) ) ) {
- thePopup->insertSeparator();
- thePopup->insertItem( tr( "MEN_RESTORE_VS" ), this, SLOT( onRestoreGUIState() ) );
- thePopup->insertItem( tr( "MEN_RENAME_VS" ), this, SLOT( onRenameGUIState() ) );
- thePopup->insertItem( tr( "MEN_DELETE_VS" ), this, SLOT( onDeleteGUIState() ) );
- }
-
- // "Delete reference" item should appear only for invalid references
-
- // isInvalidRefs will be true, if at least one of selected objects is invalid reference
- bool isInvalidRefs = false;
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(activeStudy());
- _PTR(Study) aStudyDS = aStudy->studyDS();
- _PTR(SObject) anObj;
-
- for( SALOME_ListIteratorOfListIO it( aList ); it.More() && !isInvalidRefs; it.Next() )
- if( it.Value()->hasEntry() )
- {
- _PTR(SObject) aSObject = aStudyDS->FindObjectID( it.Value()->getEntry() ), aRefObj = aSObject;
- while( aRefObj && aRefObj->ReferencedObject( anObj ) )
- aRefObj = anObj;
-
- if( aRefObj && aRefObj!=aSObject && QString( aRefObj->GetName().c_str() ).isEmpty() )
- isInvalidRefs = true;
- }
-
- // Add "Delete reference" item to popup
- if ( isInvalidRefs )
- {
- thePopup->insertSeparator();
- thePopup->insertItem( tr( "MEN_DELETE_INVALID_REFERENCE" ), this, SLOT( onDeleteInvalidReferences() ) );
- return;
- }
-
- aList.Clear();
- mgr->selectedObjects( aList );
-
- // "Activate module" item should appear only if it's necessary
- if (aList.Extent() != 1)
- return;
- Handle(SALOME_InteractiveObject) aIObj = aList.First();
- // check if item is a "GUI state" item (also a first level object)
- QString entry( aIObj->getEntry() );
- if ( entry.startsWith( tr( "SAVE_POINT_DEF_NAME" ) ) )
- return;
- QString aModuleName(aIObj->getComponentDataType());
- QString aModuleTitle = moduleTitle(aModuleName);
- CAM_Module* currentModule = activeModule();
- if (currentModule && currentModule->moduleName() == aModuleTitle)
- return;
- if ( !aModuleTitle.isEmpty() )
- thePopup->insertItem( tr( "MEN_OPENWITH" ).arg( aModuleTitle ), this, SLOT( onOpenWith() ) );
-}
-
-/*!Update obect browser:
- 1.if 'updateModels' true, update existing data models;
- 2. update "non-existing" (not loaded yet) data models;
- 3. update object browser if it exists */
-void SalomeApp_Application::updateObjectBrowser( const bool updateModels )
-{
- // update "non-existing" (not loaded yet) data models
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(activeStudy());
- if ( study )
- {
- _PTR(Study) stdDS = study->studyDS();
- if( stdDS )
- {
- for ( _PTR(SComponentIterator) it ( stdDS->NewComponentIterator() ); it->More(); it->Next() )
- {
- _PTR(SComponent) aComponent ( it->Value() );
-
- if ( aComponent->ComponentDataType() == "Interface Applicative" )
- continue; // skip the magic "Interface Applicative" component
-
- OB_Browser* ob = static_cast<OB_Browser*>( getWindow( WT_ObjectBrowser ));
- const bool isAutoUpdate = ob->isAutoUpdate();
- ob->setAutoUpdate( false );
- SalomeApp_DataModel::synchronize( aComponent, study );
- ob->setAutoUpdate( isAutoUpdate );
- //SalomeApp_DataModel::BuildTree( aComponent, study->root(), study, /*skipExisitng=*/true );
- }
- }
- }
-
- // create data objects that correspond to GUI state save points
- if ( study ) updateSavePointDataObjects( study );
-
- // update existing data models (already loaded SComponents)
- LightApp_Application::updateObjectBrowser( updateModels );
-}
-
-/*!Display Catalog Genenerator dialog */
-void SalomeApp_Application::onCatalogGen()
-{
- ToolsGUI_CatalogGeneratorDlg aDlg( desktop() );
- aDlg.exec();
-}
-
-/*!Display Registry Display dialog */
-void SalomeApp_Application::onRegDisplay()
-{
- CORBA::ORB_var anOrb = orb();
- ToolsGUI_RegWidget* regWnd = ToolsGUI_RegWidget::GetRegWidget( anOrb, desktop(), "Registry" );
- regWnd->show();
- regWnd->raise();
- regWnd->setActiveWindow();
-}
-
-/*!find original object by double click on item */
-void SalomeApp_Application::onDblClick( QListViewItem* it )
-{
- OB_ListItem* item = dynamic_cast<OB_ListItem*>( it );
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( activeStudy() );
-
- if( study && item )
- {
- SalomeApp_DataObject* obj = dynamic_cast<SalomeApp_DataObject*>( item->dataObject() );
- if( !obj )
- return;
-
- QString entry = obj->entry();
- _PTR(SObject) sobj = study->studyDS()->FindObjectID( entry.latin1() ), ref;
-
- if( sobj && sobj->ReferencedObject( ref ) )
- {
- entry = ref->GetID().c_str();
- QListViewItemIterator anIt( item->listView() );
- for( ; anIt.current(); anIt++ )
- {
- OB_ListItem* item = dynamic_cast<OB_ListItem*>( anIt.current() );
- if( !item )
- continue;
-
- SalomeApp_DataObject* original = dynamic_cast<SalomeApp_DataObject*>( item->dataObject() );
- if( original->entry()!=entry )
- continue;
-
- OB_Browser* br = objectBrowser();
- br->setSelected( original );
- SUIT_DataObject* p = original->parent();
- while( p )
- {
- br->setOpen( p );
- p = p->parent();
- }
- break;
- }
- }
- }
-}
-
-/*!
- Creates new view manager
- \param type - type of view manager
-*/
-SUIT_ViewManager* SalomeApp_Application::newViewManager(const QString& type)
-{
- return createViewManager(type);
-}
-
-
-/*!Global utility funciton, returns selected GUI Save point object's ID */
-int getSelectedSavePoint( const LightApp_SelectionMgr* selMgr )
-{
- SALOME_ListIO aList;
- selMgr->selectedObjects( aList );
- Handle(SALOME_InteractiveObject) aIObj = aList.First();
- QString entry( aIObj->getEntry() );
- QString startStr = QObject::tr( "SAVE_POINT_DEF_NAME" );
- if ( !entry.startsWith( startStr ) ) // it's a "GUI state" object
- return -1;
- bool ok; // conversion to integer is ok?
- int savePoint = entry.right( entry.length() - startStr.length() ).toInt( &ok );
- return ok ? savePoint : -1;
-}
-
-/*!Called on Restore GUI State popup command*/
-void SalomeApp_Application::onRestoreGUIState()
-{
- int savePoint = ::getSelectedSavePoint( selectionMgr() );
- if ( savePoint == -1 )
- return;
- SalomeApp_VisualState( this ).restoreState( savePoint );
-}
-
-/*!Called on Rename GUI State popup command*/
-void SalomeApp_Application::onRenameGUIState()
-{
- int savePoint = ::getSelectedSavePoint( selectionMgr() );
- if ( savePoint == -1 )
- return;
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( activeStudy() );
- if ( !study )
- return;
-
- QString newName = LightApp_NameDlg::getName( desktop(), study->getNameOfSavePoint( savePoint ) );
- if ( !newName.isNull() && !newName.isEmpty() ) {
- study->setNameOfSavePoint( savePoint, newName );
- updateSavePointDataObjects( study );
- objectBrowser()->updateTree( study->root() );
- }
-}
-
-
-/*!Called on Delete GUI State popup command*/
-void SalomeApp_Application::onDeleteGUIState()
-{
- int savePoint = ::getSelectedSavePoint( selectionMgr() );
- if ( savePoint == -1 )
- return;
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( activeStudy() );
- if ( !study )
- return;
-
- study->removeSavePoint( savePoint );
- updateSavePointDataObjects( study );
-}
-
-/*!Called on Save study operation*/
-void SalomeApp_Application::onStudySaved( SUIT_Study* study )
-{
- LightApp_Application::onStudySaved( study );
-
- if ( objectBrowser() ) {
- updateSavePointDataObjects( dynamic_cast<SalomeApp_Study*>( study ) );
- objectBrowser()->updateTree( study->root() );
- }
-}
-
-/*!Called on Open study operation*/
-void SalomeApp_Application::onStudyOpened( SUIT_Study* study )
-{
- LightApp_Application::onStudyOpened( study );
-
- if ( objectBrowser() ) {
- updateSavePointDataObjects( dynamic_cast<SalomeApp_Study*>( study ) );
- objectBrowser()->updateTree( study->root() );
- }
-}
-
-/*! utility function. returns true if list view item that correspond to given SUIT_DataObject is open.
- only first level items are traversed */
-bool isListViewItemOpen( QListView* lv, const SUIT_DataObject* dobj )
-{
- if ( !lv || !dobj )
- return false;
-
- QListViewItem* item = lv->firstChild();
- while ( item ) {
- OB_ListItem* ob_item = dynamic_cast<OB_ListItem*>( item );
- if ( ob_item && ob_item->dataObject() == dobj )
- return ob_item->isOpen();
- item = item->nextSibling();
- }
- return false;
-}
-
-/*! updateSavePointDataObjects: syncronize data objects that correspond to save points (gui states)*/
-void SalomeApp_Application::updateSavePointDataObjects( SalomeApp_Study* study )
-{
- OB_Browser* ob = objectBrowser();
-
- if ( !study || !ob )
- return;
-
- // find GUI states root object
- SUIT_DataObject* guiRootObj = 0;
- DataObjectList ch;
- study->root()->children( ch );
- DataObjectList::const_iterator it = ch.begin(), last = ch.end();
- for ( ; it != last ; ++it ) {
- if ( dynamic_cast<SalomeApp_SavePointRootObject*>( *it ) ) {
- guiRootObj = *it;
- break;
- }
- }
- std::vector<int> savePoints = study->getSavePoints();
- // case 1: no more save points but they existed in study's tree
- if ( savePoints.empty() && guiRootObj ) {
- delete guiRootObj;
- return;
- }
- // case 2: no more save points but root does not exist either
- if ( savePoints.empty() && !guiRootObj )
- return;
- // case 3: save points but no root for them - create it
- if ( !savePoints.empty() && !guiRootObj )
- guiRootObj = new SalomeApp_SavePointRootObject( study->root() );
- // case 4: everything already exists.. here may be a problem: we want "GUI states" root object
- // to be always the last one in the tree. Here we check - if it is not the last one - remove and
- // re-create it.
- if ( guiRootObj->nextBrother() ) {
- study->root()->removeChild(guiRootObj);
- study->root()->appendChild(guiRootObj);
- //study->root()->dump();
- }
-
- // store data objects in a map id-to-DataObject
- QMap<int,SalomeApp_SavePointObject*> mapDO;
- ch.clear();
- guiRootObj->children( ch );
- for( it = ch.begin(), last = ch.end(); it != last ; ++it ) {
- SalomeApp_SavePointObject* dobj = dynamic_cast<SalomeApp_SavePointObject*>( *it );
- if ( dobj )
- mapDO[dobj->getId()] = dobj;
- }
-
- // iterate new save points. if DataObject with such ID not found in map - create DataObject
- // if in the map - remove it from map.
- for ( int i = 0; i < savePoints.size(); i++ )
- if ( !mapDO.contains( savePoints[i] ) )
- new SalomeApp_SavePointObject( guiRootObj, savePoints[i], study );
- else
- mapDO.remove( savePoints[i] );
-
- // delete DataObjects that are still in the map -- their IDs were not found in data model
- for ( QMap<int,SalomeApp_SavePointObject*>::Iterator it = mapDO.begin(); it != mapDO.end(); ++it )
- delete it.data();
-}
-
-/*! Check data object */
-bool SalomeApp_Application::checkDataObject(LightApp_DataObject* theObj)
-{
- if (theObj)
- return true;
-
- return false;
-}
-
-/*! Process standard messages from desktop */
-void SalomeApp_Application::onDesktopMessage( const QString& message )
-{
- // update object browser
- if ( message.lower() == "updateobjectbrowser" ||
- message.lower() == "updateobjbrowser" )
- updateObjectBrowser();
-}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SalomeApp_Application.h
-// Created: 10/22/2004 3:37:25 PM
-// Author: Sergey LITONIN
-// Copyright (C) CEA 2004
-
-#ifndef SALOMEAPP_APPLICATION_H
-#define SALOMEAPP_APPLICATION_H
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include "SalomeApp.h"
-#include <LightApp_Application.h>
-
-#include <qmap.h>
-
-#include <CORBA.h>
-
-#include <SALOMEconfig.h>
-//#include CORBA_CLIENT_HEADER(SALOMEDS)
-#include <SALOME_NamingService.hxx>
-
-#include "SALOMEDSClient.hxx"
-
-class QAction;
-class QComboBox;
-class QDockWindow;
-
-class LightApp_Preferences;
-class SalomeApp_Module;
-class SalomeApp_Study;
-
-class SALOME_LifeCycleCORBA;
-
-class QListViewItem;
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-/*!
- \class SalomeApp_Application
- \brief Application containing SalomeApp module or LightApp module
-*/
-
-class SALOMEAPP_EXPORT SalomeApp_Application : public LightApp_Application
-{
- Q_OBJECT
-
-public:
- enum { MenuToolsId = 5 };
- enum { DumpStudyId = LightApp_Application::UserID, LoadScriptId, PropertiesId,
- CatalogGenId, RegDisplayId, SaveGUIStateId, FileLoadId, UserID };
-
-protected:
- enum { CloseUnload = CloseDiscard + 1 };
- enum { LoadStudyId = OpenStudyId + 1 };
-
-public:
- SalomeApp_Application();
- virtual ~SalomeApp_Application();
-
- virtual void updateObjectBrowser( const bool = true );
-
- virtual QString getFileFilter() const;
-
- virtual void start();
-
- virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
-
- virtual bool checkDataObject(LightApp_DataObject* theObj);
-
- static CORBA::ORB_var orb();
- static SALOMEDSClient_StudyManager* studyMgr();
- static SALOME_NamingService* namingService();
- static SALOME_LifeCycleCORBA* lcc();
- static QString defaultEngineIOR();
-
- SUIT_ViewManager* newViewManager(const QString&);
- void updateSavePointDataObjects( SalomeApp_Study* );
-
-public slots:
- virtual bool onOpenDoc( const QString& );
- virtual void onLoadDoc();
- virtual bool onLoadDoc( const QString& );
- virtual void onExit();
- virtual void onCopy();
- virtual void onPaste();
- void onSaveGUIState();// called from VISU
- virtual void onCloseDoc( bool ask = true);
-
-protected slots:
- void onStudySaved( SUIT_Study* );
- void onStudyOpened( SUIT_Study* );
- void onDesktopMessage( const QString& );
-
-protected:
- virtual void createActions();
- virtual SUIT_Study* createNewStudy();
- virtual QWidget* createWindow( const int );
-
- virtual void updateCommandsStatus();
- virtual void onSelectionChanged();
-
- virtual void createPreferences( LightApp_Preferences* );
- virtual void updateDesktopTitle();
-
- virtual bool closeAction( const int, bool& );
- virtual int closeChoice( const QString& );
-
- virtual QMap<int, QString> activateModuleActions() const;
- virtual void moduleActionSelected( const int );
-
-private slots:
- void onDeleteInvalidReferences();
- void onDblClick( QListViewItem* );
- void onProperties();
- void onDumpStudy();
- void onLoadScript();
-
- void onDeleteGUIState();
- void onRestoreGUIState();
- void onRenameGUIState();
-
- void onCatalogGen();
- void onRegDisplay();
- void onOpenWith();
-
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SalomeApp_CheckFileDlg.h"
-
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-
-/*!
-Constructor
-*/
-SalomeApp_CheckFileDlg::SalomeApp_CheckFileDlg( QWidget* parent, bool open, const QString& theCheckBoxName, bool showQuickDir, bool modal) :
-SUIT_FileDlg( parent, open, showQuickDir, modal )
-{
- myCheckBox = new QCheckBox( theCheckBoxName, this );
- QLabel* label = new QLabel("", this);
- QPushButton* pb = new QPushButton(this);
- addWidgets( label, myCheckBox, pb );
- pb->hide();
-}
-
-/*!
-Destructor
-*/
-SalomeApp_CheckFileDlg::~SalomeApp_CheckFileDlg()
-{
-
-}
-
-/*!Sets checked.*/
-void SalomeApp_CheckFileDlg::SetChecked( bool check )
-{
- myCheckBox->setChecked(check);
-}
-
-/*!Is checked?
- *\retval boolean - true, check box is checked, else false.
- */
-bool SalomeApp_CheckFileDlg::IsChecked() const
-{
- return myCheckBox->isChecked();
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOMEAPP_CHECKFILEDIALOG_H
-#define SALOMEAPP_CHECKFILEDIALOG_H
-
-#include <SalomeApp.h>
-
-#include <SUIT_FileDlg.h>
-
-class QCheckBox;
-
-class SALOMEAPP_EXPORT SalomeApp_CheckFileDlg : public SUIT_FileDlg
-{
- Q_OBJECT
-
-public:
- SalomeApp_CheckFileDlg( QWidget*, bool open, const QString& theCheckBoxName, bool showQuickDir = true, bool modal = true );
- virtual ~SalomeApp_CheckFileDlg();
-
-public:
- void SetChecked( bool check );
- bool IsChecked() const;
-
-protected:
- QCheckBox* myCheckBox;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SalomeApp_DataModel.cxx
-// Created: 10/25/2004 10:36:06 AM
-// Author: Sergey LITONIN
-// Copyright (C) CEA 2004
-
-#include "SalomeApp_DataModel.h"
-#include "SalomeApp_Study.h"
-#include "SalomeApp_DataObject.h"
-#include "SalomeApp_Module.h"
-#include "SalomeApp_Application.h"
-#include "SalomeApp_Engine_i.hxx"
-
-#include "LightApp_RootObject.h"
-
-#include <CAM_DataObject.h>
-
-#include <SUIT_Application.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_Session.h>
-#include <SUIT_TreeSync.h>
-#include <SUIT_DataObjectIterator.h>
-
-#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(SALOME_Exception)
-
-typedef _PTR(SObject) kerPtr;
-typedef SUIT_DataObject* suitPtr;
-
-/*!
- \class SalomeApp_DataModelSync
- Auxiliary class for synchronizing tree of kernel objects and SUIT_DataObjects
-*/
-class SalomeApp_DataModelSync
-{
-public:
- SalomeApp_DataModelSync( _PTR( Study ), SUIT_DataObject* );
-
- suitPtr createItem( const kerPtr&, const suitPtr&, const suitPtr&, const bool ) const;
- void deleteItemWithChildren( const suitPtr& ) const;
- bool isEqual( const kerPtr&, const suitPtr& ) const;
- kerPtr nullSrc() const;
- suitPtr nullTrg() const;
- void children( const kerPtr&, QValueList<kerPtr>& ) const;
- void children( const suitPtr&, QValueList<suitPtr>& ) const;
- suitPtr parent( const suitPtr& ) const;
- bool isCorrect( const kerPtr& ) const;
- void updateItem( const kerPtr&, const suitPtr& ) const;
-
-private:
- _PTR( Study ) myStudy;
- SUIT_DataObject* myRoot;
-};
-
-/*!
- Constructor
-*/
-SalomeApp_DataModelSync::SalomeApp_DataModelSync( _PTR( Study ) aStudy, SUIT_DataObject* aRoot )
-: myStudy( aStudy ),
- myRoot( aRoot )
-{
-}
-
-/*!
- \return true if kernel object is correct (has non empty name or is reference)
-*/
-bool SalomeApp_DataModelSync::isCorrect( const kerPtr& so ) const
-{
- kerPtr refObj;
- QString name = so->GetName().c_str();
- _PTR( GenericAttribute ) anAttr;
- bool isDraw = true;
- if ( so->FindAttribute(anAttr, "AttributeDrawable") )
- {
- _PTR(AttributeDrawable) aAttrDraw = anAttr;
- isDraw = aAttrDraw->IsDrawable();
- }
- bool res = so && ( so->GetName().size() || so->ReferencedObject( refObj ) ) && isDraw;
- return res;
-}
-
-/*!
- Creates SUIT object by KERNEL object
- \param so - corresponding KERNEL object
- \param parent - parent for SUIT object
- \param after - previous sibling for SUIT object
- \param prepend - SUIT object must be added to start of children list
-*/
-suitPtr SalomeApp_DataModelSync::createItem( const kerPtr& so,
- const suitPtr& parent,
- const suitPtr& after,
- const bool prepend ) const
-{
- if( !isCorrect( so ) )
- return 0;
-
- _PTR(SComponent) aSComp( so );
- suitPtr nitem = aSComp ? new SalomeApp_ModuleObject( aSComp, 0 ) :
- new SalomeApp_DataObject( so, 0 );
- if( parent )
- if( after )
- {
- DataObjectList ch;
- parent->children( ch );
- int pos = ch.find( after );
- if( pos>=0 )
- parent->insertChild( nitem, pos+1 );
- else
- parent->appendChild( nitem );
- }
- else if( prepend )
- parent->insertChild( nitem, 0 );
- else // append
- parent->appendChild( nitem );
- else if( myRoot )
- myRoot->appendChild( nitem );
- return nitem;
-}
-
-/*!
- Deletes object with all children
- \param p - SUIT object
-*/
-void SalomeApp_DataModelSync::deleteItemWithChildren( const suitPtr& p ) const
-{
- if( !p )
- return;
-
- DataObjectList ch;
- p->children( ch );
- DataObjectList::const_iterator anIt = ch.begin(), aLast = ch.end();
- for( ; anIt!=aLast; anIt++ )
- deleteItemWithChildren( *anIt );
- delete p;
-}
-
-/*!
- \return true if objects correspond each other at all
- \param p - kernel object
- \param q - suit object
-*/
-bool SalomeApp_DataModelSync::isEqual( const kerPtr& p, const suitPtr& q ) const
-{
- LightApp_ModuleObject* lobj = dynamic_cast<LightApp_ModuleObject*>( q );
- SalomeApp_DataObject* sobj = dynamic_cast<SalomeApp_DataObject*>( q );
- _PTR( SComponent ) aComp( p );
- bool res = ( !p && !q ) ||
- ( lobj && !sobj && aComp ) ||
- ( sobj && isCorrect( p ) && p->GetID().c_str()==sobj->entry() );
- return res;
-}
-
-/*!
- \return null kernel object
-*/
-kerPtr SalomeApp_DataModelSync::nullSrc() const
-{
- return kerPtr();
-}
-
-/*!
- \return null suit object
-*/
-suitPtr SalomeApp_DataModelSync::nullTrg() const
-{
- return suitPtr( 0 );
-}
-
-/*!
- Fills list with children of kernel object
- \param obj - kernel object
- \param ch - list to be filled
-*/
-void SalomeApp_DataModelSync::children( const kerPtr& obj, QValueList<kerPtr>& ch ) const
-{
- ch.clear();
- _PTR(ChildIterator) it ( myStudy->NewChildIterator( obj ) );
- for( ; it->More(); it->Next() )
- ch.append( it->Value() );
-}
-
-/*!
- Fills list with children of SUIT object
- \param p - SUIT object
- \param ch - list to be filled
-*/
-void SalomeApp_DataModelSync::children( const suitPtr& p, QValueList<suitPtr>& ch ) const
-{
- DataObjectList l;
- if( p )
- {
- p->children( l );
- ch.clear();
- for( SUIT_DataObject* o = l.first(); o; o = l.next() )
- ch.append( o );
- }
-}
-
-/*!
- \return parent of SUIT object
- \param p - SUIT object
-*/
-suitPtr SalomeApp_DataModelSync::parent( const suitPtr& p ) const
-{
- return p ? p->parent(): 0;
-}
-
-/*!
- Updates SUIT object
- \param p - SUIT object
-*/
-void SalomeApp_DataModelSync::updateItem( const kerPtr& obj, const suitPtr& ) const
-{
-}
-
-/*!
- Auxiliary function, shows SUIT tree
-*/
-void showTree( SUIT_DataObject* root )
-{
- qDebug( root ? "<tree>" : "<empty tree>" );
- if( !root )
- return;
-
- SUIT_DataObjectIterator it( root, SUIT_DataObjectIterator::DepthLeft );
- for( ; it.current(); ++it )
- {
- QString marg; marg.fill( ' ', 3*it.depth() );
- QString nnn = "%1 '%2'";
- qDebug( nnn.arg( marg ).arg( it.current()->name() ) );
- }
-}
-
-/*!
- Constructor
-*/
-SalomeApp_DataModel::SalomeApp_DataModel( CAM_Module* theModule )
-: LightApp_DataModel( theModule )
-{
-}
-
-/*!
- Destructor
-*/
-SalomeApp_DataModel::~SalomeApp_DataModel()
-{
-}
-
-/*!
- Opens data model
-*/
-bool SalomeApp_DataModel::open( const QString& name, CAM_Study* study, QStringList )
-{
- SalomeApp_Study* aDoc = dynamic_cast<SalomeApp_Study*>( study );
- if ( !aDoc )
- return false;
-
- QString anId = getRootEntry( aDoc );
- if ( anId.isEmpty() )
- return true; // Probably nothing to load
-
- _PTR(Study) aStudy ( aDoc->studyDS() ); // shared_ptr cannot be used here
- _PTR(SComponent) aSComp ( aStudy->FindComponentID( std::string( anId.latin1() ) ) );
- if ( aSComp )
- updateTree( aSComp, aDoc );
-
- QStringList listOfFiles;
- LightApp_DataModel::open(name, study, listOfFiles);
- return true;
-}
-
-/*!
- Creates data model
-*/
-bool SalomeApp_DataModel::create( CAM_Study* theStudy )
-{
- update(NULL, (LightApp_Study*)theStudy);
- return true;
-}
-
-/*!
- Updates application.
-*/
-void SalomeApp_DataModel::update( LightApp_DataObject*, LightApp_Study* study )
-{
- SalomeApp_Study* aSStudy = dynamic_cast<SalomeApp_Study*>(study);
- LightApp_RootObject* studyRoot = 0;
- _PTR(SComponent) sobj;
- SalomeApp_DataObject* modelRoot = dynamic_cast<SalomeApp_DataObject*>( root() );
- if ( !modelRoot ){ // not yet connected to a study -> try using <study> argument
- if ( !aSStudy )
- aSStudy = dynamic_cast<SalomeApp_Study*>( getModule()->getApp()->activeStudy() );
- if ( aSStudy ){
- studyRoot = dynamic_cast<LightApp_RootObject*>( aSStudy->root() );
- QString anId = getRootEntry( aSStudy );
- if ( !anId.isEmpty() ){ // if nothing is published in the study for this module -> do nothing
- _PTR(Study) aStudy ( aSStudy->studyDS() );
- sobj = aStudy->FindComponentID( std::string( anId.latin1() ) );
- }
- }
- }
- else{
- studyRoot = dynamic_cast<LightApp_RootObject*>( modelRoot->root() );
- if ( studyRoot ) {
- aSStudy = dynamic_cast<SalomeApp_Study*>( studyRoot->study() ); // <study> value should not change here theoretically, but just to make sure
- if ( aSStudy ) {
- _PTR(Study) aStudy ( aSStudy->studyDS() );
- // modelRoot->object() cannot be reused here: it is about to be deleted by buildTree() soon
- sobj = aStudy->FindComponentID( std::string( modelRoot->entry().latin1() ) );
- }
- }
- }
- if ( sobj && aSStudy )
- updateTree( sobj, aSStudy );
-}
-
-/*!
- Synchronizes kernel tree and suit data tree starting from component 'sobj'
-*/
-SUIT_DataObject* SalomeApp_DataModel::synchronize( const _PTR( SComponent )& sobj, SalomeApp_Study* study )
-{
- if( !study || !study->root() || !sobj )
- return 0;
-
- DataObjectList ch; study->root()->children( ch );
- DataObjectList::const_iterator anIt = ch.begin(), aLast = ch.end();
- SUIT_DataObject* suitObj = 0;
- for( ; anIt!=aLast; anIt++ )
- {
- LightApp_DataObject* dobj = dynamic_cast<LightApp_DataObject*>( *anIt );
- if( dobj && dobj->name() == sobj->GetName().c_str() )
- {
- suitObj = dobj;
- break;
- }
- }
-
- SalomeApp_DataModelSync sync( study->studyDS(), study->root() );
-
- if( !suitObj || dynamic_cast<SalomeApp_DataObject*>( suitObj ) )
- return ::synchronize<kerPtr,suitPtr,SalomeApp_DataModelSync>( sobj, suitObj, sync );
- else
- return 0;
-}
-
-/*!
- Updates tree.
-*/
-void SalomeApp_DataModel::updateTree( const _PTR( SComponent )& comp, SalomeApp_Study* study )
-{
- SalomeApp_ModuleObject* aNewRoot = dynamic_cast<SalomeApp_ModuleObject*>( synchronize( comp, study ) );
- if( aNewRoot )
- {
- aNewRoot->setDataModel( this );
- setRoot( aNewRoot );
- }
-}
-
-/*!
- \return module
-*/
-SalomeApp_Module* SalomeApp_DataModel::getModule() const
-{
- return dynamic_cast<SalomeApp_Module*>( module() );
-}
-
-/*!
- \return study
-*/
-SalomeApp_Study* SalomeApp_DataModel::getStudy() const
-{
- if(!root()) return 0;
- LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root()->root() );
- if ( !aRoot )
- return 0;
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( aRoot->study() );
- if ( !aStudy )
- return 0;
- return aStudy;
-}
-
-/*!
- \return study entry corresponding to this data model
-*/
-QString SalomeApp_DataModel::getRootEntry( SalomeApp_Study* study ) const
-{
- QString anEntry;
- if ( root() && root()->root() ) { // data model already in a study
- SalomeApp_DataObject* anObj = dynamic_cast<SalomeApp_DataObject*>( root() );
- if ( anObj )
- anEntry = anObj->entry();
- }
- else if ( study && study->studyDS() ) { // this works even if <myRoot> is null
- _PTR(SComponent) aSComp( study->studyDS()->FindComponent( module()->name() ) );
- if ( aSComp )
- anEntry = aSComp->GetID().c_str();
- }
- return anEntry;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SalomeApp_DataModel.h
-// Created: 10/25/2004 10:32:33 AM
-// Author: Sergey LITONIN
-// Copyright (C) CEA 2004
-
-#ifndef SALOMEAPP_DATAMODEL_H
-#define SALOMEAPP_DATAMODEL_H
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include "SalomeApp.h"
-#include "LightApp_DataModel.h"
-
-#include "SALOMEDSClient.hxx"
-
-class SalomeApp_Module;
-class SalomeApp_Study;
-class SalomeApp_DataObject;
-
-// Class : SalomeApp_DataModel
-/// Description : Base class of data model
-class SALOMEAPP_EXPORT SalomeApp_DataModel : public LightApp_DataModel
-{
- Q_OBJECT
-
-public:
- static SUIT_DataObject* synchronize( const _PTR( SComponent )&, SalomeApp_Study* );
-
- SalomeApp_DataModel ( CAM_Module* theModule );
- virtual ~SalomeApp_DataModel();
-
- virtual bool open( const QString&, CAM_Study*, QStringList );
- virtual bool create( CAM_Study* );
- virtual void update( LightApp_DataObject* = 0, LightApp_Study* = 0 );
-
- QString getRootEntry( SalomeApp_Study* ) const;
- SalomeApp_Module* getModule() const;
-
-protected:
- SalomeApp_Study* getStudy() const;
- virtual void updateTree( const _PTR( SComponent )&, SalomeApp_Study* );
-};
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SalomeApp_DataObject.h"
-
-#include "SalomeApp_Study.h"
-#include "LightApp_RootObject.h"
-
-#include <CAM_DataObject.h>
-
-#include <SUIT_Application.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_DataObjectKey.h>
-
-#include <qobject.h>
-
-#include <SALOMEDSClient_AttributeReal.hxx>
-#include <SALOMEDSClient_AttributeInteger.hxx>
-#include <SALOMEDSClient_AttributeComment.hxx>
-#include <SALOMEDSClient_AttributeTableOfReal.hxx>
-#include <SALOMEDSClient_AttributeTableOfInteger.hxx>
-
-/*!Constructor. Initialize by \a parent*/
-SalomeApp_DataObject::SalomeApp_DataObject( SUIT_DataObject* parent )
-: LightApp_DataObject( parent ),
- CAM_DataObject( parent ),
- myEntry( "" ),
- myName( "" )
-{
-}
-
-/*!Constructor. Initialize by \a parent and SObject*/
-SalomeApp_DataObject::SalomeApp_DataObject( const _PTR(SObject)& sobj, SUIT_DataObject* parent )
-: LightApp_DataObject( parent ),
- CAM_DataObject( parent ),
- myName( "" )
-{
- myObject = sobj;
- myEntry = myObject->GetID().c_str();
-}
-
-/*!Destructor. Do nothing.*/
-SalomeApp_DataObject::~SalomeApp_DataObject()
-{
-}
-
-/*!Gets object ID.
- *\retval QString
- */
-QString SalomeApp_DataObject::entry() const
-{
- if ( myObject )
- return myObject->GetID().c_str();
- return QString::null;
- //return myEntry;
-}
-
-/*!Gets name of object.*/
-QString SalomeApp_DataObject::name() const
-{
- //if ( myName.isEmpty() )
- {
- QString str;
- if ( myObject )
- str = myObject->GetName().c_str();
-
- if ( str.isEmpty() )
- {
- _PTR(SObject) refObj = referencedObject();
- if ( refObj )
- str = refObj->GetName().c_str();
- }
-
- if ( isReference() )
- {
- if ( !(QString(referencedObject()->GetName().c_str()).isEmpty()) )
- str = QString( "* " ) + str;
- else
- str = QString( "<Invalid Reference>" );
- }
- SalomeApp_DataObject* that = (SalomeApp_DataObject*)this;
- that->myName = str;
- }
- return myName;
-}
-
-/*!Gets icon picture of object.*/
-QPixmap SalomeApp_DataObject::icon() const
-{
- _PTR(GenericAttribute) anAttr;
- if ( myObject && myObject->FindAttribute( anAttr, "AttributePixMap" ) ){
- _PTR(AttributePixMap) aPixAttr ( anAttr );
- if ( aPixAttr->HasPixMap() ){
- QString pixmapName = QObject::tr( aPixAttr->GetPixMap().c_str() );
- LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root() );
- if ( aRoot && aRoot->study() ) {
- SUIT_ResourceMgr* mgr = aRoot->study()->application()->resourceMgr();
- return mgr->loadPixmap( componentDataType(), pixmapName, false );
- }
- }
- }
- return QPixmap();
-}
-
-/*!Gets text value for one of entity:
- *\li Value (id = SalomeApp_DataObject::CT_Value)
- *\li Entry (id = SalomeApp_DataObject::CT_Entry)
- *\li IOR (id = SalomeApp_DataObject::CT_IOR)
- *\li Reference entry (id = SalomeApp_DataObject::CT_RefEntry)
- */
-QString SalomeApp_DataObject::text( const int id ) const
-{
- QString txt;
- switch ( id )
- {
- case CT_Value:
-#ifndef WNT
- if ( componentObject() != this )
-#else
- if ( componentObject() != (SUIT_DataObject*)this )
-#endif
- txt = value( object() );
- if ( txt.isEmpty() )
- txt = value( referencedObject() );
- break;
- case CT_Entry:
- txt = entry( object() );
- break;
- case CT_IOR:
- txt = ior( referencedObject() );
- break;
- case CT_RefEntry:
- if ( isReference() )
- txt = entry( referencedObject() );
- break;
- }
- return txt;
-}
-
-/*!Get color value for one of entity:
- *\li Text color
- *\li Highlight color
- *\li Higlighted text color
- */
-QColor SalomeApp_DataObject::color( const ColorRole cr ) const
-{
- QColor clr;
- switch ( cr )
- {
- case Text:
- if ( isReference() )
- {
- if ( !(QString(referencedObject()->GetName().c_str()).isEmpty()) )
- clr = QColor( 255, 0, 0 );
- else
- clr = QColor( 200, 200, 200 );
- }
- else if ( myObject )
- {
- _PTR(GenericAttribute) anAttr;
- if ( myObject->FindAttribute( anAttr, "AttributeTextColor" ) )
- {
- _PTR(AttributeTextColor) aColAttr = anAttr;
- clr = QColor( (int)aColAttr->TextColor().R, (int)aColAttr->TextColor().G, (int)aColAttr->TextColor().B );
- }
- }
- break;
- case Highlight:
- if ( isReference() )
- {
- if ( !(QString(referencedObject()->GetName().c_str()).isEmpty()) )
- clr = QColor( 255, 0, 0 );
- else
- clr = QColor( 200, 200, 200 );
- }
- else if ( myObject )
- {
- _PTR(GenericAttribute) anAttr;
- if( myObject->FindAttribute ( anAttr, "AttributeTextHighlightColor") )
- {
- _PTR(AttributeTextHighlightColor) aHighColAttr = anAttr;
- clr = QColor( (int)(aHighColAttr->TextHighlightColor().R),
- (int)(aHighColAttr->TextHighlightColor().G),
- (int)(aHighColAttr->TextHighlightColor().B));
- }
- }
- break;
- case HighlightedText:
- if ( isReference() )
- clr = QColor( 255, 255, 255 );
- break;
- }
- return clr;
-}
-
-/*!Gets tooltip.*/
-QString SalomeApp_DataObject::toolTip() const
-{
- //return object()->Name();
- return QString( "Object \'%1\', module \'%2\', ID=%3" ).arg( name() ).arg( componentDataType() ).arg( entry() );
-}
-
-/*!Get component type.*/
-QString SalomeApp_DataObject::componentDataType() const
-{
- // if ( myCompDataType.isEmpty() ) {
- const SalomeApp_DataObject* compObj = dynamic_cast<SalomeApp_DataObject*>( componentObject() );
- if ( compObj && compObj->object() )
- {
- _PTR(SComponent) aComp( compObj->object() );
- if ( aComp ) {
- SalomeApp_DataObject* that = (SalomeApp_DataObject*)this;
- that->myCompDataType = aComp->ComponentDataType().c_str();
- }
- }
- // }
- return myCompDataType;
-}
-
-/*!Gets object.*/
-_PTR(SObject) SalomeApp_DataObject::object() const
-{
- return myObject;
-}
-
-/*!Checks: Is object reference.*/
-bool SalomeApp_DataObject::isReference() const
-{
- bool isRef = false;
- if ( myObject )
- {
- _PTR(SObject) refObj;
- isRef = myObject->ReferencedObject( refObj );
- }
- return isRef;
-}
-
-/*!Gets reference object.*/
-_PTR(SObject) SalomeApp_DataObject::referencedObject() const
-{
- _PTR(SObject) refObj;
- _PTR(SObject) obj = myObject;
- while ( obj && obj->ReferencedObject( refObj ) )
- obj = refObj;
-
- return obj;
-}
-
-/*!Gets IOR*/
-QString SalomeApp_DataObject::ior( const _PTR(SObject)& obj ) const
-{
- QString txt;
- if ( obj )
- {
- _PTR(GenericAttribute) attr;
- if ( obj->FindAttribute( attr, "AttributeIOR" ) )
- {
- _PTR(AttributeIOR) iorAttr = attr;
- if ( iorAttr )
- {
- std::string str = iorAttr->Value();
- txt = QString( str.c_str() );
- }
- }
- }
- return txt;
-}
-
-/*!Gets Entry*/
-QString SalomeApp_DataObject::entry( const _PTR(SObject)& obj ) const
-{
- QString txt;
- if ( obj )
- {
- std::string str = obj->GetID();
- txt = QString( str.c_str() );
- }
- return txt;
-}
-
-/*!Value*/
-QString SalomeApp_DataObject::value( const _PTR(SObject)& obj ) const
-{
- if ( !obj )
- return QString::null;
-
- QString val;
- _PTR(GenericAttribute) attr;
-
- if ( obj->FindAttribute( attr, "AttributeInteger" ) )
- {
- _PTR(AttributeInteger) intAttr = attr;
- if ( intAttr )
- val = QString::number( intAttr->Value() );
- }
- else if ( obj->FindAttribute( attr, "AttributeReal" ) )
- {
- _PTR(AttributeReal) realAttr = attr;
- if ( realAttr )
- val = QString::number( realAttr->Value() );
- }
- else if ( obj->FindAttribute( attr, "AttributeTableOfInteger" ) )
- {
- _PTR(AttributeTableOfInteger) tableAttr = attr;
- std::string title = tableAttr->GetTitle();
- val = QString( title.c_str() );
- if ( !val.isEmpty() )
- val += QString( " " );
- val += QString( "[%1,%2]" ).arg( tableAttr->GetNbRows() ).arg( tableAttr->GetNbColumns() );
- }
- else if ( obj->FindAttribute( attr, "AttributeTableOfReal" ) )
- {
- _PTR(AttributeTableOfReal) tableAttr = attr;
- std::string title = tableAttr->GetTitle();
- val = QString( title.c_str() );
- if ( !val.isEmpty() )
- val += QString( " " );
- val += QString( "[%1,%2]" ).arg( tableAttr->GetNbRows() ).arg( tableAttr->GetNbColumns() );
- }
- else if ( obj->FindAttribute( attr, "AttributeComment") )
- {
- _PTR(AttributeComment) comm = attr;
- std::string str = comm->Value();
- val = QString( str.c_str() );
- }
-
- return val;
-}
-
-
-
-
-
-/*!Constructor.Initialize by \a parent.*/
-SalomeApp_ModuleObject::SalomeApp_ModuleObject( SUIT_DataObject* parent )
-: SalomeApp_DataObject( parent ),
- CAM_RootObject( parent ),
- CAM_DataObject( parent )
-{
-}
-
-/*!Constructor.Initialize by \a parent and SObject.*/
-SalomeApp_ModuleObject::SalomeApp_ModuleObject( const _PTR(SObject)& sobj, SUIT_DataObject* parent )
-: SalomeApp_DataObject( sobj, parent ),
- CAM_RootObject( 0, parent ),
- CAM_DataObject( parent )
-{
-}
-
-/*!Constructor.Initialize by \a parent and CAM_DataModel.*/
-SalomeApp_ModuleObject::SalomeApp_ModuleObject( CAM_DataModel* dm, const _PTR(SObject)& sobj, SUIT_DataObject* parent )
-: SalomeApp_DataObject( sobj, parent ),
- CAM_RootObject( dm, parent ),
- CAM_DataObject( parent )
-{
-}
-
-/*!Destructor. Do nothing.*/
-SalomeApp_ModuleObject::~SalomeApp_ModuleObject()
-{
-}
-
-/*!Returns module name */
-QString SalomeApp_ModuleObject::name() const
-{
- return SalomeApp_DataObject::name();
-}
-
-
-
-
-/*!Constructor.Initialize by \a parent.*/
-SalomeApp_SavePointObject::SalomeApp_SavePointObject( SUIT_DataObject* _parent, const int id, SalomeApp_Study* study )
- : LightApp_DataObject( _parent ), CAM_DataObject( _parent ), // IMPORTANT TO CALL ALL VIRTUAL CONSTRUCTORS!
- myId( id ),
- myStudy( study )
-{
-}
-
-/*!Destructor. Do nothing.*/
-SalomeApp_SavePointObject::~SalomeApp_SavePointObject()
-{
-}
-
-/*!Returns save points ID */
-int SalomeApp_SavePointObject::getId() const
-{
- return myId;
-}
-
-/*!Returns "invalid" entry, which does not correspond to any object in data structure
- but indicates that it is a save point object */
-QString SalomeApp_SavePointObject::entry() const
-{
- return QObject::tr( "SAVE_POINT_DEF_NAME" ) + QString::number( myId );
-}
-
-/*!Returns displayed name of object */
-QString SalomeApp_SavePointObject::name() const
-{
- return myStudy->getNameOfSavePoint( myId );
-}
-
-/*!Gets icon picture of object.*/
-QPixmap SalomeApp_SavePointObject::icon() const
-{
- return QPixmap();
-}
-
-/*!Gets tooltip.*/
-QString SalomeApp_SavePointObject::toolTip() const
-{
- return QObject::tr( "SAVE_POINT_OBJECT_TOOLTIP" ).arg( name() );
-}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOMEAPP_DATAOBJECT_H
-#define SALOMEAPP_DATAOBJECT_H
-
-#include "SalomeApp.h"
-
-#include "LightApp_DataObject.h"
-#include "CAM_RootObject.h"
-
-#include "SALOMEDSClient.hxx"
-
-class SalomeApp_Study;
-
-class SALOMEAPP_EXPORT SalomeApp_DataObject : public LightApp_DataObject
-{
-
-public:
- enum { CT_Value, CT_Entry, CT_IOR, CT_RefEntry };
-
-public:
- SalomeApp_DataObject( SUIT_DataObject* = 0 );
- SalomeApp_DataObject( const _PTR(SObject)&, SUIT_DataObject* = 0 );
- virtual ~SalomeApp_DataObject();
-
- virtual QString name() const;
- virtual QPixmap icon() const;
- virtual QString toolTip() const;
-
- virtual QString text( const int ) const;
- virtual QColor color( const ColorRole ) const;
-
- virtual QString entry() const;
-
- /*! location of corresponding SALOMEDS::SObject */
- virtual _PTR(SObject) object() const;
-
- bool isReference() const;
- _PTR(SObject) referencedObject() const;
-
- /*! GEOM, SMESH, VISU, etc.*/
- virtual QString componentDataType() const;
-
-private:
- QString ior( const _PTR(SObject)& ) const;
- QString entry( const _PTR(SObject)& ) const;
- QString value( const _PTR(SObject)& ) const;
-
-private:
- _PTR(SObject) myObject;
- QString myEntry;
- QString myName;
-};
-
-/*!
- * SalomeApp_ModuleObject - class for optimized access to DataModel from
- * SalomeApp_DataObject instances - see also CAM_RootObject.h
- */
-
-class SALOMEAPP_EXPORT SalomeApp_ModuleObject : public SalomeApp_DataObject,
- public CAM_RootObject
-{
-public:
- SalomeApp_ModuleObject( SUIT_DataObject* = 0 );
- SalomeApp_ModuleObject( const _PTR(SObject)&, SUIT_DataObject* = 0 );
- SalomeApp_ModuleObject( CAM_DataModel*, const _PTR(SObject)&, SUIT_DataObject* = 0 );
- virtual ~SalomeApp_ModuleObject();
-
- virtual QString name() const;
-};
-
-/*!
- * SalomeApp_SavePointObject - class that represents persistent visual_state object
- * these objects are stored in data model, but NOT in SObjects structure, so we
- * must handle them separately using this special class for them
- */
-
-class SALOMEAPP_EXPORT SalomeApp_SavePointObject : public virtual LightApp_DataObject
-{
-public:
- SalomeApp_SavePointObject( SUIT_DataObject* parent, const int, SalomeApp_Study* study );
- virtual ~SalomeApp_SavePointObject();
-
- virtual QString entry() const;
-
- virtual QString name() const;
- virtual QPixmap icon() const;
- virtual QString toolTip() const;
-
- int getId() const;
-
-private:
- int myId;
- SalomeApp_Study* myStudy;
-};
-
-/*!
- * SalomeApp_SavePointRootObject - class that represents parent object for visual_state objects
- */
-
-class SALOMEAPP_EXPORT SalomeApp_SavePointRootObject : public SUIT_DataObject
-{
-public:
- SalomeApp_SavePointRootObject( SUIT_DataObject* parent ) : SUIT_DataObject( parent ) {}
-
- virtual QString name() const { return QObject::tr( "SAVE_POINT_ROOT_NAME" ); }
- virtual QString toolTip() const{ return QObject::tr( "SAVE_POINT_ROOT_TOOLTIP" ); }
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SalomeApp_EventFilter.h"
-#include <SALOME_Event.hxx>
-
-#include <qapplication.h>
-
-SalomeApp_EventFilter* SalomeApp_EventFilter::myFilter = NULL;
-
-/*!Constructor.*/
-SalomeApp_EventFilter::SalomeApp_EventFilter()
-: QObject()
-{
- /* VSR 13/01/03 : installing global event filter for the application */
- qApp->installEventFilter( this );
-}
-
-/*!Destructor.*/
-SalomeApp_EventFilter::~SalomeApp_EventFilter()
-{
- qApp->removeEventFilter( this );
-}
-
-/*!
- Custom event filter
-*/
-bool SalomeApp_EventFilter::eventFilter( QObject* o, QEvent* e )
-{
- if ( e->type() == SALOME_EVENT )
- {
- SALOME_Event* aSE = (SALOME_Event*)((QCustomEvent*)e)->data();
- processEvent(aSE);
- ((QCustomEvent*)e)->setData( 0 );
- return true;
- }
- return QObject::eventFilter( o, e );
-}
-
-/*!Process event.*/
-void SalomeApp_EventFilter::processEvent( SALOME_Event* theEvent )
-{
- if(theEvent){
- theEvent->Execute();
- // Signal the calling thread that the event has been processed
- theEvent->processed();
- }
-}
-
-/*!Create new instance of SalomeApp_EventFilter*/
-void SalomeApp_EventFilter::Init()
-{
- if( myFilter==NULL )
- myFilter = new SalomeApp_EventFilter();
-}
-
-/*!Destroy filter.*/
-void SalomeApp_EventFilter::Destroy()
-{
- if( myFilter )
- {
- delete myFilter;
- myFilter = NULL;
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOMEAPP_EVENTFILTER_H
-#define SALOMEAPP_EVENTFILTER_H
-
-#include "SalomeApp.h"
-#include <qobject.h>
-
-#if defined WNT
-#pragma warning( disable: 4251 )
-#endif
-
-class SALOME_Event;
-
-/*!
- Class provide event filter.
-*/
-class SALOMEAPP_EXPORT SalomeApp_EventFilter: public QObject
-{
-public:
- static void Init();
- static void Destroy();
-
-protected:
- SalomeApp_EventFilter();
- virtual ~SalomeApp_EventFilter();
-
-private:
- /*! global event filter for qapplication */
- virtual bool eventFilter( QObject* o, QEvent* e );
- void processEvent( SALOME_Event* );
-
-private:
- static SalomeApp_EventFilter* myFilter;
-};
-
-#if defined WNT
-#pragma warning( default: 4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SalomeApp_ExceptionHandler.h"
-#include "CASCatch.hxx"
-
-#include <OSD.hxx>
-
-#include <stdexcept>
-#include <exception>
-
-#include <qstring.h>
-
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
- #include <Standard_ErrorHandler.hxx>
- #include <Standard_Failure.hxx>
-#else
- #include "CASCatch.hxx"
-#endif
-
-/*!Constructor. Initialize by \a floatSignal.*/
-SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal )
-: SUIT_ExceptionHandler()
-{
- // JFA 2006-09-28: PAL10867: suppress signal catching,
- // if environment variable DISABLE_SIGNALS_CATCHING is set to 1.
- // Commonly this is used with "noexcepthandler" option.
- char* envNoCatchSignals = getenv("NOT_INTERCEPT_SIGNALS");
- if (!envNoCatchSignals || !atoi(envNoCatchSignals))
- {
- OSD::SetSignal( floatSignal );
- }
-}
-
-/*!Try to call SUIT_ExceptionHandler::internalHandle(o, e), catch if failure.*/
-bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e )
-{
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
- try {
- OCC_CATCH_SIGNALS;
-#else
- CASCatch_TRY {
-#endif
- SUIT_ExceptionHandler::internalHandle( o, e );
- }
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
- catch(Standard_Failure) {
-#else
- CASCatch_CATCH(Standard_Failure) {
-#endif
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- throw Standard_Failure( aFail->GetMessageString() );
- }
-
- return true;
-}
-
-/*!Try to call handleSignals( o, e ), catch and show error message.*/
-bool SalomeApp_ExceptionHandler::handle( QObject* o, QEvent* e )
-{
- bool res = false;
- QString title( "Fatal error" );
-
- try {
- res = handleSignals( o, e );
- }
- catch( std::exception& ex )
- {
- showMessage( title, QString( ex.what() ) );
- }
- catch( Standard_Failure& e )
- {
- showMessage( title, QString( e.GetMessageString() ) );
- }
-#ifndef WNT
- catch(...)
- {
- showMessage( title, "Unknown Exception" );
- }
-#endif
-
- return res;
-}
-
-/*!Create new SUIT_ExceptionHandler*/
-
-extern "C" SALOMEAPP_EXPORT SUIT_ExceptionHandler* getExceptionHandler()
-{
- // MSV 2006-04-26: work around PAL12004 "VTK window => SIGFPE Arithmetic Exception Detected"
- // We disable FPE signal as it was in earlier versions of SALOME. It is enabled
- // only in debug mode if the environment variable DISABLE_FPE is not set to 1.
- bool raiseFPE;
-#if defined(_DEBUG_) | defined(_DEBUG) //the Last for WNT default settings
- raiseFPE = true;
- char* envDisableFPE = getenv("DISABLE_FPE");
- if (envDisableFPE && atoi(envDisableFPE))
- raiseFPE = false;
-#else
- raiseFPE = false;
-#endif
-
- return new SalomeApp_ExceptionHandler( raiseFPE );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOMEAPP_EXCEPTIONHANDLER_H
-#define SALOMEAPP_EXCEPTIONHANDLER_H
-
-#include "SalomeApp.h"
-
-#include <SUIT_ExceptionHandler.h>
-
-class SALOMEAPP_EXPORT SalomeApp_ExceptionHandler : public SUIT_ExceptionHandler
-{
-public:
- SalomeApp_ExceptionHandler( const bool );
- virtual bool handle( QObject*, QEvent* );
-
-protected:
- virtual bool handleSignals( QObject*, QEvent* );
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SalomeApp_ExitDlg.cxx
-// Author: Margarita KARPUNINA, Open CASCADE S.A.S.
-//
-
-#include "SalomeApp_ExitDlg.h"
-
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include <qcheckbox.h>
-
-/*!
- * \brief creates a Exit dialog box
- * \param parent a parent widget
- * \param modal bool argument, if true the dialog box is a modal dialog box
- * \param f style flags
- */
-SalomeApp_ExitDlg::SalomeApp_ExitDlg( QWidget* parent )
- : QDialog( parent, "SalomeApp_ExitDlg", true )
-{
- setSizeGripEnabled( true );
- setCaption( tr( "INF_DESK_EXIT" ) );
-
- QVBoxLayout* m_vbL = new QVBoxLayout( this );
- m_vbL->setMargin( 11 );
- m_vbL->setSpacing( 6 );
-
- QLabel* m_lIcon = new QLabel( this, "m_lDescr" );
- QPixmap pm = QMessageBox::standardIcon( QMessageBox::Question );
- m_lIcon->setPixmap( pm );
- m_lIcon->setScaledContents( false );
- m_lIcon->setAlignment( Qt::AlignCenter );
-
- QLabel* m_lDescr = new QLabel (this, "m_lDescr");
- m_lDescr->setText ( tr ("QUE_DESK_EXIT") );
- m_lDescr->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
-
- myServersShutdown = new QCheckBox( tr("SHUTDOWN_SERVERS"), this );
- myServersShutdown->setChecked(true);
-
- QVBoxLayout* m_vl1 = new QVBoxLayout();
- m_vl1->setMargin( 10 ); m_vl1->setSpacing( 16 );
- m_vl1->addWidget( m_lDescr );
- m_vl1->addWidget( myServersShutdown );
-
- QHBoxLayout* m_hl1 = new QHBoxLayout();
- m_hl1->setMargin( 0 ); m_hl1->setSpacing( 6 );
- m_hl1->addWidget( m_lIcon );
- m_hl1->addStretch();
- m_hl1->addLayout( m_vl1 );
- m_hl1->addStretch();
-
- QPushButton* m_pbOk = new QPushButton( tr( "BUT_OK" ), this );
- QPushButton* m_pbCancel = new QPushButton( tr( "BUT_CANCEL" ), this );
-
- QGridLayout* m_hl2 = new QGridLayout();
- m_hl2->setMargin( 0 ); m_hl2->setSpacing( 6 );
- m_hl2->addWidget( m_pbOk, 0, 0 );
- m_hl2->setColStretch( 1, 5 );
- m_hl2->addWidget( m_pbCancel, 0, 2 );
-
- m_vbL->addStretch();
- m_vbL->addLayout( m_hl1 );
- m_vbL->addStretch();
- m_vbL->addLayout( m_hl2 );
-
- connect( m_pbOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( m_pbCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
-}
-
-/*!
- * \brief Destructor
- */
-SalomeApp_ExitDlg::~SalomeApp_ExitDlg()
-{
-}
-
-/*!
- * \brief get the check box status
- */
-bool SalomeApp_ExitDlg::isServersShutdown()
-{
- return myServersShutdown->isChecked();
-}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SalomeApp_ExitDlg.h
-// Author: Margarita KARPUNINA, Open CASCADE S.A.S.
-//
-
-#ifndef SALOMEAPP_EXITDLG_H
-#define SALOMEAPP_EXITDLG_H
-
-#include <qdialog.h>
-
-class QCheckBox;
-
-/*!\class SalomeApp_ExitDlg
- * \brief Describes a dialog box shown on question about quit application
- */
-class SalomeApp_ExitDlg: public QDialog
-{
- Q_OBJECT
-
-public:
- SalomeApp_ExitDlg( QWidget* ) ;
- ~SalomeApp_ExitDlg();
-
- bool isServersShutdown();
-
-private:
- QCheckBox* myServersShutdown;
-};
-
-#endif // SALOMEAPP_EXITDLG_H
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SalomeApp_Filter.h"
-
-/*!Constructor.Initialize by study.*/
-SalomeApp_Filter::SalomeApp_Filter( SalomeApp_Study* study )
-{
- myStudy = study;
-}
-
-/*!Destructor. Do nothing.*/
-SalomeApp_Filter::~SalomeApp_Filter()
-{
-}
-
-/*!Gets study.*/
-SalomeApp_Study* SalomeApp_Filter::getStudy() const
-{
- return myStudy;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOMEAPP_FILTER_H
-#define SALOMEAPP_FILTER_H
-
-#include "SalomeApp.h"
-#include "SUIT_SelectionFilter.h"
-
-class SalomeApp_Study;
-
-class SALOMEAPP_EXPORT SalomeApp_Filter: public SUIT_SelectionFilter
-{
-public:
- SalomeApp_Filter(SalomeApp_Study* study);
- ~SalomeApp_Filter();
-
-protected:
- SalomeApp_Study* getStudy() const;
-
-private:
- SalomeApp_Study* myStudy;
-};
-
-#endif
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SALOMEGUI_ImportOperation.cxx
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#include "SalomeApp_ImportOperation.h"
-#include <SUIT_Application.h>
-
-#ifndef WNT
-using namespace std;
-#endif
-
-/*!Constructor. Do nothing.*/
-SalomeApp_ImportOperation::SalomeApp_ImportOperation( SUIT_Application* app ) :
-SUIT_Operation( app )
-{
-}
+++ /dev/null
-// SALOME SALOMEAPP : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SalomeApp_ImportOperation.h
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#if !defined SALOMEAPP_IMPORTOPERATION
-#define SALOMEAPP_IMPORTOPERATION
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include <SUIT_Operation.h>
-
-class SUIT_Application;
-
-class SalomeApp_ImportOperation : public SUIT_Operation
-{
-public:
- SalomeApp_ImportOperation( SUIT_Application* );
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// SALOME SalomeApp
-//
-// File : SalomeApp_ListView.cxx
-// Author : Vadim SANDLER
-// Module : SALOME
-// $Header$
-
-#include "SalomeApp_ListView.h"
-#include "SalomeApp_Application.h"
-
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_Session.h"
-
-#include <qheader.h>
-#include <qvalidator.h>
-#include <qapplication.h>
-#include <qtoolbutton.h>
-
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfReal.hxx>
-
-#include "utilities.h"
-
-using namespace std;
-
-/*!
- Used for resizing editing widget
-*/
-void computeEditGeometry(SalomeApp_ListViewItem* theItem,
- SalomeApp_EntityEdit* theWidget)
-{
- if (!theItem)
- return;
- QListView* aListView = theItem->listView();
- int anEditColumn = theItem->getEditedColumn();
- if (anEditColumn < 0)
- return;
-
- int aX = 0, aY = 0, aW = 0, aH = 0;
-
- QRect aRect = aListView->itemRect(theItem);
- aListView->contentsToViewport(aListView->header()->sectionPos(anEditColumn), 0, aX, aY);
- if (aX < 0)
- aX = 0; // THIS CAN BE REMOVED
- QSize aSize = theWidget->getControl()->sizeHint();
- aH = QMAX(aSize.height() , aRect.height() );
- aY = aRect.y() - ((aH - aRect.height()) / 2);
- //aW = aListView->columnWidth(anEditColumn); // CAN SUBSTITUTE NEXT 3 ROWS
- aW = aListView->viewport()->width() - aX;
- if (aW < 0)
- aW = 0;
- theWidget->setGeometry(aX, aY, aW, aH);
-}
-
-/*!
- Constructor
-*/
-SalomeApp_ListView::SalomeApp_ListView( QWidget* parent )
-: QtxListView( parent )
-{
- myMouseEnabled = true;
- myEditingEnabled = false;
- setSelectionMode(Single);
- setSorting(-1);
- setRootIsDecorated(false);
- setAllColumnsShowFocus(false);
-// header()->setClickEnabled(false);
- header()->setMovingEnabled(false);
-
- myEditedItem = 0;
- myEdit = 0;
-
- viewport()->installEventFilter(this);
-
- connect(this, SIGNAL(selectionChanged()),
- this, SLOT(onSelectionChanged()));
- connect(header(), SIGNAL(sizeChange(int, int, int)),
- this, SLOT(onHeaderSizeChange(int, int, int)));
-}
-
-/*!
- Destructor
-*/
-SalomeApp_ListView::~SalomeApp_ListView()
-{
- if (myEdit) {
- delete myEdit;
- }
- myEdit = 0;
- myEditedItem = 0;
-}
-
-/*!
- Updates all data viewer
-*/
-void SalomeApp_ListView::updateViewer()
-{
- // temporary disconnecting selection changed SIGNAL
- blockSignals(true);
- SalomeApp_ListViewItem* aRoot = (SalomeApp_ListViewItem*)firstChild();
- if (aRoot)
- aRoot->updateAllLevels();
- updateContents();
- // connecting again selection changed SIGNAL
- blockSignals(false);
- emit selectionChanged();
-}
-
-/*!
- Updates currently selected item(s)
-*/
-void SalomeApp_ListView::updateSelected()
-{
- // temporary disconnecting selection changed SIGNAL
- blockSignals(true);
- SalomeApp_ListViewItem* aChild = (SalomeApp_ListViewItem*)selectedItem();
- if (aChild)
- aChild->updateAllLevels();
- updateContents();
- // connecting again selection changed SIGNAL
- blockSignals(false);
- emit selectionChanged();
-}
-
-/*!
- Returns popup client type
-*/
-QString SalomeApp_ListView::popupClientType() const
-{
- return "SalomeApp_ListView";
-}
-
-/*!
- Fills popup menu with items
-*/
-void SalomeApp_ListView::contextMenuPopup( QPopupMenu* aPopup )
-{
- if (aPopup) {
- // add items here...
- }
-}
-
-/*!
- Clears view
-*/
-void SalomeApp_ListView::clear()
-{
- if (myEdit) {
- delete myEdit;
- myEdit = 0;
- myEditedItem = 0;
- }
- QListView::clear();
-}
-
-/*!
- \return true if mouse events are enabled
-*/
-bool SalomeApp_ListView::isMouseEnabled()
-{
- return myMouseEnabled;
-}
-
-/*!
- Enables/disables mouse events (excluding MouseMove)
-*/
-void SalomeApp_ListView::enableMouse(bool enable)
-{
- myMouseEnabled = enable;
-}
-
-/*!
- Event filter
-*/
-bool SalomeApp_ListView::eventFilter(QObject* object, QEvent* event)
-{
- if (object == viewport() &&
- (event->type() == QEvent::MouseButtonPress ||
- event->type() == QEvent::MouseButtonRelease ||
- event->type() == QEvent::MouseButtonDblClick) &&
- !isMouseEnabled())
- return true;
- else
- return QListView::eventFilter(object, event);
-}
-
-/*!
- Setting editing of items availbale/not available
-*/
-void SalomeApp_ListView::enableEditing(bool theFlag)
-{
- myEditingEnabled = theFlag;
- if (!myEditingEnabled) {
- if (myEdit) {
- delete myEdit;
- myEdit = 0;
- myEditedItem = 0;
- }
- }
-}
-
-/*!
- Says if editing is enabled
-*/
-bool SalomeApp_ListView::isEnableEditing()
-{
- return myEditingEnabled;
-}
-
-/*!
- Calls finishEditing(true)...
-*/
-void SalomeApp_ListView::accept()
-{
- finishEditing(true);
-}
-
-/*!
- Slot, called when selection changed in List Viewer
-*/
-void SalomeApp_ListView::onSelectionChanged()
-{
- if (myEdit) {
- finishEditing(true);
- delete myEdit;
- myEdit = 0;
- if (myEditedItem && !myEditedItem->isAccepted()) {
- delete myEditedItem;
- updateContents();
- }
- myEditedItem = 0;
- }
- // editing is allowed in Single Selection Mode only
- if (selectionMode() != Single || !isEnableEditing())
- return;
- SalomeApp_ListViewItem* anItem = (SalomeApp_ListViewItem*)selectedItem();
- if (anItem) {
- if (!anItem->isEditable())
- return;
- myEdit = anItem->startEditing();
- if (myEdit) {
- connect(myEdit, SIGNAL(returnPressed()), this, SLOT(onEditOk()));
- connect(myEdit, SIGNAL(escapePressed()), this, SLOT(onEditCancel()));
- myEditedItem = anItem;
- myEdit->show();
- myEdit->setFocus();
- }
- }
-}
-
-/*!
- Called when Data Viewer is resized
-*/
-void SalomeApp_ListView::resizeEvent( QResizeEvent * e)
-{
- QListView::resizeEvent(e);
- int aW = columnWidth(columns()-1);
- int aX = header()->sectionPos(columns()-1);
- if (aW < width() - frameWidth() * 2 - aX - 1)
- setColumnWidth(columns()-1, width() - frameWidth() * 2 - aX - 1);
- updateContents();
-}
-
-/*!
- Slot, called when columns sizes are changed
-*/
-void SalomeApp_ListView::onHeaderSizeChange(int, int, int)
-{
- int aW = columnWidth(columns()-1);
- int aX = header()->sectionPos(columns()-1);
- if (aW < width() - frameWidth() * 2 - aX - 1)
- setColumnWidth(columns()-1, width() - frameWidth() * 2 - aX - 1);
-}
-
-/*!
- Handler for paint event
-*/
-void SalomeApp_ListView::viewportPaintEvent(QPaintEvent* e)
-{
- QListView::viewportPaintEvent(e);
- if (myEditedItem && myEdit) {
- computeEditGeometry(myEditedItem, myEdit);
- }
-}
-
-/*!
- Called when user finishes in editing of item
-*/
-void SalomeApp_ListView::onEditOk()
-{
- finishEditing(true);
-}
-
-/*!
- Called when user cancels item editing
-*/
-void SalomeApp_ListView::onEditCancel()
-{
- finishEditing(false);
-}
-
-/*!
- Finishes editing of entity
-*/
-UpdateType SalomeApp_ListView::finishEditing(bool ok)
-{
- UpdateType aNeedsUpdate = utCancel;
- if (myEditedItem && myEdit)
- {
- disconnect(myEdit, SIGNAL(returnPressed()), this, SLOT(onEditOk()));
- disconnect(myEdit, SIGNAL(escapePressed()), this, SLOT(onEditCancel()));
- myEditedItem->setAccepted(true);
- if (ok) {
- aNeedsUpdate = myEditedItem->finishEditing(myEdit);
- if (aNeedsUpdate == utCancel) {
- // something to do here on Cancel...
- }
- else {
- // something to do here on OK...
- }
- // updating contents
- switch (aNeedsUpdate) {
- case utUpdateItem:
- {
- if (myEditedItem)
- myEditedItem->updateAllLevels();
- break;
- }
- case utUpdateParent:
- {
- if (myEditedItem) {
- SalomeApp_ListViewItem* aParent = (SalomeApp_ListViewItem*)(myEditedItem->parent());
- if (aParent)
- aParent->updateAllLevels();
- else
- myEditedItem->updateAllLevels();
- }
- break;
- }
- case utUpdateViewer:
- {
- updateViewer();
- break;
- }
- case utUpdateAll:
- {
- // doing the same as for utUpdateViewer here
- // descendants can add extra processing
- updateViewer();
- break;
- }
- default:
- break;
- }
- }
- }
-
- // hide <myEdit> widget
- if (myEdit) {
- myEdit->hide();
- }
-
- return aNeedsUpdate;
-}
-
-/*!
- \return current tooltip for list view
- \retval valid rect in success
-*/
-QRect SalomeApp_ListView::tip(QPoint aPos,
- QString& aText,
- QRect& dspRect,
- QFont& dspFnt) const
-{
- QRect result( -1, -1, -1, -1 );
- SalomeApp_ListViewItem* aItem = (SalomeApp_ListViewItem*)itemAt( aPos );
- if ( aItem ) {
- for (int i = 0; i < columns(); i++) {
- QRect aItemRect = aItem->itemRect(i);
- QRect aTextRect = aItem->textRect(i);
- if ( !aItem->text(i).isEmpty() &&
- ( aItemRect.width() > header()->sectionSize(i) ||
- aTextRect.left() < 0 ||
- aTextRect.top() < 0 ||
- aTextRect.right() > viewport()->width() ||
- aTextRect.bottom() > viewport()->height() ) ) {
- // calculating tip data
- aText = aItem->tipText();
- dspRect = aItem->tipRect();
- dspFnt = font();
- if (dspRect.isValid()) {
- result = QRect(QPoint(0, aItemRect.top()),
- QSize(viewport()->width(), aItemRect.height()));
- }
- }
- }
- }
- return result;
-}
-
-/*!
- Constructor
-*/
-SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent) :
-QListViewItem( parent )
-{
- init();
-}
-
-/*!
- Constructor
-*/
-SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent,
- SalomeApp_ListViewItem* after) :
-QListViewItem( parent, after )
-{
- init();
-}
-
-/*!
- Constructor
-*/
-SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent,
- const QString& theName,
- const bool theEditable) :
-QListViewItem(parent, theName)
-{
- init();
- setEditable(theEditable);
-}
-
-/*!
- Constructor
-*/
-SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent,
- const QString& theName,
- const QString& theValue,
- const bool theEditable) :
-QListViewItem(parent, theName, theValue)
-{
- init();
- setEditable(theEditable);
-}
-
-/*!
- Constructor
-*/
-SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListViewItem* parent,
- const QString& theName,
- const bool theEditable) :
-QListViewItem(parent, theName)
-{
- init();
- setEditable(theEditable);
-}
-
-/*!
- Constructor
-*/
-SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListViewItem* parent,
- SalomeApp_ListViewItem* after,
- const QString& theName,
- const bool theEditable) :
-QListViewItem(parent, after, theName)
-{
- init();
- setEditable(theEditable);
-}
-
-/*!
- Constructor
-*/
-SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent,
- SalomeApp_ListViewItem* after,
- const QString& theName,
- const bool theEditable) :
-QListViewItem(parent, after, theName)
-{
- init();
- setEditable(theEditable);
-}
-
-
-/*!
- Constructor
-*/
-SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListViewItem* parent,
- const QString& theName,
- const QString& theValue,
- const bool theEditable) :
-QListViewItem(parent, theName, theValue)
-{
- init();
- setEditable(theEditable);
-}
-
-
-/*!
- Constructor
-*/
-SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListViewItem* parent,
- SalomeApp_ListViewItem* after,
- const QString& theName,
- const QString& theValue,
- const bool theEditable) :
-QListViewItem(parent, after, theName, theValue)
-{
- init();
- setEditable(theEditable);
-}
-
-/*!
- Constructor
-*/
-SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent,
- SalomeApp_ListViewItem* after,
- const QString& theName,
- const QString& theValue,
- const bool theEditable) :
-QListViewItem(parent, after, theName, theValue)
-{
- init();
- setEditable(theEditable);
-}
-
-/*!
- Destructor
-*/
-SalomeApp_ListViewItem::~SalomeApp_ListViewItem()
-{
-}
-
-/*!
- Initialization
-*/
-void SalomeApp_ListViewItem::init()
-{
- myEditable = false;
- myAccepted = true;
- myEditingType = (int)SalomeApp_EntityEdit::etLineEdit;
- myValueType = (int)SalomeApp_EntityEdit::vtString;
- myButtons = 0;
- myUserType = -1;
-}
-
-/*!
- \return text in the first column
-*/
-QString SalomeApp_ListViewItem::getName() const
-{
- return ( listView()->columns() > 0 ) ? text(0) : QString("");
-}
-
-/*!
- Sets text in the first column
-*/
-UpdateType SalomeApp_ListViewItem::setName(const QString& theName)
-{
- UpdateType aNeedsUpdate = utCancel;
- if (listView()->columns() > 0) {
- setText(0, theName);
- aNeedsUpdate = utNone;
- }
- return aNeedsUpdate;
-}
-
-/*!
- \return text in the second column
-*/
-QString SalomeApp_ListViewItem::getValue() const
-{
- return ( listView()->columns() > 1 ) ? text(1) : QString("");
-}
-
-/*!
- Sets text in the second column
-*/
-UpdateType SalomeApp_ListViewItem::setValue(const QString& theValue)
-{
- UpdateType aNeedsUpdate = utCancel;
- if (listView()->columns() > 1) {
- setText(1, theValue);
- aNeedsUpdate = utNone;
- }
- return aNeedsUpdate;
-}
-
-/*!
- \return full path to the entity from the root
-*/
-QString SalomeApp_ListViewItem::fullName()
-{
- QString aFullName = getName();
- SalomeApp_ListViewItem* aParent = (SalomeApp_ListViewItem*)parent();
- while(aParent != NULL) {
- aFullName = aParent->getName() + QString(".") + aFullName;
- aParent = (SalomeApp_ListViewItem*)(aParent->parent());
- }
- return aFullName;
-}
-
-/*!
- expands all entities beginning from this level
-*/
-void SalomeApp_ListViewItem::openAllLevels()
-{
- setOpen(true);
- SalomeApp_ListViewItem* aChild = (SalomeApp_ListViewItem*)firstChild();
- while( aChild ) {
- aChild->openAllLevels();
- aChild = (SalomeApp_ListViewItem*)(aChild->nextSibling());
- }
-}
-
-/*!
- update all entites beginning from this level
-*/
-void SalomeApp_ListViewItem::updateAllLevels()
-{
- SalomeApp_ListViewItem* aChild = (SalomeApp_ListViewItem*)firstChild();
- while( aChild ) {
- aChild->updateAllLevels();
- aChild = (SalomeApp_ListViewItem*)(aChild->nextSibling());
- }
-}
-
-/*!
- \return true if entity is editable
-*/
-bool SalomeApp_ListViewItem::isEditable() const
-{
- return myEditable;
-}
-
-/*!
- Sets editable flag fo the entity
-*/
-void SalomeApp_ListViewItem::setEditable(bool theEditable)
-{
- myEditable = theEditable;
-}
-
-/*!
- \return true if entitiy is accepted after editing
-*/
-bool SalomeApp_ListViewItem::isAccepted() const
-{
- return myAccepted;
-}
-
-/*!
- Sets entitiy accepted or not after editing
-*/
-void SalomeApp_ListViewItem::setAccepted(bool theAccepted)
-{
- myAccepted = theAccepted;
-}
-
-/*!
- \retval type of edit control (default is edit box)
- \li 0 - edit box
- \li 1 - combo box
- \li 2 - editable combo box
-*/
-int SalomeApp_ListViewItem::getEditingType()
-{
- return myEditingType;
-}
-
-/*!
- \retval type of edit control (negative value means none)
- \li 0 - edit box
- \li 1 - combo box
- \li 2 - editable combo box
-*/
-void SalomeApp_ListViewItem::setEditingType(const int type)
-{
- myEditingType = type;
-}
-
-/*! \retval edited column, default is last column
- negative value means there are no editable columns
-*/
-int SalomeApp_ListViewItem::getEditedColumn()
-{
- return listView()->columns()-1;
-}
-
-/*!
- \retval type of edited value (string, int, double)
- default is string
-*/
-int SalomeApp_ListViewItem::getValueType()
-{
- return myValueType;
-}
-
-/*!
- Sets type of edited value
-*/
-void SalomeApp_ListViewItem::setValueType(const int valueType)
-{
- myValueType = valueType;
-}
-
-/*!
- Sets type of edited value
-*/
-int SalomeApp_ListViewItem::getUserType()
-{
- return myUserType;
-}
-
-/*!
- Sets type of edited value
-*/
-void SalomeApp_ListViewItem::setUserType(const int userType)
-{
- myUserType = userType;
-}
-
-/*!
- \return buttons for editing widget (Apply (V), Cancel (X))
- default is both buttons
-*/
-int SalomeApp_ListViewItem::getButtons()
-{
- return myButtons;
-}
-
-/*!
- Sets buttons for editing widget (Apply (V), Cancel (X))
-*/
-void SalomeApp_ListViewItem::setButtons(const int buttons)
-{
- myButtons = buttons;
-}
-
-/*!
- Creates control for editing and fills it with values
-*/
-SalomeApp_EntityEdit* SalomeApp_ListViewItem::startEditing()
-{
- SalomeApp_EntityEdit* aWidget = 0;
- QListView* aListView = listView();
- if (aListView) {
- if (!isEditable())
- return 0;
- int anEditType = getEditingType();
- int aValueType = getValueType();
- int aButtons = getButtons();
- int anEditColumn = getEditedColumn();
- if (anEditColumn < 0 || anEditType < 0)
- return 0;
- aWidget = new SalomeApp_EntityEdit(aListView->viewport(),
- anEditType,
- aValueType,
- aButtons & SalomeApp_EntityEdit::btApply,
- aButtons & SalomeApp_EntityEdit::btCancel);
- computeEditGeometry(this, aWidget);
-
- fillWidgetWithValues(aWidget);
- }
- return aWidget;
-}
-
-/*!
- Fills widget with initial values (list or single value)
-*/
-void SalomeApp_ListViewItem::fillWidgetWithValues(SalomeApp_EntityEdit* theWidget)
-{
- int anEditColumn = getEditedColumn();
- if (theWidget && anEditColumn >= 0 && !text(anEditColumn).isEmpty())
- theWidget->insertItem(text(anEditColumn), true);
-}
-
-/*!
- Finishes editing of entity
-*/
-UpdateType SalomeApp_ListViewItem::finishEditing(SalomeApp_EntityEdit* theWidget)
-{
- UpdateType aNeedsUpdate = utCancel;
- try {
- if (theWidget) {
- int anEditColumn = getEditedColumn();
- switch (anEditColumn) {
- case 0:
- aNeedsUpdate = setName(theWidget->getText());
- break;
- case 1:
- aNeedsUpdate = setValue(theWidget->getText());
- break;
- default:
- break;
- }
- }
- }
- catch (...) {
- MESSAGE( "System error has been caught - SalomeApp_ListViewItem::finishEditing" )
- }
- return aNeedsUpdate;
-}
-
-/*!
- Calculates rectangle which should contain item's tip
-*/
-QRect SalomeApp_ListViewItem::tipRect()
-{
- QRect aRect = QRect(-1, -1, -1, -1);
- QRect aItemRect = listView()->itemRect(this);
- if ( !aItemRect.isValid() )
- return aItemRect;
-
- QString aTip = tipText();
- if (!aTip.isEmpty()) {
- QRect aRect0 = textRect(0);
- QFont aFont(listView()->font());
- QFontMetrics fm(aFont);
- int iw = fm.width(aTip);
- aRect = QRect(QPoint(aRect0.x() < 0 ? 0 : aRect0.x(),
- aRect0.y()),
- QSize (iw,
- aRect0.height()));
- }
- return aRect;
-}
-
-/*!
- \return text for tooltip
-*/
-QString SalomeApp_ListViewItem::tipText()
-{
- QString aText = getName();
- if (!getValue().isEmpty())
- aText += QString(" : ") + getValue();
- return aText;
-}
-
-/*!
- Calculates rect of item text in viewport coordinates
-*/
-QRect SalomeApp_ListViewItem::textRect(const int column) const
-{
- QRect aItemRect = listView()->itemRect( this );
- if ( !aItemRect.isValid() )
- return aItemRect;
-
- QFont aFont(listView()->font());
- QFontMetrics fm(aFont);
-
- int decorWidth = ( listView()->rootIsDecorated() ) ?
- ( listView()->treeStepSize() * (depth() + 1) ) :
- ( listView()->treeStepSize() * depth() );
- int pixmapWidth = ( pixmap(column) ) ?
- pixmap(column)->width() + listView()->itemMargin() * 2 :
- listView()->itemMargin();
- int prevWidth = 0;
- for (int i = 0; i < column; i++)
- prevWidth += listView()->header()->sectionSize(i);
- int ix = prevWidth +
- pixmapWidth +
- ((column == 0) ? decorWidth : 0);
- int iy = aItemRect.y();
- int iw = fm.width(text(column));
- int ih = aItemRect.height();
- if (pixmap(column)) {
- iy += listView()->itemMargin();
- ih -= listView()->itemMargin() * 2;
- }
- ix -= listView()->contentsX();
-
- QRect theResult(QPoint(ix, iy), QSize(iw, ih));
- return theResult;
-}
-
-/*!
- Calculates rect of item data in viewport coordinates
-*/
-QRect SalomeApp_ListViewItem::itemRect(const int column) const
-{
- QRect aItemRect = listView()->itemRect( this );
- if ( !aItemRect.isValid() )
- return aItemRect;
-
- QFont aFont(listView()->font());
- QFontMetrics fm(aFont);
-
- int decorWidth = ( listView()->rootIsDecorated() ) ?
- ( listView()->treeStepSize() * (depth() + 1) ) :
- ( listView()->treeStepSize() * depth() );
- int pixmapWidth = ( pixmap(column) ) ?
- pixmap(column)->width() + listView()->itemMargin() * 2 :
- 0;
- int prevWidth = 0;
- for (int i = 0; i < column; i++)
- prevWidth += listView()->header()->sectionSize(i);
- int ix = prevWidth;
- int iy = aItemRect.y();
- int iw = pixmapWidth +
- listView()->itemMargin() * 2 +
- ((column == 0) ? decorWidth : 0) +
- fm.width(text(column));
- int ih = aItemRect.height();
- ix -= listView()->contentsX();
-
- QRect theResult(QPoint(ix, iy), QSize(iw, ih));
- return theResult;
-}
-
-/*!
- Constructor
-*/
-SalomeApp_EditBox::SalomeApp_EditBox(QWidget* parent) :
-QLineEdit(parent)
-{
-}
-
-/*!
- Event filter for key pressing
-*/
-void SalomeApp_EditBox::keyPressEvent( QKeyEvent *e )
-{
- if ( e->key() == Key_Escape )
- emit escapePressed();
- else
- QLineEdit::keyPressEvent( e );
- e->accept();
-}
-
-
-/*!
- Constructor
-*/
-SalomeApp_ComboBox::SalomeApp_ComboBox(bool rw, QWidget* parent, const char* name) :
-QComboBox(rw, parent, name)
-{
-}
-
-/*!
- Searches item in list and returns its index
-*/
-int SalomeApp_ComboBox::findItem(const QString& theText)
-{
- for (int i = 0; i < count(); i++)
- if (text(i) == theText)
- return i;
- return -1;
-}
-
-/*!
- Adds item in combo box
-*/
-void SalomeApp_ComboBox::insertItem(const QString& theValue,
- int theIndex)
-{
- if (duplicatesEnabled() || findItem(theValue) < 0)
- QComboBox::insertItem(theValue, theIndex);
-}
-
-/*!
- Adds list of items in combo box
-*/
-void SalomeApp_ComboBox::insertList(const QStringList& theList)
-{
- for (unsigned i = 0; i < theList.count(); i++)
- insertItem(theList[i]);
-}
-
-/*!
- Adds item in combo box
-*/
-void SalomeApp_ComboBox::insertItem(const int theValue)
-{
- int aNum;
- bool bOk;
- for (int i = 0; i < count(); i++) {
- aNum = text(i).toInt(&bOk);
- if (bOk) {
- if (aNum > theValue || (aNum == theValue && duplicatesEnabled())) {
- insertItem(QString::number(theValue), i);
- return;
- }
- }
- }
- insertItem(QString::number(theValue));
-}
-
-/*!
- Adds list of items in combo box
-*/
-void SalomeApp_ComboBox::insertList(const TColStd_ListOfInteger& theList)
-{
- for (TColStd_ListIteratorOfListOfInteger aIter(theList); aIter.More(); aIter.Next())
- insertItem(aIter.Value());
-}
-
-/*!
- Adds item in combo box
-*/
-void SalomeApp_ComboBox::insertItem(const double theValue)
-{
- double aNum;
- bool bOk;
- for (int i = 0; i < count(); i++) {
- aNum = text(i).toDouble(&bOk);
- if (bOk) {
- if (aNum > theValue || (aNum == theValue && duplicatesEnabled())) {
- insertItem(QString::number(theValue), i);
- return;
- }
- }
- }
- insertItem(QString::number(theValue));
-}
-
-/*!
- Adds list of items in combo box
-*/
-void SalomeApp_ComboBox::insertList(const TColStd_ListOfReal& theList)
-{
- for (TColStd_ListIteratorOfListOfReal aIter(theList); aIter.More(); aIter.Next())
- insertItem(aIter.Value());
-}
-
-#include <qlayout.h>
-
-#define MIN_COMBO_WIDTH 1
-#define MIN_EDIT_WIDTH 1
-
-/*!
- Constructor
-*/
-SalomeApp_EntityEdit::SalomeApp_EntityEdit(QWidget* parent,
- int controlType,
- int valueType,
- bool butApply,
- bool butCancel) :
-QWidget(parent),
-myEdit(0),
-myCombo(0),
-myApplyBtn(0),
-myCancelBtn(0)
-{
- SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
- SUIT_ResourceMgr* mgr = app ? app->resourceMgr() : NULL;
-
- QHBoxLayout* aTopLayout = new QHBoxLayout(this);
- aTopLayout->setAlignment( Qt::AlignTop );
- aTopLayout->setSpacing( 0 );
- aTopLayout->setMargin( 1 );
- if (controlType != etLineEdit &&
- controlType != etComboBox &&
- controlType != etComboEdit)
- controlType = etLineEdit;
- if (controlType == etComboBox || controlType == etComboEdit) {
- // this is an editable combo box
- myCombo = new SalomeApp_ComboBox(controlType == etComboEdit, this);
- myCombo->setMinimumSize(MIN_COMBO_WIDTH, 0);
- myCombo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Fixed));
- // no insertions
- myCombo->setInsertionPolicy(QComboBox::NoInsertion);
- // no duplicates enabled by default
- myCombo->setDuplicatesEnabled(false);
- aTopLayout->addWidget(myCombo);
- // connect signals
- connect(myCombo, SIGNAL(activated(const QString&)), this, SLOT(onComboActivated(const QString&)));
- connect(myCombo, SIGNAL(textChanged(const QString&)), this, SLOT(onTextChanged(const QString&)));
- }
- else {
- // and this is an edit box
- myEdit = new SalomeApp_EditBox(this);
- myEdit->setMinimumSize(MIN_EDIT_WIDTH, 0);
- myEdit->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Fixed));
- aTopLayout->addWidget(myEdit);
- connect(myEdit, SIGNAL(textChanged(const QString&)), this, SLOT(onTextChanged(const QString&)));
- connect(myEdit, SIGNAL(returnPressed()), this, SLOT(onApply()));
- connect(myEdit, SIGNAL(escapePressed()), this, SLOT(onCancel()));
- }
- if (valueType != vtString &&
- valueType != vtInteger &&
- valueType != vtDouble)
- valueType = vtString;
- if (valueType == vtInteger)
- setValidator(new QIntValidator(this));
- else if (valueType == vtDouble)
- setValidator(new QDoubleValidator(this));
- if (butApply) {
- // Apply button (V)
- myApplyBtn = new QToolButton(this);
-
- QPixmap anIcon;
- if( mgr )
- anIcon = mgr->loadPixmap( "STD", tr( "ICON_APPLY" ), false );
-
- myApplyBtn->setPixmap(anIcon);
- myApplyBtn->setEnabled(false);
- myApplyBtn->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
- myApplyBtn->setMinimumSize(16, 16);
- myApplyBtn->setMaximumSize(16, 20);
- aTopLayout->addWidget(myApplyBtn);
- connect(myApplyBtn, SIGNAL(clicked()), this, SLOT(onApply()));
- }
- if (butCancel) {
- // Cancel button (X)
- myCancelBtn = new QToolButton(this);
- QPixmap anIcon;
- if( mgr )
- anIcon = mgr->loadPixmap( "STD", tr( "ICON_CANCEL" ), false );
- myCancelBtn->setPixmap(anIcon);
- myCancelBtn->setEnabled(false);
- myCancelBtn->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
- myCancelBtn->setMinimumSize(16, 16);
- myCancelBtn->setMaximumSize(16, 20);
- aTopLayout->addWidget(myCancelBtn);
- connect(myCancelBtn, SIGNAL(clicked()), this, SLOT(onCancel()));
- }
-}
-
-/*!
- Destructor
-*/
-SalomeApp_EntityEdit::~SalomeApp_EntityEdit()
-{
-}
-
-/*!
- Clears edit/combo box
-*/
-void SalomeApp_EntityEdit::clear()
-{
- if (myEdit)
- myEdit->clear();
- if (myCombo)
- myCombo->clear();
-}
-
-/*!
- \return current text in edit box or combo box
-*/
-QString SalomeApp_EntityEdit::getText()
-{
- if (myEdit)
- return myEdit->text();
- else if (myCombo)
- return myCombo->currentText();
- else
- return "";
-}
-
-/*!
- Sets text
-*/
-void SalomeApp_EntityEdit::setText(const QString& theText)
-{
- myString = theText;
- if (myEdit)
- myEdit->setText(theText);
- if (myCombo) {
- int aFound = myCombo->findItem(theText);
- if (aFound >= 0) {
- myCombo->setCurrentItem(aFound);
- onTextChanged(theText);
- }
- }
-}
-
-/*!
- Adds item in combo box, sets it current if theSetCurrent is true
-*/
-void SalomeApp_EntityEdit::insertItem(const QString& theValue,
- bool theSetCurrent,
- int theOrder)
-{
- if (myCombo) {
- int aIndexAt = -1;
- if (theOrder == atTop)
- aIndexAt = 0;
- else if (theOrder == atBeforeCurrent && myCombo->count() > 0)
- aIndexAt = myCombo->currentItem();
- else if (theOrder == atAfterCurrent &&
- myCombo->count() > 0 &&
- myCombo->currentItem() < myCombo->count()-1)
- aIndexAt = myCombo->currentItem() + 1;
- myCombo->insertItem(theValue, aIndexAt);
- }
- if (theSetCurrent)
- setText(theValue);
-}
-
-/*!
- Adds items in combo box, sets item theCurrent as current
-*/
-void SalomeApp_EntityEdit::insertList(const QStringList& theList,
- const int theCurrent)
-{
- if (myCombo)
- myCombo->insertList(theList);
- if (theCurrent >= 0 && theCurrent < (int)theList.count())
- setText(theList[theCurrent]);
-}
-
-/*!
- Adds item in combo box, sets it current if theSetCurrent is true
-*/
-void SalomeApp_EntityEdit::insertItem(const int theValue,
- bool theSetCurrent)
-{
- if (myCombo) {
- myCombo->insertItem(theValue);
- }
- if (theSetCurrent)
- setText(QString::number(theValue));
-}
-
-/*!
- Adds items in combo box, sets item theCurrent as current
-*/
-void SalomeApp_EntityEdit::insertList(const TColStd_ListOfInteger& theList,
- const int theCurrent)
-{
- if (myCombo)
- myCombo->insertList(theList);
-
- TColStd_ListIteratorOfListOfInteger aIter(theList);
- for (unsigned i = 0; aIter.More(); aIter.Next(), i++) {
- if (theCurrent == i) {
- setText(QString::number(aIter.Value()));
- break;
- }
- }
-}
-
-/*!
- Adds item in combo box, sets it current if theSetCurrent is true
-*/
-void SalomeApp_EntityEdit::insertItem(const double theValue,
- bool theSetCurrent)
-{
- if (myCombo) {
- myCombo->insertItem(theValue);
- }
- if (theSetCurrent)
- setText(QString::number(theValue));
-}
-
-/*!
- Adds items in combo box, sets item theCurrent as current
-*/
-void SalomeApp_EntityEdit::insertList(const TColStd_ListOfReal& theList,
- const int theCurrent)
-{
- if (myCombo)
- myCombo->insertList(theList);
-
- TColStd_ListIteratorOfListOfReal aIter(theList);
- for (unsigned i = 0; aIter.More(); aIter.Next(), i++) {
- if (theCurrent == i) {
- setText(QString::number(aIter.Value()));
- break;
- }
- }
-}
-
-/*!
- \return actual widget
-*/
-QWidget* SalomeApp_EntityEdit::getControl()
-{
- if (myEdit)
- return myEdit;
- else if (myCombo)
- return myCombo;
- else
- return 0;
-}
-
-/*!
- redirect focus to corresponding widget
-*/
-void SalomeApp_EntityEdit::setFocus()
-{
- if (myEdit) {
- myEdit->setFocus();
- //myEdit->selectAll();
- }
- else if (myCombo && myCombo->editable()) {
- myCombo->setFocus();
- //myCombo->lineEdit()->selectAll();
- }
-}
-
-/*!
- Sets validator for the control
-*/
-void SalomeApp_EntityEdit::setValidator(const QValidator* theValidator)
-{
- if (myEdit)
- myEdit->setValidator(theValidator);
- if (myCombo)
- myCombo->setValidator(theValidator);
-}
-
-/*!
- Event filter for KeyPress event
-*/
-void SalomeApp_EntityEdit::keyPressEvent( QKeyEvent * e)
-{
- if ( (e->key() == Key_Enter ||
- e->key() == Key_Return ) )
- onApply();
- else if (e->key() == Key_Escape)
- onCancel();
-}
-
-/*!
- Called when item activated in combo box
-*/
-void SalomeApp_EntityEdit::onComboActivated(const QString& theText)
-{
- onTextChanged(theText);
-}
-
-/*!
- Slot, called when text changed in line edit
-*/
-void SalomeApp_EntityEdit::onTextChanged(const QString& theText)
-{
- if (myApplyBtn)
- myApplyBtn->setEnabled(!(theText == myString));
- if (myCancelBtn)
- myCancelBtn->setEnabled(!(theText == myString));
-}
-
-/*!
- Slot, called when user presses Cancel button
-*/
-void SalomeApp_EntityEdit::onCancel()
-{
- setText(myString);
- if (myApplyBtn)
- myApplyBtn->setEnabled(false);
- if (myCancelBtn)
- myCancelBtn->setEnabled(false);
- emit escapePressed();
-}
-
-/*!
- Slot, called when user presses Apply button
-*/
-void SalomeApp_EntityEdit::onApply()
-{
- myString = getText();
- if (myApplyBtn)
- myApplyBtn->setEnabled(false);
- if (myCancelBtn)
- myCancelBtn->setEnabled(false);
- emit returnPressed();
-}
-
-/*!
- Shows/hides buttons
-*/
-void SalomeApp_EntityEdit::showButtons(bool show)
-{
- if (myApplyBtn)
- show ? myApplyBtn->show() : myApplyBtn->hide();
- if (myCancelBtn)
- show ? myCancelBtn->show() : myCancelBtn->hide();
-}
-
-/*!
- Enables/disables data duplication (for combo box)
-*/
-void SalomeApp_EntityEdit::setDuplicatesEnabled(bool enabled)
-{
- if (myCombo)
- myCombo->setDuplicatesEnabled(enabled);
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// SALOME SalomeApp
-//
-// File : SalomeApp_ListView.h
-// Author : Vadim SANDLER
-// Module : SALOME
-
-#ifndef SALOMEAPP_LISTVIEW_H
-#define SALOMEAPP_LISTVIEW_H
-
-#include <QtxListView.h>
-
-#include <qlist.h>
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-
-//VRV: porting on Qt 3.0.5
-#if QT_VERSION >= 0x030005
-#include <qtoolbutton.h>
-#endif
-//VRV: porting on Qt 3.0.5
-
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListOfReal.hxx>
-
-#include <SUIT_PopupClient.h>
-
-// enumeration for ListView updating mode
-enum UpdateType {
- utCancel = -1, // cancel updating
- utNone = 0, // needs no any update
- utUpdateItem, // update one item
- utUpdateParent, // update parent item too
- utUpdateViewer, // update all viewer
- utUpdateAll // strong update
-};
-
-class SalomeApp_ListViewItem;
-class SalomeApp_EntityEdit;
-
-/*!
- \class SalomeApp_ListView
- parent class for Data Viewer and Properties Viewer
-*/
-class SalomeApp_ListView : public QtxListView , public SUIT_PopupClient {
-
- Q_OBJECT
-
-public:
-// constructor
- SalomeApp_ListView(QWidget *parent);
-// destructor
- virtual ~SalomeApp_ListView();
-
-// updates list viewer
- virtual void updateViewer();
-// updtes currently selected item(s)
- virtual void updateSelected();
-
-// fills popup with items
- virtual QString popupClientType() const;
- virtual void contextMenuPopup( QPopupMenu* );
-
-// setting editing of items availbale/not available
- void enableEditing(bool theFlag);
-// says if editing is enabled
- bool isEnableEditing();
-// accepts user input by calling finishEditing(true)
- void accept();
-
-// clears view
- void clear();
-
-// event filter
- bool eventFilter(QObject* object, QEvent* event) ;
-
-// gets current tooltip for list view
-// returns valid rect in success
- QRect tip(QPoint aPos, QString& aText, QRect& dspRect, QFont& dspFnt) const;
-
-protected:
-// handler for resize event
- void resizeEvent(QResizeEvent* e);
-// handler for paint event
- void viewportPaintEvent(QPaintEvent* e);
-// finishes editing of entity
- virtual UpdateType finishEditing(bool ok);
-
-// returns true if mouse events are enabled
- bool isMouseEnabled();
-// enables/disables mouse events (excluding MouseMove)
- void enableMouse(bool enable);
-
-protected slots:
-// called when selection changed in list
- virtual void onSelectionChanged();
-// called when user finishes in editing of item
- void onEditOk();
-// called when user cancels item editing
- void onEditCancel();
-// called when columns sizes are changed
- void onHeaderSizeChange(int, int, int);
-
-protected:
- SalomeApp_EntityEdit* myEdit;
- SalomeApp_ListViewItem* myEditedItem;
- bool myEditingEnabled;
- bool myMouseEnabled;
-};
-
-
-class SalomeApp_EditBox: public QLineEdit
-{
- Q_OBJECT
-
-public:
- SalomeApp_EditBox(QWidget* parent);
-
-protected:
- void keyPressEvent(QKeyEvent* e);
-
-signals:
- void escapePressed();
-};
-
-class SalomeApp_ComboBox: public QComboBox
-{
- Q_OBJECT
-
-public:
- SalomeApp_ComboBox(bool rw, QWidget* parent = 0, const char* name = 0);
-
- int findItem(const QString& theText);
- void insertItem(const QString& theValue, int theIndex = -1);
- void insertList(const QStringList& theList);
- void insertItem(const int theValue);
- void insertList(const TColStd_ListOfInteger& theList);
- void insertItem(const double theValue);
- void insertList(const TColStd_ListOfReal& theList);
-};
-
-class SalomeApp_EntityEdit : public QWidget
-{
- Q_OBJECT
-
-public:
- // enum for edit control type
- enum {
- etLineEdit, // simple edit box
- etComboBox, // non-editable combo box
- etComboEdit // editable combo box
- };
- // enum for value type
- enum {
- vtString, // string
- vtInteger, // integer value
- vtDouble // double value
- };
- // enum for insertion order
- enum {
- atBottom,
- atTop,
- atBeforeCurrent,
- atAfterCurrent
- };
- // enum for edit box buttons (Apply = Cancel)
- enum {
- btApply = 0x0001,
- btCancel = 0x0002
- };
-
-public:
- SalomeApp_EntityEdit( QWidget* parent,
- int controlType = etLineEdit,
- int valueType = vtString,
- bool butApply = false,
- bool butCancel = false);
- ~SalomeApp_EntityEdit();
-
- void finishEditing();
- void clear();
- QString getText();
- void setText(const QString& theText );
- void insertItem( const QString& theValue,
- bool theSetCurrent = false,
- int theOrder = atBottom );
- void insertList( const QStringList& theList,
- const int theCurrent = -1 );
- void insertItem( const int theValue,
- bool theSetCurrent = false );
- void insertList( const TColStd_ListOfInteger& theList,
- const int theCurrent = -1 );
- void insertItem( const double theValue,
- bool theSetCurrent = false );
- void insertList( const TColStd_ListOfReal& theList,
- const int theCurrent = -1 );
- QWidget* getControl();
- void setFocus();
- void setValidator(const QValidator*);
- void showButtons(bool show);
- void setDuplicatesEnabled(bool enabled);
-
-protected:
- void keyPressEvent ( QKeyEvent * e);
-
-private slots:
- void onComboActivated(const QString&);
- void onTextChanged(const QString&);
- void onApply();
- void onCancel();
-signals:
- void returnPressed();
- void escapePressed();
-
-private:
- // Widgets
- SalomeApp_EditBox* myEdit;
- SalomeApp_ComboBox* myCombo;
- QToolButton* myApplyBtn;
- QToolButton* myCancelBtn;
- QString myString;
-};
-
-class SalomeApp_ListViewItem : public QListViewItem
-{
-public:
- SalomeApp_ListViewItem( SalomeApp_ListView* );
- SalomeApp_ListViewItem( SalomeApp_ListView*,
- SalomeApp_ListViewItem* );
- SalomeApp_ListViewItem( SalomeApp_ListView*,
- const QString&,
- const bool = false );
- SalomeApp_ListViewItem( SalomeApp_ListView*,
- const QString& theName,
- const QString& theValue,
- const bool = false );
- SalomeApp_ListViewItem( SalomeApp_ListViewItem* theParent,
- const QString&,
- const bool = false );
- SalomeApp_ListViewItem( SalomeApp_ListView*,
- SalomeApp_ListViewItem*,
- const QString&,
- const bool = false );
- SalomeApp_ListViewItem( SalomeApp_ListViewItem*,
- SalomeApp_ListViewItem*,
- const QString&,
- const bool = false);
- SalomeApp_ListViewItem( SalomeApp_ListViewItem*,
- const QString& theName,
- const QString& theValue,
- const bool = false);
- SalomeApp_ListViewItem( SalomeApp_ListView*,
- SalomeApp_ListViewItem*,
- const QString& theName,
- const QString& theValue,
- const bool = false);
- SalomeApp_ListViewItem( SalomeApp_ListViewItem*,
- SalomeApp_ListViewItem*,
- const QString&,
- const QString&,
- const bool = false);
- ~SalomeApp_ListViewItem();
-
- QString fullName();
- void openAllLevels();
- virtual void updateAllLevels();
- bool isEditable() const;
- void setEditable(bool theEditable);
-
- // returns true if entitiy is accepted after editing
- bool isAccepted() const;
- // set entity accepted or not after editing
- void setAccepted(bool theAccepted);
-
- // returns name of entity (as default it is text in first column)
- virtual QString getName() const;
- // sets name of entity (as default it is text in first column)
- virtual UpdateType setName(const QString& theName);
-
- // returns value of entity (as default it is text in second column)
- virtual QString getValue() const;
- // sets value of entity (as default it is text in second column)
- virtual UpdateType setValue(const QString& theValue);
-
- // creates control for editing and fills it with values
- SalomeApp_EntityEdit* startEditing();
- // fills widget with initial values (list or single value)
- virtual void fillWidgetWithValues(SalomeApp_EntityEdit* theWidget);
- // finishes editing of entity
- virtual UpdateType finishEditing(SalomeApp_EntityEdit* theWidget);
-
- // returns type of edit control (0 - edit box, 1 - combo box, 2 - editable combo box)
- virtual int getEditingType();
- // sets type of edit control (0 - edit box, 1 - combo box, 2 - editable combo box)
- virtual void setEditingType(const int);
- // returns edited column
- virtual int getEditedColumn();
- // returns type of edited value (string, int, double)
- virtual int getValueType();
- // sets type of edited value (string, int, double)
- virtual void setValueType(const int);
-
- // gets user type
- virtual int getUserType();
- // sets user type
- virtual void setUserType(const int);
-
- // returns buttons for editing widget
- virtual int getButtons();
- // sets buttons for editing widget
- virtual void setButtons(const int);
- // returns text for tooltip
- QString tipText();
- // calculates rectangle which should contain items tip
- QRect tipRect();
- // calculates rect of item text in viewport coordinates
- QRect textRect(const int column) const;
- // calculates full rect of item data in viewport coordinates
- QRect itemRect(const int column) const;
-
-protected:
- // initialization
- void init();
-
-private:
- bool myEditable;
- bool myAccepted;
- int myEditingType;
- int myValueType;
- int myButtons;
- int myUserType; // user are welcome to put additional data here and use it in fillWidgetWithValues()
-};
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SalomeApp_Module.cxx
-// Created: 10/25/2004 11:39:56 AM
-// Author: Sergey LITONIN
-// Copyright (C) CEA 2004
-
-#include "SalomeApp_Module.h"
-#include "SalomeApp_DataModel.h"
-#include "SalomeApp_Application.h"
-#include "SalomeApp_Study.h"
-
-#include "LightApp_Selection.h"
-#include "LightApp_Operation.h"
-#include "LightApp_Preferences.h"
-//#include "LightApp_Displayer.h"
-
-#include "CAM_DataModel.h"
-
-#include "OB_Browser.h"
-
-#include <SALOME_ListIO.hxx>
-#include <SALOME_ListIteratorOfListIO.hxx>
-#include <SALOME_InteractiveObject.hxx>
-//#include <SALOME_Actor.h>
-
-#include <SUIT_Session.h>
-#include <SUIT_ViewModel.h>
-
-#include <SVTK_ViewWindow.h>
-//#include <SVTK_ViewModel.h>
-//#include <SVTK_MainWindow.h>
-//#include <SVTK_RenderWindowInteractor.h>
-
-#include <qstring.h>
-#include <qmap.h>
-
-//#include <vtkActorCollection.h>
-//#include <vtkRenderer.h>
-
-/*!Constructor.*/
-SalomeApp_Module::SalomeApp_Module( const QString& name )
-: LightApp_Module( name )
-{
-}
-
-/*!Destructor.*/
-SalomeApp_Module::~SalomeApp_Module()
-{
-}
-
-/*!Gets application.*/
-SalomeApp_Application* SalomeApp_Module::getApp() const
-{
- return (SalomeApp_Application*)application();
-}
-
-/*!Create new instance of data model and return it.*/
-CAM_DataModel* SalomeApp_Module::createDataModel()
-{
- return new SalomeApp_DataModel(this);
-}
-
-/*!Create and return instance of LightApp_Selection.*/
-LightApp_Selection* SalomeApp_Module::createSelection() const
-{
- return LightApp_Module::createSelection();
-}
-
-/*!
- Converts objects-containers to list of objects, those are contained
- Other objects must be added without conversion
- \param source - source list of objects
- \param dest - list of converted objects
-*/
-void SalomeApp_Module::extractContainers( const SALOME_ListIO& source, SALOME_ListIO& dest ) const
-{
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
- if( !study )
- {
- dest = source;
- return;
- }
-
- SALOME_ListIteratorOfListIO anIt( source );
- for( ; anIt.More(); anIt.Next() )
- {
- Handle( SALOME_InteractiveObject ) obj = anIt.Value();
- if( obj->hasEntry() )
- {
- _PTR(SObject) SO = study->studyDS()->FindObjectID( obj->getEntry() );
- if( SO && QString( SO->GetID().c_str() ) == SO->GetFatherComponent()->GetID().c_str() )
- { //component is selected
- _PTR(SComponent) SC( SO->GetFatherComponent() );
- _PTR(ChildIterator) anIter ( study->studyDS()->NewChildIterator( SC ) );
- anIter->InitEx( true );
- while( anIter->More() )
- {
- _PTR(SObject) valSO ( anIter->Value() );
- _PTR(SObject) refSO;
- if( !valSO->ReferencedObject( refSO ) )
- {
- QString id = valSO->GetID().c_str(),
- comp = SC->ComponentDataType().c_str(),
- val = valSO->GetName().c_str();
-
- Handle( SALOME_InteractiveObject ) new_obj =
- new SALOME_InteractiveObject( id.latin1(), comp.latin1(), val.latin1() );
- dest.Append( new_obj );
- }
- anIter->Next();
- }
- continue;
- }
- }
- dest.Append( obj );
- }
-}
-
-/*!
- * \brief Virtual public
- *
- * This method is called just before the study document is saved, so the module has a possibility
- * to store visual parameters in AttributeParameter attribue(s)
- */
-void SalomeApp_Module::storeVisualParameters(int savePoint)
-{
-}
-
-/*!
- * \brief Virtual public
- *
- * This method is called after the study document is opened, so the module has a possibility to restore
- * visual parameters
- */
-void SalomeApp_Module::restoreVisualParameters(int savePoint)
-{
-}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SalomeApp_Module.h
-// Created: 10/25/2004 11:33:06 AM
-// Author: Sergey LITONIN
-// Copyright (C) CEA 2004
-
-#ifndef SALOMEAPP_MODULE_H
-#define SALOMEAPP_MODULE_H
-
-#include "SalomeApp.h"
-
-#include <LightApp_Module.h>
-
-class CAM_DataModel;
-class SalomeApp_Application;
-class LightApp_Operation;
-class LightApp_Selection;
-class SALOME_ListIO;
-class QString;
-
-/*!
- * \brief Base class for all salome modules
-*/
-class SALOMEAPP_EXPORT SalomeApp_Module : public LightApp_Module
-{
- Q_OBJECT
-
-public:
- SalomeApp_Module( const QString& );
- virtual ~SalomeApp_Module();
-
- /*! engineIOR() should be a pure virtual method, to avoid logical errors!\n
- * Implementation in derived classes can return the following values:\n
- * module`s engine IOR - means that this is a standard SALOME module with a CORBA engine
- * \li "" (empty string) - means that this not correct SALOME module
- */
- virtual QString engineIOR() const = 0;
-
- /*! Convenient shortcuts*/
-
- SalomeApp_Application* getApp() const;
-
- virtual void storeVisualParameters(int savePoint);
- virtual void restoreVisualParameters(int savePoint);
- virtual LightApp_Selection* createSelection() const;
-
-protected:
- virtual CAM_DataModel* createDataModel();
- virtual void extractContainers( const SALOME_ListIO&, SALOME_ListIO& ) const;
-};
-
-#endif
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SalomeApp_PyInterp.cxx
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#include "SalomeApp_PyInterp.h"
-
-#include <utilities.h>
-#include <Container_init_python.hxx>
-
-#include <string>
-#include <vector>
-
-#include "PyInterp_base.h" // this include must be first (see PyInterp_base.h)!
-
-#include <cStringIO.h>
-using namespace std;
-
-/*!
- * constructor : multi Python interpreter, one per SALOME study.
- * calls initialize method defined in base class, which calls virtual methods
- * initstate & initcontext redefined here.
- */
-SalomeApp_PyInterp::SalomeApp_PyInterp(): PythonConsole_PyInterp()
-{
-}
-
-/*!
- * Destructor.
- */
-SalomeApp_PyInterp::~SalomeApp_PyInterp()
-{
-}
-
-/*!\class SalomeApp_PyInterp
- * EDF-CCAR
- * When SALOME uses multi Python interpreter feature,
- * Every study has its own interpreter and thread state (_tstate = Py_NewInterpreter())
- * This is fine because every study has its own modules (sys.modules) stdout and stderr
- * BUT some Python modules must be imported only once. In multi interpreter context Python
- * modules (*.py) are imported several times.
- * The pyqt module must be imported only once because it registers classes in a C module.
- * It's quite the same with omniorb modules (internals and generated with omniidl)
- * This problem is handled with "shared modules" defined in salome_shared_modules.py
- * These "shared modules" are imported only once and only copied in all the other interpreters
- * BUT it's not the only problem. Every interpreter has its own __builtin__ module. That's fine
- * but if we have copied some modules and imported others problems may arise with operations that
- * are not allowed in restricted execution environment. So we must impose that all interpreters
- * have identical __builtin__ module.
- * That's all, for the moment ...
- */
-
-
-bool SalomeApp_PyInterp::initContext()
-{
- /*!
- * The GIL is assumed to be held
- * It is the caller responsability caller to acquire the GIL
- * It will still be held on initContext output
- */
- if ( !PythonConsole_PyInterp::initContext() )
- return false;
-
- // Import special module to change the import mechanism
- PyObjWrapper m1( PyImport_ImportModule( "import_hook" ) );
- if ( !m1 )
- {
- MESSAGE( "initContext: problem with import_hook import" );
- PyErr_Print();
- ASSERT( 0 );
- return false;
- }
-
- // Call init_shared_modules to initialize the shared import mechanism for modules
- //that must not be imported twice
- PyObjWrapper m2( PyObject_CallMethod( m1, "init_shared_modules", "O", KERNEL_PYTHON::salome_shared_modules_module ) );
- if ( !m2 )
- {
- MESSAGE( "initContext: problem with init_shared_modules call" );
- PyErr_Print();
- ASSERT( 0 );
- return false;
- }
-
- return true;
-}
-
-/*!
- Do nothing
- The initialization has been done in main
- */
-void SalomeApp_PyInterp::init_python()
-{
- MESSAGE("PyInterp_base::init_python");
- ASSERT(KERNEL_PYTHON::_gtstate); // initialisation in main
- SCRUTE(KERNEL_PYTHON::_gtstate);
- _gtstate=KERNEL_PYTHON::_gtstate;
- _interp=KERNEL_PYTHON::_interp;
-}
-
+++ /dev/null
-// SALOME SALOMEGUI : implementation of desktop and GUI kernel
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SalomeApp_PyInterp.h
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#ifndef _SalomeApp_PYINTERP_H_
-#define _SalomeApp_PYINTERP_H_
-
-#include <PythonConsole_PyInterp.h> // this include must be first (see PyInterp_base.h)!
-
-class SalomeApp_PyInterp : public PythonConsole_PyInterp
-{
-public:
- SalomeApp_PyInterp();
- virtual ~SalomeApp_PyInterp();
-
- virtual void init_python();
-
-protected:
- virtual bool initContext();
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SalomeApp_Study.h"
-
-#include "SalomeApp_Module.h"
-#include "SalomeApp_DataModel.h"
-#include "SalomeApp_DataObject.h"
-#include "SalomeApp_Application.h"
-#include "SalomeApp_Engine_i.hxx"
-#include "SalomeApp_VisualState.h"
-
-#include "LightApp_RootObject.h"
-
-#include <OB_Browser.h>
-
-#include <SUIT_ResourceMgr.h>
-
-#include <qptrlist.h>
-#include <qapplication.h>
-#include <qdict.h>
-
-#include "utilities.h"
-#include <iostream>
-#include <string>
-#include <vector>
-
-#include <SUIT_Session.h>
-
-#include "SALOMEDS_Tool.hxx"
-
-#include "SALOMEDSClient_ClientFactory.hxx"
-#include "SALOMEDSClient_IParameters.hxx"
-
-#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(SALOME_Exception)
-
-using namespace std;
-
-/*!
- Constructor.
-*/
-SalomeApp_Study::SalomeApp_Study( SUIT_Application* app )
-: LightApp_Study( app )
-{
-}
-
-/*!
- Destructor.
-*/
-SalomeApp_Study::~SalomeApp_Study()
-{
-}
-
-/*!
- Gets study id.
-*/
-int SalomeApp_Study::id() const
-{
- int id = -1;
- if ( myStudyDS )
- id = studyDS()->StudyId();
- return id;
-}
-
-/*!
- Gets studyDS pointer.
-*/
-_PTR(Study) SalomeApp_Study::studyDS() const
-{
- return myStudyDS;
-}
-
-/*!
- Create document.
-*/
-void SalomeApp_Study::createDocument()
-{
- MESSAGE( "openDocument" );
-
- // initialize myStudyDS, read HDF file
- QString aName = newStudyName();
- _PTR(Study) study ( SalomeApp_Application::studyMgr()->NewStudy( aName.latin1() ) );
- if ( !study )
- return;
-
- setStudyDS( study );
- setStudyName( aName );
-
- // create myRoot
- setRoot( new LightApp_RootObject( this ) );
-
- CAM_Study::createDocument();
- emit created( this );
-}
-
-/*!
- Opens document
- \param theFileName - name of file
-*/
-bool SalomeApp_Study::openDocument( const QString& theFileName )
-{
- MESSAGE( "openDocument" );
-
- // initialize myStudyDS, read HDF file
- _PTR(Study) study ( SalomeApp_Application::studyMgr()->Open( (char*) theFileName.latin1() ) );
- if ( !study )
- return false;
-
- setStudyDS( study );
-
- setRoot( new LightApp_RootObject( this ) ); // create myRoot
-
- // update loaded data models: call open() and update() on them.
- ModelList dm_s;
- dataModels( dm_s );
- for ( ModelListIterator it( dm_s ); it.current(); ++it )
- openDataModel( studyName(), it.current() );
-
- // this will build a SUIT_DataObject-s tree under myRoot member field
- // passing "false" in order NOT to rebuild existing data models' trees - it was done in previous step
- // but tree that corresponds to not-loaded data models will be updated any way.
- ((SalomeApp_Application*)application())->updateObjectBrowser( false );
-
- bool res = CAM_Study::openDocument( theFileName );
-
- emit opened( this );
- study->IsSaved(true);
-
- bool restore = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
- if ( restore ) {
- std::vector<int> savePoints = getSavePoints();
- if ( savePoints.size() > 0 )
- SalomeApp_VisualState( (SalomeApp_Application*)application() ).restoreState( savePoints[savePoints.size()-1] );
- }
-
- return res;
-}
-
-/*!
- Connects GUI study to SALOMEDS one already loaded into StudyManager
- \param theStudyName - name of study
-*/
-bool SalomeApp_Study::loadDocument( const QString& theStudyName )
-{
- MESSAGE( "loadDocument" );
-
- // obtain myStudyDS from StudyManager
- _PTR(Study) study ( SalomeApp_Application::studyMgr()->GetStudyByName( (char*) theStudyName.latin1() ) );
- if ( !study )
- return false;
-
- setStudyDS( study );
-
- setRoot( new LightApp_RootObject( this ) ); // create myRoot
-
- //SRN: BugID IPAL9021, put there the same code as in a method openDocument
-
- // update loaded data models: call open() and update() on them.
- ModelList dm_s;
- dataModels( dm_s );
-
- for ( ModelListIterator it( dm_s ); it.current(); ++it )
- openDataModel( studyName(), it.current() );
-
- // this will build a SUIT_DataObject-s tree under myRoot member field
- // passing "false" in order NOT to rebuild existing data models' trees - it was done in previous step
- // but tree that corresponds to not-loaded data models will be updated any way.
- ((SalomeApp_Application*)application())->updateObjectBrowser( false );
-
- bool res = CAM_Study::openDocument( theStudyName );
- emit opened( this );
-
- bool restore = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
- if ( restore ) {
- std::vector<int> savePoints = getSavePoints();
- if ( savePoints.size() > 0 )
- SalomeApp_VisualState( (SalomeApp_Application*)application() ).restoreState( savePoints[savePoints.size()-1] );
- }
-
- //SRN: BugID IPAL9021: End
-
- return res;
-}
-
-/*!
- Saves document
- \param theFileName - name of file
-*/
-bool SalomeApp_Study::saveDocumentAs( const QString& theFileName )
-{
- bool store = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", false );
- if ( store )
- SalomeApp_VisualState( (SalomeApp_Application*)application() ).storeState();
-
- ModelList list; dataModels( list );
-
- SalomeApp_DataModel* aModel = (SalomeApp_DataModel*)list.first();
- QStringList listOfFiles;
- for ( ; aModel; aModel = (SalomeApp_DataModel*)list.next() ) {
- listOfFiles.clear();
- aModel->saveAs( theFileName, this, listOfFiles );
- if ( !listOfFiles.isEmpty() )
- saveModuleData(aModel->module()->name(), listOfFiles);
- }
-
- // save SALOMEDS document
- SUIT_ResourceMgr* resMgr = application()->resourceMgr();
- if( !resMgr )
- return false;
-
- bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false );
- bool isAscii = resMgr->booleanValue( "Study", "ascii_file", false );
- bool res = (isAscii ?
- SalomeApp_Application::studyMgr()->SaveAsASCII( theFileName.latin1(), studyDS(), isMultiFile ) :
- SalomeApp_Application::studyMgr()->SaveAs ( theFileName.latin1(), studyDS(), isMultiFile ))
- && CAM_Study::saveDocumentAs( theFileName );
-
- res = res && saveStudyData(theFileName);
-
- if ( res )
- emit saved( this );
-
- return res;
-}
-
-/*!
- Saves previously opened document
-*/
-bool SalomeApp_Study::saveDocument()
-{
- bool store = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
- if ( store )
- SalomeApp_VisualState( (SalomeApp_Application*)application() ).storeState();
-
- ModelList list; dataModels( list );
-
- SalomeApp_DataModel* aModel = (SalomeApp_DataModel*)list.first();
- QStringList listOfFiles;
- for ( ; aModel; aModel = (SalomeApp_DataModel*)list.next() ) {
- listOfFiles.clear();
- aModel->save(listOfFiles);
- if ( !listOfFiles.isEmpty() )
- saveModuleData(aModel->module()->name(), listOfFiles);
- }
-
- // save SALOMEDS document
- SUIT_ResourceMgr* resMgr = application()->resourceMgr();
- if( !resMgr )
- return false;
-
- bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false );
- bool isAscii = resMgr->booleanValue( "Study", "ascii_file", false );
- bool res = (isAscii ?
- SalomeApp_Application::studyMgr()->SaveASCII( studyDS(), isMultiFile ) :
- SalomeApp_Application::studyMgr()->Save ( studyDS(), isMultiFile )) && CAM_Study::saveDocument();
-
- res = res && saveStudyData(studyName());
- if ( res )
- emit saved( this );
-
- return res;
-}
-
-/*!
- Closes document
-*/
-void SalomeApp_Study::closeDocument(bool permanently)
-{
- LightApp_Study::closeDocument(permanently);
-
- // close SALOMEDS document
- _PTR(Study) studyPtr = studyDS();
- if ( studyPtr )
- {
- if(permanently) {
- SalomeApp_Application::studyMgr()->Close( studyPtr );
- }
- SALOMEDSClient_Study* aStudy = 0;
- setStudyDS( _PTR(Study)(aStudy) );
- }
-}
-
-/*!
- \return true, if study is modified in comparison with last open/save
-*/
-bool SalomeApp_Study::isModified() const
-{
- bool isAnyChanged = studyDS() && studyDS()->IsModified();
- if (!isAnyChanged)
- isAnyChanged = LightApp_Study::isModified();
-
- return isAnyChanged;
-}
-
-/*!
- Set study modified to \a on.
- */
-void SalomeApp_Study::Modified()
-{
- if(_PTR(Study) aStudy = studyDS())
- aStudy->Modified();
- LightApp_Study::Modified();
-}
-
-/*!
- \return if data model is saved
-*/
-bool SalomeApp_Study::isSaved() const
-{
- bool isAllSaved = studyDS() && studyDS()->GetPersistentReference().size();
- if (!isAllSaved)
- isAllSaved = LightApp_Study::isSaved();
-
- return isAllSaved;
-}
-
-/*!
- Saves data of module
- \param theModuleName - name of module
- \param theListOfFiles - list of files to be saved
-*/
-void SalomeApp_Study::saveModuleData( QString theModuleName, QStringList theListOfFiles )
-{
- int aNb = theListOfFiles.count();
- if ( aNb == 0 )
- return;
-
- std::vector<std::string> aListOfFiles ( aNb );
- int anIndex = 0;
- for ( QStringList::Iterator it = theListOfFiles.begin(); it != theListOfFiles.end(); ++it ) {
- if ( (*it).isEmpty() )
- continue;
- aListOfFiles[anIndex] = (*it).latin1();
- anIndex++;
- }
- SetListOfFiles(theModuleName, aListOfFiles);
-}
-
-/*!
- Loads data of module
- \param theModuleName - name of module
- \param theListOfFiles - list of files to be loaded
-*/
-void SalomeApp_Study::openModuleData( QString theModuleName, QStringList& theListOfFiles )
-{
- std::vector<std::string> aListOfFiles = GetListOfFiles( theModuleName );
-
- int i, aLength = aListOfFiles.size() - 1;
- if ( aLength < 0 )
- return;
-
- //Get a temporary directory for saved a file
- theListOfFiles.append(aListOfFiles[0].c_str());
-
- for(i = 0; i < aLength; i++)
- theListOfFiles.append(aListOfFiles[i+1].c_str());
-}
-
-/*!
- Saves data from study
-*/
-bool SalomeApp_Study::saveStudyData( const QString& theFileName )
-{
- ModelList list; dataModels( list );
- SalomeApp_DataModel* aModel = (SalomeApp_DataModel*)list.first();
- std::vector<std::string> listOfFiles(0);
- for ( ; aModel; aModel = (SalomeApp_DataModel*)list.next() )
- SetListOfFiles(aModel->module()->name(), listOfFiles);
- return true;
-}
-
-/*!
- Loads data for study
-*/
-bool SalomeApp_Study::openStudyData( const QString& theFileName )
-{
- return true;
-}
-
-/*!
- Set studyDS.
-*/
-void SalomeApp_Study::setStudyDS( const _PTR(Study)& s )
-{
- myStudyDS = s;
-}
-
-/*!
- Insert data model.
-*/
-void SalomeApp_Study::dataModelInserted (const CAM_DataModel* dm)
-{
- MESSAGE("SalomeApp_Study::dataModelInserted() : module name() = " << dm->module()->name());
-
- CAM_Study::dataModelInserted(dm);
-
- // addComponent(dm);
-}
-
-/*!
- Create SComponent for module, using default engine (CORBAless)
-*/
-void SalomeApp_Study::addComponent(const CAM_DataModel* dm)
-{
- SalomeApp_Module* aModule = dynamic_cast<SalomeApp_Module*>( dm->module() );
- // 1. aModule == 0 means that this is a light module (no CORBA enigine)
- if (!aModule) {
- // Check SComponent existance
- _PTR(Study) aStudy = studyDS();
- if (!aStudy)
- return;
- _PTR(SComponent) aComp = aStudy->FindComponent(dm->module()->name());
- if (!aComp) {
- // Create SComponent
- _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
- aComp = aBuilder->NewComponent(dm->module()->name());
- aBuilder->SetName(aComp, dm->module()->moduleName().latin1());
- QString anIconName = dm->module()->iconName();
- if (!anIconName.isEmpty()) {
- _PTR(AttributePixMap) anAttr = aBuilder->FindOrCreateAttribute(aComp, "AttributePixMap");
- if (anAttr)
- anAttr->SetPixMap(anIconName.latin1());
- }
- // Set default engine IOR
- aBuilder->DefineComponentInstance(aComp, SalomeApp_Application::defaultEngineIOR().latin1());
- //SalomeApp_DataModel::BuildTree( aComp, root(), this, /*skipExisitng=*/true );
- SalomeApp_DataModel::synchronize( aComp, this );
- }
- }
-}
-
-/*!
- Open data model
-*/
-bool SalomeApp_Study::openDataModel( const QString& studyName, CAM_DataModel* dm )
-{
- if (!dm)
- return false;
-
- // SalomeApp_DataModel* aDM = (SalomeApp_DataModel*)(dm);
- SalomeApp_Module* aModule = dynamic_cast<SalomeApp_Module*>( dm->module() );
- _PTR(Study) aStudy = studyDS(); // shared_ptr cannot be used here
- _PTR(SComponent) aSComp;
- QString anEngine;
- // 1. aModule == 0 means that this is a light module (no CORBA enigine)
- if (!aModule) {
- anEngine = SalomeApp_Application::defaultEngineIOR();
- aSComp = aStudy->FindComponent(dm->module()->name());
- }
- else {
- SalomeApp_DataModel* aDM = dynamic_cast<SalomeApp_DataModel*>( dm );
- if ( aDM ) {
- QString anId = aDM->getRootEntry( this );
- if ( anId.isEmpty() )
- return true; // Probably nothing to load
- anEngine = aDM->getModule()->engineIOR();
- if ( anEngine.isEmpty() )
- return false;
- aSComp = aStudy->FindComponentID( std::string( anId.latin1() ) );
- }
- }
- if ( aSComp ) {
- _PTR(StudyBuilder) aBuilder( aStudy->NewBuilder() );
- if ( aBuilder ) {
- try {
- aBuilder->LoadWith( aSComp, std::string( anEngine.latin1() ) );
- }
- catch( const SALOME::SALOME_Exception& ) {
- // Oops, something went wrong while loading -> return an error
- return false;
- }
- // Something has been read -> create data model tree
- //SalomeApp_DataModel* aDM = dynamic_cast<SalomeApp_DataModel*>( dm );
- // aDM->buildTree( aSComp, 0, this );
- }
- } else {
- // Don't return false here, for there might be no data
- // for a given component in the study yet
- }
- QStringList listOfFiles;
- openModuleData(dm->module()->name(), listOfFiles);
- if (dm && dm->open(studyName, this, listOfFiles)) {
- // Remove the files and temporary directory, created
- // for this module by LightApp_Engine_i::Load()
- bool isMultiFile = false; // TODO: decide, how to access this parameter
- RemoveTemporaryFiles( dm->module()->name(), isMultiFile );
-
- // Something has been read -> create data model tree
- LightApp_DataModel* aDM = dynamic_cast<LightApp_DataModel*>( dm );
- if ( aDM )
- aDM->update(NULL, this);
- return true;
- }
- return false;
-}
-
-/*!
- Create new study name.
-*/
-QString SalomeApp_Study::newStudyName() const
-{
- std::vector<std::string> studies = SalomeApp_Application::studyMgr()->GetOpenStudies();
- QString prefix( "Study%1" ), newName, curName;
- int i = 1, j, n = studies.size();
- while ( newName.isEmpty() ){
- curName = prefix.arg( i );
- for ( j = 0 ; j < n; j++ ){
- if ( !strcmp( studies[j].c_str(), curName.latin1() ) )
- break;
- }
- if ( j == n )
- newName = curName;
- else
- i++;
- }
- return newName;
-}
-
-/*!
- \return list of files used by module: to be used by CORBAless modules
- \param theModuleName - name of module
-*/
-std::vector<std::string> SalomeApp_Study::GetListOfFiles( const char* theModuleName ) const
-{
- SalomeApp_Engine_i* aDefaultEngine = SalomeApp_Engine_i::GetInstance();
- if (aDefaultEngine)
- return aDefaultEngine->GetListOfFiles(id(), theModuleName);
-
- std::vector<std::string> aListOfFiles;
- return aListOfFiles;
-}
-
-/*!
- Sets list of files used by module: to be used by CORBAless modules
- \param theModuleName - name of module
- \param theListOfFiles - list of files
-*/
-void SalomeApp_Study::SetListOfFiles ( const char* theModuleName,
- const std::vector<std::string> theListOfFiles )
-{
- SalomeApp_Engine_i* aDefaultEngine = SalomeApp_Engine_i::GetInstance();
- if (aDefaultEngine)
- aDefaultEngine->SetListOfFiles(theListOfFiles, id(), theModuleName);
-}
-
-/*!
- \return temporary directory for saving files of modules
-*/
-std::string SalomeApp_Study::GetTmpDir ( const char* theURL, const bool isMultiFile )
-{
- std::string anURLDir = SALOMEDS_Tool::GetDirFromPath(theURL);
- std::string aTmpDir = isMultiFile ? anURLDir : SALOMEDS_Tool::GetTmpDir();
- return aTmpDir;
-}
-
-/*!
- Removes temporary files
-*/
-void SalomeApp_Study::RemoveTemporaryFiles ( const char* theModuleName, const bool isMultiFile ) const
-{
- if (isMultiFile)
- return;
-
- std::vector<std::string> aListOfFiles = GetListOfFiles( theModuleName );
- if (aListOfFiles.size() > 0) {
- std::string aTmpDir = aListOfFiles[0];
-
- const int n = aListOfFiles.size() - 1;
- SALOMEDS::ListOfFileNames_var aSeq = new SALOMEDS::ListOfFileNames;
- aSeq->length(n);
- for (int i = 0; i < n; i++)
- aSeq[i] = CORBA::string_dup(aListOfFiles[i + 1].c_str());
-
- SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true);
- }
-}
-
-/*!
- Deletes all references to object
- \param obj - object
-*/
-void SalomeApp_Study::deleteReferencesTo( _PTR( SObject ) obj )
-{
- _PTR(StudyBuilder) sb = studyDS()->NewBuilder();
- std::vector<_PTR(SObject)> aRefs = studyDS()->FindDependances( obj );
- for( int i=0, n=aRefs.size(); i<n; i++ )
- {
- _PTR( SObject ) o = aRefs[i];
- if( o->GetFatherComponent()->ComponentDataType()==obj->GetFatherComponent()->ComponentDataType() )
- {
- sb->RemoveReference( o );
- sb->RemoveObjectWithChildren( o );
- }
- }
-}
-
-/*!
- \return real entry by entry of reference
- \param entry - entry of reference object
-*/
-QString SalomeApp_Study::referencedToEntry( const QString& entry ) const
-{
- _PTR(SObject) obj = studyDS()->FindObjectID( entry.latin1() );
- _PTR(SObject) refobj;
-
- if( obj && obj->ReferencedObject( refobj ) )
- return refobj->GetID().c_str();
- return LightApp_Study::referencedToEntry( entry );
-}
-
-/*!
- \return component data type for entry
-*/
-QString SalomeApp_Study::componentDataType( const QString& entry ) const
-{
- _PTR(SObject) obj( studyDS()->FindObjectID( entry.latin1() ) );
- if ( !obj )
- return LightApp_Study::componentDataType( entry );
- return obj->GetFatherComponent()->ComponentDataType().c_str();
-}
-
-/*!
- \return true if entry corresponds to component
-*/
-bool SalomeApp_Study::isComponent( const QString& entry ) const
-{
- _PTR(SObject) obj( studyDS()->FindObjectID( entry.latin1() ) );
- return obj && QString( obj->GetID().c_str() ) == obj->GetFatherComponent()->GetID().c_str();
-}
-
-/*!
- \return entries of object children
-*/
-void SalomeApp_Study::children( const QString& entry, QStringList& child_entries ) const
-{
- _PTR(SObject) SO = studyDS()->FindObjectID( entry.latin1() );
- _PTR(ChildIterator) anIter ( studyDS()->NewChildIterator( SO ) );
- anIter->InitEx( true );
- while( anIter->More() )
- {
- _PTR(SObject) val( anIter->Value() );
- child_entries.append( val->GetID().c_str() );
- anIter->Next();
- }
-}
-
-/*!
- Fills list with components names
- \param comp - list to be filled
-*/
-void SalomeApp_Study::components( QStringList& comps ) const
-{
- for( _PTR(SComponentIterator) it ( studyDS()->NewComponentIterator() ); it->More(); it->Next() )
- {
- _PTR(SComponent) aComponent ( it->Value() );
- if( aComponent && aComponent->ComponentDataType() == "Interface Applicative" )
- continue; // skip the magic "Interface Applicative" component
- comps.append( aComponent->ComponentDataType().c_str() );
- }
-}
-
-/*!
- \return a list of saved points' IDs
-*/
-std::vector<int> SalomeApp_Study::getSavePoints()
-{
- std::vector<int> v;
-
- _PTR(SObject) so = studyDS()->FindComponent("Interface Applicative");
- if(!so) return v;
-
- _PTR(StudyBuilder) builder = studyDS()->NewBuilder();
- _PTR(ChildIterator) anIter ( studyDS()->NewChildIterator( so ) );
- for(; anIter->More(); anIter->Next())
- {
- _PTR(SObject) val( anIter->Value() );
- _PTR(GenericAttribute) genAttr;
- if(builder->FindAttribute(val, genAttr, "AttributeParameter")) v.push_back(val->Tag());
- }
-
- return v;
-}
-
-/*!
- Removes a given save point
-*/
-void SalomeApp_Study::removeSavePoint(int savePoint)
-{
- if(savePoint <= 0) return;
- _PTR(AttributeParameter) AP = studyDS()->GetCommonParameters(getVisualComponentName(), savePoint);
- _PTR(SObject) so = AP->GetSObject();
- _PTR(StudyBuilder) builder = studyDS()->NewBuilder();
- builder->RemoveObjectWithChildren(so);
-}
-
-/*!
- \return a name of save point
-*/
-QString SalomeApp_Study::getNameOfSavePoint(int savePoint)
-{
- _PTR(AttributeParameter) AP = studyDS()->GetCommonParameters(getVisualComponentName(), savePoint);
- _PTR(IParameters) ip = ClientFactory::getIParameters(AP);
- return ip->getProperty("AP_SAVEPOINT_NAME").c_str();
-}
-
-/*!
- Sets a name of save point
-*/
-void SalomeApp_Study::setNameOfSavePoint(int savePoint, const QString& nameOfSavePoint)
-{
- _PTR(AttributeParameter) AP = studyDS()->GetCommonParameters(getVisualComponentName(), savePoint);
- _PTR(IParameters) ip = ClientFactory::getIParameters(AP);
- ip->setProperty("AP_SAVEPOINT_NAME", nameOfSavePoint.latin1());
-}
-
-/*!
- \return a name of the component where visual parameters are stored
-*/
-std::string SalomeApp_Study::getVisualComponentName()
-{
- return "Interface Applicative";
-}
-
-/*!
- * \brief Restores the study state
- */
-void SalomeApp_Study::restoreState(int savePoint)
-{
- SalomeApp_VisualState((SalomeApp_Application*)application()).restoreState(savePoint);
-}
-
-
-/*!
- Slot: called on change of a root of a data model. Redefined from CAM_Study
-*/
-void SalomeApp_Study::updateModelRoot( const CAM_DataModel* dm )
-{
- LightApp_Study::updateModelRoot( dm );
-
- // calling updateSavePointDataObjects in order to set correct order of "Gui states" object
- // it must always be the last one.
- ((SalomeApp_Application*)application())->updateSavePointDataObjects( this );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOMEAPP_STUDY_H
-#define SALOMEAPP_STUDY_H
-
-#include "SalomeApp.h"
-
-#include <LightApp_Study.h>
-#include <string>
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-#include "SALOMEDSClient.hxx"
-
-class SALOMEAPP_EXPORT SalomeApp_Study : public LightApp_Study
-{
- Q_OBJECT
-
-public:
- SalomeApp_Study( SUIT_Application* );
- virtual ~SalomeApp_Study();
-
- virtual int id() const;
-
- virtual void createDocument();
- virtual bool openDocument( const QString& );
- virtual bool loadDocument( const QString& );
-
- virtual bool saveDocument();
- virtual bool saveDocumentAs( const QString& );
-
- virtual void closeDocument(bool permanently = true);
-
- virtual bool isSaved() const;
- virtual bool isModified() const;
- virtual void Modified();
-
- virtual void addComponent ( const CAM_DataModel* dm);
-
- _PTR(Study) studyDS() const;
-
- virtual std::string GetTmpDir ( const char* theURL, const bool isMultiFile);
-
- // to delete all references to object, whose have the same component
- void deleteReferencesTo( _PTR( SObject ) );
-
- virtual QString componentDataType( const QString& ) const;
- virtual QString referencedToEntry( const QString& ) const;
- virtual bool isComponent( const QString& ) const;
- virtual void children( const QString&, QStringList& ) const;
- virtual void components( QStringList& ) const;
-
- std::vector<int> getSavePoints();
- void removeSavePoint(int savePoint);
- QString getNameOfSavePoint(int savePoint);
- void setNameOfSavePoint(int savePoint, const QString& nameOfSavePoint);
- virtual std::string getVisualComponentName();
-
- virtual void restoreState(int savePoint);
-
-protected:
- virtual void saveModuleData ( QString theModuleName, QStringList theListOfFiles );
- virtual void openModuleData ( QString theModuleName, QStringList& theListOfFiles );
- virtual bool saveStudyData ( const QString& theFileName );
- virtual bool openStudyData ( const QString& theFileName );
-
- virtual std::vector<std::string> GetListOfFiles ( const char* theModuleName ) const;
- virtual void SetListOfFiles ( const char* theModuleName,
- const std::vector<std::string> theListOfFiles);
- virtual void RemoveTemporaryFiles ( const char* theModuleName, const bool isMultiFile) const;
-
-protected:
- virtual void dataModelInserted( const CAM_DataModel* );
- virtual bool openDataModel( const QString&, CAM_DataModel* );
- void setStudyDS(const _PTR(Study)& s );
-
-protected slots:
- virtual void updateModelRoot( const CAM_DataModel* );
-
-private:
- QString newStudyName() const;
-
-private:
- _PTR(Study) myStudyDS;
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// SALOME SalomeApp
-//
-// File : SalomeApp_StudyPropertiesDlg.cxx
-// Author : Sergey ANIKIN
-// Module : SALOME
-// $Header$
-
-#include "SalomeApp_StudyPropertiesDlg.h"
-#include "SalomeApp_ListView.h"
-#include "SalomeApp_Study.h"
-
-#include "SUIT_Session.h"
-#include <SUIT_Desktop.h>
-#include <SUIT_MessageBox.h>
-
-// OCCT Includes
-#include <OSD_Process.hxx>
-#include <Quantity_Date.hxx>
-
-// CORBA Headers
-#include <SALOMEconfig.h>
-#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
-
-// QT Includes
-#include <qpushbutton.h>
-#include <qlayout.h>
-
-using namespace std;
-
-#define DEFAULT_MARGIN 11
-#define DEFAULT_SPACING 6
-#define SPACER_SIZE 5
-#define MIN_LIST_WIDTH 300
-#define MIN_LIST_HEIGHT 150
-
-class SalomeApp_PropItem : public SalomeApp_ListViewItem
-{
-public:
- /*! constructor */
- SalomeApp_PropItem(SalomeApp_ListView* parent,
- const QString theName,
- const bool theEditable,
- const int theUserType) :
- SalomeApp_ListViewItem( parent, theName, theEditable )
- {
- setUserType(theUserType);
- }
- /*! constructor */
- SalomeApp_PropItem(SalomeApp_ListView* parent,
- SalomeApp_ListViewItem* after,
- const QString theName,
- const bool theEditable,
- const int theUserType) :
- SalomeApp_ListViewItem( parent, after, theName, theEditable )
- {
- setUserType(theUserType);
- }
- /*! fills widget with initial values (list or single value)*/
- void fillWidgetWithValues( SalomeApp_EntityEdit* theWidget )
- {
- QStringList list;
- switch(getUserType()) {
- //case SalomeApp_StudyPropertiesDlg::prpModeId:
- // {
- // list << SalomeApp_StudyPropertiesDlg::tr("PRP_MODE_FROM_SCRATCH") <<
- // SalomeApp_StudyPropertiesDlg::tr("PRP_MODE_FROM_COPYFROM");
- // theWidget->insertList(list);
- // break;
- // }
- case SalomeApp_StudyPropertiesDlg::prpLockedId:
- {
- list << SalomeApp_StudyPropertiesDlg::tr( "PRP_NO" ) << SalomeApp_StudyPropertiesDlg::tr( "PRP_YES" );
- theWidget->insertList(list, getValue() == SalomeApp_StudyPropertiesDlg::tr( "PRP_NO" ) ? 0 : 1 );
- break;
- }
- case SalomeApp_StudyPropertiesDlg::prpModificationsId:
- {
- SalomeApp_Study* study =
- dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
- if (study) {
- _PTR(Study) studyDoc = study->studyDS();
- _PTR(AttributeStudyProperties) propAttr;
- if ( studyDoc ) {
- propAttr = studyDoc->GetProperties();
- if ( propAttr ) {
- std::vector<std::string> aUsers;
- std::vector<int> aMins, aHours, aDays, aMonths, aYears;
- propAttr->GetModificationsList(aUsers, aMins, aHours, aDays, aMonths, aYears, false);
- int aCnt = aUsers.size();
- for ( int i = 0; i < aCnt; i++ ) {
- QString val;
- val.sprintf("%2.2d/%2.2d/%2d %2.2d:%2.2d",
- aDays [i],
- aMonths[i],
- aYears [i],
- aHours [i],
- aMins [i]);
- val = val + " : " + QString( aUsers[i].c_str() );
- list.prepend(val);
- }
- theWidget->setDuplicatesEnabled(true);
- theWidget->insertList(list);
- }
- }
- }
- break;
- }
- default:
- {
- SalomeApp_ListViewItem::fillWidgetWithValues(theWidget);
- break;
- }
- }
- }
- /*! finishes editing of entity */
- virtual UpdateType finishEditing( SalomeApp_EntityEdit* theWidget ) {
- if ( getUserType() == SalomeApp_StudyPropertiesDlg::prpModificationsId )
- return utCancel;
- else
- return SalomeApp_ListViewItem::finishEditing(theWidget);
- }
-};
-
-/*!Constructor. Initialize study properties dialog.*/
-SalomeApp_StudyPropertiesDlg::SalomeApp_StudyPropertiesDlg(QWidget* parent)
- : QDialog(parent, "", TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
- myChanged( false )
-{
- setCaption(tr("TLT_STUDY_PROPERTIES"));
- setSizeGripEnabled( true );
-
- clearWFlags(Qt::WStyle_ContextHelp);
-
- QGridLayout* mainLayout = new QGridLayout(this);
- mainLayout->setMargin(DEFAULT_MARGIN);
- mainLayout->setSpacing(DEFAULT_SPACING);
-
- myPropList = new SalomeApp_ListView(this);
- myPropList->addColumn("");
- myPropList->addColumn("");
- myPropList->enableEditing(TRUE);
- myPropList->setMinimumSize(MIN_LIST_WIDTH, MIN_LIST_HEIGHT);
- mainLayout->addMultiCellWidget(myPropList, 0, 0, 0, 2);
-
- myOKBtn = new QPushButton(tr("BUT_OK"), this);
- mainLayout->addWidget(myOKBtn, 1, 0);
-
- myCancelBtn = new QPushButton(tr("BUT_CANCEL"), this);
- mainLayout->addWidget(myCancelBtn, 1, 2);
-
- QSpacerItem* spacer1 =
- new QSpacerItem(SPACER_SIZE, SPACER_SIZE, QSizePolicy::Expanding, QSizePolicy::Minimum);
- mainLayout->addItem(spacer1, 1, 1);
-
- // Display study properties
- SalomeApp_Study* study =
- dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
- if (study)
- myStudyDoc = study->studyDS();
-
- initData();
-
- connect(myOKBtn, SIGNAL(clicked()), this, SLOT(onOK()));
- connect(myCancelBtn, SIGNAL(clicked()), this, SLOT(reject()));
-}
-
-/*!
- Destructor.
-*/
-SalomeApp_StudyPropertiesDlg::~SalomeApp_StudyPropertiesDlg()
-{
-}
-
-/*!
- Data initializetion for dialog.(Study author's name, date of creation etc.)
-*/
-void SalomeApp_StudyPropertiesDlg::initData()
-{
- bool hasData = myStudyDoc;
- _PTR(AttributeStudyProperties) propAttr;
- if (hasData)
- propAttr = myStudyDoc->GetProperties();
- hasData = hasData && propAttr;
-
- // Study author's name
- SalomeApp_PropItem* item = new SalomeApp_PropItem(myPropList, tr("PRP_AUTHOR")+":", true, prpAuthorId);
- if (hasData)
- item->setValue(propAttr->GetUserName().c_str());
-
- // Date of creation
- item = new SalomeApp_PropItem(myPropList, item, tr("PRP_DATE")+":", false, prpDateId);
- if (hasData) {
- int minutes, hours, day, month, year;
- if (propAttr->GetCreationDate(minutes, hours, day, month, year)) {
- QString strDate;
- strDate.sprintf("%2.2d/%2.2d/%2d %2.2d:%2.2d", day, month, year, hours, minutes);
- item->setValue(strDate);
- }
- }
-
- // Creation mode
-// item = new SalomeApp_PropItem(myPropList, item, tr("PRP_MODE")+":", true, prpModeId);
-// item->setEditingType( SalomeApp_EntityEdit::etComboBox);
-// if (hasData) item->setValue(propAttr->GetCreationMode());
-
- // Locked or not
- item = new SalomeApp_PropItem(myPropList, item, tr("PRP_LOCKED")+":", true, prpLockedId);
- item->setEditingType( SalomeApp_EntityEdit::etComboBox);
- if ( hasData )
- item->setValue( tr( propAttr->IsLocked() ? "PRP_YES" : "PRP_NO" ) );
-
- // Saved or not
- item = new SalomeApp_PropItem(myPropList, item, tr("PRP_MODIFIED")+":", false, prpSavedId);
- bool isModified = false;
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>
- (SUIT_Session::session()->activeApplication()->activeStudy());
- if (study) {
- isModified = study->isModified();
- if (hasData) {
- if (propAttr->IsModified() != isModified) {
- propAttr->SetModified((int)isModified);
- }
- }
- }
- if (hasData) {
- if (propAttr->IsModified())
- item->setValue( tr( "PRP_YES" ) );
- else
- item->setValue( tr( "PRP_NO" ) );
- }
-
- // Modifications list
- item = new SalomeApp_PropItem(myPropList, item, tr("PRP_MODIFICATIONS")+":", true, prpModificationsId);
- item->setEditingType( SalomeApp_EntityEdit::etComboBox);
- if (hasData) {
- std::vector<std::string> aUsers;
- std::vector<int> aMins, aHours, aDays, aMonths, aYears;
- propAttr->GetModificationsList(aUsers, aMins, aHours, aDays, aMonths, aYears, false);
- int aLast = aUsers.size()-1;
- if (aLast >= 0) {
- QString val;
- val.sprintf("%2.2d/%2.2d/%2d %2.2d:%2.2d",
- aDays [aLast],
- aMonths[aLast],
- aYears [aLast],
- aHours [aLast],
- aMins [aLast]);
- val = val + " : " + QString(aUsers[aUsers.size()-1].c_str());
- item->setValue(val);
- }
- }
-
- myOKBtn->setEnabled(hasData);
-}
-
-/*!
- accept data. Return true.
-*/
-bool SalomeApp_StudyPropertiesDlg::acceptData()
-{
- return TRUE;
-}
-
-/*!
- Fill properties attributes.
-*/
-void SalomeApp_StudyPropertiesDlg::onOK()
-{
- myPropList->accept();
-
- if (acceptData()) {
- _PTR(AttributeStudyProperties) propAttr = myStudyDoc->GetProperties();
- //myChanged = propChanged();
- if ( propAttr /*&& myChanged*/ ) {
- QListViewItemIterator it( myPropList );
- // iterate through all items of the listview
- for ( ; it.current(); ++it ) {
- SalomeApp_PropItem* item = (SalomeApp_PropItem*)(it.current());
- switch (item->getUserType()) {
- case prpAuthorId:
- if (QString(propAttr->GetUserName().c_str()) != item->getValue().stripWhiteSpace()) {
- if (!propAttr->IsLocked()) {
- propAttr->SetUserName(item->getValue().stripWhiteSpace().latin1());
- myChanged = true;
- } else {
- SUIT_MessageBox::warn1(SUIT_Session::session()->activeApplication()->desktop(),
- QObject::tr("WRN_WARNING"),
- QObject::tr("WRN_STUDY_LOCKED"),
- QObject::tr("BUT_OK"));
- }
- }
- break;
- //case prpModeId:
- // propAttr->SetCreationMode(item->getValue().stripWhiteSpace().latin1());
- // break;
- case prpLockedId:
- {
- bool bLocked = item->getValue().compare(tr("PRP_YES")) == 0;
- if (propAttr->IsLocked() != bLocked) {
- propAttr->SetLocked(bLocked);
- myChanged = true;
- }
- }
- break;
- default:
- break;
- }
- }
- }
- accept();
- }
-}
-
-/*!
- Check is properties changed?
-*/
-bool SalomeApp_StudyPropertiesDlg::propChanged()
-{
- _PTR(AttributeStudyProperties) propAttr = myStudyDoc->GetProperties();
- if (propAttr) {
- QListViewItemIterator it (myPropList);
- // iterate through all items of the listview
- for (; it.current(); ++it) {
- SalomeApp_PropItem* item = (SalomeApp_PropItem*)(it.current());
- switch (item->getUserType()) {
- case prpAuthorId:
- if ( QString( propAttr->GetUserName().c_str() ) != item->getValue().stripWhiteSpace() ) {
- return true;
- }
- break;
- //case prpModeId:
- // if ( QString( propAttr->GetCreationMode().c_str() ) != item->getValue().stripWhiteSpace() ) {
- // return true;
- // }
- // break;
- case prpLockedId:
- {
- bool bLocked = item->getValue().compare( tr( "PRP_YES" ) ) == 0;
- if ( propAttr->IsLocked() != bLocked ) {
- return true;
- }
- break;
- }
- default:
- break;
- }
- }
- }
- return false;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : SalomeApp_StudyPropertiesDlg.h
-// Author : Sergey ANIKIN
-// Module : SALOME
-
-#ifndef SALOMEAPP_STUDY_PROPERTIES_DLG_H
-#define SALOMEAPP_STUDY_PROPERTIES_DLG_H
-
-#include "SalomeApp.h"
-#include <SALOMEDSClient_definitions.hxx>
-#include <qdialog.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlistview.h>
-
-#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(SALOMEDS)
-
-#include <SALOMEDSClient_Study.hxx>
-
-class SalomeApp_ListView;
-class QPushButton;
-class QToolButton;
-
-class SALOMEAPP_EXPORT SalomeApp_StudyPropertiesDlg : public QDialog
-{
- Q_OBJECT
-
-public:
- enum {
- prpAuthorId,
- prpModeId,
- prpDateId,
- prpSavedId,
- prpLockedId,
- prpModificationsId,
- prpLastId
- };
-
-public:
- SalomeApp_StudyPropertiesDlg( QWidget* parent = 0 );
- ~SalomeApp_StudyPropertiesDlg();
-
- bool isChanged() { return myChanged; }
-
-public slots:
- void onOK();
-
-private:
- void initData();
- bool acceptData();
- bool propChanged();
-
-private:
- SalomeApp_ListView* myPropList;
- QPushButton* myOKBtn;
- QPushButton* myCancelBtn;
- bool myChanged;
-
- _PTR(Study) myStudyDoc;
-};
-
-#endif // SALOMEAPP_STUDY_PROPERTIES_DLG_H
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SalomeApp_Tools.h"
-
-#include <SUIT_Session.h>
-#include <SUIT_Desktop.h>
-#include <SUIT_MessageBox.h>
-
-#include <utilities.h>
-
-/*!
- Convert QColor to Quantity_Color, if QColor is valid.
-*/
-Quantity_Color SalomeApp_Tools::color( const QColor& c )
-{
- Quantity_Color aColor;
- if ( c.isValid() )
- aColor = Quantity_Color( c.red() / 255., c.green() / 255., c.blue() / 255., Quantity_TOC_RGB );
- return aColor;
-}
-
-/*!
- Convert Quantity_Color to QColor.
-*/
-QColor SalomeApp_Tools::color( const Quantity_Color& c )
-{
- return QColor( (int)( c.Red() * 255 ), (int)( c.Green() * 255 ), (int)( c.Blue() * 255 ) );
-}
-
-/*!
- Gets message on exception \a S_ex.
-*/
-QString SalomeApp_Tools::ExceptionToString( const SALOME::SALOME_Exception& S_ex )
-{
- QString message;
-
- switch ( S_ex.details.type )
- {
- case SALOME::COMM:
- case SALOME::INTERNAL_ERROR:
- {
- message = QString( S_ex.details.text );
- QString source( S_ex.details.sourceFile );
- QString line;
- line.setNum( S_ex.details.lineNumber );
- message = message + " \n" + source + " : " + line;
- break;
- }
- case SALOME::BAD_PARAM:
- {
- message = QString( S_ex.details.text );
-#ifdef _DEBUG_
- QString source( S_ex.details.sourceFile );
- QString line;
- line.setNum( S_ex.details.lineNumber );
- message = message + " \n" + source + " : " + line;
-#endif
- break;
- }
- default:
- {
- message = QString( "SALOME CORBA Exception Type invalid" );
- QString source( S_ex.details.sourceFile );
- QString line;
- line.setNum( S_ex.details.lineNumber );
- message = message + " \n" + source + " : " + line;
- break;
- }
- }
- return message;
-}
-
-/*!
- Gets message box on exception \a S_ex.
-*/
-void SalomeApp_Tools::QtCatchCorbaException( const SALOME::SALOME_Exception& S_ex )
-{
- QString message = ExceptionToString( S_ex );
-
- QString title;
- bool error = true;
- switch ( S_ex.details.type )
- {
- case SALOME::COMM:
- case SALOME::INTERNAL_ERROR:
- title = QObject::tr( "Engine Error" );
- break;
- case SALOME::BAD_PARAM:
- error = false;
- title = QObject::tr( "Engine Warning" );
- break;
- default:
- title = QObject::tr( "Internal SALOME Error" );
- break;
- }
-
- if ( error )
- SUIT_MessageBox::error1( SUIT_Session::session()->activeApplication()->desktop(),
- title, message, QObject::tr( "OK" ) );
- else
- SUIT_MessageBox::warn1( SUIT_Session::session()->activeApplication()->desktop(),
- title, message, QObject::tr( "OK" ) );
-
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOMEAPP_TOOLS_H
-#define SALOMEAPP_TOOLS_H
-
-#include "SalomeApp.h"
-
-#include <SUIT_Tools.h>
-
-#include <qcolor.h>
-#include <qstring.h>
-
-#include <Quantity_Color.hxx>
-
-#include <SALOMEconfig.h>
-#include CORBA_CLIENT_HEADER(SALOME_Exception)
-
-/*!
- Class which provide color converter and exception message box.
-*/
-class SALOMEAPP_EXPORT SalomeApp_Tools : public SUIT_Tools
-{
-public:
- static Quantity_Color color( const QColor& );
- static QColor color( const Quantity_Color& );
-
- static QString ExceptionToString( const SALOME::SALOME_Exception& );
- static void QtCatchCorbaException( const SALOME::SALOME_Exception& );
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SalomeApp_TypeFilter.h"
-
-#include "LightApp_DataOwner.h"
-#include "SalomeApp_Study.h"
-
-/*!
- Constructor.
-*/
-SalomeApp_TypeFilter::SalomeApp_TypeFilter( SalomeApp_Study* study, const QString& kind )
- : SalomeApp_Filter( study )
-{
- myKind = kind;
-}
-
-/*!
- Destructor.
-*/
-SalomeApp_TypeFilter::~SalomeApp_TypeFilter()
-{
-}
-
-/*!
- Check: data owner is valid?
-*/
-bool SalomeApp_TypeFilter::isOk( const SUIT_DataOwner* sOwner ) const
-{
- const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*> ( sOwner );
-
- SalomeApp_Study* aDoc = getStudy();
- if (owner && aDoc && aDoc->studyDS())
- {
- _PTR(Study) aStudy = aDoc->studyDS();
- QString entry = owner->entry();
-
- _PTR(SObject) aSObj( aStudy->FindObjectID( entry.latin1() ) );
- if (aSObj)
- {
- _PTR(SComponent) aComponent(aSObj->GetFatherComponent());
- if ( aComponent && (aComponent->ComponentDataType() == myKind.latin1()) )
- return true;
- }
- }
-
- return false;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOMEAPP_TYPEFILTER_H
-#define SALOMEAPP_TYPEFILTER_H
-
-#include <qstring.h>
-
-#include "SalomeApp_Filter.h"
-
-/*!
- Class which provide data owner validation.
-*/
-class SALOMEAPP_EXPORT SalomeApp_TypeFilter: public SalomeApp_Filter
-{
-public:
- SalomeApp_TypeFilter( SalomeApp_Study* study, const QString& kind );
- ~SalomeApp_TypeFilter();
-
- virtual bool isOk( const SUIT_DataOwner* ) const;
-
-private:
- QString myKind;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SalomeApp_VisualState.h"
-
-#include "SalomeApp_Module.h"
-#include "SalomeApp_Study.h"
-#include "SalomeApp_Application.h"
-
-#include <SUIT_ResourceMgr.h>
-#include <QtxWorkstack.h>
-
-#include <STD_TabDesktop.h>
-
-#include <qptrlist.h>
-#include <qapplication.h>
-#include <qdict.h>
-
-#include <SALOMEDSClient_ClientFactory.hxx>
-#include <SALOMEDSClient_IParameters.hxx>
-
-#include <vector>
-#include <string>
-
-/*!
- Constructor.
-*/
-SalomeApp_VisualState::SalomeApp_VisualState( SalomeApp_Application* app )
- : myApp( app )
-{
-}
-
-/*!
- Destructor.
-*/
-SalomeApp_VisualState::~SalomeApp_VisualState()
-{
-}
-
-/*!
- Sets names of all view windows in given list. This is used
- in order to apply the same naming algorithm when saving and restoring
- view windows. Names of view windows must be the same before saving
- workstack (splitters) information, and before its restoring!
- Naming rule: ViewerType_IndexOfViewerOfThisType_IndexOfViewInThisViewer
- VTKViewer_0_0
- OCCViewer_0_0 OCCViewer_0_1 OCCViewer_0_2
- VTKViewer_1_0
-*/
-void nameViewWindows( const ViewManagerList& lst )
-{
- QDict<int> viewersCounter; // map viewerType - to - index_of_this_viewer_type
- viewersCounter.setAutoDelete( true );
- for ( QPtrListIterator<SUIT_ViewManager> it(lst); it.current(); ++it) {
- int view_count = it.current()->getViewsCount();
- QString vType = it.current()->getType();
- if ( !view_count )
- continue; //No views is opened in the viewer
-
- int* viewerID = viewersCounter[ vType ];
- if ( !viewerID ) {
- viewerID = new int( 0 );
- viewersCounter.insert( vType, viewerID );
- }
- else
- ++(*viewerID);
-
- QPtrVector<SUIT_ViewWindow> views = it.current()->getViews();
- for ( int i = 0; i < view_count; i++ ) {
- QString vName = QString( "%1_%2_%3" ).arg( vType ).arg( *viewerID ).arg( i );
- views[i]->setName( vName );
- }
- }
-}
-
-/*!
- Stores the visual parameters of the viewers
-*/
-int SalomeApp_VisualState::storeState()
-{
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
- if ( !study )
- return -1;
-
- int savePoint = 1;
- std::vector<int> savePoints = study->getSavePoints();
- //Calculate a new savePoint number = the last save point number + 1
- if ( savePoints.size() > 0)
- savePoint = savePoints[savePoints.size()-1] + 1;
-
- _PTR(AttributeParameter) ap = study->studyDS()->GetCommonParameters( study->getVisualComponentName(), savePoint );
- _PTR(IParameters) ip = ClientFactory::getIParameters( ap );
-
- ViewManagerList lst;
- myApp->viewManagers( lst );
-
- // setting unique names for view windows in order to save this view inside
- // workstack's structure (see below). On restore the views with the same names will
- // be placed to the same place inside the workstack's splitters.
- nameViewWindows( lst );
-
- // store active window's name
- SUIT_ViewWindow* win = myApp->desktop()->activeWindow();
- if ( win )
- ip->setProperty("AP_ACTIVE_VIEW", win->name() );
-
- int viewerID = 0;
- SUIT_ViewManager* vm = 0;
- for (QPtrListIterator<SUIT_ViewManager> it( lst ); it.current(); ++it ) {
- vm = it.current();
- int view_count = vm->getViewsCount();
- if ( !view_count )
- continue; //No views is opened in the viewer
-
- std::string viewerEntry = QString( "%1_%2" ).arg( vm->getType() ).arg( ++viewerID ).latin1();
- ip->append("AP_VIEWERS_LIST", viewerEntry);
-
- QPtrVector<SUIT_ViewWindow> views = vm->getViews();
- for(int i = 0; i<view_count; i++) {
- ip->append( viewerEntry, views[i]->caption().latin1() );
- ip->append( viewerEntry, views[i]->getVisualParameters().latin1() );
- }
- }
-
- //Save information about split areas
- if ( myApp->desktop()->inherits( "STD_TabDesktop" ) ) {
- QtxWorkstack* workstack = ((STD_TabDesktop*)myApp->desktop())->workstack();
- QString workstackInfo;
- (*workstack) >> workstackInfo;
- ip->setProperty( "AP_WORKSTACK_INFO", workstackInfo.latin1() );
- }
-
- //Save a name of the active module
- if ( CAM_Module* activeModule = myApp->activeModule() )
- ip->setProperty( "AP_ACTIVE_MODULE", activeModule->moduleName().latin1() );
-
- //Store visual parameters of the modules
- QPtrList<CAM_Module> mlist;
- myApp->modules( mlist );
- CAM_Module* module = 0;
- for ( module = mlist.first(); module; module = mlist.next() ) {
- if ( SalomeApp_Module* sModule = dynamic_cast<SalomeApp_Module*>( module ) ) {
- ip->append( "AP_MODULES_LIST", sModule->moduleName().latin1() );
- sModule->storeVisualParameters( savePoint );
- }
- }
-
- // set default name of new savePoint
- study->setNameOfSavePoint( savePoint, QObject::tr( "SAVE_POINT_DEF_NAME" ) + QString::number( savePoint ) );
-
- return savePoint;
-}
-
-/*!
- Restores the visual parameters of the viewers
-*/
-void SalomeApp_VisualState::restoreState(int savePoint)
-{
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
- if ( !study )
- return;
-
- _PTR(AttributeParameter) ap = study->studyDS()->GetCommonParameters( study->getVisualComponentName(), savePoint );
- _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
-
- //Remove all already existent veiwers and their views
- ViewManagerList lst;
- myApp->viewManagers( lst );
- for ( QPtrListIterator<SUIT_ViewManager> it(lst); it.current(); ++it ) {
- myApp->removeViewManager( it.current() );
- qApp->processEvents();
- }
- //Restore the viewers and view windows
- int nbViewers = ip->nbValues( "AP_VIEWERS_LIST" );
- SUIT_ViewWindow* viewWin = 0;
-
- // parameters of view windows are stored in a map for restoring after restoring of the workstack
- QMap<SUIT_ViewWindow*, QString> viewersParameters;
-
- for ( int i = 0; i < nbViewers; i++ ) {
- std::string viewerEntry = ip->getValue( "AP_VIEWERS_LIST", i );
- std::vector<std::string> veiewerParams = ip->parseValue(viewerEntry,'_');
- std::string type = veiewerParams[0];
- std::string viewerID = veiewerParams[1];
- SUIT_ViewManager* vm = myApp->newViewManager( type.c_str() );
- if ( !vm )
- continue; //Unknown viewer
-
- int nbViews = (ip->nbValues(viewerEntry))/2;
-
- //Create nbViews-1 view (-1 because 1 view is created by createViewManager)
- for ( int i = 1; i< nbViews; i++ ) {
- SUIT_ViewWindow* aView = vm->createViewWindow();
- aView->show();
- }
-
- int viewCount = vm->getViewsCount();
- if (viewCount != nbViews) {
- printf( "\nRestore visual state: Unknow error, Can't create a view!\n" );
- continue;
- }
-
- //Resize the views, set their captions and apply visual parameters.
- QPtrVector<SUIT_ViewWindow> views = vm->getViews();
- for (int i = 0, j = 0; i<viewCount; i++, j+=2) {
- viewWin = views[i];
- if ( !viewWin )
- continue;
-
- // wait untill the window is really shown. This step fixes MANY bugs..
- while ( !vm->isVisible() )
- qApp->processEvents();
-
- viewWin->setCaption(ip->getValue(viewerEntry, j).c_str());
-
- // printf ( "VP for viewWin \"%s\": %s\n", viewerEntry.c_str(), ip->getValue(viewerEntry, j+1).c_str() );
- viewersParameters[ viewWin ] = ip->getValue(viewerEntry, j+1).c_str();
- //viewWin->setVisualParameters(ip->getValue(viewerEntry, j+1).c_str());
- }
- }
-
- // restore modules' visual parameters
- std::vector<std::string> v = ip->getValues("AP_MODULES_LIST");
- for ( int i = 0; i < v.size(); i++ ) {
- myApp->activateModule( v[i].c_str() );
- if ( SalomeApp_Module* module = dynamic_cast<SalomeApp_Module*>( myApp->activeModule() ) )
- module->restoreVisualParameters( savePoint );
- }
-
- // new view windows may have been created in module->restoreVisualParameters() [GAUSS]
- // so here we store their visual parameters for later restoring..
- lst.clear();
- myApp->viewManagers(lst);
- QPtrListIterator<SUIT_ViewManager> it( lst );
- for ( ; it.current(); ++it ) {
- int view_count = it.current()->getViewsCount();
- QPtrVector<SUIT_ViewWindow> views = it.current()->getViews();
- for ( int i = 0; i < view_count; i++ ) {
- if ( !viewersParameters.contains( views[i] ) ) {
- viewersParameters[ views[i] ] = views[i]->getVisualParameters();
- // printf ( "store VP for viewWin \"%s\": %s\n", views[i]->name(), views[i]->getVisualParameters().latin1() );
- }
- }
- }
-
- // activate module that was active on save
- QString activeModuleName( ip->getProperty("AP_ACTIVE_MODULE" ).c_str() );
- if ( !activeModuleName.isEmpty() )
- myApp->activateModule( activeModuleName );
-
- // setting unique names for view windows in order to restore positions of view windows inside
- // workstack's structure (see below). During save the same naming algorithm was used,
- // so the same views will get the same names.
- nameViewWindows( lst );
-
- // restore workstack parameters. should be done after module's restoreVisualParameters(), because
- // some modules can create their own viewers (like VISU creates GaussViewers)
- if ( myApp->desktop()->inherits( "STD_TabDesktop" ) ) {
- QtxWorkstack* workstack = ((STD_TabDesktop*)myApp->desktop())->workstack();
- (*workstack) << ip->getProperty( "AP_WORKSTACK_INFO" ).c_str();
- }
-
- // restore visual parameters of view windows. it must be done AFTER restoring workstack.
- // also set active view
- std::string activeViewName = ip->getProperty("AP_ACTIVE_VIEW");
- QMap<SUIT_ViewWindow*, QString>::Iterator mapIt;
- for ( mapIt = viewersParameters.begin(); mapIt != viewersParameters.end(); ++mapIt ) {
- mapIt.key()->setVisualParameters( mapIt.data() );
- if ( activeViewName == mapIt.key()->name() )
- mapIt.key()->setFocus();
- }
-
- // for ( it.toFirst(); it.current(); ++it ) {
- // int view_count = it.current()->getViewsCount();
- // QPtrVector<SUIT_ViewWindow> views = it.current()->getViews();
- // for ( int i = 0; i < view_count; i++ )
- // views[i]->setVisualParameters( viewersParameters[ views[i]->name() ] );
- // }
-
- // set focus to previously saved active view window
- // std::string activeViewName = ip->getProperty("AP_ACTIVE_VIEW");
- // for ( it.toFirst(); it.current(); ++it ) {
- // int view_count = it.current()->getViewsCount();
- // QPtrVector<SUIT_ViewWindow> views = it.current()->getViews();
- // for ( int i = 0; i < view_count; i++ ) {
- // if ( activeViewName == views[i]->name() )
- // views[i]->setFocus();
- // }
- // }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOMEAPP_VISUALSTATE_H
-#define SALOMEAPP_VISUALSTATE_H
-
-#ifdef WIN32
-#pragma warning( disable:4251 )
-#endif
-
-#include "SalomeApp.h"
-
-class SalomeApp_Application;
-
-class SALOMEAPP_EXPORT SalomeApp_VisualState
-{
-public:
- SalomeApp_VisualState( SalomeApp_Application* );
- virtual ~SalomeApp_VisualState();
-
- virtual int storeState();
- virtual void restoreState( int savePoint );
-
-protected:
- SalomeApp_Application* myApp;
-};
-
-#ifdef WIN32
-#pragma warning( default:4251 )
-#endif
-
-#endif
+++ /dev/null
-# SALOMELocalTrace : log on local machine
-#
-# Copyright (C) 2003 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
-#
-#
-#
-# File : Makefile.in
-# Author : Sergey RUIN
-# Module : SALOME
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES= libSalomeAppTest.la
-
-salomeinclude_HEADERS= SalomeAppTest.hxx
-
-dist_libSalomeAppTest_la_SOURCES= SalomeAppTest.cxx
-
-libSalomeAppTest_la_CXXFLAGS= @CPPUNIT_INCLUDES@ $(KERNEL_CXXFLAGS)
-libSalomeAppTest_la_LIBADD= @CPPUNIT_LIBS@
-
-bin_PROGRAMS= TestSalomeApp
-
-TestSalomeApp_SOURCES= TestSalomeApp.cxx
-
-TestSalomeApp_CXXFLAGS= $(libSalomeAppTest_la_CXXFLAGS)
-TestSalomeApp_LDADD= $(libSalomeAppTest_la_LIBADD) libSalomeAppTest.la
-
-dist_salomescript_PYTHON = TestSalomeApp.py
-UNIT_TEST_PROG = TestSalomeApp
+++ /dev/null
-// Copyright (C) 2006 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 "SalomeAppTest.hxx"
-
-using namespace std;
-
-// ============================================================================
-/*!
- * Set up the environment
- */
-// ============================================================================
-
-void SalomeAppTest::setUp()
-{
-}
-
-// ============================================================================
-/*!
- * - delete
- */
-// ============================================================================
-
-void SalomeAppTest::tearDown()
-{
-}
-
-// ============================================================================
-/*!
- * Check SalomeApp functionality
- */
-// ============================================================================
-void SalomeAppTest::testSalomeApp()
-{
-}
-
-
-
-
+++ /dev/null
-// Copyright (C) 2006 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 _SalomeAppTEST_HXX_
-#define _SalomeAppTEST_HXX_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class SalomeAppTest : public CppUnit::TestFixture
-{
- CPPUNIT_TEST_SUITE( SalomeAppTest );
- CPPUNIT_TEST( testSalomeApp );
- CPPUNIT_TEST_SUITE_END();
-
-public:
-
- void setUp();
- void tearDown();
- void testSalomeApp();
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2005 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 all SalomeApp Test from basics until the present directory
-
-#include "SalomeAppTest.hxx"
-
-// --- Registers the fixture into the 'registry'
-
-CPPUNIT_TEST_SUITE_REGISTRATION( SalomeAppTest );
-
-// --- generic Main program from Basic/Test
-
-#include "BasicMainTest.hxx"
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-
-import sys, os,signal,string,commands
-import runSalome
-import orbmodule
-import TestKiller
-
-# get SALOME environment :
-
-args, modules_list, modules_root_dir = runSalome.get_config()
-runSalome.set_env(args, modules_list, modules_root_dir)
-
-# launch CORBA naming server
-
-clt=orbmodule.client()
-
-# launch CORBA logger server
-
-myServer=runSalome.LoggerServer(args)
-myServer.run()
-clt.waitLogger("Logger")
-
-# execute Unit Test
-
-command = ['TestSalomeApp']
-ret = os.spawnvp(os.P_WAIT, command[0], command)
-
-# kill Test process
-
-TestKiller.killProcess(runSalome.process_id)
+++ /dev/null
-[language]
-language = en
-
-[launch]
-modules = GEOM,SMESH,VISU
-
-[resources]
-SUIT = $(GUI_ROOT_DIR)/share/salome/resources/gui
-STD = $(GUI_ROOT_DIR)/share/salome/resources/gui
-Plot2d = $(GUI_ROOT_DIR)/share/salome/resources/gui
-GLViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
-OCCViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
-VTKViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
-SVTK = $(GUI_ROOT_DIR)/share/salome/resources/gui
-LightApp = $(GUI_ROOT_DIR)/share/salome/resources/gui
-SalomeApp = $(GUI_ROOT_DIR)/share/salome/resources/gui
-GEOM = $(GEOM_ROOT_DIR)/share/salome/resources/geom
-SMESH = $(SMESH_ROOT_DIR)/share/salome/resources/smesh
-VISU = $(VISU_ROOT_DIR)/share/salome/resources/visu
-
-[GEOM]
-name = Geometry
-icon = ModulGeom
-
-[SMESH]
-name = Mesh
-icon = ModulMesh
-
-[VISU]
-name = Post-Pro
-icon = ModulVisu
+++ /dev/null
-<document>
- <section name="launch">
- <!-- SALOME launching parameters -->
- <parameter name="gui" value="yes"/>
- <parameter name="splash" value="yes"/>
- <parameter name="file" value="no"/>
- <parameter name="key" value="no"/>
- <parameter name="interp" value="no"/>
- <parameter name="logger" value="no"/>
- <parameter name="xterm" value="no"/>
- <parameter name="portkill" value="no"/>
- <parameter name="killall" value="no"/>
- <parameter name="pinter" value="no"/>
- <parameter name="noexcepthandler" value="no"/>
- <parameter name="modules" value="GEOM,SMESH,VISU,SUPERV,MED,COMPONENT,PYCALCULATOR"/>
- <parameter name="pyModules" value=""/>
- <parameter name="embedded" value="SalomeAppEngine,study,cppContainer,registry,moduleCatalog"/>
- <parameter name="standalone" value="pyContainer,supervContainer"/>
- </section>
- <section name="language">
- <!-- Language settings (resource manager)-->
- <parameter name="language" value="en"/>
- <parameter name="translators" value="%P_msg_%L.qm|%PM_msg_%L.qm|%P_icons.qm|%P_images.qm|%PM_images.qm"/>
- </section>
- <section name="splash" >
- <!-- Splash screen settings -->
- <parameter name="image" value="${GUI_ROOT_DIR}/share/salome/resources/gui/icon_about.png" />
- <parameter name="info" value="%V" />
- <parameter name="text_colors" value="#FFFFFF" />
- <parameter name="progress_colors" value="#c33232|#d1d1d1|0" />
- <parameter name="margin" value="26" />
- </section>
- <section name="resources">
- <!-- Resource directories (resource manager)-->
- <parameter name="SUIT" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="STD" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="Plot2d" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="SPlot2d" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="GLViewer" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="OCCViewer" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="VTKViewer" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="SVTK" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="LightApp" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="SalomeApp" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="OB" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="CAM" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="SUPERVGraph" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="QxGraph" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <parameter name="ToolsGUI" value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
- <!-- NETGENPlugin and GHS3DPlugin -->
- <!-- Here the environment variables are used in upper case, -->
- <!-- In SMESH/resources/SalomeApp.xml case-sensitive notation is used. -->
- <!-- As a result, both variants are acceptable. -->
- <parameter name="NETGENPlugin" value="${NETGENPLUGIN_ROOT_DIR}/share/salome/resources/netgenplugin"/>
- <parameter name="GHS3DPlugin" value="${GHS3DPLUGIN_ROOT_DIR}/share/salome/resources/ghs3dplugin"/>
- <parameter name="BLSURFPlugin" value="${BLSURFPLUGIN_ROOT_DIR}/share/salome/resources"/>
- <parameter name="HexoticPLUGIN" value="${HexoticPLUGIN_ROOT_DIR}/share/salome/resources"/>
- </section>
- <section name="SMESH">
- <!-- Default SMESH module plugins -->
- <parameter name="plugins" value="NETGENPlugin,GHS3DPlugin,BLSURFPlugin,HexoticPLUGIN"/>
- </section>
- <section name="desktop" >
- <!-- Default GUI desktop state, position, size -->
- <parameter name="state" value="normal"/>
- <parameter name="pos_x" value="center"/>
- <parameter name="pos_y" value="center"/>
- <parameter name="width" value="800"/>
- <parameter name="height" value="600"/>
- </section>
- <section name="ObjectBrowser" >
- <!-- Object Browser preferences -->
- <parameter name="auto_size" value="false" />
- <parameter name="auto_size_first" value="true" />
- <parameter name="visibility_column_0" value="true" />
- <parameter name="visibility_column_1" value="false" />
- <parameter name="visibility_column_2" value="false" />
- <parameter name="visibility_column_3" value="false" />
- </section>
- <section name="PyConsole">
- <!-- Python console preferences -->
- <parameter name="font" value="Helvetic,12" />
- <parameter name="additional_families" value="Helvetic;Helvetica;Helvetica[Adobe];Times;Times[Adobe];Sans Serif;Serif;Monospace;Lucida"/>
- </section>
- <section name="OCCViewer" >
- <!-- OCC viewer preferences -->
- <parameter name="background" value="35, 136, 145" />
- <parameter name="iso_number_u" value="1" />
- <parameter name="iso_number_v" value="1" />
- <parameter name="trihedron_size" value="100" />
- </section>
- <section name="VTKViewer" >
- <!-- VTK viewer preferences -->
- <parameter name="background" value="0, 0, 0" />
- <parameter name="trihedron_size" value="105" />
- <parameter name="relative_size" value="true" />
- </section>
- <section name="Plot2d" >
- <!-- Plot2d viewer preferences -->
- <parameter name="Background" value="255, 255, 255"/>
- <parameter name="CurveType" value="1" />
- <parameter name="HorScaleMode" value="0" />
- <parameter name="LegendPos" value="1" />
- <parameter name="MarkerSize" value="9" />
- <parameter name="ShowLegend" value="true" />
- <parameter name="VerScaleMode" value="0" />
- </section>
- <section name="SUPERVGraph" >
- <!-- Supervision viewer preferences -->
- <parameter name="Background" value="144, 208, 211" />
- <parameter name="Title" value="63, 213, 255" />
- <parameter name="NodeBody" value="255, 249, 147" />
- </section>
- <section name="QxGraph" >
- <!-- QxGraph viewer preferences -->
- <parameter name="Background" value="144, 208, 211" />
- <parameter name="Title" value="63, 213, 255" />
- <parameter name="NodeBody" value="255, 249, 147" />
- </section>
- <section name="FileDlg" >
- <!-- "Open/Save File" dialog box preferences-->
- <parameter name="QuickDirList" value="${DATA_DIR}" />
- </section>
- <section name="Study">
- <!-- General study settings -->
- <parameter name="store_positions" value="false" />
- <parameter name="store_visual_state" value="false" />
- </section>
- <section name="ExternalBrowser" >
- <!-- External HELP browser settings -->
- <parameter value="D:\Program Files\Internet Explorer\iexplore.exe" name="winapplication" />
- <parameter value="/usr/bin/mozilla" name="application" />
- </section>
-</document>
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SalomeApp_images.po
-// Created: November, 2004
-// Author: OCC team
-// Copyright (C) CEA 2004
-
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n"
-"PO-Revision-Date: YYYY-MM-DD\n"
-"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: SalomeApp_msg_en.po
-// Created: 10/25/2004 12:46:36 PM
-// Author: Sergey LITONIN
-
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2002-02-22 16:56:46 CET\n"
-"PO-Revision-Date: 2004-02-17 11:17+0300\n"
-"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-//=======================================================================================
-
-msgid "BUT_NEW"
-msgstr "&New"
-
-msgid "BUT_OPEN"
-msgstr "&Open"
-
-msgid "BUT_LOAD"
-msgstr "&Load"
-
-//=======================================================================================
-
-msgid "SalomeApp_Application::PYTHON_CONSOLE"
-msgstr "Python Console"
-
-msgid "SalomeApp_Application::TOT_DESK_FILE_DUMP_STUDY"
-msgstr "Dump study"
-
-msgid "SalomeApp_Application::MEN_DESK_FILE_DUMP_STUDY"
-msgstr "&Dump study..."
-
-msgid "SalomeApp_Application::PRP_DESK_FILE_DUMP_STUDY"
-msgstr "Dumps study to the python script"
-
-msgid "SalomeApp_Application::TOT_DESK_FILE_SAVE_GUI_STATE"
-msgstr "Save GUI state"
-
-msgid "SalomeApp_Application::MEN_DESK_FILE_SAVE_GUI_STATE"
-msgstr "Save GUI state"
-
-msgid "SalomeApp_Application::PRP_DESK_FILE_SAVE_GUI_STATE"
-msgstr "Saves current state of viewers, displayed objects, etc."
-
-msgid "SalomeApp_Application::TOT_DESK_FILE_LOAD_SCRIPT"
-msgstr "Load python script"
-
-msgid "SalomeApp_Application::MEN_DESK_FILE_LOAD_SCRIPT"
-msgstr "Load scrip&t..."
-
-msgid "SalomeApp_Application::PRP_DESK_FILE_LOAD_SCRIPT"
-msgstr "Loads python script from file"
-
-msgid "SalomeApp_Application::TOT_FILE_DESK_PREFERENCES"
-msgstr "Preferences"
-
-msgid "SalomeApp_Application::MEN_DESK_TOOLS"
-msgstr "&Tools"
-
-msgid "SalomeApp_Application::TOT_DESK_CATALOG_GENERATOR"
-msgstr "Catalog generator"
-
-msgid "SalomeApp_Application::MEN_DESK_CATALOG_GENERATOR"
-msgstr "Catalog &generator"
-
-msgid "SalomeApp_Application::PRP_DESK_CATALOG_GENERATOR"
-msgstr "Generates XML catalog of a component's interface"
-
-msgid "SalomeApp_Application::TOT_DESK_REGISTRY_DISPLAY"
-msgstr "Registry display"
-
-msgid "SalomeApp_Application::MEN_DESK_REGISTRY_DISPLAY"
-msgstr "Registry &display"
-
-msgid "SalomeApp_Application::PRP_DESK_REGISTRY_DISPLAY"
-msgstr "Displays content of the Registry CORBA server"
-
-msgid "SalomeApp_Application::TOT_DESK_MRU"
-msgstr "Most recently used"
-
-msgid "SalomeApp_Application::MEN_DESK_MRU"
-msgstr "Most recently used"
-
-msgid "SalomeApp_Application::TOT_DESK_PROPERTIES"
-msgstr "Study properties"
-
-msgid "SalomeApp_Application::MEN_DESK_PROPERTIES"
-msgstr "Pro&perties..."
-
-msgid "SalomeApp_Application::PRP_DESK_PROPERTIES"
-msgstr "Edits study properties"
-
-msgid "SalomeApp_Application::PREF_CATEGORY_SALOME"
-msgstr "SALOME"
-
-msgid "SalomeApp_Application::PREF_TAB_OBJBROWSER"
-msgstr "Object browser"
-
-msgid "SalomeApp_Application::MEN_OPENWITH"
-msgstr "Activate %1 Module"
-
-msgid "SalomeApp_Application::MEN_DELETE_INVALID_REFERENCE"
-msgstr "Delete Invalid Reference"
-
-msgid "SalomeApp_Application::PREF_STORE_VISUAL_STATE"
-msgstr "Store/restore last GUI state"
-
-//=======================================================================================
-
-msgid "PUBLISH_IN_STUDY"
-msgstr "Publish in study"
-
-msgid "SAVE_GUI_STATE"
-msgstr "Save GUI state"
-
-//=======================================================================================
-
-msgid "SalomeApp_Application::MEN_WINDOWS_NEW"
-msgstr "New window"
-
-msgid "SalomeApp_Application::MEN_VIEW_WNDS"
-msgstr "Windows"
-
-//=======================================================================================
-
-msgid "SalomeApp_Application::PREF_GROUP_DEF_COLUMNS"
-msgstr "Default columns"
-
-msgid "SalomeApp_Application::PREF_OBJ_BROWSER_SETTINGS"
-msgstr "Settings"
-
-//=======================================================================================
-
-msgid "SalomeApp_Application::OBJ_BROWSER_NAME"
-msgstr "Object"
-
-msgid "SalomeApp_Application::OBJ_BROWSER_COLUMN_0"
-msgstr "Value"
-
-msgid "SalomeApp_Application::OBJ_BROWSER_COLUMN_1"
-msgstr "Entry"
-
-msgid "SalomeApp_Application::OBJ_BROWSER_COLUMN_2"
-msgstr "IOR"
-
-msgid "SalomeApp_Application::OBJ_BROWSER_COLUMN_3"
-msgstr "Reference entry"
-
-msgid "SalomeApp_Application::ALL_FILES_FILTER"
-msgstr "All files (*.*)"
-
-msgid "SalomeApp_Application::PYTHON_FILES_FILTER"
-msgstr "PYTHON Files (*.py)"
-
-msgid "SalomeApp_Application::STUDY_LOCKED"
-msgstr "LOCKED"
-
-msgid "SalomeApp_Application::QUE_DOC_ALREADYEXIST"
-msgstr "The document %1 already exists in study manager.\nDo you want to reload it ?"
-
-//=======================================================================================
-
-msgid "SalomeApp_StudyPropertiesDlg::PRP_MODE_FROM_SCRATCH"
-msgstr "from scratch"
-
-msgid "SalomeApp_StudyPropertiesDlg::PRP_MODE_FROM_COPYFROM"
-msgstr "copy from"
-
-msgid "SalomeApp_StudyPropertiesDlg::TLT_STUDY_PROPERTIES"
-msgstr "Study Properties"
-
-msgid "SalomeApp_StudyPropertiesDlg::PRP_AUTHOR"
-msgstr "Author"
-
-msgid "SalomeApp_StudyPropertiesDlg::PRP_DATE"
-msgstr "Created"
-
-msgid "SalomeApp_StudyPropertiesDlg::PRP_MODE"
-msgstr "Mode"
-
-msgid "SalomeApp_StudyPropertiesDlg::PRP_LOCKED"
-msgstr "Locked"
-
-msgid "SalomeApp_StudyPropertiesDlg::PRP_MODIFIED"
-msgstr "Modified"
-
-msgid "SalomeApp_StudyPropertiesDlg::PRP_MODIFICATIONS"
-msgstr "Modifications"
-
-msgid "SalomeApp_StudyPropertiesDlg::PRP_YES"
-msgstr "Yes"
-
-msgid "SalomeApp_StudyPropertiesDlg::PRP_NO"
-msgstr "No"
-
-//=======================================================================================
-
-msgid "SalomeApp_Application::PUBLISH_IN_STUDY"
-msgstr "Publish in study"
-
-msgid "SalomeApp_Application::WRN_DUMP_STUDY_FAILED"
-msgstr "Dump study failed"
-
-msgid "SalomeApp_Application::WRN_FILE_NAME_BAD"
-msgstr "Please enter correct file name"
-
-msgid "SAVE_POINT_OBJECT_TOOLTIP"
-msgstr "Saved GUI state: %1"
-
-msgid "SAVE_POINT_DEF_NAME"
-msgstr "GUI state: "
-
-msgid "SAVE_POINT_ROOT_TOOLTIP"
-msgstr "Persistent GUI states"
-
-msgid "SAVE_POINT_ROOT_NAME"
-msgstr "GUI states"
-
-msgid "CLOSE_LOCKED_STUDY"
-msgstr "Close locked study?"
-
-//=======================================================================================
-
-msgid "SalomeApp_Application::MEN_RESTORE_VS"
-msgstr "Restore"
-
-msgid "SalomeApp_Application::MEN_RENAME_VS"
-msgstr "Rename"
-
-msgid "SalomeApp_Application::MEN_DELETE_VS"
-msgstr "Delete"
-
-msgid "SalomeApp_Application::APPCLOSE_CAPTION"
-msgstr "Close study"
-
-msgid "SalomeApp_Application::APPCLOSE_DESCRIPTION"
-msgstr "Do you want to save or unload study before closing?"
-
-msgid "SalomeApp_Application::APPCLOSE_CLOSE"
-msgstr "&Close w/o saving"
-
-msgid "SalomeApp_Application::APPCLOSE_SAVE"
-msgstr "&Save && Close"
-
-msgid "SalomeApp_Application::APPCLOSE_UNLOAD"
-msgstr "&Unload"
-
-msgid "SalomeApp_ExitDlg::SHUTDOWN_SERVERS"
-msgstr "Shutdown standalone servers"
-
-msgid "SalomeApp_Application::ACTIVATE_MODULE_OP_LOAD"
-msgstr "&Load..."
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : InquireServersQThread.cxx
-// Author : Vasily RUSYAEV
-// Module : SALOME
-// $Header$
-
-#include "InquireServersQThread.h"
-
-#include <qapplication.h>
-#include <qpushbutton.h>
-#include <qabstractlayout.h>
-#include <qlayout.h>
-#include <qevent.h>
-#include <qfont.h>
-#include <qmessagebox.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-
-//VRV: porting on Qt 3.0.5
-#if QT_VERSION >= 0x030005
-#include <qdesktopwidget.h>
-#endif
-//VRV: porting on Qt 3.0.5
-
-#include <qsize.h>
-
-#include <SALOMEconfig.h>
-
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
-#include "SALOME_NamingService.hxx"
-#include "utilities.h"
-#include "OpUtil.hxx"
-
-using namespace std;
-
-#include CORBA_CLIENT_HEADER(SALOME_Session)
-#include CORBA_CLIENT_HEADER(SALOME_Registry)
-#include CORBA_CLIENT_HEADER(SALOMEDS)
-#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
-#include CORBA_CLIENT_HEADER(SALOME_Component)
-
-#define MARGIN_SIZE 5
-#define SPACING_SIZE 3
-
-/*!
- Constructor
-*/
-InquireServersGUI::InquireServersGUI()
- : QVBox(0, "SFA splash", Qt::WDestructiveClose | Qt::WStyle_Customize | Qt::WStyle_NoBorder | WType_TopLevel | WStyle_StaysOnTop | WX11BypassWM )
-{
- // myGUI = false;
- myThread = new InquireServersQThread( this );
-
- // 1. Polish the appearance
- setMargin( MARGIN_SIZE );
- setSpacing( SPACING_SIZE );
- setFrameStyle( QFrame::Plain | QFrame::Box );
- setLineWidth( 2 );
- setMinimumSize( 200, 150 );
-
- // 2. Set palette
- QPalette pal = palette();
- QColorGroup cg = pal.active();
- cg.setColor( QColorGroup::Foreground, Qt::darkBlue );
- cg.setColor( QColorGroup::Background, Qt::white );
- pal.setActive( cg ); pal.setInactive( cg ); pal.setDisabled( cg );
- setPalette( pal );
-
- // 2. Splash image
- mySplashFrame = new QFrame( this );
- mySplashFrame->setFrameStyle( QFrame::Box | QFrame::Raised );
- QHBoxLayout* frmLayout = new QHBoxLayout( mySplashFrame );
- frmLayout->setMargin( MARGIN_SIZE );
- mySplash = new QLabel( mySplashFrame, "splash" );
- frmLayout->addWidget( mySplash );
-
- // setting pixmap
- //QPixmap pix = SUIT_ResourceMgr( "SalomeApp" ).loadPixmap( "SalomeApp", tr( "ABOUT" ) );
- //splash->setPixmap( pix );
-
- // 3. Progress bar
- myPrgBar = new QProgressBar( this, "QProgressBar" );
- myPrgBar->setFixedWidth( 180 );
- //Sets the total number of steps .
- myPrgBar->setPercentageVisible( false );
- myPrgBar->setIndicatorFollowsStyle( false );
- myPrgBar->setFixedHeight( 8 );
- myPrgBar->setFrameStyle( QFrame::Box | QFrame::Plain );
- myPrgBar->setMargin( 0 );
- pal = myPrgBar->palette(); cg = pal.active();
- cg.setColor( QColorGroup::Highlight, Qt::red );
- pal.setActive( cg ); pal.setInactive( cg ); pal.setDisabled( cg ); myPrgBar->setPalette( pal );
- myPrgBar->setTotalSteps ( myThread->getInquiredServers() );
- myPrgBar->setProgress( 0 );
-
- // 4. Info label
- QWidget* aWgt1 = new QWidget( this );
- QHBoxLayout* aHBoxLayout1 = new QHBoxLayout( aWgt1 );
- myLabel = new QLabel( tr( "Loading:" ), aWgt1 );
- myLabel->setFixedWidth( 180 );
- myLabel->setAlignment( AlignLeft );
- QFont theFont = myLabel->font();
- theFont.setBold(true);
- myLabel->setFont( theFont );
- aHBoxLayout1->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
- aHBoxLayout1->addWidget( myLabel );
- aHBoxLayout1->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
-
- // 5. <Cancel> button
- QWidget* aWgt = new QWidget( this );
- QHBoxLayout* aHBoxLayout = new QHBoxLayout( aWgt );
- QPushButton* myCancelBtn = new QPushButton( tr( "Cancel" ), aWgt );
- connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ;
- aHBoxLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
- aHBoxLayout->addWidget( myCancelBtn );
- aHBoxLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
-
- //Center widget
-#if QT_VERSION >= 0x030005
- QDesktopWidget *d = QApplication::desktop();
-#else
- QWidget *d = QApplication::desktop();
-#endif
-//VRV: porting on Qt 3.0.5
-
- int w = d->width(); // returns desktop width
- int h = d->height(); // returns desktop height
- QSize mySize = sizeHint (); // returns widget size
- int Xc = ( w - mySize.width() ) / 2;
- int Yc = ( h - mySize.height() ) / 2;
- move( Xc, Yc );
-
- myThread->start();
-}
-
-/*!
- Sets pixmap of splash screen
- \param pix - new pixmap
-*/
-void InquireServersGUI::setPixmap( QPixmap pix )
-{
- if ( !pix.isNull() )
- {
- mySplash->setPixmap( pix );
- int w = mySplash->sizeHint().width() + MARGIN_SIZE*2;
- myPrgBar->setFixedWidth( w );
- myLabel->setFixedWidth( w );
- }
-}
-
-/*!
- Destructor
-*/
-InquireServersGUI::~InquireServersGUI()
-{
- delete myThread;
-}
-
-/*!
- Gets parameters from qApp
- \param _argc - variable to return number of arguments
- \param _argv - variable to return array of arguments
-*/
-void InquireServersGUI::getArgs( int& _argc, char *** _argv)
-{
- _argc = qApp->argc();
- *_argv = qApp->argv();
-}
-
-/*!
- Cancel loading of SALOME
-*/
-void InquireServersGUI::ClickOnCancel()
-{
- myThread->stop(); //it's necessary to stop asking servers
- hide();
- qApp->exit( 1 );
-}
-
-/*!
- Custom event filter
-*/
-void InquireServersGUI::customEvent( QCustomEvent* pe )
-{
- switch( pe->type() )
- {
- case InquireEvent::ProgressEvent:
- {
- int* value = ( int* )(( InquireEvent*)pe)->data();
- myPrgBar->setProgress( *value );
- break;
- }
- case InquireEvent::ProgressEventLabel:
- {
- QString* myString = ( QString* )(( InquireEvent*)pe)->data();
- myLabel->setText( *myString );
- break;
- }
- case InquireEvent::ProgressEventError:
- {
- QString* myErrDesc = ( QString* )(( InquireEvent*)pe)->data();
- QString appName = "SALOME Professional";
- QString error = "An internal error occurred.\n"+ *myErrDesc + "\n";
- QMessageBox myMsgBox(appName,error,QMessageBox::Critical,QMessageBox::Ok,QMessageBox::NoButton,
- QMessageBox::NoButton,0,"MY",TRUE,WStyle_DialogBorder|WStyle_StaysOnTop);
- myMsgBox.exec();
- ClickOnCancel();
- break;
- }
- default:
- {
- ;
- }
- }
-}
-
-/*!
- \return status of thread exit
-*/
-int InquireServersGUI::getExitStatus()
-{
- return myThread->getExitStatus();
-}
-
-/*!
- Constructor
-*/
-InquireServersQThread::InquireServersQThread( InquireServersGUI* r )
- : receiver(r), myExitStatus(0)
-{
- char* cenv;
-
- IsChecking = true;
- myServersCount = 5;
- //how many times we should repeat attempts to get response from all needed for launching SALOME servers
- myRepeat = 30; // default value, user can change it by setting CSF_RepeatServerRequest env.variable
- cenv = getenv( "CSF_RepeatServerRequest" );
- if ( cenv ) {
- int val = atoi( cenv );
- if ( val > 0 )
- myRepeat = val;
- }
- //define delay time between two attempts
- myDelay = 1000000; // 1 second
- QString str = "Loading: ";
- myMessages[0] = "Checking naming service...";
- myMessages[1] = str + "SALOME_Registry_Server" + "...";
- myMessages[2] = str + "SALOMEDS_Server" + "...";
- myMessages[3] = str + "SALOME_ModuleCatalog_Server" + "...";
- myMessages[4] = str + "SALOME_Session_Server" + "...";
- myMessages[5] = "";
- myMessages[6] = "";
- myMessages[7] = "";
-
- r->getArgs( _argc, &_argv);
-
- // NRI : Temporary solution for SuperVisionContainer
- for ( int i=1; i<=(_argc-1); i++) {
- if (strcmp(_argv[i],"CPP")==0) {
- myMessages[5] = str + "SALOME_Container FactoryServer" + "...";
- myServersCount++;
- }
- if (strcmp(_argv[i],"PY")==0) {
- myMessages[6] = str + "SALOME_ContainerPy.py FactoryServerPy" + "...";
- myServersCount++;
- }
- if (strcmp(_argv[i],"SUPERV")==0) {
- myMessages[7] = str + "SALOME_Container SuperVisionContainer" + "...";
- myServersCount++;
- }
-// if (strcmp(_argv[i],"GUI")==0) {
-// r->withGUI(true);
-// }
- }
-}
-
-/*!
- The main loop of this thread
-*/
-void InquireServersQThread::run()
-{
- while ( IsChecking && receiver )
- {
- for (int i=1; i<=8; i++)
- {
- if ( myMessages[i-1].isEmpty() )
- {
- if ( i==8 )
- {
- IsChecking = false;
- myExitStatus = 0; //myExitStatus should be 0 because all servers exist and work
- sleep( 1 ); // sleep( 1 second ) in order to see 100%. in other case it closes on 85%..
- break;
- }
- else
- continue;
- }
- QString *message = new QString(myMessages[i-1]);
- QThread::postEvent( receiver, new InquireEvent( ( QEvent::Type )InquireEvent::ProgressEventLabel, message ) );
- QThread::usleep(200000);
- QString *errMsg;
- bool result = AskServer(i,&errMsg);
- if (result)
- {
- QThread::postEvent( receiver, new InquireEvent( ( QEvent::Type )InquireEvent::ProgressEvent, new int( i ) ) );
- if ( i==8 )
- {
- IsChecking = false;
- myExitStatus = 0; //myExitStatus should be 0 because all servers exist and work
- sleep( 1 ); // sleep( 1 second ) in order to see 100%. in other case it closes on 85%..
- break;
- }
- }
- else
- {
- QThread::postEvent( receiver, new InquireEvent( ( QEvent::Type )InquireEvent::ProgressEventError, errMsg ) );
- stop();
- break;
- }
- }
- }
-
- receiver->hide();
- qApp->exit( myExitStatus );
-}
-
-/*!
- Stops this thread
-*/
-void InquireServersQThread::stop()
-{
- IsChecking = false;
- myExitStatus = 1;
-}
-
-/*!
- Destructor
-*/
-InquireServersQThread::~InquireServersQThread()
-{
-}
-
-bool InquireServersQThread::AskServer(int iteration, QString ** errMessage)
-{
- if ( iteration > myServersCount )
- return true; // we did not launch server with number iteration, so checking for it is not neccessary
-
- ASSERT(iteration<=myServersCount);
-
- //will be set true if we get response from server
- bool IsPassed = false;
- QString errDescription;
-#ifdef WNT
- int i;
-#endif
- switch (iteration)
- {
- case 1:
- //First checking - existence of Naming Service
-#ifndef WNT
- for (int i = myRepeat; i ; i--)
-#else
- for (i = myRepeat; i ; i--)
-#endif
- {
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init(_argc,_argv) ;
- CORBA::Object_var obj = orb->resolve_initial_references("NameService");
- CosNaming::NamingContext_var _root_context = CosNaming::NamingContext::_narrow(obj);
- if (CORBA::is_nil(_root_context))
- continue;
- else
- IsPassed = true;
- break;
- }
- catch(CORBA::COMM_FAILURE&)
- {
- MESSAGE("CORBA::COMM_FAILURE: unable to contact the naming service");
- }
- catch(...)
- {
- MESSAGE("Unknown Exception: unable to contact the naming service");
- }
- QThread::usleep(myDelay);
- }
- if (!IsPassed)
- *errMessage = new QString("unable to contact the naming service");
- break;
- case 2:
- //checking - existence of SALOME_Registry_Server
- case 3:
- //checking - existence of SALOMEDS_Server
- case 4:
- //checking - existence of SALOME_ModuleCatalog_Server
- case 5:
- //checking - existence of SALOME_Session_Server
- case 6:
- //checking - existence of SALOME_Container FactoryServer
- case 7:
- //checking - existence of SALOME_ContainerPy.py FactoryServerPy
- case 8:
- //checking - existence of SALOME_Container SuperVisionContainer
-
-
- IsPassed = pingServer(iteration, errDescription);
- if (!IsPassed)
- *errMessage = new QString(errDescription);
- break;
- }
-return IsPassed;
-}
-
-bool InquireServersQThread::pingServer(int iteration, QString& errMessage)
-{
- ASSERT(iteration<=myServersCount);
- bool result = false;
- QString errorDescr;
- for (int i = myRepeat; i ; i--)
- {
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init(_argc,_argv) ;
- SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance() ;
- ASSERT(SINGLETON_<SALOME_NamingService>::IsAlreadyExisting()) ;
- NS.init_orb( orb ) ;
- switch (iteration)
- {
- case 2:
- {
- CORBA::Object_var obj = NS.Resolve("/Registry");
- Registry::Components_var registry = Registry::Components::_narrow(obj) ;
- if (!CORBA::is_nil(registry))
- {
- MESSAGE("/Registry is found");
- registry->ping();
- result = true;
- MESSAGE("Registry was activated");
- return result;
- }
- }
- break;
- case 3:
- {
- CORBA::Object_var obj = NS.Resolve("/myStudyManager");
- SALOMEDS::StudyManager_var studyManager = SALOMEDS::StudyManager::_narrow(obj) ;
- if (!CORBA::is_nil(studyManager))
-
-
-
-
-
- {
- MESSAGE("/myStudyManager is found");
- studyManager->ping();
- result = true;
- MESSAGE("StudyManager was activated");
- return result;
- }
- }
- break;
- case 4:
- {
- CORBA::Object_var obj = NS.Resolve("/Kernel/ModulCatalog");
- SALOME_ModuleCatalog::ModuleCatalog_var catalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj) ;
- if (!CORBA::is_nil(catalog))
- {
- MESSAGE("/Kernel/ModulCatalog is found");
- catalog->ping();
- result = true;
- MESSAGE("ModuleCatalog was activated");
- return result;
- }
- }
- break;
- case 5:
- {
- CORBA::Object_var obj = NS.Resolve("/Kernel/Session");
- SALOME::Session_var session = SALOME::Session::_narrow(obj) ;
- if (!CORBA::is_nil(session))
- {
- MESSAGE("/Kernel/Session is found");
- session->ping();
- result = true;
- MESSAGE("SALOME_Session was activated");
- return result;
- }
- }
- break;
- case 6:
- {
- string hostname = GetHostname();
- string containerName = "/Containers/";
- containerName += hostname;
- containerName += "/FactoryServer";
-
- CORBA::Object_var obj = NS.Resolve(containerName.c_str());
- Engines::Container_var FScontainer = Engines::Container::_narrow(obj) ;
- if (!CORBA::is_nil(FScontainer))
- {
- FScontainer->ping();
- result = true;
- MESSAGE("FactoryServer container was activated");
- return result;
- }
- }
- break;
- case 7:
- {
- string hostname = GetHostname();
- string containerName = "/Containers/";
- containerName += hostname;
- containerName += "/FactoryServerPy";
-
- CORBA::Object_var obj = NS.Resolve(containerName.c_str());
- Engines::Container_var FSPcontainer = Engines::Container::_narrow(obj) ;
- if (!CORBA::is_nil(FSPcontainer))
- {
- FSPcontainer->ping();
- result = true;
- MESSAGE("FactoryServerPy container was activated");
- return result;
- }
- }
- break;
- case 8:
- {
- string hostname = GetHostname();
- string containerName = "/Containers/";
- containerName += hostname;
- containerName += "/SuperVisionContainer";
-
- CORBA::Object_var obj = NS.Resolve(containerName.c_str());
- Engines::Container_var SVcontainer = Engines::Container::_narrow(obj) ;
- if (!CORBA::is_nil(SVcontainer))
- {
- SVcontainer->ping();
-
- result = true;
- MESSAGE("SuperVisionContainer container was activated");
- return result;
- }
- }
- break;
- }
- }
- catch (ServiceUnreachable&)
- {
- MESSAGE("Caught exception: Naming Service Unreachable");
- errorDescr = "Caught exception: Naming Service Unreachable";
- }
- catch (CORBA::COMM_FAILURE&)
- {
- MESSAGE("Caught CORBA::SystemException CommFailure.");
- errorDescr = "Caught CORBA::SystemException CommFailure";
- }
- catch (CORBA::SystemException&)
- {
- MESSAGE("Caught CORBA::SystemException.");
- errorDescr = "Caught CORBA::SystemException";
- }
- catch (CORBA::Exception&)
- {
- MESSAGE("Caught CORBA::Exception.");
- errorDescr = "Caught CORBA::Exception";
- }
- catch (...)
- {
- MESSAGE("Caught unknown exception.");
- errorDescr = "Caught unknown exception";
- }
- QThread::usleep(myDelay);
- }
- if (!result)
- {
- QString serverName;
- switch (iteration)
- {
- case 2:
- serverName = "SALOME_Registry_Server is not loaded. ";
- break;
- case 3:
- serverName = "SALOMEDS_Server is not loaded. ";
- break;
- case 4:
- serverName = "SALOME_ModuleCatalog_Server is not loaded. ";
- break;
- case 5:
- serverName = "SALOME_Session_Server is not loaded. ";
- break;
- case 6:
- serverName = "SALOME_Container FactoryServer is not loaded. ";
- break;
- case 7:
- serverName = "SALOME_ContainerPy.py FactoryServerPy is not loaded. ";
- break;
- case 8:
- serverName = "SALOME_Container SuperVisionContainer is not loaded. ";
- break;
- }
- errMessage = serverName + errorDescr;
- }
- return result;
-}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : InquireServersQThread.h
-// Author : Vasily RUSYAEV
-// Module : SALOME
-
-#include <qthread.h>
-#include <qvbox.h>
-#include <qguardedptr.h>
-
-#include <SALOME_Session.hxx>
-
-/*!
- \class InquireEvent
- Contains QCustomEvents for posting to InquireServersQThread
-*/
-class SESSION_EXPORT InquireEvent : public QCustomEvent
-{
-public:
-
- enum myCustomEvents{ ProgressEvent = QEvent::User + 10, ProgressEventLabel, ProgressEventError };
-
- InquireEvent( QEvent::Type type , void* data = 0 )
- : QCustomEvent( type, data ) {}
- ~InquireEvent()
- {
- type() == (QEvent::Type)ProgressEvent ?
- delete ( int* )data() : delete ( QString* )data();
- }
-};
-
-class InquireServersGUI;
-
-class SESSION_EXPORT InquireServersQThread : public QThread
-{
-public:
- InquireServersQThread( InquireServersGUI* r );
- virtual ~InquireServersQThread();
-
- //the main loop of this thread
- virtual void run() ;
- //stop to ask servers
- void stop();
- //return exit status: 0 - OK, >0 - BAD (some servers doesn't exists or user click cancel button)
- int getExitStatus() { return myExitStatus;}
- //return count of inquired servers
- int getInquiredServers() { return myServersCount; }
-
-private:
-
-//functions:
-
- bool AskServer(int iteration, QString ** message);
- bool pingServer(int iteration, QString& errMessage);
-
-//variables:
-
- QGuardedPtr<InquireServersGUI> receiver;
- int _argc ;
- char ** _argv;
- //this variable is true if we are checking servers
- bool IsChecking;
- //count of inquired servers
- int myServersCount;
- //how many times we should repeat attempt to get response from all needed for launching SALOME servers
- int myRepeat;
- //define delay time between two attempts in microseconds
- int myDelay;
- //this strings' array contains messages for each server (e.g. "Loading: SALOMEDS_Server")
- QString myMessages[8];
- //exit status: 0 - OK, >0 - BAD (some servers doesn't exists or user click cancel button)
- int myExitStatus;
-
-} ;
-
-class QLabel;
-class QFrame;
-class QProgressBar;
-class SESSION_EXPORT InquireServersGUI : public QVBox
-{
- Q_OBJECT
-
-public:
- InquireServersGUI() ;
- ~InquireServersGUI();
-
- //returns arguments of QApplication
- //they are needed for CORBA servers initialization
- void getArgs( int& _argc, char *** _argv);
- //return exit status: 0 - OK, >0 - BAD (some servers doesn't exists or user click cancel button)
- int getExitStatus();
- //launch IAPP
- // bool withGUI() { return myGUI; }
- // void withGUI(bool gui) { myGUI = gui; }
-
- void setPixmap( QPixmap );
-
-protected:
- virtual void customEvent( QCustomEvent* );
-
-private:
- InquireServersQThread* myThread;
- QProgressBar* myPrgBar;
- //this string contains description of currently asked server
- QLabel* myLabel;
- QLabel* mySplash;
- QFrame* mySplashFrame;
- // bool myGUI;
-
-private slots:
-
- void ClickOnCancel();
-} ;
+++ /dev/null
-# SALOME Session : implementation of Session.idl
-#
-# Copyright (C) 2003 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
-#
-#
-#
-# File : Makefile.in
-# Author : Paul RASCLE, EDF
-# Module : SALOME
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libSalomeSession.la
-
-salomeinclude_HEADERS= \
- Session_Session_i.hxx \
- Session_ServerLauncher.hxx \
- Session_ServerThread.hxx \
- Session_ServerCheck.hxx \
- SalomeApp_Engine_i.hxx
-
-# Libraries targets
-
-dist_libSalomeSession_la_SOURCES= \
- Session_Session_i.cxx \
- Session_ServerThread.cxx \
- Session_ServerLauncher.cxx \
- Session_ServerCheck.cxx \
- SalomeApp_Engine_i.cxx
-
-libSalomeSession_la_CPPFLAGS= $(QT_MT_INCLUDES) $(PYTHON_INCLUDES) \
- $(HDF5_INCLUDES) $(BOOST_CPPFLAGS) @KERNEL_CXXFLAGS@ $(CAS_CPPFLAGS) \
- @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \
- -I$(top_builddir)/salome_adm/unix -I$(top_builddir)/idl \
- -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT -I$(srcdir)/../Event \
- @LIBXML_INCLUDES@
-
-libSalomeSession_la_LDFLAGS= $(QT_MT_LIBS) $(KERNEL_LDFLAGS) -lSalomeNS \
- -lSalomeLifeCycleCORBA -lOpUtil -lSALOMELocalTrace -lSalomeCatalog \
- -lSalomeDSClient $(CAS_KERNEL) -lwith_loggerTraceCollector \
- ../SUIT/libsuit.la ../Event/libEvent.la ../../idl/libSalomeIDLGUI.la
-
-# Executable
-bin_PROGRAMS= SALOME_Session_Server
-
-dist_SALOME_Session_Server_SOURCES= SALOME_Session_Server.cxx
-
-SALOME_Session_Server_CPPFLAGS= $(libSalomeSession_la_CPPFLAGS)
-SALOME_Session_Server_LDADD= $(libSalomeSession_la_LDFLAGS) $(OMNIORB_LIBS) \
- $(HDF5_LIBS) -lSalomeContainer -lSalomeResourcesManager -lTOOLSDS \
- -lSalomeHDFPersist -lSalomeDSImpl -lSalomeGenericObj -lRegistry \
- -lSalomeNotification -lSALOMEBasics -lSalomeLauncher ../Qtx/libqtx.la \
- $(top_builddir)/idl/libSalomeIDLGUI.la \
- libSalomeSession.la
-
-lib-hook:
- ln -sf $(top_builddir)/bin/salome/styles styles
-
-# ../SalomeApp/libSalomeApp.la
+++ /dev/null
-// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-// File : SALOME_Session.hxx
-// Author : Alexander A. BORODIN
-// Module : GUI
-
-#ifndef _SALOME_Session_HXX_
-#define _SALOME_Session_HXX_
-
-#ifdef WNT
- #if defined SESSION_EXPORTS
- #if defined WIN32
- #define SESSION_EXPORT __declspec( dllexport )
- #else
- #define SESSION_EXPORT
- #endif
- #else
- #if defined WIN32
- #define SESSION_EXPORT __declspec( dllimport )
- #else
- #define SESSION_EXPORT
- #endif
- #endif
-#else
- #define SESSION_EXPORT
-#endif
-
-#endif
+++ /dev/null
-// SALOME Session : implementation of Session.idl
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SALOME_Session_Server.cxx
-// Author : Paul RASCLE, EDF
-// Module : SALOME
-
-#include <Container_init_python.hxx>
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
-#include "SALOME_NamingService.hxx"
-#include "SALOMETraceCollector.hxx"
-
-#include "SALOME_ModuleCatalog_impl.hxx"
-#include "OpUtil.hxx"
-#include "RegistryService.hxx"
-#include "ConnectionManager_i.hxx"
-
-#include <iostream>
-#ifndef WNT
-#include <unistd.h>
-#include <iostream.h>
-#include <string.h>
-#endif
-
-#include <qdir.h>
-#include <qfile.h>
-#include <qapplication.h>
-#include <qwaitcondition.h>
-#include <qregexp.h>
-
-#include "Utils_SALOME_Exception.hxx"
-#include "Utils_CorbaException.hxx"
-#include "SALOME_Event.hxx"
-
-#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(SALOME_Session)
-#include CORBA_SERVER_HEADER(SALOMEDS)
-
-#include <utilities.h>
-#include "Session_Session_i.hxx"
-#include "Session_ServerLauncher.hxx"
-#include "Session_ServerCheck.hxx"
-
-#include <QtxSplash.h>
-#include "SUIT_Tools.h"
-#include "SUIT_Session.h"
-#include "SUIT_Application.h"
-#include "SUIT_Desktop.h"
-#include "SUIT_MessageBox.h"
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_ExceptionHandler.h"
-
-/*! - read arguments, define list of server to launch with their arguments.
- * - wait for naming service
- * - create and run a thread for launch of all servers
- *
-*/
-
-//! CORBA server for SALOME Session
-/*!
- * SALOME_Session Server launches a SALOME session servant.
- * The servant registers to the Naming Service.
- * See SALOME_Session.idl for interface specification.
- *
- * Main services offered by the servant are:
- * - launch GUI
- * - stop Session ( must be idle )
- * - get session state
- */
-
-PyObject* salome_shared_modules_module = 0;
-
-void MessageOutput( QtMsgType type, const char* msg )
-{
- switch ( type )
- {
- case QtDebugMsg:
- MESSAGE( "Debug: " << msg );
- break;
- case QtWarningMsg:
- MESSAGE( "Warning: " << msg );
- break;
- case QtFatalMsg:
- MESSAGE( "Fatal: " << msg );
- break;
- }
-}
-
-/* XPM */
-static const char* pixmap_not_found_xpm[] = {
-"16 16 3 1",
-" c None",
-". c #000000",
-"+ c #A80000",
-" ",
-" ",
-" . . ",
-" .+. .+. ",
-" .+++. .+++. ",
-" .+++.+++. ",
-" .+++++. ",
-" .+++. ",
-" .+++++. ",
-" .+++.+++. ",
-" .+++. .+++. ",
-" .+. .+. ",
-" . . ",
-" ",
-" ",
-" "};
-
-QString salomeVersion()
-{
- QString path( ::getenv( "GUI_ROOT_DIR" ) );
- if ( !path.isEmpty() )
- path += QDir::separator();
- path += QString( "bin/salome/VERSION" );
-
- QFile vf( path );
- if ( !vf.open( IO_ReadOnly ) )
- return QString::null;
-
- QString line;
- vf.readLine( line, 1024 );
- vf.close();
-
- if ( line.isEmpty() )
- return QString::null;
-
- while ( !line.isEmpty() && line.at( line.length() - 1 ) == QChar( '\n' ) )
- line.remove( line.length() - 1, 1 );
-
- QString ver;
- int idx = line.findRev( ":" );
- if ( idx != -1 )
- ver = line.mid( idx + 1 ).stripWhiteSpace();
-
- return ver;
-}
-
-class SALOME_ResourceMgr : public SUIT_ResourceMgr
-{
-public:
- SALOME_ResourceMgr( const QString& app, const QString& resVarTemplate ) : SUIT_ResourceMgr( app, resVarTemplate )
- {
- setCurrentFormat( "xml" );
- setOption( "translators", QString( "%P_msg_%L.qm|%P_icons.qm|%P_images.qm" ) );
- setDefaultPixmap( QPixmap( pixmap_not_found_xpm ) );
- }
- static void initResourceMgr()
- {
- if ( myExtAppName.isNull() || myExtAppVersion.isNull() ) {
- SALOME_ResourceMgr resMgr( "SalomeApp", QString( "%1Config" ) );
- resMgr.loadLanguage( "LightApp", "en" );
- resMgr.loadLanguage( "SalomeApp", "en" );
-
- myExtAppName = QObject::tr( "APP_NAME" ).stripWhiteSpace();
- if ( myExtAppName == "APP_NAME" || myExtAppName.lower() == "salome" )
- myExtAppName = "SalomeApp";
- myExtAppVersion = QObject::tr( "APP_VERSION" );
- if ( myExtAppVersion == "APP_VERSION" ) {
- if ( myExtAppName != "SalomeApp" )
- myExtAppVersion = "";
- else myExtAppVersion = salomeVersion();
- }
- }
- }
- QString version() const { return myExtAppVersion; }
-
-protected:
- QString userFileName( const QString& appName, const bool for_load ) const
- {
- if ( version().isNull() ) return "";
- return SUIT_ResourceMgr::userFileName( myExtAppName, for_load );
- }
-
- virtual int userFileId( const QString& _fname ) const
- {
- if ( !myExtAppName.isEmpty() ) {
- QRegExp exp( QString( "\\.%1rc\\.([a-zA-Z0-9.]+)$" ).arg( myExtAppName ) );
- QRegExp vers_exp( "^([0-9]+)([A-Za-z]?)([0-9]*)$" );
-
- QString fname = QFileInfo( _fname ).fileName();
- if( exp.exactMatch( fname ) ) {
- QStringList vers = QStringList::split( ".", exp.cap( 1 ) );
- int major=0, minor=0;
- major = vers[0].toInt();
- minor = vers[1].toInt();
- if( vers_exp.search( vers[2] )==-1 )
- return -1;
- int release = 0, dev1 = 0, dev2 = 0;
- release = vers_exp.cap( 1 ).toInt();
- dev1 = vers_exp.cap( 2 )[ 0 ].latin1();
- dev2 = vers_exp.cap( 3 ).toInt();
-
- int dev = dev1*100+dev2, id = major;
- id*=100; id+=minor;
- id*=100; id+=release;
- id*=10000;
- if ( dev > 0 ) id+=dev-10000;
- return id;
- }
- }
-
- return -1;
- }
-
-public:
- static QString myExtAppName;
- static QString myExtAppVersion;
-};
-
-QString SALOME_ResourceMgr::myExtAppName = QString::null;
-QString SALOME_ResourceMgr::myExtAppVersion = QString::null;
-
-class SALOME_Session : public SUIT_Session
-{
-public:
- SALOME_Session() : SUIT_Session() {}
- virtual ~SALOME_Session() {}
-
-protected:
- virtual SUIT_ResourceMgr* createResourceMgr( const QString& appName ) const
- {
- SALOME_ResourceMgr::initResourceMgr();
- SALOME_ResourceMgr* resMgr = new SALOME_ResourceMgr( appName, QString( "%1Config" ) );
- return resMgr;
- }
-};
-
-class SALOME_QApplication : public QApplication
-{
-public:
- SALOME_QApplication( int& argc, char** argv ) : QApplication( argc, argv ), myHandler ( 0 ) {}
-
- virtual bool notify( QObject* receiver, QEvent* e )
- {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) < 0x060101
- // Disable GUI user actions while python command is executed
- if (SUIT_Session::IsPythonExecuted()) {
- // Disable mouse and keyboard events
- QEvent::Type aType = e->type();
- if (aType == QEvent::MouseButtonPress || aType == QEvent::MouseButtonRelease ||
- aType == QEvent::MouseButtonDblClick || aType == QEvent::MouseMove ||
- aType == QEvent::Wheel || aType == QEvent::ContextMenu ||
- aType == QEvent::KeyPress || aType == QEvent::KeyRelease ||
- aType == QEvent::Accel || aType == QEvent::AccelOverride)
- return false;
- }
-#endif
-
- return myHandler ? myHandler->handle( receiver, e ) :
- QApplication::notify( receiver, e );
- }
- SUIT_ExceptionHandler* handler() const { return myHandler; }
- void setHandler( SUIT_ExceptionHandler* h ) { myHandler = h; }
-
-private:
- SUIT_ExceptionHandler* myHandler;
-};
-
-// class which calls SALOME::Session::GetInterface() from another thread
-// to avoid mutual lock ( if called from the same thread as main()
-class GetInterfaceThread : public QThread
-{
-public:
- GetInterfaceThread( SALOME::Session_var s ) : session ( s )
- {
- start();
- }
-protected:
- virtual void run()
- {
- if ( !CORBA::is_nil( session ) )
- session->GetInterface();
- else
- printf( "\nFATAL ERROR: SALOME::Session object is nil! Can not display GUI\n\n" );
- }
-private:
- SALOME::Session_var session;
-};
-
-// returns true if 'str' is found in argv
-bool isFound( const char* str, int argc, char** argv )
-{
- for ( int i = 1; i <= ( argc-1 ); i++ )
- if ( !strcmp( argv[i], str ) )
- return true;
- return false;
-}
-
-void killOmniNames()
-{
- QString fileName( ::getenv ("OMNIORB_CONFIG") );
- QString portNumber;
- if ( !fileName.isEmpty() )
- {
- QFile aFile( fileName );
- if ( aFile.open(IO_ReadOnly) ) {
- QRegExp re("InitRef = .*:([0-9]+)$");
- QTextStream stream ( &aFile );
- while ( !stream.atEnd() ) {
- QString textLine = stream.readLine();
- if ( re.search( textLine ) > -1 )
- portNumber = re.cap(1);
- }
- aFile.close();
- }
- }
-
- if ( !portNumber.isEmpty() )
- {
- QString cmd ;
- cmd = QString( "ps -eo pid,command | grep -v grep | grep -E \"omniNames.*%1\" | awk '{cmd=sprintf(\"kill -9 %s\",$1); system(cmd)}'" ).arg( portNumber );
- system ( cmd.latin1() );
- }
-
- /////////////////// NPAL 18309 (Kill Notifd) ////////////////////////////
- if ( !portNumber.isEmpty() )
- {
- QString cmd = QString("import pickle, os; ");
- cmd += QString("from killSalomeWithPort import getPiDict; ");
- cmd += QString("filedict=getPiDict(%1); ").arg(portNumber);
- cmd += QString("f=open(filedict, 'r'); ");
- cmd += QString("pids=pickle.load(f); ");
- cmd += QString("m={}; ");
- cmd += QString("[ m.update(i) for i in pids ]; ");
- cmd += QString("pids=filter(lambda a: 'notifd' in m[a], m.keys()); ");
- cmd += QString("[ os.kill(pid, 9) for pid in pids ]; ");
- cmd += QString("os.remove(filedict); ");
- cmd = QString("python -c \"%1\" > /dev/null").arg(cmd);
- system( cmd.latin1() );
- }
-
-}
-
-// shutdown standalone servers
-void shutdownServers( SALOME_NamingService* theNS )
-{
- // get each Container from NamingService => shutdown it
- // (the order is inverse to the order of servers initialization)
-
- CORBA::Object_var objS = theNS->Resolve("/Kernel/Session");
- SALOME::Session_var session = SALOME::Session::_narrow(objS);
- if (!CORBA::is_nil(session)) {
- session->ping();
-
- string hostname = GetHostname();
- //string containerName = "/Containers/" + hostname;
-
- // 1) SuperVisionContainer
- //string containerNameSV = containerName + "/SuperVisionContainer";
- //CORBA::Object_var objSV = theNS->Resolve(containerNameSV.c_str());
- //Engines::Container_var SVcontainer = Engines::Container::_narrow(objSV) ;
- //if ( !CORBA::is_nil(SVcontainer) && ( session->getPID() != SVcontainer->getPID() ) )
- // SVcontainer->Shutdown();
-
- // 2) FactoryServerPy
- //string containerNameFSP = containerName + "/FactoryServerPy";
- //CORBA::Object_var objFSP = theNS->Resolve(containerNameFSP.c_str());
- //Engines::Container_var FSPcontainer = Engines::Container::_narrow(objFSP) ;
- //if ( !CORBA::is_nil(FSPcontainer) && ( session->getPID() != FSPcontainer->getPID() ) )
- // FSPcontainer->Shutdown();
-
- // 3) FactoryServer
- //string containerNameFS = containerName + "/FactoryServer";
- //CORBA::Object_var objFS = theNS->Resolve(containerNameFS.c_str());
- //Engines::Container_var FScontainer = Engines::Container::_narrow(objFS) ;
- //if ( !CORBA::is_nil(FScontainer) && ( session->getPID() != FScontainer->getPID() ) )
- // FScontainer->Shutdown();
-
- // 4) ContainerManager
- //CORBA::Object_var objCM=theNS->Resolve("/ContainerManager");
- //Engines::ContainerManager_var contMan=Engines::ContainerManager::_narrow(objCM);
- //if ( !CORBA::is_nil(contMan) && ( session->getPID() != contMan->getPID() ) )
- // contMan->ShutdownWithExit();
-
- // 4) SalomeLauncher
- CORBA::Object_var objSL = theNS->Resolve("/SalomeLauncher");
- Engines::SalomeLauncher_var launcher = Engines::SalomeLauncher::_narrow(objSL);
- if (!CORBA::is_nil(launcher) && (session->getPID() != launcher->getPID()))
- launcher->Shutdown();
-
- // 5) ConnectionManager
- CORBA::Object_var objCnM=theNS->Resolve("/ConnectionManager");
- Engines::ConnectionManager_var connMan=Engines::ConnectionManager::_narrow(objCnM);
- if ( !CORBA::is_nil(connMan) && ( session->getPID() != connMan->getPID() ) )
- connMan->ShutdownWithExit();
-
- // 6) SALOMEDS
- CORBA::Object_var objSDS = theNS->Resolve("/myStudyManager");
- SALOMEDS::StudyManager_var studyManager = SALOMEDS::StudyManager::_narrow(objSDS) ;
- if ( !CORBA::is_nil(studyManager) && ( session->getPID() != studyManager->getPID() ) )
- studyManager->Shutdown();
-
- // 7) ModuleCatalog
- CORBA::Object_var objMC=theNS->Resolve("/Kernel/ModulCatalog");
- SALOME_ModuleCatalog::ModuleCatalog_var catalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow(objMC);
- if ( !CORBA::is_nil(catalog) && ( session->getPID() != catalog->getPID() ) )
- catalog->shutdown();
-
- // 8) Registry
- CORBA::Object_var objR = theNS->Resolve("/Registry");
- Registry::Components_var registry = Registry::Components::_narrow(objR);
- if ( !CORBA::is_nil(registry) && ( session->getPID() != registry->getPID() ) )
- registry->Shutdown();
-
- // 9) Kill OmniNames
- //killOmniNames();
- }
-}
-
-// ---------------------------- MAIN -----------------------
-int main( int argc, char **argv )
-{
- // Install Qt debug messages handler
- qInstallMsgHandler( MessageOutput );
-
- // Create Qt application instance;
- // this should be done the very first!
- SALOME_QApplication _qappl( argc, argv );
- ASSERT( QObject::connect( &_qappl, SIGNAL( lastWindowClosed() ), &_qappl, SLOT( quit() ) ) );
-
- // Add application library path (to search style plugin etc...)
- QString path = QDir::convertSeparators( SUIT_Tools::addSlash( QString( ::getenv( "GUI_ROOT_DIR" ) ) ) + QString( "bin/salome" ) );
- _qappl.addLibraryPath( path );
-
- // Set SALOME style to the application
- _qappl.setStyle( "salome" );
-
- bool isGUI = isFound( "GUI", argc, argv );
- bool isSplash = isFound( "SPLASH", argc, argv );
- // Show splash screen (only if both the "GUI" and "SPLASH" parameters are set)
- QtxSplash* splash = 0;
- if ( isGUI && isSplash ) {
- // ...create resource manager
- SUIT_ResourceMgr resMgr( "SalomeApp", QString( "%1Config" ) );
- resMgr.setCurrentFormat( "xml" );
- resMgr.loadLanguage( "LightApp", "en" );
- // ...get splash preferences
- QString splashIcon;
- resMgr.value( "splash", "image", splashIcon );
- QPixmap px( splashIcon );
- if ( px.isNull() ) // try to get splash pixmap from resources
- px = resMgr.loadPixmap( "LightApp", QObject::tr( "ABOUT_SPLASH" ) );
- if ( !px.isNull() ) {
- // ...set splash pixmap
- splash = QtxSplash::splash( px );
- // ... set margin
- int splashMargin;
- if ( resMgr.value( "splash", "margin", splashMargin ) && splashMargin > 0 ) {
- splash->setMargin( splashMargin );
- }
- // ...set splash text colors
- QString splashTextColors;
- if ( resMgr.value( "splash", "text_colors", splashTextColors ) && !splashTextColors.isEmpty() ) {
- QStringList colors = QStringList::split( "|", splashTextColors );
- QColor c1, c2;
- if ( colors.count() > 0 ) c1 = QColor( colors[0] );
- if ( colors.count() > 1 ) c2 = QColor( colors[1] );
- splash->setTextColors( c1, c2 );
- }
- else {
- splash->setTextColors( Qt::white, Qt::black );
- }
- // ...set splash progress colors
- QString splashProgressColors;
- if ( resMgr.value( "splash", "progress_colors", splashProgressColors ) && !splashProgressColors.isEmpty() ) {
- QStringList colors = QStringList::split( "|", splashProgressColors );
- QColor c1, c2;
- int gradType = QtxSplash::Vertical;
- if ( colors.count() > 0 ) c1 = QColor( colors[0] );
- if ( colors.count() > 1 ) c2 = QColor( colors[1] );
- if ( colors.count() > 2 ) gradType = colors[2].toInt();
- splash->setProgressColors( c1, c2, gradType );
- }
- // ...set splash text font
- QFont f = splash->font();
- f.setBold( true );
- splash->setFont( f );
- // ...show splash initial status
- QString splashInfo;
- if ( resMgr.value( "splash", "info", splashInfo, false ) && !splashInfo.isEmpty() ) {
- splashInfo.replace( QRegExp( "%A" ), QObject::tr( "APP_NAME" ) );
- splashInfo.replace( QRegExp( "%V" ), QObject::tr( "ABOUT_VERSION" ).arg( salomeVersion() ) );
- splashInfo.replace( QRegExp( "%L" ), QObject::tr( "ABOUT_LICENSE" ) );
- splashInfo.replace( QRegExp( "%C" ), QObject::tr( "ABOUT_COPYRIGHT" ) );
- splashInfo.replace( QRegExp( "\\\\n" ), "\n" );
- splash->message( splashInfo );
- }
- // ...set 'hide on click' flag
-#ifdef _DEBUG_
- splash->setHideOnClick( true );
-#endif
- // ...show splash
- splash->show();
- qApp->processEvents();
- }
- }
-
- // Initialization
- int result = -1;
-
- CORBA::ORB_var orb;
- PortableServer::POA_var poa;
-
- SUIT_Session* aGUISession = 0;
- SALOME_NamingService* _NS = 0;
- GetInterfaceThread* guiThread = 0;
- Session_ServerLauncher* myServerLauncher = 0;
-
- try {
- // ...initialize Python (only once)
- int _argc = 1;
- char* _argv[] = {""};
- KERNEL_PYTHON::init_python( _argc,_argv );
- PyEval_RestoreThread( KERNEL_PYTHON::_gtstate );
- if ( !KERNEL_PYTHON::salome_shared_modules_module ) // import only once
- KERNEL_PYTHON::salome_shared_modules_module = PyImport_ImportModule( "salome_shared_modules" );
- if ( !KERNEL_PYTHON::salome_shared_modules_module ) {
- INFOS( "salome_shared_modules_module == NULL" );
- PyErr_Print();
- }
- PyEval_ReleaseThread( KERNEL_PYTHON::_gtstate );
-
- // ...create ORB, get RootPOA object, NamingService, etc.
- ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance();
- ASSERT( SINGLETON_<ORB_INIT>::IsAlreadyExisting() );
- int orbArgc = 1;
- orb = init( orbArgc, argv );
-
- // ...install SALOME thread event handler
- SALOME_Event::GetSessionThread();
-
- CORBA::Object_var obj = orb->resolve_initial_references( "RootPOA" );
- poa = PortableServer::POA::_narrow( obj );
-
- PortableServer::POAManager_var pman = poa->the_POAManager();
- pman->activate() ;
- MESSAGE( "pman->activate()" );
-
- _NS = new SALOME_NamingService( orb );
-
- result = 0;
- }
- catch ( SALOME_Exception& e ) {
- INFOS( "run(): SALOME::SALOME_Exception is caught: "<<e.what() );
- }
- catch ( CORBA::SystemException& e ) {
- INFOS( "Caught CORBA::SystemException." );
- }
- catch ( CORBA::Exception& e ) {
- INFOS( "Caught CORBA::Exception." );
- CORBA::Any tmp;
- tmp<<= e;
- CORBA::TypeCode_var tc = tmp.type();
- const char *p = tc->name();
- INFOS ( "run(): CORBA exception of the kind : "<<p<< " is caught" );
- }
- catch ( exception& e ) {
- INFOS( "run(): An exception has been caught: " <<e.what() );
- }
- catch (...) {
- INFOS( "Caught unknown exception." );
- }
-
- QMutex _GUIMutex, _SessionMutex, _SplashMutex;
- QWaitCondition _ServerLaunch, _SessionStarted, _SplashStarted;
-
- // lock session mutex to ensure that GetInterface is not called
- // until all initialization is done
- _SessionMutex.lock();
-
- if ( !result ) {
- // Start embedded servers launcher (Registry, SALOMEDS, etc.)
- // ...lock mutex to block embedded servers launching thread until wait( mutex )
- _GUIMutex.lock();
- // ...create launcher
- myServerLauncher = new Session_ServerLauncher( argc, argv, orb, poa, &_GUIMutex, &_ServerLaunch, &_SessionMutex, &_SessionStarted );
- // ...block this thread until launcher is ready
- _ServerLaunch.wait( &_GUIMutex );
-
- // Start servers check thread (splash)
- if ( splash ) {
- // ...lock mutex to block splash thread until wait( mutex )
- _SplashMutex.lock();
- // ...create servers checking thread
- Session_ServerCheck sc( &_SplashMutex, &_SplashStarted );
- // ...block this thread until servers checking is finished
- _SplashStarted.wait( &_SplashMutex );
- // ...unlock mutex 'cause it is no more needed
- _SplashMutex.unlock();
- // get servers checking thread status
- result = splash->error();
- QString info = splash->message().isEmpty() ? "%1" : QString( "%1\n%2" ).arg( splash->message() );
- splash->setStatus( info.arg( "Activating desktop..." ) );
- }
-
- // Finalize embedded servers launcher
- // ...block this thread until launcher is finished
- _ServerLaunch.wait( &_GUIMutex );
- // ...unlock mutex 'cause it is no more needed
- _GUIMutex.unlock();
- }
-
- bool shutdown = false;
- if ( !result ) {
- // Launch GUI activator
- if ( isGUI ) {
- // ...retrieve Session interface reference
- CORBA::Object_var obj = _NS->Resolve( "/Kernel/Session" );
- SALOME::Session_var session = SALOME::Session::_narrow( obj ) ;
- ASSERT ( ! CORBA::is_nil( session ) );
- // ...create GUI launcher
- MESSAGE( "Session activated, Launch IAPP..." );
- guiThread = new GetInterfaceThread( session );
- }
-
- // GUI activation
- // Allow multiple activation/deactivation of GUI
- while ( true ) {
- MESSAGE( "waiting wakeAll()" );
- _SessionStarted.wait( &_SessionMutex ); // to be reseased by Launch server thread when ready:
- // atomic operation lock - unlock on mutex
- // unlock mutex: serverThread runs, calls _ServerLaunch->wakeAll()
- // this thread wakes up, and lock mutex
-
- _SessionMutex.unlock();
-
- // SUIT_Session creation
- aGUISession = new SALOME_Session();
-
- // Load SalomeApp dynamic library
- MESSAGE( "creation SUIT_Application" );
- SUIT_Application* aGUIApp = aGUISession->startApplication( "SalomeApp", 0, 0 );
- if ( aGUIApp )
- {
- if ( !isFound( "noexcepthandler", argc, argv ) )
- _qappl.setHandler( aGUISession->handler() ); // after loading SalomeApp application
- // aGUISession contains SalomeApp_ExceptionHandler
- // Run GUI loop
- MESSAGE( "run(): starting the main event loop" );
-
- if ( splash )
- splash->finish( aGUIApp->desktop() );
-
- result = _qappl.exec();
-
- if ( splash )
- delete splash;
- splash = 0;
-
- if ( result == SUIT_Session::NORMAL ) { // desktop is closed by user from GUI
- shutdown = aGUISession->exitFlags();
- break;
- }
- }
-
- delete aGUISession;
- aGUISession = 0;
-
- // Prepare _GUIMutex for a new GUI activation
- _SessionMutex.lock();
- }
- }
-
- // unlock Session mutex
- _SessionMutex.unlock();
-
- if ( shutdown )
- shutdownServers( _NS );
-
- if ( myServerLauncher )
- myServerLauncher->KillAll(); // kill embedded servers
-
- delete aGUISession;
- delete guiThread;
- delete myServerLauncher;
- delete _NS;
-
- PyGILState_STATE gstate = PyGILState_Ensure();
- Py_Finalize();
-
- try
- {
- orb->destroy();
- }
- catch(...)
- {
- //////////////////////////////////////////////////////////////
- // VSR: silently skip exception:
- // CORBA.BAD_INV_ORDER.BAD_INV_ORDER_ORBHasShutdown
- // exception is raised when orb->destroy() is called and
- // cpp continer is launched in the embedded mode
- //////////////////////////////////////////////////////////////
- // std::cerr << "Caught unexpected exception on destroy : ignored !!" << std::endl;
- }
-
- if ( shutdown )
- killOmniNames();
-
- return result;
-}
+++ /dev/null
-// SalomeApp_Engine_i : implementation of SalomeApp_Engine.idl
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SalomeApp_Engine_i.cxx
-// Author : Alexander SLADKOV
-// Module : SALOME
-// $Header$
-
-#include "SalomeApp_Engine_i.hxx"
-
-#include "SALOMEDS_Tool.hxx"
-
-#include "utilities.h"
-
-#include <iostream>
-
-using namespace std;
-
-SalomeApp_Engine_i* SalomeApp_Engine_i::myInstance = NULL;
-
-/*!
- Constructor
-*/
-SalomeApp_Engine_i::SalomeApp_Engine_i()
-{
- myInstance = this;
-}
-
-/*!
- Destructor
-*/
-SalomeApp_Engine_i::~SalomeApp_Engine_i()
-{
-}
-
-SALOMEDS::TMPFile* SalomeApp_Engine_i::Save (SALOMEDS::SComponent_ptr theComponent,
- const char* theURL,
- bool isMultiFile)
-{
- SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile;
-
- cout << "SalomeApp_Engine_i::Save() isMultiFile = " << isMultiFile << endl;
- if (CORBA::is_nil(theComponent) || CORBA::is_nil(theComponent->GetStudy()))
- return aStreamFile._retn();
-
- const int studyId = theComponent->GetStudy()->StudyId();
- cout << "SalomeApp_Engine_i::Save() - studyId = " << studyId << endl;
-
- // Get a temporary directory to store a file
- //std::string aTmpDir = isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir();
-
- if (myMap.count(studyId)) {
- cout << "SalomeApp_Engine_i::Save() - myMap.count(studyId)" << endl;
- MapOfListOfFiles mapOfListOfFiles = myMap[studyId];
- std::string componentName (theComponent->ComponentDataType());
- cout << "SalomeApp_Engine_i::Save() - componentName = " << componentName << endl;
- ListOfFiles listOfFiles = mapOfListOfFiles[componentName];
-
- // listOfFiles must contain temporary directory name in its first item
- // and names of files (relatively the temporary directory) in the others
- const int n = listOfFiles.size() - 1;
-
- if (n > 0) { // there are some files, containing persistent data of the component
- std::string aTmpDir = listOfFiles[0];
- cout << "SalomeApp_Engine_i::Save() - aTmpDir = " << aTmpDir << endl;
-
- // Create a list to store names of created files
- SALOMEDS::ListOfFileNames_var aSeq = new SALOMEDS::ListOfFileNames;
- aSeq->length(n);
- for (int i = 0; i < n; i++)
- aSeq[i] = CORBA::string_dup(listOfFiles[i + 1].c_str());
-
- // Convert a file to the byte stream
- aStreamFile = SALOMEDS_Tool::PutFilesToStream(aTmpDir.c_str(), aSeq.in(), isMultiFile);
-
- // Remove the files and tmp directory, created by the component storage procedure
- if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true);
- }
- }
-
- return aStreamFile._retn();
-}
-
-CORBA::Boolean SalomeApp_Engine_i::Load (SALOMEDS::SComponent_ptr theComponent,
- const SALOMEDS::TMPFile& theFile,
- const char* theURL,
- bool isMultiFile)
-{
- cout << "SalomeApp_Engine_i::Load() isMultiFile = " << isMultiFile << endl;
- if (CORBA::is_nil(theComponent) || CORBA::is_nil(theComponent->GetStudy()))
- return false;
-
- const int studyId = theComponent->GetStudy()->StudyId();
-
- // Create a temporary directory for the component's data files
- std::string aTmpDir = isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir();
-
- // Convert the byte stream theStream to a files and place them in the tmp directory.
- // The files and temporary directory must be deleted by the component loading procedure.
- SALOMEDS::ListOfFileNames_var aSeq =
- SALOMEDS_Tool::PutStreamToFiles(theFile, aTmpDir.c_str(), isMultiFile);
-
- // Store list of file names to be used by the component loading procedure
- const int n = aSeq->length() + 1;
- ListOfFiles listOfFiles (n);
- listOfFiles[0] = aTmpDir;
- for (int i = 1; i < n; i++)
- listOfFiles[i] = std::string(aSeq[i - 1]);
-
- //MapOfListOfFiles mapOfListOfFiles;
- //if (myMap.count(studyId))
- // mapOfListOfFiles = myMap[studyId];
- //std::string componentName (theComponent->ComponentDataType());
- //mapOfListOfFiles[componentName] = listOfFiles;
- //myMap[studyId] = mapOfListOfFiles;
-
- SetListOfFiles(listOfFiles, studyId, theComponent->ComponentDataType());
-
- return true;
-}
-
-SalomeApp_Engine_i::ListOfFiles SalomeApp_Engine_i::GetListOfFiles (const int theStudyId,
- const char* theComponentName)
-{
- ListOfFiles aListOfFiles;
-
- if (myMap.count(theStudyId))
- {
- MapOfListOfFiles mapOfListOfFiles = myMap[theStudyId];
- std::string componentName (theComponentName);
- if (mapOfListOfFiles.count(componentName))
- aListOfFiles = mapOfListOfFiles[componentName];
- }
-
- return aListOfFiles;
-}
-
-void SalomeApp_Engine_i::SetListOfFiles (const ListOfFiles theListOfFiles,
- const int theStudyId,
- const char* theComponentName)
-{
- //if (!myMap.count(theStudyId)) {
- // MapOfListOfFiles mapOfListOfFiles;
- // myMap[theStudyId] = mapOfListOfFiles;
- //}
-
- MapOfListOfFiles& mapOfListOfFiles = myMap[theStudyId];
- std::string componentName (theComponentName);
- mapOfListOfFiles[componentName] = theListOfFiles;
-}
-
-/*!
- \return shared instance of engine
-*/
-SalomeApp_Engine_i* SalomeApp_Engine_i::GetInstance()
-{
- return myInstance;
-}
+++ /dev/null
-// SalomeApp_Engine_i : implementation of SalomeApp_Engine.idl
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SalomeApp_Engine_i.hxx
-// Author : Alexander SLADKOV
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEAPP_ENGINE_I_HXX_
-#define _SALOMEAPP_ENGINE_I_HXX_
-
-#include <SALOME_Session.hxx>
-
-#include "SALOME_Component_i.hxx"
-
-#include <vector>
-#include <map>
-
-#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(SalomeApp_Engine)
-
-class SESSION_EXPORT SalomeApp_Engine_i: public POA_SalomeApp::Engine,
- public Engines_Component_i
-{
-public:
- SalomeApp_Engine_i();
- ~SalomeApp_Engine_i();
-
- SALOMEDS::TMPFile* Save( SALOMEDS::SComponent_ptr theComponent,
- const char* theURL,
- bool isMultiFile );
-
- CORBA::Boolean Load( SALOMEDS::SComponent_ptr theComponent,
- const SALOMEDS::TMPFile& theFile,
- const char* theURL,
- bool isMultiFile );
-
-public:
- typedef std::vector<std::string> ListOfFiles;
-
- ListOfFiles GetListOfFiles (const int theStudyId,
- const char* theComponentName);
-
- void SetListOfFiles (const ListOfFiles theListOfFiles,
- const int theStudyId,
- const char* theComponentName);
-
- static SalomeApp_Engine_i* GetInstance();
-
-public:
- // methods from SALOMEDS::Driver without implementation. Must be redefined because
- // there is no default implementation of SALOMEDS::Driver interface
- SALOMEDS::TMPFile* SaveASCII( SALOMEDS::SComponent_ptr, const char*, bool ) {return 0;}
- CORBA::Boolean LoadASCII( SALOMEDS::SComponent_ptr, const SALOMEDS::TMPFile&, const char*, bool ) {return 0;}
- void Close( SALOMEDS::SComponent_ptr ) {}
- char* ComponentDataType() {return 0;}
- char* IORToLocalPersistentID( SALOMEDS::SObject_ptr, const char*, CORBA::Boolean, CORBA::Boolean ) {return 0;}
- char* LocalPersistentIDToIOR( SALOMEDS::SObject_ptr, const char*, CORBA::Boolean, CORBA::Boolean ) {return 0;}
- bool CanPublishInStudy( CORBA::Object_ptr ) {return 0;}
- SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr, CORBA::Object_ptr, const char* ) throw (SALOME::SALOME_Exception) {return 0;}
- CORBA::Boolean CanCopy( SALOMEDS::SObject_ptr ) {return 0;}
- SALOMEDS::TMPFile* CopyFrom( SALOMEDS::SObject_ptr, CORBA::Long& ) {return 0;}
- CORBA::Boolean CanPaste( const char*, CORBA::Long ) {return 0;}
- SALOMEDS::SObject_ptr PasteInto( const SALOMEDS::TMPFile&, CORBA::Long, SALOMEDS::SObject_ptr ) {return 0;}
-
-private:
- typedef std::map<std::string, ListOfFiles> MapOfListOfFiles;
- typedef std::map<int, MapOfListOfFiles> MapOfMapOfListOfFiles;
- MapOfMapOfListOfFiles myMap;
-
- static SalomeApp_Engine_i* myInstance;
-};
-
-#endif
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: Session_ServerCheck.cxx
-// Author: Vadim SANDLER
-
-#include "Session_ServerCheck.hxx"
-#include <QtxSplash.h>
-
-#include <SALOMEconfig.h>
-#include CORBA_CLIENT_HEADER(SALOME_Session)
-#include CORBA_CLIENT_HEADER(SALOME_Registry)
-#include CORBA_CLIENT_HEADER(SALOMEDS)
-#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
-#include CORBA_CLIENT_HEADER(SALOME_Component)
-
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
-#include "SALOME_NamingService.hxx"
-#include "utilities.h"
-#include "OpUtil.hxx"
-
-// Default settings
-const int __DEFAULT__ATTEMPTS__ = 300; // number of checks attemtps
- // can be overrided by CSF_RepeatServerRequest
- // environment variable
-const int __DEFAULT__DELAY__ = 50000; // delay between attempts (microseconds)
- // can be overrided by CSF_DelayServerRequest
- // environment variable
-
-/*!
- Constructor
-*/
-Session_ServerCheck::Session_ServerCheck( QMutex* mutex, QWaitCondition* wc )
- : QThread(),
- myMutex( mutex ),
- myWC( wc ),
- myCheckCppContainer( false ),
- myCheckPyContainer( false ),
- myCheckSVContainer( false ),
- myAttempts( __DEFAULT__ATTEMPTS__ ),
- myDelay ( __DEFAULT__DELAY__ )
-{
- char* cenv;
- // try to get nb of attempts from environment variable
- if ( ( cenv = getenv( "CSF_RepeatServerRequest" ) ) && atoi( cenv ) > 0 )
- myAttempts = atoi( cenv );
- // try to get delay between attempts from environment variable
- if ( ( cenv = getenv( "CSF_DelayServerRequest" ) ) && atoi( cenv ) > 0 )
- myDelay = atoi( cenv );
-
- // check if it is necessary to wait containers
- for ( int i = 1; i < qApp->argc(); i++ ) {
- if ( !strcmp( qApp->argv()[i], "CPP" ) )
- myCheckCppContainer = true;
- if ( !strcmp( qApp->argv()[i], "PY" ) )
- myCheckPyContainer = true;
- if ( !strcmp( qApp->argv()[i], "SUPERV" ) )
- myCheckSVContainer = true;
- }
-
- // start thread
- start();
-}
-
-/*!
- Destructor
-*/
-Session_ServerCheck::~Session_ServerCheck()
-{
-}
-
-/*!
- Thread loop. Checnk SALOME servers and shows status message
- in the splash screen.
-*/
-void Session_ServerCheck::run()
-{
- // automatic locker
- class Locker
- {
- public:
- QMutex* _m;
- QWaitCondition* _wc;
- Locker( QMutex* m, QWaitCondition* wc ) : _m( m ), _wc( wc )
- {
- _m->lock();
- _m->unlock();
- }
- ~Locker()
- {
- _wc->wakeAll();
- }
- };
-
- // lock mutex (ensure splash is shown)
- Locker locker( myMutex, myWC );
-
- // set initial splash status
- QtxSplash* splash = QtxSplash::splash();
-
- int cnt = 5; // base servers
- if ( myCheckCppContainer ) cnt++; // + C++ container
- if ( myCheckPyContainer ) cnt++; // + Python container
- if ( myCheckSVContainer ) cnt++; // + supervision container
-
- splash->setProgress( 0, cnt * myAttempts );
- QString initialInfo = splash->message();
- QString info = initialInfo.isEmpty() ? "%1" : QString( "%1\n%2" ).arg( initialInfo );
-
- // start check servers
- int i;
- int current = 0;
- bool bOk;
- QString error;
- int argc = qApp->argc();
- char** argv = qApp->argv();
-
- // 1. Check naming service
- bOk = false;
- for ( i = 0; i < myAttempts ; i++ ) {
- QtxSplash::setStatus( info.arg( "Waiting for naming service..." ), current * myAttempts + i );
- QThread::usleep( i == 0 ? 50000 : myDelay );
- try {
- CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
- CORBA::Object_var obj = orb->resolve_initial_references( "NameService" );
- CosNaming::NamingContext_var _root_context = CosNaming::NamingContext::_narrow( obj );
- if ( !CORBA::is_nil( _root_context ) ) {
- bOk = true;
- break;
- }
- }
- catch( CORBA::COMM_FAILURE& ) {
- MESSAGE( "CORBA::COMM_FAILURE: unable to contact the naming service" );
- }
- catch( ... ) {
- MESSAGE( "Unknown Exception: unable to contact the naming service" );
- }
- }
- if ( !bOk ) {
- QtxSplash::error( "Unable to contact the naming service.\n%1" );
- return;
- }
- QtxSplash::setStatus( info.arg( "Waiting for naming service...OK" ), ++current * myAttempts );
- QThread::usleep( 30000 );
-
- // 2. Check registry server
- bOk = false;
- for ( i = 0; i < myAttempts ; i++ ) {
- QtxSplash::setStatus( info.arg( "Waiting for registry server..." ), current * myAttempts + i );
- QThread::usleep( i == 0 ? 50000 : myDelay );
- try {
- CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
- SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
- ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
- NS.init_orb( orb );
- CORBA::Object_var obj = NS.Resolve( "/Registry" );
- Registry::Components_var registry = Registry::Components::_narrow( obj );
- if ( !CORBA::is_nil( registry ) ) {
- MESSAGE( "/Registry is found" );
- registry->ping();
- MESSAGE( "Registry was activated" );
- bOk = true;
- break;
- }
- }
- catch ( ServiceUnreachable& ) {
- MESSAGE( "Caught exception: Naming Service unreachable." );
- error = "Naming service unreachable";
- }
- catch ( CORBA::COMM_FAILURE& ) {
- MESSAGE( "Caught CORBA::SystemException CommFailure." );
- error = "Caught CORBA::SystemException CommFailure.";
- }
- catch ( CORBA::SystemException& ) {
- MESSAGE( "Caught CORBA::SystemException." );
- error = "Caught CORBA::SystemException.";
- }
- catch ( CORBA::Exception& ) {
- MESSAGE( "Caught CORBA::Exception." );
- error = "Caught CORBA::Exception.";
- }
- catch (...) {
- MESSAGE( "Caught unknown exception." );
- error = "Caught unknown exception.";
- }
- }
- if ( !bOk ) {
- QtxSplash::error( QString( "Registry server is not found.\n%1" ).arg ( error ) );
- return;
- }
- QtxSplash::setStatus( info.arg( "Waiting for registry server...OK" ), ++current * myAttempts );
- QThread::usleep( 30000 );
-
- // 3. Check data server
- bOk = false;
- for ( i = 0; i < myAttempts ; i++ ) {
- QtxSplash::setStatus( info.arg( "Waiting for study server..." ), current * myAttempts + i );
- QThread::usleep( i == 0 ? 50000 : myDelay );
- try {
- CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
- SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
- ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
- NS.init_orb( orb );
- CORBA::Object_var obj = NS.Resolve( "/myStudyManager" );
- SALOMEDS::StudyManager_var studyManager = SALOMEDS::StudyManager::_narrow( obj );
- if ( !CORBA::is_nil( studyManager ) ) {
- MESSAGE( "/myStudyManager is found" );
- studyManager->ping();
- MESSAGE( "StudyManager was activated" );
- bOk = true;
- break;
- }
- }
- catch ( ServiceUnreachable& ) {
- MESSAGE( "Caught exception: Naming Service unreachable." );
- error = "Naming service unreachable";
- }
- catch ( CORBA::COMM_FAILURE& ) {
- MESSAGE( "Caught CORBA::SystemException CommFailure." );
- error = "Caught CORBA::SystemException CommFailure.";
- }
- catch ( CORBA::SystemException& ) {
- MESSAGE( "Caught CORBA::SystemException." );
- error = "Caught CORBA::SystemException.";
- }
- catch ( CORBA::Exception& ) {
- MESSAGE( "Caught CORBA::Exception." );
- error = "Caught CORBA::Exception.";
- }
- catch (...) {
- MESSAGE( "Caught unknown exception." );
- error = "Caught unknown exception.";
- }
- }
- if ( !bOk ) {
- QtxSplash::error( QString( "Study server is not found.\n%1" ).arg ( error ) );
- return;
- }
- QtxSplash::setStatus( info.arg( "Waiting for study server...OK" ), ++current * myAttempts );
- QThread::usleep( 30000 );
-
- // 4. Check module catalogue server
- bOk = false;
- for ( i = 0; i < myAttempts ; i++ ) {
- QtxSplash::setStatus( info.arg( "Waiting for module catalogue server..." ), current * myAttempts + i );
- QThread::usleep( i == 0 ? 50000 : myDelay );
- try {
- CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
- SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
- ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
- NS.init_orb( orb );
- CORBA::Object_var obj = NS.Resolve( "/Kernel/ModulCatalog" );
- SALOME_ModuleCatalog::ModuleCatalog_var catalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow( obj );
- if ( !CORBA::is_nil( catalog ) ){
- MESSAGE( "/Kernel/ModulCatalog is found" );
- catalog->ping();
- MESSAGE( "ModuleCatalog was activated" );
- bOk = true;
- break;
- }
- }
- catch ( ServiceUnreachable& ) {
- MESSAGE( "Caught exception: Naming Service unreachable." );
- error = "Naming service unreachable";
- }
- catch ( CORBA::COMM_FAILURE& ) {
- MESSAGE( "Caught CORBA::SystemException CommFailure." );
- error = "Caught CORBA::SystemException CommFailure.";
- }
- catch ( CORBA::SystemException& ) {
- MESSAGE( "Caught CORBA::SystemException." );
- error = "Caught CORBA::SystemException.";
- }
- catch ( CORBA::Exception& ) {
- MESSAGE( "Caught CORBA::Exception." );
- error = "Caught CORBA::Exception.";
- }
- catch (...) {
- MESSAGE( "Caught unknown exception." );
- error = "Caught unknown exception.";
- }
- }
- if ( !bOk ) {
- QtxSplash::error( QString( "Module catalogue server is not found.\n%1" ).arg ( error ) );
- return;
- }
- QtxSplash::setStatus( info.arg( "Waiting for module catalogue server...OK" ), ++current * myAttempts );
- QThread::usleep( 30000 );
-
- // 5. Check data server
- bOk = false;
- for ( i = 0; i < myAttempts ; i++ ) {
- QtxSplash::setStatus( info.arg( "Waiting for session server..." ), current * myAttempts + i );
- QThread::usleep( i == 0 ? 50000 : myDelay );
- try {
- CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
- SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
- ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
- NS.init_orb( orb );
- CORBA::Object_var obj = NS.Resolve( "/Kernel/Session" );
- SALOME::Session_var session = SALOME::Session::_narrow( obj );
- if ( !CORBA::is_nil( session ) ) {
- MESSAGE( "/Kernel/Session is found" );
- session->ping();
- MESSAGE( "SALOME_Session was activated" );
- bOk = true;
- break;
- }
- }
- catch ( ServiceUnreachable& ) {
- MESSAGE( "Caught exception: Naming Service unreachable." );
- error = "Naming service unreachable";
- }
- catch ( CORBA::COMM_FAILURE& ) {
- MESSAGE( "Caught CORBA::SystemException CommFailure." );
- error = "Caught CORBA::SystemException CommFailure.";
- }
- catch ( CORBA::SystemException& ) {
- MESSAGE( "Caught CORBA::SystemException." );
- error = "Caught CORBA::SystemException.";
- }
- catch ( CORBA::Exception& ) {
- MESSAGE( "Caught CORBA::Exception." );
- error = "Caught CORBA::Exception.";
- }
- catch (...) {
- MESSAGE( "Caught unknown exception." );
- error = "Caught unknown exception.";
- }
- }
- if ( !bOk ) {
- QtxSplash::error( QString( "Session server is not found.\n%1" ).arg ( error ) );
- return;
- }
- QtxSplash::setStatus( info.arg( "Waiting for session server...OK" ), ++current * myAttempts );
- QThread::usleep( 30000 );
-
- // 6. Check C++ container
- if ( myCheckCppContainer ) {
- bOk = false;
- for ( i = 0; i < myAttempts ; i++ ) {
- QtxSplash::setStatus( info.arg( "Waiting for C++ container..." ), current * myAttempts + i );
- QThread::usleep( i == 0 ? 50000 : myDelay );
- try {
- CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
- SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
- ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
- NS.init_orb( orb );
- QString containerName = QString( "/Containers/%1/FactoryServer" ).arg( GetHostname().c_str() );
- CORBA::Object_var obj = NS.Resolve( containerName.latin1() );
- Engines::Container_var FScontainer = Engines::Container::_narrow( obj );
- if ( !CORBA::is_nil( FScontainer ) ) {
- MESSAGE( containerName.latin1() << " is found" );
- FScontainer->ping();
- MESSAGE( "FactoryServer container was activated" );
- bOk = true;
- break;
- }
- }
- catch ( ServiceUnreachable& ) {
- MESSAGE( "Caught exception: Naming Service unreachable." );
- error = "Naming service unreachable";
- }
- catch ( CORBA::COMM_FAILURE& ) {
- MESSAGE( "Caught CORBA::SystemException CommFailure." );
- error = "Caught CORBA::SystemException CommFailure.";
- }
- catch ( CORBA::SystemException& ) {
- MESSAGE( "Caught CORBA::SystemException." );
- error = "Caught CORBA::SystemException.";
- }
- catch ( CORBA::Exception& ) {
- MESSAGE( "Caught CORBA::Exception." );
- error = "Caught CORBA::Exception.";
- }
- catch (...) {
- MESSAGE( "Caught unknown exception." );
- error = "Caught unknown exception.";
- }
- }
- if ( !bOk ) {
- QtxSplash::error( QString( "C++ container is not found.\n%1" ).arg ( error ) );
- return;
- }
- QtxSplash::setStatus( info.arg( "Waiting for C++ container...OK" ), ++current * myAttempts );
- QThread::usleep( 30000 );
- }
-
- // 7. Check Python container
- if ( myCheckPyContainer ) {
- bOk = false;
- for ( i = 0; i < myAttempts ; i++ ) {
- QtxSplash::setStatus( info.arg( "Waiting for Python container..." ), current * myAttempts + i );
- QThread::usleep( i == 0 ? 50000 : myDelay );
- try {
- CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
- SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
- ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
- NS.init_orb( orb );
- QString containerName = QString( "/Containers/%1/FactoryServerPy" ).arg( GetHostname().c_str() );
- CORBA::Object_var obj = NS.Resolve( containerName.latin1() );
- Engines::Container_var FSPcontainer = Engines::Container::_narrow( obj );
- if ( !CORBA::is_nil( FSPcontainer ) ) {
- MESSAGE( containerName.latin1() << " is found" );
- FSPcontainer->ping();
- MESSAGE("FactoryServerPy container was activated");
- bOk = true;
- break;
- }
- }
- catch ( ServiceUnreachable& ) {
- MESSAGE( "Caught exception: Naming Service unreachable." );
- error = "Naming service unreachable";
- }
- catch ( CORBA::COMM_FAILURE& ) {
- MESSAGE( "Caught CORBA::SystemException CommFailure." );
- error = "Caught CORBA::SystemException CommFailure.";
- }
- catch ( CORBA::SystemException& ) {
- MESSAGE( "Caught CORBA::SystemException." );
- error = "Caught CORBA::SystemException.";
- }
- catch ( CORBA::Exception& ) {
- MESSAGE( "Caught CORBA::Exception." );
- error = "Caught CORBA::Exception.";
- }
- catch (...) {
- MESSAGE( "Caught unknown exception." );
- error = "Caught unknown exception.";
- }
- }
- if ( !bOk ) {
- QtxSplash::error( QString( "Python container is not found.\n%1" ).arg ( error ) );
- return;
- }
- QtxSplash::setStatus( info.arg( "Waiting for Python container...OK" ), ++current * myAttempts );
- QThread::usleep( 30000 );
- }
-
- // 8. Check supervision container
- if ( myCheckSVContainer ) {
- bOk = false;
- for ( i = 0; i < myAttempts ; i++ ) {
- QtxSplash::setStatus( info.arg( "Waiting for Supervision container..." ), current * myAttempts + i );
- QThread::usleep( i == 0 ? 50000 : myDelay );
- try {
- CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
- SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
- ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
- NS.init_orb( orb );
- QString containerName = QString( "/Containers/%1/SuperVisionContainer" ).arg( GetHostname().c_str() );
- CORBA::Object_var obj = NS.Resolve( containerName.latin1() );
- Engines::Container_var SVcontainer = Engines::Container::_narrow( obj );
- if ( !CORBA::is_nil( SVcontainer ) ) {
- MESSAGE( containerName.latin1() << " is found" );
- SVcontainer->ping();
- MESSAGE("SuperVisionContainer container was activated");
- bOk = true;
- break;
- }
- }
- catch ( ServiceUnreachable& ) {
- MESSAGE( "Caught exception: Naming Service unreachable." );
- error = "Naming service unreachable";
- }
- catch ( CORBA::COMM_FAILURE& ) {
- MESSAGE( "Caught CORBA::SystemException CommFailure." );
- error = "Caught CORBA::SystemException CommFailure.";
- }
- catch ( CORBA::SystemException& ) {
- MESSAGE( "Caught CORBA::SystemException." );
- error = "Caught CORBA::SystemException.";
- }
- catch ( CORBA::Exception& ) {
- MESSAGE( "Caught CORBA::Exception." );
- error = "Caught CORBA::Exception.";
- }
- catch (...) {
- MESSAGE( "Caught unknown exception." );
- error = "Caught unknown exception.";
- }
- }
- if ( !bOk ) {
- QtxSplash::error( QString( "Supervision container is not found.\n%1" ).arg ( error ) );
- return;
- }
- QtxSplash::setStatus( info.arg( "Waiting for Supervision container...OK" ), ++current * myAttempts );
- QThread::usleep( 30000 );
- }
- // clear splash status
- splash->setProgress( 0, 0 );
- splash->setStatus( initialInfo );
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File: Session_ServerCheck.hxx
-// Author: Vadim SANDLER
-
-#if !defined(SESSION_SERVERCHECK_HXX)
-#define SESSION_SERVERCHECK_HXX
-
-#include <SALOME_Session.hxx>
-
-#include <qthread.h>
-#include <qapplication.h>
-
-class QMutex;
-class QWaitCondition;
-
-/*!
- Class Session_ServerCheck : check SALOME servers
-*/
-class SESSION_EXPORT Session_ServerCheck : public QThread
-{
-public:
- // constructor
- Session_ServerCheck( QMutex*, QWaitCondition* );
- // destructor
- virtual ~Session_ServerCheck();
-
- // thread loop
- virtual void run() ;
-
-private:
- QMutex* myMutex; // splash mutex
- QWaitCondition* myWC; // splash wait condition
-
- bool myCheckCppContainer; // flag : check C++ container ?
- bool myCheckPyContainer; // flag : check Python container ?
- bool myCheckSVContainer; // flag : check supervision container ?
- int myAttempts; // number of checks attemtps to get response from server
- int myDelay; // delay between two attempts in microseconds
-};
-
-#endif
+++ /dev/null
-// SALOME Session : implementation of Session_ServerLauncher.cxx
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : Session_ServerLauncher.xx
-// Author : Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-
-#include "Session_ServerLauncher.hxx"
-
-#include "Utils_SALOME_Exception.hxx"
-#include "utilities.h"
-using namespace std;
-/*!
- default constructor not for use
- */
-Session_ServerLauncher::Session_ServerLauncher()
-{
- ASSERT(0); // must not be called
-}
-
-/*!
- constructor
-*/
-Session_ServerLauncher::Session_ServerLauncher(int argc,
- char ** argv,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- QMutex *GUIMutex,
- QWaitCondition *ServerLaunch,
- QMutex *SessionMutex,
- QWaitCondition *SessionStarted)
-{
- _argc = argc;
- _argv = argv;
- _orb = CORBA::ORB::_duplicate(orb);
- _root_poa = PortableServer::POA::_duplicate(poa);
- _GUIMutex = GUIMutex;
- _ServerLaunch = ServerLaunch;
- _SessionMutex = SessionMutex;
- _SessionStarted = SessionStarted;
-
- // start thread
- start();
-}
-
-/*!
- destructor
-*/
-Session_ServerLauncher::~Session_ServerLauncher()
-{
-}
-
-/*!
- Check args and activate servers
-*/
-void Session_ServerLauncher::run()
-{
- // wait until main thread is ready
- _GUIMutex->lock(); // ... lock mutex (it is unlocked my calling thread
- // wait condition's wait(mutex)
- _GUIMutex->unlock(); // ... and unlock it 'cause it is not more needed
-
- // wake main thread
- _ServerLaunch->wakeAll();
-
- CheckArgs();
- ActivateAll();
-
- // wait until main thread is ready
- _GUIMutex->lock(); // ... lock mutex (it is unlocked my calling thread
- // wait condition's wait(mutex)
- _GUIMutex->unlock(); // ... and unlock it 'cause it is not more needed
-
- // wake main thread
- _ServerLaunch->wakeAll();
-
- // run ORB
- //_orb->run(); // No need to call orb->run() : it waits on a lock. Qt is already waiting in the mainloop.
-}
-
-/*!
- controls and dispatchs arguments given with command
-*/
-void Session_ServerLauncher::CheckArgs()
-{
- int argState = 0;
- ServArg aServArg(0,0,0);
- _argCopy.reserve(_argc);
- for (int iarg=0; iarg <_argc; iarg++)
- {
- SCRUTE(iarg);
- SCRUTE(_argv[iarg]);
- _argCopy.push_back(_argv[iarg]);
- switch (argState)
- {
- case 0: // looking for "--with"
- {
- if (strcmp(_argv[iarg],"--with")==0)
- argState = 1;
- break;
- }
- case 1: // looking for server type
- {
- for (int i=0; i<Session_ServerThread::NB_SRV_TYP; i++)
- if (strcmp(_argv[iarg],Session_ServerThread::_serverTypes[i])==0)
- {
- aServArg._servType = i;
- argState = 2;
- break;
- }
- break;
- }
- case 2: // looking for "("
- {
- if (strcmp(_argv[iarg],"(")!=0)
- {
- INFOS("parenthesis '(' is required here...");
- for (int i=0; i<iarg; i++)
- cerr << _argv[i] << " ";
- cerr << endl;
- throw SALOME_Exception(LOCALIZED("Error in command arguments, missing prenthesis"));
- }
- else
- {
- aServArg._firstArg=iarg+1; // arg after '('
- argState = 3;
- }
- break;
- }
- case 3: // looking for arguments
- {
- if (strcmp(_argv[iarg],")")==0) // end of arguments = ')'
- {
- aServArg._lastArg=iarg-1; // arg before ')'
- MESSAGE("server : "<< Session_ServerThread::_serverTypes[aServArg._servType]);
- for (int i=aServArg._firstArg; i<=aServArg._lastArg; i++)
- MESSAGE(" arg : " << _argCopy[i]);
- _argServToLaunch.push_back(aServArg);
- argState = 0;
- }
- break;
- }
- default:
- {
- ASSERT(0);
- break;
- }
- }
- }
- if (argState == 1)
- throw SALOME_Exception(LOCALIZED("Error in command arguments, missing server type"));
- if (argState == 2)
- throw SALOME_Exception(LOCALIZED("Error in command arguments, missing parenthesis '('"));
- if (argState == 3)
- throw SALOME_Exception(LOCALIZED("Error in command arguments, missing parenthesis ')'"));
-}
-
-void Session_ServerLauncher::ActivateAll()
-{
- list<ServArg>::iterator itServ;
- for (itServ = _argServToLaunch.begin(); itServ !=_argServToLaunch.end(); itServ++)
- {
- int argc = 2 + (*itServ)._lastArg - (*itServ)._firstArg;
- char** argv = new char*[argc+1];
- argv[argc]=0; // for Engines_Container_i constructor...
- int servType = (*itServ)._servType;
- argv[0]=strdup(Session_ServerThread::_serverTypes[servType]);
- if (argc>1)
- {
- for (int i=0; i<argc-1; i++)
- //argv[i+1] = _argCopy[(*itServ)._firstArg + i].c_str();
- argv[i+1] = _argv[(*itServ)._firstArg + i];
- }
-
- MESSAGE("*** activating [" << argc << "] : " << argv[0]);
-
- Session_ServerThread* aServerThread
- = new Session_ServerThread(argc, argv, _orb,_root_poa);
- _serverThreads.push_front(aServerThread);
-
- aServerThread->Init();
- free( argv[0] );
- delete[] argv;
- }
-
- // Always launch Session Server
- MESSAGE("*** activating [ SESSION ] ");
-
- int argc=1;
- char** argv = new char*[argc];
- argv[0] = "Session";
- Session_SessionThread* aServerThread
- = new Session_SessionThread(argc, argv, _orb,_root_poa,_SessionMutex,_SessionStarted);
- _serverThreads.push_front(aServerThread);
- aServerThread->Init();
- delete[] argv;
-}
-
-/*!
- Destruction des classes serveur dans l'ordre inverse de creation
-*/
-void Session_ServerLauncher::KillAll()
-{
- MESSAGE("Session_ServerLauncher::KillAll()");
- list<Session_ServerThread*>::reverse_iterator itServ;
- for (itServ = _serverThreads.rbegin(); itServ !=_serverThreads.rend(); itServ++)
- {
- delete (*itServ);
- }
-}
+++ /dev/null
-// SALOME Session : implementation of Session_ServerLauncher.hxx
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : Session_ServerLauncher.hxx
-// Author : Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-
-#ifndef _SESSION_SERVERLAUNCHER_HXX_
-#define _SESSION_SERVERLAUNCHER_HXX_
-
-#include <SALOME_Session.hxx>
-
-#include "Session_ServerThread.hxx"
-
-#include <CORBA.h>
-#include <list>
-#include <vector>
-#include <string>
-#include <qthread.h>
-#include <qwaitcondition.h>
-
-using namespace std;
-
-class SESSION_EXPORT ServArg
- {
- public:
- int _servType;
- int _firstArg;
- int _lastArg;
- inline ServArg(int servType=0, int firstArg=0, int lastArg=0);
-};
-
-inline ServArg::ServArg(int servType, int firstArg, int lastArg):
- _servType(servType),_firstArg(firstArg),_lastArg(lastArg)
-{}
-
-class SESSION_EXPORT Session_ServerLauncher: public QThread
-{
-public:
- Session_ServerLauncher();
- Session_ServerLauncher(int argc,
- char ** argv,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- QMutex *GUIMutex,
- QWaitCondition *ServerLaunch,
- QMutex *SessionMutex,
- QWaitCondition *SessionStarted);
- virtual ~Session_ServerLauncher();
- void run();
- void KillAll();
-
-protected:
- void CheckArgs();
- void ActivateAll();
-
-private:
- int _argc;
- char ** _argv;
- CORBA::ORB_var _orb;
- PortableServer::POA_var _root_poa;
- QMutex* _GUIMutex;
- QWaitCondition* _ServerLaunch;
- QMutex* _SessionMutex;
- QWaitCondition* _SessionStarted;
- list<ServArg> _argServToLaunch;
- vector<string> _argCopy;
- list<Session_ServerThread*> _serverThreads;
-};
-
-#endif
-
+++ /dev/null
-// SALOME Session : implementation of Session_ServerThread.cxx
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : Session_ServerThread.cxx
-// Author : Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-
-// #include <SALOMEconfig.h>
-// #include CORBA_SERVER_HEADER(SALOME_Session)
-// #include CORBA_SERVER_HEADER(SALOMEDS)
-
-#include "Session_ServerThread.hxx"
-
-#include "SALOME_Container_i.hxx"
-#include "SALOME_Launcher.hxx"
-#include <SALOMEDSClient.hxx>
-#include <SALOMEDSClient_ClientFactory.hxx>
-#include "SALOME_ModuleCatalog_impl.hxx"
-#include "RegistryService.hxx"
-#include "Session_Session_i.hxx"
-#include "SalomeApp_Engine_i.hxx"
-
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
-#include "Utils_SALOME_Exception.hxx"
-#include "OpUtil.hxx"
-#include "NamingService_WaitForServerReadiness.hxx"
-#include "utilities.h"
-
-#include <cstdlib>
-#include <ctime>
-
-using namespace std;
-
-const int Session_ServerThread::NB_SRV_TYP = 7;
-const char* Session_ServerThread::_serverTypes[NB_SRV_TYP] = {"Container",
- "ModuleCatalog",
- "Registry",
- "SALOMEDS",
- "Session",
- "SalomeAppEngine",
- "ContainerManager"};
-
-/*!
- default constructor not for use
-*/
-Session_ServerThread::Session_ServerThread()
-{
- ASSERT(0); // must not be called
-}
-
-/*!
- constructor
-*/
-Session_ServerThread::Session_ServerThread(int argc,
- char ** argv,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa)
-{
- //MESSAGE("Session_ServerThread Constructor " << argv[0]);
- _argc = argc;
- _argv = new char*[ _argc + 1 ];
- _argv[_argc] = 0;
- for (int i = 0; i < _argc; i++ )
- _argv[i] = strdup( argv[i] );
-
- _orb = CORBA::ORB::_duplicate(orb);
- _root_poa = PortableServer::POA::_duplicate(poa);
- _servType =-1;
- _NS = new SALOME_NamingService(_orb); // one instance per server to limit
- // multi thread coherence problems
-}
-
-/*!
- destructor
-*/
-Session_ServerThread::~Session_ServerThread()
-{
- //MESSAGE("~Session_ServerThread "<< _argv[0]);
- delete _NS;
- for (int i = 0; i <_argc ; i++ )
- free( _argv[i] );
- delete[] _argv;
-}
-
-/*!
- run the thread : activate one servant, the servant type is given by
- argument _argv[0]
-*/
-void Session_ServerThread::Init()
-{
- MESSAGE("Session_ServerThread::Init "<< _argv[0]);
-
- for (int i=0; i<_argc; i++) SCRUTE(_argv[i]);
-#ifndef WNT
- for (int i=0; i<NB_SRV_TYP; i++)
-#else
- for (i=0; i<NB_SRV_TYP; i++)
-#endif
- if (strcmp(_argv[0],_serverTypes[i])==0)
- {
- _servType = i;
- MESSAGE("Server Thread type : "<<_serverTypes[i]);
- switch (_servType)
- {
- case 0: // Container
- {
- NamingService_WaitForServerReadiness(_NS,"/Registry");
- NamingService_WaitForServerReadiness(_NS,"/ContainerManager");
- ActivateContainer(_argc, _argv);
- break;
- }
- case 1: // ModuleCatalog
- {
- NamingService_WaitForServerReadiness(_NS,"/Registry");
- ActivateModuleCatalog(_argc, _argv);
- break;
- }
- case 2: // Registry
- {
- NamingService_WaitForServerReadiness(_NS,"");
- ActivateRegistry(_argc, _argv);
- break;
- }
- case 3: // SALOMEDS
- {
- NamingService_WaitForServerReadiness(_NS,"/Kernel/ModulCatalog");
- ActivateSALOMEDS(_argc, _argv);
- break;
- }
- case 4: // Session
- {
- NamingService_WaitForServerReadiness(_NS,"/myStudyManager");
- string containerName = "/Containers/";
- containerName = containerName + GetHostname();
- containerName = containerName + "/FactoryServer";
- NamingService_WaitForServerReadiness(_NS,containerName);
- ActivateSession(_argc, _argv);
- break;
- }
- case 5: // SalomeApp_Engine
- {
- NamingService_WaitForServerReadiness(_NS,"/myStudyManager");
- ActivateEngine(_argc, _argv);
- break;
- }
- case 6: // Container Manager
- {
- NamingService_WaitForServerReadiness(_NS,"");
- ActivateContainerManager(_argc, _argv);
- break;
- }
- default:
- {
- ASSERT(0);
- break;
- }
- }
- }
-}
-
-void Session_ServerThread::ActivateModuleCatalog(int argc,
- char ** argv)
-{
- try
- {
- MESSAGE("ModuleCatalog thread started");
- // allocation on heap to allow destruction by POA
-
- SALOME_ModuleCatalogImpl* Catalogue_i
- = new SALOME_ModuleCatalogImpl(argc, argv);
-
- // Tell the POA that the objects are ready to accept requests.
-
- PortableServer::ObjectId_var id= _root_poa->activate_object (Catalogue_i);
- Catalogue_i->_remove_ref();
-
- CORBA::Object_var myCata = Catalogue_i->_this();
- _NS->Register(myCata ,"/Kernel/ModulCatalog");
- }
- catch(CORBA::SystemException&)
- {
- INFOS( "Caught CORBA::SystemException." );
- }
- catch(CORBA::Exception&)
- {
- INFOS( "Caught CORBA::Exception." );
- }
- catch(omniORB::fatalException& fe)
- {
- INFOS( "Caught omniORB::fatalException:" );
- INFOS( " file: " << fe.file() );
- INFOS( " line: " << fe.line() );
- INFOS( " mesg: " << fe.errmsg() );
- }
- catch(...)
- {
- INFOS( "Caught unknown exception." );
- }
-}
-
-void Session_ServerThread::ActivateSALOMEDS(int argc,
- char ** argv)
-{
- try
- {
- MESSAGE("SALOMEDS thread started");
- // We allocate the objects on the heap. Since these are reference
- // counted objects, they will be deleted by the POA when they are no
- // longer needed.
-
- ClientFactory::createStudyManager(_orb,_root_poa);
- }
- catch(CORBA::SystemException&)
- {
- INFOS( "Caught CORBA::SystemException." );
- }
- catch(CORBA::Exception&)
- {
- INFOS( "Caught CORBA::Exception." );
- }
- catch(omniORB::fatalException& fe)
- {
- INFOS( "Caught omniORB::fatalException:" );
- INFOS( " file: " << fe.file() );
- INFOS( " line: " << fe.line() );
- INFOS( " mesg: " << fe.errmsg() );
- }
- catch(...)
- {
- INFOS( "Caught unknown exception." );
- }
-}
-
-void Session_ServerThread::ActivateRegistry(int argc,
- char ** argv)
-{
- MESSAGE("Registry thread started");
- SCRUTE(argc);
- if( argc<3 )
- {
- INFOS("you must provide the Salome session name when you call SALOME_Registry_Server");
- throw CommException("you must provide the Salome session name when you call SALOME_Registry_Server");
- }
- const char *ptrSessionName=0;
-
- int k=0 ;
- for ( k=1 ; k<argc ; k++ )
- {
- if( strcmp(argv[k],"--salome_session")==0 )
- {
- ptrSessionName=argv[k+1];
- break;
- }
- }
- ASSERT(ptrSessionName) ;
- ASSERT(strlen( ptrSessionName )>0);
- const char *registryName = "Registry";
- Registry::Components_var varComponents;
- try
- {
- RegistryService *ptrRegistry = SINGLETON_<RegistryService>::Instance();
- ptrRegistry->SessionName( ptrSessionName );
- ptrRegistry->SetOrb(_orb);
- varComponents = ptrRegistry->_this();
- // The RegistryService must not already exist.
-
- try
- {
- CORBA::Object_var pipo = _NS->Resolve( registryName );
- if (CORBA::is_nil(pipo) ) throw ServiceUnreachable();
- INFOS("RegistryService servant already existing" );
- ASSERT(0);
- }
- catch( const ServiceUnreachable &/*ex*/ )
- {
- }
- catch( const CORBA::Exception &/*exx*/ )
- {
- }
- string absoluteName = string("/") + registryName;
- _NS->Register( varComponents , absoluteName.c_str() );
- MESSAGE("On attend les requetes des clients");
- }
- catch( const SALOME_Exception &ex )
- {
- INFOS( "Communication Error : " << ex.what() );
- ASSERT(0);
- }
-}
-
-void Session_ServerThread::ActivateContainerManager(int argc,
- char ** argv)
-{
- try
- {
- PortableServer::POA_var root_poa=PortableServer::POA::_the_root_poa();
- cout << "ActivateSalomeLauncher ......!!!! " << endl;
- SALOME_Launcher * myContainer = new SALOME_Launcher(_orb,root_poa);
- }
- catch(CORBA::SystemException&)
- {
- INFOS("Caught CORBA::SystemException.");
- }
- catch(PortableServer::POA::WrongPolicy&)
- {
- INFOS("Caught CORBA::WrongPolicyException.");
- }
- catch(PortableServer::POA::ServantAlreadyActive&)
- {
- INFOS("Caught CORBA::ServantAlreadyActiveException");
- }
- catch(CORBA::Exception&)
- {
- INFOS("Caught CORBA::Exception.");
- }
- catch(...)
- {
- INFOS("Caught unknown exception.");
- }
-}
-
-void Session_ServerThread::ActivateContainer(int argc,
- char ** argv)
-{
- try
- {
- MESSAGE("Container thread started");
-
- // get or create the child POA
-
- PortableServer::POA_var factory_poa;
- try
- {
- factory_poa = _root_poa->find_POA("factory_poa",0);
- // 0 = no activation (already done if exists)
- }
- catch (PortableServer::POA::AdapterNonExistent&)
- {
- MESSAGE("factory_poa does not exists, create...");
- // define policy objects
- PortableServer::ImplicitActivationPolicy_var implicitActivation =
- _root_poa->create_implicit_activation_policy(
- PortableServer::NO_IMPLICIT_ACTIVATION);
- // default = NO_IMPLICIT_ACTIVATION
- PortableServer::ThreadPolicy_var threadPolicy =
- _root_poa->create_thread_policy(PortableServer::ORB_CTRL_MODEL);
- // default = ORB_CTRL_MODEL, other choice SINGLE_THREAD_MODEL
-
- // create policy list
- CORBA::PolicyList policyList;
- policyList.length(2);
- policyList[0] = PortableServer::ImplicitActivationPolicy::
- _duplicate(implicitActivation);
- policyList[1] = PortableServer::ThreadPolicy::
- _duplicate(threadPolicy);
-
- PortableServer::POAManager_var nil_mgr
- = PortableServer::POAManager::_nil();
- factory_poa = _root_poa->create_POA("factory_poa",
- nil_mgr,
- policyList);
- //with nil_mgr instead of pman,
- //a new POA manager is created with the new POA
-
- // destroy policy objects
- implicitActivation->destroy();
- threadPolicy->destroy();
-
- // obtain the factory poa manager
- PortableServer::POAManager_var pmanfac = factory_poa->the_POAManager();
- pmanfac->activate();
- MESSAGE("pmanfac->activate()");
- }
-
- char *containerName = "";
- if (argc >1)
- {
- containerName = argv[1];
- }
-
- Engines_Container_i * myContainer
- = new Engines_Container_i(_orb, _root_poa, containerName , argc , argv , true , false);
- }
- catch(CORBA::SystemException&)
- {
- INFOS("Caught CORBA::SystemException.");
- }
- catch(PortableServer::POA::WrongPolicy&)
- {
- INFOS("Caught CORBA::WrongPolicyException.");
- }
- catch(PortableServer::POA::ServantAlreadyActive&)
- {
- INFOS("Caught CORBA::ServantAlreadyActiveException");
- }
- catch(CORBA::Exception&)
- {
- INFOS("Caught CORBA::Exception.");
- }
- catch(...)
- {
- INFOS("Caught unknown exception.");
- }
-}
-
-void Session_ServerThread::ActivateEngine(int /*argc*/, char ** /*argv*/)
-{
- try
- {
- MESSAGE("SalomeApp_Engine thread started");
- SalomeApp_Engine_i* anEngine = new SalomeApp_Engine_i();
- PortableServer::ObjectId_var id =_root_poa->activate_object( anEngine );
- MESSAGE("poa->activate_object( SalomeApp_Engine )");
-
- CORBA::Object_var obj = anEngine->_this();
- anEngine->_remove_ref();
- _NS->Register( obj ,"/SalomeAppEngine");
-
- }
- catch (CORBA::SystemException&)
- {
- INFOS("Caught CORBA::SystemException.");
- }
- catch (CORBA::Exception&)
- {
- INFOS("Caught CORBA::Exception.");
- }
- catch (...)
- {
- INFOS("Caught unknown exception.");
- }
-}
-
-void Session_ServerThread::ActivateSession(int argc,
- char ** argv)
-{
- MESSAGE("Session_ServerThread::ActivateSession() not implemented!");
-}
-
-/*!
- constructor
-*/
-Session_SessionThread::Session_SessionThread(int argc,
- char** argv,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- QMutex* GUIMutex,
- QWaitCondition* GUILauncher)
- : Session_ServerThread(argc, argv, orb, poa),
- _GUIMutex( GUIMutex ),
- _GUILauncher( GUILauncher )
-{
-}
-
-/*!
- destructor
-*/
-Session_SessionThread::~Session_SessionThread()
-{
-}
-
-void Session_SessionThread::ActivateSession(int argc,
- char ** argv)
-{
- try
- {
- MESSAGE("Session thread started");
- SALOME_Session_i * mySALOME_Session
- = new SALOME_Session_i(argc, argv, _orb, _root_poa, _GUIMutex, _GUILauncher) ;
- PortableServer::ObjectId_var mySALOME_Sessionid
- = _root_poa->activate_object(mySALOME_Session);
- MESSAGE("poa->activate_object(mySALOME_Session)");
-
- CORBA::Object_var obj = mySALOME_Session->_this();
- CORBA::String_var sior(_orb->object_to_string(obj));
- mySALOME_Session->_remove_ref();
-
- mySALOME_Session->NSregister();
- }
- catch (CORBA::SystemException&)
- {
- INFOS("Caught CORBA::SystemException.");
- }
- catch (CORBA::Exception&)
- {
- INFOS("Caught CORBA::Exception.");
- }
- catch (...)
- {
- INFOS("Caught unknown exception.");
- }
-}
+++ /dev/null
-// SALOME Session : implementation of Session_ServerThread.hxx
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : Session_ServerThread.hxx
-// Author : Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-
-#ifndef _SESSION_SERVERTHREAD_HXX_
-#define _SESSION_SERVERTHREAD_HXX_
-
-#include <SALOME_Session.hxx>
-
-#include <CORBA.h>
-#include <string>
-
-#include "SALOME_NamingService.hxx"
-#include <qthread.h>
-
-using namespace std;
-
-void WaitForServerReadiness(string serverName);
-
-
-class SESSION_EXPORT Session_ServerThread
-{
-public:
- static const int NB_SRV_TYP;
- static const char* _serverTypes[];
-
- Session_ServerThread();
- Session_ServerThread(int argc,
- char ** argv,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa);
- virtual ~Session_ServerThread();
- void Init();
-protected:
- void ActivateModuleCatalog ( int argc, char ** argv );
- void ActivateSALOMEDS ( int argc, char ** argv );
- void ActivateRegistry ( int argc, char ** argv );
- void ActivateContainer ( int argc, char ** argv );
- virtual void ActivateSession ( int argc, char ** argv );
- void ActivateEngine ( int argc, char ** argv );
- void ActivateContainerManager( int argc, char ** argv );
-protected:
- int _argc;
- char ** _argv;
- int _servType;
- CORBA::ORB_var _orb;
- PortableServer::POA_var _root_poa;
- SALOME_NamingService * _NS;
-};
-
-
-class SESSION_EXPORT Session_SessionThread : public Session_ServerThread
-{
-public:
- Session_SessionThread() {}
- Session_SessionThread(int argc,
- char** argv,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- QMutex* GUIMutex,
- QWaitCondition* GUILauncher);
- virtual ~Session_SessionThread();
-
-protected:
- virtual void ActivateSession ( int argc, char ** argv );
-private:
- QMutex* _GUIMutex;
- QWaitCondition* _GUILauncher;
-};
-
-#endif
-
+++ /dev/null
-// SALOME Session : implementation of Session.idl
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : SALOME_Session_i.cxx
-// Author : Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-
-#include "utilities.h"
-
-#include "Session_Session_i.hxx"
-
-#include "SALOME_NamingService.hxx"
-#include "SALOME_Event.hxx"
-
-#include "SUIT_Session.h"
-#include "SUIT_Application.h"
-#include "SUIT_Desktop.h"
-
-#include <qapplication.h>
-
-// Open CASCADE Includes
-#include <OSD_SharedLibrary.hxx>
-#include <OSD_LoadMode.hxx>
-#include <OSD_Function.hxx>
-
-using namespace std;
-
-/*!
- constructor
-*/
-SALOME_Session_i::SALOME_Session_i(int argc,
- char ** argv,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- QMutex* GUIMutex,
- QWaitCondition* GUILauncher)
-{
- _argc = argc ;
- _argv = argv ;
- _isGUI = FALSE ;
- _runningStudies= 0 ;
- _orb = CORBA::ORB::_duplicate(orb) ;
- _poa = PortableServer::POA::_duplicate(poa) ;
- _GUIMutex = GUIMutex;
- _GUILauncher = GUILauncher;
- _NS = new SALOME_NamingService(_orb);
- //MESSAGE("constructor end");
-}
-
-/*!
- returns Visu component
-*/
-Engines::Component_ptr SALOME_Session_i::GetComponent(const char* theLibraryName)
-{
- typedef Engines::Component_ptr TGetImpl(CORBA::ORB_ptr,
- PortableServer::POA_ptr,
- SALOME_NamingService*,QMutex*);
- OSD_SharedLibrary aSharedLibrary(const_cast<char*>(theLibraryName));
- if(aSharedLibrary.DlOpen(OSD_RTLD_LAZY))
- if(OSD_Function anOSDFun = aSharedLibrary.DlSymb("GetImpl"))
- return ((TGetImpl (*)) anOSDFun)(_orb,_poa,_NS,_GUIMutex);
- return Engines::Component::_nil();
-}
-
-/*!
- destructor
-*/
-SALOME_Session_i::~SALOME_Session_i()
-{
- delete _NS;
- //MESSAGE("destructor end");
-}
-
-/*!
- tries to find the Corba Naming Service and to register the session,
- gives naming service interface to _IAPPThread
-*/
-void SALOME_Session_i::NSregister()
-{
- CORBA::Object_var obref=_this();
- SALOME::Session_var pSession = SALOME::Session::_narrow(obref);
- try
- {
- _NS->Register(pSession, "/Kernel/Session");
- }
- catch (ServiceUnreachable&)
- {
- INFOS("Caught exception: Naming Service Unreachable");
- exit(1) ;
- }
- catch (...)
- {
- INFOS("Caught unknown exception from Naming Service");
- }
- //MESSAGE("Session registered in Naming Service");
-}
-
-/*!
- Launches the GUI if there is none.
- The Corba method is oneway (corba client does'nt wait for GUI completion)
-*/
-void SALOME_Session_i::GetInterface()
-{
- _GUIMutex->lock();
- _GUIMutex->unlock();
- if ( !SUIT_Session::session() )
- {
- _GUILauncher->wakeAll();
- MESSAGE("SALOME_Session_i::GetInterface() called, starting GUI...")
- }
-}
-
-/*!
- Kills the session if there are no active studies nore GUI
-*/
-class CloseEvent : public SALOME_Event
-{
-public:
- virtual void Execute() {
- SUIT_Session* session = SUIT_Session::session();
- session->closeSession( SUIT_Session::DONT_SAVE );
- //if ( SUIT_Application::getDesktop() )
- // QAD_Application::getDesktop()->closeDesktop( true );
- }
-};
-
-/*!
- Processes event to close session
-*/
-void SALOME_Session_i::StopSession()
-{
- ProcessVoidEvent( new CloseEvent() );
-}
-
-/*!
- Send a SALOME::StatSession structure (see idl) to the client
- (number of running studies and presence of GUI)
-*/
-class QtLock
-{
-public:
- QtLock() { if ( qApp ) qApp->lock(); }
- ~QtLock() { if ( qApp ) qApp->unlock(); }
-};
-
-
-SALOME::StatSession SALOME_Session_i::GetStatSession()
-{
- // update Session state
- _GUIMutex->lock();
-
- _runningStudies = 0;
- {
- QtLock lock;
- _isGUI = SUIT_Session::session();
- if ( _isGUI && SUIT_Session::session()->activeApplication() )
- _runningStudies = SUIT_Session::session()->activeApplication()->getNbStudies();
- }
-
- _GUIMutex->unlock();
-
- // getting stat info
- SALOME::StatSession_var myStats = new SALOME::StatSession ;
- if (_runningStudies)
- myStats->state = SALOME::running ;
- else
- myStats->state = SALOME::asleep ;
- myStats->runningStudies = _runningStudies ;
- myStats->activeGUI = _isGUI ;
- return myStats._retn() ;
-}
-
-CORBA::Long SALOME_Session_i::GetActiveStudyId()
-{
- long aStudyId=-1;
- if ( SUIT_Session::session() && SUIT_Session::session()->activeApplication() ) {
- if ( SUIT_Session::session()->activeApplication()->activeStudy() ) // mkr : IPAL12128
- aStudyId = SUIT_Session::session()->activeApplication()->activeStudy()->id();
- }
- return aStudyId;
-}
-
-bool SALOME_Session_i::restoreVisualState(CORBA::Long theSavePoint)
-{
- class TEvent: public SALOME_Event {
- int _savePoint;
- public:
- TEvent(int savePoint) { _savePoint = savePoint; }
- virtual void Execute() {
- SUIT_Study* study = SUIT_Session::session()->activeApplication()->activeStudy();
- if ( study ) {
- study->restoreState(_savePoint);
- }
- }
- };
-
- if(SUIT_Session::session() && SUIT_Session::session()->activeApplication() ) {
- SUIT_Study* study = SUIT_Session::session()->activeApplication()->activeStudy();
- if(!study) SUIT_Session::session()->activeApplication()->createEmptyStudy();
- ProcessVoidEvent( new TEvent(theSavePoint) );
- return true;
- }
-
- return false;
-}
-
-void SALOME_Session_i::emitMessage(const char* theMessage)
-{
- class TEvent: public SALOME_Event {
- public:
- TEvent(const char * msg) {
- _msg = msg;
- }
- virtual void Execute() {
- SUIT_Session::session()->activeApplication()->desktop()->emitMessage(_msg);
- }
- private:
- const char* _msg;
- };
- if ( SUIT_Session::session() ) {
- if ( SUIT_Session::session()->activeApplication() ) {
- if ( SUIT_Session::session()->activeApplication()->desktop() ) {
- ProcessVoidEvent( new TEvent(theMessage) );
- }
- }
- }
-}
-
-void SALOME_Session_i::emitMessageOneWay(const char* theMessage)
-{
- emitMessage(theMessage);
-}
+++ /dev/null
-// SALOME Session : implementation of Session.idl
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : Session_Session_i.hxx
-// Author : Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-
-#ifndef _SESSION_SESSION_I_HXX_
-#define _SESSION_SESSION_I_HXX_
-
-#include <SALOME_Session.hxx>
-
-#include <qthread.h>
-
-#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(SALOME_Component)
-#include CORBA_SERVER_HEADER(SALOME_Session)
-class SALOME_NamingService;
-
-class SESSION_EXPORT SALOME_Session_i: public virtual POA_SALOME::Session,
- public virtual PortableServer::ServantBase
-{
-public:
- SALOME_Session_i(int argc,
- char ** argv,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- QMutex* GUIMutex,
- QWaitCondition* GUILauncher);
- ~SALOME_Session_i();
-
- //! Launch Graphical User Interface
- void GetInterface();
-
- //! Return VISU component
- Engines::Component_ptr GetComponent(const char* theLibraryName);
-
- //! Stop the Session (must be idle): kill servant & server
- void StopSession();
-
- //! Get session state
- SALOME::StatSession GetStatSession();
-
- //! Register the servant to Naming Service
- void NSregister();
-
- CORBA::Long GetActiveStudyId();
-
- void ping(){};
- CORBA::Long getPID() { return (CORBA::Long)getpid(); };
-
- //! Restors a visual state of the study at theSavePoint
- bool restoreVisualState(CORBA::Long theSavePoint);
-
- //! Emit a qt signal from the session GUI desktop window.
- void emitMessage(const char* theMessage);
- void emitMessageOneWay(const char* theMessage);
-
-protected:
-
- //! Naming service interface
- SALOME_NamingService *_NS;
-
- int _argc ;
- char **_argv;
- CORBA::Boolean _isGUI ;
- QMutex* _GUIMutex ;
- QWaitCondition* _GUILauncher;
- int _runningStudies ;
- CORBA::ORB_var _orb;
- PortableServer::POA_var _poa;
-};
-
-#endif
-
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : SalomeApp
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-# Libraries targets
-lib_LTLIBRARIES = libSalomeStyle.la
-
-libSalomeStyle_la_SOURCES = SalomeStyle.cxx
-
-libSalomeStyle_la_CPPFLAGS=$(QT_INCLUDES)
-
-libSalomeStyle_la_LDFLAGS=$(QT_MT_LIBS)
-
-EXTRA_DIST+=SalomeStyle.h
-
-install-exec-hook:
- mkdir -p $(bindir)/styles
- (cd $(bindir)/styles; ln -sf ../../../lib@LIB_LOCATION_SUFFIX@/salome/libSalomeStyle.so libSalomeStyle.so;)
-
-uninstall-hook:
- rm -f $(bindir)/styles/libSalomeStyle.so
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 "SalomeStyle.h"
-
-#include <qimage.h>
-#include <qcursor.h>
-#include <qtabbar.h>
-#include <qpalette.h>
-#include <qtoolbar.h>
-#include <qspinbox.h>
-#include <qpainter.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qdrawutil.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qobjectlist.h>
-#include <qtoolbutton.h>
-#include <qapplication.h>
-
-static const char* const hole_xpm[] = {
-"3 3 3 1",
-". c None",
-"a c #999999",
-"b c #FFFFFF",
-"aa.",
-"aab",
-".bb"
-};
-
-static const char* const cross_xpm[] = {
-"12 12 4 1",
-". c None",
-"a c #000000",
-"b c #FFFFFF",
-"c c #666666",
-"............",
-"............",
-"............",
-".aaaa..aaaa.",
-"..abbaabba..",
-"...abbbba...",
-"....abba....",
-"...abbbba...",
-"..abbaabba..",
-".aaaa..aaaa.",
-"............",
-"............"
-};
-
-static const char* const maximize_xpm[] = {
-"12 12 4 1",
-". c None",
-"a c #000000",
-"b c #FFFFFF",
-"c c #666666",
-"............",
-".aaaaaaaaaa.",
-".acccccccca.",
-".acccccccca.",
-".abbbbbbbba.",
-".abbbbbbbba.",
-".abbbbbbbba.",
-".abbbbbbbba.",
-".abbbbbbbba.",
-".abbbbbbbba.",
-".aaaaaaaaaa.",
-"............"
-};
-
-static const char* const normal_xpm[] = {
-"12 12 4 1",
-". c None",
-"a c #000000",
-"b c #FFFFFF",
-"c c #666666",
-"............",
-"...aaaaaaaa.",
-"...acccccca.",
-"...abbbbbba.",
-"...aaaaaaba.",
-".aaaaaaaaba.",
-".accccccaba.",
-".abbbbbbaaa.",
-".abbbbbba...",
-".abbbbbba...",
-".aaaaaaaa...",
-"............"
-};
-
-static const char* const minimize_xpm[] = {
-"12 12 4 1",
-". c None",
-"a c #000000",
-"b c #FFFFFF",
-"c c #666666",
-"............",
-"............",
-"............",
-"............",
-"............",
-"............",
-"............",
-"............",
-"aaaaaaaaaaaa",
-"abbbbbbbbbba",
-"aaaaaaaaaaaa",
-"............"
-};
-
-/*!
- Class: SalomeStyle [Public]
- Descr: Style for SALOME platform
-*/
-
-/*!
- Constructor
-*/
-SalomeStyle::SalomeStyle()
-: myTitleParent( 0 )
-{
- qApp->installEventFilter( this );
-}
-
-/*!
- Destructor
-*/
-SalomeStyle::~SalomeStyle()
-{
-}
-
-/*!
- Delayed initialization of style
-*/
-void SalomeStyle::polish( QWidget* w )
-{
- if ( !w )
- return;
-/*
- if ( w->inherits( "QLineEdit" ) )
- {
- QLineEdit* fr = (QLineEdit*)w;
- if ( w->parentWidget() && w->parentWidget()->inherits( "QSpinWidget" ) )
- fr->setFrameStyle( QFrame::Plain );
- else
- {
- fr->setFrameStyle( QFrame::Plain | QFrame::Box );
- fr->setLineWidth( 1 );
- fr->setMidLineWidth( 0 );
- }
- }
- else
-*/
- if ( w->inherits( "QToolBar" ) )
- {
- QToolBar* tb = (QToolBar*)w;
- tb->setFrameStyle( QFrame::ToolBarPanel | QFrame::Plain );
- tb->setLineWidth( 1 );
- tb->setMidLineWidth( 1 );
- }
- else
- if ( w->inherits( "QDockWindow" ) )
- {
- QDockWindow* dw = (QDockWindow*)w;
- dw->setFrameStyle( QFrame::ToolBarPanel | QFrame::Raised );
- }
-/*
- else if ( w->inherits( "QListView" ) )
- {
- QListView* lv = (QListView*)w;
- lv->setFrameStyle( QFrame::Box | QFrame::Plain );
- }
-*/
- else
- PARENT_STYLE::polish( w );
-}
-
-/*!
- Custom event filter
-*/
-bool SalomeStyle::eventFilter( QObject* o, QEvent* e )
-{
- if ( e->type() == QEvent::FocusIn || e->type() == QEvent::FocusOut )
- {
- QDockWindow* wnd = NULL;
- while( o && !wnd )
- if( o->inherits( "QDockWindow" ) )
- wnd = ( QDockWindow* )o;
- else
- o = o->parent();
-
- if ( wnd )
- {
- const QObjectList* objList = o->children();
- for( QObjectListIterator anIt( *objList ); anIt.current(); ++anIt )
- if( anIt.current()->inherits( "QDockWindowHandle" ) )
- {
- QWidget* ww = ( QWidget* )anIt.current();
- ww->repaint( ww->rect() );
- const QObjectList* wc = ww->children();
- for( QObjectListIterator anIt2( *wc ); anIt2.current(); ++anIt2 )
- if( anIt2.current()->inherits( "QToolButton" ) )
- {
- QWidget* tb = ( QWidget* )anIt2.current();
- tb->repaint( tb->rect() );
- }
- }
- }
- }
-
- if ( o && o->inherits( "QPushButton" ) && ( e->type() == QEvent::Enter || e->type() == QEvent::Leave ) )
- ((QWidget*)o)->update();
-
- return false;
-}
-
-double linear( double x )
-{
- return x;
-}
-
-/*!
- Mixes two colors, part of first is 1-t, part of second is t
- \param t - part parameter
- \param c1, c2 - colors
- \param res - result color
-*/
-void SalomeStyle::mix( const double t, const QColor& c1, const QColor& c2, QColor& res )
-{
- if( t<0.0 || t>1.0 )
- return;
-
- int r = int( c1.red() * (1-t) + c2.red() * t ),
- g = int( c1.green() * (1-t) + c2.green() * t ),
- b = int( c1.blue() * (1-t) + c2.blue() * t );
- res.setRgb( r, g, b );
-}
-
-/*!
- Mixes two colors, part of first is 1-t, part of second is t
- \param t - part parameter
- \param rgb1, rgb2 - colors (result is stored in rgb1)
-*/
-void SalomeStyle::mix( const double t, QRgb& rgb1, const QRgb& rgb2 )
-{
- if( t<0.0 || t>1.0 )
- return;
-
- int c[2][4] = { qRed( rgb1 ), qGreen( rgb1 ), qBlue( rgb1 ), qAlpha( rgb1 ),
- qRed( rgb2 ), qGreen( rgb2 ), qBlue( rgb2 ), qAlpha( rgb2 ) };
- for( int i=0; i<4; i++ )
- c[0][i] = (int)( c[0][i] * (1-t) + c[1][i] * t );
-
- rgb1 = qRgba( c[0][0], c[0][1], c[0][2], qAlpha( rgb1 ) );
-}
-
-/*!
- Mixes colors of pixmap points with other color
- \param t - part parameter
- \param pix - pixmap to be processed
- \param col - other color
-*/
-void SalomeStyle::mix( const double t, QPixmap& pix, const QColor& col )
-{
- if( t<0.0 || t>1.0 )
- return;
-
- QImage anImage = pix.convertToImage();
- if( anImage.isNull() )
- return;
-
- if( anImage.depth()!=32 )
- anImage = anImage.convertDepth( 32 );
-
- int w = anImage.width(),
- h = anImage.height();
-
- QRgb colrgb = col.rgb(), cur;
- for( int y=0; y<h; y++ )
- {
- uchar* line = anImage.scanLine( y );
- QRgb* colorline = ( QRgb* ) line;
- for( int x=0; x<w; x++ )
- {
- cur = colorline[ x ];
- mix( t, cur, colrgb );
- colorline[ x ] = cur;
- }
- }
- pix = anImage;
-}
-
-/*!
- Converts pixmap to grayscale
- \param pix - pixmap to be processed
- \param k - factor (gray value after conversion will be multiplied on it and truncated by 255.0)
-*/
-void SalomeStyle::toGrayscale( QPixmap& pix, double k )
-{
- QImage anImage = pix.convertToImage();
- if( anImage.isNull() )
- return;
-
- if( anImage.depth()!=32 )
- anImage = anImage.convertDepth( 32 );
-
- int w = anImage.width(),
- h = anImage.height();
-
- for( int y=0; y<h; y++ )
- {
- uchar* line = anImage.scanLine( y );
- QRgb* colorline = ( QRgb* ) line;
- for( int x=0; x<w; x++ )
- {
- int gray = (int)( k * qGray( colorline[ x ] ) );
- if ( gray>255 )
- gray = 255;
- else if( gray<0 )
- gray = 0;
- colorline[ x ] = qRgba( gray, gray, gray, qAlpha( colorline[x] ) );
- }
- }
- pix = anImage;
-}
-
-/*!
- Draws gradient filling
- \param p - painter
- \param r - rect
- \param c1, c2 - two colors of gradient
- \param d - direction of gradient
- \param f - gradient function (maps co-ordinate to part parameter)
-*/
-void SalomeStyle::drawGradient( QPainter* p, const QRect& r,
- const QColor& c1, const QColor& c2,
- const Direction d, gradient_func f ) const
-{
- p->save();
- p->translate( r.x(), r.y() );
-
- QColor mid;
- if( d==LeftToRight || d==RightToLeft )
- for( int xmax = r.width(), x = d==LeftToRight ? 0 : xmax;
- d==LeftToRight ? x<=xmax : x>=0;
- d==LeftToRight ? x++ : x-- )
- {
- double t = double( x ) / double( xmax );
- mix( d==LeftToRight ? f(t) : 1-f(t), c1, c2, mid );
- p->setPen( mid );
- p->drawLine( x, 0, x, r.height() );
- }
- else
- for( int ymax = r.height(), y = d==UpToDown ? 0 : ymax;
- d==UpToDown ? y<=ymax : y>=0;
- d==UpToDown ? y++ : y-- )
- {
- double t = double( y ) / double( ymax );
- mix( d==UpToDown ? f(t) : 1-f(t), c1, c2, mid );
- p->setPen( mid );
- p->drawLine( 0, y, r.width(), y );
- }
-
- p->restore();
-}
-
-/*!
- Draws primitive element
- \param pe - type of primitive element
- \param p - painter
- \param r - rect
- \param cg - group of colors
- \param flags - is used to control how the PrimitiveElement is drawn
- \param opt - can be used to control how various PrimitiveElements are drawn
-*/
-void SalomeStyle::drawPrimitive( PrimitiveElement pe, QPainter* p, const QRect& r,
- const QColorGroup& cg, SFlags flags, const QStyleOption& opt ) const
-{
- switch ( pe )
- {
- case PE_ButtonTool:
- if ( !myTitleParent )
- PARENT_STYLE::drawPrimitive( pe, p, r, cg, flags, opt );
- break;
-
- case PE_DockWindowResizeHandle:
- p->fillRect( r.x(), r.y(), r.width(), r.height(), cg.dark() );
- if ( flags & Style_Horizontal )
- p->fillRect( r.x(), r.y() + 1, r.width(), r.height() - 2, cg.midlight() );
- else
- p->fillRect( r.x() + 1, r.y(), r.width() - 2, r.height(), cg.midlight() );
- break;
-
- case PE_DockWindowHandle:
- {
- QPaintDevice* pd = p->device();
- if ( !pd )
- break;
-
- QWidget* w = (QWidget*)pd;
-
- if ( !w || !w->inherits( "QDockWindowHandle" ) )
- break;
-
- QDockWindow* wnd = ( QDockWindow* ) w->parent();
- if ( !wnd )
- return;
-
- QObject* activeWidget = qApp->focusWidget();
- QDockWindow* activeWnd = 0;
- while ( !activeWnd && activeWidget )
- {
- if ( activeWidget->inherits( "QDockWindow" ) )
- activeWnd = (QDockWindow*)activeWidget;
- else
- activeWidget = activeWidget->parent();
- }
-
- bool act = wnd == activeWnd, horiz = flags & Style_Horizontal;
-
- QPixmap hole( (const char**)hole_xpm );
-
- if ( wnd->inherits( "QToolBar" ) )
- {
- drawGradient( p, r, cg.light(), cg.background(), horiz ? UpToDown : LeftToRight, linear );
-
- int c = 4, i; double d = ( horiz ? r.height() : r.width() ) / ( c + 1 );
- QBrush fill = cg.brush( QColorGroup::Dark );
- p->setPen( Qt::red );
- for ( i = 0; i < c; i++ )
- {
- if ( horiz )
- p->drawPixmap( r.x() + r.width() / 2 - 1, (int)( r.y() + ( i + 1 ) * d - 1 ), hole );
- else
- p->drawPixmap( (int) ( r.x() + ( i + 1 ) * d - 1 ), r.y() + r.height() / 2 - 1, hole );
- }
-
- int dd = (int(d)/2) + (int(d)%2);
- for ( i = 0; i < c - 1; i++ )
- {
- if ( horiz )
- p->drawPixmap( r.x() + r.width() / 2 + 2, (int)( r.y() + dd + ( i + 1 ) * d - 1 ), hole );
- else
- p->drawPixmap( (int)( r.x() + dd + ( i + 1 ) * d - 1 ), r.y() + r.height() / 2 + 2, hole );
- }
- }
- else
- {
- int d = 1;
- QRect rr( r.x()+d, r.y()+d, r.width()-2*d, r.height()-2*d );
-
- QColor col;
- if ( act )
- mix( 0.5, cg.highlight(), Qt::white, col );
- else
- col = cg.background();
-
- drawGradient( p, rr, act ? cg.highlight() : cg.dark(), col,
- horiz ? LeftToRight : UpToDown, linear );
-
- QRect rt = rr;
- if ( flags & Style_Horizontal )
- rt.addCoords( 0, 20, 0, 0 );
- else
- rt.addCoords( 0, 0, -20, 0 );
-
- int textW = flags & Style_Horizontal ? rt.height() : rt.width();
- int textH = flags & Style_Horizontal ? rt.width() : rt.height();
-
- QFont old_font = p->font(), f = old_font;
-
- QString title = titleText( wnd->caption(), textW, textH, f );
- p->setFont( f );
- if ( wnd )
- {
- QColorGroup cgroup = wnd->isActiveWindow() ? wnd->palette().active() : wnd->palette().inactive();
- p->setPen( cgroup.highlightedText() );
-
- if ( flags & Style_Horizontal )
- {
- p->rotate( 270.0 );
- p->translate( -(rt.height()+rt.y()), (rt.width()-rt.x()) );
- p->drawText( 0, 0, title );
- }
- else
- p->drawText( 2, 2, textW, textH, AlignLeft, title );
- }
- p->setFont( old_font );
- }
- break;
- }
-
- case PE_DockWindowSeparator:
- {
- bool horiz = ( flags & Style_Horizontal );
- QWidget* w = ( QWidget* )p->device();
- if( w->inherits( "QToolBarSeparator" ) )
- {
- drawGradient( p, r, cg.light(), cg.background(), horiz ? UpToDown : LeftToRight, linear );
- int w = r.width(), h = r.height();
- int part = 8;
-
- p->setPen( cg.dark() );
- if( horiz )
- p->drawLine( r.x() + w/2, r.y() + h/part, r.x() + w/2, r.y() + (part-1)*h/part );
- else
- p->drawLine( r.x() + w/part, r.y() + h/2, r.x() + (part-1)*w/part, r.y() + h/2 );
-
- p->setPen( cg.light() );
- if( horiz )
- p->drawLine( r.x() + w/2 + 1, r.y() + h/part + 1, r.x() + w/2 + 1, r.y() + (part-1)*h/part + 1 );
- else
- p->drawLine( r.x() + w/part + 1, r.y() + h/2 + 1, r.x() + (part-1)*w/part + 1, r.y() + h/2 + 1 );
- }
- else
- PARENT_STYLE::drawPrimitive( pe, p, r, cg, flags, opt );
- break;
- }
-
- case PE_PanelDockWindow:
- {
- QWidget* w = ( QWidget* )p->device();
-
- int offset = pixelMetric( PM_DockWindowHandleExtent, w );
- if ( w->inherits( "QToolBar" ) )
- {
- bool vert = ( ( QToolBar* )w )->orientation() == Qt::Vertical;
- if ( vert )
- drawGradient( p, QRect( r.x(), r.y()+offset, r.x()+r.width(), r.y()+offset ),
- cg.light(), cg.background(), LeftToRight, linear );
- else
- drawGradient( p, QRect( r.x()+offset, r.y(), r.x()+offset, r.y()+r.height() ),
- cg.light(), cg.background(), UpToDown, linear );
-
- p->setPen( QPen( cg.light(), 1 ) );
- p->drawRect( r );
- }
- else
- {
- p->setPen( QPen( cg.dark(), 1 ) );
- p->setBrush( cg.light() );
- p->drawRect( r );
- }
-
- break;
- }
-
- case PE_PanelPopup:
- p->setPen( QPen( cg.dark(), 1 ) );
- p->setBrush( cg.light() );
- p->drawRect( r );
- break;
-
- case PE_HeaderSection:
- {
- QColor col; mix( 0.2, cg.light(), Qt::black, col );
- drawGradient( p, r, cg.light(), col, DownToUp, linear );
- drawGradient( p, QRect( r.x(), r.y(), 1, r.height() ), cg.light(), cg.dark(), DownToUp, linear );
- p->setPen( cg.dark() );
- p->drawLine( r.x(), r.y()+r.height()-1, r.x()+r.width(), r.y()+r.height()-1 );
- break;
- }
-
- case PE_Splitter:
- p->fillRect( r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2, cg.dark() );
- p->fillRect( r.x() + 2, r.y() + 2, r.width() - 4, r.height() - 4, cg.midlight() );
- break;
-
- case PE_ButtonBevel:
- PARENT_STYLE::drawPrimitive( PE_ButtonDropDown, p, r, cg, flags, opt );
- break;
-
- case PE_ButtonCommand:
- {
- QColorGroup cGrp( cg );
- if ( flags & Style_MouseOver )
- cGrp.setColor( QColorGroup::Button, cGrp.midlight() );
-
- if ( flags & Style_MouseOver )
- PARENT_STYLE::drawPrimitive( PE_ButtonDropDown, p, r, cGrp, flags, opt );
- else
- PARENT_STYLE::drawPrimitive( flags & Style_Raised ? PE_ButtonDropDown : pe, p, r, cGrp, flags, opt );
- }
- break;
-
- default:
- PARENT_STYLE::drawPrimitive( pe, p, r, cg, flags, opt );
- break;
- }
-}
-
-/*!
- Draws control element
- \param element - type of control element
- \param p - painter
- \param widget - widget
- \param r - rect
- \param cg - group of colors
- \param flags - is used to control how the element is drawn
- \param opt - can be used to control how various elements are drawn
-*/
-void SalomeStyle::drawControl( ControlElement element, QPainter* p, const QWidget* widget, const QRect& r,
- const QColorGroup& cg, SFlags flags, const QStyleOption& opt ) const
-{
- switch( element )
- {
- case CE_PopupMenuItem:
- {
- if(! widget || opt.isDefault())
- break;
-
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
- QMenuItem *mi = opt.menuItem();
- if( !mi )
- break;
-
- int tab = opt.tabWidth();
- int maxpmw = opt.maxIconWidth();
- bool dis = !( flags & Style_Enabled );
- bool checkable = popupmenu->isCheckable();
- bool act = flags & Style_Active;
- bool use2000style = true;
- int x, y, w, h;
-
- int windowsItemFrame = 2,
- windowsItemHMargin = 5,
- windowsItemVMargin = 1,
- windowsRightBorder = 2,
- windowsArrowHMargin = 2;
-
- r.rect(&x, &y, &w, &h);
-
- if ( checkable )
- {
- // space for the checkmarks
- if (use2000style)
- maxpmw = QMAX( maxpmw, 20 );
- else
- maxpmw = QMAX( maxpmw, 12 );
- }
-
- int checkcol = maxpmw;
-
- if ( mi && mi->isSeparator() )
- {
- p->setPen( cg.dark() );
- p->drawLine( x+3*checkcol/2, y, x+w, y );
- //p->setPen( cg.light() );
- //p->drawLine( x, y+1, x+w, y+1 );
- return;
- }
-
- QBrush fill = ( act && !dis ?
- cg.brush( QColorGroup::Highlight ) :
- cg.brush( QColorGroup::Light ) );
- p->fillRect( x, y, w, h, fill );
-
- if( !mi )
- return;
-
- int xpos = x;
- QRect vrect = visualRect( QRect( xpos, y, checkcol, h ), r );
- int xvis = vrect.x();
-
- if( mi->isChecked() )
- {
- if( act && !dis )
- qDrawShadePanel( p, xvis, y, checkcol, h,
- cg, TRUE, 1, &cg.brush( QColorGroup::Button ) );
- else
- {
- QBrush fill( cg.light(), Dense4Pattern );
- // set the brush origin for the hash pattern to the x/y coordinate
- // of the menu item's checkmark... this way, the check marks have
- // a consistent look
- QPoint origin = p->brushOrigin();
- p->setBrushOrigin( xvis, y );
- qDrawShadePanel( p, xvis, y, checkcol, h, cg, TRUE, 1, &fill );
- // restore the previous brush origin
- p->setBrushOrigin( origin );
- }
- }
- else if( !act )
- p->fillRect(x+checkcol, y, w-checkcol , h, cg.brush( QColorGroup::Light ));
-
- if( !( act && !dis ) && !mi->isChecked() )
- {
- QColor col; mix( 0.5, cg.mid(), Qt::white, col );
- drawGradient( p, QRect( xvis, y, checkcol, h+1 ), cg.light(), col, LeftToRight, linear );
- }
-
- if( mi->iconSet() )
- { // draw iconset
- QIconSet::Mode mode = dis ? QIconSet::Active : QIconSet::Normal;
- if(act && !dis )
- mode = QIconSet::Active;
- QPixmap pixmap;
- if( checkable && mi->isChecked() )
- pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode, QIconSet::On );
- else
- pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
- int pixw = pixmap.width();
- int pixh = pixmap.height();
-
- if( dis )
- toGrayscale( pixmap, 1.1 );
-
- //if( act && !dis && !mi->isChecked() )
- // qDrawShadePanel( p, xvis, y, checkcol, h, cg, FALSE, 1, &cg.brush( QColorGroup::Button ) );
-
- QRect pmr( 0, 0, pixw, pixh );
- pmr.moveCenter( vrect.center() );
- p->setPen( cg.text() );
- p->drawPixmap( pmr.topLeft(), pixmap );
-
- QBrush fill = ( act ? cg.brush( QColorGroup::Highlight ) : cg.brush( QColorGroup::Light ));
- int xp = xpos + checkcol + 1;
- if( !dis )
- p->fillRect( visualRect( QRect( xp, y, w - checkcol - 1, h ), r ), fill);
- }
- else if( checkable )
- { // just "checking"...
- if( mi->isChecked() )
- {
- int xp = xpos + windowsItemFrame;
-
- SFlags cflags = Style_Default;
- if( !dis )
- cflags |= Style_Enabled;
- if( act )
- cflags |= Style_On;
-
- drawPrimitive( PE_CheckMark, p,
- visualRect( QRect( xp, y + windowsItemFrame,
- checkcol - 2*windowsItemFrame,
- h - 2*windowsItemFrame), r ), cg, cflags, opt );
- }
- }
-
- p->setPen( act ? cg.highlightedText() : cg.buttonText() );
-
- QColor discol;
- if( dis )
- {
- discol = cg.text();
- p->setPen( discol );
- }
-
- int xm = windowsItemFrame + checkcol + windowsItemHMargin;
- xpos += xm;
-
- vrect = visualRect( QRect( xpos, y+windowsItemVMargin, w-xm-tab+1, h-2*windowsItemVMargin ), r );
- xvis = vrect.x();
- if( mi->custom() )
- {
- p->save();
- if ( dis && !act )
- {
- p->setPen( cg.light() );
- mi->custom()->paint( p, cg, act, !dis,
- xvis+1, y+windowsItemVMargin+1,
- w-xm-tab+1, h-2*windowsItemVMargin );
- p->setPen( discol );
- }
- mi->custom()->paint( p, cg, act, !dis, xvis, y+windowsItemVMargin,
- w-xm-tab+1, h-2*windowsItemVMargin );
- p->restore();
- }
- QString s = mi->text();
- if( !s.isNull() )
- { // draw text
- int t = s.find( '\t' );
- int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
- if( !styleHint( SH_UnderlineAccelerator, widget ) )
- text_flags |= NoAccel;
- text_flags |= (QApplication::reverseLayout() ? AlignRight : AlignLeft );
- if( t >= 0 )
- { // draw tab text
- int xp = x + w - tab - windowsItemHMargin - windowsItemFrame + 1;
- if( use2000style )
- xp -= 20;
- else
- xp -= windowsRightBorder;
- int xoff = visualRect( QRect( xp, y+windowsItemVMargin, tab, h-2*windowsItemVMargin ), r ).x();
- if( dis && !act )
- {
- p->setPen( cg.light() );
- p->drawText( xoff+1, y+windowsItemVMargin+1, tab, h-2*windowsItemVMargin, text_flags, s.mid( t+1 ));
- p->setPen( discol );
- }
- p->drawText( xoff, y+windowsItemVMargin, tab, h-2*windowsItemVMargin, text_flags, s.mid( t+1 ) );
- s = s.left( t );
- }
- if( dis && !act )
- {
- p->setPen( cg.light() );
- p->drawText( xvis+1, y+windowsItemVMargin+1, w-xm-tab+1, h-2*windowsItemVMargin, text_flags, s, t );
- p->setPen( discol );
- }
- p->drawText( xvis, y+windowsItemVMargin, w-xm-tab+1, h-2*windowsItemVMargin, text_flags, s, t );
- }
- else if( mi->pixmap() )
- { // draw pixmap
- QPixmap *pixmap = mi->pixmap();
- if( pixmap->depth() == 1 )
- p->setBackgroundMode( OpaqueMode );
- p->drawPixmap( xvis, y+windowsItemFrame, *pixmap );
- if( pixmap->depth() == 1 )
- p->setBackgroundMode( TransparentMode );
- }
- if( mi->popup() )
- { // draw sub menu arrow
- int dim = (h-2*windowsItemFrame) / 2;
- PrimitiveElement arrow;
- arrow = ( QApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight );
- xpos = x+w - windowsArrowHMargin - windowsItemFrame - dim;
- vrect = visualRect( QRect(xpos, y + h / 2 - dim / 2, dim, dim), r );
- if( act )
- {
- QColorGroup g2 = cg;
- g2.setColor( QColorGroup::ButtonText, g2.highlightedText() );
- drawPrimitive( arrow, p, vrect, g2, dis ? Style_Default : Style_Enabled, opt );
- }
- else
- {
- drawPrimitive( arrow, p, vrect, cg, dis ? Style_Default : Style_Enabled, opt );
- }
- }
-
- if( act && !dis )
- {
- p->setPen( cg.dark() );
- p->drawRect( r );
- }
- break;
- }
-
- case CE_MenuBarItem:
- {
- bool active = flags & Style_Active;
- bool down = flags & Style_Down;
- QRect pr = r;
-
- p->save();
- if( active && down )
- {
- //QColor col; mix( 0.5, cg.mid(), Qt::white, col );
- //drawGradient( p, r, col, cg.light(), UpToDown, linear );
- p->setPen( cg.light() );
- p->setBrush( cg.light() );
- p->drawRect( r );
-
- p->setPen( cg.dark() );
- int w = r.width()-1, h = r.height();
- p->drawLine( r.x(), r.y(), r.x()+w, r.y() );
- p->drawLine( r.x(), r.y(), r.x(), r.y()+h );
- p->drawLine( r.x()+w, r.y(), r.x()+w, r.y()+h );
-
- p->translate( 1, 1 );
- }
- else
- drawGradient( p, r, cg.light(), cg.background(), active ? DownToUp : UpToDown, linear );
-
- QCommonStyle::drawControl(element, p, widget, pr, cg, flags, opt);
- p->restore();
- break;
- }
-
- case CE_MenuBarEmptyArea:
- {
- drawGradient( p, r, cg.light(), cg.background(), UpToDown, linear );
- break;
- }
-
- case CE_ToolButtonLabel:
- {
- const QToolButton *toolbutton = (const QToolButton *) widget;
- QObject* parent = toolbutton->parent();
-
- QToolBar* tb = NULL;
- while( parent )
- if( parent->inherits( "QToolBar" ) )
- {
- tb = ( QToolBar* )parent;
- break;
- }
- else
- parent = parent->parent();
- parent = toolbutton->parent();
-
- int horiz = -1;
- if( tb )
- {
- if( tb->orientation()==Qt::Horizontal )
- horiz = 1;
- else
- horiz = 0;
- drawGradient( p, r, cg.light(), cg.background(), horiz ? UpToDown : LeftToRight, linear );
- }
- else if( parent->inherits( "QDockWindowHandle" ) )
- {
- QWidget* w = ( QWidget* ) parent;
- QDockWindow* wnd = ( QDockWindow* )w->parent();
- if( !wnd->orientation()==Qt::Horizontal )
- horiz=1;
- else
- horiz=0;
-
- QPoint pp( r.x(), r.y() ),
- qq = toolbutton->mapToParent( pp );
-
- bitBlt( p->device(), r.x(), r.y(), w, horiz ? qq.x()-r.width() : qq.x(),
- horiz ? qq.y() : qq.y()+r.height(),
- r.width(), r.height(), Qt::CopyROP, true );
- }
-
- bool highlight = ( flags & Style_MouseOver ),
- down = ( flags & ( Style_Down | Style_On ) ),
- en = toolbutton->isEnabled();
-
- if( down )
- if( horiz>=0 )
- {
- drawGradient( p, r, cg.light(), cg.background(), horiz==1 ? DownToUp : RightToLeft, linear );
- p->setPen( cg.background() );
- p->drawRect( r );
- }
- else
- {
- p->setPen( cg.dark() );
- p->setBrush( cg.light() );
- p->drawRect( r );
- }
- if( highlight )
- {
- p->setPen( cg.dark() );
- QColor col; mix( 0.05, cg.background(), Qt::black, col );
- p->setBrush( col );
- p->drawRect( r );
- }
-
-
- QRect rect = r;
- Qt::ArrowType arrowType = opt.isDefault() ? Qt::DownArrow : opt.arrowType();
-
- int shiftX = 0, shiftY = 0;
- if( flags & ( Style_Down | Style_On ) )
- {
- shiftX = pixelMetric(PM_ButtonShiftHorizontal, widget);
- shiftY = pixelMetric(PM_ButtonShiftVertical, widget);
- }
-
- if (!opt.isDefault())
- {
- PrimitiveElement pe;
- switch (arrowType)
- {
- case Qt::LeftArrow: pe = PE_ArrowLeft; break;
- case Qt::RightArrow: pe = PE_ArrowRight; break;
- case Qt::UpArrow: pe = PE_ArrowUp; break;
- default:
- case Qt::DownArrow: pe = PE_ArrowDown; break;
- }
-
- rect.moveBy(shiftX, shiftY);
- drawPrimitive(pe, p, rect, cg, flags, opt);
- }
- else
- {
- QColor btext = toolbutton->paletteForegroundColor();
-
- if (toolbutton->iconSet().isNull() &&
- ! toolbutton->text().isNull() &&
- ! toolbutton->usesTextLabel())
- {
- int alignment = AlignCenter | ShowPrefix;
- if (!styleHint(SH_UnderlineAccelerator, widget, QStyleOption::Default, 0))
- alignment |= NoAccel;
-
- rect.moveBy(shiftX, shiftY);
- drawItem( p, rect, alignment, cg, flags & Style_Enabled, 0, toolbutton->text(),
- toolbutton->text().length(), &btext);
- }
- else
- {
- QPixmap pm;
- QIconSet::Size size =
- toolbutton->usesBigPixmap() ? QIconSet::Large : QIconSet::Small;
- QIconSet::State state = toolbutton->isOn() ? QIconSet::On : QIconSet::Off;
- QIconSet::Mode mode;
- if( !toolbutton->isEnabled() )
- mode = QIconSet::Active; //QIconSet::Disabled;
- else if( flags & (Style_Down | Style_On ) || ( flags & Style_Raised ) && (flags & Style_AutoRaise))
- mode = QIconSet::Active;
- else
- mode = QIconSet::Normal;
- pm = toolbutton->iconSet().pixmap( size, mode, state );
-
- if( toolbutton->usesTextLabel() )
- {
- p->setFont( toolbutton->font() );
- QRect pr = rect, tr = rect;
- int alignment = ShowPrefix;
- if (!styleHint(SH_UnderlineAccelerator, widget, QStyleOption::Default, 0))
- alignment |= NoAccel;
-
- if( toolbutton->textPosition() == QToolButton::Under )
- {
- int fh = p->fontMetrics().height();
- pr.addCoords( 0, 1, 0, -fh-3 );
- tr.addCoords( 0, pr.bottom(), 0, -3 );
- pr.moveBy(shiftX, shiftY);
- drawItem( p, pr, AlignCenter, cg, TRUE, &pm, QString::null );
- alignment |= AlignCenter;
- }
- else
- {
- pr.setWidth( pm.width() + 8 );
- tr.addCoords( pr.right(), 0, 0, 0 );
- pr.moveBy(shiftX, shiftY);
-
- drawItem( p, pr, AlignCenter, cg, TRUE, &pm, QString::null );
- alignment |= AlignLeft | AlignVCenter;
- }
-
- tr.moveBy(shiftX, shiftY);
- drawItem( p, tr, alignment, cg, flags & Style_Enabled, 0, toolbutton->textLabel(),
- toolbutton->textLabel().length(), &btext);
- }
- else
- {
- /*if( en && !highlight )
- mix( 0.6, pm, cg.background() );
- else*/ if( !en )
- {
- toGrayscale( pm, 1.1 );
- mix( 0.8, pm, cg.background() );
- }
-
- rect.moveBy(shiftX, shiftY);
- drawItem( p, rect, AlignCenter, cg, true, &pm, QString::null );
- }
- }
- }
- }
- break;
-
- case CE_TabBarTab:
- {
- QPen oldPen = p->pen();
-
- QRect r2( r );
- bool selected = flags & Style_Selected;
-
- p->setPen( cg.midlight() );
- p->drawLine( r2.left(), r2.bottom(), r2.right(), r2.bottom() );
-
- if ( !selected )
- r2.setRect( r2.left(), r2.top() + 1, r2.width(), r2.height() - 1 );
- else
- r2.setRect( r2.left(), r2.top(), r2.width() - 2, r2.height() - 1 );
-
- p->setPen( cg.foreground() );
- drawGradient( p, QRect( r2.left(), r2.top(), r2.width(), r2.height() - 1 ),
- selected ? cg.highlight() : cg.dark(), cg.background(), UpToDown, linear );
-
-// p->fillRect( r2.left(), r2.top(), r2.width(), r2.height() - 1, selected ? cg.highlight() : cg.background() );
- p->drawRect( r2.left(), r2.top(), r2.width(), r2.height() - 1 );
-
- if ( selected )
- {
- p->setPen( cg.shadow() );
- p->drawLine( r2.left() + 1, r2.bottom(), r2.right() + 1, r2.bottom() );
- p->drawLine( r2.right() + 1, r2.top() + 1, r2.right() + 1, r2.bottom() );
- }
-
- break;
- }
-
- case CE_TabBarLabel:
- {
- QColorGroup tmp( cg );
- if ( flags & Style_Selected )
- tmp.setColor( QColorGroup::Foreground, tmp.highlightedText() );
- PARENT_STYLE::drawControl( element, p, widget, r, tmp, flags, opt );
- }
- break;
-
- case CE_PushButton:
- {
- if ( flags & Style_Enabled && !( flags & Style_Down || flags & Style_On ) )
- {
- const QPushButton* button = (const QPushButton*)widget;
- QRect br = QRect( button->mapToGlobal( button->rect().topLeft() ), button->rect().size() );
- if ( br.contains( QCursor::pos() ) )
- flags |= Style_MouseOver;
- }
-
- PARENT_STYLE::drawControl( element, p, widget, r, cg, flags, opt );
- break;
- }
-
- default:
- PARENT_STYLE::drawControl( element, p, widget, r, cg, flags, opt );
- break;
- }
-}
-
-/*!
- \return the sub-area for the widget in logical coordinates
- \param subrect - type of sub area
- \param w - widget
-*/
-QRect SalomeStyle::subRect( SubRect subrect, const QWidget* w ) const
-{
- QRect r = PARENT_STYLE::subRect( subrect, w );
- if ( subrect==SR_DockWindowHandleRect && w->inherits( "QDockWindowHandle" ) )
- {
- QDockWindow* wnd = ( QDockWindow* ) w->parent();
- if( wnd->orientation()==Qt::Vertical )
- r.setWidth( w->width() );
- else
- {
- r.setY( r.y()+r.height()-w->height() );
- r.setHeight( w->height() );
- }
- }
-
- return r;
-}
-
-/*!
- Draws the ComplexControl
- \param control - type of complex control element
- \param p - painter
- \param widget - widget
- \param r - rect
- \param cg - group of colors
- \param flags, controls, active - is used to control how the element is drawn
- \param opt - can be used to control how various elements are drawn
-*/
-void SalomeStyle::drawComplexControl( ComplexControl control, QPainter* p, const QWidget* widget,
- const QRect& r, const QColorGroup& cg, SFlags flags,
- SCFlags controls, SCFlags active, const QStyleOption& opt ) const
-{
-
-
-
-
- ((SalomeStyle*)this)->myTitleParent = 0;
-
- switch ( control )
- {
- case CC_ComboBox:
- if ( controls & SC_ComboBoxArrow )
- {
- SFlags flags = Style_Default;
-
- qDrawShadeRect( p, r, cg, true, pixelMetric( PM_DefaultFrameWidth, widget ),
- 0, widget->isEnabled() ? &cg.brush( QColorGroup::Base ) : &cg.brush( QColorGroup::Background ) );
-
- QRect ar = QStyle::visualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxArrow ), widget );
- if ( active == SC_ComboBoxArrow )
- {
- p->setPen( cg.dark() );
- p->setBrush( cg.brush( QColorGroup::Button ) );
- p->drawRect( ar );
- }
- else
- qDrawWinPanel( p, ar, cg, FALSE, &cg.brush( QColorGroup::Button ) );
-
- ar.addCoords( 2, 2, -2, -2 );
- if ( widget->isEnabled() )
- flags |= Style_Enabled;
-
- if ( active == SC_ComboBoxArrow )
- flags |= Style_Sunken;
- drawPrimitive( PE_ArrowDown, p, ar, cg, flags );
- }
- PARENT_STYLE::drawComplexControl( control, p, widget, r, cg, flags, controls & ~SC_ComboBoxArrow, active, opt );
- break;
-
- case CC_TitleBar:
- if( widget->inherits( "QTitleBar" ) )
- ( ( SalomeStyle* )this )->myTitleParent = ( QWidget* )widget->parent();
-
- default:
- PARENT_STYLE::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
- break;
- }
-}
-
-/*!
- \return pixmap by type
- \param st - type of pixmap
- \param w - widget
- \param opt - style option flags
-*/
-QPixmap SalomeStyle::stylePixmap( StylePixmap st, const QWidget* w, const QStyleOption& opt ) const
-{
- switch ( st )
- {
- case SP_DockWindowCloseButton:
- case SP_TitleBarCloseButton:
- return QPixmap( cross_xpm );
- case SP_TitleBarMaxButton:
- return QPixmap( maximize_xpm );
- case SP_TitleBarNormalButton:
- return QPixmap( normal_xpm );
- case SP_TitleBarMinButton:
- return QPixmap( minimize_xpm );
- default:
- return PARENT_STYLE::stylePixmap( st, w, opt );
- }
-}
-
-/*!
- \return the pixel size
- \param pm - type of pixel metrics
- \param widget - widget
-*/
-int SalomeStyle::pixelMetric( PixelMetric pm, const QWidget* widget ) const
-{
- int ret = 0;
-
- switch ( pm )
- {
- case PM_ButtonMargin:
- ret = 5;
- break;
- case PM_DockWindowFrameWidth:
- ret = 0;
- break;
- case PM_TabBarTabOverlap:
- ret = 2;
- break;
- case PM_TabBarTabHSpace:
- ret = 20;
- break;
- case PM_TabBarTabShiftHorizontal:
- case PM_TabBarTabShiftVertical:
- ret = 0;
- break;
- case PM_TabBarTabVSpace:
- ret = 5;
- break;
- case PM_DefaultFrameWidth:
- ret = 1;
- break;
- case PM_SpinBoxFrameWidth:
- ret = 1;
- break;
- case PM_ProgressBarChunkWidth:
- ret = 1;
- break;
- default:
- ret = PARENT_STYLE::pixelMetric( pm, widget );
- break;
- }
- return ret;
-}
-
-/*!
- \return corrected title text
- \param txt - title text
- \param w - possible width
- \param fm - font metrics
-*/
-QString SalomeStyle::titleText( const QString& txt, const int W, const int H, QFont& f ) const
-{
- QString res = txt.stripWhiteSpace();
-
- QFontMetrics fm( f );
- while( fm.height() > H && f.pointSize()>1 )
- {
- f.setPointSize( f.pointSize()-1 );
- fm = QFontMetrics( f );
- }
-
- if ( fm.width( res ) > W )
- {
- QString end( "..." );
- while ( !res.isEmpty() && fm.width( res + end ) > W )
- res.remove( res.length() - 1, 1 );
-
- if ( !res.isEmpty() )
- res += end;
- }
-
- return res;
-}
-
-/*!
- Class: SalomeStylePlugin [Internal]
- Constructor
-*/
-SalomeStylePlugin::SalomeStylePlugin()
-{
-}
-
-/*!
- Destructor
-*/
-SalomeStylePlugin::~SalomeStylePlugin()
-{
-}
-
-/*!
- \return keys of styles of plugin
-*/
-QStringList SalomeStylePlugin::keys() const
-{
- return QStringList() << "salome";
-}
-
-/*!
- \return just created style
- \param str - style key
-*/
-QStyle* SalomeStylePlugin::create( const QString& str )
-{
- if ( str == "salome" )
- return new SalomeStyle();
- else
- return 0;
-}
-
-Q_EXPORT_PLUGIN( SalomeStylePlugin )
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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 SALOMESTYLE_H
-#define SALOMESTYLE_H
-
-#define parent_style qwindowsstyle
-#define PARENT_STYLE QWindowsStyle
-
-#define QUOTE(x) #x
-#define PARENT_INC(x) QUOTE(x.h)
-
-//#include PARENT_INC(parent_style)
-#include <qwindowsstyle.h>
-
-#include <qpixmap.h>
-#include <qdockwindow.h>
-#include <qstyleplugin.h>
-
-#if defined SALOMESTYLE_EXPORTS
-#if defined WIN32
-#define SALOMESTYLE_EXPORT _declspec( dllexport )
-#else
-#define SALOMESTYLE_EXPORT
-#endif
-#else
-#if defined WIN32
-#define SALOMESTYLE_EXPORT _declspec( dllimport )
-#else
-#define SALOMESTYLE_EXPORT
-#endif
-#endif
-
-class QFontMetrics;
-
-class SALOMESTYLE_EXPORT SalomeStyle : public PARENT_STYLE
-{
-public:
- SalomeStyle();
- virtual ~SalomeStyle();
-
- virtual void polish( QWidget* );
-
- virtual bool eventFilter( QObject*, QEvent* );
-
- static void mix( const double, QRgb&, const QRgb& );
- static void mix( const double, QPixmap&, const QColor& );
- static void mix( const double, const QColor&, const QColor&, QColor& );
-
- static void toGrayscale( QPixmap&, double = 1.0 );
-
- virtual void drawPrimitive( PrimitiveElement, QPainter*, const QRect&,
- const QColorGroup&, SFlags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
-
- virtual void drawControl( ControlElement, QPainter*, const QWidget*,
- const QRect&, const QColorGroup&, SFlags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
-
- virtual QRect subRect( SubRect, const QWidget* ) const;
-
- virtual void drawComplexControl( ComplexControl, QPainter*, const QWidget*,
- const QRect&, const QColorGroup&, SFlags = Style_Default,
- SCFlags = SC_All, SCFlags = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
-
- virtual QPixmap stylePixmap( StylePixmap, const QWidget* = 0,
- const QStyleOption& = QStyleOption::Default ) const;
-
- virtual int pixelMetric( PixelMetric, const QWidget* widget = 0 ) const;
-
-protected:
- typedef enum { LeftToRight, RightToLeft, UpToDown, DownToUp } Direction;
-
- typedef double (*gradient_func)( double );
-
- void drawGradient( QPainter*, const QRect&, const QColor&,
- const QColor&, const Direction, gradient_func ) const;
-
- QString titleText( const QString&, const int, const int, QFont& f ) const;
-
-private:
- QWidget* myTitleParent;
-};
-
-class SalomeStylePlugin : public QStylePlugin
-{
-public:
- SalomeStylePlugin();
- virtual ~SalomeStylePlugin();
-
- virtual QStringList keys() const;
- virtual QStyle* create( const QString& );
-};
-
-#endif
+++ /dev/null
-# SALOME TOOLSGUI : implementation of desktop "Tools" optioins
-#
-# Copyright (C) 2003 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
-#
-#
-#
-# File : Makefile.in
-# Author : Marc Tajchman (CEA)
-# Module : SALOME
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libToolsGUI.la
-
-salomeinclude_HEADERS= \
- ToolsGUI.h \
- ToolsGUI_RegWidget.h \
- ToolsGUI_CatalogGeneratorDlg.h
-
-dist_libToolsGUI_la_SOURCES= \
- ToolsGUI_CatalogGeneratorDlg.cxx \
- ToolsGUI_HelpWindow.cxx \
- ToolsGUI_RegWidget.cxx \
- ToolsGUI_IntervalWindow.cxx \
- ToolsGUI.cxx
-
-EXTRA_DIST+=
-
-MOC_FILES= \
- ToolsGUI_CatalogGeneratorDlg_moc.cxx \
- ToolsGUI_RegWidget_moc.cxx \
- ToolsGUI_HelpWindow_moc.cxx \
- ToolsGUI_IntervalWindow_moc.cxx
-
-nodist_libToolsGUI_la_SOURCES= $(MOC_FILES)
-
-# .po files to transform in .qm
-nodist_salomeres_DATA= \
- ToolsGUI_icons.qm \
- ToolsGUI_msg_en.qm
-
-libToolsGUI_la_CPPFLAGS = $(QT_INCLUDES) $(CAS_CPPFLAGS) $(BOOST_CPPFLAGS) \
- @KERNEL_CXXFLAGS@ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \
- -I$(top_builddir)/salome_adm/unix -I$(top_builddir)/idl \
- -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT
-libToolsGUI_la_LDFLAGS = $(QT_MT_LIBS) ../SUIT/libsuit.la $(CAS_KERNEL) $(KERNEL_LDFLAGS) \
- -lSalomeNS -lOpUtil $(top_builddir)/idl/libSalomeIDLGUI.so
+++ /dev/null
-// SALOME TOOLSGUI : implementation of desktop "Tools" optioins
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : ToolsGUI.cxx
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#include "ToolsGUI.h"
-
-/*!
- \return true if object is visible
-*/
-bool ToolsGUI::GetVisibility( _PTR(Study) theStudy,
- _PTR(SObject) theObj,
- void* theId )
-{
- _PTR(GenericAttribute) anAttr;
- if ( theObj && theObj->FindAttribute( anAttr, "AttributeGraphic" ) )
- {
- _PTR(AttributeGraphic) aGraphic (anAttr);
- return aGraphic->GetVisibility( (unsigned long)theId );
- }
-
- return false;
-}
-
-/*!
- Set flag visibility of object
- \param theStudy - study
- \param theEntry - entry
- \param theValue - flag visibility
- \param theId - id
-*/
-bool ToolsGUI::SetVisibility( _PTR(Study) theStudy,
- const char* theEntry,
- const bool theValue,
- void* theId )
-{
- _PTR(SObject) anObj ( theStudy->FindObjectID( theEntry ) );
-
- if ( anObj )
- {
- _PTR(GenericAttribute) aGAttr;
- if ( anObj->FindAttribute( aGAttr, "AttributeGraphic" ) )
- {
- _PTR(AttributeGraphic) anAttr ( aGAttr );
- anAttr->SetVisibility( (unsigned long)theId, theValue );
- }
- else if ( theValue )
- {
- _PTR(StudyBuilder) aBuilder (theStudy->NewBuilder());
- _PTR(AttributeGraphic) anAttr (aBuilder->FindOrCreateAttribute(anObj, "AttributeGraphic"));
- anAttr->SetVisibility( (unsigned long)theId, theValue );
- }
- return true;
- }
-
- return false;
-}
-
+++ /dev/null
-// SALOME TOOLSGUI : implementation of desktop "Tools" optioins
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : ToolsGUI.h
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#ifndef ToolsGUI_HeaderFile
-#define ToolsGUI_HeaderFile
-
-#include "utilities.h"
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#include "SALOMEDSClient.hxx"
-
-class Standard_EXPORT ToolsGUI
-{
-public :
- static bool GetVisibility( _PTR(Study) theStudy,
- _PTR(SObject) theObj,
- void* theId );
- static bool SetVisibility( _PTR(Study) theStudy,
- const char* theEntry,
- const bool theValue,
- void* theId );
-};
-
-#endif
+++ /dev/null
-// SALOME TOOLSGUI : implementation of desktop "Tools" optioins
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : ToolsGUI_CatalogGeneratorDlg.cxx
-// Author : Nicolas REJNERI
-// Modified : Marc TAJCHMAN
-// Module : SALOME
-// $Header$
-
-#include "ToolsGUI_CatalogGeneratorDlg.h"
-
-#include "SUIT_Application.h"
-#include "SUIT_Desktop.h"
-#include "SUIT_MessageBox.h"
-#include "SUIT_Tools.h"
-#include "SUIT_Session.h"
-
-#include <stdlib.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qvalidator.h>
-#include <qfile.h>
-
-#include <OSD_Process.hxx>
-#include <OSD_Path.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <Standard_CString.hxx>
-
-#include "utilities.h"
-
-using namespace std;
-
-#define SPACING_SIZE 6
-#define MARGIN_SIZE 11
-#define MIN_EDIT_SIZE 250
-
-/*!
- Constructor
-*/
-ToolsGUI_CatalogGeneratorDlg::ToolsGUI_CatalogGeneratorDlg( QWidget* parent, const char* name )
- : QDialog( parent, name, TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
-{
- if ( !name )
- setName( "ToolsGUI_CatalogGeneratorDlg" );
- resize( 322, 120 );
- setCaption( tr( "TOOLS_CATALOG_GENERATOR" ) );
- setSizeGripEnabled( TRUE );
-
- QGridLayout* aTopLayout = new QGridLayout(this);
- aTopLayout->setMargin(MARGIN_SIZE);
- aTopLayout->setSpacing(SPACING_SIZE);
-
- QGroupBox* filesGrp = new QGroupBox( tr( "TOOLS_FILES") , this, "filesGrp" );
- filesGrp->setColumnLayout( 0, Qt::Vertical );
- filesGrp->layout()->setSpacing( 0 );
- filesGrp->layout()->setMargin( 0 );
- QGridLayout* filesGrpLayout = new QGridLayout( filesGrp->layout() );
- filesGrpLayout->setAlignment( Qt::AlignTop );
- filesGrpLayout->setSpacing( SPACING_SIZE );
- filesGrpLayout->setMargin( MARGIN_SIZE );
-
- myIdlEdit = new QLineEdit( filesGrp, "myIdlEdit" );
- myIdlEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myIdlEdit->setMinimumSize( MIN_EDIT_SIZE, 0 );
- myXmlEdit = new QLineEdit( filesGrp, "myXmlEdit" );
- myXmlEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myXmlEdit->setMinimumSize( MIN_EDIT_SIZE, 0 );
-
- myBrowseIdlBtn = new QPushButton( tr( "TOOLS_BUT_BROWSE" ), filesGrp, "myBrowseIdlBtn" );
- myBrowseXmlBtn = new QPushButton( tr( "TOOLS_BUT_BROWSE" ), filesGrp, "myBrowseXmlBtn" );
-// QFontMetrics fm(myBrowseIdlBtn->font());
-// myBrowseIdlBtn->setFixedWidth(fm.width(myBrowseIdlBtn->text()) + 10);
-// myBrowseXmlBtn->setFixedWidth(fm.width(myBrowseXmlBtn->text()) + 10);
-
- filesGrpLayout->addWidget( new QLabel( tr( "TOOLS_IDL_FILE" ), filesGrp ), 0, 0);
- filesGrpLayout->addWidget( myIdlEdit, 0, 1 );
- filesGrpLayout->addWidget( myBrowseIdlBtn, 0, 2 );
- filesGrpLayout->addWidget( new QLabel( tr( "TOOLS_XML_FILE" ), filesGrp ), 1, 0);
- filesGrpLayout->addWidget( myXmlEdit, 1, 1 );
- filesGrpLayout->addWidget( myBrowseXmlBtn, 1, 2 );
-
- QGroupBox* supplGrp = new QGroupBox(tr( "TOOLS_SUPPLEMENT" ) , this, "SupplGrp" );
- supplGrp->setColumnLayout( 0, Qt::Vertical );
- supplGrp->layout()->setSpacing( 0 );
- supplGrp->layout()->setMargin( 0 );
- QGridLayout* supplGrpLayout = new QGridLayout( supplGrp->layout() );
- supplGrpLayout->setAlignment( Qt::AlignTop );
- supplGrpLayout->setSpacing( SPACING_SIZE );
- supplGrpLayout->setMargin( MARGIN_SIZE );
-
- QSize myMinimumSize(int(MIN_EDIT_SIZE*0.3), 0);
-
- myAuthorEdit = new QLineEdit( supplGrp , "myAuthorEdit" );
- myAuthorEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myAuthorEdit->setMinimumSize( myMinimumSize );
-
- OSD_Process aProcess;
- myAuthorEdit->setText(aProcess.UserName().ToCString());
-
- myVersionEdit = new QLineEdit(supplGrp , "myVersion" );
- myVersionEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myVersionEdit->setMinimumSize( myMinimumSize );
- QStringList aList = QStringList::split(QRegExp("\\s+"),tr( "INF_VERSION" ));
- myVersionEdit->setText(aList.last());
-
- myPngEdit = new QLineEdit(supplGrp , "myCompIcon" );
- myPngEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myPngEdit->setMinimumSize( MIN_EDIT_SIZE, 0 );
-
- myBrowsePngBtn = new QPushButton( tr( "TOOLS_BUT_BROWSE" ), supplGrp, "myBrowsePngBtn" );
-
- myCompName = new QLineEdit(supplGrp , "myCompName");
- myCompName->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myCompName->setMinimumSize( myMinimumSize );
-
- myCompUserName = new QLineEdit(supplGrp , "myCompUserName");
- myCompUserName->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myCompUserName->setMinimumSize( (int)(MIN_EDIT_SIZE*0.3), 0 );
-
- myCompType = new QLineEdit(supplGrp , "myCompType");
- myCompType->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myCompType->setMinimumSize( myMinimumSize );
- myCompType->setText("OTHER");
-
- myCompMultiStd = new QLineEdit(supplGrp , "myCompMultiStd");
- myCompMultiStd->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myCompMultiStd->setMinimumSize( myMinimumSize );
- myCompMultiStd->setText("1");
- QIntValidator *ivalidator = new QIntValidator(myVersionEdit);
- myCompMultiStd->setValidator(ivalidator);
-
- supplGrpLayout->addWidget( new QLabel( tr( "TOOLS_AUTHOR" ), supplGrp ), 0, 0);
- supplGrpLayout->addWidget( myAuthorEdit, 0, 1 );
- supplGrpLayout->addWidget( new QLabel( tr( "TOOLS_COMP_NAME" ), supplGrp ), 0, 2);
- supplGrpLayout->addWidget(myCompName,0,3);
- supplGrpLayout->addWidget( new QLabel( tr( "TOOLS_COMP_USERNAME" ), supplGrp ), 0, 4);
- supplGrpLayout->addWidget(myCompUserName,0,5);
- supplGrpLayout->addWidget( new QLabel( tr( "TOOLS_VERSION" ), supplGrp ), 1, 0);
- supplGrpLayout->addWidget( myVersionEdit, 1, 1);
- supplGrpLayout->addWidget( new QLabel( tr( "TOOLS_COMP_MULTISTD" ), supplGrp ), 1, 2);
- supplGrpLayout->addWidget(myCompMultiStd,1,3);
- supplGrpLayout->addWidget( new QLabel( tr( "TOOLS_COMP_TYPE" ), supplGrp ), 1, 4);
- supplGrpLayout->addWidget(myCompType,1,5);
- supplGrpLayout->addWidget( new QLabel( tr( "TOOLS_PNG_FILE" ), supplGrp ), 2, 0);
- supplGrpLayout->addMultiCellWidget( myPngEdit, 2,2,1,4 );
- supplGrpLayout->addWidget( myBrowsePngBtn, 2, 5 );
-
-
- QHBoxLayout* aBtnLayout = new QHBoxLayout;
- aBtnLayout->setSpacing( SPACING_SIZE );
- aBtnLayout->setMargin( 0 );
-
- myApplyBtn = new QPushButton( tr( "TOOLS_BUT_APPLY" ), this, "myApplyBtn" );
- myApplyBtn->setAutoDefault( true );
- myApplyBtn->setDefault( true );
- myCloseBtn = new QPushButton( tr( "TOOLS_BUT_CLOSE" ), this, "myCloseBtn" );
- myCloseBtn->setAutoDefault( true );
-
- aBtnLayout->addWidget( myApplyBtn );
- aBtnLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
- aBtnLayout->addWidget( myCloseBtn );
-
- aTopLayout->addWidget( filesGrp, 0, 0 );
- aTopLayout->addWidget( supplGrp, 1, 0 );
- aTopLayout->addLayout( aBtnLayout, 2, 0 );
-
- /* signals and slots connections */
- connect( myApplyBtn, SIGNAL( clicked() ), this, SLOT( onApply() ) );
- connect( myCloseBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( myBrowseIdlBtn, SIGNAL( clicked() ), this, SLOT( onBrowseBtnClicked() ) );
- connect( myBrowseXmlBtn, SIGNAL( clicked() ), this, SLOT( onBrowseBtnClicked() ) );
- connect( myBrowsePngBtn, SIGNAL( clicked() ), this, SLOT( onBrowseBtnClicked() ) );
- connect( myIdlEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( updateButtonState() ) );
- connect( myXmlEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( updateButtonState() ) );
-
- updateButtonState();
-}
-
-/*!
- destructor
-*/
-ToolsGUI_CatalogGeneratorDlg::~ToolsGUI_CatalogGeneratorDlg()
-{
-}
-
-/*!
- \return IDL file name entered
-*/
-QString ToolsGUI_CatalogGeneratorDlg::getIdlFile()
-{
- return myIdlEdit->text().stripWhiteSpace();
-}
-
-/*!
- \return XML file name entered
-*/
-QString ToolsGUI_CatalogGeneratorDlg::getXmlFile()
-{
- return myXmlEdit->text().stripWhiteSpace();
-}
-
-/*!
- \return PNG file name entered
-*/
-QString ToolsGUI_CatalogGeneratorDlg::getPngFile()
-{
- return myPngEdit->text().stripWhiteSpace();
-}
-
-/*!
- \return author
-*/
-QString ToolsGUI_CatalogGeneratorDlg::getAuthor()
-{
- return myAuthorEdit->text().stripWhiteSpace();
-}
-
-/*!
- \return version number
-*/
-QString ToolsGUI_CatalogGeneratorDlg::getVersion()
-{
- return myVersionEdit->text().stripWhiteSpace();
-}
-
-/*!
- \return name of the component
-*/
-QString ToolsGUI_CatalogGeneratorDlg::getCompName()
-{
- return myCompName->text().stripWhiteSpace();
-}
-
-/*!
- \return username of the component
-*/
-QString ToolsGUI_CatalogGeneratorDlg::getCompUserName()
-{
- return myCompUserName->text().stripWhiteSpace();
-}
-
-/*!
- \return type of the component
-*/
-QString ToolsGUI_CatalogGeneratorDlg::getCompMultiStd()
-{
- return myCompMultiStd->text().stripWhiteSpace();
-}
-
-/*!
- \return type of the component
-*/
-QString ToolsGUI_CatalogGeneratorDlg::getCompType()
-{
- return myCompType->text().stripWhiteSpace();
-}
-
-/*!
- \return IDL path of modules
-*/
-QString ToolsGUI_CatalogGeneratorDlg::getIdlPath()
-{
- cout << "QAD_Desktop::getCatalogue() is not implemented!!";
- if ( true )
- return QString( "" );
-/*
- SALOME_ModuleCatalog::ModuleCatalog_var aCatalog =
- SALOME_ModuleCatalog::ModuleCatalog::_narrow( QAD_Application::getDesktop()->getCatalogue() );
-
- SALOME_ModuleCatalog::ListOfIAPP_Affich_var list_composants =
- aCatalog->GetComponentIconeList();
-
- QString IDLpath = "";
-
- for (unsigned int ind = 0; ind < list_composants->length();ind++) {
- QString modulename = CORBA::string_dup(list_composants[ind].modulename) ;
-
- QCString dir;
- if (dir = getenv( modulename + "_ROOT_DIR")) {
- IDLpath = IDLpath + "-I" + SUIT_Tools::addSlash( SUIT_Tools::addSlash(dir) +
- SUIT_Tools::addSlash("idl") +
- SUIT_Tools::addSlash("salome")) + " ";
- }
- }
-
- // MESSAGE ( " IDLpath = " << IDLpath);
-
- return IDLpath;
-*/
-}
-
-/*!
- SLOT: called on Browse button click
-*/
-void ToolsGUI_CatalogGeneratorDlg::onBrowseBtnClicked()
-{
- QPushButton* send = (QPushButton*)sender();
-
- SUIT_Application* app = SUIT_Session::session()->activeApplication();
-
- if ( send == myBrowseIdlBtn ) {
- QString file = app->getFileName( true, myIdlEdit->text().stripWhiteSpace(), tr("TOOLS_MEN_IMPORT_IDL"), tr("TOOLS_MEN_IMPORT"), 0 );
- if ( !file.isEmpty() ) {
- myIdlEdit->setText(file);
- }
- }
- else if ( send == myBrowseXmlBtn ) {
- QString file = app->getFileName( false, myXmlEdit->text().stripWhiteSpace(), tr("TOOLS_MEN_EXPORT_XML"), tr("TOOLS_MEN_EXPORT"), 0 );
- if ( !file.isEmpty() ) {
- myXmlEdit->setText(file);
- }
- } else if ( send == myBrowsePngBtn ) {
- QString file = app->getFileName( true, myPngEdit->text().stripWhiteSpace(), tr("TOOLS_MEN_IMPORT_PNG"), tr("TOOLS_MEN_IMPORT"), 0 );
- if ( !file.isEmpty() ) {
- myPngEdit->setText(file);
-
- }
- }
- updateButtonState();
-}
-
-/*!
- Updates <OK> button's state
-*/
-void ToolsGUI_CatalogGeneratorDlg::updateButtonState()
-{
- myApplyBtn->setEnabled( !myIdlEdit->text().stripWhiteSpace().isEmpty() &&
- !myXmlEdit->text().stripWhiteSpace().isEmpty() );
-}
-
-/*!
- <Apply> button slot, performs IDL->XML conversion
-*/
-void ToolsGUI_CatalogGeneratorDlg::onApply()
-{
- QString IDLpath = getIdlPath();
- QString XmlFile = getXmlFile();
- QString IdlFile = getIdlFile();
- QString Author = getAuthor();
- QString Version = getVersion();
- QString PngFile = getPngFile();
- QString CompName = getCompName(); //gets component name
- QString CompUserName = getCompUserName(); //gets component username
- QString CompType = getCompType(); //gets component type
- QString CompMultiStd = getCompMultiStd();
-
- if ( !XmlFile.isEmpty() && !IdlFile.isEmpty() ) {
- if ( !QFile::exists( IdlFile ) ) {
- SUIT_MessageBox::error1( this,
- tr("TOOLS_ERR_ERROR"),
- tr("TOOLS_ERR_FILE_NOT_EXIST").arg(IdlFile),
- tr ("TOOLS_BUT_OK") );
- }
- else {
- QString command = "";
- if ( getenv("KERNEL_ROOT_DIR") )
- command = QString( getenv( "KERNEL_ROOT_DIR" ) ) + "/bin/salome/runIDLparser -K " + IDLpath + " -Wbcatalog=" + XmlFile;
- else {
- SUIT_MessageBox::error1( this,
- tr("TOOLS_ERR_ERROR"),
- tr("KERNEL_ROOT_DIR variable is not defined"),
- tr("TOOLS_BUT_OK") );
- }
-
- if (!Author.isEmpty()) command += ",author=" + Author;
- if (!Version.isEmpty()) command += ",version=" + Version;
- if (!PngFile.isEmpty()) {
- OSD_Path aPath((Standard_CString)PngFile.latin1());
- TCollection_AsciiString aFile = aPath.Name() + aPath.Extension();
- command += QString(",icon=") + QString(aFile.ToCString());
- }
- if (!CompName.isEmpty()) command += ",name=" + CompName;
- if (!CompUserName.isEmpty()) command += ",username=" + CompUserName;
- if (!CompType.isEmpty()) command += ",type=" + CompType;
- if (!CompMultiStd.isEmpty()) command += ",multistudy=" + CompMultiStd;
- command += " " + IdlFile;
- MESSAGE( "shell command is : " << command );
- int res;
- res = system( ( char* )( command.latin1() ) );
- if ( res == -1 ) {
- MESSAGE( "work failed (system command result = " << res );
- } else if (res == 217) {
- MESSAGE( "shell exec failed (system command result = " << res );
- }
- }
- }
-}
+++ /dev/null
-// SALOME TOOLSGUI : implementation of desktop "Tools" optioins
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : ToolsGUI_CatalogGeneratorDlg.h
-// Author : Nicolas REJNERI
-// Module : SALOME
-// $Header$
-
-#ifndef DIALOGBOX_TOOLSGUI_CATALOGGENERATORDLG_H
-#define DIALOGBOX_TOOLSGUI_CATALOGGENERATORDLG_H
-
-#include <qdialog.h>
-
-#include <Standard_Macro.hxx>
-
-class QLineEdit;
-class QPushButton;
-
-class Standard_EXPORT ToolsGUI_CatalogGeneratorDlg : public QDialog
-{
- Q_OBJECT
-
-public:
- ToolsGUI_CatalogGeneratorDlg( QWidget* parent = 0, const char* name = 0 );
- ~ToolsGUI_CatalogGeneratorDlg();
-
- QString getIdlPath();
- QString getIdlFile();
- QString getXmlFile();
- QString getPngFile();
- QString getAuthor();
- QString getVersion();
- QString getCompName();
- QString getCompUserName();
- QString getCompType();
- QString getCompMultiStd();
-
-protected slots:
- void onBrowseBtnClicked();
- void updateButtonState();
- void onApply();
-
-private:
- QLineEdit* myIdlEdit;
- QLineEdit* myXmlEdit;
- QLineEdit* myPngEdit;
- QLineEdit* myVersionEdit;
- QLineEdit* myAuthorEdit;
- QLineEdit* myCompName;
- QLineEdit* myCompUserName;
- QLineEdit* myCompType;
- QLineEdit* myCompMultiStd;
- QPushButton* myBrowseIdlBtn;
- QPushButton* myBrowseXmlBtn;
- QPushButton* myBrowsePngBtn;
-
- QPushButton* myApplyBtn;
- QPushButton* myCloseBtn;
-};
-
-#endif // DIALOGBOX_TOOLSGUI_CATALOGGENERATORDLG_H
+++ /dev/null
-// SALOME RegistryDisplay : GUI for Registry server implementation
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : ToolsGUI_HelpWindow.cxx
-// Author : Pascale NOYRET, EDF
-// Module : SALOME
-// $Header$
-
-# include "ToolsGUI_HelpWindow.h"
-# include "utilities.h"
-
-# include <qtextview.h>
-# include <qpushbutton.h>
-# include <qtextstream.h>
-# include <qfile.h>
-
-using namespace std;
-
-/*!
- Constructor
-*/
-ToolsGUI_HelpWindow::ToolsGUI_HelpWindow(QWidget* parent, const char* name )
- : QMainWindow( parent, name, WType_TopLevel | WDestructiveClose )
-{
- BEGIN_OF("Constructeur ToolsGUI_HelpWindow");
-
- setCaption( tr( "Help" ) );
-
- myTextView = new QTextView( this, "myTextView" );
- QPalette pal = myTextView->palette();
- QColorGroup cg = pal.active();
- cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
- cg.setColor( QColorGroup::HighlightedText, Qt::white );
- cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
- cg.setColor( QColorGroup::Text, Qt::black );
- pal.setActive ( cg );
- cg = pal.inactive();
- cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
- cg.setColor( QColorGroup::HighlightedText, Qt::white );
- cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
- cg.setColor( QColorGroup::Text, Qt::black );
- pal.setInactive( cg );
- cg = pal.disabled();
- cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
- cg.setColor( QColorGroup::HighlightedText, Qt::white );
- cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
- cg.setColor( QColorGroup::Text, Qt::black );
- pal.setDisabled( cg );
- myTextView->setPalette( pal );
-
- setCentralWidget( myTextView );
- setMinimumSize( 450, 250 );
-
- QFile f ( "tmp.txt" );
- if ( f.open( IO_ReadOnly ) )
- {
- QTextStream t( &f );
- while ( !t.eof() )
- {
- myTextView->append(t.readLine());
- }
- }
- f.close();
-
- END_OF("Constructeur ToolsGUI_HelpWindow");
-}
-
-/*!
- Destructor
-*/
-ToolsGUI_HelpWindow::~ToolsGUI_HelpWindow()
-{
- BEGIN_OF("Destructeur ToolsGUI_HelpWindow");
- END_OF("Destructeur ToolsGUI_HelpWindow");
-};
-
-/*!
- Sets text
-*/
-void ToolsGUI_HelpWindow::setText( const QString& text )
-{
- myTextView->setText( text );
-}
-
-
+++ /dev/null
-// SALOME RegistryDisplay : GUI for Registry server implementation
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : HelpWindow.hxx
-// Author : Pascale NOYRET, EDF
-// Module : SALOME
-// $Header$
-
-# ifndef __HELPWINDOW_H__
-# define __HELPWINDOW_H__
-
-# include <qapplication.h>
-# include <qmainwindow.h>
-
-class QTextView;
-
-class ToolsGUI_HelpWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- ToolsGUI_HelpWindow( QWidget* parent = 0, const char* name = 0);
- ~ToolsGUI_HelpWindow();
-
- void setText( const QString& text );
- QTextView* textView() const { return myTextView; }
-
-private:
- QTextView* myTextView;
-};
-# endif /* __HELPWINDOW_H__ */
-
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : ToolsGUI_IntervalWindow.cxx
-// Author : Oksana TCHEBANOVA
-// Module : SALOME
-
-#include "ToolsGUI_IntervalWindow.h"
-
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-# include "utilities.h"
-
-#define MARGIN_SIZE 11
-#define SPACING_SIZE 6
-#define MIN_SPIN_WIDTH 100
-
-/*!
- Constructor
-*/
-ToolsGUI_IntervalWindow::ToolsGUI_IntervalWindow ( QWidget* parent )
-: QDialog( parent, "ToolsGUI_IntervalWindow" , true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose )
-{
- BEGIN_OF("ToolsGUI_IntervalWindow constructor")
- setCaption( tr( "Refresh Interval" ) );
- setSizeGripEnabled( true );
-
- QGridLayout* topLayout = new QGridLayout( this );
- topLayout->setSpacing( SPACING_SIZE );
- topLayout->setMargin( MARGIN_SIZE );
-
- QGroupBox* intervalGrp = new QGroupBox( this, "intervalGrp" );
- intervalGrp->setColumnLayout( 0, Qt::Horizontal );//Vertical
- intervalGrp->layout()->setSpacing( 0 );
- intervalGrp->layout()->setMargin( 0 );
- QGridLayout* intervalGrpLayout = new QGridLayout( intervalGrp->layout() );
- 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, "buttonOk" );
- myButtonOk->setText( tr( "BUT_OK" ) );
- myButtonOk->setAutoDefault( TRUE );
- myButtonOk->setDefault( TRUE );
-
- myButtonCancel = new QPushButton( this, "buttonCancel" );
- myButtonCancel->setText( tr( "BUT_CANCEL" ) );
- myButtonCancel->setAutoDefault( TRUE );
-
- QLabel* TextLabel = new QLabel( intervalGrp, "TextLabel" );
- TextLabel->setText( tr( "Please, enter a number of seconds:" ) );
-
- mySpinBox = new QSpinBox( 1, 999999999, 1, intervalGrp, "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 );
-
- END_OF("ToolsGUI_IntervalWindow constructor")
-}
-
-/*!
- Destructor
-*/
-ToolsGUI_IntervalWindow::~ToolsGUI_IntervalWindow() {}
-
-/*!
- Sets start interval size
-*/
-void ToolsGUI_IntervalWindow::setValue(const int size)
-{
- mySpinBox->setValue(size);
-}
-
-/*!
- \return interval size
-*/
-int ToolsGUI_IntervalWindow::getValue()
-{
- return mySpinBox->value();
-}
-
-/*!
- \return a pointer to myButtonOk
-*/
-QPushButton* ToolsGUI_IntervalWindow::Ok()
-{
- return myButtonOk;
-}
-
-/*!
- \return a pointer to myButtonCancel
-*/
-QPushButton* ToolsGUI_IntervalWindow::Cancel()
-{
- return myButtonCancel;
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-// File : IntervalWindow.hxx
-// Author : Oksana TCHEBANOVA
-// Module : SALOME
-
-#ifndef IntervalWindow_HeaderFile
-#define IntervalWindow_HeaderFile
-
-# include <qwidget.h>
-# include <qdialog.h>
-# include <qpushbutton.h>
-# include <qspinbox.h>
-
-#ifndef WNT
-using namespace std;
-#endif
-
-class ToolsGUI_IntervalWindow : public QDialog
-{
- Q_OBJECT
-
-public:
- ToolsGUI_IntervalWindow( QWidget* parent = 0 );
- ~ToolsGUI_IntervalWindow();
-
- QPushButton* Ok();
- QPushButton* Cancel();
-
- int getValue();
- void setValue( int );
-
-private:
- QSpinBox* mySpinBox;
- QPushButton* myButtonOk;
- QPushButton* myButtonCancel;
-};
-
-#endif
+++ /dev/null
-// SALOME RegistryDisplay : GUI for Registry server implementation
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : ToolsGUI_RegWidget.cxx
-// Author : Pascale NOYRET, EDF
-// Module : SALOME
-// $Header$
-
-# include <qpushbutton.h>
-# include <qlistview.h>
-# include <qtabwidget.h>
-# include <qstatusbar.h>
-# include <qtextview.h>
-# include <qtimer.h>
-# include <qinputdialog.h>
-# include <qtoolbar.h>
-# include <qdir.h>
-# include <qtooltip.h>
-
-# include "SALOME_NamingService.hxx"
-# include "ServiceUnreachable.hxx"
-# include "Utils_SINGLETON.hxx"
-# include "Utils_CommException.hxx"
-
-# include "utilities.h"
-# include "OpUtil.hxx"
-
-# include "ToolsGUI_RegWidget.h"
-# include "ToolsGUI_HelpWindow.h"
-# include "ToolsGUI_IntervalWindow.h"
-
-# include "Qtx.h"
-
-using namespace std;
-
-typedef int PIXELS;
-ToolsGUI_RegWidget* ToolsGUI_RegWidget::myRegWidgetPtr = 0;
-
-QString addSlash( const QString& );
-QString findFile( QString filename );
-
-#define BOLD( text ) ( QString( "<b>" ) + QString( text ) + QString( "</b>" ) )
-
-static const char* const time_data[] = {
-"16 16 6 1",
-". c None",
-"b c None",
-"# c #000000",
-"a c #4c4c4c",
-"d c #878787",
-"c c #ffffff",
-".....#####ab....",
-"...##cc#dc##ab..",
-"..#ccc###dcc#ab.",
-".#ccccc#dcccc#a.",
-".#ccccc#dcccc#ab",
-"#cccccc#dccccc#a",
-"#cccccc#dccc#c#a",
-"#c##ccc########a",
-"#ccddcccdddd#d#a",
-"#cccccccccccdc#a",
-".#ccccccccccc#aa",
-".#ccccc#ccccc#a.",
-"..#cccc#dccc#aa.",
-"...##cccdc##aa..",
-".....#####aaa...",
-"......aaaaa....."};
-
-static const char* const close_data[] = {
-"16 16 6 1",
-"d c None",
-". c None",
-"# c #000000",
-"a c #4c4c4c",
-"c c #5b5b5b",
-"b c #ffffff",
-".....#####a.....",
-"...##bbbbb##a...",
-"..#bbbbbbbbb#a..",
-".#b#cbbbbbb#d#a.",
-".#bc#cbbbb#cb#a.",
-"#bbbc#cbb#cbbb#a",
-"#bbbbc#c#cbbbb#a",
-"#bbbbbc#cbbbbb#a",
-"#bbbbc#c#cbbbb#a",
-"#bbb#ccbb##bbb#a",
-".#b#c#bbbbc#b#aa",
-".#bc#bbbbbb#c#a.",
-"..#bbbbbbbbb#aa.",
-"...##bbbbb##aa..",
-".....#####aaa...",
-"......aaaaa....."};
-
-static const char* const refresh_data[] = {
-"16 16 5 1",
-". c None",
-"# c #000000",
-"a c #4c4c4c",
-"c c #878787",
-"b c #ffffff",
-".....#####a.....",
-"...##bb#bb##a...",
-"..#bbbbc#bbb#a..",
-".#bbbb####cbb#a.",
-".#bbb#cc#cbbb#a.",
-"#bbb#cb#cbbbbb#a",
-"#bb#cbbbbbb#bb#a",
-"#bb#cbbbbbb#cb#a",
-"#bb#cbbbbbb#cb#a",
-"#bbbbbb#bb#cbb#a",
-".#bbbb#cb#cbb#aa",
-".#bbb####cbbb#a.",
-"..#bbb#cbbbb#aa.",
-"...##bb#cb##aa..",
-".....#####aaa...",
-"......aaaaa....."};
-
-/*!
- Creates components list
-*/
-
-Registry::Components_var MakeRegistry( CORBA::ORB_var &orb )
-{
-
- const char *registryName="Registry" ;
-
- SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
- naming.init_orb( orb ) ;
-
- // Recuperation de la reference de l'objet
- CORBA::Object_var object = 0 ;
- try
- {
- SCRUTE(registryName) ;
- object = naming.Resolve( registryName ) ;
- if(CORBA::is_nil(object)) throw CommException( "unable to find the RegistryService" ) ;
- }
- catch( const ServiceUnreachable& ex )
- {
- MESSAGE( ex.what() )
- exit( EXIT_FAILURE ) ;
- }
- catch( const CORBA::Exception& )
- {
- exit( EXIT_FAILURE ) ;
- }
-
- // Specialisation de l'objet generique
-
- return Registry::Components::_narrow( object ) ;
-}
-
-/*!
- Only one global registry window should exist at the moment
- This method creates registry window if necessary and returns it
- [ static ]
-*/
-ToolsGUI_RegWidget* ToolsGUI_RegWidget::GetRegWidget( CORBA::ORB_var &orb , QWidget *parent, const char *name )
-{
- if ( !myRegWidgetPtr )
- myRegWidgetPtr = new ToolsGUI_RegWidget( orb, parent, name );
- return myRegWidgetPtr;
-}
-
-/*!
- Constructor
-*/
-ToolsGUI_RegWidget::ToolsGUI_RegWidget(CORBA::ORB_var &orb, QWidget *parent, const char *name )
- : QMainWindow( parent, name, WType_TopLevel | WDestructiveClose ),
- _VarComponents( MakeRegistry(orb) ),
- _clients(0), _history(0), _parent( parent ),
- _tabWidget(0), _refresh(0), _interval(0),
- myInfoWindow(0), myHelpWindow(0), myIntervalWindow(0)
-{
- QString aFile = findFile("default.png");
- /* char* dir = getenv( "CSF_ResourcesDefaults" );
- QString path( "" );
- if ( dir ) {
- QDir qDir( dir );
- path = qDir.filePath( "default.png" );
- }*/
- QPixmap pm ( aFile );
- if ( !pm.isNull() )
- setIcon( pm );
-
- // pixmap for buttons
- QPixmap image_refresh ( ( const char** ) refresh_data );
- QPixmap image_interval( ( const char** ) time_data );
- QPixmap image_close ( ( const char** ) close_data );
-
- // Buttons definition
- QToolBar* topbar = new QToolBar( tr("Toolbar"), this );
- setDockEnabled( topbar, DockTornOff, false );
- setDockMenuEnabled( false );
-
- _refresh = new QPushButton( tr( "Refresh" ), topbar );
- _refresh->setIconSet( image_refresh );
- _refresh->setFocusPolicy( NoFocus );
- connect( _refresh, SIGNAL( clicked() ), this, SLOT( slotListeSelect() ) );
- QToolTip::add( _refresh, "", toolTipGroup(), tr("Immediately updates list of components") );
-
- /* 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") );
- */
-
- _interval = new QPushButton( tr( "Interval" ), topbar );
- _interval->setIconSet( image_interval );
- _interval->setFocusPolicy( NoFocus );
- connect( _interval, SIGNAL( clicked() ), this, SLOT( slotSelectRefresh() ) );
- QToolTip::add( _interval, "", toolTipGroup(), tr("Changes refresh interval") );
-
- topbar->addSeparator();
- _close = new QPushButton( tr("Close"), topbar );
- _close->setIconSet( image_close );
- _close->setFocusPolicy( NoFocus );
- connect( _close, SIGNAL( clicked() ), this, SLOT( close() ) );
- QToolTip::add( _close, "", toolTipGroup(), tr("Closes Registry window") );
-
- // Display area and associated slots definition
- _tabWidget = new QTabWidget( this );
- _clients = new QListView( _tabWidget );
- SetListe();
- _history = new QListView( _tabWidget );
- SetListeHistory();
-
- _tabWidget->addTab( _clients, tr( "Running" ) );
- _tabWidget->addTab( _history, tr( "History" ) );
- connect( _tabWidget, SIGNAL( currentChanged( QWidget* )), this, SLOT( slotListeSelect() ) );
- connect( _clients, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( slotClientChanged( QListViewItem* ) ) );
- connect( _history, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( slotHistoryChanged( QListViewItem* ) ) );
- setCentralWidget( _tabWidget );
-
- // 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 );
-
- PIXELS xpos = 160 ;
- PIXELS ypos = 100 ;
- PIXELS largeur = 800 ;
- PIXELS hauteur = 350 ;
- setGeometry( xpos, ypos, largeur, hauteur ) ;
- setCaption( name ) ;
- statusBar()->message(" ");
-}
-
-/*!
- Destructor
-*/
-ToolsGUI_RegWidget::~ToolsGUI_RegWidget()
-{
- MESSAGE("Debut du Destructeur");
- _counter->stop();
- myRegWidgetPtr = 0;
-};
-
-/*!
- Event filter
-*/
-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() == Key_Enter || ke->key() == Key_Return ) {
- slotClientChanged( _clients->currentItem() );
- }
- }
- else if ( object == _history && event->type() == QEvent::KeyPress ) {
- QKeyEvent* ke = (QKeyEvent*)event;
- if ( ke->key() == Key_Enter || ke->key() == Key_Return ) {
- slotHistoryChanged( _history->currentItem() );
- }
- }
- }
- return QMainWindow::eventFilter( object, event );
-}
-
-/*!
- Searches item in the list and returns it's index or -1 if not found
-*/
-int ToolsGUI_RegWidget::numitem(const QString &name, const QString &pid, const QString &machine,const Registry::AllInfos *listclient)
-{
- BEGIN_OF("numitem");
- for (CORBA::ULong i=0; i<listclient->length(); 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) )
- {
- END_OF("numitem");
- return i;
- }
- }
- END_OF("numitem");
- return -1;
-}
-
-/*!
- Returns text, containing information about client [ static ]
-*/
-QString ToolsGUI_RegWidget::setlongText( const Registry::Infos &c_info)
-{
- BEGIN_OF("setlongText");
- ASSERT( c_info.name != NULL );
- QString a = QString( "<hr><h2>" ) + tr( "Code" ) + QString( " : " );
- a.append( QString( c_info.name ) );
- a.append( "</h1><hr><br>" );
- a.append( "<code>" ); // ASV: 28.07.06 : added <code> 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( "<br>" );
-
- 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( " )<br> " ) + tr( "in directory" ) + QString( " " ));
- a.append( BOLD( c_info.cdir ) );
-
- time_t aTime;
- a.append( QString( "<br>" ) + 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( "<br>" );
-
- 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 ) );
- a.append( "<br>" );
- 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( "<br>" );
- delete [] t3;
- }
- else
- {
- a.append( tr( "still running" ) + QString( "<br>" ) );
- }
-
- 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( ")<br>" ) );
- }
- a.append( "</code>" ); // ASV: 28.07.06 : added <code> tags to make the text font be
- // fixed width (looks much better on Windows)
- END_OF("setlongText");
- return a;
-
-}
-
-/*!
- Close event
-*/
-void ToolsGUI_RegWidget::closeEvent( QCloseEvent *e)
-{
- BEGIN_OF("closeEvent");
- if ( myInfoWindow )
- myInfoWindow->close();
- if ( myHelpWindow )
- myHelpWindow->close();
- if (myIntervalWindow)
- myIntervalWindow->close();
- e->accept();
- END_OF("closeEvent");
-};
-
-/*!
- Setups Clients list
-*/
-void ToolsGUI_RegWidget::SetListe()
-{
- BEGIN_OF("SetListe");
- _clients->installEventFilter( this );
- _clients->setAllColumnsShowFocus( true );
- _clients->addColumn( tr( "Component" ), -1);
- _clients->addColumn( tr( "PID" ), -1 );
- _clients->addColumn( tr( "User Name" ), -1 );
- _clients->addColumn( tr( "Machine" ), -1 );
- _clients->addColumn( tr( "begins" ), -1 );
- _clients->addColumn( tr( "hello" ) , -1 );
- _clients->setColumnAlignment( 1, Qt::AlignRight );
- END_OF("SetListe");
-}
-
-/*!
- Setups History list
-*/
-void ToolsGUI_RegWidget::SetListeHistory()
-{
- BEGIN_OF("SetListeHistory")
- _history->installEventFilter( this );
- _history->setAllColumnsShowFocus( true );
- _history->addColumn( tr( "Component" ), -1);
- _history->addColumn( tr( "PID" ), -1 );
- _history->addColumn( tr( "User Name" ), -1 );
- _history->addColumn( tr( "Machine" ), -1 );
- _history->addColumn( tr( "begins" ), -1 );
- _history->addColumn( tr( "ends" ), -1 );
- _history->setColumnAlignment( 1, Qt::AlignRight );
- END_OF("SetListeHistory")
-}
-
-/*!
- Updates History list
-*/
-void ToolsGUI_RegWidget::InfoHistory()
-{
-
- BEGIN_OF("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 ] = ' ';
- QListViewItem * item = new QListViewItem(_history, QString(c_info.name),\
- a, QString(c_info.pwname), QString(c_info.machine), \
- QString(t1), QString(t2));
- item=0 ;
- delete [] t1;
- delete [] t2;
-
- }
- }
- catch( ... )
- {
- _interval->setDisabled( TRUE ) ;
- _refresh->setDisabled( TRUE ) ;
- _counter->stop();
- MESSAGE("Sorry, No more Registry Server") ;
- statusBar()->message( tr( "Sorry, No more Registry Server" ) ) ;
- }
- END_OF("InfoHistory")
-}
-
-/*!
- Updates clients list
-*/
-void ToolsGUI_RegWidget::InfoReg()
-{
- BEGIN_OF("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 ] = ' ';
- QListViewItem * item = new QListViewItem(_clients, QString(c_info.name),\
- a, QString(c_info.pwname), QString(c_info.machine), \
- QString(t1), QString(t2));
- item=0 ;
- delete [] t1;
- delete [] t2;
-
- }
- }
- catch( ... )
- {
- _interval->setDisabled( TRUE ) ;
- _refresh->setDisabled( TRUE ) ;
- _counter->stop();
- MESSAGE("Sorry, No more Registry Server") ;
- statusBar()->message( tr( "Sorry, No more Registry Server" ) ) ;
- }
- END_OF("InfoReg")
-}
-
-/*!
- Called when <Refresh> button is clicked
-*/
-void ToolsGUI_RegWidget::slotListeSelect()
-{
- try
- {
- ASSERT(_tabWidget->currentPage() != NULL);
- if (_tabWidget->currentPage () == _clients) InfoReg();
- else if (_tabWidget->currentPage () == _history) InfoHistory();
- }
- catch( ... )
- {
- MESSAGE("Sorry, No more Registry Server") ;
- statusBar()->message( tr( "Sorry, No more Registry Server" ) ) ;
- }
-}
-
-/*!
- Called when <Interval> button is clicked (changing refresh interval)
-*/
-void ToolsGUI_RegWidget::slotSelectRefresh()
-{
- BEGIN_OF("slotSelectRefresh");
- myIntervalWindow = new ToolsGUI_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() ) );
- END_OF("slotSelectRefresh");
-}
-
-/*!
- SLOT: called when IntervalWindow's OK button is clicked
-*/
-void ToolsGUI_RegWidget::slotIntervalOk()
-{
- BEGIN_OF("slotIntervalOk");
- myRefreshInterval = myIntervalWindow->getValue();
- _counter->changeInterval( myRefreshInterval * 1000 );
- SCRUTE(myRefreshInterval);
- myIntervalWindow->close();
- END_OF("slotIntervalOk");
-}
-/*!
- Called when <Help> button is clicked
-*/
-void ToolsGUI_RegWidget::slotHelp()
-{
- BEGIN_OF("slotHelp()");
-
- if ( !myHelpWindow ) {
- myHelpWindow = new ToolsGUI_HelpWindow( this );
- myHelpWindow->installEventFilter( this );
- }
- myHelpWindow->show();
- myHelpWindow->raise();
- myHelpWindow->setActiveWindow();
-
- END_OF("slotHelp()") ;
-}
-
-/*!
- Called when user clicks on item in <Running> list
-*/
-void ToolsGUI_RegWidget::slotClientChanged( QListViewItem* item )
-{
- BEGIN_OF("slotClientChanged()") ;
-
- if ( item <= 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)) ;
-
- 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_InfoWindow( this );
- myInfoWindow->installEventFilter( this );
- }
- QString a = tr( "More about" ) + QString( " " ) + QString( c_info.name );
- myInfoWindow->setCaption(a);
- myInfoWindow->setText( ToolsGUI_RegWidget::setlongText( c_info) );
- myInfoWindow->show();
- myInfoWindow->raise();
- myInfoWindow->setActiveWindow();
-
- blockSignals( false ); // enabling signals again
-
- END_OF("slotClientChanged()") ;
- return ;
-}
-
-/*!
- Called when user clicks on item in <History> list
-*/
-void ToolsGUI_RegWidget::slotHistoryChanged( QListViewItem* item )
-{
-
- BEGIN_OF("slotHistoryChanged()") ;
-
- if ( item <= 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)) ;
- 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_InfoWindow( this );
- myInfoWindow->installEventFilter( this );
- }
- QString a = tr( "More about" ) + QString( " " ) + QString( c_info.name );
- myInfoWindow->setCaption(a);
- myInfoWindow->setText( ToolsGUI_RegWidget::setlongText( c_info ) );
- myInfoWindow->show();
- myInfoWindow->raise();
- myInfoWindow->setActiveWindow();
-
- blockSignals( false ); // enabling signals again
-
- END_OF("slotHistoryChanged()") ;
- return ;
-}
-
-/*!
- Constructor
-*/
-ToolsGUI_InfoWindow::ToolsGUI_InfoWindow( QWidget* parent, const char* name )
- : QMainWindow( parent, name, WType_TopLevel | WDestructiveClose )
-{
- BEGIN_OF("InfoWindow");
- myTextView = new QTextView( this, "myTextView" );
- setCentralWidget( myTextView );
- setMinimumSize( 450, 250 );
- END_OF("InfoWindow");
-}
-
-/*!
- Sets text
-*/
-void ToolsGUI_InfoWindow::setText( const QString& text )
-{
- myTextView->setText( text );
-}
-
-/*!
- Key press event
-*/
-void ToolsGUI_InfoWindow::keyPressEvent( QKeyEvent * e )
-{
- QMainWindow::keyPressEvent( e );
- if ( e->key() == Key_Escape )
- close();
-}
-
-static const char* SEPARATOR = ":";
-
-QString findFile( QString filename )
-{
- QString dir;
- char* cenv;
-
- // Try ${HOME}/.salome/resources directory
- cenv = getenv( "HOME" );
- if ( cenv ) {
- dir.sprintf( "%s", cenv );
- if ( !dir.isEmpty() ) {
- dir = addSlash(dir) ;
- dir = dir + ".salome" ;
- dir = addSlash(dir) ;
- dir = dir + "resources" ;
- dir = addSlash(dir) ;
- QFileInfo fileInfo( dir + filename );
- if ( fileInfo.isFile() && fileInfo.exists() )
- return fileInfo.filePath();
- }
- }
- // Try ${SALOME_SITE_DIR}/share/salome/resources directory
- cenv = getenv( "SALOME_SITE_DIR" );
- if ( cenv ) {
- dir.sprintf( "%s", cenv );
- if ( !dir.isEmpty() ) {
- dir = addSlash(dir) ;
- dir = dir + "share" ;
- dir = addSlash(dir) ;
- cenv = getenv("SALOME_SITE_NAME");
- if (cenv) dir = dir + cenv;
- else dir = dir + "salome" ;
- dir = addSlash(dir) ;
- dir = dir + "resources" ;
- dir = addSlash(dir) ;
- QFileInfo fileInfo( dir + filename );
- if ( fileInfo.isFile() && fileInfo.exists() )
- return fileInfo.filePath();
- }
- }
- // Try ${KERNEL_ROOT_DIR}/share/salome/resources directory
- cenv = getenv( "KERNEL_ROOT_DIR" );
- if ( cenv ) {
- dir.sprintf( "%s", cenv );
- if ( !dir.isEmpty() ) {
- dir = addSlash(dir) ;
- dir = dir + "share" ;
- dir = addSlash(dir) ;
- dir = dir + "salome" ;
- dir = addSlash(dir) ;
- dir = dir + "resources" ;
- dir = addSlash(dir) ;
- dir = dir + "kernel" ;
- dir = addSlash(dir) ;
- QFileInfo fileInfo( dir + filename );
- if ( fileInfo.isFile() && fileInfo.exists() )
- return fileInfo.filePath();
- }
- }
-
- //SRN Added support for SALOMEGUI
- cenv = getenv( "SALOMEGUI_ROOT_DIR" );
- if ( cenv ) {
- dir.sprintf( "%s", cenv );
- if ( !dir.isEmpty() ) {
- dir = addSlash(dir) ;
- dir = dir + "share" ;
- dir = addSlash(dir) ;
- dir = dir + "salome" ;
- dir = addSlash(dir) ;
- dir = dir + "resources" ;
- dir = addSlash(dir) ;
- QFileInfo fileInfo( dir + filename );
- if ( fileInfo.isFile() && fileInfo.exists() )
- return fileInfo.filePath();
- }
- }
-
- // Try CSF_SaloameResources env.var directory ( or directory list )
- cenv = getenv( "CSF_SalomeResources" );
- if ( cenv ) {
- dir.sprintf( "%s", cenv );
- if ( !dir.isEmpty() )
- {
- QStringList dirList = QStringList::split( SEPARATOR, dir, false ); // skip empty entries
- for ( int i = 0; i < (int)dirList.count(); i++ )
- {
- QFileInfo fileInfo( addSlash( dirList[ i ] ) + filename );
- if ( fileInfo.isFile() && fileInfo.exists() )
- return fileInfo.filePath();
- }
- }
- }
- return filename;
-}
-
-QString addSlash( const QString& path )
-{
- return Qtx::addSlash( path );
-}
+++ /dev/null
-// SALOME RegistryDisplay : GUI for Registry server implementation
-//
-// Copyright (C) 2003 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
-//
-//
-//
-// File : RegWidget.h
-// Author : Pascale NOYRET, EDF
-// Module : SALOME
-// $Header$
-
-#ifndef __REGWIDGET_H__
-#define __REGWIDGET_H__
-#include <qapplication.h>
-#include <qmainwindow.h>
-
-#include <SALOMEconfig.h>
-#include CORBA_CLIENT_HEADER(SALOME_Registry)
-
-class QTabWidget;
-class QListView;
-class QListViewItem;
-class QWidget;
-class QTimer;
-class QCloseEvent;
-class QTextView;
-#if QT_VERSION > 300
-class QPushButton;
-#endif
-
-#include <Standard_Macro.hxx>
-
-class ToolsGUI_HelpWindow;
-class ToolsGUI_IntervalWindow;
-
-class Standard_EXPORT ToolsGUI_InfoWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- ToolsGUI_InfoWindow( QWidget* parent = 0, const char* name = 0);
-
- void setText( const QString& text );
- QTextView* textView() const { return myTextView; }
-
-protected:
- void keyPressEvent( QKeyEvent * e );
-
-private:
- QTextView* myTextView;
-};
-
-class Standard_EXPORT ToolsGUI_RegWidget : public QMainWindow
-{
- Q_OBJECT
-
-public:
- ToolsGUI_RegWidget( CORBA::ORB_var &orb , QWidget *parent = 0, const char *name = 0 );
- ~ToolsGUI_RegWidget();
- void SetListe();
- void SetListeHistory();
- void InfoReg();
- void InfoHistory();
-
- bool eventFilter( QObject* object, QEvent* event );
-
- static ToolsGUI_RegWidget* GetRegWidget( CORBA::ORB_var &orb , QWidget *parent = 0, const char *name = 0 );
-
-public slots:
- void slotHelp();
- void slotListeSelect();
- void slotClientChanged( QListViewItem* );
- void slotHistoryChanged( QListViewItem* );
- 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* c_info );
- void closeEvent( QCloseEvent *e);
-
-protected :
- QListView* _clients;
- QListView* _history;
- QWidget* _parent;
- QTabWidget* _tabWidget;
- QPushButton* _refresh;
- QPushButton* _interval;
- QPushButton* _close;
- QTimer* _counter;
- Registry::AllInfos* _serverhistory;
- Registry::AllInfos* _serverclients;
- ToolsGUI_InfoWindow* myInfoWindow;
- ToolsGUI_HelpWindow* myHelpWindow;
- ToolsGUI_IntervalWindow* myIntervalWindow;
- int myRefreshInterval;
-
-private:
- const Registry::Components_var _VarComponents;
- static ToolsGUI_RegWidget* myRegWidgetPtr;
-};
-
-#endif
+++ /dev/null
-# SALOME TOOLSGUI : implementation of desktop "Tools" optioins
-#
-# Copyright (C) 2003 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
-#
-#
-#
-# File : ToolsGUI_icons.po
-# Module : SALOME
-
-msgid ""
-msgstr ""
-"Project-Id-Version: SALOME VERSION 0.4\n"
-"POT-Creation-Date: 2002-04-25 10:04:12 PM CEST\n"
-"PO-Revision-Date: YYYY-MM-DD\n"
-"Last-Translator: Nicolas REJNERI\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-#
-#==============================================================================
-#
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:50
-msgid "ToolsGUI_CatalogGeneratorDlg::ICON_SELECT"
-msgstr "select1.png"
+++ /dev/null
-# SALOME TOOLSGUI : implementation of desktop "Tools" optioins
-#
-# Copyright (C) 2003 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
-#
-#
-#
-# File : ToolsGUI_msg_en.po
-# Module : SALOME
-
-msgid ""
-msgstr ""
-"Project-Id-Version: SALOME VERSION 0.4\n"
-"POT-Creation-Date: 2002-04-25 10:04:12 PM CEST\n"
-"PO-Revision-Date: YYYY-MM-DD\n"
-"Last-Translator: Nicolas REJNERI\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-#
-#==============================================================================
-#
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:58
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_FILES"
-msgstr "Files"
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:58
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_SUPPLEMENT"
-msgstr "Component supplementary data"
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:150
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_MEN_EXPORT"
-msgstr "Export"
-
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_MEN_IMPORT"
-msgstr "Import"
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:47
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_CATALOG_GENERATOR"
-msgstr "Catalog generator"
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:82
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_IDL_FILE"
-msgstr "IDL : "
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:88
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_XML_FILE"
-msgstr "XML : "
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:88
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_PNG_FILE"
-msgstr "Icon : "
-
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_AUTHOR"
-msgstr "Author : "
-
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_VERSION"
-msgstr "Version : "
-
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_COMP_NAME"
-msgstr "Name : "
-
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_COMP_USERNAME"
-msgstr "UserName : "
-
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_COMP_TYPE"
-msgstr "Type : "
-
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_COMP_MULTISTD"
-msgstr "Multistudy : "
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:153
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_MEN_EXPORT_XML"
-msgstr "XML Files ( *.xml )"
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:154
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_MEN_IMPORT_IDL"
-msgstr "IDL Files ( *.idl )"
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:154
-msgid "ToolsGUI_CatalogGeneratorDlg::TOOLS_MEN_IMPORT_PNG"
-msgstr "PNG Files ( *.png )"
-
-#
-#==============================================================================
-#
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:107
-msgid "TOOLS_BUT_CLOSE"
-msgstr "&Close"
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:113
-msgid "TOOLS_BUT_OK"
-msgstr "&Ok"
-
-msgid "TOOLS_BUT_BROWSE"
-msgstr "Browse..."
-
-msgid "TOOLS_BUT_APPLY"
-msgstr "&Apply"
-
-#
-#==============================================================================
-#
-
-#: ToolsGUI_CatalogGeneratorDlg.cxx:53
-msgid "TOOLS_WRN_WARNING"
-msgstr "Warning"
-
-msgid "TOOLS_ERR_ERROR"
-msgstr "Error"
-
-msgid "TOOLS_ERR_FILE_NOT_EXIST"
-msgstr "%1\nFile doesn't exist"
+++ /dev/null
-# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
-#
-# 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
-#
-# File : Makefile.in
-# Author : Vladimir Klyachin (OCN)
-# Module : VTKViewer
-# $Header$
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-lib_LTLIBRARIES = libVTKViewer.la
-
-salomeinclude_HEADERS= \
- VTKViewer.h \
- VTKViewer_CellLocationsArray.h \
- VTKViewer_Actor.h \
- VTKViewer_ExtractUnstructuredGrid.h \
- VTKViewer_ConvexTool.h \
- VTKViewer_Filter.h \
- VTKViewer_GeometryFilter.h \
- VTKViewer_AppendFilter.h \
- VTKViewer_Algorithm.h \
- VTKViewer_InteractorStyle.h \
- VTKViewer_RenderWindow.h \
- VTKViewer_RenderWindowInteractor.h \
- VTKViewer_ShrinkFilter.h \
- VTKViewer_TransformFilter.h \
- VTKViewer_Transform.h \
- VTKViewer_Trihedron.h \
- VTKViewer_Utilities.h \
- VTKViewer_ViewManager.h \
- VTKViewer_ViewModel.h \
- VTKViewer_ViewWindow.h \
- VTKViewer_Functor.h
-
-dist_libVTKViewer_la_SOURCES= \
- VTKViewer_CellLocationsArray.cxx \
- VTKViewer_Actor.cxx \
- VTKViewer_ExtractUnstructuredGrid.cxx \
- VTKViewer_Filter.cxx \
- VTKViewer_GeometryFilter.cxx \
- VTKViewer_AppendFilter.cxx \
- VTKViewer_InteractorStyle.cxx \
- VTKViewer_RenderWindow.cxx \
- VTKViewer_RenderWindowInteractor.cxx \
- VTKViewer_ShrinkFilter.cxx \
- VTKViewer_Transform.cxx \
- VTKViewer_TransformFilter.cxx \
- VTKViewer_Trihedron.cxx \
- VTKViewer_Utilities.cxx \
- VTKViewer_ViewManager.cxx \
- VTKViewer_ViewModel.cxx \
- VTKViewer_ConvexTool.cxx \
- VTKViewer_ViewWindow.cxx
-
-MOC_FILES= \
- VTKViewer_RenderWindow_moc.cxx \
- VTKViewer_RenderWindowInteractor_moc.cxx \
- VTKViewer_ViewManager_moc.cxx \
- VTKViewer_ViewModel_moc.cxx \
- VTKViewer_ViewWindow_moc.cxx
-nodist_libVTKViewer_la_SOURCES= $(MOC_FILES)
-
-dist_salomeres_DATA=\
- resources/view_back.png \
- resources/view_bottom.png \
- resources/view_camera_dump.png \
- resources/view_fitall.png \
- resources/view_fitarea.png \
- resources/view_front.png \
- resources/view_glpan.png \
- resources/view_graduated_axes.png \
- resources/view_left.png \
- resources/view_pan.png \
- resources/view_reset.png \
- resources/view_right.png \
- resources/view_rotate.png \
- resources/view_scaling.png \
- resources/view_top.png \
- resources/view_triedre.png \
- resources/view_update_rate.png \
- resources/view_zoom.png \
- resources/view_rotation_point.png
-
-nodist_salomeres_DATA= \
- VTKViewer_images.qm \
- VTKViewer_msg_en.qm
-
-libVTKViewer_la_CPPFLAGS=$(QT_INCLUDES) $(VTK_INCLUDES) $(CAS_CPPFLAGS) \
- -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT
-libVTKViewer_la_LDFLAGS=$(VTK_LIBS) $(QT_MT_LIBS) $(CAS_KERNEL) \
- ../Qtx/libqtx.la ../SUIT/libsuit.la
-
-# Executable
-
-bin_PROGRAMS = VTKViewer
-
-dist_VTKViewer_SOURCES=VTKViewer.cxx
-
-VTKViewer_CPPFLAGS=$(libVTKViewer_la_CPPFLAGS)
-VTKViewer_LDADD=libVTKViewer.la $(libVTKViewer_la_LDFLAGS)
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-/*=========================================================================
-
- Program: Visualization Toolkit
- Module: $RCSfile$
- Language: C++
- Date: $Date$
- Version: $Revision$
-
- Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
- All rights reserved.
- See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
-
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the above copyright notice for more information.*/
-
-// VTKViewer_VectorText.cxx is a copy of vtkVectorText.cxx file.
-// Purpose of copying: to remove linking to libHybrid.so VTK library
-
-#include "VTKViewer_VectorText.h"
-
-#include "vtkCellArray.h"
-#include "vtkObjectFactory.h"
-#include "vtkPoints.h"
-#include "vtkPolyData.h"
-using namespace std;
-
-vtkCxxRevisionMacro(VTKViewer_VectorText, "$Revision$");
-vtkStandardNewMacro(VTKViewer_VectorText);
-
-char *VTK_VECTOR_TEXT_33 = (char *) "11 0.438482 "
-"0.28000 -0.07186 0.43164 -0.07143 0.27689 0.07714 0.43472 0.07714 0.32000 0.20134 "
-"0.40000 0.20243 0.31429 0.20550 0.27277 0.76857 0.43848 0.76857 0.27693 1.02571 "
-"0.43429 1.02615 7 2 1 3 2 0 1 7 6 5 6 4 5 8 "
-"7 5 7 8 9 10 9 8 "
-;
-
-char *VTK_VECTOR_TEXT_34 = (char *) "21 0.615625 "
-"0.25714 0.63563 0.32571 0.63563 0.50286 0.63642 0.25143 0.63946 0.33143 0.63840 "
-"0.33462 0.64286 0.49673 0.64286 0.57714 0.63757 0.58093 0.64286 0.21335 0.84286 "
-"0.36680 0.84286 0.46177 0.84286 0.61522 0.84286 0.21295 1.02000 0.46134 1.02000 "
-"0.61563 1.02000 0.36571 1.02307 0.46550 1.02571 0.21714 1.02615 0.36000 1.02723 "
-"0.61143 1.02615 17 3 5 9 7 6 2 4 5 1 6 8 12 0 1 5 6 "
-"12 11 3 0 5 7 8 6 11 12 14 13 9 10 10 9 5 15 14 12 19 "
-"18 10 18 13 10 17 14 20 14 15 20 16 19 10 "
-;
-
-char *VTK_VECTOR_TEXT_35 = (char *) "43 0.974539 "
-"0.22286 -0.09100 0.32571 -0.09236 0.56832 -0.08857 0.67429 -0.09201 0.28193 0.22000 "
-"0.39470 0.22000 0.63009 0.22000 0.15385 0.23143 0.27429 0.22723 0.40571 0.22723 "
-"0.62286 0.22723 0.74857 0.22680 0.97454 0.23143 0.15385 0.33429 0.97454 0.33429 "
-"0.30344 0.34000 0.65201 0.34000 0.77084 0.34000 0.42286 0.34010 0.42034 0.34571 "
-"0.36041 0.60286 0.70748 0.60286 0.82034 0.60286 0.47429 0.60626 0.15385 0.61429 "
-"0.35429 0.61009 0.70286 0.60951 0.82857 0.61009 0.97454 0.61429 0.15385 0.71714 "
-"0.37714 0.72134 0.50286 0.72191 0.72571 0.72134 0.85143 0.72156 0.97143 0.72025 "
-"0.38605 0.72857 0.49823 0.72857 0.73335 0.72857 0.84613 0.72857 0.45143 1.04160 "
-"0.55735 1.04286 0.80000 1.04243 0.90521 1.04286 43 6 2 3 5 0 1 0 5 4 18 "
-"9 10 11 6 3 4 9 8 13 8 15 17 6 11 9 4 5 13 7 8 17 "
-"12 14 8 9 15 15 19 20 16 6 17 12 17 11 18 10 16 10 6 16 21 "
-"16 17 18 19 9 15 9 19 20 30 25 23 20 19 34 33 28 29 24 25 29 "
-"25 30 27 21 22 33 21 27 20 23 30 22 21 17 33 27 28 31 26 32 35 "
-"30 23 32 38 37 31 35 23 21 32 26 26 31 23 32 21 38 41 37 38 36 "
-"35 31 38 21 33 40 39 36 42 41 38 39 35 36 "
-;
-
-char *VTK_VECTOR_TEXT_36 = (char *) "73 0.921518 "
-"0.52571 -0.22882 0.59429 -0.22991 0.52000 -0.09942 0.60571 -0.09385 0.40571 -0.07057 "
-"0.72730 -0.06571 0.33143 -0.03465 0.80571 -0.01813 0.51429 0.01891 0.52152 0.02571 "
-"0.60571 0.02014 0.84571 0.02168 0.25669 0.04286 0.66857 0.03800 0.44571 0.04535 "
-"0.70984 0.06571 0.74535 0.10571 0.74857 0.11079 0.74902 0.11143 0.37057 0.12857 "
-"0.90538 0.12857 0.20823 0.15143 0.35748 0.16286 0.77395 0.16857 0.35429 0.17310 "
-"0.35177 0.18000 0.78134 0.21429 0.92152 0.21429 0.19580 0.22571 0.33480 0.25429 "
-"0.77395 0.29429 0.91177 0.32286 0.76000 0.32921 0.72571 0.36972 0.89355 0.37429 "
-"0.64690 0.40857 0.65143 0.40706 0.64000 0.41109 0.60571 0.41986 0.52109 0.43714 "
-"0.85714 0.43270 0.38857 0.49216 0.79429 0.48902 0.72571 0.52437 0.30454 0.54571 "
-"0.60260 0.56286 0.52043 0.58571 0.26286 0.59570 0.46857 0.59800 0.39429 0.65095 "
-"0.22857 0.67295 0.36823 0.70000 0.75429 0.77624 0.21907 0.78571 0.35891 0.78571 "
-"0.89184 0.79714 0.37714 0.85001 0.72571 0.86144 0.87470 0.86571 0.24571 0.89016 "
-"0.68571 0.90956 0.44000 0.92036 0.60571 0.94469 0.83179 0.94571 0.28000 0.94629 "
-"0.51429 0.94891 0.34286 1.00607 0.75429 1.01579 0.38286 1.02784 0.52043 1.06571 "
-"0.60260 1.06571 0.52260 1.12286 0.60043 1.12286 75 3 8 2 2 8 4 19 12 6 13 11 15 9 8 10 3 2 1 8 "
-"3 10 5 13 10 15 11 16 7 13 5 4 14 6 2 0 1 5 10 3 12 "
-"22 21 14 4 8 13 7 11 11 18 16 20 23 18 18 17 16 20 18 11 19 "
-"6 14 28 21 29 26 23 20 12 19 22 25 22 24 21 22 25 21 25 29 26 "
-"27 30 27 26 20 31 32 30 31 30 27 40 33 32 37 43 38 34 32 31 38 "
-"39 9 40 32 34 38 9 10 43 33 42 37 36 43 39 38 43 42 33 40 35 "
-"36 37 33 43 36 39 45 46 48 41 39 45 39 43 41 48 44 47 51 50 46 "
-"62 65 48 39 46 44 49 47 49 44 48 54 53 50 51 47 49 53 56 59 53 "
-"54 56 66 64 56 55 58 52 58 57 52 54 50 51 59 56 64 67 60 63 60 "
-"57 63 66 61 68 61 66 56 68 65 69 65 62 69 62 46 45 63 57 58 62 "
-"60 67 68 61 65 71 70 72 70 62 67 62 70 69 71 69 70 "
-;
-
-char *VTK_VECTOR_TEXT_37 = (char *) "81 1.409911 "
-"0.46713 -0.11143 0.57143 -0.11215 1.19429 -0.11252 1.10286 -0.10252 1.26444 -0.09429 "
-"1.05143 -0.07759 1.31429 -0.06384 1.14857 -0.01538 1.18857 -0.01807 0.98857 -0.01364 "
-"1.22286 -0.00771 1.36784 -0.00286 1.11302 0.00286 1.26436 0.03143 1.07787 0.04857 "
-"0.95748 0.05429 1.39681 0.06571 1.28680 0.09429 1.05866 0.14000 1.40991 0.14571 "
-"0.94134 0.15143 0.94134 0.21429 1.29295 0.21429 1.06134 0.23714 1.40723 0.23714 "
-"0.95748 0.30000 1.39387 0.30000 1.07787 0.30571 1.27429 0.30371 1.09561 0.33429 "
-"1.23429 0.35465 1.36616 0.36286 1.13143 0.36327 1.16571 0.37277 1.20571 0.36899 "
-"1.00045 0.38571 1.32000 0.41543 1.06857 0.44498 1.24571 0.45681 0.48000 0.46420 "
-"1.15429 0.46723 0.38857 0.47462 0.55016 0.48286 0.60000 0.51330 0.30286 0.52704 "
-"0.43429 0.56177 0.47429 0.55907 0.26857 0.57284 0.50857 0.56943 0.65355 0.57429 "
-"0.39873 0.58000 0.55007 0.60857 0.24530 0.62571 0.36359 0.62571 0.68252 0.64286 "
-"0.56680 0.64857 0.23050 0.69429 0.34437 0.71714 0.57866 0.72286 0.69563 0.72286 "
-"0.22705 0.79143 0.34705 0.81429 0.69295 0.81429 0.56891 0.85429 0.67959 0.87714 "
-"0.24530 0.88286 0.36359 0.88286 0.38132 0.91143 0.54286 0.90975 0.52000 0.93179 "
-"0.65465 0.93429 0.41714 0.94041 0.47429 0.94950 0.29143 0.96914 0.60571 0.99258 "
-"0.32000 0.99868 0.38286 1.03395 0.53714 1.03184 1.06857 1.04249 1.17287 1.04286 "
-"0.48000 1.04395 79 0 1 78 10 4 6 2 8 3 9 14 15 4 "
-"10 8 3 7 5 7 3 8 10 6 13 12 5 7 5 12 9 4 8 2 13 "
-"16 17 17 19 22 14 9 12 15 18 20 11 13 6 13 11 16 17 16 19 18 "
-"15 14 21 20 18 21 23 25 22 26 28 23 21 18 24 22 19 25 27 35 35 "
-"29 37 22 24 26 28 31 30 27 25 23 31 28 26 27 29 35 36 30 31 38 "
-"34 30 38 33 34 37 32 40 32 33 40 38 30 36 32 37 29 40 33 38 42 "
-"46 39 47 53 52 48 43 51 39 46 41 41 50 44 56 57 60 45 41 46 42 "
-"48 46 48 42 43 50 41 45 53 47 44 51 49 55 54 55 49 53 44 50 49 "
-"51 43 55 54 58 59 58 54 57 56 52 57 52 53 60 61 65 58 62 63 57 "
-"61 60 62 64 63 65 66 73 66 65 61 73 66 75 58 59 62 63 64 68 70 "
-"69 68 67 75 66 70 68 64 76 71 72 75 67 76 74 69 70 71 76 67 69 "
-"77 72 72 77 80 77 69 74 76 72 80 79 78 1 "
-;
-
-char *VTK_VECTOR_TEXT_38 = (char *) "76 1.126291 "
-"0.58857 -0.08966 1.03429 -0.09235 0.48000 -0.08395 0.66286 -0.07673 0.40000 -0.05914 "
-"0.72000 -0.05641 0.98286 -0.05473 0.35429 -0.03393 0.78857 -0.01678 1.12629 0.00857 "
-"0.29143 0.02168 0.52571 0.02991 0.57714 0.02764 0.62286 0.03756 0.46857 0.04645 "
-"0.87429 0.05495 0.69714 0.07393 0.42132 0.08286 1.04571 0.07868 0.24486 0.08857 "
-"0.75011 0.11714 0.22327 0.14000 0.37927 0.14571 0.78349 0.16286 0.96893 0.16286 "
-"0.96571 0.16717 0.96457 0.16857 0.95937 0.18000 0.35580 0.22571 0.20991 0.25429 "
-"0.36319 0.28857 0.86286 0.29600 1.02437 0.31143 0.22645 0.32857 0.40418 0.36286 "
-"0.40571 0.36454 0.41330 0.37429 1.05421 0.40857 0.28418 0.42571 0.92000 0.44119 "
-"0.53714 0.46770 0.37143 0.50250 0.66758 0.54000 0.46406 0.55714 0.78704 0.62571 "
-"0.59429 0.63146 0.37714 0.68444 0.69296 0.70000 0.85355 0.71714 0.35681 0.73429 "
-"0.50200 0.75143 0.49756 0.76286 0.49502 0.76857 0.72891 0.76857 0.86966 0.76857 "
-"0.34748 0.82000 0.73295 0.82000 0.48764 0.82571 0.87236 0.83143 0.49714 0.86089 "
-"0.35849 0.87143 0.71429 0.87650 0.52000 0.89555 0.69714 0.89846 0.37964 0.91714 "
-"0.84657 0.91714 0.55429 0.92073 0.65714 0.92498 0.60000 0.93277 0.81868 0.95714 "
-"0.42857 0.97582 0.76571 1.00436 0.51429 1.02723 0.72000 1.02723 0.59429 1.04437 "
-"0.64571 1.04395 78 7 17 10 3 13 0 "
-"2 14 4 6 18 15 17 7 4 9 18 "
-"6 9 6 1 8 16 5 0 12 2 "
-"17 4 14 2 11 14 12 0 13 13 5 "
-"16 15 24 20 16 8 20 13 3 5 "
-"2 12 11 10 17 19 21 28 29 15 20 "
-"8 20 24 23 40 23 31 24 25 26 "
-"19 22 21 31 23 27 22 19 17 18 24 "
-"15 28 21 22 29 30 33 31 32 39 "
-"23 24 26 30 29 28 23 26 27 33 30 "
-"38 32 31 27 38 36 41 38 34 36 "
-"34 38 30 36 34 35 39 32 37 42 40 "
-"31 40 41 36 42 44 47 45 43 40 "
-"40 43 41 50 46 43 50 49 46 45 40 "
-"42 48 53 47 45 42 47 49 52 55 "
-"53 48 56 50 43 45 57 60 55 52 50 "
-"51 49 50 52 48 47 44 54 56 48 "
-"56 65 61 60 59 64 59 60 57 65 56 "
-"58 52 57 55 64 59 70 58 56 54 "
-"59 62 70 68 74 72 65 69 61 70 66 "
-"72 63 71 67 63 61 69 70 62 66 "
-"67 73 68 71 63 69 73 67 71 68 72 "
-"66 74 68 75 75 68 73 "
-;
-
-char *VTK_VECTOR_TEXT_39 = (char *) "10 0.364197 "
-"0.25143 0.63563 0.24571 0.63946 0.32571 0.63757 0.32950 0.64286 0.21034 0.83714 "
-"0.36379 0.83714 0.20991 1.02000 0.36420 1.02000 0.21408 1.02571 0.36000 1.02615 8 1 0 3 "
-"2 3 0 1 3 4 7 6 4 5 4 "
-"3 7 4 5 8 6 9 6 7 9 "
-;
-
-char *VTK_VECTOR_TEXT_40 = (char *) "19 0.595731 "
-"0.50857 -0.39522 0.59429 -0.39447 0.44000 -0.30784 0.51787 -0.24857 0.32530 -0.09429 "
-"0.43748 -0.05429 0.26899 0.06571 0.38134 0.20286 0.23580 0.27714 0.37605 0.38000 "
-"0.23848 0.41429 0.39320 0.53429 0.27177 0.59714 0.43748 0.71143 0.47216 0.80286 "
-"0.36086 0.82000 0.45714 0.97936 0.59573 1.04286 0.50857 1.04395 17 2 3 4 0 3 2 3 "
-"0 1 6 4 5 3 5 4 6 7 8 7 6 5 9 10 8 9 8 7 10 "
-"11 12 10 9 11 12 13 15 12 11 13 14 15 13 16 15 14 17 18 16 17 "
-"16 14 "
-;
-
-char *VTK_VECTOR_TEXT_41 = (char *) "19 0.598482 "
-"0.24000 -0.39447 0.33143 -0.39258 0.40616 -0.28857 0.31641 -0.24857 0.48784 -0.14000 "
-"0.39681 -0.05429 0.55538 0.03143 0.45295 0.20286 0.59580 0.23714 0.59848 0.37429 "
-"0.45823 0.38000 0.44723 0.49429 0.56252 0.59714 0.41714 0.64134 0.47343 0.82000 "
-"0.34857 0.83301 0.37714 0.97936 0.23855 1.04286 0.32571 1.04395 17 0 1 3 2 3 1 3 "
-"4 5 3 2 4 5 6 7 6 5 4 7 8 10 8 9 10 11 10 9 8 "
-"7 6 11 12 13 13 14 15 12 11 9 14 13 12 15 16 17 16 15 14 16 "
-"18 17 "
-;
-
-char *VTK_VECTOR_TEXT_42 = (char *) "34 0.685300 "
-"0.33143 0.58250 0.33714 0.58223 0.53714 0.58250 0.54286 0.58194 0.36213 0.61429 "
-"0.25587 0.63714 0.25266 0.64286 0.62655 0.64286 0.25393 0.64857 0.43429 0.73293 "
-"0.44000 0.73049 0.36715 0.78000 0.50714 0.78000 0.35429 0.78613 0.63429 0.80816 "
-"0.19309 0.82571 0.68389 0.82571 0.19177 0.83143 0.68530 0.83143 0.38857 0.86213 "
-"0.39523 0.86571 0.48000 0.86242 0.47660 0.86571 0.34657 0.88286 0.58857 0.90823 "
-"0.22286 0.92522 0.22857 0.92848 0.64571 0.92816 0.65143 0.92675 0.49295 1.02000 "
-"0.38134 1.03714 0.38550 1.04286 0.49143 1.04021 0.48571 1.04437 32 2 12 10 8 4 11 "
-"8 5 4 8 6 5 4 0 1 2 3 "
-"12 0 4 5 12 9 10 9 11 4 "
-"19 11 21 14 24 12 26 25 17 16 18 "
-"14 13 23 15 19 21 20 11 19 13 "
-"33 31 30 24 21 12 12 21 9 21 11 "
-"9 26 17 23 12 3 7 27 24 18 "
-"13 19 23 23 17 15 20 21 22 18 24 "
-"14 28 27 18 33 30 20 29 20 22 "
-"29 33 20 32 33 29 "
-;
-
-char *VTK_VECTOR_TEXT_43 = (char *) "20 0.952768 "
-"0.52836 0.10571 0.64878 0.10571 0.52420 0.11143 0.65295 0.11143 0.52420 0.39714 "
-"0.65295 0.39714 0.22857 0.40546 0.52000 0.40329 0.66286 0.40437 0.95168 0.40857 "
-"0.22437 0.52286 0.95277 0.52286 0.22857 0.52900 0.52311 0.53429 0.65403 0.53429 "
-"0.94857 0.52900 0.52528 0.82571 0.65186 0.82571 0.53143 0.82991 0.64571 0.82991 18 1 2 0 1 3 2 "
-"4 2 3 5 4 3 12 6 7 14 4 "
-"8 9 15 8 8 4 5 9 11 15 "
-"12 7 13 6 12 10 7 4 13 14 8 "
-"15 17 19 18 14 13 4 17 18 16 "
-"17 16 13 17 13 14 "
-;
-
-char *VTK_VECTOR_TEXT_44 = (char *) "23 0.432768 "
-"0.30286 -0.28607 0.30857 -0.28726 0.33714 -0.27355 0.36571 -0.25275 0.27329 -0.23714 "
-"0.38670 -0.23143 0.30286 -0.21582 0.39914 -0.21429 0.32115 -0.19714 0.41355 -0.18571 "
-"0.33800 -0.16857 0.42327 -0.15714 0.34605 -0.14571 0.43277 -0.10000 0.35580 -0.08286 "
-"0.35472 -0.07714 0.28571 -0.07295 0.34857 -0.07295 0.28000 -0.06878 0.27957 0.07714 "
-"0.43168 0.07714 0.28571 0.08134 0.42857 0.08025 21 0 6 4 0 "
-"1 2 0 2 6 3 6 2 8 5 10 5 7 10 6 5 8 5 6 3 10 "
-"7 12 9 12 7 12 13 14 11 12 9 12 11 13 18 17 19 17 21 19 15 "
-"14 13 15 13 17 21 17 22 17 20 22 18 16 17 20 17 13 "
-;
-
-char *VTK_VECTOR_TEXT_45 = (char *) "8 0.606146 "
-"0.19118 0.26000 0.19429 0.25689 0.60000 0.25580 0.60615 0.26000 0.19118 0.38571 "
-"0.60615 0.38571 0.19429 0.38882 0.60000 0.38991 6 6 1 2 6 0 "
-"1 6 2 7 6 4 0 7 2 3 "
-"5 7 3 "
-;
-
-char *VTK_VECTOR_TEXT_46 = (char *) "13 0.432768 "
-"0.28571 -0.07295 0.42286 -0.07295 0.42857 -0.07186 0.27848 -0.06571 0.28000 -0.06878 "
-"0.43277 -0.06571 0.27848 0.07143 0.43277 0.07143 0.27957 0.07714 0.43168 0.07714 "
-"0.28571 0.08134 0.42286 0.08134 0.42857 0.08025 11 0 "
-"3 4 3 0 1 8 6 10 5 1 2 3 1 5 6 3 5 6 7 11 6 "
-"5 7 10 6 11 9 12 11 9 11 7 "
-;
-
-char *VTK_VECTOR_TEXT_47 = (char *) "5 0.562348 "
-"0.14389 -0.08857 0.14857 -0.09256 0.25004 -0.08857 0.56235 1.04286 0.46286 1.04358 3 2 0 1 4 0 2 3 "
-"4 2 "
-;
-
-char *VTK_VECTOR_TEXT_48 = (char *) "53 0.926804 "
-"0.53714 -0.09009 0.59429 -0.09009 0.66857 -0.07673 0.43429 -0.06723 0.73143 -0.05070 "
-"0.34286 -0.00972 0.80571 0.01025 0.54857 0.02152 0.61714 0.02891 0.30241 0.03714 "
-"0.65714 0.04645 0.46857 0.05007 0.42473 0.08857 0.70286 0.08454 0.26645 0.10000 "
-"0.86943 0.11143 0.39955 0.12286 0.73800 0.13429 0.23748 0.18000 0.37034 0.19714 "
-"0.76252 0.20286 0.91236 0.26000 0.21866 0.26571 0.35621 0.26571 0.77823 0.28857 "
-"0.34437 0.40286 0.92680 0.40286 0.20420 0.40857 0.78705 0.54000 0.20723 0.58000 "
-"0.92420 0.58571 0.35277 0.64286 0.22177 0.69429 0.76571 0.72437 0.89966 0.74000 "
-"0.37756 0.76286 0.74498 0.79143 0.26073 0.82571 0.85927 0.84857 0.42473 0.85429 "
-"0.70439 0.85429 0.46286 0.88902 0.66286 0.89007 0.30241 0.90000 0.51009 0.91143 "
-"0.58286 0.91823 0.80725 0.92857 0.77714 0.95829 0.38350 0.98000 0.71429 0.99927 "
-"0.46286 1.01681 0.65714 1.01959 0.53714 1.02991 53 2 8 1 0 7 3 5 16 9 2 10 8 0 "
-"1 8 7 0 8 12 16 5 11 3 7 3 12 5 15 20 17 11 12 3 13 "
-"6 17 6 13 4 9 16 14 10 4 13 14 19 18 4 10 2 15 17 6 19 "
-"14 16 21 24 20 23 18 19 22 25 27 24 26 28 23 22 18 21 20 15 26 "
-"24 21 22 23 25 29 27 25 29 31 32 28 30 33 31 29 25 30 28 26 32 "
-"35 37 46 40 36 30 34 33 32 31 35 43 39 48 43 37 35 38 36 33 38 "
-"33 34 42 40 49 48 41 50 39 43 35 47 40 46 46 36 38 41 44 50 45 "
-"52 44 42 51 45 41 48 39 49 40 47 50 44 52 52 45 51 42 49 51 "
-;
-
-char *VTK_VECTOR_TEXT_49 = (char *) "11 0.708571 "
-"0.58286 -0.07186 0.70857 -0.07186 0.30857 0.62908 0.31429 0.62657 0.38286 0.65641 "
-"0.30785 0.75143 0.57714 0.77731 0.47429 0.85616 0.56384 0.94000 0.62857 1.02915 "
-"0.70857 1.02882 9 6 0 1 2 4 5 7 5 4 2 3 4 6 "
-"8 7 6 7 4 10 8 6 10 6 1 10 9 8 "
-;
-
-char *VTK_VECTOR_TEXT_50 = (char *) "43 0.914286 "
-"0.18857 -0.06878 0.91429 -0.06878 0.18748 -0.04286 0.19849 0.00857 0.91429 0.05164 "
-"0.38142 0.06000 0.22943 0.07714 0.46286 0.15868 0.30286 0.17832 0.38286 0.25813 "
-"0.58413 0.43143 0.78286 0.44454 0.67543 0.52286 0.85355 0.53429 0.72045 0.58000 "
-"0.89756 0.62571 0.75470 0.64286 0.35168 0.70000 0.91236 0.70000 0.77295 0.71143 "
-"0.21403 0.71714 0.77295 0.74571 0.22605 0.79143 0.37143 0.79804 0.90244 0.80857 "
-"0.75429 0.81228 0.38902 0.83143 0.24359 0.84286 0.73143 0.84689 0.42454 0.87143 "
-"0.86607 0.88857 0.68000 0.89070 0.28000 0.90629 0.49143 0.90823 0.58857 0.91866 "
-"0.82857 0.93555 0.31597 0.94571 0.37714 0.98784 0.76000 0.98657 0.44571 1.01470 "
-"0.69143 1.01470 0.53714 1.02991 0.62857 1.02723 41 3 2 0 3 5 6 1 5 0 5 "
-"3 0 1 4 5 6 5 8 7 8 5 9 8 7 9 7 10 11 10 7 10 "
-"11 12 12 11 14 16 15 18 16 18 19 13 14 11 14 13 16 21 24 25 15 "
-"16 13 21 19 18 23 27 22 17 23 22 24 21 18 27 23 32 17 22 20 31 "
-"42 34 30 28 25 26 32 23 40 31 38 35 28 30 36 32 26 29 36 26 34 "
-"41 33 33 37 29 36 29 37 33 39 37 30 25 24 28 38 31 38 28 35 39 "
-"33 41 31 40 42 41 34 42 "
-;
-
-char *VTK_VECTOR_TEXT_51 = (char *) "68 0.927232 "
-"0.52571 -0.09009 0.63429 -0.08395 0.45143 -0.07756 0.37143 -0.04498 0.74286 -0.04771 "
-"0.30857 0.00132 0.81714 0.00439 0.54286 0.02152 0.60000 0.02420 0.64661 0.03714 "
-"0.27429 0.03952 0.46857 0.04073 0.42857 0.06759 0.70857 0.07561 0.88213 0.08286 "
-"0.23429 0.10772 0.38812 0.11714 0.74535 0.11714 0.91109 0.14571 0.77823 0.19143 "
-"0.20764 0.20857 0.92723 0.22571 0.34286 0.23215 0.78437 0.27143 0.92723 0.27714 "
-"0.75429 0.36430 0.89927 0.38571 0.72571 0.40132 0.86857 0.43270 0.67429 0.43927 "
-"0.48000 0.45284 0.48571 0.44966 0.54857 0.46152 0.60000 0.46109 0.83429 0.46686 "
-"0.72693 0.52286 0.49034 0.55714 0.49714 0.56395 0.78857 0.56473 0.58286 0.57109 "
-"0.82857 0.60921 0.67429 0.61616 0.70400 0.64857 0.85294 0.65429 0.72680 0.70571 "
-"0.87009 0.72286 0.35429 0.72298 0.22175 0.74571 0.72991 0.76286 0.72151 0.80286 "
-"0.86244 0.80857 0.38857 0.82064 0.69143 0.85832 0.84571 0.85587 0.26241 0.87143 "
-"0.43429 0.87829 0.64571 0.89641 0.48571 0.90723 0.29330 0.91714 0.60571 0.91252 "
-"0.53143 0.91823 0.80384 0.92286 0.36000 0.97750 0.73143 0.98213 0.44571 1.01681 "
-"0.65714 1.01470 0.52000 1.02991 0.60000 1.02723 66 3 11 "
-"5 9 8 1 1 8 0 4 9 1 "
-"9 4 13 7 0 8 6 13 4 17 13 "
-"6 2 11 3 2 0 7 5 16 10 "
-"12 5 11 10 16 15 11 2 7 16 5 "
-"12 17 14 19 14 17 6 20 15 22 "
-"19 18 23 22 15 16 14 18 19 21 23 "
-"18 23 26 25 23 21 24 26 28 25 "
-"30 32 36 25 34 27 35 32 33 35 29 "
-"27 25 28 34 29 35 33 26 23 24 "
-"37 36 32 39 32 35 35 27 34 37 32 "
-"39 30 31 32 39 35 41 38 41 35 "
-"38 42 41 40 42 38 42 40 44 40 43 "
-"44 44 43 48 45 48 43 47 46 54 "
-"49 48 50 50 48 45 49 53 52 63 52 "
-"61 53 49 50 46 51 54 58 54 51 "
-"58 55 62 62 55 64 66 57 60 61 52 "
-"53 55 58 51 59 67 60 52 63 56 "
-"56 65 59 55 57 64 64 57 66 65 56 "
-"63 67 66 60 67 59 65 "
-;
-
-char *VTK_VECTOR_TEXT_52 = (char *) "18 0.920000 "
-"0.64571 -0.07295 0.64000 -0.06878 0.77143 -0.06878 0.77403 0.18571 0.16265 0.19143 "
-"0.63429 0.18882 0.92000 0.19408 0.15891 0.31143 0.91735 0.31143 0.29653 0.31714 "
-"0.63740 0.31714 0.77714 0.31403 0.16571 0.32228 0.16616 0.32286 0.63429 0.79380 "
-"0.77186 1.02000 0.66857 1.02282 0.76571 1.02420 18 2 1 0 1 3 5 1 2 "
-"3 3 10 5 9 4 5 4 9 7 "
-"6 11 3 8 11 6 7 9 13 15 16 "
-"14 9 5 10 7 13 12 13 14 16 "
-"11 10 3 14 13 9 14 10 11 15 17 "
-"16 15 14 11 "
-;
-
-char *VTK_VECTOR_TEXT_53 = (char *) "54 0.932946 "
-"0.52571 -0.09009 0.61714 -0.08665 0.44571 -0.07673 0.73143 -0.05179 0.35429 -0.03759 "
-"0.78914 -0.01429 0.30286 0.00241 0.53714 0.02152 0.62857 0.03184 0.84115 0.03714 "
-"0.46857 0.03927 0.66286 0.04645 0.26286 0.04921 0.42286 0.06759 0.71429 0.08439 "
-"0.88045 0.09429 0.23343 0.10000 0.38812 0.10571 0.74535 0.12286 0.35748 0.16857 "
-"0.77294 0.18000 0.91681 0.18000 0.20420 0.20857 0.34286 0.22376 0.78705 0.23714 "
-"0.93295 0.27143 0.79009 0.31714 0.93252 0.33429 0.77714 0.38420 0.91681 0.42000 "
-"0.34857 0.43034 0.75641 0.43143 0.23088 0.44857 0.72000 0.47868 0.40000 0.48400 "
-"0.68000 0.50784 0.86902 0.51714 0.46857 0.52437 0.53143 0.53848 0.57714 0.53848 "
-"0.58857 0.53621 0.60000 0.53580 0.82286 0.56972 0.38494 0.59714 0.77714 0.60535 "
-"0.48571 0.64244 0.69714 0.64327 0.56571 0.65848 0.61714 0.65848 0.43891 0.87714 "
-"0.44571 0.88395 0.88043 0.88857 0.88043 1.00857 0.33714 1.01182 52 7 1 "
-"8 7 0 1 7 2 0 2 10 4 "
-"6 13 12 3 8 1 3 11 8 10 2 "
-"7 4 13 6 11 3 14 19 16 12 "
-"3 5 14 9 14 5 10 13 4 22 19 "
-"23 18 15 20 17 12 13 15 14 9 "
-"14 15 18 19 12 17 25 26 24 20 21 "
-"24 21 20 15 22 16 19 25 24 21 "
-"26 25 27 29 28 26 29 26 27 43 37 "
-"45 36 31 29 34 32 30 31 36 33 "
-"31 28 29 32 34 43 48 47 41 45 38 "
-"47 42 33 36 41 39 40 38 39 47 "
-"37 38 45 47 39 41 44 33 42 43 34 "
-"37 46 33 44 35 46 41 33 46 35 "
-"46 48 41 32 43 53 43 49 53 49 50 "
-"53 53 50 52 50 51 52 "
-;
-
-char *VTK_VECTOR_TEXT_54 = (char *) "70 0.927232 "
-"0.55429 -0.09009 0.66857 -0.08034 0.43429 -0.06213 0.75429 -0.04607 0.34857 -0.00972 "
-"0.81143 -0.00439 0.59429 0.02152 0.51339 0.03143 0.85188 0.04286 0.67429 0.04645 "
-"0.46286 0.05579 0.27384 0.07714 0.41714 0.09597 0.73143 0.09597 0.89355 0.11714 "
-"0.38771 0.14000 0.91177 0.16857 0.77294 0.17429 0.22816 0.18571 0.36530 0.19714 "
-"0.78705 0.24857 0.92680 0.25429 0.35320 0.26000 0.78665 0.30571 0.20420 0.31143 "
-"0.35320 0.31143 0.92723 0.31714 0.36657 0.37429 0.77395 0.37429 0.75429 0.41841 "
-"0.39179 0.42571 0.89756 0.44286 0.72000 0.46418 0.43429 0.47258 0.19891 0.50571 "
-"0.33714 0.50495 0.48000 0.50213 0.66857 0.50086 0.86241 0.50571 0.55429 0.52134 "
-"0.61143 0.51866 0.80403 0.56857 0.42286 0.58821 0.74286 0.60943 0.34134 0.63143 "
-"0.50857 0.62823 0.68000 0.63252 0.57714 0.64134 0.21563 0.66000 0.77714 0.74697 "
-"0.37502 0.75714 0.90966 0.76286 0.25673 0.80286 0.41901 0.83143 0.73143 0.85191 "
-"0.45143 0.86686 0.87343 0.87714 0.30036 0.88286 0.68000 0.89514 0.50286 0.90086 "
-"0.51429 0.90530 0.52000 0.90784 0.60571 0.91866 0.83846 0.92857 0.35429 0.94384 "
-"0.40571 0.98150 0.76000 0.99229 0.49143 1.01748 0.68571 1.02041 0.56571 1.02991 70 "
-"2 10 4 6 1 9 3 5 13 0 7 "
-"2 3 9 1 1 6 0 9 3 13 "
-"7 0 6 10 2 7 20 26 23 4 12 "
-"11 13 8 17 4 10 12 11 19 18 "
-"17 21 20 15 11 12 11 15 19 16 17 "
-"14 18 22 24 8 14 17 8 13 5 "
-"24 35 34 22 18 19 20 21 26 28 23 "
-"26 21 17 16 24 27 35 24 22 25 "
-"28 31 29 31 28 26 24 25 27 32 41 "
-"37 30 35 27 34 44 48 35 33 42 "
-"43 37 41 46 39 40 32 29 38 38 29 "
-"31 33 35 30 33 36 42 42 36 45 "
-"45 39 47 36 39 45 37 46 40 41 32 "
-"38 46 37 43 47 39 46 44 34 35 "
-"48 50 52 48 44 50 49 56 54 57 53 "
-"64 57 52 50 54 66 58 51 56 49 "
-"62 69 61 53 57 50 61 59 60 59 65 "
-"55 65 64 55 58 68 62 55 64 53 "
-"66 54 63 63 54 56 65 59 67 69 62 "
-"68 67 59 61 69 67 61 68 58 66 "
-;
-
-char *VTK_VECTOR_TEXT_55 = (char *) "17 0.923788 "
-"0.37143 -0.07186 0.50286 -0.07186 0.36723 -0.06571 0.37335 0.02000 0.52991 0.11143 "
-"0.40379 0.18571 0.59787 0.35143 0.47387 0.41429 0.66857 0.51873 0.53355 0.55143 "
-"0.63384 0.72857 0.80893 0.76286 0.74359 0.88286 0.21714 0.88546 0.92379 0.91143 "
-"0.21403 1.00857 0.92311 1.00857 15 3 0 1 2 0 3 3 4 5 4 3 1 6 7 5 6 5 4 9 "
-"7 6 10 9 8 8 9 6 10 11 12 11 10 8 15 13 12 12 14 16 15 "
-"12 16 11 14 12 "
-;
-
-char *VTK_VECTOR_TEXT_56 = (char *) "83 0.926804 "
-"0.53143 -0.08966 0.62857 -0.08665 0.45143 -0.07605 0.73714 -0.05641 0.38857 -0.05343 "
-"0.34286 -0.02616 0.79429 -0.02250 0.28571 0.02445 0.58857 0.02152 0.50857 0.02823 "
-"0.85258 0.03143 0.66937 0.04286 0.45143 0.05070 0.71429 0.07296 0.41143 0.07868 "
-"0.24000 0.09016 0.89927 0.10571 0.37669 0.12286 0.76613 0.14000 0.21462 0.15714 "
-"0.35849 0.16286 0.92109 0.17429 0.78705 0.22000 0.34437 0.22571 0.20420 0.27143 "
-"0.92680 0.27143 0.78437 0.28286 0.34748 0.28857 0.77143 0.32947 0.91470 0.33429 "
-"0.21714 0.34118 0.37502 0.36286 0.73296 0.39143 0.89057 0.39143 0.24359 0.40286 "
-"0.41883 0.41429 0.69143 0.42722 0.27275 0.44286 0.85714 0.43841 0.46286 0.44371 "
-"0.50286 0.45748 0.63429 0.45470 0.58286 0.46420 0.80507 0.48286 0.33143 0.49007 "
-"0.40456 0.52286 0.72693 0.52286 0.32000 0.57616 0.54857 0.57580 0.62286 0.58319 "
-"0.82082 0.58571 0.49714 0.58657 0.66286 0.60073 0.28527 0.61429 0.44571 0.61582 "
-"0.70439 0.63714 0.85759 0.63714 0.25756 0.67143 0.72657 0.67143 0.39849 0.68286 "
-"0.87470 0.68286 0.74134 0.72857 0.38705 0.73429 0.88109 0.76857 0.24764 0.77429 "
-"0.73395 0.79714 0.39470 0.80286 0.87177 0.82000 0.71641 0.83714 0.27216 0.86571 "
-"0.44000 0.87296 0.84486 0.88286 0.66286 0.89179 0.48000 0.90086 0.61714 0.91184 "
-"0.54286 0.91823 0.31846 0.93429 0.80571 0.93555 0.38286 0.98616 0.72000 0.99800 "
-"0.43429 1.01008 0.53143 1.02991 0.61714 1.02723 85 0 "
-"9 2 12 4 2 1 8 0 6 11 3 5 14 7 9 0 8 8 1 11 4 "
-"12 5 13 11 6 1 3 11 12 2 9 5 12 14 13 10 18 7 17 15 10 "
-"13 6 15 20 19 7 14 17 18 16 22 16 18 10 20 15 17 19 23 24 16 "
-"21 22 22 25 26 23 19 20 24 27 30 25 22 21 27 24 23 31 34 30 31 "
-"37 34 29 28 26 31 30 27 29 26 25 33 28 29 28 33 32 36 32 43 37 "
-"31 44 40 45 39 44 39 45 43 32 38 35 44 31 42 48 40 44 35 39 41 "
-"46 42 36 46 41 32 33 38 48 42 49 46 36 43 48 45 40 42 46 49 51 "
-"45 48 49 46 52 47 54 53 52 46 55 53 59 57 45 54 47 45 51 54 50 "
-"55 46 59 53 54 50 58 55 58 50 61 57 62 64 61 63 65 56 61 50 57 "
-"59 62 60 61 56 64 66 69 63 67 65 64 62 66 63 61 60 71 68 65 76 "
-"69 66 72 68 77 71 65 67 76 70 78 70 76 66 74 82 75 80 78 70 79 "
-"72 77 74 72 79 80 73 75 80 75 81 68 71 77 73 80 70 82 81 75 82 "
-"74 79 "
-;
-
-char *VTK_VECTOR_TEXT_57 = (char *) "72 0.927232 "
-"0.50286 -0.09009 0.56000 -0.09009 0.42857 -0.07673 0.64571 -0.07395 0.36000 -0.04771 "
-"0.74286 -0.02616 0.28759 0.01429 0.51429 0.02152 0.57143 0.02420 0.80115 0.02571 "
-"0.47429 0.02891 0.42857 0.05007 0.64000 0.04943 0.24930 0.07714 0.39314 0.08286 "
-"0.85229 0.10000 0.70902 0.11143 0.37057 0.12286 0.22177 0.17429 0.34857 0.18947 "
-"0.75109 0.19714 0.89395 0.20286 0.75429 0.20739 0.75681 0.21429 0.90966 0.27143 "
-"0.50286 0.30152 0.42857 0.31605 0.61714 0.31462 0.37714 0.33787 0.70286 0.35759 "
-"0.78705 0.37429 0.32000 0.37846 0.58286 0.42152 0.50286 0.42891 0.63429 0.43184 "
-"0.78286 0.43630 0.92723 0.43714 0.26286 0.44350 0.45143 0.45107 0.68571 0.45750 "
-"0.41587 0.47714 0.23787 0.48857 0.74498 0.52286 0.36359 0.55143 0.21522 0.55714 "
-"0.92680 0.56286 0.76571 0.57009 0.34437 0.63143 0.77823 0.63714 0.20462 0.69429 "
-"0.77866 0.69429 0.91236 0.70000 0.35429 0.74118 0.76571 0.76404 0.21756 0.77429 "
-"0.38286 0.80921 0.87343 0.82571 0.40759 0.84286 0.72571 0.84118 0.24527 0.84857 "
-"0.69143 0.87527 0.84000 0.88221 0.47429 0.89641 0.28571 0.90975 0.63429 0.90784 "
-"0.54857 0.91866 0.33143 0.95527 0.76000 0.96331 0.39629 0.99714 0.68571 1.00437 "
-"0.49714 1.02723 0.57714 1.02991 72 3 8 1 2 11 4 0 7 2 "
-"8 3 12 4 14 6 0 1 8 6 17 "
-"13 10 2 7 7 0 8 5 12 3 "
-"12 5 16 2 10 11 4 11 14 5 9 "
-"16 18 13 19 16 15 20 15 23 20 "
-"6 14 17 13 17 19 21 23 15 22 20 "
-"23 23 24 30 16 9 15 23 21 24 "
-"25 32 26 27 32 25 38 28 26 43 41 "
-"37 34 29 39 33 26 32 29 34 27 "
-"30 36 35 34 32 27 36 30 24 28 38 "
-"31 31 38 37 35 39 29 38 26 33 "
-"39 35 42 42 35 36 40 37 38 44 41 "
-"43 42 36 46 44 47 49 43 37 40 "
-"48 46 45 36 45 46 51 50 48 52 54 "
-"49 47 44 43 50 51 53 51 48 45 "
-"59 54 52 59 55 63 52 49 47 53 61 "
-"58 56 53 51 55 59 52 53 56 61 "
-"66 63 57 55 57 63 62 68 57 58 67 "
-"60 67 58 61 68 66 57 60 69 64 "
-"68 62 70 60 67 69 64 71 65 65 70 "
-"62 70 65 71 64 69 71 "
-;
-
-char *VTK_VECTOR_TEXT_58 = (char *) "14 0.432768 "
-"0.28571 -0.07295 0.42857 -0.07186 0.28000 -0.06878 0.43277 -0.06571 0.27957 0.07714 "
-"0.28571 0.08134 0.42857 0.08025 0.27957 0.57429 0.28571 0.57009 0.43168 0.57429 "
-"0.27848 0.71714 0.43277 0.71714 0.28265 0.72286 0.42857 0.72329 10 "
-"2 5 4 2 0 5 0 3 5 6 5 "
-"3 0 1 3 7 8 10 10 11 13 "
-"9 10 8 12 10 13 11 10 9 "
-;
-
-char *VTK_VECTOR_TEXT_59 = (char *) "18 0.432768 "
-"0.30857 -0.28726 0.36571 -0.25275 0.27323 -0.23714 0.39543 -0.22000 0.32384 -0.19143 "
-"0.33756 -0.16857 0.42327 -0.15714 0.43277 -0.10000 0.35472 -0.07714 0.28571 -0.07295 "
-"0.34857 -0.07295 0.28000 -0.06878 0.27957 0.07714 0.43168 0.07714 0.27957 0.57429 "
-"0.43168 0.57429 0.28265 0.72286 0.42857 0.72329 14 2 1 4 5 4 3 0 1 "
-"2 5 6 8 3 4 1 6 5 3 "
-"6 7 8 11 10 12 12 10 13 8 7 "
-"10 11 9 10 13 10 7 17 16 15 "
-"15 16 14 "
-;
-
-char *VTK_VECTOR_TEXT_60 = (char *) "11 0.952690 "
-"0.94857 0.09939 0.95269 0.10571 0.95236 0.22571 0.22894 0.40857 0.38919 0.46571 "
-"0.38919 0.47143 0.22748 0.52857 0.23192 0.53429 0.95098 0.70571 0.95216 0.83143 "
-"0.94857 0.83523 9 4 0 2 5 7 6 4 3 0 0 1 2 7 "
-"8 10 4 5 3 5 6 3 8 9 10 7 5 8 "
-;
-
-char *VTK_VECTOR_TEXT_61 = (char *) "12 0.952768 "
-"0.22857 0.23975 0.94857 0.23975 0.22437 0.35714 0.95277 0.35714 0.22857 0.36329 "
-"0.94857 0.36329 0.22857 0.57385 0.94857 0.57385 0.22437 0.58000 0.95277 0.58000 "
-"0.22857 0.69740 0.94857 0.69740 8 0 4 "
-"2 0 1 5 4 0 5 3 5 1 "
-"11 7 9 10 6 7 10 7 11 8 6 "
-"10 "
-;
-
-char *VTK_VECTOR_TEXT_62 = (char *) "11 0.952360 "
-"0.23429 0.09914 0.22857 0.10169 0.22748 0.22571 0.23192 0.23143 0.95116 0.40857 "
-"0.79073 0.46571 0.79073 0.47143 0.95236 0.52857 0.22897 0.70571 0.22857 0.83287 "
-"0.23429 0.83563 9 1 0 2 3 2 0 3 0 5 4 7 5 4 "
-"5 0 6 5 7 6 10 8 8 10 9 10 6 7 "
-;
-
-char *VTK_VECTOR_TEXT_63 = (char *) "45 0.918074 "
-"0.47429 -0.07186 0.62021 -0.07143 0.47118 0.07714 0.62329 0.07714 0.49979 0.19714 "
-"0.62021 0.19714 0.49563 0.20286 0.49563 0.27714 0.63681 0.31714 0.50816 0.34571 "
-"0.65714 0.36350 0.53669 0.41429 0.70857 0.42384 0.57868 0.47143 0.82857 0.53597 "
-"0.86902 0.58571 0.73258 0.62000 0.90437 0.65429 0.76086 0.66000 0.77522 0.70000 "
-"0.91580 0.70000 0.34857 0.71338 0.21034 0.73429 0.77866 0.75143 0.91807 0.76857 "
-"0.22605 0.80857 0.76571 0.80375 0.38286 0.82144 0.73714 0.85191 0.25098 0.87143 "
-"0.89143 0.86730 0.43597 0.88857 0.86812 0.90571 0.67429 0.90616 0.48571 0.91800 "
-"0.62857 0.92538 0.29296 0.93429 0.54857 0.93277 0.81143 0.96670 0.35429 0.98821 "
-"0.76571 0.99800 0.44571 1.02891 0.69714 1.02680 0.53143 1.04395 0.60000 1.04437 41 2 1 3 2 0 1 7 6 4 7 4 5 8 9 7 11 10 13 8 "
-"7 5 8 10 11 9 8 11 13 12 16 12 13 10 14 16 12 14 15 16 16 "
-"15 18 17 18 15 17 23 19 17 19 18 20 23 17 29 27 36 26 32 28 21 "
-"25 22 26 23 24 27 29 25 24 23 20 36 31 39 28 40 33 30 26 24 35 "
-"44 37 31 36 27 27 25 21 31 34 41 42 33 40 28 38 40 39 31 41 38 "
-"28 32 26 30 32 42 35 33 41 34 43 43 37 44 34 37 43 44 35 42 "
-;
-
-char *VTK_VECTOR_TEXT_64 = (char *) "114 1.632597 "
-"0.92571 -0.39563 1.16571 -0.38109 0.74857 -0.37236 0.65143 -0.34613 1.33143 -0.33070 "
-"0.54286 -0.29914 0.86286 -0.27866 1.06286 -0.28134 1.45650 -0.26000 0.73714 -0.25387 "
-"1.21143 -0.25387 0.43429 -0.22384 0.62286 -0.21216 1.32144 -0.20857 1.55582 -0.17429 "
-"0.53714 -0.16099 0.52571 -0.15258 0.53143 -0.15669 0.33714 -0.11650 1.45143 -0.11561 "
-"0.46286 -0.09260 0.80000 -0.07295 1.20571 -0.07252 1.09714 -0.06891 0.71429 -0.06252 "
-"1.49714 -0.06187 1.63260 -0.06000 0.29629 -0.04857 1.29714 -0.04498 0.90857 -0.03629 "
-"1.03384 -0.02571 0.62857 -0.01582 0.40486 -0.00857 0.59429 0.01873 1.41143 0.03296 "
-"0.82857 0.03907 0.77714 0.04327 1.01143 0.04414 1.20000 0.05050 1.16989 0.06571 "
-"1.25143 0.06086 0.90857 0.06821 0.72000 0.07561 0.54771 0.09429 1.15580 0.09429 "
-"0.24420 0.10000 0.35748 0.11143 0.96000 0.10725 0.68527 0.11714 1.33841 0.11714 "
-"1.51579 0.15714 0.66177 0.17429 1.41355 0.20286 1.03514 0.20857 0.65295 0.23143 "
-"0.22437 0.23714 0.51277 0.23714 0.33563 0.24857 1.45355 0.27714 1.07177 0.31143 "
-"1.58478 0.31143 0.65966 0.32857 1.48319 0.36857 0.53184 0.39714 0.23277 0.40286 "
-"0.34478 0.40857 1.60420 0.42571 1.08420 0.44286 0.71514 0.48857 0.25184 0.49429 "
-"1.49295 0.49429 0.57229 0.50000 1.60109 0.52857 1.05714 0.54144 0.75846 0.55143 "
-"0.38645 0.55714 1.47681 0.58571 1.01143 0.59527 0.81714 0.60331 1.58605 0.60857 "
-"1.12878 0.61429 0.65714 0.62418 0.86286 0.62319 0.96571 0.62151 0.92571 0.62991 "
-"0.42857 0.64350 1.44571 0.66730 0.32359 0.67714 1.06048 0.68286 0.74857 0.69641 "
-"1.15429 0.71588 1.28235 0.71714 1.00571 0.71800 0.82857 0.73109 0.92000 0.74152 "
-"1.52657 0.75143 0.51275 0.75714 0.37669 0.76286 1.38286 0.76132 0.59493 0.82571 "
-"1.30857 0.82821 1.45561 0.84857 0.47429 0.87296 0.73143 0.89681 1.18286 0.89580 "
-"1.08571 0.92395 1.37143 0.92400 0.92000 0.93580 0.58286 0.95188 1.30857 0.96371 "
-"0.71429 1.00899 1.18286 1.01470 0.92000 1.04437 1.01143 1.04395 114 0 6 2 1 7 0 6 0 7 "
-"7 1 10 2 9 3 3 12 5 9 2 "
-"6 10 4 13 4 10 1 15 5 12 "
-"5 15 11 13 8 19 12 3 9 8 13 "
-"4 11 20 18 11 15 16 17 16 15 "
-"14 19 8 26 25 14 20 11 16 22 38 "
-"23 25 19 14 23 39 30 30 39 37 "
-"27 46 45 18 32 27 32 18 20 21 36 "
-"24 35 29 41 24 42 31 29 35 21 "
-"22 28 40 38 22 40 34 49 40 33 31 "
-"48 36 21 35 37 47 41 33 48 43 "
-"43 51 56 44 37 39 34 40 28 47 37 "
-"53 50 52 34 38 39 23 52 49 34 "
-"37 44 53 27 32 46 42 24 36 48 31 "
-"42 37 41 29 45 57 55 53 44 59 "
-"51 54 56 52 50 58 58 60 62 43 48 "
-"51 45 46 57 56 61 63 64 55 57 "
-"91 80 44 60 58 50 62 66 70 56 54 "
-"61 44 80 67 59 44 67 71 63 61 "
-"64 65 69 67 80 73 65 64 57 66 62 "
-"60 68 71 61 71 68 81 69 75 87 "
-"72 70 66 74 81 68 77 73 80 70 79 "
-"76 75 69 65 83 77 88 87 85 97 "
-"81 74 89 89 78 93 86 76 79 70 72 "
-"79 74 78 89 88 77 80 75 85 87 "
-"82 84 94 91 90 80 86 95 98 78 82 "
-"93 92 83 88 93 82 94 84 83 92 "
-"94 84 92 97 96 102 95 86 79 102 99 "
-"108 95 101 98 96 97 85 96 99 102 "
-"98 101 100 103 108 99 100 109 104 106 100 "
-"101 108 103 110 105 113 107 100 106 109 "
-"104 111 105 107 112 110 111 104 109 113 105 "
-"111 112 107 113 107 110 103 "
-;
-
-char *VTK_VECTOR_TEXT_65 = (char *) "13 1.155731 "
-"0.14455 -0.07143 1.00000 -0.07252 1.15573 -0.07143 0.29143 -0.07103 0.40981 0.25429 "
-"0.86857 0.25754 0.45714 0.37713 0.82478 0.38000 0.45462 0.38571 0.58538 0.73429 "
-"0.63429 0.90068 0.56000 1.02454 0.71429 1.02644 13 5 "
-"1 2 0 8 11 6 4 5 12 10 7 0 3 4 0 4 8 6 5 7 6 "
-"8 4 7 5 2 8 9 11 9 10 11 12 7 2 11 10 12 "
-;
-
-char *VTK_VECTOR_TEXT_66 = (char *) "48 1.081090 "
-"0.25714 -0.07186 0.78286 -0.06723 0.86857 -0.04899 0.93714 -0.02045 1.00725 0.03714 "
-"0.39957 0.06000 0.73143 0.05621 0.80571 0.06891 1.04213 0.08857 0.87555 0.10571 "
-"1.06437 0.14000 0.91070 0.15143 1.08109 0.22000 0.93295 0.22571 0.93252 0.26571 "
-"1.07177 0.32286 0.90857 0.34064 1.04616 0.38571 0.86857 0.38686 0.79429 0.42252 "
-"0.39957 0.43143 1.01296 0.43143 0.69714 0.43563 0.97143 0.46686 0.88197 0.51143 "
-"0.40571 0.56437 0.72000 0.56705 0.39848 0.57429 0.96956 0.58571 0.80571 0.58930 "
-"0.84686 0.62000 0.99641 0.62571 0.86943 0.65429 1.02437 0.70571 0.88420 0.71143 "
-"1.02665 0.76857 0.87429 0.79232 1.01673 0.82000 0.84000 0.84984 0.77714 0.88538 "
-"0.98607 0.88857 0.39957 0.89429 0.71429 0.89580 0.93143 0.95296 0.85714 0.99756 "
-"0.80000 1.01470 0.25714 1.02615 0.70857 1.02680 50 1 6 0 2 7 1 "
-"0 20 46 7 2 9 1 7 6 20 27 "
-"46 9 4 11 4 9 3 2 3 9 "
-"11 10 13 8 11 4 10 11 8 12 13 "
-"10 14 17 16 14 15 17 16 21 18 "
-"14 13 12 15 14 12 23 18 21 5 0 "
-"6 19 26 22 18 24 19 16 17 21 "
-"24 18 23 26 19 29 19 24 29 25 22 "
-"26 22 25 20 30 29 24 32 28 31 "
-"28 32 30 32 31 34 0 5 20 34 35 "
-"36 33 34 31 28 30 24 36 40 38 "
-"38 44 39 35 37 36 34 33 35 25 27 "
-"20 27 41 46 40 36 37 43 38 40 "
-"39 45 42 42 47 41 38 43 44 45 39 "
-"44 47 46 41 47 42 45 "
-;
-
-char *VTK_VECTOR_TEXT_67 = (char *) "56 1.186046 "
-"0.69143 -0.08966 0.80000 -0.08705 0.60000 -0.07823 0.50857 -0.05070 0.93143 -0.05216 "
-"0.45714 -0.02486 1.00000 -0.01473 0.39597 0.02000 0.69714 0.03563 0.74857 0.03563 "
-"0.62286 0.04899 0.82286 0.04899 1.08000 0.05597 0.57143 0.06784 0.88000 0.07229 "
-"0.32571 0.10064 0.93143 0.10759 0.49143 0.11901 1.13800 0.14000 0.45600 0.15714 "
-"0.28930 0.16286 0.99641 0.18571 0.41502 0.22571 1.18605 0.27714 0.24319 0.28857 "
-"1.04571 0.31105 0.38244 0.32857 0.22748 0.36286 0.36723 0.44286 0.21866 0.52857 "
-"0.36991 0.55714 0.22705 0.60857 1.02857 0.69469 0.40657 0.71143 1.16694 0.72857 "
-"0.26286 0.74089 0.44187 0.78000 1.13927 0.80857 0.97143 0.80914 0.48000 0.82725 "
-"0.31750 0.84286 0.93714 0.85011 0.53143 0.86784 0.89143 0.88331 1.07582 0.90571 "
-"0.64000 0.91252 0.64571 0.91335 0.65714 0.91563 0.38286 0.91868 0.78857 0.91823 "
-"1.00571 0.96902 0.50286 0.99756 0.93143 1.01070 0.58286 1.02680 0.70286 1.04705 "
-"0.80000 1.04437 54 "
-"1 9 0 0 8 2 14 6 16 4 14 "
-"11 24 20 22 7 17 15 2 10 3 "
-"8 10 2 9 1 11 0 9 8 4 11 "
-"1 3 13 5 12 16 6 10 13 3 "
-"5 13 7 7 13 17 22 20 15 16 12 "
-"21 14 4 6 19 15 17 23 25 18 "
-"22 15 19 25 21 18 18 21 12 27 28 "
-"29 27 24 26 26 24 22 28 27 26 "
-"29 30 31 30 29 28 33 35 31 35 33 "
-"40 33 31 30 34 37 32 48 42 51 "
-"36 40 33 40 36 48 38 44 41 44 38 "
-"37 32 37 38 48 39 42 36 39 48 "
-"54 53 47 45 51 42 49 43 52 50 41 "
-"44 47 45 46 41 50 43 45 53 51 "
-"49 54 47 53 45 47 49 55 54 55 49 "
-"52 52 43 50 "
-;
-
-char *VTK_VECTOR_TEXT_68 = (char *) "34 1.167232 "
-"0.26286 -0.07186 0.70286 -0.07252 0.80000 -0.06109 0.89714 -0.03355 0.99555 0.02571 "
-"0.40528 0.06000 0.72571 0.05891 1.03582 0.06571 0.79547 0.07143 0.88000 0.10893 "
-"1.08150 0.12857 0.92115 0.14571 0.96657 0.21429 1.13966 0.26571 0.99470 0.28857 "
-"1.16420 0.39714 1.01823 0.43714 1.16723 0.52857 1.01823 0.53429 1.15277 0.64286 "
-"1.00000 0.65848 0.97714 0.72375 1.11216 0.77429 0.94286 0.78057 0.87429 0.84902 "
-"1.06607 0.85429 0.81714 0.87865 0.40528 0.89429 0.69143 0.89807 0.97714 0.94616 "
-"0.90857 0.98657 0.81143 1.01580 0.26286 1.02615 0.70286 1.02680 34 2 6 1 5 0 1 "
-"8 3 9 3 8 2 0 27 32 6 2 "
-"8 5 1 6 4 7 11 4 9 3 "
-"9 4 11 11 10 12 11 7 10 13 14 "
-"12 14 15 16 13 12 10 16 17 18 "
-"14 13 15 18 19 20 17 16 15 18 17 "
-"19 22 21 20 21 22 23 29 24 23 "
-"22 20 19 26 24 30 0 5 27 25 23 "
-"22 29 23 25 30 24 29 26 31 28 "
-"31 26 30 33 32 27 28 33 27 33 28 "
-"31 "
-;
-
-char *VTK_VECTOR_TEXT_69 = (char *) "15 1.080000 "
-"0.26857 -0.07186 1.08000 -0.06878 1.08000 0.05164 0.41100 0.06000 0.41100 0.42571 "
-"1.01143 0.43100 1.01563 0.55143 0.41714 0.55866 1.01143 0.55757 0.40991 0.56857 "
-"0.41100 0.89429 1.05143 0.89957 1.05563 1.02000 0.26857 1.02615 1.05143 1.02615 13 0 4 13 1 3 0 1 2 3 0 "
-"3 4 7 5 8 5 7 4 6 8 5 4 9 13 7 9 4 9 10 13 11 "
-"14 10 14 13 10 12 14 11 "
-;
-
-char *VTK_VECTOR_TEXT_70 = (char *) "12 1.005714 "
-"0.26857 -0.07186 0.40571 -0.07186 0.40991 0.42000 0.41714 0.42723 0.92615 0.43143 "
-"0.92615 0.55143 0.41714 0.55563 0.40991 0.56286 0.41100 0.89429 1.00571 0.90265 "
-"1.00571 1.02307 0.26857 1.02615 10 0 2 "
-"11 2 7 11 2 0 1 6 4 5 "
-"4 6 3 3 6 2 7 2 6 7 8 "
-"11 11 8 10 8 9 10 "
-;
-
-char *VTK_VECTOR_TEXT_71 = (char *) "60 1.234286 "
-"0.82286 -0.08966 0.65714 -0.07866 0.93143 -0.07335 0.56571 -0.05387 1.05143 -0.03355 "
-"0.48000 -0.01514 1.12000 0.00073 0.74286 0.03866 0.83429 0.04177 0.38857 0.05044 "
-"0.65143 0.05470 0.92571 0.06319 1.23260 0.07714 0.34857 0.09302 0.54286 0.10150 "
-"1.03429 0.11229 0.50286 0.13044 1.09252 0.15714 0.44421 0.19714 0.27429 0.21629 "
-"0.24252 0.31143 0.39320 0.31143 0.77714 0.36243 1.09143 0.35773 0.22748 0.39714 "
-"0.37605 0.40286 0.77295 0.48286 0.77714 0.48900 1.23429 0.48900 0.22437 0.51143 "
-"0.37295 0.51714 0.23320 0.59143 0.39748 0.65429 1.09143 0.68617 1.08571 0.69099 "
-"0.42073 0.71714 1.21977 0.72286 0.27387 0.73429 1.06286 0.75301 0.30645 0.80286 "
-"0.47616 0.80286 1.02286 0.82127 1.18498 0.82571 0.54286 0.86150 0.34857 0.86629 "
-"0.94286 0.88371 1.14857 0.88793 0.61143 0.89580 0.86286 0.91184 0.40168 0.92286 "
-"0.70857 0.91866 0.80000 0.92134 1.09714 0.94384 0.45714 0.96436 0.53714 1.00498 "
-"1.00000 1.00371 0.93714 1.02613 0.62857 1.03252 0.73714 1.04705 0.84571 1.04395 58 0 7 1 14 5 3 5 14 "
-"9 2 8 0 1 10 3 0 8 7 "
-"8 2 11 18 13 9 17 6 12 10 1 "
-"7 4 11 2 13 18 19 23 17 12 "
-"15 6 17 4 6 15 16 9 14 11 4 "
-"15 14 3 10 19 21 20 18 9 16 "
-"30 31 29 23 27 22 25 24 20 22 27 "
-"26 21 19 18 25 20 21 23 28 27 "
-"28 23 12 29 24 25 30 29 25 31 32 "
-"37 38 33 36 37 32 39 32 31 30 "
-"35 39 32 34 33 38 39 40 44 38 46 "
-"41 38 42 46 40 39 35 44 40 49 "
-"53 43 54 43 49 40 42 38 36 43 47 "
-"54 52 41 46 41 52 45 43 53 49 "
-"54 47 57 50 57 47 45 56 48 55 45 "
-"52 48 59 51 57 50 58 50 51 58 "
-"56 45 55 58 51 59 59 48 56 "
-;
-
-char *VTK_VECTOR_TEXT_72 = (char *) "16 1.125714 "
-"0.26857 -0.07186 0.40571 -0.07186 0.98857 -0.07295 0.98286 -0.06878 1.12571 -0.06878 "
-"0.40991 0.43714 0.41714 0.44437 0.97714 0.44329 0.41714 0.57277 0.97714 0.57385 "
-"0.40991 0.58000 0.98550 1.02571 1.12571 1.02307 0.26857 1.02615 0.40571 1.02615 "
-"1.12000 1.02723 14 4 9 7 0 5 13 5 10 13 "
-"5 0 1 8 7 9 9 4 11 10 5 "
-"8 6 8 5 4 3 2 7 8 6 "
-"14 13 10 12 15 11 3 4 7 4 12 "
-"11 "
-;
-
-char *VTK_VECTOR_TEXT_73 = (char *) "4 0.428571 "
-"0.42592 -0.07143 0.28571 -0.06878 0.28836 1.02571 0.42857 1.02307 2 1 3 2 3 1 0 "
-;
-
-char *VTK_VECTOR_TEXT_74 = (char *) "27 0.790089 "
-"0.45143 -0.09009 0.50857 -0.09009 0.37714 -0.07756 0.58404 -0.07714 0.33143 -0.06086 "
-"0.64000 -0.05641 0.26489 -0.01429 0.71429 -0.00117 0.46286 0.03866 0.53714 0.04706 "
-"0.74902 0.04857 0.41714 0.04899 0.57772 0.06571 0.21143 0.06772 0.37016 0.07714 "
-"0.34498 0.11143 0.77252 0.11143 0.62371 0.11714 0.18705 0.16286 0.32462 0.17429 "
-"0.64420 0.22571 0.79009 0.23143 0.18546 0.23714 0.31472 0.25429 0.64836 1.02571 "
-"0.78857 1.02307 0.78286 1.02723 25 10 "
-"12 7 4 2 11 0 1 8 3 8 1 11 2 8 0 8 2 8 3 9 9 "
-"3 12 4 14 6 7 12 5 3 5 12 6 15 13 12 10 17 14 4 11 13 "
-"19 18 6 14 15 22 19 23 17 16 20 13 15 19 16 17 10 22 18 19 21 "
-"20 16 20 21 24 25 26 24 21 25 24 "
-;
-
-char *VTK_VECTOR_TEXT_75 = (char *) "17 1.155019 "
-"0.25714 -0.07186 0.39429 -0.07186 1.15502 -0.07143 0.97143 -0.07140 0.89527 0.28857 "
-"0.89143 0.29371 0.89098 0.29429 0.39848 0.30000 0.57714 0.47913 0.40000 0.49126 "
-"0.68956 0.56857 0.68571 0.57371 0.68527 0.57429 1.13216 1.02571 0.25714 1.02615 "
-"0.39429 1.02615 0.94857 1.02680 15 0 9 14 0 7 9 3 10 8 3 6 10 9 8 16 4 5 6 7 "
-"0 1 3 4 6 16 8 12 10 11 12 4 3 2 8 10 12 9 7 8 13 "
-"16 12 15 14 9 "
-;
-
-char *VTK_VECTOR_TEXT_76 = (char *) "7 0.941339 "
-"0.25714 -0.07186 0.93714 -0.07186 0.94134 0.04857 0.39957 0.06000 0.93714 0.05472 "
-"0.25714 1.02615 0.39429 1.02615 5 3 0 1 0 3 5 2 4 1 3 1 4 6 5 3 "
-;
-
-char *VTK_VECTOR_TEXT_77 = (char *) "19 1.302857 "
-"0.39164 -0.07143 0.71429 -0.07186 1.17143 -0.07295 0.25714 -0.06878 0.84000 -0.06947 "
-"1.16571 -0.06878 1.30286 -0.06878 0.78286 0.09751 0.78857 0.09751 1.16000 0.83018 "
-"0.40000 0.84467 0.52151 0.88286 0.52000 0.88739 0.51748 0.89429 0.47580 1.02000 "
-"0.25979 1.02571 1.11429 1.02285 1.30286 1.02307 0.46857 1.02680 17 3 10 15 5 6 9 6 "
-"5 2 1 11 10 4 8 1 1 7 11 9 16 8 1 8 7 9 8 4 10 "
-"18 15 13 11 12 10 3 0 10 13 18 16 9 17 10 11 13 13 14 18 6 "
-"17 9 "
-;
-
-char *VTK_VECTOR_TEXT_78 = (char *) "14 1.125714 "
-"0.26286 -0.07186 0.39429 -0.07186 0.98286 -0.07295 1.12571 -0.06878 0.98286 0.17231 "
-"0.72045 0.31143 0.71678 0.31714 0.72000 0.31207 0.40000 0.78092 0.99122 1.02571 "
-"1.12571 1.02307 0.26286 1.02615 0.40571 1.02644 1.12000 1.02723 12 "
-"0 8 11 8 0 1 4 3 9 3 4 "
-"2 4 5 2 6 7 5 12 6 4 "
-"4 6 5 6 12 8 10 13 9 8 12 "
-"11 3 10 9 "
-;
-
-char *VTK_VECTOR_TEXT_79 = (char *) "63 1.267054 "
-"0.70286 -0.08966 0.77714 -0.08966 0.61143 -0.07605 0.89714 -0.06823 0.97143 -0.04073 "
-"0.49143 -0.03229 1.05650 0.00857 0.42286 0.01107 0.70857 0.03605 0.77143 0.03605 "
-"0.63429 0.04899 0.84571 0.04899 1.12725 0.07143 0.35044 0.07714 0.92716 0.08286 "
-"0.54857 0.08535 0.49143 0.12704 1.17465 0.13429 1.01296 0.15143 0.28571 0.17016 "
-"0.43955 0.18571 1.21184 0.20286 0.40784 0.23714 1.08086 0.26000 1.24613 0.30000 "
-"0.23109 0.31143 1.10665 0.34571 0.36764 0.36857 0.21295 0.43143 1.11848 0.43714 "
-"1.26705 0.43714 0.36193 0.51143 1.11848 0.51714 0.21563 0.54571 0.36991 0.59143 "
-"1.25522 0.61429 1.09966 0.63714 0.23236 0.64857 1.23681 0.68857 1.07070 0.71714 "
-"0.41143 0.73016 0.26645 0.75143 1.20486 0.76857 0.45561 0.79714 1.02286 0.79270 "
-"0.98857 0.82956 0.31429 0.83650 1.16045 0.84286 0.53143 0.86150 0.92000 0.87800 "
-"0.35582 0.88857 0.63429 0.90764 0.85143 0.90613 1.10286 0.90956 0.71429 0.92134 "
-"0.79429 0.91866 0.43493 0.95714 1.04000 0.95964 0.52000 1.00498 0.96000 1.00327 "
-"0.89714 1.02613 0.63429 1.03866 0.77714 1.04705 63 0 8 2 1 9 0 8 10 2 2 10 5 9 1 11 5 "
-"16 7 11 3 14 3 11 1 3 4 14 6 14 4 7 16 13 10 15 5 0 "
-"9 8 16 5 15 14 6 18 13 20 19 12 18 6 18 17 23 17 21 23 20 "
-"22 19 18 12 17 23 21 26 25 19 22 13 16 20 25 27 28 27 25 22 21 "
-"24 26 30 29 26 32 35 36 30 26 24 33 34 37 32 29 30 28 31 33 31 "
-"28 27 34 33 31 36 38 39 35 32 30 41 37 34 38 42 39 41 40 46 35 "
-"38 36 39 47 44 40 43 46 53 45 44 46 43 50 45 57 49 40 41 34 56 "
-"50 43 49 59 52 48 56 43 57 45 53 53 44 47 56 48 58 39 42 47 58 "
-"51 61 59 49 57 51 58 48 55 52 60 62 54 55 59 60 52 61 54 62 54 "
-"61 51 62 55 60 "
-;
-
-char *VTK_VECTOR_TEXT_80 = (char *) "31 1.098661 "
-"0.26286 -0.07186 0.40000 -0.07186 0.40420 0.36857 0.41143 0.37580 0.73714 0.37621 "
-"0.88571 0.40034 0.98343 0.44857 0.41143 0.50420 0.72571 0.50420 0.40420 0.51143 "
-"1.04045 0.51143 0.82947 0.52286 0.88571 0.55296 0.91678 0.58571 1.08252 0.59714 "
-"0.93966 0.63143 1.09866 0.68286 0.94966 0.72857 0.93355 0.79143 1.08530 0.80857 "
-"0.90857 0.83270 0.86857 0.86893 1.05927 0.87143 0.40528 0.89429 0.82286 0.88899 "
-"0.74857 0.89807 1.02439 0.92286 0.96000 0.97641 0.89143 1.00538 0.26286 1.02615 "
-"0.74286 1.02680 31 0 9 29 0 2 9 2 7 9 7 3 8 12 11 5 5 11 4 4 "
-"8 3 3 7 2 2 0 1 11 8 4 13 12 6 10 13 6 6 12 5 14 "
-"15 10 15 14 17 13 10 15 16 17 14 17 19 18 19 17 16 18 19 20 20 "
-"27 21 22 20 19 9 23 29 30 25 24 25 30 23 27 20 26 20 22 26 28 "
-"24 21 28 21 27 30 29 23 30 24 28 "
-;
-
-char *VTK_VECTOR_TEXT_81 = (char *) "66 1.276398 "
-"1.23429 -0.15444 1.13714 -0.11188 0.76571 -0.09009 0.64571 -0.08437 0.84000 -0.08034 "
-"0.58286 -0.07034 1.27640 -0.06000 0.93143 -0.05470 0.46857 -0.02322 1.00000 -0.02293 "
-"0.38857 0.03330 0.76000 0.03563 0.68000 0.03866 0.83547 0.04857 1.09814 0.04857 "
-"0.61714 0.05177 0.87591 0.06571 0.55429 0.07800 0.80000 0.10784 0.49143 0.12132 "
-"0.30857 0.12350 0.74115 0.12857 0.98286 0.13189 1.17355 0.14571 0.42857 0.19207 "
-"0.86857 0.19927 0.26286 0.20486 1.05355 0.22000 0.77714 0.23134 0.39277 0.26000 "
-"1.23177 0.27714 0.23387 0.28286 1.08823 0.30571 0.36420 0.36286 0.20991 0.40286 "
-"0.35580 0.43714 1.25866 0.43714 1.11009 0.44286 0.20723 0.51714 1.25252 0.58000 "
-"0.36420 0.59714 1.09823 0.60857 0.23470 0.67714 0.38857 0.68947 1.21184 0.73429 "
-"1.05143 0.73841 0.42902 0.76857 0.28821 0.80286 1.00571 0.80413 1.17188 0.81429 "
-"0.96000 0.84670 0.51429 0.85473 0.34473 0.88286 1.12000 0.88413 0.57714 0.89070 "
-"0.88571 0.89070 0.64571 0.91252 0.76571 0.92093 0.42857 0.95759 1.03429 0.95864 "
-"0.50286 0.99927 0.96571 0.99800 0.60000 1.03252 0.86857 1.03184 0.69714 1.04705 "
-"0.77143 1.04665 66 0 6 1 "
-"13 7 16 14 9 1 9 16 7 3 15 "
-"5 16 9 14 11 4 13 11 2 4 "
-"7 13 4 12 3 11 2 11 3 15 3 "
-"12 5 17 8 8 19 10 10 19 20 "
-"14 1 6 5 15 17 20 29 26 19 8 "
-"17 21 18 28 22 16 14 16 25 18 "
-"22 14 27 24 20 19 16 22 25 26 29 "
-"31 18 25 28 14 23 27 27 30 32 "
-"30 27 23 31 33 34 20 24 29 37 32 "
-"30 33 31 29 34 33 38 36 37 30 "
-"35 38 33 37 39 41 38 40 42 37 36 "
-"39 41 44 45 40 38 35 42 43 47 "
-"44 41 39 46 47 43 43 42 40 47 46 "
-"52 45 49 48 59 50 48 52 51 58 "
-"53 48 49 61 50 59 50 61 55 58 51 "
-"60 51 52 46 49 45 44 59 48 53 "
-"57 64 56 60 54 62 55 63 57 51 54 "
-"60 54 56 62 62 56 64 63 55 61 "
-"63 65 57 57 65 64 "
-;
-
-char *VTK_VECTOR_TEXT_82 = (char *) "46 1.225355 "
-"0.26857 -0.07186 0.40571 -0.07186 1.05143 -0.07215 1.22359 -0.07143 1.22535 -0.06571 "
-"1.17465 0.01429 1.17143 0.01936 1.17098 0.02000 0.84571 0.24343 1.00571 0.27650 "
-"0.76571 0.34698 0.91832 0.37429 0.73143 0.37678 0.40991 0.40857 0.68000 0.40437 "
-"0.41714 0.41580 0.62286 0.41538 0.84226 0.42571 0.92571 0.44706 0.99429 0.47502 "
-"1.07582 0.54000 0.41714 0.54420 0.40991 0.55143 0.80000 0.54764 0.88000 0.56538 "
-"1.11641 0.60286 0.94286 0.60439 0.96784 0.63714 1.13823 0.67714 0.98966 0.69429 "
-"0.99277 0.74571 1.14134 0.75143 0.97143 0.81493 1.12823 0.82000 0.93143 0.86115 "
-"1.10498 0.87714 0.89143 0.88498 0.40991 0.90000 0.41714 0.90723 0.78857 0.90723 "
-"1.07011 0.92857 1.01714 0.97579 0.97143 0.99865 0.87429 1.02109 0.26857 1.02615 "
-"0.80571 1.02723 46 2 9 8 3 5 2 0 37 "
-"44 5 7 2 5 6 7 3 4 5 "
-"2 7 9 18 23 17 11 8 9 8 11 "
-"10 0 22 37 11 17 10 21 16 23 "
-"21 15 16 23 10 17 19 24 18 23 18 "
-"24 23 12 10 15 21 13 0 21 22 "
-"16 14 23 23 14 12 20 26 19 26 20 "
-"27 24 19 26 27 25 29 28 30 29 "
-"31 30 28 25 27 20 30 33 32 28 29 "
-"25 33 30 31 32 40 34 35 32 33 "
-"0 1 13 0 13 21 41 34 40 43 36 "
-"42 38 39 45 32 35 40 42 34 41 "
-"34 42 36 36 43 39 44 38 45 43 45 "
-"39 37 38 44 "
-;
-
-char *VTK_VECTOR_TEXT_83 = (char *) "69 1.081090 "
-"0.71429 -0.08966 0.53714 -0.07866 0.82286 -0.07101 0.46286 -0.05959 0.38857 -0.02616 "
-"0.94286 -0.01678 0.33714 0.01044 0.64000 0.03866 0.73143 0.04177 1.00571 0.03883 "
-"0.56000 0.05177 0.28527 0.06571 0.50857 0.06930 0.83587 0.07143 1.04086 0.08857 "
-"0.88127 0.10000 0.43429 0.11330 0.24486 0.13429 0.92613 0.15714 1.07177 0.16286 "
-"0.38771 0.16857 0.94134 0.21429 0.36319 0.22571 0.21563 0.23714 1.08109 0.26571 "
-"0.21403 0.27714 0.93294 0.27714 0.34857 0.28916 0.91011 0.31714 1.06816 0.32857 "
-"0.84000 0.36943 1.04486 0.38000 0.76571 0.39673 0.98286 0.45241 0.53143 0.45748 "
-"0.42857 0.49343 0.92571 0.49070 0.37143 0.52535 0.82857 0.53109 0.31044 0.58000 "
-"0.53143 0.60899 0.43429 0.65616 0.26244 0.67143 0.39891 0.71143 0.90857 0.71084 "
-"0.25295 0.72286 1.04615 0.72286 0.39320 0.76857 0.40359 0.80857 1.03109 0.81429 "
-"0.26327 0.82000 0.87429 0.81493 0.45143 0.86956 0.82286 0.87258 0.28930 0.88286 "
-"0.98812 0.90000 0.50857 0.90041 0.76571 0.90151 0.57714 0.91563 0.67429 0.91866 "
-"0.95443 0.94000 0.35429 0.96099 0.89143 0.98784 0.40000 0.99188 0.83429 1.01470 "
-"0.50286 1.03184 0.74857 1.03823 0.57143 1.04437 0.67429 1.04705 67 2 "
-"8 0 0 7 1 6 4 16 6 16 11 0 8 7 7 10 1 8 2 13 5 "
-"15 13 1 10 3 10 12 3 9 15 5 4 3 12 15 14 18 5 13 2 14 "
-"15 9 16 4 12 21 24 26 18 19 21 11 20 17 20 11 16 17 22 23 19 "
-"18 14 22 17 20 25 23 27 23 22 27 24 21 19 26 31 28 28 33 30 24 "
-"29 26 30 38 32 26 29 31 34 32 38 33 28 31 34 40 35 33 36 30 39 "
-"43 42 38 30 36 41 37 35 40 34 38 37 41 39 41 35 40 50 48 54 39 "
-"41 43 44 46 49 45 42 43 45 47 50 48 50 47 60 51 55 47 45 43 51 "
-"60 53 54 48 61 44 49 51 55 51 49 48 52 61 56 63 52 57 66 59 61 "
-"52 63 63 56 65 62 53 60 53 64 57 53 62 64 59 66 58 65 58 67 58 "
-"65 56 66 57 64 67 58 68 68 58 66 "
-;
-
-char *VTK_VECTOR_TEXT_84 = (char *) "8 1.045714 "
-"0.54286 -0.07186 0.68000 -0.07186 0.53757 0.89429 0.68528 0.89429 0.17714 0.90265 "
-"1.04571 0.90265 0.17979 1.02571 1.04571 1.02307 6 0 3 2 3 0 "
-"1 6 4 2 6 3 7 6 2 3 "
-"3 5 7 "
-;
-
-char *VTK_VECTOR_TEXT_85 = (char *) "32 1.126804 "
-"0.65714 -0.09009 0.77143 -0.08705 0.53143 -0.07034 0.85714 -0.07101 0.47429 -0.05070 "
-"0.94286 -0.03629 0.38286 0.00704 1.02286 0.02445 0.65714 0.04437 0.78857 0.05320 "
-"0.33669 0.06000 0.58286 0.05748 0.84000 0.06823 0.52000 0.08535 1.07070 0.08857 "
-"0.89714 0.10154 0.46857 0.13025 1.09966 0.15714 0.29143 0.15866 0.94899 0.17429 "
-"0.43177 0.19714 0.27320 0.24286 0.97252 0.26000 1.12680 0.33429 0.26437 0.34000 "
-"0.40991 0.34000 0.98134 0.34571 0.98550 1.02571 1.12571 1.02307 0.26857 1.02615 "
-"0.40571 1.02615 1.12000 1.02723 30 3 9 1 10 20 18 8 0 "
-"1 0 11 2 7 15 5 0 8 11 "
-"8 1 9 9 3 12 13 4 2 5 12 "
-"3 15 7 19 16 10 6 12 5 15 "
-"4 13 6 13 2 11 21 18 20 13 16 "
-"6 19 17 22 17 19 14 7 14 19 "
-"10 16 20 25 24 21 23 26 22 23 22 "
-"17 25 21 20 24 25 29 30 29 25 "
-"28 31 27 26 23 27 23 28 27 "
-;
-
-char *VTK_VECTOR_TEXT_86 = (char *) "8 1.148571 "
-"0.57714 -0.07025 0.72571 -0.06947 0.64571 0.06079 0.65143 0.06062 0.15429 1.02560 "
-"0.30286 1.02531 1.00571 1.02531 1.14857 1.02560 6 0 2 4 3 2 "
-"0 3 7 6 1 3 0 3 1 7 "
-"2 5 4 "
-;
-
-char *VTK_VECTOR_TEXT_87 = (char *) "14 1.568063 "
-"0.45143 -0.07186 0.60000 -0.07017 1.13143 -0.06912 1.27429 -0.06912 0.52571 0.09707 "
-"1.20000 0.09787 1.13673 0.38000 0.86857 0.88103 0.16571 1.02562 0.78286 1.02446 "
-"1.42857 1.02446 1.56806 1.02571 0.30857 1.02615 0.95429 1.02615 12 "
-"2 6 7 6 2 5 1 4 0 7 9 "
-"4 11 10 5 3 5 2 8 0 4 "
-"13 7 6 9 7 13 7 4 1 11 5 "
-"3 12 8 4 "
-;
-
-char *VTK_VECTOR_TEXT_88 = (char *) "14 1.141168 "
-"0.15194 -0.07143 1.14117 -0.07143 0.32000 -0.07106 0.97143 -0.07140 0.65143 0.37795 "
-"0.74607 0.49429 0.56517 0.50000 0.74286 0.49909 0.74219 0.50000 0.65714 0.61727 "
-"0.20016 1.02571 0.96000 1.02568 1.11260 1.02571 0.36571 1.02644 12 "
-"0 2 6 3 5 4 5 6 4 5 8 "
-"6 5 3 1 5 7 8 4 6 2 "
-"9 6 8 12 11 8 6 13 10 13 6 "
-"9 11 9 8 "
-;
-
-char *VTK_VECTOR_TEXT_89 = (char *) "12 1.145205 "
-"0.71164 -0.07143 0.57143 -0.06878 0.56891 0.39143 0.71787 0.39714 0.65143 0.51441 "
-"0.43179 0.85429 0.42857 0.85936 0.42812 0.86000 0.15284 1.02571 0.32000 1.02535 "
-"0.98286 1.02464 1.14521 1.02571 10 3 2 "
-"1 3 1 0 4 2 3 2 9 8 "
-"11 10 4 5 2 4 5 6 7 2 7 "
-"9 2 5 7 11 4 3 "
-;
-
-char *VTK_VECTOR_TEXT_90 = (char *) "11 1.040000 "
-"0.17714 -0.07186 1.04000 -0.06878 1.04000 0.05164 0.17395 0.06000 0.34602 0.06000 "
-"0.84777 0.89429 0.24000 0.89957 1.02395 0.90000 0.23580 1.02000 1.02286 1.02307 "
-"0.24000 1.02615 9 0 4 3 1 4 0 1 2 4 3 4 5 5 "
-"7 9 4 7 5 5 10 6 10 5 9 6 10 8 "
-;
-
-char *VTK_VECTOR_TEXT_91 = (char *) "8 0.541339 "
-"0.24528 -0.37429 0.54025 -0.37429 0.54025 -0.27143 0.38227 -0.26571 0.38286 0.91454 "
-"0.54134 0.92286 0.24836 1.02571 0.53714 1.02615 6 0 4 6 3 1 "
-"2 1 3 0 0 3 4 5 7 4 "
-"6 4 7 "
-;
-
-char *VTK_VECTOR_TEXT_92 = (char *) "5 0.564685 "
-"0.46286 -0.09182 0.56000 -0.09256 0.56469 -0.08857 0.14713 1.04286 0.24571 1.04358 3 0 4 3 0 2 4 0 "
-"1 2 "
-;
-
-char *VTK_VECTOR_TEXT_93 = (char *) "9 0.465968 "
-"0.17100 -0.37429 0.46597 -0.37429 0.17100 -0.27143 0.32571 -0.26723 0.33295 -0.26000 "
-"0.33143 0.91201 0.17143 0.91979 0.16991 1.02000 0.46286 1.02615 7 2 0 3 1 "
-"3 0 1 4 3 5 4 1 7 6 8 5 8 6 8 5 1 "
-;
-
-char *VTK_VECTOR_TEXT_94 = (char *) "11 0.817005 "
-"0.18389 0.44857 0.18857 0.44458 0.32000 0.44686 0.68571 0.44746 0.81143 0.44445 "
-"0.81700 0.44857 0.49714 0.88224 0.50286 0.88224 0.44571 1.04090 0.55429 1.04168 "
-"0.45143 1.04437 9 0 2 6 0 6 8 7 3 5 4 5 3 2 "
-"0 1 10 7 9 10 8 6 10 6 7 9 7 5 "
-;
-
-char *VTK_VECTOR_TEXT_95 = (char *) "4 1.011860 "
-"0.11957 -0.37429 1.01186 -0.37429 0.11957 -0.28857 1.01186 -0.28857 2 2 1 3 2 0 1 "
-;
-
-char *VTK_VECTOR_TEXT_96 = (char *) "11 0.486571 "
-"0.38857 0.82420 0.48000 0.82420 0.48403 0.82571 0.37714 0.82989 0.38286 0.82575 "
-"0.48657 0.83143 0.21296 1.02571 0.38771 1.02571 0.21412 1.03143 0.38286 1.03106 "
-"0.37714 1.03295 9 5 1 2 0 3 4 3 10 6 0 1 5 7 "
-"3 0 8 6 10 7 0 5 3 7 10 10 7 9 "
-;
-
-char *VTK_VECTOR_TEXT_97 = (char *) "70 0.929303 "
-"0.44000 -0.09009 0.50286 -0.08966 0.36571 -0.07756 0.57143 -0.07907 0.92716 -0.07143 "
-"0.79429 -0.07106 0.92930 -0.06571 0.62857 -0.06151 0.30857 -0.05514 0.27429 -0.03258 "
-"0.68000 -0.03629 0.90748 -0.00857 0.48000 0.01580 0.53143 0.01621 0.42768 0.02571 "
-"0.76571 0.02129 0.22073 0.03143 0.61804 0.03714 0.89866 0.03714 0.37130 0.06000 "
-"0.20613 0.06571 0.68000 0.07330 0.34538 0.10000 0.71429 0.10809 0.19580 0.11714 "
-"0.89295 0.13429 0.33907 0.15714 0.74538 0.16857 0.20319 0.19714 0.36000 0.20914 "
-"0.75580 0.22000 0.40000 0.24371 0.22812 0.25429 0.44571 0.26041 0.66286 0.29891 "
-"0.28000 0.31258 0.75848 0.31714 0.75429 0.32399 0.33714 0.34657 0.38857 0.36538 "
-"0.68571 0.41320 0.75772 0.43714 0.35289 0.48286 0.22093 0.50000 0.22857 0.49470 "
-"0.89252 0.50571 0.75580 0.51143 0.22857 0.53547 0.37800 0.54571 0.74286 0.55301 "
-"0.88680 0.56286 0.71429 0.58893 0.41714 0.59330 0.42228 0.59714 0.25800 0.60286 "
-"0.42286 0.59759 0.65143 0.61959 0.48000 0.62193 0.86498 0.62571 0.53143 0.62950 "
-"0.59429 0.62950 0.28187 0.63714 0.84571 0.65486 0.33714 0.68436 0.80571 0.69007 "
-"0.37915 0.70571 0.72571 0.72538 0.45714 0.72966 0.54286 0.74152 0.62286 0.74152 70 "
-"3 13 1 5 4 15 4 11 15 19 8 "
-"2 13 3 7 13 0 1 14 0 12 "
-"20 22 24 0 14 2 12 0 13 13 7 "
-"17 11 4 6 19 2 14 17 10 21 "
-"7 10 17 11 18 15 16 22 20 8 19 "
-"9 15 23 21 15 21 10 23 25 27 "
-"9 19 16 19 22 16 23 15 25 24 26 "
-"28 27 25 30 25 15 18 30 25 36 "
-"32 28 26 26 24 22 29 32 26 39 38 "
-"31 38 35 29 32 29 35 31 38 29 "
-"39 34 40 33 39 31 39 33 34 36 41 "
-"37 40 37 41 37 40 34 41 36 25 "
-"41 45 46 43 44 47 47 48 54 48 47 "
-"44 50 49 46 41 25 45 50 46 45 "
-"42 48 44 49 64 51 52 53 55 52 65 "
-"63 65 52 55 52 61 48 52 63 61 "
-"58 49 50 49 58 62 69 60 56 49 62 "
-"64 54 48 61 57 67 65 57 65 55 "
-"51 66 56 69 59 60 66 51 64 68 67 "
-"57 59 69 57 69 68 57 69 56 66 "
-;
-
-char *VTK_VECTOR_TEXT_98 = (char *) "49 0.932518 "
-"0.61143 -0.09009 0.50286 -0.07823 0.36000 -0.07186 0.24000 -0.06878 0.72000 -0.06213 "
-"0.45714 -0.05914 0.77143 -0.03188 0.36571 0.01806 0.59429 0.02193 0.83543 0.02571 "
-"0.52000 0.02823 0.66857 0.04645 0.46857 0.05179 0.42704 0.08857 0.72956 0.10000 "
-"0.88784 0.10571 0.39216 0.14000 0.75641 0.14000 0.91470 0.18000 0.37462 0.19143 "
-"0.78665 0.23714 0.36152 0.28857 0.93252 0.29429 0.79236 0.36857 0.93252 0.37429 "
-"0.36420 0.38000 0.77294 0.47714 0.39216 0.50000 0.90899 0.50000 0.42473 0.55143 "
-"0.73143 0.55546 0.88657 0.55714 0.45883 0.58571 0.67429 0.60498 0.50857 0.61641 "
-"0.63429 0.62252 0.56571 0.62991 0.37714 0.64118 0.83429 0.63841 0.37315 0.64857 "
-"0.80571 0.66686 0.74286 0.70784 0.46857 0.71355 0.68571 0.72899 0.56571 0.74109 "
-"0.61714 0.74152 0.24265 1.02571 0.37143 1.02307 0.36571 1.02723 49 3 25 46 5 1 10 5 12 7 8 0 4 11 6 14 11 "
-"4 6 0 8 1 2 7 3 8 4 11 10 1 8 21 3 19 12 13 7 12 "
-"5 10 14 9 17 9 14 6 17 15 20 16 7 13 15 18 20 15 17 9 3 "
-"7 19 22 20 18 20 22 23 28 26 23 22 24 23 25 3 21 30 43 33 39 "
-"46 25 28 23 24 27 39 25 26 31 30 7 16 19 31 26 28 37 32 42 39 "
-"27 37 40 30 38 29 37 27 38 30 31 35 33 43 32 34 42 35 45 36 37 "
-"29 32 42 34 36 45 35 43 43 30 41 41 30 40 36 45 44 42 36 44 47 "
-"48 46 39 47 46 "
-;
-
-char *VTK_VECTOR_TEXT_99 = (char *) "58 0.894057 "
-"0.53143 -0.08966 0.59429 -0.08966 0.45714 -0.07673 0.68000 -0.07294 0.72571 -0.05343 "
-"0.37714 -0.04331 0.33714 -0.01543 0.78857 -0.01011 0.58286 0.02152 0.29143 0.03016 "
-"0.49625 0.03143 0.62857 0.03034 0.83107 0.03714 0.45714 0.04943 0.69270 0.06571 "
-"0.26241 0.07143 0.85714 0.07873 0.40457 0.09429 0.72722 0.10571 0.37629 0.14000 "
-"0.74437 0.14000 0.22899 0.14571 0.37184 0.15143 0.36930 0.15714 0.88571 0.15295 "
-"0.89406 0.19714 0.76571 0.21540 0.21034 0.22571 0.34705 0.25429 0.20420 0.36286 "
-"0.34478 0.36857 0.21673 0.45429 0.36252 0.47143 0.75429 0.47269 0.88058 0.48857 "
-"0.88319 0.49429 0.38371 0.52286 0.23849 0.52857 0.72000 0.55200 0.86437 0.55714 "
-"0.43025 0.58000 0.69714 0.58127 0.28527 0.61429 0.47429 0.60943 0.48571 0.61387 "
-"0.83473 0.61429 0.49143 0.61641 0.63429 0.62041 0.54857 0.62950 0.58857 0.62991 "
-"0.81296 0.64286 0.32168 0.65429 0.35429 0.67964 0.76571 0.68535 0.44571 0.72327 "
-"0.67429 0.72816 0.53714 0.74109 0.60000 0.74109 56 2 13 5 0 8 2 11 4 14 "
-"1 8 0 3 11 1 15 23 21 2 10 "
-"13 11 8 1 11 3 4 7 14 4 "
-"10 2 8 14 7 18 17 6 13 6 5 "
-"13 17 15 9 18 12 20 7 12 18 "
-"17 9 6 16 20 12 24 20 16 19 15 "
-"17 15 19 23 23 19 22 27 28 29 "
-"26 20 24 26 24 25 21 28 27 28 21 "
-"23 29 30 31 28 30 29 31 32 37 "
-"39 38 33 34 39 33 32 31 30 37 32 "
-"36 55 49 47 37 36 42 51 42 36 "
-"34 35 39 45 41 38 52 40 43 46 43 "
-"44 50 41 45 56 49 57 40 51 36 "
-"51 40 52 45 38 39 52 43 54 47 41 "
-"53 54 46 48 56 48 49 53 41 50 "
-"54 48 56 54 43 46 57 49 55 55 47 "
-"53 "
-;
-
-char *VTK_VECTOR_TEXT_100 = (char *) "48 0.885714 "
-"0.51429 -0.09009 0.56571 -0.08966 0.62857 -0.07673 0.76571 -0.07186 0.88571 -0.06878 "
-"0.41143 -0.06486 0.67429 -0.05641 0.36000 -0.03669 0.30286 0.01025 0.76000 0.01806 "
-"0.53714 0.02152 0.49714 0.02891 0.60571 0.02891 0.68127 0.07143 0.41714 0.07561 "
-"0.23787 0.10571 0.71579 0.11143 0.38241 0.11714 0.74135 0.16286 0.21395 0.16857 "
-"0.74286 0.16739 0.74538 0.17429 0.34605 0.20286 0.76420 0.27714 0.19277 0.28857 "
-"0.33295 0.28857 0.19277 0.36286 0.76152 0.38571 0.33563 0.39714 0.73355 0.50000 "
-"0.22135 0.51143 0.36784 0.51714 0.69714 0.55841 0.42286 0.58686 0.26857 0.60793 "
-"0.63429 0.60943 0.48571 0.62151 0.56571 0.62950 0.74857 0.64048 0.75269 0.64857 "
-"0.30857 0.65582 0.65714 0.71355 0.40571 0.71756 0.50286 0.74109 0.55429 0.74152 "
-"0.75693 1.02571 0.88571 1.02307 0.88000 1.02723 48 0 11 5 12 6 13 "
-"1 2 12 7 14 8 10 0 1 14 7 "
-"5 10 1 12 6 12 2 0 10 11 "
-"8 17 15 9 16 13 14 5 11 4 9 "
-"3 6 9 13 9 4 18 16 9 18 "
-"15 22 19 17 8 14 22 15 17 20 18 "
-"21 21 18 4 19 25 24 21 4 23 "
-"25 19 22 26 24 25 26 28 30 39 27 "
-"4 26 25 28 39 38 29 29 38 32 "
-"27 39 29 30 31 34 32 38 35 31 30 "
-"28 40 34 31 36 42 33 23 4 27 "
-"35 41 37 33 40 31 40 33 42 41 35 "
-"38 42 36 43 37 43 36 44 37 41 "
-"37 44 43 46 47 45 39 4 45 4 46 "
-"45 "
-;
-
-char *VTK_VECTOR_TEXT_101 = (char *) "65 0.934539 "
-"0.54857 -0.09009 0.61143 -0.09009 0.45714 -0.07462 0.71429 -0.07101 0.40571 -0.05641 "
-"0.77714 -0.04331 0.33714 -0.01543 0.82857 -0.00670 0.29714 0.02154 0.56000 0.02152 "
-"0.60571 0.02193 0.49714 0.03563 0.68159 0.04286 0.88150 0.05429 0.45714 0.05514 "
-"0.26286 0.06636 0.72000 0.06759 0.40457 0.10000 0.91216 0.11143 0.77229 0.13429 "
-"0.37057 0.15143 0.22034 0.15714 0.36613 0.16286 0.92834 0.16286 0.36359 0.16857 "
-"0.91429 0.16966 0.79429 0.18111 0.35177 0.20286 0.20462 0.22571 0.33866 0.28286 "
-"0.34286 0.28900 0.93454 0.29429 0.19848 0.35714 0.93295 0.39714 0.34857 0.40134 "
-"0.78857 0.40134 0.34134 0.40857 0.79580 0.40857 0.20462 0.41429 0.35429 0.47261 "
-"0.22327 0.49429 0.91429 0.48975 0.77143 0.50661 0.38857 0.54057 0.74857 0.54629 "
-"0.40725 0.56286 0.25714 0.57001 0.71429 0.58154 0.87070 0.58571 0.45143 0.59759 "
-"0.68000 0.60498 0.29296 0.62000 0.49143 0.61681 0.63429 0.62252 0.54857 0.62950 "
-"0.59429 0.62991 0.33311 0.66000 0.81143 0.65543 0.77143 0.68607 0.41143 0.70930 "
-"0.72000 0.71355 0.45714 0.72605 0.66857 0.73050 0.54286 0.74152 0.60000 0.74152 65 0 9 11 10 "
-"1 3 10 3 12 5 12 3 17 8 6 10 0 1 0 11 2 4 14 6 0 "
-"10 9 7 16 5 5 16 12 14 2 11 16 7 19 14 4 2 15 8 17 26 "
-"18 25 17 6 14 15 27 21 7 13 19 23 25 18 20 15 17 26 19 18 18 "
-"19 13 24 20 22 15 20 24 15 24 27 21 27 28 28 29 32 33 37 35 29 "
-"28 27 32 29 38 35 34 30 40 39 46 33 35 30 31 33 30 36 38 29 36 "
-"29 34 37 41 42 40 38 36 30 34 29 39 40 36 41 37 33 46 43 51 51 "
-"49 56 42 48 44 48 42 41 44 48 47 49 51 45 43 46 39 56 49 59 50 "
-"62 53 57 47 48 64 55 53 45 51 43 55 63 54 58 47 57 62 50 60 59 "
-"52 61 59 49 52 47 60 50 61 54 63 60 47 58 61 52 54 64 53 62 55 "
-"64 63 "
-;
-
-char *VTK_VECTOR_TEXT_102 = (char *) "24 0.617143 "
-"0.28000 -0.07186 0.40571 -0.07186 0.27472 0.61429 0.41100 0.61429 0.16571 0.61957 "
-"0.56000 0.61957 0.56420 0.71714 0.16571 0.72329 0.27472 0.72857 0.41100 0.72857 "
-"0.56000 0.72329 0.41034 0.83143 0.27580 0.86000 0.43429 0.89555 0.28613 0.91714 "
-"0.46286 0.91294 0.50286 0.92134 0.60000 0.91830 0.31107 0.96857 0.34286 1.00099 "
-"0.38857 1.02784 0.61714 1.03086 0.46286 1.04395 0.52571 1.04437 22 0 3 2 "
-"3 0 1 4 8 7 9 3 5 2 3 "
-"8 5 6 10 4 2 8 9 8 3 "
-"8 11 12 11 8 9 12 11 14 9 5 "
-"10 13 19 18 13 18 14 13 14 11 "
-"23 15 16 15 23 22 21 23 17 15 20 "
-"13 19 13 20 20 15 22 23 16 17 "
-;
-
-char *VTK_VECTOR_TEXT_103 = (char *) "71 0.892518 "
-"0.46857 -0.39295 0.56571 -0.39563 0.66286 -0.37959 0.35429 -0.36200 0.74286 -0.34616 "
-"0.28571 -0.31868 0.80368 -0.30000 0.50857 -0.28437 0.62286 -0.27395 0.44571 -0.27101 "
-"0.23387 -0.24286 0.84657 -0.24286 0.69200 -0.23714 0.38171 -0.23143 0.72150 -0.20286 "
-"0.87177 -0.18000 0.34916 -0.15714 0.74899 -0.14000 0.22286 -0.13957 0.50857 -0.07295 "
-"0.56000 -0.07295 0.43429 -0.05959 0.65143 -0.05070 0.37143 -0.03355 0.69714 -0.02527 "
-"0.89252 -0.00857 0.74857 0.01873 0.75042 0.02000 0.75756 0.02000 0.75429 0.02333 "
-"0.29143 0.03381 0.53143 0.03866 0.57143 0.03907 0.47429 0.05216 0.64000 0.05787 "
-"0.41714 0.08704 0.68000 0.08439 0.23216 0.12857 0.38036 0.12857 0.72784 0.14000 "
-"0.35277 0.18571 0.20530 0.20857 0.75538 0.20857 0.19320 0.28286 0.33295 0.29429 "
-"0.76991 0.35714 0.19277 0.37429 0.33563 0.40857 0.75109 0.47143 0.35109 0.47714 "
-"0.21143 0.47832 0.72784 0.52286 0.23787 0.55143 0.39044 0.55143 0.69868 0.56286 "
-"0.66286 0.59393 0.27107 0.60857 0.45143 0.60498 0.48571 0.62041 0.56571 0.62991 "
-"0.57714 0.62764 0.58286 0.62723 0.76571 0.63477 0.32000 0.66384 0.68571 0.70213 "
-"0.39429 0.71229 0.77408 0.72286 0.88878 0.72286 0.62857 0.72816 0.46857 0.73580 "
-"0.56000 0.74152 71 1 7 0 8 4 12 2 8 1 0 "
-"9 3 7 1 8 5 13 10 9 0 7 13 5 3 8 2 4 6 14 12 6 "
-"12 4 11 15 17 11 14 6 13 3 9 14 11 17 10 16 18 16 10 13 17 "
-"25 28 23 21 33 22 32 20 32 19 20 35 23 33 19 31 21 23 35 30 31 "
-"19 32 32 22 34 26 29 36 17 15 25 33 21 31 26 36 24 24 34 22 26 "
-"27 29 36 34 24 36 29 39 30 38 37 39 28 25 39 29 28 37 40 41 38 "
-"40 37 30 35 38 39 25 42 44 46 43 44 43 41 44 41 40 42 25 45 67 "
-"51 48 46 47 50 67 48 45 47 46 44 50 49 52 49 50 47 67 62 51 62 "
-"54 51 56 52 49 54 62 55 55 64 61 60 61 59 53 56 49 56 53 63 63 "
-"57 65 65 58 69 65 57 58 70 59 61 59 69 58 64 55 62 67 45 25 67 "
-"66 62 63 53 57 68 70 61 59 70 69 64 68 61 "
-;
-
-char *VTK_VECTOR_TEXT_104 = (char *) "27 0.889502 "
-"0.24571 -0.07186 0.37143 -0.07186 0.76000 -0.07186 0.88571 -0.07186 0.37605 0.40286 "
-"0.37756 0.40857 0.75538 0.46000 0.88950 0.47714 0.38899 0.48286 0.74538 0.51714 "
-"0.88152 0.54571 0.42439 0.55143 0.72000 0.56914 0.47429 0.59355 0.68000 0.60331 "
-"0.85996 0.61429 0.53143 0.61748 0.61143 0.62379 0.37714 0.63983 0.81714 0.67296 "
-"0.45714 0.70045 0.77714 0.70213 0.50857 0.72437 0.68571 0.73538 0.58857 0.74152 "
-"0.24571 1.02615 0.37143 1.02615 25 0 "
-"4 25 4 18 25 6 2 3 9 6 7 7 6 3 18 8 11 18 11 13 9 "
-"15 12 12 19 14 10 9 7 18 13 20 8 4 5 15 9 10 4 0 1 18 "
-"4 8 17 24 16 19 21 14 14 23 17 20 16 22 16 20 13 19 12 15 17 "
-"23 24 23 14 21 24 22 16 18 26 25 "
-;
-
-char *VTK_VECTOR_TEXT_105 = (char *) "8 0.377143 "
-"0.25143 -0.07186 0.37714 -0.07186 0.25143 0.72329 0.37714 0.72329 0.25143 0.87403 "
-"0.37714 0.87403 0.25143 1.02615 0.37714 1.02615 4 3 2 0 3 0 "
-"1 4 5 6 7 6 5 "
-;
-
-char *VTK_VECTOR_TEXT_106 = (char *) "18 0.375625 "
-"0.14857 -0.39563 0.22286 -0.39252 0.07383 -0.38000 0.26857 -0.37914 0.31429 -0.34989 "
-"0.34036 -0.31714 0.18857 -0.27462 0.10286 -0.26950 0.36109 -0.26571 0.22331 -0.24857 "
-"0.37563 -0.16857 0.24152 -0.16286 0.24571 0.72329 0.37143 0.72329 0.24571 0.87403 "
-"0.37143 0.87403 0.24571 1.02615 0.37143 1.02615 14 1 6 0 3 6 1 4 6 "
-"3 9 10 11 7 0 6 7 2 0 "
-"9 5 8 5 9 4 6 4 9 9 8 "
-"10 11 10 12 13 12 10 14 15 16 "
-"17 16 15 "
-;
-
-char *VTK_VECTOR_TEXT_107 = (char *) "15 0.897876 "
-"0.37450 -0.07143 0.89788 -0.07143 0.24571 -0.06878 0.73714 -0.07035 0.38004 0.24286 "
-"0.68421 0.25429 0.68045 0.26000 0.68000 0.26064 0.46857 0.32924 0.38286 0.40888 "
-"0.57152 0.42571 0.69714 0.72283 0.86359 0.72286 0.24836 1.02571 0.37714 1.02307 13 2 9 13 4 2 0 5 8 3 5 "
-"3 1 5 6 7 9 14 13 11 9 10 5 7 8 7 10 8 8 9 4 12 "
-"11 10 9 8 10 2 4 9 "
-;
-
-char *VTK_VECTOR_TEXT_108 = (char *) "4 0.371429 "
-"0.36878 -0.07143 0.24000 -0.06878 0.24265 1.02571 0.37143 1.02307 2 1 3 2 3 1 0 "
-;
-
-char *VTK_VECTOR_TEXT_109 = (char *) "45 1.318074 "
-"0.24571 -0.07186 0.37143 -0.07186 0.72000 -0.07295 1.18857 -0.07186 1.31429 -0.07186 "
-"0.71429 -0.06878 0.84571 -0.06878 0.37866 0.37429 0.84723 0.40286 0.85335 0.46000 "
-"0.39109 0.48286 0.71277 0.48286 1.18437 0.48286 1.31807 0.52286 0.87787 0.53429 "
-"0.41143 0.53493 1.17395 0.54000 0.43582 0.56857 0.68784 0.56857 1.14857 0.58403 "
-"0.93143 0.59188 0.66286 0.59829 0.82857 0.60801 0.51009 0.61429 0.36571 0.61924 "
-"0.63429 0.61470 1.09714 0.61580 1.29355 0.62000 0.56000 0.62420 1.00571 0.62152 "
-"1.06286 0.62379 0.41311 0.67143 0.78857 0.66975 1.25561 0.67714 0.90857 0.68902 "
-"0.74286 0.70784 1.20571 0.71355 0.35735 0.72286 0.24571 0.72329 0.50286 0.72498 "
-"0.99429 0.73109 1.16000 0.73109 0.67429 0.73470 0.57714 0.74109 1.05143 0.74152 43 6 5 2 0 7 38 8 11 5 7 0 1 8 5 6 12 3 4 12 "
-"13 16 9 11 8 15 17 24 11 22 18 22 20 34 11 9 22 14 22 9 13 "
-"12 4 24 17 31 7 10 38 10 15 24 16 27 19 32 21 18 24 37 38 20 "
-"22 14 10 24 38 27 16 13 31 23 39 26 41 30 30 40 29 32 18 22 41 "
-"19 36 34 29 40 19 41 26 36 19 33 23 31 17 35 21 32 29 34 20 39 "
-"28 43 33 19 27 43 28 42 25 42 28 28 39 23 42 25 21 42 21 35 44 "
-"30 41 30 44 40 "
-;
-
-char *VTK_VECTOR_TEXT_110 = (char *) "38 0.889911 "
-"0.24571 -0.07186 0.37143 -0.07186 0.75429 -0.07186 0.88571 -0.07186 0.24152 -0.06571 "
-"0.37563 -0.06571 0.75009 -0.06571 0.88991 -0.06571 0.37605 0.40286 0.37866 0.41429 "
-"0.38134 0.44857 0.74665 0.48286 0.88950 0.48286 0.39849 0.51143 0.73229 0.54000 "
-"0.88420 0.54000 0.43011 0.56286 0.46286 0.58893 0.69714 0.58725 0.87008 0.59143 "
-"0.51580 0.61429 0.65143 0.61343 0.36571 0.62031 0.56571 0.62420 0.60571 0.62379 "
-"0.61714 0.62152 0.62286 0.62109 0.83955 0.64857 0.40725 0.66571 0.79429 0.69179 "
-"0.45714 0.70213 0.24152 0.71714 0.75429 0.71355 0.35735 0.72286 0.24571 0.72329 "
-"0.52571 0.73050 0.68571 0.73538 0.58857 0.74152 36 1 4 0 "
-"3 6 2 1 5 4 3 7 6 6 12 "
-"11 11 15 14 6 7 12 22 16 28 "
-"10 8 9 13 22 10 10 22 8 8 4 "
-"5 15 11 12 8 22 4 14 15 19 "
-"14 19 18 25 26 24 16 22 13 16 17 "
-"28 30 28 17 27 18 19 32 23 24 "
-"29 18 27 30 20 35 18 32 21 31 4 "
-"22 20 30 17 32 26 21 32 24 26 "
-"32 18 29 34 31 33 33 31 22 35 23 "
-"37 23 35 20 36 23 32 37 23 36 "
-;
-
-char *VTK_VECTOR_TEXT_111 = (char *) "65 0.938661 "
-"0.53143 -0.08966 0.59429 -0.09009 0.69143 -0.07101 0.41143 -0.06213 0.76571 -0.03759 "
-"0.34857 -0.02821 0.81714 -0.00099 0.29143 0.02154 0.54286 0.02193 0.60571 0.02420 "
-"0.50857 0.02823 0.64571 0.03563 0.86331 0.04857 0.45143 0.05216 0.25714 0.06636 "
-"0.70857 0.07330 0.89229 0.09429 0.40000 0.09597 0.22771 0.12286 0.38036 0.12286 "
-"0.37714 0.12793 0.37669 0.12857 0.75473 0.12857 0.76657 0.15143 0.77101 0.16286 "
-"0.77355 0.16857 0.92319 0.18000 0.20764 0.18571 0.34816 0.19714 0.78605 0.20857 "
-"0.33563 0.26000 0.19320 0.28286 0.93823 0.28857 0.79848 0.29429 0.33295 0.36286 "
-"0.93866 0.37429 0.19580 0.39714 0.79538 0.39714 0.35277 0.47143 0.92319 0.47143 "
-"0.21184 0.48286 0.77143 0.48947 0.23216 0.54000 0.38742 0.54000 0.89927 0.54000 "
-"0.74286 0.54057 0.71429 0.57275 0.42286 0.57813 0.87678 0.58000 0.27429 0.60984 "
-"0.48571 0.61580 0.64571 0.61580 0.54286 0.62950 0.58857 0.62950 0.60000 0.62723 "
-"0.60571 0.62680 0.83225 0.63714 0.31025 0.64857 0.34857 0.67864 0.75429 0.69641 "
-"0.40000 0.70784 0.45143 0.72605 0.68571 0.72538 0.53714 0.74152 0.60000 0.74109 65 11 4 15 8 "
-"0 1 17 7 5 11 2 4 2 9 1 8 1 9 0 8 10 0 10 3 2 "
-"11 9 3 13 5 10 13 3 6 12 22 6 15 4 15 6 22 18 28 27 17 "
-"5 13 14 19 18 16 23 22 19 7 17 7 19 14 18 19 21 24 23 25 25 "
-"23 16 19 20 21 16 22 12 26 29 25 27 30 31 26 25 16 28 18 21 29 "
-"26 33 30 27 28 31 34 36 33 32 35 26 32 33 34 31 30 33 35 37 40 "
-"36 34 37 39 41 40 38 42 39 37 35 47 57 43 38 40 34 43 49 42 46 "
-"45 56 39 44 41 41 48 45 43 57 49 41 44 48 43 42 38 57 47 58 54 "
-"55 53 56 45 48 50 60 47 64 63 53 64 55 62 53 63 52 59 62 51 61 "
-"60 50 64 53 55 51 62 55 52 61 50 59 46 56 61 52 63 46 59 51 58 "
-"47 60 "
-;
-
-char *VTK_VECTOR_TEXT_112 = (char *) "49 0.935625 "
-"0.24571 -0.37740 0.37454 -0.37429 0.56000 -0.08966 0.66857 -0.07966 0.47429 -0.06657 "
-"0.75429 -0.04331 0.37584 -0.00286 0.80571 -0.00704 0.38286 0.00159 0.59429 0.02152 "
-"0.52000 0.02891 0.63429 0.02992 0.85964 0.05429 0.45143 0.06725 0.70857 0.07330 "
-"0.39787 0.13429 0.39514 0.14000 0.39216 0.14571 0.76213 0.14571 0.90538 0.14571 "
-"0.37462 0.19714 0.78327 0.20857 0.92680 0.22571 0.36379 0.27143 0.36152 0.28286 "
-"0.79580 0.29429 0.93563 0.30000 0.36379 0.36857 0.79580 0.36857 0.92680 0.43714 "
-"0.78286 0.45547 0.38286 0.47232 0.75429 0.52921 0.41714 0.54057 0.88571 0.56444 "
-"0.44571 0.57582 0.69143 0.59964 0.51429 0.62213 0.65143 0.62213 0.36571 0.63051 "
-"0.56571 0.63563 0.82704 0.64857 0.45714 0.70784 0.74857 0.70657 0.24571 0.72329 "
-"0.36000 0.72329 0.51429 0.73177 0.69143 0.72899 0.62286 0.74152 49 0 1 6 0 24 44 3 9 2 2 10 4 3 11 9 4 "
-"13 8 10 2 9 11 5 14 11 3 5 7 14 5 4 10 13 14 12 18 14 "
-"7 12 0 20 24 15 8 13 8 15 6 19 18 12 18 19 21 21 22 25 24 "
-"27 44 17 15 16 22 21 19 28 25 26 22 26 25 6 15 17 29 30 28 23 "
-"24 20 20 6 17 29 28 26 30 34 32 27 31 44 0 6 20 31 39 44 32 "
-"41 36 41 32 34 31 33 39 42 37 46 39 35 42 34 30 29 39 33 35 38 "
-"47 40 35 37 42 47 38 43 40 46 37 43 36 41 39 45 44 46 40 48 48 "
-"40 47 38 36 43 "
-;
-
-char *VTK_VECTOR_TEXT_113 = (char *) "52 0.885714 "
-"0.76000 -0.37740 0.88571 -0.37740 0.56571 -0.09009 0.45143 -0.07673 0.65143 -0.06784 "
-"0.36000 -0.03188 0.70857 -0.03465 0.75580 -0.00286 0.74857 0.00454 0.29714 0.02418 "
-"0.54286 0.02152 0.57714 0.02193 0.58857 0.02420 0.59429 0.02462 0.47429 0.03927 "
-"0.64571 0.04371 0.43302 0.06571 0.70670 0.09429 0.23914 0.11143 0.38607 0.11714 "
-"0.38286 0.12221 0.38241 0.12286 0.75008 0.17429 0.21101 0.19143 0.34748 0.20857 "
-"0.76723 0.25429 0.19848 0.26000 0.76723 0.27143 0.33605 0.28286 0.76991 0.28857 "
-"0.19580 0.37429 0.33866 0.40286 0.75429 0.45277 0.21101 0.47143 0.35429 0.47832 "
-"0.73143 0.51301 0.39846 0.56286 0.69296 0.56857 0.25669 0.58571 0.45143 0.60902 "
-"0.61714 0.62213 0.49143 0.62723 0.76571 0.62602 0.29330 0.63714 0.56571 0.63522 "
-"0.72403 0.67143 0.36571 0.69641 0.66286 0.71355 0.77408 0.72286 0.88571 0.72329 "
-"0.44571 0.72966 0.56000 0.74152 52 29 27 25 "
-"49 42 32 22 7 25 3 13 11 2 13 "
-"3 4 13 2 6 15 4 11 13 12 "
-"3 14 5 13 4 15 10 3 11 15 6 "
-"8 14 3 10 15 8 17 24 23 18 "
-"5 16 9 17 8 22 14 16 5 9 19 "
-"18 19 20 21 18 19 21 42 35 32 "
-"7 22 8 16 19 9 49 48 42 7 0 "
-"1 24 18 21 23 24 26 26 28 30 "
-"28 26 24 30 31 33 34 33 31 31 30 "
-"28 33 34 38 49 29 25 36 43 38 "
-"49 25 7 35 42 37 37 45 40 45 37 "
-"42 29 49 32 45 47 40 39 43 36 "
-"46 39 50 40 47 44 43 39 46 36 38 "
-"34 41 44 51 41 50 39 49 7 1 "
-"50 41 51 51 44 47 "
-;
-
-char *VTK_VECTOR_TEXT_114 = (char *) "24 0.667686 "
-"0.24571 -0.07186 0.37143 -0.07186 0.24152 -0.06571 0.37563 -0.06571 0.37563 0.38000 "
-"0.39748 0.50000 0.41964 0.54571 0.44740 0.57429 0.61714 0.57787 0.62286 0.57880 "
-"0.48000 0.59294 0.57714 0.59395 0.51429 0.60134 0.36571 0.61385 0.41868 0.68857 "
-"0.66769 0.69429 0.66542 0.70000 0.24152 0.71714 0.35735 0.72286 0.24571 0.72329 "
-"0.46286 0.72436 0.60000 0.73109 0.51429 0.74109 0.55429 0.74109 22 1 2 0 "
-"1 3 2 4 2 3 5 6 13 5 13 "
-"17 21 11 15 2 4 17 4 5 17 "
-"6 7 13 18 17 13 7 10 14 13 7 "
-"14 14 12 20 11 21 12 9 15 11 "
-"12 14 10 19 17 18 20 12 22 8 9 "
-"11 21 15 16 22 12 23 23 12 21 "
-;
-
-char *VTK_VECTOR_TEXT_115 = (char *) "63 0.849502 "
-"0.56000 -0.09009 0.46286 -0.08705 0.65143 -0.07395 0.37143 -0.06723 0.70444 -0.05429 "
-"0.33143 -0.04943 0.76057 -0.02000 0.28571 -0.01813 0.79582 0.01429 0.50286 0.02152 "
-"0.55429 0.02152 0.56571 0.02379 0.57714 0.02420 0.24571 0.02636 0.64000 0.04200 "
-"0.41714 0.04371 0.22200 0.06571 0.38286 0.06725 0.68384 0.07714 0.83580 0.08286 "
-"0.69927 0.10000 0.34200 0.12286 0.84950 0.14000 0.71009 0.15714 0.19109 0.16286 "
-"0.19370 0.16857 0.32000 0.18615 0.69864 0.19143 0.84723 0.20286 0.65714 0.22784 "
-"0.83641 0.24286 0.80956 0.28857 0.34286 0.32371 0.75429 0.33641 0.30286 0.34421 "
-"0.69143 0.36327 0.25714 0.38445 0.22645 0.43714 0.41143 0.44538 0.37587 0.46571 "
-"0.35885 0.48286 0.21295 0.49429 0.69143 0.50460 0.34478 0.51714 0.81977 0.52286 "
-"0.67514 0.55143 0.35216 0.56286 0.22034 0.56857 0.64000 0.59465 0.38286 0.59829 "
-"0.79429 0.61016 0.24000 0.61573 0.42857 0.62041 0.58286 0.62252 0.48571 0.62991 "
-"0.74689 0.67143 0.28571 0.67258 0.70286 0.70045 0.33714 0.70613 0.38857 0.72538 "
-"0.61714 0.73050 0.47429 0.74109 0.54286 0.74109 61 2 12 0 10 1 12 12 2 14 14 4 6 7 17 13 0 "
-"12 1 4 14 2 11 10 12 15 3 1 3 15 5 9 1 10 14 6 18 15 "
-"1 9 17 5 15 6 8 18 5 17 7 21 16 13 16 21 24 18 8 20 23 "
-"28 27 21 13 17 19 22 23 26 25 21 21 25 24 20 19 23 19 20 8 28 "
-"23 22 27 33 29 28 30 27 31 27 30 27 31 33 29 38 32 35 29 33 29 "
-"35 38 34 38 36 32 38 34 36 40 37 39 36 38 41 43 47 43 41 37 36 "
-"39 40 50 45 42 43 37 40 47 46 51 46 47 43 53 60 54 45 57 48 52 "
-"58 49 45 55 57 51 49 56 49 51 46 50 42 44 48 57 53 56 49 58 55 "
-"45 50 52 59 58 59 52 61 52 54 61 60 53 57 61 54 62 62 54 60 "
-;
-
-char *VTK_VECTOR_TEXT_116 = (char *) "24 0.551972 "
-"0.42286 -0.08395 0.48000 -0.08437 0.55197 -0.07143 0.33714 -0.05914 0.29901 -0.02571 "
-"0.28041 0.00857 0.44571 0.04816 0.44453 0.04857 0.53714 0.04344 0.44000 0.05008 "
-"0.41057 0.07714 0.26748 0.10000 0.40152 0.11714 0.26597 0.61429 0.40260 0.61429 "
-"0.17143 0.61957 0.53450 0.62000 0.53866 0.71714 0.53450 0.72286 0.17143 0.72329 "
-"0.26597 0.72857 0.40260 0.72857 0.26748 0.91714 0.40000 0.99545 22 10 5 4 "
-"6 7 9 10 4 3 10 3 9 8 6 "
-"1 6 9 1 5 10 11 8 1 2 "
-"0 9 3 11 12 13 0 1 9 10 12 "
-"11 17 18 16 14 13 12 21 14 16 "
-"18 21 16 22 20 23 20 13 14 15 20 "
-"19 15 13 20 20 14 21 23 20 21 "
-;
-
-char *VTK_VECTOR_TEXT_117 = (char *) "38 0.884197 "
-"0.48571 -0.09009 0.53714 -0.09009 0.41714 -0.07673 0.77143 -0.07295 0.88000 -0.07186 "
-"0.63518 -0.06571 0.76571 -0.06878 0.88420 -0.06571 0.34857 -0.04771 0.70857 -0.01846 "
-"0.29901 -0.00857 0.27429 0.02730 0.52000 0.02723 0.56000 0.02764 0.47339 0.03714 "
-"0.76000 0.03684 0.61714 0.04135 0.43943 0.05429 0.65143 0.05787 0.41330 0.07714 "
-"0.25143 0.08437 0.69143 0.08704 0.39343 0.10571 0.38899 0.11714 0.71473 0.11714 "
-"0.38645 0.12286 0.73294 0.15714 0.23848 0.17429 0.37563 0.17429 0.75009 0.26000 "
-"0.23848 0.71714 0.37295 0.71714 0.75009 0.71714 0.88420 0.71714 0.24265 0.72286 "
-"0.36878 0.72286 0.75429 0.72329 0.88000 0.72329 36 6 3 15 "
-"3 7 15 3 4 7 8 17 10 2 14 "
-"17 2 17 8 5 13 1 19 11 10 "
-"9 16 5 12 1 13 0 12 2 12 0 "
-"1 9 18 16 13 5 16 14 2 12 "
-"11 22 20 21 18 9 15 21 9 21 15 "
-"24 20 28 27 11 19 22 24 7 26 "
-"19 10 17 24 15 7 25 22 23 20 22 "
-"25 20 25 28 26 7 29 31 30 27 "
-"33 29 7 34 31 35 34 30 31 31 27 "
-"28 36 33 37 32 29 33 36 32 33 "
-;
-
-char *VTK_VECTOR_TEXT_118 = (char *) "12 0.884203 "
-"0.45714 -0.06947 0.58857 -0.07103 0.52000 0.09808 0.52571 0.09808 0.47580 0.23714 "
-"0.16151 0.71714 0.88420 0.71714 0.16427 0.72286 0.30286 0.71951 0.74857 0.72090 "
-"0.88145 0.72286 0.29714 0.72395 10 4 0 "
-"2 0 4 5 3 2 0 1 3 0 "
-"3 6 9 8 11 5 9 6 10 7 5 "
-"11 8 5 4 3 1 6 "
-;
-
-char *VTK_VECTOR_TEXT_119 = (char *) "14 1.231638 "
-"0.39429 -0.07215 0.52571 -0.07215 0.97714 -0.07252 0.84571 -0.06947 0.45714 0.10650 "
-"0.46286 0.10650 0.92000 0.12073 0.69143 0.52785 0.15122 0.72286 0.28571 0.72090 "
-"0.62857 0.72243 0.76193 0.72286 1.23164 0.72286 1.10857 0.72329 12 "
-"2 6 3 0 4 8 3 6 7 5 0 "
-"1 12 13 6 5 4 0 7 10 5 "
-"11 10 7 7 5 1 11 7 6 4 9 "
-"8 12 6 2 "
-;
-
-char *VTK_VECTOR_TEXT_120 = (char *) "17 0.882498 "
-"0.15697 -0.07143 0.88073 -0.07143 0.15473 -0.06571 0.31429 -0.07035 0.72571 -0.07140 "
-"0.88250 -0.06571 0.52000 0.22529 0.52571 0.22529 0.60332 0.33429 0.43534 0.34000 "
-"0.51429 0.45005 0.17188 0.71714 0.86812 0.71714 0.17412 0.72286 0.86588 0.72286 "
-"0.32571 0.72395 0.71429 0.72395 15 1 5 4 2 6 9 8 6 7 3 2 0 4 8 7 6 2 3 4 "
-"5 8 8 10 6 10 9 6 15 11 9 16 10 8 15 9 10 12 16 8 13 "
-"11 15 16 12 14 "
-;
-
-char *VTK_VECTOR_TEXT_121 = (char *) "16 0.888063 "
-"0.34286 -0.39563 0.24000 -0.38043 0.41714 -0.37641 0.45714 -0.34956 0.50436 -0.29429 "
-"0.32000 -0.26680 0.22286 -0.25766 0.36652 -0.25429 0.54371 -0.22000 0.41293 -0.21429 "
-"0.46848 -0.07714 0.53714 0.09292 0.16998 0.72286 0.30857 0.71999 0.76000 0.72246 "
-"0.88806 0.72286 14 2 7 0 0 5 1 5 0 7 "
-"6 1 5 3 7 2 7 3 9 3 4 "
-"9 9 8 10 9 4 8 10 11 12 "
-"11 15 14 11 8 15 11 10 8 11 13 "
-"12 "
-;
-
-char *VTK_VECTOR_TEXT_122 = (char *) "17 0.872768 "
-"0.17714 -0.07295 0.86857 -0.07186 0.17143 -0.06878 0.87277 -0.06571 0.17146 0.03714 "
-"0.34212 0.03714 0.87277 0.03714 0.34132 0.04286 0.44000 0.04327 0.86857 0.04329 "
-"0.20571 0.61689 0.67062 0.62000 0.84991 0.64286 0.20152 0.71714 0.84991 0.71714 "
-"0.20571 0.72329 0.84571 0.72329 15 2 0 4 0 1 9 0 5 4 1 3 9 5 0 8 5 7 4 0 "
-"9 8 3 6 9 12 14 11 11 14 16 11 16 10 12 11 7 11 4 7 10 "
-"15 13 15 10 16 "
-;
-
-char *VTK_VECTOR_TEXT_123 = (char *) "39 0.611429 "
-"0.61143 -0.39454 0.46857 -0.38420 0.40000 -0.34154 0.61143 -0.27975 0.35748 -0.27143 "
-"0.52000 -0.26992 0.47787 -0.23143 0.46748 -0.19143 0.34134 -0.18000 0.46395 0.04286 "
-"0.33563 0.05429 0.45184 0.14571 0.32109 0.16286 0.29143 0.21832 0.42286 0.22716 "
-"0.25143 0.24943 0.18857 0.26528 0.39429 0.26698 0.31413 0.32286 0.18857 0.38615 "
-"0.25143 0.40073 0.41188 0.40286 0.29143 0.42775 0.43514 0.44286 0.32823 0.49429 "
-"0.45866 0.52286 0.34134 0.60286 0.46705 0.80857 0.34478 0.84857 0.47748 0.87143 "
-"0.35748 0.91143 0.50286 0.90821 0.50793 0.91143 0.50857 0.91188 0.61143 0.92814 "
-"0.40571 0.99511 0.46857 1.03294 0.53143 1.04437 0.61143 1.04329 37 0 3 5 6 2 5 2 6 4 0 5 1 2 "
-"1 5 4 7 8 7 4 6 8 9 10 10 11 12 9 8 7 11 10 9 12 "
-"17 13 12 14 17 14 12 11 18 15 13 16 15 20 18 13 17 16 20 19 15 "
-"18 20 21 22 18 22 21 24 22 20 18 24 25 26 23 24 21 25 24 23 26 "
-"27 28 27 26 25 28 29 30 29 28 27 30 29 35 31 32 33 36 31 33 31 "
-"36 29 36 33 37 34 38 37 35 29 36 34 37 33 "
-;
-
-char *VTK_VECTOR_TEXT_124 = (char *) "4 0.388571 "
-"0.28571 -0.39454 0.38857 -0.39563 0.28571 1.04329 0.38857 1.04437 2 3 2 0 3 0 1 "
-;
-
-char *VTK_VECTOR_TEXT_125 = (char *) "35 0.606299 "
-"0.17714 -0.39454 0.31429 -0.38613 0.39429 -0.33832 0.17714 -0.27975 0.27429 -0.26784 "
-"0.43681 -0.26000 0.31070 -0.23714 0.44950 -0.19714 0.32723 -0.15714 0.45295 0.04857 "
-"0.33295 0.11714 0.46857 0.16404 0.35387 0.19714 0.51429 0.23258 0.56000 0.25681 "
-"0.39429 0.26403 0.60630 0.26571 0.47702 0.32857 0.41714 0.36742 0.60571 0.38615 "
-"0.54857 0.39927 0.50171 0.43143 0.36086 0.43714 0.46748 0.50000 0.32991 0.56857 "
-"0.45252 0.78571 0.32723 0.80286 0.31748 0.87143 0.29143 0.90893 0.43470 0.91714 "
-"0.17714 0.92814 0.41629 0.95714 0.36571 1.01107 0.32000 1.03294 0.17714 1.04329 33 4 3 0 2 4 1 6 7 8 1 4 0 2 6 4 5 "
-"6 2 6 5 7 8 9 10 9 8 7 10 11 12 15 13 17 11 10 9 12 "
-"11 15 13 14 17 13 15 11 20 17 14 20 14 16 19 20 16 21 17 20 17 "
-"21 18 22 23 24 22 18 21 23 22 21 25 26 24 25 24 23 29 27 26 29 "
-"26 25 27 31 28 31 27 29 32 28 31 28 33 30 33 34 30 33 28 32 "
-;
-
-char *VTK_VECTOR_TEXT_126 = (char *) "25 0.971429 "
-"0.73714 0.34462 0.20759 0.35143 0.21143 0.34662 0.81143 0.34723 0.66857 0.35756 "
-"0.86857 0.36135 0.25143 0.38115 0.90857 0.38086 0.52000 0.41580 0.32571 0.42723 "
-"0.97140 0.43143 0.37143 0.43866 0.42286 0.44093 0.79429 0.49009 0.21028 0.50000 "
-"0.72571 0.49681 0.86286 0.50930 0.25714 0.54115 0.92571 0.54759 0.32571 0.57470 "
-"0.50286 0.57621 0.96571 0.58154 0.97143 0.58073 0.38857 0.58680 0.44000 0.58723 23 1 17 14 8 4 15 13 5 7 6 1 2 5 "
-"13 3 1 6 17 3 13 0 16 10 18 15 4 0 13 7 16 15 0 13 8 "
-"20 12 12 20 11 9 17 6 10 16 7 17 9 19 22 21 18 11 20 24 11 "
-"19 9 20 8 15 11 24 23 22 18 10 11 23 19 "
-;
-
-
-/*! Construct object with no string set and backing enabled.*/
-VTKViewer_VectorText::VTKViewer_VectorText()
-{
- this->Text = NULL;
-
- this->Letters[33] = VTK_VECTOR_TEXT_33;
- this->Letters[34] = VTK_VECTOR_TEXT_34;
- this->Letters[35] = VTK_VECTOR_TEXT_35;
- this->Letters[36] = VTK_VECTOR_TEXT_36;
- this->Letters[37] = VTK_VECTOR_TEXT_37;
- this->Letters[38] = VTK_VECTOR_TEXT_38;
- this->Letters[39] = VTK_VECTOR_TEXT_39;
- this->Letters[40] = VTK_VECTOR_TEXT_40;
- this->Letters[41] = VTK_VECTOR_TEXT_41;
- this->Letters[42] = VTK_VECTOR_TEXT_42;
- this->Letters[43] = VTK_VECTOR_TEXT_43;
- this->Letters[44] = VTK_VECTOR_TEXT_44;
- this->Letters[45] = VTK_VECTOR_TEXT_45;
- this->Letters[46] = VTK_VECTOR_TEXT_46;
- this->Letters[47] = VTK_VECTOR_TEXT_47;
- this->Letters[48] = VTK_VECTOR_TEXT_48;
- this->Letters[49] = VTK_VECTOR_TEXT_49;
- this->Letters[50] = VTK_VECTOR_TEXT_50;
- this->Letters[51] = VTK_VECTOR_TEXT_51;
- this->Letters[52] = VTK_VECTOR_TEXT_52;
- this->Letters[53] = VTK_VECTOR_TEXT_53;
- this->Letters[54] = VTK_VECTOR_TEXT_54;
- this->Letters[55] = VTK_VECTOR_TEXT_55;
- this->Letters[56] = VTK_VECTOR_TEXT_56;
- this->Letters[57] = VTK_VECTOR_TEXT_57;
- this->Letters[58] = VTK_VECTOR_TEXT_58;
- this->Letters[59] = VTK_VECTOR_TEXT_59;
- this->Letters[60] = VTK_VECTOR_TEXT_60;
- this->Letters[61] = VTK_VECTOR_TEXT_61;
- this->Letters[62] = VTK_VECTOR_TEXT_62;
- this->Letters[63] = VTK_VECTOR_TEXT_63;
- this->Letters[64] = VTK_VECTOR_TEXT_64;
- this->Letters[65] = VTK_VECTOR_TEXT_65;
- this->Letters[66] = VTK_VECTOR_TEXT_66;
- this->Letters[67] = VTK_VECTOR_TEXT_67;
- this->Letters[68] = VTK_VECTOR_TEXT_68;
- this->Letters[69] = VTK_VECTOR_TEXT_69;
- this->Letters[70] = VTK_VECTOR_TEXT_70;
- this->Letters[71] = VTK_VECTOR_TEXT_71;
- this->Letters[72] = VTK_VECTOR_TEXT_72;
- this->Letters[73] = VTK_VECTOR_TEXT_73;
- this->Letters[74] = VTK_VECTOR_TEXT_74;
- this->Letters[75] = VTK_VECTOR_TEXT_75;
- this->Letters[76] = VTK_VECTOR_TEXT_76;
- this->Letters[77] = VTK_VECTOR_TEXT_77;
- this->Letters[78] = VTK_VECTOR_TEXT_78;
- this->Letters[79] = VTK_VECTOR_TEXT_79;
- this->Letters[80] = VTK_VECTOR_TEXT_80;
- this->Letters[81] = VTK_VECTOR_TEXT_81;
- this->Letters[82] = VTK_VECTOR_TEXT_82;
- this->Letters[83] = VTK_VECTOR_TEXT_83;
- this->Letters[84] = VTK_VECTOR_TEXT_84;
- this->Letters[85] = VTK_VECTOR_TEXT_85;
- this->Letters[86] = VTK_VECTOR_TEXT_86;
- this->Letters[87] = VTK_VECTOR_TEXT_87;
- this->Letters[88] = VTK_VECTOR_TEXT_88;
- this->Letters[89] = VTK_VECTOR_TEXT_89;
- this->Letters[90] = VTK_VECTOR_TEXT_90;
- this->Letters[91] = VTK_VECTOR_TEXT_91;
- this->Letters[92] = VTK_VECTOR_TEXT_92;
- this->Letters[93] = VTK_VECTOR_TEXT_93;
- this->Letters[94] = VTK_VECTOR_TEXT_94;
- this->Letters[95] = VTK_VECTOR_TEXT_95;
- this->Letters[96] = VTK_VECTOR_TEXT_96;
- this->Letters[97] = VTK_VECTOR_TEXT_97;
- this->Letters[98] = VTK_VECTOR_TEXT_98;
- this->Letters[99] = VTK_VECTOR_TEXT_99;
- this->Letters[100] = VTK_VECTOR_TEXT_100;
- this->Letters[101] = VTK_VECTOR_TEXT_101;
- this->Letters[102] = VTK_VECTOR_TEXT_102;
- this->Letters[103] = VTK_VECTOR_TEXT_103;
- this->Letters[104] = VTK_VECTOR_TEXT_104;
- this->Letters[105] = VTK_VECTOR_TEXT_105;
- this->Letters[106] = VTK_VECTOR_TEXT_106;
- this->Letters[107] = VTK_VECTOR_TEXT_107;
- this->Letters[108] = VTK_VECTOR_TEXT_108;
- this->Letters[109] = VTK_VECTOR_TEXT_109;
- this->Letters[110] = VTK_VECTOR_TEXT_110;
- this->Letters[111] = VTK_VECTOR_TEXT_111;
- this->Letters[112] = VTK_VECTOR_TEXT_112;
- this->Letters[113] = VTK_VECTOR_TEXT_113;
- this->Letters[114] = VTK_VECTOR_TEXT_114;
- this->Letters[115] = VTK_VECTOR_TEXT_115;
- this->Letters[116] = VTK_VECTOR_TEXT_116;
- this->Letters[117] = VTK_VECTOR_TEXT_117;
- this->Letters[118] = VTK_VECTOR_TEXT_118;
- this->Letters[119] = VTK_VECTOR_TEXT_119;
- this->Letters[120] = VTK_VECTOR_TEXT_120;
- this->Letters[121] = VTK_VECTOR_TEXT_121;
- this->Letters[122] = VTK_VECTOR_TEXT_122;
- this->Letters[123] = VTK_VECTOR_TEXT_123;
- this->Letters[124] = VTK_VECTOR_TEXT_124;
- this->Letters[125] = VTK_VECTOR_TEXT_125;
- this->Letters[126] = VTK_VECTOR_TEXT_126;
-
-}
-
-/*!Calculate output.*/
-void VTKViewer_VectorText::Execute()
-{
- vtkPolyData *output = this->GetOutput();
- vtkPoints *newPoints;
- vtkCellArray *newPolys;
- int ptOffset = 0;
- int aPoint, i;
- int pos = 0;
- float xpos = 0;
- float ypos = 0;
- int ptCount, triCount;
- char *aLetter;
- float width;
- float ftmp[3];
-
- if (this->Text == NULL)
- {
- vtkErrorMacro (<< "Text is not set!");
- return;
- }
-
- // Set things up; allocate memory
- newPoints = vtkPoints::New();
- newPolys = vtkCellArray::New();
- ftmp[2] = 0.0;
-
- // Create Text
- while (this->Text[pos])
- {
- switch (this->Text[pos])
- {
- case 32:
- xpos += 0.4;
- break;
-
- case 10:
- ypos -= 1.4;
- xpos = 0;
- break;
-
- default:
- // if we have a valid character
- if ((this->Text[pos] > 32)&&(this->Text[pos] < 127))
- {
- // add the result to our output
- aLetter = this->Letters[this->Text[pos]];
- ptCount = strtol(aLetter,&aLetter,10);
- width = strtod(aLetter,&aLetter);
- for (i = 0; i < ptCount; i++)
- {
- ftmp[0] = strtod(aLetter,&aLetter);
- ftmp[1] = strtod(aLetter,&aLetter);
- ftmp[0] += xpos;
- ftmp[1] += ypos;
- newPoints->InsertNextPoint(ftmp);
- }
- triCount = strtol(aLetter,&aLetter,10);
- for (i = 0; i < triCount; i++)
- {
- newPolys->InsertNextCell(3);
- aPoint = strtol(aLetter,&aLetter,10);
- newPolys->InsertCellPoint(aPoint + ptOffset);
- aPoint = strtol(aLetter,&aLetter,10);
- newPolys->InsertCellPoint(aPoint + ptOffset);
- aPoint = strtol(aLetter,&aLetter,10);
- newPolys->InsertCellPoint(aPoint + ptOffset);
- }
- ptOffset += ptCount;
- xpos += width;
- }
- break;
- }
- pos++;
- }
-
- //
- // Update ourselves and release memory
- //
- output->SetPoints(newPoints);
- newPoints->Delete();
-
- output->SetPolys(newPolys);
- newPolys->Delete();
-}
-
-/*!
- Print text to stream
- \param os - stream
- \param indent
-*/
-void VTKViewer_VectorText::PrintSelf(ostream& os, vtkIndent indent)
-{
- this->Superclass::PrintSelf(os,indent);
-
- os << indent << "Text: " << (this->Text ? this->Text : "(none)") << "\n";
-}
-
-/*!Destructor.*/
-VTKViewer_VectorText::~VTKViewer_VectorText()
-{
- if (this->Text)
- {
- delete [] this->Text;
- }
-}
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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
-//
-/*=========================================================================
-
- Program: Visualization Toolkit
- Module: $RCSfile$
- Language: C++
- Date: $Date$
- Version: $Revision$
-
- Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
- All rights reserved.
- See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
-
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the above copyright notice for more information.*/
-
-// .NAME vtkVectorText - create polygonal text
-// .SECTION Description
-
-// vtkVectorText generates vtkPolyData from an input text string. Besides the
-// ASCII alphanumeric characters a-z, A-Z, 0-9, vtkVectorText also supports
-// ASCII punctuation marks. (The supported ASCII character set are the codes
-// (33-126) inclusive.) The only control character supported is the line feed
-// character "\n", which advances to a new line.
-//
-// To use thie class, you normally couple it with a vtkPolyDataMapper and a
-// vtkActor. In this case you would use the vtkActor's transformation methods
-// to position, orient, and scale the text. You may also wish to use a
-// vtkFollower to orient the text so that it always faces the camera.
-
-// .SECTION See Also
-// vtkTextMapper vtkCaptionActor2D
-
-// VTKViewer_VectorText.h is a copy of vtkVectorText.h file.
-// Purpose of copying: to remove linking to libHybrid.so VTK library
-
-#ifndef __VTKViewer_VectorText_h
-#define __VTKViewer_VectorText_h
-
-#include "vtkPolyDataSource.h"
-/*!Generates vtkPolyData from an input text string.
- *@see vtkVectorText
- */
-class VTKViewer_VectorText : public vtkPolyDataSource
-{
-public:
- static VTKViewer_VectorText *New();
- vtkTypeRevisionMacro(VTKViewer_VectorText,vtkPolyDataSource);
- void PrintSelf(ostream& os, vtkIndent indent);
-
- // Description:
- // Set/Get the text to be drawn.
- vtkSetStringMacro(Text);
- vtkGetStringMacro(Text);
-
-protected:
- VTKViewer_VectorText();
- ~VTKViewer_VectorText();
-
- //! Main method, which calculate output
- virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
-
- char *Text;
- char *Letters[127];
-
-};
-
-#endif
-
-