Showing preview only (2,380K chars total). Download the full file or copy to clipboard to get everything.
Repository: kimtaikee/QVTKDemo
Branch: master
Commit: ef62e4fd924f
Files: 508
Total size: 2.2 MB
Directory structure:
gitextract_uerwcxh8/
├── README.md
├── app.pri
├── demos.pri
├── demos.pro
├── lib.pri
├── libs/
│ ├── 3dparty/
│ │ ├── 3dparty.pri
│ │ ├── 3dparty.pro
│ │ ├── 3dparty_dependencies.pri
│ │ ├── 3dparty_global.h
│ │ ├── QRoundProgressBar.cpp
│ │ ├── QRoundProgressBar.h
│ │ ├── flowlayout.cpp
│ │ └── flowlayout.h
│ ├── libs.pro
│ ├── utils/
│ │ ├── colorseries.cpp
│ │ ├── colorseries.h
│ │ ├── doublespinboxdelegate.cpp
│ │ ├── doublespinboxdelegate.h
│ │ ├── iplugin.h
│ │ ├── ivtkplugin.cpp
│ │ ├── ivtkplugin.h
│ │ ├── modeltopointsconverter.cpp
│ │ ├── modeltopointsconverter.h
│ │ ├── modeltovectorsconverter.cpp
│ │ ├── modeltovectorsconverter.h
│ │ ├── point3f.cpp
│ │ ├── point3f.h
│ │ ├── pointsreader.cpp
│ │ ├── pointsreader.h
│ │ ├── pointstomodelconverter.cpp
│ │ ├── pointstomodelconverter.h
│ │ ├── signalblocker.cpp
│ │ ├── signalblocker.h
│ │ ├── signalledrunable.cpp
│ │ ├── signalledrunable.h
│ │ ├── tablemodel.cpp
│ │ ├── tablemodel.h
│ │ ├── utils.cpp
│ │ ├── utils.h
│ │ ├── utils.pri
│ │ ├── utils.pro
│ │ ├── utils_dependencies.pri
│ │ ├── utils_global.h
│ │ ├── vector4f.cpp
│ │ └── vector4f.h
│ ├── vtkutils/
│ │ ├── abstractimageprocessor.cpp
│ │ ├── abstractimageprocessor.h
│ │ ├── abstractwidgetobserver.cpp
│ │ ├── abstractwidgetobserver.h
│ │ ├── actorexporter.cpp
│ │ ├── actorexporter.h
│ │ ├── anglewidgetobserver.cpp
│ │ ├── anglewidgetobserver.h
│ │ ├── boxcutter.cpp
│ │ ├── boxcutter.h
│ │ ├── boxwidgetobserver.cpp
│ │ ├── boxwidgetobserver.h
│ │ ├── contour.cpp
│ │ ├── contour.h
│ │ ├── contourwidgetobserver.cpp
│ │ ├── contourwidgetobserver.h
│ │ ├── custominteractorstyle.cpp
│ │ ├── custominteractorstyle.h
│ │ ├── datafilter.cpp
│ │ ├── datafilter.h
│ │ ├── disablerotationinteractorstyle.cpp
│ │ ├── disablerotationinteractorstyle.h
│ │ ├── distancewidgetobserver.cpp
│ │ ├── distancewidgetobserver.h
│ │ ├── filereaderutils.cpp
│ │ ├── filereaderutils.h
│ │ ├── implicitplanewidgetobserver.cpp
│ │ ├── implicitplanewidgetobserver.h
│ │ ├── interactor.cpp
│ │ ├── interactor.h
│ │ ├── lineprober.cpp
│ │ ├── lineprober.h
│ │ ├── linewidgetobserver.cpp
│ │ ├── linewidgetobserver.h
│ │ ├── modeltovtktableconverter.cpp
│ │ ├── modeltovtktableconverter.h
│ │ ├── moveactorinteractorstyle.cpp
│ │ ├── moveactorinteractorstyle.h
│ │ ├── movelineinteractorstyle.cpp
│ │ ├── movelineinteractorstyle.h
│ │ ├── movepointinteractorstyle.cpp
│ │ ├── movepointinteractorstyle.h
│ │ ├── planecutter.cpp
│ │ ├── planecutter.h
│ │ ├── pointmover.cpp
│ │ ├── pointmover.h
│ │ ├── pointstopolydataconverter.cpp
│ │ ├── pointstopolydataconverter.h
│ │ ├── pointwidgetobserver.cpp
│ │ ├── pointwidgetobserver.h
│ │ ├── rendererslayoutalgo.h
│ │ ├── sliderwidgetobserver.cpp
│ │ ├── sliderwidgetobserver.h
│ │ ├── spherecutter.cpp
│ │ ├── spherecutter.h
│ │ ├── spherewidgetobserver.cpp
│ │ ├── spherewidgetobserver.h
│ │ ├── surface.cpp
│ │ ├── surface.h
│ │ ├── vtkUnstructuredGridRelevantPointsFilter.cpp
│ │ ├── vtkUnstructuredGridRelevantPointsFilter.h
│ │ ├── vtkplot2dwidget.cpp
│ │ ├── vtkplot2dwidget.h
│ │ ├── vtkplot3dwidget.cpp
│ │ ├── vtkplot3dwidget.h
│ │ ├── vtkplotpiewidget.cpp
│ │ ├── vtkplotpiewidget.h
│ │ ├── vtkplotwidget.cpp
│ │ ├── vtkplotwidget.h
│ │ ├── vtkutils.cpp
│ │ ├── vtkutils.h
│ │ ├── vtkutils.pri
│ │ ├── vtkutils.pro
│ │ ├── vtkutils_dependencies.pri
│ │ ├── vtkutils_global.h
│ │ ├── vtkwidget.cpp
│ │ └── vtkwidget.h
│ └── widgets/
│ ├── colorcombobox.cpp
│ ├── colorcombobox.h
│ ├── colorpushbutton.cpp
│ ├── colorpushbutton.h
│ ├── fontpushbutton.cpp
│ ├── fontpushbutton.h
│ ├── gradientcombobox.cpp
│ ├── gradientcombobox.h
│ ├── imagecompareboard.cpp
│ ├── imagecompareboard.h
│ ├── penstylebox.cpp
│ ├── penstylebox.h
│ ├── qtcolorpicker.cpp
│ ├── qtcolorpicker.h
│ ├── tagwidget.cpp
│ ├── tagwidget.h
│ ├── widgets.pro
│ ├── widgets_dependencies.pri
│ └── widgets_global.h
├── plugin.pri
├── plugins/
│ ├── animation/
│ │ ├── animation.pro
│ │ ├── animation_dependencies.pri
│ │ ├── animationplugin.cpp
│ │ ├── animationplugin.h
│ │ ├── animationscenewindow.cpp
│ │ ├── animationscenewindow.h
│ │ ├── animationscenewindow.ui
│ │ ├── basicanimationwindow.cpp
│ │ ├── basicanimationwindow.h
│ │ ├── basicanimationwindow.ui
│ │ └── res.qrc
│ ├── buildinsources/
│ │ ├── buildinsources.pro
│ │ ├── buildinsources_dependencies.pri
│ │ ├── buildinsourcesplugin.cpp
│ │ ├── buildinsourcesplugin.h
│ │ ├── res.qrc
│ │ ├── texturewindow.cpp
│ │ ├── texturewindow.h
│ │ └── texturewindow.ui
│ ├── buildinwidgets/
│ │ ├── anglewidgetconfig.ui
│ │ ├── anglewidgetwindow.cpp
│ │ ├── anglewidgetwindow.h
│ │ ├── basewidgetwindow.cpp
│ │ ├── basewidgetwindow.h
│ │ ├── basewidgetwindow.ui
│ │ ├── buildinwidgets.pro
│ │ ├── buildinwidgets_dependencies.pri
│ │ ├── buildinwidgetsplugin.cpp
│ │ ├── buildinwidgetsplugin.h
│ │ ├── camerawidgetconfig.ui
│ │ ├── camerawidgetwindow.cpp
│ │ ├── camerawidgetwindow.h
│ │ ├── contourwidgetconfig.ui
│ │ ├── contourwidgetwindow.cpp
│ │ ├── contourwidgetwindow.h
│ │ ├── distancewidgetconfig.ui
│ │ ├── distancewidgetwindow.cpp
│ │ ├── distancewidgetwindow.h
│ │ ├── scalarbarwidgetconfig.ui
│ │ ├── scalarbarwidgetwindow.cpp
│ │ ├── scalarbarwidgetwindow.h
│ │ ├── sliderwidgetconfig.ui
│ │ ├── sliderwidgetwindow.cpp
│ │ ├── sliderwidgetwindow.h
│ │ ├── textwidgetconfig.ui
│ │ ├── textwidgetwindow.cpp
│ │ └── textwidgetwindow.h
│ ├── camera/
│ │ ├── axesactorwindow.cpp
│ │ ├── axesactorwindow.h
│ │ ├── axesactorwindow.ui
│ │ ├── camera.pro
│ │ ├── camera_dependencies.pri
│ │ ├── cameraplugin.cpp
│ │ ├── cameraplugin.h
│ │ ├── camerawindow.cpp
│ │ ├── camerawindow.h
│ │ ├── camerawindow.ui
│ │ ├── mainwidget.cpp
│ │ ├── mainwidget.h
│ │ └── mainwidget.ui
│ ├── chart3d/
│ │ ├── bar3dwindow.cpp
│ │ ├── bar3dwindow.h
│ │ ├── chart3d.pro
│ │ ├── chart3d_dependencies.pri
│ │ ├── chart3dplugin.cpp
│ │ ├── chart3dplugin.h
│ │ ├── chart3dwindow.cpp
│ │ ├── chart3dwindow.h
│ │ ├── chart3dwindow.ui
│ │ ├── configpoints3d.ui
│ │ ├── lines3dwindow.cpp
│ │ ├── lines3dwindow.h
│ │ ├── points3dwindow.cpp
│ │ └── points3dwindow.h
│ ├── constructsurface/
│ │ ├── constructsurface.pro
│ │ ├── constructsurface_dependencies.pri
│ │ ├── constructsurfaceplugin.cpp
│ │ ├── constructsurfaceplugin.h
│ │ ├── contourwindow.cpp
│ │ ├── contourwindow.h
│ │ ├── contourwindow.ui
│ │ ├── data.qrc
│ │ ├── datafiles/
│ │ │ ├── demo.txt
│ │ │ └── pit.txt
│ │ ├── dialog.cpp
│ │ ├── dialog.h
│ │ ├── dialog.ui
│ │ ├── quadricwindow.ui
│ │ ├── rendersurface.cpp
│ │ ├── rendersurface.h
│ │ ├── rendersurface.ui
│ │ ├── widget.cpp
│ │ └── widget.h
│ ├── contour2d/
│ │ ├── abstractcontourgenerator.cpp
│ │ ├── abstractcontourgenerator.h
│ │ ├── bandedcontourgenerator.cpp
│ │ ├── bandedcontourgenerator.h
│ │ ├── contour2d.pro
│ │ ├── contour2d_dependencies.pri
│ │ ├── contour2dinteractorstyle.cpp
│ │ ├── contour2dinteractorstyle.h
│ │ ├── contour2dplugin.cpp
│ │ ├── contour2dplugin.h
│ │ ├── contourwindow.cpp
│ │ ├── contourwindow.h
│ │ ├── contourwindow.ui
│ │ ├── data.qrc
│ │ ├── datafiles/
│ │ │ ├── demo.txt
│ │ │ └── pit.txt
│ │ ├── smoothcontourgenerator.cpp
│ │ └── smoothcontourgenerator.h
│ ├── custom3dwidget/
│ │ ├── custom3dwidget.pro
│ │ ├── custom3dwidget_dependencies.pri
│ │ ├── custom3dwidgetplugin.cpp
│ │ ├── custom3dwidgetplugin.h
│ │ ├── customxyplotrepresentation.cpp
│ │ ├── customxyplotrepresentation.h
│ │ ├── customxyplotwidget.cpp
│ │ ├── customxyplotwidget.h
│ │ ├── usearrowwidgetwindow.cpp
│ │ ├── usearrowwidgetwindow.h
│ │ ├── usearrowwidgetwindow.ui
│ │ ├── usecustomwidgetwindow.cpp
│ │ ├── usecustomwidgetwindow.h
│ │ ├── usecustomwidgetwindow.ui
│ │ ├── vtkarrowrepresentation.cpp
│ │ ├── vtkarrowrepresentation.h
│ │ ├── vtkarrowwidget.cpp
│ │ └── vtkarrowwidget.h
│ ├── displaychinese/
│ │ ├── dialog.cpp
│ │ ├── dialog.h
│ │ ├── dialog.ui
│ │ ├── displaychinese.pro
│ │ ├── displaychinese_dependencies.pri
│ │ ├── displaychineseplugin.cpp
│ │ ├── displaychineseplugin.h
│ │ ├── main.cpp
│ │ ├── widget.cpp
│ │ └── widget.h
│ ├── filereader/
│ │ ├── filereader.pro
│ │ ├── filereader_dependencies.pri
│ │ ├── filereaderplugin.cpp
│ │ ├── filereaderplugin.h
│ │ ├── filetree.cpp
│ │ ├── filetree.h
│ │ ├── mainwidget.cpp
│ │ ├── mainwidget.h
│ │ ├── mainwidget.ui
│ │ ├── widget.cpp
│ │ └── widget.h
│ ├── filters/
│ │ ├── clipconfig.ui
│ │ ├── clipwindow.cpp
│ │ ├── clipwindow.h
│ │ ├── cutconfig.ui
│ │ ├── cutwindow.cpp
│ │ ├── cutwindow.h
│ │ ├── decimateconfig.ui
│ │ ├── decimatewindow.cpp
│ │ ├── decimatewindow.h
│ │ ├── filters.pro
│ │ ├── filters_dependencies.pri
│ │ ├── filtersplugin.cpp
│ │ ├── filtersplugin.h
│ │ ├── filterwindow.cpp
│ │ ├── filterwindow.h
│ │ ├── generalfilterwindow.ui
│ │ ├── glyphconfig.ui
│ │ ├── glyphwindow.cpp
│ │ ├── glyphwindow.h
│ │ ├── isosurfaceconfig.ui
│ │ ├── isosurfacewindow.cpp
│ │ ├── isosurfacewindow.h
│ │ ├── probeconfig.ui
│ │ ├── probewindow.cpp
│ │ ├── probewindow.h
│ │ ├── qcustomplot.cpp
│ │ ├── qcustomplot.h
│ │ ├── slicewindow.cpp
│ │ ├── slicewindow.h
│ │ ├── smoothconfig.ui
│ │ ├── smoothwindow.cpp
│ │ ├── smoothwindow.h
│ │ ├── streamlineconfig.ui
│ │ ├── streamlinewindow.cpp
│ │ ├── streamlinewindow.h
│ │ ├── thresholdwindow.cpp
│ │ └── thresholdwindow.h
│ ├── imageprocessing/
│ │ ├── imageprocessing.pro
│ │ ├── imageprocessing_dependencies.pri
│ │ ├── imageprocessingplugin.cpp
│ │ ├── imageprocessingplugin.h
│ │ ├── imagetree.cpp
│ │ ├── imagetree.h
│ │ ├── mainwidget.cpp
│ │ ├── mainwidget.h
│ │ ├── mainwidget.ui
│ │ └── res.qrc
│ ├── light/
│ │ ├── galaxywindow.cpp
│ │ ├── galaxywindow.h
│ │ ├── galaxywindow.ui
│ │ ├── light.pro
│ │ ├── light_dependencies.pri
│ │ ├── lightplugin.cpp
│ │ ├── lightplugin.h
│ │ ├── mainwidget.cpp
│ │ ├── mainwidget.h
│ │ ├── mainwidget.ui
│ │ └── res.qrc
│ ├── miscellaneous/
│ │ ├── backgroundwindow.cpp
│ │ ├── backgroundwindow.h
│ │ ├── backgroundwindow.ui
│ │ ├── colormapwindow.cpp
│ │ ├── colormapwindow.h
│ │ ├── colormapwindow.ui
│ │ ├── conicspiralconfig.ui
│ │ ├── diniconfig.ui
│ │ ├── ellipsoidconfig.ui
│ │ ├── miscellaneous.pro
│ │ ├── miscellaneous_dependencies.pri
│ │ ├── miscellaneousplugin.cpp
│ │ ├── miscellaneousplugin.h
│ │ ├── parametricobjectswindow.cpp
│ │ ├── parametricobjectswindow.h
│ │ ├── parametricobjectswindow.ui
│ │ ├── randomhillsconfig.ui
│ │ ├── representationwidget.cpp
│ │ ├── representationwidget.h
│ │ ├── representationwidget.ui
│ │ ├── romanconfig.ui
│ │ ├── scaleaxeswindow.cpp
│ │ ├── scaleaxeswindow.h
│ │ ├── scaleaxeswindow.ui
│ │ ├── splineconfig.ui
│ │ ├── superellipsoidconfig.ui
│ │ ├── supertoroidconfig.ui
│ │ └── torusconfig.ui
│ ├── picking/
│ │ ├── drawspherewindow.cpp
│ │ ├── drawspherewindow.h
│ │ ├── drawspherewindow.ui
│ │ ├── drawsurfacewindow.cpp
│ │ ├── drawsurfacewindow.h
│ │ ├── drawsurfacewindow.ui
│ │ ├── mouseeventinteractorstyle.cpp
│ │ ├── mouseeventinteractorstyle.h
│ │ ├── pickactorwindow.cpp
│ │ ├── pickactorwindow.h
│ │ ├── pickactorwindow.ui
│ │ ├── pickcellinteractorstyle.cpp
│ │ ├── pickcellinteractorstyle.h
│ │ ├── pickcellwindow.cpp
│ │ ├── pickcellwindow.h
│ │ ├── pickcellwindow.ui
│ │ ├── picking.pro
│ │ ├── picking_dependencies.pri
│ │ ├── pickingplugin.cpp
│ │ ├── pickingplugin.h
│ │ ├── selectareainteractorstyle.cpp
│ │ ├── selectareainteractorstyle.h
│ │ ├── selectareawindow.cpp
│ │ ├── selectareawindow.h
│ │ └── selectareawindow.ui
│ ├── pipeline/
│ │ ├── arrowitem.cpp
│ │ ├── arrowitem.h
│ │ ├── pipeline.pro
│ │ ├── pipeline_dependencies.pri
│ │ ├── pipelineplugin.cpp
│ │ ├── pipelineplugin.h
│ │ ├── pipelinewindow.cpp
│ │ ├── pipelinewindow.h
│ │ └── pipelinewindow.ui
│ ├── plot2d/
│ │ ├── bagplotwidget.cpp
│ │ ├── bagplotwidget.h
│ │ ├── barplotsettings.ui
│ │ ├── barplotwidget.cpp
│ │ ├── barplotwidget.h
│ │ ├── lineplotsettings.ui
│ │ ├── lineplotwidget.cpp
│ │ ├── lineplotwidget.h
│ │ ├── pieplotwidget.cpp
│ │ ├── pieplotwidget.h
│ │ ├── plot2d.pro
│ │ ├── plot2d_dependencies.pri
│ │ ├── plot2dplugin.cpp
│ │ ├── plot2dplugin.h
│ │ ├── plotwidget.cpp
│ │ ├── plotwidget.h
│ │ ├── scatterplotsettings.ui
│ │ ├── scatterplotwidget.cpp
│ │ ├── scatterplotwidget.h
│ │ ├── stackedplotwidget.cpp
│ │ ├── stackedplotwidget.h
│ │ └── tableplotwidget.ui
│ ├── plot3d/
│ │ ├── plot3d.pro
│ │ ├── plot3d_dependencies.pri
│ │ ├── plot3dplugin.cpp
│ │ ├── plot3dplugin.h
│ │ ├── plotline3dwindow.cpp
│ │ ├── plotline3dwindow.h
│ │ ├── plotpoints3dwindow.cpp
│ │ ├── plotpoints3dwindow.h
│ │ ├── plotsurfacewindow.cpp
│ │ ├── plotsurfacewindow.h
│ │ ├── plotwindow.cpp
│ │ ├── plotwindow.h
│ │ └── tablewidgetwindow.ui
│ ├── plotactor/
│ │ ├── barchartactorwindow.cpp
│ │ ├── barchartactorwindow.h
│ │ ├── piechartactorwindow.cpp
│ │ ├── piechartactorwindow.h
│ │ ├── piesettings.ui
│ │ ├── plotactor.pro
│ │ ├── plotactor_dependencies.pri
│ │ ├── plotactorplugin.cpp
│ │ ├── plotactorplugin.h
│ │ ├── plotactorwindow.cpp
│ │ ├── plotactorwindow.h
│ │ ├── plotactorwindow.ui
│ │ ├── spiderplotactorwindow.cpp
│ │ ├── spiderplotactorwindow.h
│ │ ├── spidersettings.ui
│ │ ├── xyplotactorwindow.cpp
│ │ └── xyplotactorwindow.h
│ ├── plugins.pro
│ ├── rendersphere/
│ │ ├── main.cpp
│ │ ├── rendersphere.pro
│ │ ├── rendersphere_dependencies.pri
│ │ ├── rendersphereplugin.cpp
│ │ ├── rendersphereplugin.h
│ │ ├── widget.cpp
│ │ └── widget.h
│ ├── screenshot/
│ │ ├── screenshot.pro
│ │ ├── screenshot_dependencies.pri
│ │ ├── screenshotplugin.cpp
│ │ ├── screenshotplugin.h
│ │ ├── screenshotwindow.cpp
│ │ ├── screenshotwindow.h
│ │ └── screenshotwindow.ui
│ ├── shader/
│ │ ├── editshaderwindow.cpp
│ │ ├── editshaderwindow.h
│ │ ├── editshaderwindow.ui
│ │ ├── shader.pro
│ │ ├── shader_dependencies.pri
│ │ ├── shaderplugin.cpp
│ │ ├── shaderplugin.h
│ │ ├── shaderwindow.cpp
│ │ ├── shaderwindow.h
│ │ └── shaderwindow.ui
│ ├── template/
│ │ ├── template.pro
│ │ ├── template_dependencies.pri
│ │ ├── templateplugin.cpp
│ │ └── templateplugin.h
│ └── volumerendering/
│ ├── volumerendering.pro
│ ├── volumerendering_dependencies.pri
│ ├── volumerenderingplugin.cpp
│ ├── volumerenderingplugin.h
│ ├── volumerenderingwindow.cpp
│ ├── volumerenderingwindow.h
│ └── volumerenderingwindow.ui
├── rpath.pri
├── src/
│ ├── main.cpp
│ ├── mainwindow.cpp
│ ├── mainwindow.h
│ ├── mainwindow.ui
│ ├── src.pro
│ └── src_dependencies.pri
└── vtk_inc.pri
================================================
FILE CONTENTS
================================================
================================================
FILE: README.md
================================================
# QVTKDemo
Using VTK-Qt binding to demonstrate VTK features.
# Demo snapshots
Sources
<img src="https://cloud.githubusercontent.com/assets/2052516/17836476/ae580146-67c6-11e6-8fc6-9bcffb701e52.gif"></img>
Texture
<img src="https://cloud.githubusercontent.com/assets/2052516/17836465/63663b9e-67c6-11e6-8b38-59b8237bc014.gif"></img>
Draw Sphere
<img src="https://cloud.githubusercontent.com/assets/2052516/17836485/20af00b4-67c7-11e6-9809-c0b9551c72dc.gif"></img>
Draw Surface
<img src="https://cloud.githubusercontent.com/assets/2052516/17836489/544b60c0-67c7-11e6-891c-52bfcfbf9c57.gif"></img>
XYPlotActor
<img src="https://cloud.githubusercontent.com/assets/2052516/17836500/89d6c798-67c7-11e6-94ff-cc8e2e4e5180.gif"></img>
PiePlotActor
<img src="https://cloud.githubusercontent.com/assets/2052516/17836503/af7bde66-67c7-11e6-8769-343052618668.gif"></img>
BarPlotActor
<img src="https://cloud.githubusercontent.com/assets/2052516/17836526/4625f6a8-67c8-11e6-946a-ec949ede6a67.gif"></img>
SpiderPlotActor
<img src="https://cloud.githubusercontent.com/assets/2052516/17836541/7e79a2f2-67c8-11e6-87b8-fb005dbfd47c.gif"></img>
Parametric Objects
<img src="https://cloud.githubusercontent.com/assets/2052516/17836441/af819740-67c5-11e6-9c14-e76a427c37a0.gif"></img>
BackgroundColor
<img src="https://cloud.githubusercontent.com/assets/2052516/17836596/8908aacc-67ca-11e6-8a8c-07e5584d36de.gif"></img>
Points3D
<img src="https://cloud.githubusercontent.com/assets/2052516/17836642/06682136-67cc-11e6-88c9-2b99f77aa1e6.gif"></img>
Lines3D
<img src="https://cloud.githubusercontent.com/assets/2052516/17836654/3bb1cf22-67cc-11e6-8347-28b326cc6c5d.gif"></img>
Bar3D
<img src="https://cloud.githubusercontent.com/assets/2052516/17836666/8d17ba20-67cc-11e6-9813-11a00d65551a.gif"></img>
Render Surface
<img src="https://cloud.githubusercontent.com/assets/2052516/17837208/0353b86c-67df-11e6-927b-563c0d0abc0c.gif"></img>
Contour
<img src="https://cloud.githubusercontent.com/assets/2052516/17837380/6888db4a-67e4-11e6-8fcc-0f743fa87972.gif"></img>
Chart Overlay, create custom 3d widget
<img src="https://cloud.githubusercontent.com/assets/2052516/18082320/e5ee999c-6ed0-11e6-9262-985a663d0ade.gif"></img>
Arrow Widget, custom 2d widget
<img src="https://cloud.githubusercontent.com/assets/2052516/19423918/94753236-9457-11e6-8557-7eaffe0e9563.gif"></img>
Slider Widget
<img src="https://cloud.githubusercontent.com/assets/2052516/17933034/1fd57e68-6a45-11e6-85e8-850c7525b973.gif"></img>
Angle Widget
<img src="https://cloud.githubusercontent.com/assets/2052516/17932992/f02c8d96-6a44-11e6-9e9a-fd960bcc9949.gif"></img>
Contour Widget
<img src="https://cloud.githubusercontent.com/assets/2052516/17933137/81fadc14-6a45-11e6-913c-5a0388e261be.gif"></img>
Distance Widget
<img src="https://cloud.githubusercontent.com/assets/2052516/17932949/c92cf2a8-6a44-11e6-88f8-bd132ad25e85.gif"></img>
Scale vtkCubeAxesActor2D
<img src="https://cloud.githubusercontent.com/assets/2052516/19424139/596b6a82-9459-11e6-9974-9749c2e627f6.gif"></img>
================================================
FILE: app.pri
================================================
include($$replace(_PRO_FILE_PWD_, ([^/]+$), \\1/\\1_dependencies.pri))
TARGET = $$APP_NAME
include(demos.pri)
include(rpath.pri)
# 预编译头文件
#isEmpty(PRECOMPILED_HEADER):PRECOMPILED_HEADER = $$PWD/shared/simcube_gui_pch.h
DESTDIR = $$QVTKDEMOS_BINARIES_PATH
TARGET = $$qtLibraryName($$TARGET)
TEMPLATE = app
================================================
FILE: demos.pri
================================================
!isEmpty(QVTKDEMOS_PRI_INCLUDED):error("demos.pri already included")
QVTKDEMOS_PRI_INCLUDED = 1
VERSION = 1.0
QMAKE_TARGET_COMPANY = "JasonZhang Inc"
QMAKE_TARGET_PRODUCT = "QVTKDemos"
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2016 Jason Zhang"
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
DEFINES += QT_MESSAGELOGCONTEXT
defineReplace(cleanPath) {
return($$clean_path($$1))
}
defineReplace(targetPath) {
return($$shell_path($$1))
}
defineReplace(qtLibraryName) {
unset(LIBRARY_NAME)
LIBRARY_NAME = $$1
CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
mac:RET = $$member(LIBRARY_NAME, 0)_debug
else:win32:RET = $$member(LIBRARY_NAME, 0)d
}
}
isEmpty(RET):RET = $$LIBRARY_NAME
return($$RET)
}
defineReplace(scLibraryName) {
CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
mac:RET = $${1}_debug$$section(VERSION, ., 0, 0)
else:win32:RET = $${1}d$$section(VERSION, ., 0, 0)
}
}
isEmpty(RET):RET = $$1$$section(VERSION, ., 0, 0)
return($$RET)
}
defineTest(minQtVersion) {
maj = $$1
min = $$2
patch = $$3
isEqual(QT_MAJOR_VERSION, $$maj) {
isEqual(QT_MINOR_VERSION, $$min) {
isEqual(QT_PATCH_VERSION, $$patch) {
return(true)
}
greaterThan(QT_PATCH_VERSION, $$patch) {
return(true)
}
}
greaterThan(QT_MINOR_VERSION, $$min) {
return(true)
}
}
greaterThan(QT_MAJOR_VERSION, $$maj) {
return(true)
}
return(false)
}
QVTKDEMOS_SOURCE_TREE = $$PWD
isEmpty(QVTKDEMOS_BUILD_TREE) {
sub_dir = $$_PRO_FILE_PWD_
sub_dir ~= s,^$$re_escape($$PWD),,
QVTKDEMOS_BUILD_TREE = $$cleanPath($$OUT_PWD)
QVTKDEMOS_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
}
CONFIG(debug, debug|release) {
DEBUG_RELEASE = DEBUG
} else {
DEBUG_RELEASE = RELEASE
}
#CURRENTHOST = WIN32_GCC
win32-msvc2013:contains(QMAKE_HOST.arch, x86): {
CURRENTHOST = WIN32_VC2013
QVTKDEMOS_BIN = win32
}
win32-msvc2015:contains(QMAKE_HOST.arch, x86): {
CURRENTHOST = WIN32_VC2015
QVTKDEMOS_BIN = win32
}
win32-g++:contains(QMAKE_HOST.arch, x86): {
CURRENTHOST = WIN32_GCC
QVTKDEMOS_BIN = win32
}
win32-msvc2013:isEqual(QT_ARCH, x86_64): {
CURRENTHOST = WIN64_VC2013
QVTKDEMOS_BIN = win64
}
win32-msvc2015:isEqual(QT_ARCH, x86_64): {
CURRENTHOST = WIN64_VC2015
QVTKDEMOS_BIN = win64
}
#win32-g++:isEqual(QT_ARCH, x86_64): {
# CURRENTHOST = WIN64_GCC
#}
win32-g++:contains(QMAKE_HOST.arch, x86_64): {
CURRENTHOST = WIN32_GCC
QVTKDEMOS_BIN = win32
}
unix: isEqual(QT_ARCH, x86_64): {
CURRENTHOST = LINUX64
QVTKDEMOS_BIN = linux64
}
QVTKDEMOS_APP_PATH = $$QVTKDEMOS_SOURCE_TREE/build/bin/$${CURRENTHOST}_$$DEBUG_RELEASE
QVTKDEMOS_BINARIES_PATH = $$QVTKDEMOS_APP_PATH/$${QVTKDEMOS_BIN}
QVTKDEMOS_LIBRARY_PATH = $$QVTKDEMOS_SOURCE_TREE/build/lib/$${CURRENTHOST}_$$DEBUG_RELEASE
QVTKDEMOS_PLUGIN_PATH = $$QVTKDEMOS_APP_PATH/$${QVTKDEMOS_BIN}/plugins
#拷贝一个或多个文件到指定目录, 第一个参数是待拷贝文件列表, 第二个参数是指定目录
defineReplace(copyFile) {
unset(files)
unset(dist)
files = $$1 #文件列表
#dist = $$targetPath($$2) #指定目录
dist = $$2
win32 {
COPY = copy /y
MKDIR = mkdir
} else {
COPY = cp
MKDIR = mkdir -p
}
dist = $$system_path($$dist)
!exists($$dist):system($$MKDIR $$dist)
for (f, files) {
#dist_file = $$dist/$$basename(f)
#强制覆盖已存在的 todo linux下需测试
#!exists($$dist_file): {
f = $$system_path($$f)
system($$COPY $$f "$$dist")
#}
}
return($$files)
}
#拷贝一个目录的所有内容到另一个目录中, 第一个参数是待拷贝目录, 第二个参数是指定目录
defineReplace(copyFolder) {
unset(sourceDir)
unset(dist)
sourceDir = $$system_path($$1)
dist = $$system_path($$2)
win32 {
COPY = xcopy /e /y
MKDIR = mkdir
} else {
COPY = cp -rf
MKDIR = mkdir -p
}
#强制覆盖已存在的 todo linux下需测试
#!exists($$dist) {
system($$MKDIR $$dist)
system($$COPY $$sourceDir $$dist)
#}
return($$dist)
}
INCLUDEPATH *= \
$$QVTKDEMOS_SOURCE_TREE/libs $$QVTKDEMOS_SOURCE_TREE/shared
LIBS *= -L$$QVTKDEMOS_LIBRARY_PATH
!macx:DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
win32-msvc* {
#Don't warn about sprintf, fopen etc being 'unsafe'
DEFINES += _CRT_SECURE_NO_WARNINGS
#编译出可在xp下运行的版本
QMAKE_SUBSYSTEM_SUFFIX = ,5.01
}
contains(QT, core): QT += concurrent
contains(QT, gui): QT += widgets
THIRDPARTYINCLUDE = $$PWD/include/3rdparty
INCLUDEPATH *= $$THIRDPARTYINCLUDE
CONFIG += c++11
# 递归决议库依赖性
done_libs =
for(ever) {
isEmpty(LIB_DEPENDS): \
break()
done_libs += $$LIB_DEPENDS
for(dep, LIB_DEPENDS) {
include($$PWD/libs/$$dep/$${dep}_dependencies.pri) # this depends on your project structure
LIBS += -l$$scLibraryName($$LIB_NAME)
}
LIB_DEPENDS = $$unique(LIB_DEPENDS)
LIB_DEPENDS -= $$unique(done_libs)
}
================================================
FILE: demos.pro
================================================
include(demos.pri)
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += libs \
plugins \
src \
================================================
FILE: lib.pri
================================================
include($$replace(_PRO_FILE_PWD_, ([^/]+$), \\1/\\1_dependencies.pri))
TARGET = $$LIB_NAME
include(demos.pri)
win32 {
DLLDESTDIR = $$QVTKDEMOS_BINARIES_PATH
}
DESTDIR = $$QVTKDEMOS_LIBRARY_PATH
include(rpath.pri)
TARGET = $$qtLibraryName($$TARGET)
TEMPLATE = lib
CONFIG += shared dll
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
QMAKE_TARGET_DESCRIPTION = "QVTKDemo Library"
================================================
FILE: libs/3dparty/3dparty.pri
================================================
contains(QT, core): QT += concurrent
contains(QT, gui): QT += widgets
CONFIG += c++11
================================================
FILE: libs/3dparty/3dparty.pro
================================================
INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD
include(../../lib.pri)
DEFINES += THIRDPARTY_LIBRARY
HEADERS += 3dparty_global.h \
flowlayout.h \
QRoundProgressBar.h
SOURCES += flowlayout.cpp \
QRoundProgressBar.cpp
================================================
FILE: libs/3dparty/3dparty_dependencies.pri
================================================
LIB_NAME = 3dparty
LIB_DEPENDS +=
================================================
FILE: libs/3dparty/3dparty_global.h
================================================
#ifndef THIRDPARTY_GLOBAL_H
#define THIRDPARTY_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(THIRDPARTY_LIBRARY)
# define THIRDPARTY_EXPORT Q_DECL_EXPORT
#else
# define THIRDPARTY_EXPORT Q_DECL_IMPORT
#endif
#endif // THIRDPARTY_GLOBAL_H
================================================
FILE: libs/3dparty/QRoundProgressBar.cpp
================================================
/*
* QRoundProgressBar - a circular progress bar Qt widget.
*
* Sintegrial Technologies (c) 2015-now
*
* The software is freeware and is distributed "as is" with the complete source codes.
* Anybody is free to use it in any software projects, either commercial or non-commercial.
* Please do not remove this copyright message and remain the name of the author unchanged.
*
* It is very appreciated if you produce some feedback to us case you are going to use
* the software.
*
* Please send your questions, suggestions, and information about found issues to the
*
* sintegrial@gmail.com
*
*/
#include "QRoundProgressBar.h"
#include <QtGui/QPainter>
QRoundProgressBar::QRoundProgressBar(QWidget *parent) :
QWidget(parent),
m_min(0), m_max(100),
m_value(25),
m_nullPosition(PositionTop),
m_barStyle(StyleDonut),
m_outlinePenWidth(1),
m_dataPenWidth(1),
m_rebuildBrush(false),
m_format("%p%"),
m_decimals(1),
m_updateFlags(UF_PERCENT)
{
}
void QRoundProgressBar::setRange(double min, double max)
{
m_min = min;
m_max = max;
if (m_max < m_min)
qSwap(m_max, m_min);
if (m_value < m_min)
m_value = m_min;
else if (m_value > m_max)
m_value = m_max;
if (!m_gradientData.isEmpty())
m_rebuildBrush = true;
update();
}
void QRoundProgressBar::setMinimum(double min)
{
setRange(min, m_max);
}
void QRoundProgressBar::setMaximum(double max)
{
setRange(m_min, max);
}
void QRoundProgressBar::setValue(double val)
{
if (m_value != val)
{
if (val < m_min)
m_value = m_min;
else if (val > m_max)
m_value = m_max;
else
m_value = val;
update();
}
}
void QRoundProgressBar::setValue(int val)
{
setValue(double(val));
}
void QRoundProgressBar::setNullPosition(double position)
{
if (position != m_nullPosition)
{
m_nullPosition = position;
if (!m_gradientData.isEmpty())
m_rebuildBrush = true;
update();
}
}
void QRoundProgressBar::setBarStyle(QRoundProgressBar::BarStyle style)
{
if (style != m_barStyle)
{
m_barStyle = style;
update();
}
}
void QRoundProgressBar::setOutlinePenWidth(double penWidth)
{
if (penWidth != m_outlinePenWidth)
{
m_outlinePenWidth = penWidth;
update();
}
}
void QRoundProgressBar::setDataPenWidth(double penWidth)
{
if (penWidth != m_dataPenWidth)
{
m_dataPenWidth = penWidth;
update();
}
}
void QRoundProgressBar::setDataColors(const QGradientStops &stopPoints)
{
if (stopPoints != m_gradientData)
{
m_gradientData = stopPoints;
m_rebuildBrush = true;
update();
}
}
void QRoundProgressBar::setFormat(const QString &format)
{
if (format != m_format)
{
m_format = format;
valueFormatChanged();
}
}
void QRoundProgressBar::resetFormat()
{
m_format = QString::null;
valueFormatChanged();
}
void QRoundProgressBar::setDecimals(int count)
{
if (count >= 0 && count != m_decimals)
{
m_decimals = count;
valueFormatChanged();
}
}
void QRoundProgressBar::paintEvent(QPaintEvent* /*event*/)
{
double outerRadius = qMin(width(), height());
QRectF baseRect(1, 1, outerRadius-2, outerRadius-2);
QImage buffer(outerRadius, outerRadius, QImage::Format_ARGB32_Premultiplied);
QPainter p(&buffer);
p.setRenderHint(QPainter::Antialiasing);
// data brush
rebuildDataBrushIfNeeded();
// background
drawBackground(p, buffer.rect());
// base circle
drawBase(p, baseRect);
// data circle
double arcStep = 360.0 / (m_max - m_min) * m_value;
drawValue(p, baseRect, m_value, arcStep);
// center circle
double innerRadius(0);
QRectF innerRect;
calculateInnerRect(baseRect, outerRadius, innerRect, innerRadius);
drawInnerBackground(p, innerRect);
// text
drawText(p, innerRect, innerRadius, m_value);
// finally draw the bar
p.end();
QPainter painter(this);
painter.fillRect(baseRect, palette().background());
painter.drawImage(0,0, buffer);
}
void QRoundProgressBar::drawBackground(QPainter &p, const QRectF &baseRect)
{
p.fillRect(baseRect, palette().background());
}
void QRoundProgressBar::drawBase(QPainter &p, const QRectF &baseRect)
{
switch (m_barStyle)
{
case StyleDonut:
p.setPen(QPen(palette().shadow().color(), m_outlinePenWidth));
p.setBrush(palette().base());
p.drawEllipse(baseRect);
break;
case StylePie:
p.setPen(QPen(palette().base().color(), m_outlinePenWidth));
p.setBrush(palette().base());
p.drawEllipse(baseRect);
break;
case StyleLine:
p.setPen(QPen(palette().base().color(), m_outlinePenWidth));
p.setBrush(Qt::NoBrush);
p.drawEllipse(baseRect.adjusted(m_outlinePenWidth/2, m_outlinePenWidth/2, -m_outlinePenWidth/2, -m_outlinePenWidth/2));
break;
default:;
}
}
void QRoundProgressBar::drawValue(QPainter &p, const QRectF &baseRect, double value, double arcLength)
{
// nothing to draw
if (value == m_min)
return;
// for Line style
if (m_barStyle == StyleLine)
{
p.setPen(QPen(palette().highlight().color(), m_dataPenWidth));
p.setBrush(Qt::NoBrush);
p.drawArc(baseRect.adjusted(m_outlinePenWidth/2, m_outlinePenWidth/2, -m_outlinePenWidth/2, -m_outlinePenWidth/2),
m_nullPosition * 16,
-arcLength * 16);
return;
}
// for Pie and Donut styles
QPainterPath dataPath;
dataPath.setFillRule(Qt::WindingFill);
// pie segment outer
dataPath.moveTo(baseRect.center());
dataPath.arcTo(baseRect, m_nullPosition, -arcLength);
dataPath.lineTo(baseRect.center());
p.setBrush(palette().highlight());
p.setPen(QPen(palette().shadow().color(), m_dataPenWidth));
p.drawPath(dataPath);
}
void QRoundProgressBar::calculateInnerRect(const QRectF &/*baseRect*/, double outerRadius, QRectF &innerRect, double &innerRadius)
{
// for Line style
if (m_barStyle == StyleLine)
{
innerRadius = outerRadius - m_outlinePenWidth;
}
else // for Pie and Donut styles
{
innerRadius = outerRadius * 0.75;
}
double delta = (outerRadius - innerRadius) / 2;
innerRect = QRectF(delta, delta, innerRadius, innerRadius);
}
void QRoundProgressBar::drawInnerBackground(QPainter &p, const QRectF &innerRect)
{
if (m_barStyle == StyleDonut)
{
p.setBrush(palette().alternateBase());
p.drawEllipse(innerRect);
}
}
void QRoundProgressBar::drawText(QPainter &p, const QRectF &innerRect, double innerRadius, double value)
{
if (m_format.isEmpty())
return;
// !!! to revise
QFont f(font());
f.setPixelSize(innerRadius * qMax(0.05, (0.35 - (double)m_decimals * 0.08)));
p.setFont(f);
QRectF textRect(innerRect);
p.setPen(palette().text().color());
p.drawText(textRect, Qt::AlignCenter, valueToText(value));
}
QString QRoundProgressBar::valueToText(double value) const
{
QString textToDraw(m_format);
if (m_updateFlags & UF_VALUE)
textToDraw.replace("%v", QString::number(value, 'f', m_decimals));
if (m_updateFlags & UF_PERCENT)
{
double procent = (value - m_min) / (m_max - m_min) * 100.0;
textToDraw.replace("%p", QString::number(procent, 'f', m_decimals));
}
if (m_updateFlags & UF_MAX)
textToDraw.replace("%m", QString::number(m_max - m_min + 1, 'f', m_decimals));
return textToDraw;
}
void QRoundProgressBar::valueFormatChanged()
{
m_updateFlags = 0;
if (m_format.contains("%v"))
m_updateFlags |= UF_VALUE;
if (m_format.contains("%p"))
m_updateFlags |= UF_PERCENT;
if (m_format.contains("%m"))
m_updateFlags |= UF_MAX;
update();
}
void QRoundProgressBar::rebuildDataBrushIfNeeded()
{
if (m_rebuildBrush)
{
m_rebuildBrush = false;
QConicalGradient dataBrush;
dataBrush.setCenter(0.5,0.5);
dataBrush.setCoordinateMode(QGradient::StretchToDeviceMode);
// invert colors
for (int i = 0; i < m_gradientData.count(); i++)
{
dataBrush.setColorAt(1.0 - m_gradientData.at(i).first, m_gradientData.at(i).second);
}
// angle
dataBrush.setAngle(m_nullPosition);
QPalette p(palette());
p.setBrush(QPalette::Highlight, dataBrush);
setPalette(p);
}
}
================================================
FILE: libs/3dparty/QRoundProgressBar.h
================================================
/*
* QRoundProgressBar - a circular progress bar Qt widget.
*
* Sintegrial Technologies (c) 2015-now
*
* The software is freeware and is distributed "as is" with the complete source codes.
* Anybody is free to use it in any software projects, either commercial or non-commercial.
* Please do not remove this copyright message and remain the name of the author unchanged.
*
* It is very appreciated if you produce some feedback to us case you are going to use
* the software.
*
* Please send your questions, suggestions, and information about found issues to the
*
* sintegrial@gmail.com
*
*/
#ifndef QROUNDPROGRESSBAR_H
#define QROUNDPROGRESSBAR_H
#include <QWidget>
#include "3dparty_global.h"
/**
* @brief The QRoundProgressBar class represents a circular progress bar and maintains its API
* similar to the *QProgressBar*.
*
* ### Styles
* QRoundProgressBar currently supports Donut, Pie and Line styles. See setBarStyle() for more details.
*
* ### Colors
* Generally QRoundProgressBar uses its palette and font attributes to define how it will look.
*
* The following \a QPalette members are considered:
* - *QPalette::Window* background of the whole widget (normally should be set to Qt::NoBrush)
* - *QPalette::Base* background of the non-filled progress bar area (should be set to Qt::NoBrush to make it transparent)
* - *QPalette::AlternateBase* background of the central circle where the text is shown (for \a Donut style)
* - *QPalette::Shadow* foreground of the non-filled progress bar area (i.e. border color)
* - *QPalette::Highlight* background of the filled progress bar area
* - *QPalette::Text* color of the text shown in the center
*
* Create a \a QPalette with given attributes and apply it via `setPalette()`.
*
* ### Color gradient
* \a Donut and \a Pie styles allow to use color gradient for currernt value area instead of plain brush fill.
* See setDataColors() for more details.
*
* ### Value text
* Value text is generally drawn inside the QRoundProgressBar using its `font()` and \a QPalette::Text role from its `palette()`.
*
* To define pattern of the text, use setFormat() function (see Qt's \a QProgressBar for more details).
*
* To define number of decimals to be shown, use setDecimals() function.
*
* ### Font
* To use own font for value text, apply it via `setFont()`.
*
* By default, font size will be adjusted automatically to fit the inner circle of the widget.
*/
class THIRDPARTY_EXPORT QRoundProgressBar : public QWidget
{
Q_OBJECT
public:
explicit QRoundProgressBar(QWidget *parent = 0);
static const int PositionLeft = 180;
static const int PositionTop = 90;
static const int PositionRight = 0;
static const int PositionBottom = -90;
/**
* @brief Return position (in degrees) of minimum value.
* \sa setNullPosition
*/
double nullPosition() const { return m_nullPosition; }
/**
* @brief Defines position of minimum value.
* @param position position on the circle (in degrees) of minimum value
* \sa nullPosition
*/
void setNullPosition(double position);
/**
* @brief The BarStyle enum defines general look of the progress bar.
*/
enum BarStyle
{
/// Donut style (filled torus around the text)
StyleDonut,
/// Pie style (filled pie segment with the text in center)
StylePie,
/// Line style (thin round line around the text)
StyleLine
};
/**
* @brief Sets visual style of the widget.
* \sa barStyle
*/
void setBarStyle(BarStyle style);
/**
* @brief Returns current progree bar style.
* \sa setBarStyle
*/
BarStyle barStyle() const { return m_barStyle; }
/**
* @brief Sets width of the outline circle pen.
* @param penWidth width of the outline circle pen (in pixels)
*/
void setOutlinePenWidth(double penWidth);
/**
* @brief Returns width of the outline circle pen.
*/
double outlinePenWidth() const { return m_outlinePenWidth; }
/**
* @brief Sets width of the data circle pen.
* @param penWidth width of the data circle pen (in pixels)
*/
void setDataPenWidth(double penWidth);
/**
* @brief Returns width of the data circle pen.
*/
double dataPenWidth() const { return m_dataPenWidth; }
/**
* @brief Sets colors of the visible data and makes gradient brush from them.
* Gradient colors can be set for \a Donut and \a Pie styles (see setBarStyle() function).
*
* *Warning*: this function will override widget's `palette()` to set dynamically created gradient brush.
*
* @param stopPoints List of colors (should have at least 2 values, see Qt's \a QGradientStops for more details).
* Color value at point 0 corresponds to the minimum() value, while color value at point 1
* corresponds to the maximum(). Other colors will be distributed accordingly to the defined ranges (see setRange()).
*/
void setDataColors(const QGradientStops& stopPoints);
/**
* @brief Defines the string used to generate the current text.
* If no format is set, no text will be shown.
* @param format see \a QProgressBar's format description
* \sa setDecimals
*/
void setFormat(const QString& format);
/**
* @brief Sets format string to empty string. No text will be shown therefore.
* See setFormat() for more information.
*/
void resetFormat();
/**
* @brief Returns the string used to generate the current text.
*/
QString format() const { return m_format; }
/**
* @brief Sets number of decimals to show after the comma (default is 1).
* \sa setFormat
*/
void setDecimals(int count);
/**
* @brief Returns number of decimals to show after the comma (default is 1).
* \sa setFormat, setDecimals
*/
int decimals() const { return m_decimals; }
/**
* @brief Returns current value shown on the widget.
* \sa setValue()
*/
double value() const { return m_value; }
/**
* @brief Returns minimum of the allowed value range.
* \sa setMinimum, setRange
*/
double minimum() const { return m_min; }
/**
* @brief Returns maximum of the allowed value range.
* \sa setMaximum, setRange
*/
double maximum() const { return m_max; }
public Q_SLOTS:
/**
* @brief Defines minimum und maximum of the allowed value range.
* If the current value does not fit into the range, it will be automatically adjusted.
* @param min minimum of the allowed value range
* @param max maximum of the allowed value range
*/
void setRange(double min, double max);
/**
* @brief Defines minimum of the allowed value range.
* If the current value does not fit into the range, it will be automatically adjusted.
* @param min minimum of the allowed value range
* \sa setRange
*/
void setMinimum(double min);
/**
* @brief Defines maximum of the allowed value range.
* If the current value does not fit into the range, it will be automatically adjusted.
* @param max maximum of the allowed value range
* \sa setRange
*/
void setMaximum(double max);
/**
* @brief Sets a value which will be shown on the widget.
* @param val must be between minimum() and maximum()
*/
void setValue(double val);
/**
* @brief Integer version of the previous slot.
* @param val must be between minimum() and maximum()
*/
void setValue(int val);
protected:
virtual void paintEvent(QPaintEvent *event);
virtual void drawBackground(QPainter& p, const QRectF& baseRect);
virtual void drawBase(QPainter& p, const QRectF& baseRect);
virtual void drawValue(QPainter& p, const QRectF& baseRect, double value, double arcLength);
virtual void calculateInnerRect(const QRectF& baseRect, double outerRadius, QRectF& innerRect, double& innerRadius);
virtual void drawInnerBackground(QPainter& p, const QRectF& innerRect);
virtual void drawText(QPainter& p, const QRectF& innerRect, double innerRadius, double value);
virtual QString valueToText(double value) const;
virtual void valueFormatChanged();
virtual QSize minimumSizeHint() const { return QSize(32,32); }
virtual bool hasHeightForWidth() const { return true; }
virtual int heightForWidth(int w) const { return w; }
void rebuildDataBrushIfNeeded();
double m_min, m_max;
double m_value;
double m_nullPosition;
BarStyle m_barStyle;
double m_outlinePenWidth, m_dataPenWidth;
QGradientStops m_gradientData;
bool m_rebuildBrush;
QString m_format;
int m_decimals;
static const int UF_VALUE = 1;
static const int UF_PERCENT = 2;
static const int UF_MAX = 4;
int m_updateFlags;
};
#endif // QROUNDPROGRESSBAR_H
================================================
FILE: libs/3dparty/flowlayout.cpp
================================================
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtWidgets>
#include "flowlayout.h"
FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int vSpacing)
: QLayout(parent), m_hSpace(hSpacing), m_vSpace(vSpacing)
{
setContentsMargins(margin, margin, margin, margin);
}
FlowLayout::FlowLayout(int margin, int hSpacing, int vSpacing)
: m_hSpace(hSpacing), m_vSpace(vSpacing)
{
setContentsMargins(margin, margin, margin, margin);
}
FlowLayout::~FlowLayout()
{
clear();
}
void FlowLayout::clear()
{
QLayoutItem *item;
while ((item = takeAt(0)))
delete item;
}
void FlowLayout::addItem(QLayoutItem *item)
{
itemList.append(item);
}
int FlowLayout::horizontalSpacing() const
{
if (m_hSpace >= 0) {
return m_hSpace;
} else {
return smartSpacing(QStyle::PM_LayoutHorizontalSpacing);
}
}
int FlowLayout::verticalSpacing() const
{
if (m_vSpace >= 0) {
return m_vSpace;
} else {
return smartSpacing(QStyle::PM_LayoutVerticalSpacing);
}
}
int FlowLayout::count() const
{
return itemList.size();
}
QLayoutItem *FlowLayout::itemAt(int index) const
{
return itemList.value(index);
}
QLayoutItem *FlowLayout::takeAt(int index)
{
if (index >= 0 && index < itemList.size())
return itemList.takeAt(index);
else
return 0;
}
Qt::Orientations FlowLayout::expandingDirections() const
{
return 0;
}
bool FlowLayout::hasHeightForWidth() const
{
return true;
}
int FlowLayout::heightForWidth(int width) const
{
int height = doLayout(QRect(0, 0, width, 0), true);
return height;
}
void FlowLayout::setGeometry(const QRect &rect)
{
QLayout::setGeometry(rect);
doLayout(rect, false);
}
QSize FlowLayout::sizeHint() const
{
return minimumSize();
}
QSize FlowLayout::minimumSize() const
{
QSize size;
QLayoutItem *item;
foreach (item, itemList)
size = size.expandedTo(item->minimumSize());
size += QSize(2*margin(), 2*margin());
return size;
}
int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
{
int left, top, right, bottom;
getContentsMargins(&left, &top, &right, &bottom);
QRect effectiveRect = rect.adjusted(+left, +top, -right, -bottom);
int x = effectiveRect.x();
int y = effectiveRect.y();
int lineHeight = 0;
QLayoutItem *item;
foreach (item, itemList) {
QWidget *wid = item->widget();
int spaceX = horizontalSpacing();
if (spaceX == -1)
spaceX = wid->style()->layoutSpacing(
QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Horizontal);
int spaceY = verticalSpacing();
if (spaceY == -1)
spaceY = wid->style()->layoutSpacing(
QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Vertical);
int nextX = x + item->sizeHint().width() + spaceX;
if (nextX - spaceX > effectiveRect.right() && lineHeight > 0) {
x = effectiveRect.x();
y = y + lineHeight + spaceY;
nextX = x + item->sizeHint().width() + spaceX;
lineHeight = 0;
}
if (!testOnly)
item->setGeometry(QRect(QPoint(x, y), item->sizeHint()));
x = nextX;
lineHeight = qMax(lineHeight, item->sizeHint().height());
}
return y + lineHeight - rect.y() + bottom;
}
int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const
{
QObject *parent = this->parent();
if (!parent) {
return -1;
} else if (parent->isWidgetType()) {
QWidget *pw = static_cast<QWidget *>(parent);
return pw->style()->pixelMetric(pm, 0, pw);
} else {
return static_cast<QLayout *>(parent)->spacing();
}
}
================================================
FILE: libs/3dparty/flowlayout.h
================================================
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef FLOWLAYOUT_H
#define FLOWLAYOUT_H
#include <QLayout>
#include <QRect>
#include <QStyle>
#include "3dparty_global.h"
class THIRDPARTY_EXPORT FlowLayout : public QLayout
{
public:
explicit FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1);
explicit FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1);
~FlowLayout();
void clear();
void addItem(QLayoutItem *item) Q_DECL_OVERRIDE;
int horizontalSpacing() const;
int verticalSpacing() const;
Qt::Orientations expandingDirections() const Q_DECL_OVERRIDE;
bool hasHeightForWidth() const Q_DECL_OVERRIDE;
int heightForWidth(int) const Q_DECL_OVERRIDE;
int count() const Q_DECL_OVERRIDE;
QLayoutItem *itemAt(int index) const Q_DECL_OVERRIDE;
QSize minimumSize() const Q_DECL_OVERRIDE;
void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
QSize sizeHint() const Q_DECL_OVERRIDE;
QLayoutItem *takeAt(int index) Q_DECL_OVERRIDE;
private:
int doLayout(const QRect &rect, bool testOnly) const;
int smartSpacing(QStyle::PixelMetric pm) const;
QList<QLayoutItem *> itemList;
int m_hSpace;
int m_vSpace;
};
#endif // FLOWLAYOUT_H
================================================
FILE: libs/libs.pro
================================================
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += \
utils \
vtkutils \
widgets \
3dparty
================================================
FILE: libs/utils/colorseries.cpp
================================================
#include "colorseries.h"
namespace Utils
{
typedef QList<QColor> ColorList;
static inline QColor hexToColor(QRgb num)
{
return QColor(qRed(num), qGreen(num), qBlue(num));
}
class ColorSeriesPrivate
{
public:
static ColorList sSpectrumColorList;
static ColorList sWarmColorList;
static ColorList sCoolColorList;
static ColorList sBluesColorList;
static ColorList sWildFlowerColorList;
static ColorList sCitrusColorList;
ColorSeries::Scheme currentScheme = ColorSeries::Warm;
int colorCounter = 0;
};
ColorList ColorSeriesPrivate::sSpectrumColorList = ColorList()
<< QColor::fromRgb(0x000000) << QColor::fromRgb(0xE41A1C) << QColor::fromRgb(0x377EB8)
<< QColor::fromRgb(0x4DAF4A) << QColor::fromRgb(0x984EA3) << QColor::fromRgb(0xFF7F00) << QColor::fromRgb(0xA65628);
ColorList ColorSeriesPrivate::sWarmColorList = ColorList()
<< QColor::fromRgb(0x791717) << QColor::fromRgb(0xB50101) << QColor::fromRgb(0xEF4719)
<< QColor::fromRgb(0xF98324) << QColor::fromRgb(0xFFB400) << QColor::fromRgb(0xFFE506);
ColorList ColorSeriesPrivate::sCoolColorList = ColorList()
<< QColor::fromRgb(0x75B101) << QColor::fromRgb(0x588029) << QColor::fromRgb(0x50D7BF)
<< QColor::fromRgb(0x1C95CD) << QColor::fromRgb(0x3B68AB) << QColor::fromRgb(0x9A68FF) << QColor::fromRgb(0x5F3380);
ColorList ColorSeriesPrivate::sBluesColorList = ColorList()
<< QColor::fromRgb(0x3B68AB) << QColor::fromRgb(0x1C95CD) << QColor::fromRgb(0x4ED9EA)
<< QColor::fromRgb(0x739AD5) << QColor::fromRgb(0x423DA9) << QColor::fromRgb(0x505487) << QColor::fromRgb(0x102A52);
ColorList ColorSeriesPrivate::sWildFlowerColorList = ColorList()
<< QColor::fromRgb(0x1C95CD) << QColor::fromRgb(0x3B68AB) << QColor::fromRgb(0x663EB7)
<< QColor::fromRgb(0xA254CF) << QColor::fromRgb(0xDE61CE) << QColor::fromRgb(0xDC6195) << QColor::fromRgb(0x3D1052);
ColorList ColorSeriesPrivate::sCitrusColorList = ColorList()
<< QColor::fromRgb(0x657C37) << QColor::fromRgb(0x75B101) << QColor::fromRgb(0xB2BA30)
<< QColor::fromRgb(0xFFE506) << QColor::fromRgb(0xFFB400) << QColor::fromRgb(0xF98324);
ColorSeries::ColorSeries()
{
d_ptr = new ColorSeriesPrivate;
}
ColorSeries::~ColorSeries()
{
delete d_ptr;
}
void ColorSeries::setScheme(ColorSeries::Scheme scheme)
{
if (d_ptr->currentScheme != scheme) {
d_ptr->currentScheme = scheme;
d_ptr->colorCounter = 0;
}
}
ColorSeries::Scheme ColorSeries::scheme() const
{
return d_ptr->currentScheme;
}
QColor ColorSeries::color(int index) const
{
switch (d_ptr->currentScheme) {
case Spectrum:
return d_ptr->sSpectrumColorList.at(index % d_ptr->sSpectrumColorList.size());
case Warm:
return d_ptr->sWarmColorList.at(index % d_ptr->sWarmColorList.size());
case Cool:
return d_ptr->sCoolColorList.at(index % d_ptr->sCoolColorList.size());
case Blues:
return d_ptr->sBluesColorList.at(index % d_ptr->sBluesColorList.size());
case WildFlower:
return d_ptr->sWildFlowerColorList.at(index % d_ptr->sWildFlowerColorList.size());
case Citrus:
return d_ptr->sCitrusColorList.at(index % d_ptr->sCitrusColorList.size());
}
return Qt::black;
}
QColor ColorSeries::nextColor() const
{
return color(d_ptr->colorCounter++);
}
} // namespace Utils
================================================
FILE: libs/utils/colorseries.h
================================================
#ifndef COLORSERIES_H
#define COLORSERIES_H
#include <QColor>
#include "utils_global.h"
namespace Utils
{
class ColorSeriesPrivate;
class UTILS_EXPORT ColorSeries
{
public:
enum Scheme { Spectrum, Warm, Cool, Blues, WildFlower, Citrus };
ColorSeries();
~ColorSeries();
void setScheme(Scheme scheme);
Scheme scheme() const;
QColor color(int index) const;
QColor nextColor() const;
private:
ColorSeriesPrivate* d_ptr;
Q_DISABLE_COPY(ColorSeries)
};
} // namespace Utils
#endif // COLORSERIES_H
================================================
FILE: libs/utils/doublespinboxdelegate.cpp
================================================
#include "doublespinboxdelegate.h"
#include <QDoubleSpinBox>
namespace Utils
{
DoubleSpinBoxDelegate::DoubleSpinBoxDelegate(QObject *parent)
: QStyledItemDelegate(parent)
{
}
QWidget *DoubleSpinBoxDelegate::createEditor(QWidget *parent,
const QStyleOptionViewItem &/* option */,
const QModelIndex &/* index */) const
{
QDoubleSpinBox *editor = new QDoubleSpinBox(parent);
editor->setSingleStep(0.1);
editor->setFrame(false);
editor->setDecimals(2);
editor->setMinimum(-INT_MAX);
editor->setMaximum(INT_MAX);
return editor;
}
void DoubleSpinBoxDelegate::setEditorData(QWidget *editor,
const QModelIndex &index) const
{
qreal value = index.model()->data(index, Qt::EditRole).toDouble();
QDoubleSpinBox *spinBox = static_cast<QDoubleSpinBox*>(editor);
spinBox->setValue(value);
}
void DoubleSpinBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const
{
QDoubleSpinBox *spinBox = static_cast<QDoubleSpinBox*>(editor);
spinBox->interpretText();
qreal value = spinBox->value();
model->setData(index, value, Qt::EditRole);
}
void DoubleSpinBoxDelegate::updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option, const QModelIndex &/* index */) const
{
editor->setGeometry(option.rect);
}
} // namespace Utils
================================================
FILE: libs/utils/doublespinboxdelegate.h
================================================
#ifndef DOUBLESPINBOXDELEGATE_H
#define DOUBLESPINBOXDELEGATE_H
#include <QStyledItemDelegate>
#include "utils_global.h"
namespace Utils
{
class UTILS_EXPORT DoubleSpinBoxDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
DoubleSpinBoxDelegate(QObject *parent = 0);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const Q_DECL_OVERRIDE;
void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const Q_DECL_OVERRIDE;
void updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
};
} // namespace Utils
#endif
================================================
FILE: libs/utils/iplugin.h
================================================
#ifndef IPLUGIN_H
#define IPLUGIN_H
#include <QtPlugin>
namespace Utils {
/*!
* \class IPlugin
* \brief 类 IPlugin 是所有插件的基类.
*
* IPlugin 是一个抽象类, 每一个插件都必须实现它.
*/
class IPlugin
{
public:
virtual ~IPlugin() {}
/*!
* \brief 插件的初始化.
*
* 在这里可以利用动作管理器初始化与插件相关的动作, 快捷键, 菜单等.
* \param arguments 应用启动时带的参数
* \param parent 一般是主窗口对象
* \param errorString 输出参数, 插件初始化出错的描述
* \return 成功初始化返回true, 否则返回false
*/
// virtual bool initialize(const QStringList &arguments, QObject* parent, QString *errorString) = 0;
/*!
* \brief 插件的二次初始化.
*
* 当插件的初始化需花费大量时间时, 可使用二次初始化的方法, 在第一次初始化后, 显示应用的主窗口,
* 然后进行第二次初始化.
* \return 成功初始化返回true, 否则返回false
*/
// virtual bool delayedInitialize() { return false; }
};
}
Q_DECLARE_INTERFACE(Utils::IPlugin, "QVTKDemos.IPlugin")
#endif // IPLUGIN_H
================================================
FILE: libs/utils/ivtkplugin.cpp
================================================
#include "ivtkplugin.h"
namespace Utils
{
IVtkPlugin::IVtkPlugin()
{
}
IVtkPlugin::~IVtkPlugin()
{
}
}
================================================
FILE: libs/utils/ivtkplugin.h
================================================
#ifndef IVTKPLUGIN_H
#define IVTKPLUGIN_H
#include "iplugin.h"
#include "utils_global.h"
namespace Utils
{
class UTILS_EXPORT IVtkPlugin : public IPlugin
{
public:
IVtkPlugin();
virtual ~IVtkPlugin();
virtual QString category() const = 0;
virtual QList<QWidget*> examples() const = 0;
virtual QStringList keywords() const = 0;
};
} // namespace Utils
Q_DECLARE_INTERFACE(Utils::IVtkPlugin, "QVTKDemos.IVtkPlugin")
#endif
================================================
FILE: libs/utils/modeltopointsconverter.cpp
================================================
#include "modeltopointsconverter.h"
#include <QDebug>
namespace Utils
{
ModelToPointsConverter::ModelToPointsConverter(TableModel* model) : m_model(model)
{
}
QList<Point3F> ModelToPointsConverter::points() const
{
return m_points;
}
void ModelToPointsConverter::run()
{
if (!m_model) {
qDebug() << "ModelToPointsConverter::run: null model.";
emit finished();
return;
}
int rows = m_model->rowCount();
int cols = m_model->columnCount();
if (cols < 3) {
emit finished();
qDebug() << "ModelToPointsConverter::run: insufficient columns.";
return;
}
for (int i = 0; i < rows; ++i) {
Point3F pot{m_model->data(i, 0), m_model->data(i, 1), m_model->data(i, 2)};
m_points.append(pot);
}
emit finished();
}
} // namespace Utils
================================================
FILE: libs/utils/modeltopointsconverter.h
================================================
#ifndef MODELTOPOINTSCONVERTER_H
#define MODELTOPOINTSCONVERTER_H
#include "signalledrunable.h"
#include "utils.h"
#include "tablemodel.h"
#include "point3f.h"
namespace Utils
{
class UTILS_EXPORT ModelToPointsConverter : public SignalledRunnable
{
Q_OBJECT
public:
explicit ModelToPointsConverter(TableModel* model);
QList<Point3F> points() const;
void run();
private:
TableModel* m_model = nullptr;
QList<Point3F> m_points;
};
} // namespace Utils
#endif // MODELTOPOINTSCONVERTER_H
================================================
FILE: libs/utils/modeltovectorsconverter.cpp
================================================
#include "modeltovectorsconverter.h"
#include "tablemodel.h"
#include <QDebug>
namespace Utils
{
ModelToVectorsConverter::ModelToVectorsConverter(TableModel* model) : m_model(model)
{
}
void ModelToVectorsConverter::run()
{
if (!m_model) {
qDebug() << "ModelToVectorsConverter::run: null model.";
emit finished();
return;
}
int rows = m_model->rowCount();
int cols = m_model->columnCount();
if (cols < 4) {
emit finished();
qDebug() << "ModelToVectorsConverter::run: insufficient columns.";
return;
}
for (int i = 0; i < rows; ++i) {
Vector4F vec{m_model->data(i, 0), m_model->data(i, 1), m_model->data(i, 2), m_model->data(i, 3)};
m_vectors.append(vec);
}
emit finished();
}
QList<Vector4F> ModelToVectorsConverter::vectors() const
{
return m_vectors;
}
} // namespace Utils
================================================
FILE: libs/utils/modeltovectorsconverter.h
================================================
#ifndef MODELTOVECTORSCONVERTER_H
#define MODELTOVECTORSCONVERTER_H
#include "signalledrunable.h"
#include "utils.h"
#include "vector4f.h"
namespace Utils
{
class TableModel;
class UTILS_EXPORT ModelToVectorsConverter : public SignalledRunnable
{
Q_OBJECT
public:
ModelToVectorsConverter(TableModel* model);
void run();
QList<Vector4F> vectors() const;
private:
QList<Vector4F> m_vectors;
TableModel* m_model = nullptr;
};
} // namespace Utils
#endif // MODELTOVECTORSCONVERTER_H
================================================
FILE: libs/utils/point3f.cpp
================================================
#include "point3f.h"
================================================
FILE: libs/utils/point3f.h
================================================
#ifndef POINT3F_H
#define POINT3F_H
#include "utils_global.h"
namespace Utils
{
struct UTILS_EXPORT Point3F
{
qreal x;
qreal y;
qreal z;
} ;
} // namespace Utils
#endif // POINT3F_H
================================================
FILE: libs/utils/pointsreader.cpp
================================================
#include "pointsreader.h"
#include <QFile>
#include <QTextStream>
#include <QDebug>
namespace Utils
{
PointsReader::PointsReader(const QString& file) : m_file(file)
{
}
void PointsReader::run()
{
QFile file(m_file);
if (!file.open(QIODevice::ReadOnly)) {
qDebug() << QString("PointsReader::run() : cannot open file \"%1\" for reading.").arg(m_file);
return;
}
QTextStream ts(&file);
QString line;
QStringList parts;
while (!ts.atEnd()) {
line = ts.readLine();
parts = line.split('\t'); // separated by tab
parts.removeAll(QString()); // remove empty strings
if (parts.size() == 3)
m_points.append(Point3F{parts.at(0).toDouble(), parts.at(1).toDouble(), parts.at(2).toDouble()});
}
emit finished();
}
const QList<Point3F>& PointsReader::points() const
{
return m_points;
}
} // namespace Utils
================================================
FILE: libs/utils/pointsreader.h
================================================
#ifndef POINTSREADER_H
#define POINTSREADER_H
#include <QRunnable>
#include "signalledrunable.h"
#include "utils.h"
#include "point3f.h"
#include "utils_global.h"
namespace Utils
{
class UTILS_EXPORT PointsReader : public SignalledRunnable
{
Q_OBJECT
public:
explicit PointsReader(const QString& file);
void run();
const QList<Point3F>& points() const;
private:
QString m_file;
QList<Point3F> m_points;
};
} // namespace Utils
#endif // POINTSREADER_H
================================================
FILE: libs/utils/pointstomodelconverter.cpp
================================================
#include "pointstomodelconverter.h"
#include "tablemodel.h"
#include <QDebug>
namespace Utils
{
PointsToModelConverter::PointsToModelConverter(const QList<Point3F>& points, TableModel* model) :
m_points(points), m_model(model)
{
}
void PointsToModelConverter::run()
{
if (!m_model) {
qDebug() << "PointsToModelConverter::run : null model.";
emit finished();
return;
}
m_model->resize(3, m_points.size());
m_model->blockSignals(true);
for (int i = 0; i < m_points.size(); ++i) {
m_model->setData(i, 0, m_points.at(i).x);
m_model->setData(i, 1, m_points.at(i).y);
m_model->setData(i, 2, m_points.at(i).z);
}
m_model->blockSignals(false);
emit finished();
}
} // namespace Utils
================================================
FILE: libs/utils/pointstomodelconverter.h
================================================
#ifndef POINTSTOMODELCONVERTER_H
#define POINTSTOMODELCONVERTER_H
#include <QObject>
#include <QRunnable>
#include "utils.h"
#include "point3f.h"
#include "signalledrunable.h"
#include "utils_global.h"
namespace Utils
{
class TableModel;
class UTILS_EXPORT PointsToModelConverter : public SignalledRunnable
{
Q_OBJECT
public:
PointsToModelConverter(const QList<Point3F>& points, TableModel* model);
void run();
private:
QList<Point3F> m_points;
TableModel* m_model = nullptr;
};
} // namespace Utils
#endif // POINTSTOMODELCONVERTER_H
================================================
FILE: libs/utils/signalblocker.cpp
================================================
#include "signalblocker.h"
namespace Utils
{
SignalBlocker::SignalBlocker(QObject* object)
{
addObject(object);
}
void SignalBlocker::addObject(QObject* object)
{
if (object) {
object->blockSignals(true);
m_objectList.append(object);
}
}
SignalBlocker::~SignalBlocker()
{
foreach (QObject* obj, m_objectList)
obj->blockSignals(false);
}
} // namespace Utils
================================================
FILE: libs/utils/signalblocker.h
================================================
#ifndef SIGNALBLOCKER_H
#define SIGNALBLOCKER_H
#include <QObject>
#include "utils_global.h"
namespace Utils
{
class UTILS_EXPORT SignalBlocker
{
public:
explicit SignalBlocker(QObject* object = nullptr);
~SignalBlocker();
void addObject(QObject* object);
private:
QObjectList m_objectList;
};
} // namespace Utils
#endif // SIGNALBLOCKER_H
================================================
FILE: libs/utils/signalledrunable.cpp
================================================
#include "signalledrunable.h"
namespace Utils
{
SignalledRunnable::SignalledRunnable()
{
}
} // namespace Utils
================================================
FILE: libs/utils/signalledrunable.h
================================================
#ifndef SIGNALLEDRUNNABLE_H
#define SIGNALLEDRUNNABLE_H
#include <QObject>
#include <QRunnable>
#include "utils_global.h"
namespace Utils
{
class UTILS_EXPORT SignalledRunnable : public QObject, public QRunnable
{
Q_OBJECT
public:
SignalledRunnable();
signals:
void finished();
};
} // namespace Utils
#endif // SIGNALLEDRUNABLE_H
================================================
FILE: libs/utils/tablemodel.cpp
================================================
#include "tablemodel.h"
#include "utils.h"
#include <QDebug>
namespace Utils
{
TableModel::TableModel(int column, int row, QObject* parent) : QAbstractTableModel(parent), m_cols(column), m_rows(row)
{
m_cols = column;
m_rows = row;
// m_data
for (int i = 0; i < m_rows; i++) {
QVector<qreal>* dataVec = new QVector<qreal>(m_cols);
for (int k = 0; k < dataVec->size(); k++) {
if (k % 2 == 0)
dataVec->replace(k, i * 50 + qrand() % 20);
else
dataVec->replace(k, qrand() % 100);
}
m_data.append(dataVec);
}
}
TableModel::~TableModel()
{
clear();
}
void TableModel::random(int min, int max)
{
m_randomMin = min;
m_randomMax = max;
for (int r = 0; r < m_rows; ++r) {
for (int c = 0; c < m_cols; ++c) {
auto vecPtr = m_data[r];
vecPtr->replace(c, Utils::random(m_randomMin, m_randomMax));
}
}
emit layoutChanged();
}
void TableModel::resize(int column, int row)
{
if (m_cols == column && m_rows == row) {
// qDebug() << "TableModel::resize: same cols & rows.";
return;
}
if (m_cols != column)
emit columnsChanged(m_cols, column);
if (m_rows != row)
emit rowsChanged(m_rows, row);
qDeleteAll(m_data);
m_data.clear();
m_cols = column;
m_rows = row;
// m_data
for (int i = 0; i < m_rows; i++) {
QVector<qreal>* dataVec = new QVector<qreal>(m_cols);
for (int k = 0; k < dataVec->size(); k++)
dataVec->replace(k, qreal());
m_data.append(dataVec);
}
}
void TableModel::clear()
{
qDeleteAll(m_data);
m_data.clear();
m_rows = 0;
m_cols = 0;
emit layoutChanged();
}
int TableModel::randomMin()
{
return m_randomMin;
}
int TableModel::randomMax()
{
return m_randomMax;
}
void TableModel::setHorizontalHeaderData(const QVariantList& data)
{
if (m_horHeaderData != data) {
m_horHeaderData = data;
emit layoutChanged();
}
}
QVariantList TableModel::horizontalHeaderData() const
{
return m_horHeaderData;
}
void TableModel::setVerticalHeaderData(const QVariantList& data)
{
if (m_verHeaderData != data) {
m_verHeaderData = data;
emit layoutChanged();
}
}
QVariantList TableModel::verticalHeaderData() const
{
return m_verHeaderData;
}
int TableModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return m_rows;
}
int TableModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return m_cols;
}
QVariant TableModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if (role != Qt::DisplayRole)
return QVariant();
if (orientation == Qt::Horizontal) {
if (!m_horHeaderData.isEmpty() && m_horHeaderData.size() > section)
return m_horHeaderData.at(section);
else
return QString("%1").arg(section + 1);
}
if (orientation == Qt::Vertical) {
if (!m_verHeaderData.isEmpty() && m_verHeaderData.size() > section)
return m_verHeaderData.at(section);
else
return QString("%1").arg(section + 1);
}
}
QVariant TableModel::data(const QModelIndex &index, int role) const
{
if (role == Qt::DisplayRole) {
return m_data[index.row()]->at(index.column());
} else if (role == Qt::EditRole) {
return m_data[index.row()]->at(index.column());
}
return QVariant();
}
qreal TableModel::data(int row, int col) const
{
return m_data[row]->at(col);
}
bool TableModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
if (index.isValid() && role == Qt::EditRole) {
m_data[index.row()]->replace(index.column(), value.toDouble());
emit dataChanged(index, index);
return true;
}
return false;
}
bool TableModel::setData(int row, int column, const QVariant& value)
{
QModelIndex index = this->createIndex(row, column);
return setData(index, value);
}
Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
{
return QAbstractItemModel::flags(index) | Qt::ItemIsEditable;
}
} // namespace Utils
================================================
FILE: libs/utils/tablemodel.h
================================================
#ifndef TABLEMODEL_H
#define TABLEMODEL_H
#include <QAbstractTableModel>
#include "utils_global.h"
namespace Utils
{
class UTILS_EXPORT TableModel : public QAbstractTableModel
{
Q_OBJECT
public:
explicit TableModel(int column, int row, QObject* parent = nullptr);
virtual ~TableModel();
void random(int min = -5, int max = 5);
void resize(int column, int row);
void clear();
int randomMin();
int randomMax();
void setHorizontalHeaderData(const QVariantList& data);
QVariantList horizontalHeaderData() const;
void setVerticalHeaderData(const QVariantList& data);
QVariantList verticalHeaderData() const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
qreal data(int row, int col) const;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
bool setData(int row, int column, const QVariant& value);
Qt::ItemFlags flags(const QModelIndex &index) const;
signals:
void rowsChanged(int oldRows, int newRows);
void columnsChanged(int oldCols, int newCols);
private:
QList<QVector<qreal> * > m_data;
QVariantList m_horHeaderData;
QVariantList m_verHeaderData;
int m_cols = 3;
int m_rows = 30;
int m_randomMin = -1;
int m_randomMax = 1;
};
} // namespace Utils
#endif // TABLEMODEL_H
================================================
FILE: libs/utils/utils.cpp
================================================
#include "utils.h"
#include <QProcess>
#include <QPainter>
const float Pi = 3.14159f;
namespace Utils
{
QString character(int index)
{
char baseChar = 'x';
QString strChar = QString("%1").arg((char)(baseChar + index % 26));
return strChar;
}
void explorer(const QString &path)
{
#ifdef Q_OS_WIN
QString tmpPath(path);
QStringList params;
params << "/select," << tmpPath.replace("/", "\\");
QProcess::startDetached("explorer.exe", params);
#endif
}
QImage star(const QSize& size)
{
QPainterPath starPath;
starPath.moveTo(30, 15);
for (int i = 1; i < 5; ++i) {
starPath.lineTo(15 + 15 * qCos(0.8 * i * Pi),
15 + 15 * qSin(0.8 * i * Pi));
}
starPath.closeSubpath();
QImage star(size, QImage::Format_ARGB32);
star.fill(Qt::transparent);
QPainter painter(&star);
painter.setRenderHint(QPainter::Antialiasing);
painter.setPen(QRgb(0xf6a625));
painter.setBrush(painter.pen().color());
painter.drawPath(starPath);
return star;
}
double random(int low, int high)
{
double f = (double)qrand() / RAND_MAX;
return f * (high - low) + low;
}
void vtkColor(const QColor& clr, double* vtkClr)
{
double r = (double)clr.red() / 255;
double g = (double)clr.green() / 255;
double b = (double)clr.blue() / 255;
vtkClr[0] = r;
vtkClr[1] = g;
vtkClr[2] = b;
}
QColor qColor(double* pClr)
{
return QColor(pClr[0] * 255, pClr[1] * 255, pClr[2] * 255);
}
static void RGB2HSV(float r, float g, float b, float *h, float *s, float *v )
{
float min, max, delta;
min = qMin(r, qMin(g, b));
max = qMax(r, qMax(g, b));
*v = max; // v
delta = max - min;
if(max != 0) {
*s = delta / max; // s
} else {
// r = g = b = 0 // s = 0, v is undefined
*s = 0;
*h = -1;
return;
}
if( r == max )
*h = ( g - b ) / delta; // between yellow & magenta
else if( g == max )
*h = 2 + ( b - r ) / delta; // between cyan & yellow
else
*h = 4 + ( r - g ) / delta; // between magenta & cyan
*h *= 60; // degrees
if( *h < 0 )
*h += 360;
}
void qColor2HSV(const QColor& clr, double* hsv)
{
double clrArr[3];
vtkColor(clr, clrArr);
float h, s, v;
RGB2HSV(clrArr[0], clrArr[1], clrArr[2], &h, &s, &v);
hsv[0] = (float) h / 360;
hsv[1] = s;
hsv[2] = v;
}
}
================================================
FILE: libs/utils/utils.h
================================================
#ifndef UTILS_H
#define UTILS_H
#include <QImage>
#include <QColor>
#include <QtMath>
#include <complex>
#include "utils_global.h"
class vtkActor;
namespace Utils
{
// alphabetical char
QString UTILS_EXPORT character(int index);
void UTILS_EXPORT explorer(const QString& path);
QImage UTILS_EXPORT star(const QSize& size = QSize(30, 30));
// declare some util functions
double UTILS_EXPORT random(int low, int high);
template <typename T>
inline static std::complex<T> random(int low, int high)
{
std::complex<T> c(random(low, high), random(low, high));
return c;
}
// convert QColor to double[3] clr
void UTILS_EXPORT vtkColor(const QColor& clr, double* vtkClr);
QColor UTILS_EXPORT qColor(double* pClr);
void UTILS_EXPORT qColor2HSV(const QColor& clr, double* hsv);
template <typename T, int size = 3>
class ArrayComparator
{
public:
bool operator()(const T* lhs, const T* rhs)
{
for (auto i = 0; i < size; ++i) {
if (lhs[i] != rhs[i])
return false;
}
return true;
}
};
template <typename T, int size = 3>
class ArrayAssigner
{
public:
void operator()(T* lhs, const T* rhs)
{
for (auto i = 0; i < size; ++i)
lhs[i] = rhs[i];
}
};
template <typename T, int size = 3>
class ArrayInitializer
{
public:
void operator()(T* array, T value = T())
{
for (auto i = 0; i < size; ++i)
array[i] = value;
}
};
class Normalizer
{
public:
void operator()(const double* input, double* output)
{
double mod = qSqrt(input[0] * input[0] +
input[1] * input[1] +
input[2] * input[2]);
if (mod == 0) {
output[0] = input[0];
output[1] = input[1];
output[2] = input[2];
} else {
output[0] = input[0] / mod;
output[1] = input[1] / mod;
output[2] = input[2] / mod;
}
}
};
typedef QList<vtkActor*> ActorList;
template <class T>
inline void vtkSafeDelete(T* obj)
{
if (obj)
obj->Delete();
}
template <class T>
inline void vtkSafeDelete(QList<T*>& objList)
{
foreach (T* obj, objList)
obj->Delete();
objList.clear();
}
template <typename T>
inline T boundedValue(const T& value, const T& min, const T& max)
{
if (value < min)
return min;
if (value > max)
return max;
return value;
}
template <typename T>
static inline double module(T* vector)
{
return qSqrt(vector[0] * vector[0] + vector[1] * vector[1] + vector[2] * vector[2]);
}
template <typename T>
static inline double distance(T* pot1, T* pot2)
{
double dX = pot2[0] - pot1[0];
double dY = pot2[1] - pot1[1];
double dZ = pot2[2] - pot1[2];
return qSqrt(dX * dX + dY * dY + dZ * dZ);
}
/*!
* \brief 求两点的法向量.
*/
template <typename T>
static inline void normal(T* inPot1, T* inPot2, T* outPot)
{
outPot[0] = -(inPot2[1] - inPot1[1]);
outPot[1] = inPot2[0] - inPot1[0];
outPot[2] = inPot1[2];
}
} // namespace Utils
#endif
================================================
FILE: libs/utils/utils.pri
================================================
INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD
DEFINES += UTILS_LIBRARY
HEADERS += $$PWD/utils_global.h \
$$PWD/doublespinboxdelegate.h\
$$PWD/tablemodel.h \
$$PWD/utils.h \
SOURCES += $$PWD/doublespinboxdelegate.cpp \
$$PWD/tablemodel.cpp \
================================================
FILE: libs/utils/utils.pro
================================================
INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD
include(../../lib.pri)
DEFINES += UTILS_LIBRARY
HEADERS += utils_global.h \
doublespinboxdelegate.h\
tablemodel.h \
utils.h \
iplugin.h \
ivtkplugin.h \
pointsreader.h \
pointstomodelconverter.h \
signalledrunable.h \
modeltopointsconverter.h \
modeltovectorsconverter.h \
signalblocker.h \
colorseries.h \
point3f.h \
vector4f.h \
SOURCES += doublespinboxdelegate.cpp \
tablemodel.cpp \
ivtkplugin.cpp \
utils.cpp \
pointsreader.cpp \
pointstomodelconverter.cpp \
signalledrunable.cpp \
modeltopointsconverter.cpp \
modeltovectorsconverter.cpp \
signalblocker.cpp \
colorseries.cpp \
point3f.cpp \
vector4f.cpp \
================================================
FILE: libs/utils/utils_dependencies.pri
================================================
LIB_NAME = utils
LIB_DEPENDS +=
================================================
FILE: libs/utils/utils_global.h
================================================
#ifndef UTILS_GLOBAL_H
#define UTILS_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(UTILS_LIBRARY)
# define UTILS_EXPORT Q_DECL_EXPORT
#else
# define UTILS_EXPORT Q_DECL_IMPORT
#endif
#endif // UTILS_GLOBAL_H
================================================
FILE: libs/utils/vector4f.cpp
================================================
#include "vector4f.h"
================================================
FILE: libs/utils/vector4f.h
================================================
#ifndef VECTOR4F_H
#define VECTOR4F_H
#include "utils_global.h"
namespace Utils
{
struct UTILS_EXPORT Vector4F
{
qreal x;
qreal y;
qreal z;
qreal v;
};
} // namespace Utils
#endif // VECTOR4F_H
================================================
FILE: libs/vtkutils/abstractimageprocessor.cpp
================================================
#include "abstractimageprocessor.h"
namespace VtkUtils
{
AbstractImageProcessor::AbstractImageProcessor()
{
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/abstractimageprocessor.h
================================================
#ifndef ABSTRACTIMAGEPROCESSOR_H
#define ABSTRACTIMAGEPROCESSOR_H
#include "vtkutils_global.h"
#include <utils/signalledrunable.h>
#include <vtkImageGradient.h>
#include <vtkImageLaplacian.h>
#include <vtkJPEGReader.h>
namespace VtkUtils
{
class VTKUTILS_EXPORT AbstractImageProcessor : public Utils::SignalledRunnable
{
public:
AbstractImageProcessor();
void setInputData(vtkImageData* input) { m_imageData = input; }
vtkImageData* inputData() const { return m_imageData; }
protected:
vtkImageData* m_imageData = nullptr;
};
template <class T>
class ImageProcessorTempl : public AbstractImageProcessor
{
public:
ImageProcessorTempl()
{
m_algorithm = T::New();
}
T* algorithm() const { return m_algorithm; }
void run()
{
if (!m_imageData) {
emit finished();
return;
}
m_algorithm->SetInputData(m_imageData);
m_algorithm->Update();
emit finished();
}
protected:
T* m_algorithm = nullptr;
};
} // namespace VtkUtils
#endif // ABSTRACTIMAGEPROCESSOR_H
================================================
FILE: libs/vtkutils/abstractwidgetobserver.cpp
================================================
#include "abstractwidgetobserver.h"
#include <vtkInteractorObserver.h>
namespace VtkUtils
{
AbstractWidgetObserver::AbstractWidgetObserver(QObject *parent) : QObject(parent)
{
}
AbstractWidgetObserver::~AbstractWidgetObserver()
{
}
void AbstractWidgetObserver::attach(vtkInteractorObserver *widget)
{
if (widget && widget != m_widget) {
m_widget = widget;
// we only care about this specific event
m_widget->AddObserver(vtkCommand::EndInteractionEvent, this);
}
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/abstractwidgetobserver.h
================================================
#ifndef ABSTRACTWIDGETOBSERVER_H
#define ABSTRACTWIDGETOBSERVER_H
#include <QObject>
#include <vtkCommand.h>
#include "vtkutils_global.h"
class vtkInteractorObserver;
namespace VtkUtils
{
class VTKUTILS_EXPORT AbstractWidgetObserver : public QObject, public vtkCommand
{
Q_OBJECT
public:
explicit AbstractWidgetObserver(QObject *parent = 0);
virtual ~AbstractWidgetObserver();
void attach(vtkInteractorObserver* widget);
protected:
virtual void Execute(vtkObject *caller, unsigned long eventId, void* callData) = 0;
protected:
vtkInteractorObserver* m_widget = nullptr;
};
} // namespace VtkUtils
#endif // ABSTRACTWIDGETOBSERVER_H
================================================
FILE: libs/vtkutils/actorexporter.cpp
================================================
#include "actorexporter.h"
#include "vtkutils.h"
#include <vtkActor.h>
#include <vtkRenderWindow.h>
#include <vtkRenderer.h>
#include <vtkVRMLExporter.h>
namespace VtkUtils
{
ActorExporter::ActorExporter(vtkActor* actor, const QString& file) : m_actor(actor), m_exportFile(file)
{
setAutoDelete(true);
}
void ActorExporter::run()
{
if (!m_actor || m_exportFile.isEmpty())
return;
VTK_CREATE(vtkRenderWindow, renderWindow);
VTK_CREATE(vtkRenderer, renderer);
renderer->AddActor(m_actor);
renderWindow->AddRenderer(renderer);
VTK_CREATE(vtkVRMLExporter, exporter);
exporter->SetFileName(m_exportFile.toUtf8().data());
exporter->SetRenderWindow(renderWindow);
exporter->Write();
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/actorexporter.h
================================================
#ifndef ACTOREXPORTER_H
#define ACTOREXPORTER_H
#include <QRunnable>
#include <QString>
#include "vtkutils_global.h"
class vtkActor;
namespace VtkUtils
{
class VTKUTILS_EXPORT ActorExporter : public QRunnable
{
public:
ActorExporter(vtkActor* actor, const QString& file);
void run();
protected:
vtkActor* m_actor = nullptr;
QString m_exportFile;
};
} // namespace VtkUtils
#endif // ACTOREXPORTER_H
================================================
FILE: libs/vtkutils/anglewidgetobserver.cpp
================================================
#include "anglewidgetobserver.h"
#include <vtkAngleWidget.h>
#include <vtkAngleRepresentation2D.h>
#include <vtkAngleRepresentation3D.h>
namespace VtkUtils
{
AngleWidgetObserver::AngleWidgetObserver(QObject* parent) : AbstractWidgetObserver(parent)
{
}
void AngleWidgetObserver::Execute(vtkObject *caller, unsigned long eventId, void* callData)
{
Q_UNUSED(eventId)
Q_UNUSED(callData)
vtkAngleWidget* widget = reinterpret_cast<vtkAngleWidget*>(caller);
if (widget) {
vtkAngleRepresentation* angleRep = vtkAngleRepresentation::SafeDownCast(widget->GetRepresentation());
double worldPot1[3];
double worldPot2[3];
double worldCenter[3];
double displayPot1[3];
double displayPot2[3];
double displayCenter[3];
angleRep->GetPoint1WorldPosition(worldPot1);
angleRep->GetPoint2WorldPosition(worldPot2);
angleRep->GetCenterWorldPosition(worldCenter);
angleRep->GetPoint1DisplayPosition(displayPot1);
angleRep->GetPoint2DisplayPosition(displayPot2);
angleRep->GetCenterDisplayPosition(displayCenter);
emit angleChanged(angleRep->GetAngle());
emit worldPoint1Changed(worldPot1);
emit worldPoint2Changed(worldPot2);
emit worldCenterChanged(worldCenter);
emit displayPoint1Changed(displayPot1);
emit displayPoint2Changed(displayPot2);
emit displayCenterChanged(displayCenter);
}
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/anglewidgetobserver.h
================================================
#ifndef ANGLEWIDGETOBSERVER_H
#define ANGLEWIDGETOBSERVER_H
#include "abstractwidgetobserver.h"
namespace VtkUtils
{
class VTKUTILS_EXPORT AngleWidgetObserver : public AbstractWidgetObserver
{
Q_OBJECT
public:
explicit AngleWidgetObserver(QObject* parent = nullptr);
signals:
void angleChanged(double angle);
void worldPoint1Changed(double* pos);
void worldPoint2Changed(double* pos);
void worldCenterChanged(double* pos);
void displayPoint1Changed(double* pos);
void displayPoint2Changed(double* pos);
void displayCenterChanged(double* pos);
protected:
void Execute(vtkObject *caller, unsigned long eventId, void* callData);
};
} // namespace VtkUtils
#endif // ANGLEWIDGETOBSERVER_H
================================================
FILE: libs/vtkutils/boxcutter.cpp
================================================
#include "boxcutter.h"
class BoxCutterPrivate
{
public:
};
BoxCutter::BoxCutter(QObject* parent) : Interactor(parent)
{
d_ptr = new BoxCutterPrivate;
}
BoxCutter::~BoxCutter()
{
delete d_ptr;
}
void BoxCutter::attach(ComDataGui3D::PostProcessor* pp)
{
if (!pp)
return;
Interactor::attach(pp);
}
void BoxCutter::detach()
{
}
void BoxCutter::update()
{
}
int BoxCutter::type() const
{
return BOXCUTTER;
}
void BoxCutter::setVisible(bool visible)
{
}
bool BoxCutter::isVisible() const
{
return Interactor::isVisible();
}
void BoxCutter::setSpecialInteractorStyle()
{
}
================================================
FILE: libs/vtkutils/boxcutter.h
================================================
#ifndef BOXCUTTER_H
#define BOXCUTTER_H
#include "interactor.h"
class BoxCutterPrivate;
class BoxCutter : public Interactor
{
Q_OBJECT
public:
explicit BoxCutter(QObject* parent = nullptr);
~BoxCutter();
void attach(ComDataGui3D::PostProcessor* pp);
void detach();
void update();
int type() const;
void setVisible(bool visible);
bool isVisible() const;
protected:
void setSpecialInteractorStyle();
private:
BoxCutterPrivate* d_ptr;
Q_DISABLE_COPY(BoxCutter)
};
#endif // BOXCUTTER_H
================================================
FILE: libs/vtkutils/boxwidgetobserver.cpp
================================================
#include "boxwidgetobserver.h"
#include <vtkBoxWidget.h>
#include <vtkPlanes.h>
namespace VtkUtils
{
BoxWidgetObserver::BoxWidgetObserver(QObject* parent) : AbstractWidgetObserver(parent)
{
m_planes = vtkPlanes::New();
}
void BoxWidgetObserver::Execute(vtkObject *caller, unsigned long eventId, void* callData)
{
Q_UNUSED(eventId)
Q_UNUSED(callData)
vtkBoxWidget* widget = reinterpret_cast<vtkBoxWidget*>(caller);
if (widget) {
widget->GetPlanes(m_planes);
emit planesChanged(m_planes);
}
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/boxwidgetobserver.h
================================================
#ifndef BOXWIDGETOBSERVER_H
#define BOXWIDGETOBSERVER_H
#include "abstractwidgetobserver.h"
#include <vtkSmartPointer.h>
class vtkPlanes;
namespace VtkUtils
{
class VTKUTILS_EXPORT BoxWidgetObserver : public AbstractWidgetObserver
{
Q_OBJECT
public:
explicit BoxWidgetObserver(QObject* parent = nullptr);
signals:
void planesChanged(vtkPlanes* planes);
protected:
void Execute(vtkObject *caller, unsigned long eventId, void* callData);
vtkSmartPointer<vtkPlanes> m_planes;
};
} // namespace VtkUtils
#endif // BOXWIDGETOBSERVER_H
================================================
FILE: libs/vtkutils/contour.cpp
================================================
#include "contour.h"
#include <vtkContourFilter.h>
#include <vtkDelaunay2D.h>
#include <vtkPolyDataMapper.h>
#include <vtkPolyData.h>
#include <vtkPoints.h>
#include <vtkActor.h>
#include <vtkDoubleArray.h>
#include <vtkRenderer.h>
#include <vtkLookupTable.h>
#include <vtkutils/vtkutils.h>
namespace VtkUtils
{
class ContourPrivate
{
public:
QList<Utils::Vector4F> vectors;
int numberOfContours = 10;
vtkActor* planeActor = nullptr;
vtkContourFilter* contour = nullptr;
};
Contour::Contour(QWidget* parent) : Surface(parent)
{
d_ptr = new ContourPrivate;
}
Contour::~Contour()
{
delete d_ptr;
}
void Contour::setVectors(const QList<Utils::Vector4F>& vectors)
{
if (vectors.isEmpty())
return;
d_ptr->vectors = vectors;
renderSurface();
}
void Contour::setNumberOfContours(int num)
{
if (d_ptr->numberOfContours != num) {
d_ptr->numberOfContours = num;
if (d_ptr->contour)
d_ptr->contour->GenerateValues(d_ptr->numberOfContours, zMin(), zMax());
}
}
int Contour::numberOfContours() const
{
return d_ptr->numberOfContours;
}
void Contour::setPlaneVisible(bool visible)
{
}
bool Contour::planeVisible() const
{
return false;
}
void Contour::setPlaneDistance(qreal distance)
{
}
bool Contour::planeDistance() const
{
return .0;
}
void Contour::renderSurface()
{
VTK_CREATE(vtkPoints, vtkpoints);
VTK_CREATE(vtkDoubleArray, scalars);
foreach (const Utils::Vector4F& vec, d_ptr->vectors) {
vtkpoints->InsertNextPoint(vec.x, vec.y, vec.z);
scalars->InsertNextTuple1(vec.z);
}
VTK_CREATE(vtkPolyData, polydata);
polydata->SetPoints(vtkpoints);
polydata->GetPointData()->SetScalars(scalars);
double bounds[6];
polydata->GetBounds(bounds);
setBounds(bounds);
VTK_CREATE(vtkDelaunay2D, del);
del->SetInputData(polydata);
del->Update();
// VTK_CREATE(vtkContourFilter, contour);
// contour->SetInputConnection(del->GetOutputPort());
// contour->GenerateValues(10, bounds[4], bounds[5]);
vtkLookupTable* lookupTable = vtkLookupTable::New();
lookupTable->SetTableRange(bounds[4], bounds[5]);
lookupTable->SetHueRange(0.667, 0.0);
lookupTable->Build();
VTK_CREATE(vtkPolyDataMapper, mapper);
mapper->SetInputConnection(del->GetOutputPort());
mapper->SetLookupTable(lookupTable);
surfaceActor()->SetMapper(mapper);
defaultRenderer()->AddActor(surfaceActor());
update();
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/contour.h
================================================
#ifndef CONTOUR_H
#define CONTOUR_H
#include "surface.h"
#include <utils/vector4f.h>
namespace VtkUtils
{
class ContourPrivate;
class VTKUTILS_EXPORT Contour : public Surface
{
Q_OBJECT
public:
explicit Contour(QWidget* parent = nullptr);
~Contour();
void setVectors(const QList<Utils::Vector4F>& vectors);
void setNumberOfContours(int num);
int numberOfContours() const;
void setPlaneVisible(bool visible = true);
bool planeVisible() const;
void setPlaneDistance(qreal distance);
bool planeDistance() const;
protected:
void renderSurface();
private:
ContourPrivate* d_ptr;
Q_DISABLE_COPY(Contour)
};
} // namespace VtkUtils
#endif // CONTOUR_H
================================================
FILE: libs/vtkutils/contourwidgetobserver.cpp
================================================
#include "contourwidgetobserver.h"
#include <vtkPolyData.h>
#include <vtkContourWidget.h>
#include <vtkContourRepresentation.h>
namespace VtkUtils
{
ContourWidgetObserver::ContourWidgetObserver(QObject* parent) : AbstractWidgetObserver(parent)
{
m_polyData = vtkSmartPointer<vtkPolyData>::New();
}
void ContourWidgetObserver::Execute(vtkObject *caller, unsigned long eventId, void* callData)
{
Q_UNUSED(eventId)
Q_UNUSED(callData)
vtkContourWidget* widget = reinterpret_cast<vtkContourWidget*>(caller);
if (widget) {
vtkContourRepresentation* rep = vtkContourRepresentation::SafeDownCast(widget->GetRepresentation());
vtkPolyData* pd = rep->GetContourRepresentationAsPolyData();
if (pd) {
m_polyData->DeepCopy(pd);
emit dataChanged(m_polyData);
}
}
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/contourwidgetobserver.h
================================================
#ifndef CONTOURWIDGETOBSERVER_H
#define CONTOURWIDGETOBSERVER_H
#include "abstractwidgetobserver.h"
#include <vtkSmartPointer.h>
class vtkPolyData;
namespace VtkUtils
{
class VTKUTILS_EXPORT ContourWidgetObserver : public AbstractWidgetObserver
{
Q_OBJECT
public:
explicit ContourWidgetObserver(QObject* parent = nullptr);
signals:
void dataChanged(vtkPolyData* data);
protected:
void Execute(vtkObject *caller, unsigned long eventId, void* callData);
vtkSmartPointer<vtkPolyData> m_polyData;
};
} // namespace VtkUtils
#endif // CONTOURWIDGETOBSERVER_H
================================================
FILE: libs/vtkutils/custominteractorstyle.cpp
================================================
#include "custominteractorstyle.h"
#include "../graph3d.h"
#include "util.h"
#include <vtkSmartPointer.h>
#include <vtkCellPicker.h>
#include <vtkActor.h>
#include <vtkProperty.h>
static const QColor HighlightColor = Qt::red;
static const QColor NormalColor = Qt::white;
CustomInteractorStyle::CustomInteractorStyle()
{
}
CustomInteractorStyle::~CustomInteractorStyle()
{
}
void CustomInteractorStyle::OnLeftButtonDown()
{
vtkInteractorStyleTrackballCamera::OnLeftButtonDown();
vtkActor* pickActor = this->pickedActor();
if (pickActor)
m_pickedActor = pickActor;
else
m_pickedActor = nullptr;
}
void CustomInteractorStyle::OnLeftButtonUp()
{
if (m_pickedActor)
emit mouseReleased();
m_pickedActor = nullptr;
vtkInteractorStyleTrackballCamera::OnLeftButtonUp();
}
void CustomInteractorStyle::Rotate()
{
if (m_pickedActor)
return;
vtkInteractorStyleTrackballCamera::Rotate();
}
void CustomInteractorStyle::Spin()
{
if (m_pickedActor)
return;
vtkInteractorStyleTrackballCamera::Spin();
}
void CustomInteractorStyle::OnMouseMove()
{
vtkInteractorStyleTrackballCamera::OnMouseMove();
notifyHoverActor();
}
void CustomInteractorStyle::OnChar()
{
vtkInteractorStyleTrackballCamera::OnChar();
char ch = this->GetInteractor()->GetKeyCode();
}
void CustomInteractorStyle::setGraph(ComDataGui3D::Graph3D *graph)
{
m_graph = graph;
}
void CustomInteractorStyle::setClickPosition(const QPoint& pos)
{
m_clickPos = pos;
}
void CustomInteractorStyle::setMovePosition(const QPoint& pos)
{
m_movePos = pos;
}
void CustomInteractorStyle::setBounds(double bounds[])
{
ComDataGui3D::detail::ArrayAssigner<double, 6>()(m_bounds, bounds);
}
vtkActor* CustomInteractorStyle::pickedActor()
{
int x = m_clickPos.x();
int y = m_graph->height() - m_clickPos.y();
CREATE_VTKOBJ(vtkCellPicker, picker);
picker->SetTolerance(0.001);
picker->Pick(x, y, 0, GetDefaultRenderer());
return picker->GetActor();
}
vtkActor* CustomInteractorStyle::hoverdActor()
{
int x = m_movePos.x();
int y = m_graph->height() - m_movePos.y();
CREATE_VTKOBJ(vtkCellPicker, picker);
picker->SetTolerance(0.001);
picker->Pick(x, y, 0, GetDefaultRenderer());
return picker->GetActor();
}
void CustomInteractorStyle::setPickingCursor()
{
m_graph->setCursor(QCursor(Qt::PointingHandCursor));
}
void CustomInteractorStyle::resetPickingCursor()
{
m_graph->setCursor(QCursor(Qt::ArrowCursor));
}
double* CustomInteractorStyle::computeBoundedPos(double *pos)
{
double x = pos[0];
double y = pos[1];
double z = pos[2];
m_boundedPos[0] = ComDataGui3D::detail::boundedValue(x, m_bounds[0], m_bounds[1]);
m_boundedPos[1] = ComDataGui3D::detail::boundedValue(y, m_bounds[2], m_bounds[3]);
m_boundedPos[2] = ComDataGui3D::detail::boundedValue(z, m_bounds[4], m_bounds[5]);
return m_boundedPos;
}
void CustomInteractorStyle::addWatchActor(vtkActor *actor)
{
m_watchedActorList.append(actor);
}
void CustomInteractorStyle::notifyHoverActor()
{
vtkActor* hoverActor = this->hoverdActor();
bool find = false;
if (hoverActor) {
foreach (vtkActor* actor, m_watchedActorList) {
if (actor == hoverActor) {
find = true;
setPickingCursor();
highlightActor(actor, true);
}
}
} else {
foreach (vtkActor* actor, m_watchedActorList)
highlightActor(actor, false);
}
if (!find)
resetPickingCursor();
}
void CustomInteractorStyle::highlightActor(vtkActor *actor, bool highlight)
{
if (highlight) {
actor->GetProperty()->SetColor(ComDataGui3D::detail::Util::vtkColor(HighlightColor));
} else {
QColor oClr = ComDataGui3D::detail::Util::oppositeColor(this->m_graph->backgroundColor());
actor->GetProperty()->SetColor(ComDataGui3D::detail::Util::vtkColor(oClr));
}
m_graph->update();
}
================================================
FILE: libs/vtkutils/custominteractorstyle.h
================================================
#ifndef CUSTOMINTERACTORSTYLE_H
#define CUSTOMINTERACTORSTYLE_H
#include <QObject>
#include <vtkInteractorStyleTrackballCamera.h>
#include <QPoint>
namespace ComDataGui3D
{
class Graph3D;
}
class CustomInteractorStyle : public QObject, public vtkInteractorStyleTrackballCamera
{
Q_OBJECT
public:
virtual void OnLeftButtonDown();
virtual void OnLeftButtonUp();
virtual void Rotate();
virtual void Spin();
virtual void OnMouseMove();
virtual void OnChar();
void setGraph(ComDataGui3D::Graph3D* graph);
public slots:
void setClickPosition(const QPoint& pos);
void setMovePosition(const QPoint& pos);
void setBounds(double bounds[6]);
signals:
void mouseReleased();
protected:
explicit CustomInteractorStyle();
virtual ~CustomInteractorStyle();
vtkActor* pickedActor();
vtkActor* hoverdActor();
void setPickingCursor();
void resetPickingCursor();
double* computeBoundedPos(double* pos);
void addWatchActor(vtkActor* actor);
void notifyHoverActor();
void highlightActor(vtkActor* actor, bool highlight);
protected:
ComDataGui3D::Graph3D* m_graph;
QPoint m_clickPos;
QPoint m_movePos;
vtkActor* m_pickedActor = nullptr;
QList<vtkActor*> m_watchedActorList;
double m_bounds[6];
double m_boundedPos[3];
};
#endif // CUSTOMINTERACTORSTYLE_H
================================================
FILE: libs/vtkutils/datafilter.cpp
================================================
#include "datafilter.h"
namespace VtkUtils
{
QString VTKUTILS_EXPORT filterName(FilterType type)
{
QString strType;
switch (type) {
case FT_Clip:
strType = QObject::tr("Clip");
break;
case FT_Cut:
strType = QObject::tr("Cut");
break;
case FT_Slice:
strType = QObject::tr("Slice");
break;
case FT_Isosurface:
strType = QObject::tr("Isosurface");
break;
case FT_Threshold:
strType = QObject::tr("Threshold");
break;
case FT_Streamline:
strType = QObject::tr("Streamline");
break;
case FT_Smooth:
strType = QObject::tr("Smooth");
break;
case FT_Decimate:
strType = QObject::tr("Decimate");
break;
default:
strType = "none";
}
return strType;
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/datafilter.h
================================================
#ifndef DATAFILTER_H
#define DATAFILTER_H
#include <QRunnable>
#include <QObject>
#include <utils/signalledrunable.h>
#include <vtkSmartPointer.h>
#include <vtkClipPolyData.h>
#include <vtkCutter.h>
#include <vtkSmoothPolyDataFilter.h>
#include <vtkDecimatePro.h>
#include <vtkThreshold.h>
#include <vtkStreamTracer.h>
#include <vtkContourFilter.h>
#include <vtkExtractEdges.h>
#include <vtkTubeFilter.h>
#include <vtkDelaunay2D.h>
#include <vtkGlyph3D.h>
#include <vtkRuledSurfaceFilter.h>
#include <vtkVertexGlyphFilter.h>
#include <vtkApproximatingSubdivisionFilter.h>
#include <vtkCleanPolyData.h>
#include <vtkGenericContourFilter.h>
#include <vtkDensifyPolyData.h>
#include <vtkHedgeHog.h>
#include <vtkMarchingCubes.h>
#include <vtkMarchingSquares.h>
#include <vtkRibbonFilter.h>
#include <vtkHull.h>
#include <vtkSplineFilter.h>
#include <vtkShrinkFilter.h>
#include <vtkStripper.h>
#include <vtkProteinRibbonFilter.h>
#include <vtkQuadricDecimation.h>
#include <vtkTriangleFilter.h>
#include "vtkutils_global.h"
namespace VtkUtils
{
enum FilterType { FT_Clip, FT_Cut, FT_Slice, FT_Isosurface,
FT_Threshold, FT_Streamline, FT_Smooth, FT_Decimate, FT_Count };
QString VTKUTILS_EXPORT filterName(FilterType type);
class VTKUTILS_EXPORT AbstractDataFilter : public Utils::SignalledRunnable
{
public:
AbstractDataFilter() {}
virtual ~AbstractDataFilter() {}
};
template <class Filter, class InputDataObject = vtkPolyData, class OutputDataObject = vtkPolyData>
class DataFilter : public AbstractDataFilter
{
public:
DataFilter()
{
m_filter = Filter::New();
}
virtual void run()
{
m_filter->SetInputData(m_inputData);
m_filter->Update();
emit finished();
}
virtual void setInput(InputDataObject* input)
{
m_inputData = input;
}
OutputDataObject* output() const
{
return m_filter->GetOutput();
}
Filter* filter() const
{
return m_filter;
}
protected:
vtkSmartPointer<Filter> m_filter;
InputDataObject* m_inputData;
};
class VTKUTILS_EXPORT ClipFilter : public DataFilter<vtkClipPolyData> {};
class VTKUTILS_EXPORT CutterFilter : public DataFilter<vtkCutter> {};
class VTKUTILS_EXPORT SliceFilter : public DataFilter<vtkCutter> {};
class VTKUTILS_EXPORT DecimateProFilter : public DataFilter<vtkDecimatePro> {};
class VTKUTILS_EXPORT SmoothFilter : public DataFilter<vtkSmoothPolyDataFilter> {};
class VTKUTILS_EXPORT StreamTracerFilter : public DataFilter<vtkStreamTracer> {};
class VTKUTILS_EXPORT IsosurfaceFilter : public DataFilter<vtkContourFilter> {};
class VTKUTILS_EXPORT ExtractEdgesFilter : public DataFilter<vtkExtractEdges> {};
class VTKUTILS_EXPORT TubeFilter : public DataFilter<vtkTubeFilter> {};
class VTKUTILS_EXPORT Delaunay2DFilter : public DataFilter<vtkDelaunay2D> {};
class VTKUTILS_EXPORT Glyph3DFilter : public DataFilter<vtkGlyph3D> {};
class VTKUTILS_EXPORT RuledSurfaceFilter : public DataFilter<vtkRuledSurfaceFilter> {};
class VTKUTILS_EXPORT VertexGlyphFilter : public DataFilter<vtkVertexGlyphFilter> {};
} // namespace VtkUtils
#endif // DATAFILTER_H
================================================
FILE: libs/vtkutils/disablerotationinteractorstyle.cpp
================================================
#include "disablerotationinteractorstyle.h"
#include "../graph3d.h"
#include "util.h"
#include <vtkObjectFactory.h>
#include <vtkPropPicker.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkSmartPointer.h>
#include <vtkRenderWindow.h>
#include <vtkProperty.h>
#include <vtkPicker.h>
#include <vtkPointPicker.h>
#include <vtkPlane.h>
#include <vtkWorldPointPicker.h>
#include <vtkPropPicker.h>
#include <vtkCellPicker.h>
#include <vtkProp.h>
#include <QDebug>
#include <QApplication>
using namespace ComDataGui3D;
static const int HoverWidth = 7;
static const int NormalWidth = 5;
static const QColor PlaneHighlightColor = QColor(87, 87, 87);
static const QColor PlaneNormalColor = Qt::white;
static const QColor StickColor = QColor(233, 233, 233);
static const QColor HighlightStickColor = QColor(255, 0, 0);
vtkStandardNewMacro(DisableRotationInteractorStyle);
DisableRotationInteractorStyle::DisableRotationInteractorStyle()
{
ComDataGui3D::detail::ArrayInitializer<double>()(m_topPoint);
ComDataGui3D::detail::ArrayInitializer<double>()(m_bottomPoint);
}
DisableRotationInteractorStyle::~DisableRotationInteractorStyle()
{
}
void DisableRotationInteractorStyle::OnLeftButtonUp()
{
CustomInteractorStyle::OnLeftButtonUp();
notifySpherePosChanged();
m_pickedActor = nullptr;
resetActors();
resetPickingCursor();
if (m_isDirty) {
m_isDirty = false;
emit update();
}
}
void DisableRotationInteractorStyle::OnMouseMove()
{
CustomInteractorStyle::OnMouseMove();
int x = m_movePos.x();
int y = m_graph->height() - m_movePos.y();
if (!m_pickedActor) {
highlightActor();
} else {
m_isDirty = true;
setPickingCursor();
CREATE_VTKOBJ(vtkPointPicker, picker);
picker->Pick(x, y, 0, GetDefaultRenderer());
double* pickPos = picker->GetPickPosition();
if (m_pickedActor == m_planeActor || m_pickedActor == m_frameActor) {
emit planeChanged(computeBoundedPos(pickPos));
} else if (m_pickedActor == m_originActor) {
highlightOrigin(true);
emit originChanged(pickPos);
} else if (m_pickedActor == m_topBallActor ||
m_pickedActor == m_bottomBallActor ||
m_pickedActor == m_stickActor) {
double topBallDis = ComDataGui3D::detail::distance(m_topPoint, pickPos);
double bottomBallDis = ComDataGui3D::detail::distance(m_bottomPoint, pickPos);
bool nearTopBall = topBallDis <= bottomBallDis;
emit normalChanged(nearTopBall, pickPos);
}
}
}
void DisableRotationInteractorStyle::setCutType(Cutter::CutType ct)
{
m_cutType = ct;
}
void DisableRotationInteractorStyle::setSphereActor(vtkActor *sphere)
{
m_sphereActor = sphere;
}
void DisableRotationInteractorStyle::setPlaneActor(vtkActor* plane)
{
m_planeActor = plane;
}
void DisableRotationInteractorStyle::setFrameActor(vtkActor* frame)
{
m_frameActor = frame;
}
void DisableRotationInteractorStyle::setOriginActor(vtkActor* origin)
{
m_originActor = origin;
}
void DisableRotationInteractorStyle::setTopBallActor(vtkActor* topBall)
{
m_topBallActor = topBall;
}
void DisableRotationInteractorStyle::setBottomBallActor(vtkActor* bottomBall)
{
m_bottomBallActor = bottomBall;
}
void DisableRotationInteractorStyle::setStickActor(vtkActor *stick)
{
m_stickActor = stick;
}
void DisableRotationInteractorStyle::setOrigin(double* origin)
{
ComDataGui3D::detail::ArrayAssigner<double>()(m_origin, origin);
}
void DisableRotationInteractorStyle::setNormal(double* normal)
{
ComDataGui3D::detail::ArrayAssigner<double>()(m_normal, normal);
}
void DisableRotationInteractorStyle::onStickPointsChanged(double *topPot, double *bottomPot)
{
ComDataGui3D::detail::ArrayAssigner<double>()(m_topPoint, topPot);
ComDataGui3D::detail::ArrayAssigner<double>()(m_bottomPoint, bottomPot);
}
void DisableRotationInteractorStyle::resetActors()
{
m_frameActor->GetProperty()->SetLineWidth(NormalWidth);
double* clrArr = ComDataGui3D::detail::Util::vtkColor(PlaneNormalColor);
m_planeActor->GetProperty()->SetColor(clrArr);
highlightStick(false);
m_graph->update();
}
void DisableRotationInteractorStyle::highlightStick(bool highlight)
{
double* clrArr = nullptr;
if (highlight)
clrArr = ComDataGui3D::detail::Util::vtkColor(HighlightStickColor);
else
clrArr = ComDataGui3D::detail::Util::vtkColor(StickColor);
m_stickActor->GetProperty()->SetColor(clrArr);
m_topBallActor->GetProperty()->SetColor(clrArr);
m_bottomBallActor->GetProperty()->SetColor(clrArr);
m_originActor->GetProperty()->SetColor(clrArr);
m_graph->update();
}
void DisableRotationInteractorStyle::highlightOrigin(bool highlight)
{
double* clrArr = nullptr;
if (highlight)
clrArr = ComDataGui3D::detail::Util::vtkColor(HighlightStickColor);
else
clrArr = ComDataGui3D::detail::Util::vtkColor(StickColor);
m_originActor->GetProperty()->SetColor(clrArr);
m_graph->update();
}
void DisableRotationInteractorStyle::highlightActor()
{
vtkActor* hoverdActor = this->hoverdActor();
if (hoverdActor == m_planeActor) {
setPickingCursor();
m_planeActor->GetProperty()->SetColor(ComDataGui3D::detail::Util::vtkColor(PlaneHighlightColor));
m_graph->update();
} else if (hoverdActor == m_frameActor) {
setPickingCursor();
m_planeActor->GetProperty()->SetColor(ComDataGui3D::detail::Util::vtkColor(PlaneHighlightColor));
m_graph->update();
} else if (hoverdActor == m_originActor) {
setPickingCursor();
highlightOrigin(true);
} else if (hoverdActor == m_stickActor ||
hoverdActor == m_topBallActor ||
hoverdActor == m_bottomBallActor){
setPickingCursor();
highlightStick(true);
} else if (hoverdActor == m_sphereActor && m_sphereActor && m_sphereActor->GetVisibility()){
setPickingCursor();
} else {
resetActors();
resetPickingCursor();
}
}
void DisableRotationInteractorStyle::notifySpherePosChanged()
{
if (m_sphereActor && m_pickedActor == m_sphereActor && m_sphereActor->GetVisibility()) {
int x = m_movePos.x();
int y = m_graph->height() - m_movePos.y();
CREATE_VTKOBJ(vtkPointPicker, picker);
picker->Pick(x, y, 0, GetDefaultRenderer());
double* pickPos = picker->GetPickPosition();
emit originChanged(pickPos);
}
}
================================================
FILE: libs/vtkutils/disablerotationinteractorstyle.h
================================================
#ifndef DISABLEROTATIONINTERACTORSTYLE_H
#define DISABLEROTATIONINTERACTORSTYLE_H
#include "custominteractorstyle.h"
#include "../cutter.h"
namespace ComDataGui3D
{
class Graph3D;
}
class vtkActor;
class DisableRotationInteractorStyle : public CustomInteractorStyle
{
Q_OBJECT
public:
static DisableRotationInteractorStyle *New();
vtkTypeMacro(DisableRotationInteractorStyle, vtkInteractorStyleTrackballCamera);
virtual void OnLeftButtonUp();
virtual void OnMouseMove();
void setCutType(ComDataGui3D::Cutter::CutType ct);
void setSphereActor(vtkActor* sphere);
void setPlaneActor(vtkActor* plane);
void setFrameActor(vtkActor* frame);
void setOriginActor(vtkActor* origin);
void setTopBallActor(vtkActor* topBall);
void setBottomBallActor(vtkActor* bottomBall);
void setStickActor(vtkActor* stick);
public slots:
void setOrigin(double* origin);
void setNormal(double* normal);
void onStickPointsChanged(double* topPot, double* bottomPot);
signals:
void graphMoved();
void originChanged(double* origin);
void planeChanged(double* pos);
void normalChanged(bool positive, double* normal);
void update();
private:
void resetActors();
void highlightStick(bool highlight);
void highlightOrigin(bool highlight);
void highlightActor();
void notifySpherePosChanged();
private:
DisableRotationInteractorStyle();
~DisableRotationInteractorStyle();
ComDataGui3D::Cutter::CutType m_cutType;
bool m_isDirty = false;
vtkActor* m_sphereActor = nullptr;
vtkActor* m_planeActor = nullptr;
vtkActor* m_frameActor = nullptr;
vtkActor* m_originActor = nullptr;
vtkActor* m_stickActor = nullptr;
vtkActor* m_topBallActor = nullptr;
vtkActor* m_bottomBallActor = nullptr;
double m_origin[3];
double m_normal[3];
double m_topPoint[3];
double m_bottomPoint[3];
};
#endif // DISABLEROTATIONINTERACTORSTYLE_H
================================================
FILE: libs/vtkutils/distancewidgetobserver.cpp
================================================
#include "distancewidgetobserver.h"
#include <vtkDistanceWidget.h>
#include <vtkDistanceRepresentation.h>
namespace VtkUtils
{
DistanceWidgetObserver::DistanceWidgetObserver(QObject* parent) : AbstractWidgetObserver(parent)
{
}
void DistanceWidgetObserver::Execute(vtkObject *caller, unsigned long eventId, void* callData)
{
Q_UNUSED(eventId)
Q_UNUSED(callData)
vtkDistanceWidget* widget = reinterpret_cast<vtkDistanceWidget*>(caller);
if (widget) {
vtkWidgetRepresentation* rep = widget->GetRepresentation();
vtkDistanceRepresentation* distRep = vtkDistanceRepresentation::SafeDownCast(rep);
if (distRep) {
double worldPot1[3];
double worldPot2[3];
double displayPot1[3];
double displayPot2[3];
distRep->GetPoint1WorldPosition(worldPot1);
distRep->GetPoint2WorldPosition(worldPot2);
distRep->GetPoint1DisplayPosition(displayPot1);
distRep->GetPoint2DisplayPosition(displayPot2);
emit distanceChanged(distRep->GetDistance());
emit worldPoint1Changed(worldPot1);
emit worldPoint2Changed(worldPot2);
emit displayPoint1Changed(displayPot1);
emit displayPoint2Changed(displayPot2);
}
}
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/distancewidgetobserver.h
================================================
#ifndef DISTANCEWIDGETOBSERVER_H
#define DISTANCEWIDGETOBSERVER_H
#include "abstractwidgetobserver.h"
namespace VtkUtils
{
class VTKUTILS_EXPORT DistanceWidgetObserver : public AbstractWidgetObserver
{
Q_OBJECT
public:
explicit DistanceWidgetObserver(QObject* parent = nullptr);
signals:
void distanceChanged(double dist);
void worldPoint1Changed(double* pos);
void worldPoint2Changed(double* pos);
void displayPoint1Changed(double* pos);
void displayPoint2Changed(double* pos);
protected:
void Execute(vtkObject *caller, unsigned long eventId, void* callData);
};
} // namespace VtkUtils
#endif // DISTANCEWIDGETOBSERVER_H
================================================
FILE: libs/vtkutils/filereaderutils.cpp
================================================
#include "filereaderutils.h"
#include "vtkUnstructuredGridRelevantPointsFilter.h"
#include <vtkUnstructuredGrid.h>
#include <vtkCellData.h>
#include <QDebug>
#define USE_POINT_INDICES_TO_INSERT
#define ALL_LINES -1
#define INVALID_MAT_ID -INT_MAX
#if defined(_WIN32)
// for _strnicmp
#include <string.h>
#define STRNCASECMP _strnicmp
#else
// for strcasecmp
#include <strings.h>
#define STRNCASECMP strncasecmp
#endif
namespace VtkUtils
{
static float Getf(const char *s)
{
char *ends;
double val = 0.0;
// Check for one of these funky 'NASTRAN exponential format' strings.
// This is where a value like '1.2345e-5' is actually represented in the
// file as '1.2345-5' with the 'e' character missing. It is awkward but
// apparently a NASTRAN standard. I guess the rationale is that given
// an 8 character field width limit, removing the 'e' character gives them
// one additional digit of precision. This logic is basically looking for
// the condition of encountering a sign character, '-' or '+', AFTER having
// seen characters that could represent part of a number. In such a case,
// it MUST be the sign of the exponent.
const char *p = s;
char tmps[32];
char *q = tmps;
bool haveSeenNumChars = false;
while (!haveSeenNumChars || (*p != '-' && *p != '+' && *p != '\0')) {
if ('0' <= *p && *p <= '9' || *p == '.' || *p == '+' || *p == '-')
haveSeenNumChars = true;
*q++ = *p++;
}
if (haveSeenNumChars && (*p == '-' || *p == '+')) {
*q++ = 'e';
while (*p != '\0')
*q++ = *p++;
*q++ = '\0';
errno = 0;
val = strtod(tmps, &ends);
} else {
errno = 0;
val = strtod(s, &ends);
}
if (errno != 0)
{
qDebug() << "Error occured at " << __FUNCTION__;
return 0.0;
}
return (float) val;
}
// ****************************************************************************
// Function: Geti
//
// Purpose: Robust way of reading string for integer value
//
// Programmer: Mark C. Miller, Thu Apr 3 16:27:01 PDT 2008
//
// Modifications:
// Jeremy Meredith, Thu Aug 7 13:43:03 EDT 2008
// Format %s doesn't use space modifier.
//
// ****************************************************************************
static int Geti(const char *s)
{
char *ends;
errno = 0;
long val = strtol(s, &ends, 10);
if (errno != 0)
{
qDebug() << "Error occured at " << __FUNCTION__;
return 0;
}
return (int) val;
}
AbstractFileReader::AbstractFileReader(QObject *parent) : QObject(parent)
{
}
void AbstractFileReader::setFileName(const QString& file)
{
if (m_fileName != file)
m_fileName = file;
}
QString AbstractFileReader::fileName() const
{
return m_fileName;
}
void AbstractFileReader::setTitle(const QString& title)
{
if (m_title != title)
m_title = title;
}
QString AbstractFileReader::title() const
{
return m_title;
}
VtkFileReader::VtkFileReader(QObject *parent) : AbstractFileReader(parent)
{
}
void VtkFileReader::run()
{
vtkInitOnce(&m_reader);
m_reader->ReadAllScalarsOn();
m_reader->ReadAllVectorsOn();
m_reader->SetFileName(fileName().toLocal8Bit());
m_reader->Update();
emit finished();
}
StlFileReader::StlFileReader(QObject *parent) : AbstractFileReader(parent)
{
}
void StlFileReader::run()
{
vtkInitOnce(&m_reader);
m_reader->SetFileName(fileName().toLocal8Bit());
m_reader->Update();
emit finished();
}
ObjFileReader::ObjFileReader(QObject *parent) : AbstractFileReader(parent)
{
}
void ObjFileReader::run()
{
vtkInitOnce(&m_reader);
m_reader->SetFileName(fileName().toLocal8Bit());
m_reader->Update();
emit finished();
}
DynaFileReader::DynaFileReader(QObject *parent) : AbstractFileReader(parent)
{
}
void DynaFileReader::run()
{
vtkInitOnce(&m_reader);
m_reader->SetFileName(fileName().toLocal8Bit());
m_reader->Update();
emit finished();
}
NastranFileReader::NastranFileReader(QObject *parent) : AbstractFileReader(parent)
{
}
void NastranFileReader::run()
{
ifstream ifile(fileName().toLocal8Bit());
if (ifile.fail())
return;
// Determine the file size and come up with an estimate of the
// number of vertices and cells so we can size the points and cells.
int nPoints = 100;
int nCells = 100;
int matCountOpt = 0;
#if !defined(MDSERVER)
vtkPoints *pts = vtkPoints::New();
pts->Allocate(nPoints);
#ifdef USE_POINT_INDICES_TO_INSERT
pts->SetNumberOfPoints(nPoints);
#endif
vtkUnstructuredGrid *ugrid = vtkUnstructuredGrid::New();
ugrid->SetPoints(pts);
ugrid->Allocate(nCells);
pts->Delete();
pts = ugrid->GetPoints();
#endif // if !defined(MDSERVER)
char line[1024];
float pt[3];
vtkIdType verts[8];
bool recognized = false;
bool titleRead = false;
for(int lineIndex = 0; !ifile.eof(); ++lineIndex)
{
int matid = INVALID_MAT_ID;
// Get the line
ifile.getline(line, 1024);
// Determine what the line is for.
if(line[0] == '$' && !recognized)
{
if(!titleRead)
m_title += line;
}
else if(strncmp(line, "GRID*", 5) == 0)
{
recognized = true;
// These GRID* lines need a second line of data. Read it into
// the same buffer at the end.
ifile.getline(line + 72, 1024-72);
#define LONG_FIELD_WIDTH 16
char *valstart = line + 81 - 1;
pt[2] = Getf(valstart);
valstart = line + 72 - LONG_FIELD_WIDTH+1 - 1;
char *valend = line + 72;
*valend = '\0';
pt[1] = Getf(valstart);
valstart -= LONG_FIELD_WIDTH;
valend -= LONG_FIELD_WIDTH;
*valend = '\0';
pt[0] = Getf(valstart);
#ifdef USE_POINT_INDICES_TO_INSERT
valstart -= (2 * LONG_FIELD_WIDTH);
valend -= (2 * LONG_FIELD_WIDTH);
*valend = '\0';
int psi = Geti(valstart)-1;
#if !defined(MDSERVER)
if(psi < nPoints)
pts->SetPoint(psi, pt);
else
{
int newSize = int(float(nPoints) * 1.1f);
if(newSize < psi)
newSize = int(float(psi) * 1.1f);
if(newSize <= nPoints)
newSize = nPoints + 1;
qDebug() << "Resizing point array from " << nPoints
<< " points to " << newSize
<< " points because we need to insert point index "
<< psi << endl;
nPoints = newSize;
pts->GetData()->Resize(nPoints);
pts->SetNumberOfPoints(nPoints);
pts->SetPoint(psi, pt);
}
#endif // if !defined(MDSERVER)
#else
#if !defined(MDSERVER)
pts->InsertNextPoint(pt);
#endif
#endif
}
else if(strncmp(line, "GRID", 4) == 0)
{
recognized = true;
#define SHORT_FIELD_WIDTH 8
char *valstart = line + 48 - SHORT_FIELD_WIDTH;
char *valend = line + 48;
*valend = '\0';
pt[2] = Getf(valstart);
valstart -= SHORT_FIELD_WIDTH;
valend -= SHORT_FIELD_WIDTH;
*valend = '\0';
pt[1] = Getf(valstart);
valstart -= SHORT_FIELD_WIDTH;
valend -= SHORT_FIELD_WIDTH;
*valend = '\0';
pt[0] = Getf(valstart);
#ifdef USE_POINT_INDICES_TO_INSERT
valstart -= (2 * SHORT_FIELD_WIDTH);
valend -= (2 * SHORT_FIELD_WIDTH);
*valend = '\0';
int psi = Geti(valstart)-1;
#if !defined(MDSERVER)
if(psi < nPoints)
pts->SetPoint(psi, pt);
else
{
int newSize = int(float(nPoints) * 1.1f);
if(newSize < psi)
newSize = int(float(psi) * 1.1f);
if(newSize <= nPoints)
newSize = nPoints + 1;
qDebug() << "Resizing point array from " << nPoints
<< " points to " << newSize
<< " points because we need to insert point index "
<< psi << endl;
nPoints = newSize;
pts->GetData()->Resize(nPoints);
pts->SetNumberOfPoints(nPoints);
pts->SetPoint(psi, pt);
}
#endif // if !defined(MDSERVER)
#else
#if !defined(MDSERVER)
pts->InsertNextPoint(pt);
#endif // if !defined(MDSERVER)
#endif
}
else if(strncmp(line, "CHEXA", 5) == 0)
{
#define INDEX_FIELD_WIDTH 8
// CHEXA requires more point indices so read another line.
ifile.getline(line + 72, 1024-72);
char *valstart = line + 88;
char *valend = valstart;
verts[7] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[6] = Geti(valstart)-1;
// Skip the blank
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[5] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[4] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[3] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[2] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[1] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[0] = Geti(valstart)-1;
if (matCountOpt)
{
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
matid = Geti(valstart);
}
#if !defined(MDSERVER)
ugrid->InsertNextCell(VTK_HEXAHEDRON, 8, verts);
if (matCountOpt) m_matList.push_back(matid);
#endif
}
else if(strncmp(line, "CTETRA", 6) == 0)
{
char *valstart = line + 48;
char *valend = valstart;
verts[3] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[2] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[1] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[0] = Geti(valstart)-1;
if (matCountOpt)
{
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
matid = Geti(valstart);
}
#if !defined(MDSERVER)
ugrid->InsertNextCell(VTK_TETRA, 4, verts);
if (matCountOpt) m_matList.push_back(matid);
#endif
}
else if(strncmp(line, "CPYRAM", 6) == 0)
{
char *valstart = line + 56;
char *valend = valstart;
verts[4] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[3] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[2] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[1] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[0] = Geti(valstart)-1;
if (matCountOpt)
{
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
matid = Geti(valstart);
}
#if !defined(MDSERVER)
ugrid->InsertNextCell(VTK_PYRAMID, 5, verts);
if (matCountOpt) m_matList.push_back(matid);
#endif
}
else if(strncmp(line, "CPENTA", 6) == 0)
{
char *valstart = line + 64;
char *valend = valstart;
verts[5] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[4] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[3] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[2] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[1] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[0] = Geti(valstart)-1;
if (matCountOpt)
{
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
matid = Geti(valstart);
}
//
// http://www.simcenter.msstate.edu/docs/ug_io/3d_grid_file_type_nastran.html
// says that if 5th and 6th nodes are identical, then its really a 5 noded
// pyramid.
//
#if !defined(MDSERVER)
if (verts[4] == verts[5])
ugrid->InsertNextCell(VTK_PYRAMID, 5, verts);
else
ugrid->InsertNextCell(VTK_WEDGE, 6, verts);
if (matCountOpt) m_matList.push_back(matid);
#endif
}
else if(strncmp(line, "CQUAD4", 6) == 0)
{
char *valstart = line + 48;
char *valend = valstart;
verts[3] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[2] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[1] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[0] = Geti(valstart)-1;
if (matCountOpt)
{
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
matid = Geti(valstart);
}
#if !defined(MDSERVER)
ugrid->InsertNextCell(VTK_QUAD, 4, verts);
if (matCountOpt) m_matList.push_back(matid);
#endif
}
else if(strncmp(line, "CTRIA2", 6) == 0 ||
strncmp(line, "CTRIA3", 6) == 0)
{
char *valstart = line + 40;
char *valend = valstart;
verts[2] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[1] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[0] = Geti(valstart)-1;
if (matCountOpt)
{
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
matid = Geti(valstart);
}
#if !defined(MDSERVER)
ugrid->InsertNextCell(VTK_TRIANGLE, 3, verts);
if (matCountOpt) m_matList.push_back(matid);
#endif
}
else if(strncmp(line, "CBAR", 4) == 0)
{
char *valstart = line + 32;
char *valend = valstart;
verts[1] = Geti(valstart)-1;
valstart -= INDEX_FIELD_WIDTH;
*valend = '\0';
verts[0] = Geti(valstart)-1;
if (matCountOpt)
{
valstart -= INDEX_FIELD_WIDTH;
valend -= INDEX_FIELD_WIDTH;
*valend = '\0';
matid = Geti(valstart);
}
#if !defined(MDSERVER)
ugrid->InsertNextCell(VTK_LINE, 2, verts);
if (matCountOpt) m_matList.push_back(matid);
#endif
}
else if(strncmp(line, "TITLE", 5) == 0)
{
titleRead = true;
char *ptr = 0;
if((ptr = strstr(line, "=")) != 0)
m_title = /*std::string(*/++ptr/*)*/;
else
m_title = /*std::string(*/line+5/*)*/;
}
else if(strncmp(line, "CEND", 4) == 0 ||
strncmp(line, "BEGIN BULK", 10) == 0 ||
strncmp(line, "NASTRAN", 7) == 0)
{
recognized = true;
}
if (matid != INVALID_MAT_ID)
m_uniqMatIds[matid] = 1;
}
if(recognized) {
vtkUnstructuredGridRelevantPointsFilter *rpf =
vtkUnstructuredGridRelevantPointsFilter::New();
rpf->SetInputData(ugrid);
rpf->Update();
m_dataObject = vtkUnstructuredGrid::New();
m_dataObject->ShallowCopy(rpf->GetOutput());
ugrid->Delete();
rpf->Delete();
}
emit finished();
}
FluentFileReader::FluentFileReader(QObject *parent) : AbstractFileReader(parent)
{
}
void FluentFileReader::run()
{
vtkInitOnce(&m_reader);
m_reader->SetFileName(fileName().toLocal8Bit());
m_reader->Update();
vtkUnstructuredGrid* grid = vtkUnstructuredGrid::SafeDownCast(m_reader->GetOutput()->GetBlock(0));
int num = m_reader->GetNumberOfCellArrays();
for (int i = 0; i < num; ++i) {
QString name(m_reader->GetCellArrayName(i));
m_dataMap.insert(name, grid->GetCellData()->GetArray(m_reader->GetCellArrayName(i)));
}
emit finished();
}
AnsysFileReader::AnsysFileReader(QObject *parent) : AbstractFileReader(parent)
{
}
void AnsysFileReader::run()
{
// Open the file.
ifstream ifile(fileName().toLocal8Bit());
if (ifile.fail())
return;
// Determine the file size and come up with an estimate of the
// number of vertices and cells so we can size the points and cells.
int nPoints = 100;
int nCells = 100;
vtkPoints *pts = vtkPoints::New();
pts->Allocate(nPoints);
vtkUnstructuredGrid *ugrid = vtkUnstructuredGrid::New();
ugrid->SetPoints(pts);
ugrid->Allocate(nCells);
pts->Delete();
#define MAX_ANSYS_LINE 200
char line[MAX_ANSYS_LINE];
float pt[3];
vtkIdType verts[8];
bool recognized = false;
bool fatalError = false;
bool readingCoordinates = false;
bool readingConnectivity = false;
int expectedLineLength = 0;
int firstFieldWidth = 8;
int fieldWidth = 16;
int fieldStart = 56;
for(int lineIndex = 0; !ifile.eof(); ++lineIndex)
{
// Get the line
ifile.getline(line, MAX_ANSYS_LINE);
#if defined(_WIN32)
int linelen = strlen(line);
#else
int linelen = strlen(line)-1; // account for the end of line char.
#endif
// If the line length is less than expected then pad with NULLs.
if(expectedLineLength > 0 && linelen < expectedLineLength)
{
memset(line + linelen + 1, 0, (MAX_ANSYS_LINE - linelen - 1) * sizeof(char));
#if 0
debug5 << "Padding line with NULLs" << endl;
debug5 << line << endl;
#endif
}
// Give it a chance to break out of coordinate reading.
if(readingCoordinates)
{
bool valid = true;
for(int i = 0; i < firstFieldWidth && valid; ++i)
valid &= (line[i] == ' ' || (line[i] >= '0' && line[i] <= '9'));
if(!valid)
{
expectedLineLength = 0;
readingCoordinates = false;
continue;
}
}
if(readingCoordinates)
{
char *valstart = line + fieldStart;
char *valend = valstart + fieldWidth;
pt[2] = atof(valstart);
valstart -= fieldWidth;
valend -= fieldWidth;
*valend = '\0';
pt[1] = atof(valstart);
valstart -= fieldWidth;
valend -= fieldWidth;
*valend = '\0';
pt[0] = atof(valstart);
#if 0
debug4 << pt[0] << ", " << pt[1] << ", " << pt[2] << endl;
#endif
pts->InsertNextPoint(pt);
}
else if(readingConnectivity)
{
// Get whether this cell is real from column 0
line[fieldWidth] = '\0';
bool realCell = atoi(line) > 0;
if(!realCell)
{
expectedLineLength = 0;
readingConnectivity = false;
continue;
}
// Get the number of vertices in this cell from column 9.
static const int ncellsColumn = 9;
line[ncellsColumn * fieldWidth] = '\0';
int nverts = atoi(line + (ncellsColumn-1) * fieldWidth);
if(nverts == 8)
{
char *valstart = line + fieldStart;
char *valend = valstart + fieldWidth;
for(int i = 0; i < 8; ++i)
{
int ivalue = atoi(valstart);
verts[7-i] = (ivalue > 0) ? (ivalue - 1) : ivalue;
valstart -= fieldWidth;
valend -= fieldWidth;
*valend = '\0';
}
#if 0
for(int j = 0; j < 8; ++j)
debug4 << ", " << verts[j];
debug4 << endl;
#endif
ugrid->InsertNextCell(VTK_HEXAHEDRON, 8, verts);
}
else
{
qDebug() << "The file " << fileName() << " contained cells "
"that are not hexes."<< endl;
fatalError = true;
break;
}
}
else if(STRNCASECMP(line, "NBLOCK", 6) == 0)
{
char *comma = strstr(line, ",");
if(comma != 0)
{
char *comma2 = strstr(comma+1, ",");
if(comma2 != 0)
{
*comma2 = '\0';
char *cols = comma + 1;
qDebug() << "Coordinate data stored in "
<< atoi(cols) << " columns." << endl;
recognized = true;
}
}
// Get the field format string. Use it to set expectedLineLength,
// fieldWidth, and fieldStart.
ifile.getline(line, 1024);
if(line[0] == '(')
{
interpretFormatStringEx(line, firstFieldWidth, fieldStart, fieldWidth,
expectedLineLength);
qDebug() << "firstFieldWidth=" << firstFieldWidth
<< ", fieldStart=" << fieldStart
<< ", fieldWidth=" << fieldWidth
<< ", expectedLineLength=" << expectedLineLength
<< endl;
readingCoordinates = true;
}
else
{
qDebug() << "Malformed format string: " << line << endl;
fatalError = true;
}
}
else if(STRNCASECMP(line, "EBLOCK", 6) == 0)
{
char *comma = strstr(line, ",");
if(comma != 0)
{
char *comma2 = strstr(comma+1, ",");
if(comma2 != 0)
{
*comma2 = '\0';
char *cols = comma + 1;
qDebug() << "Connectivity data stored in "
<< atoi(cols) << " columns." << endl;
recognized = true;
}
}
// Get the field format string. Use it to set expectedLineLength,
// fieldWidth, and fieldStart.
ifile.getline(line, 1024);
if(line[0] == '(')
{
interpretFormatStringEx(line, firstFieldWidth, fieldStart, fieldWidth,
expectedLineLength);
qDebug() << "firstFieldWidth=" << firstFieldWidth
<< ", fieldStart=" << fieldStart
<< ", fieldWidth=" << fieldWidth
<< ", expectedLineLength=" << expectedLineLength
<< endl;
readingConnectivity = true;
}
else
{
qDebug() << "Malformed format string: " << line << endl;
fatalError = true;
}
}
else if(STRNCASECMP(line, "/COM", 4) == 0)
{
if(m_title.toStdString() == "")
m_title = /*std::string(*/line+6/*)*/;
recognized = true;
}
else if(STRNCASECMP(line, "/TITLE", 6) == 0)
{
m_title = /*std::string(*/line+8/*)*/;
recognized = true;
}
else if(STRNCASECMP(line, "/BATCH", 6) == 0 ||
STRNCASECMP(line, "/NOPR", 5) == 0 ||
STRNCASECMP(line, "/CONFIG", 7) == 0 ||
STRNCASECMP(line, "/NOLIST", 7) == 0)
{
recognized = true;
}
else
{
expectedLineLength = 0;
readingCoordinates = false;
readingConnectivity = false;
}
}
if(recognized && !fatalError)
m_dataObject = ugrid;
else
ugrid->Delete();
emit finished();
}
void AnsysFileReader::interpretFormatString(char *line, int &fieldStart,
int &fieldWidth, int &expectedLineLength) const
{
char *fmt = line + 1;
char *ptr = 0;
expectedLineLength = 0;
bool keepGoing = true;
while(keepGoing)
{
int linelen = 0;
if((ptr = strstr(fmt, ",")) != 0)
{
*ptr = '\0';
interpret(fmt, fieldWidth, linelen);
expectedLineLength += linelen;
fmt = ptr + 1;
}
else if((ptr = strstr(fmt, ")")) != 0)
{
*ptr = '\0';
interpret(fmt, fieldWidth, linelen);
expectedLineLength += linelen;
keepGoing = false;
}
else
keepGoing = false;
}
fieldStart = expectedLineLength - fieldWidth;
}
void AnsysFileReader::interpretFormatStringEx(char *line, int &firstFieldWidth, int &fieldStart, int &fieldWidth, int &expectedLineLength) const
{
char *fmt = line + 1;
char *ptr = 0;
expectedLineLength = 0;
bool keepGoing = true;
bool first = true;
while(keepGoing)
{
int linelen = 0;
if((ptr = strstr(fmt, ",")) != 0)
{
*ptr = '\0';
interpret(fmt, fieldWidth, linelen);
if(first)
{
first = false;
firstFieldWidth = fieldWidth;
}
expectedLineLength += linelen;
fmt = ptr + 1;
}
else if((ptr = strstr(fmt, ")")) != 0)
{
*ptr = '\0';
interpret(fmt, fieldWidth, linelen);
if(first)
{
first = false;
firstFieldWidth = fieldWidth;
}
expectedLineLength += linelen;
keepGoing = false;
}
else
keepGoing = false;
}
fieldStart = expectedLineLength - fieldWidth;
}
void AnsysFileReader::interpret(const char *fmt, int &fieldWidth,
int &linelen) const
{
int i0, i1, i2;
qDebug() << "avtANSYSFileFormat::Interpret: " << fmt << endl;
// Example: 6e16.9
if(sscanf(fmt, "%de%d.%d", &i0, &i1, &i2) == 3)
{
linelen = i0 * i1 / 2;
fieldWidth = i1;
}
// Example: 19i7
else if(sscanf(fmt, "%di%d", &i0, &i1) == 2)
{
linelen = i0 * i1;
fieldWidth = i1;
}
else
{
qDebug() << "Invalid format string: " << fmt << endl;
}
}
PlyFileReader::PlyFileReader(QObject *parent) : AbstractFileReader(parent)
{
}
void PlyFileReader::run()
{
vtkInitOnce(&m_reader);
m_reader->SetFileName(fileName().toLocal8Bit());
m_reader->Update();
emit finished();
}
PdbFileReader::PdbFileReader(QObject *parent) : AbstractFileReader(parent)
{
}
void PdbFileReader::run()
{
vtkInitOnce(&m_reader);
m_reader->SetFileName(fileName().toLocal8Bit());
m_reader->Update();
emit finished();
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/filereaderutils.h
================================================
#ifndef FILEREADERUTILS_H
#define FILEREADERUTILS_H
#include <QObject>
#include <QRunnable>
#include <QMap>
#include <vtkDataObject.h>
#include <vtkGenericDataObjectReader.h>
#include <vtkSTLReader.h>
#include <vtkOBJReader.h>
#include <vtkLSDynaReader.h>
#include <vtkFLUENTReader.h>
#include <vtkMultiBlockDataSet.h>
#include <vtkPLYReader.h>
#include <vtkPDBReader.h>
#include "vtkutils_global.h"
#include "vtkutils.h"
class vtkDataArray;
namespace VtkUtils
{
template <class T, class P = vtkDataObject>
class ReaderTempl
{
public:
// virtual void run() = 0;
virtual P* dataObject() const
{
if (m_reader)
return m_reader->GetOutput();
return nullptr;
}
T* reader() const { return m_reader; }
protected:
T* m_reader = nullptr;
P* m_dataObject = nullptr;
};
class VTKUTILS_EXPORT AbstractFileReader : public QObject, public QRunnable
{
Q_OBJECT
public:
explicit AbstractFileReader(QObject* parent = nullptr);
void setFileName(const QString& file);
QString fileName() const;
void setTitle(const QString& title);
QString title() const;
signals:
void finished();
protected:
QString m_fileName;
QString m_title;
};
class VTKUTILS_EXPORT VtkFileReader : public AbstractFileReader, public ReaderTempl<vtkGenericDataObjectReader>
{
Q_OBJECT
public:
explicit VtkFileReader(QObject* parent = nullptr);
void run();
};
class VTKUTILS_EXPORT StlFileReader : public AbstractFileReader, public ReaderTempl<vtkSTLReader>
{
Q_OBJECT
public:
explicit StlFileReader(QObject* parent = nullptr);
void run();
};
class VTKUTILS_EXPORT ObjFileReader : public AbstractFileReader, public ReaderTempl<vtkOBJReader>
{
Q_OBJECT
public:
explicit ObjFileReader(QObject* parent = nullptr);
void run();
};
class VTKUTILS_EXPORT DynaFileReader : public AbstractFileReader, public ReaderTempl<vtkLSDynaReader, vtkMultiBlockDataSet>
{
Q_OBJECT
public:
explicit DynaFileReader(QObject* parent = nullptr);
void run();
};
class VTKUTILS_EXPORT NastranFileReader : public AbstractFileReader, public ReaderTempl<vtkGenericDataObjectReader>
{
Q_OBJECT
public:
explicit NastranFileReader(QObject* parent = nullptr);
void run();
protected:
std::vector<int> m_matList;
std::map<int,int> m_uniqMatIds;
};
class VTKUTILS_EXPORT FluentFileReader : public AbstractFileReader, public ReaderTempl<vtkFLUENTReader, vtkMultiBlockDataSet>
{
Q_OBJECT
public:
explicit FluentFileReader(QObject* parent = nullptr);
void run();
protected:
QMap<QString, vtkDataArray*> m_dataMap;
};
class VTKUTILS_EXPORT AnsysFileReader : public AbstractFileReader, public ReaderTempl<vtkGenericDataObjectReader>
{
Q_OBJECT
public:
explicit AnsysFileReader(QObject* parent = nullptr);
void run();
protected:
void interpretFormatString(char *line, int &fieldStart,
int &fieldWidth, int &expectedLineLength) const;
void interpretFormatStringEx(char *line, int &firstFieldWidth, int &fieldStart,
int &fieldWidth, int &expectedLineLength) const;
void interpret(const char *fmt, int &fieldWidth,
int &linelen) const;
};
class VTKUTILS_EXPORT PlyFileReader : public AbstractFileReader, public ReaderTempl<vtkPLYReader>
{
Q_OBJECT
public:
explicit PlyFileReader(QObject* parent = nullptr);
void run();
};
class VTKUTILS_EXPORT PdbFileReader : public AbstractFileReader, public ReaderTempl<vtkPDBReader>
{
Q_OBJECT
public:
explicit PdbFileReader(QObject* parent = nullptr);
void run();
};
} // namespace VtkUtils
#endif // FILEREADERUTILS_H
================================================
FILE: libs/vtkutils/implicitplanewidgetobserver.cpp
================================================
#include "implicitplanewidgetobserver.h"
#include <vtkImplicitPlaneWidget.h>
namespace VtkUtils
{
ImplicitPlaneWidgetObserver::ImplicitPlaneWidgetObserver(QObject* parent) : AbstractWidgetObserver(parent)
{
}
void ImplicitPlaneWidgetObserver::Execute(vtkObject *caller, unsigned long eventId, void *callData)
{
Q_UNUSED(eventId)
Q_UNUSED(callData)
vtkImplicitPlaneWidget* widget = reinterpret_cast<vtkImplicitPlaneWidget*>(caller);
if (widget) {
emit originChanged(widget->GetOrigin());
emit normalChanged(widget->GetNormal());
}
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/implicitplanewidgetobserver.h
================================================
#ifndef IMPLICITPLANEWIDGETOBSERVER_H
#define IMPLICITPLANEWIDGETOBSERVER_H
#include "abstractwidgetobserver.h"
namespace VtkUtils
{
class VTKUTILS_EXPORT ImplicitPlaneWidgetObserver : public AbstractWidgetObserver
{
Q_OBJECT
public:
explicit ImplicitPlaneWidgetObserver(QObject* parent = nullptr);
signals:
void originChanged(double* origin);
void normalChanged(double* normal);
protected:
void Execute(vtkObject *caller, unsigned long eventId, void* callData);
};
} // namespace VtkUtils
#endif // IMPLICITPLANEWIDGETOBSERVER_H
================================================
FILE: libs/vtkutils/interactor.cpp
================================================
#include "interactor.h"
#include "../graph3d.h"
#include "../postprocessor.h"
#include "util.h"
#include <vtkRenderer.h>
#include <vtkInteractorStyleTrackballCamera.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
class InteractorPrivate
{
public:
ComDataGui3D::Graph3D* graph = nullptr;
ComDataGui3D::PostProcessor* postprocessor = nullptr;
vtkRenderer* renderer = nullptr;
bool isHooked = false;
bool isVisible = false;
};
Interactor::Interactor(QObject* parent) : QObject(parent)
{
d_ptr = new InteractorPrivate;
}
Interactor::~Interactor()
{
delete d_ptr;
}
int Interactor::type() const
{
return DEFAULT;
}
void Interactor::attach(ComDataGui3D::PostProcessor* pp)
{
if (d_ptr->postprocessor != pp) {
d_ptr->postprocessor = pp;
d_ptr->graph = pp->graph();
d_ptr->renderer = pp->renderer();
d_ptr->isHooked = true;
}
}
void Interactor::detach()
{
Q_ASSERT(graph() != nullptr);
setDefaultInteractorStyle();
d_ptr->postprocessor = nullptr;
d_ptr->graph = nullptr;
d_ptr->renderer = nullptr;
d_ptr->isHooked = false;
}
bool Interactor::isHooked() const
{
return d_ptr->isHooked;
}
void Interactor::update()
{
// no impl
d_ptr->graph->update();
}
void Interactor::setVisible(bool visible)
{
if (d_ptr->isVisible != visible) {
if (visible)
setSpecialInteractorStyle();
else
setDefaultInteractorStyle();
graph()->update();
}
}
bool Interactor::isVisible() const
{
return d_ptr->isVisible;
}
ComDataGui3D::Graph3D* Interactor::graph() const
{
return d_ptr->graph;
}
vtkRenderer* Interactor::renderer() const
{
return d_ptr->renderer;
}
ComDataGui3D::PostProcessor* Interactor::processor() const
{
return d_ptr->postprocessor;
}
double* Interactor::bounds() const
{
if (d_ptr->postprocessor)
return d_ptr->postprocessor->bounds();
return nullptr;
}
void Interactor::setDefaultInteractorStyle()
{
vtkInteractorStyleTrackballCamera* style = vtkInteractorStyleTrackballCamera::New();
style->SetDefaultRenderer(renderer());
graph()->GetRenderWindow()->GetInteractor()->SetInteractorStyle(style);
}
void Interactor::setSpecialInteractorStyle()
{
}
================================================
FILE: libs/vtkutils/interactor.h
================================================
#ifndef INTERACTOR_H
#define INTERACTOR_H
#define DEFAULT 0
#define BOXCUTTER 1
#define LINEPROBER 2
#define PLANECUTTER 3
#define SPHERECUTTER 4
#define POINTMOVER 5
#include <QObject>
namespace ComDataGui3D
{
class Graph3D;
class PostProcessor;
}
class vtkRenderer;
class InteractorPrivate;
class Interactor : public QObject
{
Q_OBJECT
public:
explicit Interactor(QObject* parent = nullptr);
virtual ~Interactor();
virtual int type() const;
virtual void attach(ComDataGui3D::PostProcessor* pp);
virtual void detach();
bool isHooked() const;
virtual void update();
virtual void setVisible(bool visible);
virtual bool isVisible() const;
protected:
ComDataGui3D::Graph3D* graph() const;
vtkRenderer* renderer() const;
ComDataGui3D::PostProcessor* processor() const;
double* bounds() const;
void setDefaultInteractorStyle();
virtual void setSpecialInteractorStyle();
private:
InteractorPrivate* d_ptr;
Q_DISABLE_COPY(Interactor)
};
#endif // INTERACTOR_H
================================================
FILE: libs/vtkutils/lineprober.cpp
================================================
#include "lineprober.h"
#include "detail/util.h"
#include "qcustomplot.h"
#include "movelineinteractorstyle.h"
#include "../graph3d.h"
#include "../postprocessor.h"
#include <vtkActor.h>
#include <vtkSmartPointer.h>
#include <vtkSphereSource.h>
#include <vtkPolyDataMapper.h>
#include <vtkRenderer.h>
#include <vtkLineSource.h>
#include <vtkProperty.h>
#include <vtkRenderWindow.h>
#include <vtkXYPlotActor.h>
#include <vtkMath.h>
#include <vtkFieldData.h>
#include <vtkDoubleArray.h>
#include <vtkPointData.h>
#include <QLabel>
#include <QEvent>
#include <QVTKWidget.h>
#include <QSplitter>
static const char *DefaultColors[] =
{
"LightSalmon",
"SteelBlue",
"Yellow",
"Fuchsia",
"PaleGreen",
"PaleTurquoise",
"Cornsilk",
"HotPink",
"Peru",
"Maroon"
};
class Plot2DOverlay;
class LineProberPrivate
{
public:
LineProberPrivate();
vtkActor* firstBallActor = nullptr;
vtkActor* secondBallActor = nullptr;
vtkActor* lineActor = nullptr;
double pot1[3];
double pot2[3];
bool isPlotVisible = true;
QCustomPlot* plot = nullptr;
};
LineProberPrivate::LineProberPrivate()
{
}
LineProber::LineProber(QObject* parent) : Interactor(parent)
{
d_ptr = new LineProberPrivate;
}
int LineProber::type() const
{
return LINEPROBER;
}
void LineProber::setPoint1(double* pot)
{
if (ComDataGui3D::detail::ArrayComparator<double>()(d_ptr->pot1, pot))
return;
ComDataGui3D::detail::ArrayAssigner<double>()(d_ptr->pot1, pot);
update();
}
double* LineProber::point1() const
{
return d_ptr->pot1;
}
void LineProber::setPoint2(double* pot)
{
if (ComDataGui3D::detail::ArrayComparator<double>()(d_ptr->pot2, pot))
return;
ComDataGui3D::detail::ArrayAssigner<double>()(d_ptr->pot2, pot);
update();
}
double* LineProber::point2() const
{
return d_ptr->pot2;
}
void LineProber::setPoints(double* pot1, double* pot2)
{
if (ComDataGui3D::detail::ArrayComparator<double>()(d_ptr->pot1, pot1) &&
ComDataGui3D::detail::ArrayComparator<double>()(d_ptr->pot2, pot2))
return;
ComDataGui3D::detail::ArrayAssigner<double>()(d_ptr->pot1, pot1);
ComDataGui3D::detail::ArrayAssigner<double>()(d_ptr->pot2, pot2);
update();
}
void LineProber::update()
{
//
ComDataGui3D::vtkInitOnce(&d_ptr->firstBallActor);
ComDataGui3D::vtkInitOnce(&d_ptr->secondBallActor);
ComDataGui3D::vtkInitOnce(&d_ptr->lineActor);
double bounds[6];
double* pb = this->bounds();
ComDataGui3D::detail::ArrayAssigner<double, 6>()(bounds, pb);
double xRange = bounds[1] - bounds[0];
double yRange = bounds[3] - bounds[2];
double zRange = bounds[5] - bounds[4];
double minRange = qMin(xRange, qMin(yRange, zRange));
double radius = minRange / 50;
CREATE_VTKOBJ(vtkSphereSource, ss1);
ss1->SetCenter(d_ptr->pot1);
ss1->SetRadius(radius);
ss1->Update();
CREATE_VTKOBJ(vtkSphereSource, ss2);
ss2->SetCenter(d_ptr->pot2);
ss2->SetRadius(radius);
ss2->Update();
CREATE_VTKOBJ(vtkPolyDataMapper, mapper1);
mapper1->SetInputConnection(ss1->GetOutputPort());
CREATE_VTKOBJ(vtkPolyDataMapper, mapper2);
mapper2->SetInputConnection(ss2->GetOutputPort());
d_ptr->firstBallActor->SetMapper(mapper1);
d_ptr->secondBallActor->SetMapper(mapper2);
CREATE_VTKOBJ(vtkLineSource, ls);
ls->SetPoint1(d_ptr->pot1);
ls->SetPoint2(d_ptr->pot2);
ls->Update();
CREATE_VTKOBJ(vtkPolyDataMapper, lineMapper);
lineMapper->SetInputConnection(ls->GetOutputPort());
d_ptr->lineActor->SetMapper(lineMapper);
d_ptr->lineActor->GetProperty()->SetLineWidth(4);
renderer()->AddActor(d_ptr->firstBallActor);
renderer()->AddActor(d_ptr->secondBallActor);
renderer()->AddActor(d_ptr->lineActor);
Interactor::update();
}
void LineProber::attach(ComDataGui3D::PostProcessor *pp)
{
if (!pp)
return;
Interactor::attach(pp);
if (d_ptr->isPlotVisible)
createPlot();
double* bds = this->bounds();
d_ptr->pot1[0] = bds[0];
d_ptr->pot1[1] = bds[2] + (bds[3] - bds[2]) / 2;
d_ptr->pot1[2] = bds[4] + (bds[5] - bds[4]) / 2;
d_ptr->pot2[0] = bds[1];
d_ptr->pot2[1] = bds[2] + (bds[3] - bds[2]) / 2;
d_ptr->pot2[2] = bds[4] + (bds[5] - bds[4]) / 2;
update();
setSpecialInteractorStyle();
}
void LineProber::detach()
{
renderer()->RemoveActor(d_ptr->firstBallActor);
renderer()->RemoveActor(d_ptr->secondBallActor);
renderer()->RemoveActor(d_ptr->lineActor);
Interactor::detach();
destroyPlot();
}
void LineProber::setData(vtkPointData *pd)
{
if (!d_ptr->plot)
return;
d_ptr->plot->clearGraphs();
int numOfArray = pd->GetNumberOfArrays();
int colorCount = sizeof(DefaultColors) / sizeof(DefaultColors[0]);
for (int i = 0; i < numOfArray; ++i) {
QString arrayName(pd->GetArrayName(i));
// skip this kind of data
if (arrayName.compare("vtkValidPointMask", Qt::CaseInsensitive) == 0)
continue;
d_ptr->plot->addGraph();
d_ptr->plot->graph(i)->setName(arrayName);
d_ptr->plot->graph(i)->setPen(QColor(DefaultColors[i % colorCount]));
vtkDataArray* da = pd->GetArray(i);
int numOfTuples = da->GetNumberOfTuples();
QVector<double> x(numOfTuples), y(numOfTuples);
for (int dataIndex = 0; dataIndex < numOfTuples; ++dataIndex) {
x.append(dataIndex);
double value = da->GetTuple1(dataIndex);
y.append(value);
}
d_ptr->plot->graph(i)->setData(x, y);
d_ptr->plot->graph(i)->rescaleAxes(true);
}
d_ptr->plot->replot();
}
void LineProber::setVisible(bool visible)
{
if (d_ptr->firstBallActor && d_ptr->firstBallActor->GetVisibility() != visible) {
d_ptr->firstBallActor->SetVisibility(visible);
d_ptr->secondBallActor->SetVisibility(visible);
d_ptr->lineActor->SetVisibility(visible);
if (d_ptr->plot)
d_ptr->plot->setVisible(visible);
Interactor::setVisible(visible);
}
}
bool LineProber::isVisible() const
{
if (d_ptr->firstBallActor)
return d_ptr->firstBallActor->GetVisibility();
return Interactor::isVisible();
}
void LineProber::setPlotVisible(bool visible)
{
if (d_ptr->isPlotVisible != visible) {
d_ptr->isPlotVisible = visible;
if (visible)
createPlot();
else
destroyPlot();
}
}
bool LineProber::isPlotVisible() const
{
return d_ptr->isPlotVisible;
}
void LineProber::onMouseReleased()
{
if (processor())
processor()->apply();
}
void LineProber::createPlot()
{
if (!d_ptr->plot) {
QSplitter* splitter = qobject_cast<QSplitter*>(graph()->parent());
d_ptr->plot = new QCustomPlot(graph());
splitter->addWidget(d_ptr->plot);
d_ptr->plot->setAttribute(Qt::WA_TranslucentBackground);
d_ptr->plot->xAxis2->setVisible(true);
d_ptr->plot->xAxis2->setTickLabels(false);
d_ptr->plot->yAxis2->setVisible(true);
d_ptr->plot->yAxis2->setTickLabels(false);
d_ptr->plot->legend->setVisible(true);
d_ptr->plot->legend->setFont(QFont("Helvetica",9));
d_ptr->plot->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom | QCP::iSelectPlottables);
connect(d_ptr->plot->xAxis, SIGNAL(rangeChanged(QCPRange)), d_ptr->plot->xAxis2, SLOT(setRange(QCPRange)));
connect(d_ptr->plot->yAxis, SIGNAL(rangeChanged(QCPRange)), d_ptr->plot->yAxis2, SLOT(setRange(QCPRange)));
d_ptr->plot->show();
d_ptr->plot->clearGraphs();
}
}
void LineProber::destroyPlot()
{
if (d_ptr->plot) {
delete d_ptr->plot;
d_ptr->plot = nullptr;
}
}
void LineProber::setSpecialInteractorStyle()
{
MoveLineInteractorStyle* style = MoveLineInteractorStyle::New();
style->setGraph(graph());
style->SetDefaultRenderer(renderer());
style->setBounds(bounds());
style->setActors(d_ptr->firstBallActor, d_ptr->secondBallActor, d_ptr->lineActor);
style->setPoints(d_ptr->pot1, d_ptr->pot2);
connect(graph(), SIGNAL(clickPositionChanged(QPoint)), style, SLOT(setClickPosition(QPoint)));
connect(graph(), SIGNAL(movePositionChanged(QPoint)), style, SLOT(setMovePosition(QPoint)));
connect(style, SIGNAL(point1Changed(double*)), this, SIGNAL(point1Changed(double*)));
connect(style, SIGNAL(point2Changed(double*)), this, SIGNAL(point2Changed(double*)));
connect(style, SIGNAL(pointsChanged(double*,double*)), this, SIGNAL(pointsChanged(double*,double*)));
connect(style, SIGNAL(point1Changed(double*)), this, SLOT(setPoint1(double*)));
connect(style, SIGNAL(point2Changed(double*)), this, SLOT(setPoint2(double*)));
connect(style, SIGNAL(pointsChanged(double*,double*)), this, SLOT(setPoints(double*,double*)));
connect(style, SIGNAL(mouseReleased()), this, SLOT(onMouseReleased()));
graph()->GetRenderWindow()->GetInteractor()->SetInteractorStyle(style);
}
================================================
FILE: libs/vtkutils/lineprober.h
================================================
#ifndef LINEPROBER_H
#define LINEPROBER_H
#include "interactor.h"
class vtkPointData;
class LineProberPrivate;
class LineProber : public Interactor
{
Q_OBJECT
public:
explicit LineProber(QObject* parent = nullptr);
int type() const;
public slots:
void setPoint1(double* pot);
double* point1() const;
void setPoint2(double* pot);
double* point2() const;
void setPoints(double* pot1, double* pot2);
void update();
void attach(ComDataGui3D::PostProcessor* pp);
void detach();
void setData(vtkPointData* ds);
void setVisible(bool visible);
bool isVisible() const;
void setPlotVisible(bool visible);
bool isPlotVisible() const;
signals:
void point1Changed(double* pot);
void point2Changed(double* pot);
void pointsChanged(double* pot1, double* pot2);
private slots:
void onMouseReleased();
private:
void createPlot();
void destroyPlot();
protected:
void setSpecialInteractorStyle();
private:
Q_DISABLE_COPY(LineProber)
LineProberPrivate* d_ptr;
};
#endif // LINEPROBER_H
================================================
FILE: libs/vtkutils/linewidgetobserver.cpp
================================================
#include "linewidgetobserver.h"
#include <vtkLineWidget.h>
namespace VtkUtils
{
LineWidgetObserver::LineWidgetObserver(QObject *parent) : AbstractWidgetObserver(parent)
{
}
void LineWidgetObserver::Execute(vtkObject *caller, unsigned long eventId, void *)
{
vtkLineWidget *widget = reinterpret_cast<vtkLineWidget*>(caller);
if (widget)
emit pointsChanged(widget->GetPoint1(), widget->GetPoint2());
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/linewidgetobserver.h
================================================
#ifndef LINEWIDGETOBSERVER_H
#define LINEWIDGETOBSERVER_H
#include "abstractwidgetobserver.h"
class vtkLineWidget;
namespace VtkUtils
{
class VTKUTILS_EXPORT LineWidgetObserver : public AbstractWidgetObserver
{
Q_OBJECT
public:
explicit LineWidgetObserver(QObject *parent = 0);
signals:
void pointsChanged(double* point1, double* point2);
protected:
void Execute(vtkObject *caller, unsigned long eventId, void*);
};
} // namespace VtkUtils
#endif // LINEWIDGETOBSERVER_H
================================================
FILE: libs/vtkutils/modeltovtktableconverter.cpp
================================================
#include "modeltovtktableconverter.h"
#include "vtkutils.h"
#include <utils/tablemodel.h>
#include <utils/utils.h>
#include <vtkTable.h>
#include <QDebug>
namespace VtkUtils
{
ModelToVtkTableConverter::ModelToVtkTableConverter(Utils::TableModel* model) : m_model(model)
{
}
void ModelToVtkTableConverter::setLabels(const QStringList& labels)
{
m_labels = labels;
}
QStringList ModelToVtkTableConverter::labels() const
{
return m_labels;
}
void ModelToVtkTableConverter::run()
{
if (!m_model) {
qDebug() << "ModelToVtkTableConverter::run : null model.";
emit finished();
return;
}
vtkInitOnce(&m_table);
m_table->Initialize();
int rows = m_model->rowCount();
int cols = m_model->columnCount();
QString columnName;
for (int col = 0; col < cols ; ++col) {
columnName = m_labels.size() > col ? m_labels.at(col) : QString("column#%1").arg(col + 1);
vtkSmartPointer<vtkDoubleArray> arr = vtkDoubleArray::New();
arr->SetName(columnName.toUtf8().data());
m_table->AddColumn(arr);
}
m_table->SetNumberOfRows(rows); // the order matters , first you add columns then you set the rows of columns
for (int r = 0; r < rows; ++r)
for (int c = 0; c < cols; ++c)
m_table->SetValue(r, c, m_model->data(r, c));
emit finished();
}
vtkTable* ModelToVtkTableConverter::table() const
{
return m_table;
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/modeltovtktableconverter.h
================================================
#ifndef MODELTOVTKTABLECONVERTER_H
#define MODELTOVTKTABLECONVERTER_H
#include <utils/signalledrunable.h>
#include "vtkutils_global.h"
namespace Utils
{
class TableModel;
}
class vtkTable;
namespace VtkUtils
{
class VTKUTILS_EXPORT ModelToVtkTableConverter : public Utils::SignalledRunnable
{
Q_OBJECT
public:
explicit ModelToVtkTableConverter(Utils::TableModel* model);
void setLabels(const QStringList& labels);
QStringList labels() const;
void run();
vtkTable* table() const;
private:
Utils::TableModel* m_model = nullptr;
vtkTable* m_table = nullptr;
QStringList m_labels;
};
} // namespace VtkUtils
#endif // MODELTOVTKTABLECONVERTER_H
================================================
FILE: libs/vtkutils/moveactorinteractorstyle.cpp
================================================
#include "moveactorinteractorstyle.h"
#include <utils/utils.h>
#include <vtkutils/vtkutils.h>
#include <vtkObjectFactory.h>
#include <vtkPickingManager.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkPicker.h>
#include <vtkCellPicker.h>
#include <vtkPropPicker.h>
#include <vtkPointPicker.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkExtractEdges.h>
#include <vtkPolyDataMapper.h>
#include <vtkProperty.h>
#include <QDebug>
static const QColor HighlightColor = Qt::yellow;
namespace VtkUtils
{
vtkStandardNewMacro(MoveActorInteractorStyle);
MoveActorInteractorStyle::MoveActorInteractorStyle(QObject *parent) : QObject(parent)
{
}
void MoveActorInteractorStyle::OnLeftButtonDown()
{
vtkInteractorStyleTrackballCamera::OnLeftButtonDown();
int x = GetInteractor()->GetEventPosition()[0];
int y = GetInteractor()->GetEventPosition()[1];
VTK_CREATE(vtkPicker, picker);
picker->SetTolerance(0.001);
vtkRenderer* defaultRenderer = GetDefaultRenderer();
picker->Pick(x, y, 0, defaultRenderer);
m_pickedActor = picker->GetActor();
}
void MoveActorInteractorStyle::OnLeftButtonUp()
{
vtkInteractorStyleTrackballCamera::OnLeftButtonUp();
emit actorMoved(m_pickedActor);
m_pickedActor = nullptr;
}
void MoveActorInteractorStyle::Rotate()
{
if (m_pickedActor)
return;
vtkInteractorStyleTrackballCamera::Rotate();
}
void MoveActorInteractorStyle::Spin()
{
if (m_pickedActor)
return;
vtkInteractorStyleTrackballCamera::Spin();
}
void MoveActorInteractorStyle::OnMouseMove()
{
vtkInteractorStyleTrackballCamera::OnMouseMove();
if (m_useHighlight) {
int x = GetInteractor()->GetEventPosition()[0];
int y = GetInteractor()->GetEventPosition()[1];
VTK_CREATE(vtkPicker, picker);
picker->SetTolerance(0.001);
vtkRenderer* defaultRenderer = GetDefaultRenderer();
picker->Pick(x, y, 0, defaultRenderer);
vtkActor* hoverActor = picker->GetActor();
if (hoverActor) {
vtkDataSet* dataSet = hoverActor->GetMapper()->GetInput();
double* hoverPos = picker->GetPickPosition();
VtkUtils::vtkInitOnce(m_highlightActor);
m_highlightActor->SetPickable(false);
VTK_CREATE(vtkExtractEdges, edges);
edges->SetInputData(dataSet);
VTK_CREATE(vtkPolyDataMapper, mapper);
mapper->SetInputConnection(edges->GetOutputPort());
double clrArr[3];
Utils::vtkColor(HighlightColor, clrArr);
m_highlightActor->SetMapper(mapper);
m_highlightActor->SetVisibility(1);
m_highlightActor->GetProperty()->SetColor(clrArr);
m_highlightActor->SetPosition(hoverPos);
defaultRenderer->AddActor(m_highlightActor);
defaultRenderer->GetRenderWindow()->Render();
} else {
if (m_highlightActor) {
m_highlightActor->SetVisibility(0);
defaultRenderer->GetRenderWindow()->Render();
}
}
}
if (m_pickedActor) {
int x = GetInteractor()->GetEventPosition()[0];
int y = GetInteractor()->GetEventPosition()[1];
VTK_CREATE(vtkPicker, picker);
picker->SetTolerance(0.001);
vtkRenderer* defaultRenderer = GetDefaultRenderer();
picker->Pick(x, y, 0, defaultRenderer);
double* movePos = picker->GetPickPosition();
m_pickedActor->SetPosition(movePos);
defaultRenderer->GetRenderWindow()->Render();
}
}
void MoveActorInteractorStyle::OnChar()
{
vtkInteractorStyleTrackballCamera::OnChar();
}
void MoveActorInteractorStyle::setHighlightActor(bool highlight)
{
m_useHighlight = highlight;
}
bool MoveActorInteractorStyle::highlightActor() const
{
return m_useHighlight;
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/moveactorinteractorstyle.h
================================================
#ifndef MOVEACTORINTERACTORSTYLE_H
#define MOVEACTORINTERACTORSTYLE_H
#include <QObject>
#include <vtkInteractorStyleTrackballCamera.h>
#include <vtkSmartPointer.h>
#include "vtkutils_global.h"
namespace VtkUtils
{
class VTKUTILS_EXPORT MoveActorInteractorStyle : public QObject, public vtkInteractorStyleTrackballCamera
{
Q_OBJECT
public:
static MoveActorInteractorStyle *New();
vtkTypeMacro(MoveActorInteractorStyle, vtkInteractorStyleTrackballCamera);
virtual void OnLeftButtonDown();
virtual void OnLeftButtonUp();
virtual void Rotate();
virtual void Spin();
virtual void OnMouseMove();
virtual void OnChar();
void setHighlightActor(bool highlight);
bool highlightActor() const;
// Todo: add some signals
signals:
void actorMoved(vtkActor* actor);
protected:
explicit MoveActorInteractorStyle(QObject *parent = 0);
protected:
vtkSmartPointer<vtkActor> m_pickedActor;
bool m_useHighlight = true;
vtkSmartPointer<vtkActor> m_highlightActor;
};
} // namespace VtkUtils
#endif // MOVEACTORINTERACTORSTYLE_H
================================================
FILE: libs/vtkutils/movelineinteractorstyle.cpp
================================================
#include "movelineinteractorstyle.h"
#include "../graph3d.h"
#include "util.h"
#include <vtkObjectFactory.h>
#include <vtkSmartPointer.h>
#include <vtkPointPicker.h>
#include <vtkPlane.h>
#include <vtkMath.h>
vtkStandardNewMacro(MoveLineInteractorStyle);
MoveLineInteractorStyle::MoveLineInteractorStyle()
{
}
MoveLineInteractorStyle::~MoveLineInteractorStyle()
{
}
void MoveLineInteractorStyle::OnMouseMove()
{
CustomInteractorStyle::OnMouseMove();
if (m_pickedActor) {
int x = m_movePos.x();
int y = m_graph->height() - m_movePos.y();
setPickingCursor();
CREATE_VTKOBJ(vtkPointPicker, picker);
picker->Pick(x, y, 0, GetDefaultRenderer());
double* pickPos = picker->GetPickPosition();
if (m_pickedActor == m_firstBall) {
emit point1Changed(computeBoundedPos(pickPos));
} else if (m_pickedActor == m_secondBall){
emit point2Changed(computeBoundedPos(pickPos));
} else if (m_pickedActor == m_line) {
return;
// calculate the two ending points
qDebug() << "click pos: " << m_clickPos;
double origin[3];
double normal[3];
ComDataGui3D::Math::middlePoint(m_pot1, m_pot2, origin);
normal[0] = m_pot2[0] - m_pot1[0];
normal[1] = m_pot2[1] - m_pot1[1];
normal[2] = m_pot2[2] - m_pot1[2];
int clickX = m_clickPos.x();
int clickY = m_graph->height() - m_clickPos.y();
CREATE_VTKOBJ(vtkPointPicker, picker);
picker->Pick(clickX, clickY, 0, GetDefaultRenderer());
double* clickPos = picker->GetPickPosition();
CREATE_VTKOBJ(vtkPlane, plane);
plane->SetOrigin(clickPos);
plane->SetNormal(normal);
double dist = vtkMath::Distance2BetweenPoints(pickPos, clickPos);
plane->Push(dist);
qDebug() << "distance: " << dist;
double firstPos[3];
double secondPos[3];
plane->ProjectPoint(m_pot1, firstPos);
plane->ProjectPoint(m_pot2, secondPos);
qDebug() << "firstPos: " << firstPos[0] << "," << firstPos[1] << "," << firstPos[2];
qDebug() << "secondPos: " << secondPos[0] << "," << secondPos[1] << "," << secondPos[2];
emit pointsChanged(computeBoundedPos(firstPos), computeBoundedPos(secondPos));
}
}
}
void MoveLineInteractorStyle::OnLeftButtonUp()
{
CustomInteractorStyle::OnLeftButtonUp();
resetPickingCursor();
}
void MoveLineInteractorStyle::setActors(vtkActor* firstBall, vtkActor* secondBall, vtkActor* line)
{
m_firstBall = firstBall;
m_secondBall = secondBall;
m_line = line;
addWatchActor(m_firstBall);
addWatchActor(m_secondBall);
addWatchActor(m_line);
}
void MoveLineInteractorStyle::setPoints(double *pot1, double *pot2)
{
ComDataGui3D::detail::ArrayAssigner<double>()(m_pot1, pot1);
ComDataGui3D::detail::ArrayAssigner<double>()(m_pot2, pot2);
}
================================================
FILE: libs/vtkutils/movelineinteractorstyle.h
================================================
#ifndef MOVELINEINTERACTORSTYLE_H
#define MOVELINEINTERACTORSTYLE_H
#include "custominteractorstyle.h"
namespace ComDataGui3D
{
class Graph3D;
}
class vtkPointPicker;
class MoveLineInteractorStyle : public CustomInteractorStyle
{
Q_OBJECT
public:
static MoveLineInteractorStyle *New();
vtkTypeMacro(MoveLineInteractorStyle, vtkInteractorStyleTrackballCamera);
virtual void OnMouseMove();
virtual void OnLeftButtonUp();
void setActors(vtkActor* firstBall, vtkActor* secondBall, vtkActor* line);
void setPoints(double* pot1, double* pot2);
signals:
void point1Changed(double* pot);
void point2Changed(double* pot);
void pointsChanged(double* pot1, double* pot2);
private:
MoveLineInteractorStyle();
~MoveLineInteractorStyle();
vtkActor* m_firstBall;
vtkActor* m_secondBall;
vtkActor* m_line;
double m_pot1[3];
double m_pot2[3];
};
#endif // MOVELINEINTERACTORSTYLE_H
================================================
FILE: libs/vtkutils/movepointinteractorstyle.cpp
================================================
#include "movepointinteractorstyle.h"
namespace VtkUtils
{
MovePointInteractorStyle::MovePointInteractorStyle(QObject *parent) : QObject(parent)
{
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/movepointinteractorstyle.h
================================================
#ifndef MOVEPOINTINTERACTORSTYLE_H
#define MOVEPOINTINTERACTORSTYLE_H
#include <QObject>
#include "vtkutils_global.h"
namespace VtkUtils
{
class VTKUTILS_EXPORT MovePointInteractorStyle : public QObject
{
Q_OBJECT
public:
explicit MovePointInteractorStyle(QObject *parent = 0);
signals:
public slots:
};
} // namespace VtkUtils
#endif // MOVEPOINTINTERACTORSTYLE_H
================================================
FILE: libs/vtkutils/planecutter.cpp
================================================
#include "planecutter.h"
#include "../graph3d.h"
#include "util.h"
#include "disablerotationinteractorstyle.h"
#include "mousemonitor.h"
#include <vtkActor.h>
#include <vtkSmartPointer.h>
#include <vtkPolyDataMapper.h>
#include <vtkPolygon.h>
#include <vtkCutter.h>
#include <vtkPolygon.h>
#include <vtkCellArray.h>
#include <vtkDelaunay2D.h>
#include <vtkSphereSource.h>
#include <vtkLineSource.h>
#include <vtkConeSource.h>
#include <vtkPlane.h>
#include <vtkProperty.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
static const QColor NormalStickColor = QColor(233, 233, 233);
static const QColor HighlightStickColor = QColor(255, 0, 0);
static const int StandardLineWidth = 5;
static const int StickLineWidth = 3;
class PlaneCutterPrivate
{
public:
~PlaneCutterPrivate();
vtkActor* cutLineActor = nullptr;
vtkActor* cutSurfaceActor = nullptr;
vtkActor* originActor = nullptr;
vtkActor* normalLineActor = nullptr;
vtkActor* topBallActor = nullptr;
vtkActor* bottomBallActor = nullptr;
vtkPolygon* planePolygon = nullptr;
double topBallPos[3];
double bottomBallPos[3];
bool isRotating = false;
bool isChangingOrigin = false;
bool isCutPlaneVisible = true;
bool isArrowVisible = true;
double origin[3];
double normal[3];
double plane[3];
vtkPolyData* boxData = nullptr;
};
PlaneCutterPrivate::~PlaneCutterPrivate()
{
ComDataGui3D::detail::vtkSafeDelete(planePolygon);
}
PlaneCutter::PlaneCutter(QObject* parent) : Interactor(parent)
{
d_ptr = new PlaneCutterPrivate;
d_ptr->planePolygon = vtkPolygon::New();
}
PlaneCutter::~PlaneCutter()
{
delete d_ptr;
}
int PlaneCutter::type() const
{
return PLANECUTTER;
}
void PlaneCutter::update()
{
double projectPlaneNormal[3];
ComDataGui3D::detail::Normalizer()(normal(), projectPlaneNormal);
CREATE_VTKOBJ(vtkPlane, plane);
plane->SetOrigin(this->origin());
plane->SetNormal(projectPlaneNormal);
CREATE_VTKOBJ(vtkCutter, clip);
clip->SetInputData(d_ptr->boxData);
clip->SetCutFunction(plane);
clip->Update();
CREATE_VTKOBJ(vtkPolyDataMapper, mapper);
mapper->SetInputConnection(clip->GetOutputPort());
ComDataGui3D::vtkInitOnce(&d_ptr->cutLineActor);
d_ptr->cutLineActor->GetProperty()->SetLineWidth(StandardLineWidth);
d_ptr->cutLineActor->GetProperty()->SetColor(1.0, 0.0, 0.0);
renderer()->AddActor(d_ptr->cutLineActor);
d_ptr->cutLineActor->SetMapper(mapper);
d_ptr->cutLineActor->SetVisibility(1);
d_ptr->cutLineActor->SetPickable(1);
vtkPolyData* clipOutput = clip->GetOutput();
CREATE_VTKOBJ(vtkPolyData, pd);
pd->DeepCopy(clipOutput);
// origin
double* bds = this->bounds();
double xScale[2];
double yScale[2];
double zScale[2];
xScale[0] = bds[0];
xScale[1] = bds[1];
yScale[0] = bds[2];
yScale[1] = bds[3];
zScale[0] = bds[4];
zScale[1] = bds[5];
double minScale = qMin((xScale[1] - xScale[0]), qMin((yScale[1] - yScale[0]), (zScale[1] - zScale[0])));
int numOfPoints = clipOutput->GetNumberOfPoints();
// create plane using points
CREATE_VTKOBJ(vtkPolygon, polygon);
polygon->GetPointIds()->SetNumberOfIds(numOfPoints); //make a quad
CREATE_VTKOBJ(vtkCellArray, polygons);
if (numOfPoints == 3) {
vtkIdType p[3] = {0, 1, 2};
polygons->InsertNextCell(numOfPoints, p);
} else if (numOfPoints == 4) {
vtkIdType p[4] = {0, 1, 2, 3};
polygons->InsertNextCell(numOfPoints, p);
} else if (numOfPoints == 5){
vtkIdType p[5] = {0, 1, 2, 3, 4};
polygons->InsertNextCell(numOfPoints, p);
} else if (numOfPoints == 6) {
vtkIdType p[6] = {0, 1, 2, 3, 4, 5};
polygons->InsertNextCell(numOfPoints, p);
}
d_ptr->planePolygon->DeepCopy(polygon);
// Add the polygon to a list of polygons
pd->SetPolys(polygons);
CREATE_VTKOBJ(vtkDelaunay2D, del);
del->SetInputData(pd);
del->Update();
CREATE_VTKOBJ(vtkPolyDataMapper, surfaceMapper);
surfaceMapper->SetInputData(del->GetOutput());
surfaceMapper->Update();
ComDataGui3D::vtkInitOnce(&d_ptr->cutSurfaceActor);
d_ptr->cutSurfaceActor->SetMapper(surfaceMapper);
d_ptr->cutSurfaceActor->GetProperty()->SetOpacity(0.4);
d_ptr->cutSurfaceActor->GetProperty()->SetColor(1.0, 1.0, 1.0);
d_ptr->cutSurfaceActor->SetPickable(1);
d_ptr->cutSurfaceActor->SetVisibility(d_ptr->isCutPlaneVisible);
renderer()->AddActor(d_ptr->cutSurfaceActor);
// render stick
double *stickColorArr = ComDataGui3D::detail::Util::vtkColor(NormalStickColor);
double ballRadius = minScale / 40;
CREATE_VTKOBJ(vtkSphereSource, sphereSrc);
sphereSrc->SetCenter(origin());
sphereSrc->SetRadius(ballRadius);
sphereSrc->Update();
CREATE_VTKOBJ(vtkPolyDataMapper, sphereMapper);
sphereMapper->SetInputData(sphereSrc->GetOutput());
sphereMapper->Update();
ComDataGui3D::vtkInitOnce(&d_ptr->originActor);
d_ptr->originActor->SetMapper(sphereMapper);
d_ptr->originActor->GetProperty()->SetColor(stickColorArr);
renderer()->AddActor(d_ptr->originActor);
d_ptr->originActor->SetVisibility(1);
d_ptr->originActor->SetPickable(1);
if (d_ptr->isChangingOrigin || d_ptr->isRotating)
d_ptr->originActor->GetProperty()->SetColor(ComDataGui3D::detail::Util::vtkColor(HighlightStickColor));
double topPot[3];
double bottomPot[3];
double halfLength = minScale * 0.65;
// compute top & bottom points
CREATE_VTKOBJ(vtkPlane, topPlane);
topPlane->SetOrigin(this->origin());
topPlane->SetNormal(projectPlaneNormal);
topPlane->Push(halfLength);
topPlane->ProjectPoint(this->origin(), topPot);
CREATE_VTKOBJ(vtkPlane, bottomPlane);
bottomPlane->SetOrigin(this->origin());
bottomPlane->SetNormal(projectPlaneNormal);
bottomPlane->Push(-halfLength);
bottomPlane->ProjectPoint(this->origin(), bottomPot);
CREATE_VTKOBJ(vtkLineSource, lineSrc);
lineSrc->SetPoint1(topPot);
lineSrc->SetPoint2(bottomPot);
lineSrc->Update();
CREATE_VTKOBJ(vtkPolyDataMapper, lineMapper);
lineMapper->SetInputConnection(lineSrc->GetOutputPort());
ComDataGui3D::vtkInitOnce(&d_ptr->normalLineActor);
d_ptr->normalLineActor->SetMapper(lineMapper);
d_ptr->normalLineActor->GetProperty()->SetColor(stickColorArr);
d_ptr->normalLineActor->GetProperty()->SetLineWidth(StickLineWidth);
renderer()->AddActor(d_ptr->normalLineActor);
d_ptr->normalLineActor->SetVisibility(1);
d_ptr->normalLineActor->SetPickable(1);
// top ball
CREATE_VTKOBJ(vtkConeSource, topConeSrc);
topConeSrc->SetCenter(topPot);
topConeSrc->SetDirection(normal());
topConeSrc->SetResolution(20);
topConeSrc->SetHeight(ballRadius * 3);
topConeSrc->SetRadius(ballRadius);
topConeSrc->Update();
d_ptr->topBallPos[0] = topPot[0];
d_ptr->topBallPos[1] = topPot[1];
d_ptr->topBallPos[2] = topPot[2];
CREATE_VTKOBJ(vtkPolyDataMapper, topSphereMapper);
topSphereMapper->SetInputConnection(topConeSrc->GetOutputPort());
ComDataGui3D::vtkInitOnce(&d_ptr->topBallActor);
d_ptr->topBallActor->GetProperty()->SetColor(stickColorArr);
d_ptr->topBallActor->SetMapper(topSphereMapper);
d_ptr->topBallActor->SetVisibility(1);
d_ptr->topBallActor->SetPickable(1);
renderer()->AddActor(d_ptr->topBallActor);
// bottom ball
CREATE_VTKOBJ(vtkConeSource, bottomConeSrc);
bottomConeSrc->SetCenter(bottomPot);
bottomConeSrc->SetDirection(normal());
bottomConeSrc->SetResolution(20);
bottomConeSrc->SetHeight(ballRadius * 3);
bottomConeSrc->SetRadius(ballRadius);
bottomConeSrc->Update();
d_ptr->bottomBallPos[0] = bottomPot[0];
d_ptr->bottomBallPos[1] = bottomPot[1];
d_ptr->bottomBallPos[2] = bottomPot[2];
emit stickPointsChanged(topPot, bottomPot);
CREATE_VTKOBJ(vtkPolyDataMapper, bottomSphereMapper);
bottomSphereMapper->SetInputConnection(bottomConeSrc->GetOutputPort());
ComDataGui3D::vtkInitOnce(&d_ptr->bottomBallActor);
d_ptr->bottomBallActor->GetProperty()->SetColor(stickColorArr);
d_ptr->bottomBallActor->SetMapper(bottomSphereMapper);
d_ptr->bottomBallActor->SetVisibility(1);
d_ptr->bottomBallActor->SetPickable(1);
renderer()->AddActor(d_ptr->bottomBallActor);
if (d_ptr->isRotating) {
d_ptr->normalLineActor->GetProperty()->SetColor(ComDataGui3D::detail::Util::vtkColor(HighlightStickColor));
d_ptr->topBallActor->GetProperty()->SetColor(ComDataGui3D::detail::Util::vtkColor(HighlightStickColor));
d_ptr->bottomBallActor->GetProperty()->SetColor(ComDataGui3D::detail::Util::vtkColor(HighlightStickColor));
}
graph()->update();
}
void PlaneCutter::attach(ComDataGui3D::PostProcessor* pp)
{
if (!pp)
return;
qDebug() << __FUNCTION__;
Interactor::attach(pp);
update();
MouseMonitor* mm = new MouseMonitor(graph(), this);
graph()->installEventFilter(mm);
connect(mm, SIGNAL(mouseReleased()), this, SLOT(onMouseReleased()));
// show plane actor
setSpecialInteractorStyle();
}
void PlaneCutter::detach()
{
renderer()->RemoveActor(d_ptr->cutLineActor);
renderer()->RemoveActor(d_ptr->cutSurfaceActor);
renderer()->RemoveActor(d_ptr->originActor);
renderer()->RemoveActor(d_ptr->normalLineActor);
renderer()->RemoveActor(d_ptr->topBallActor);
renderer()->RemoveActor(d_ptr->bottomBallActor);
Interactor::detach();
}
void PlaneCutter::setOrigin(double* origin, bool update)
{
ComDataGui3D::detail::ArrayAssigner<double>()(d_ptr->origin, origin);
if (update)
this->update();
}
double* PlaneCutter::origin() const
{
return d_ptr->origin;
}
void PlaneCutter::setNormal(double* normal, bool update)
{
ComDataGui3D::detail::ArrayAssigner<double>()(d_ptr->normal, normal);
if (update)
this->update();
}
double* PlaneCutter::normal() const
{
return d_ptr->normal;
}
void PlaneCutter::setBoxData(vtkPolyData *data)
{
d_ptr->boxData = data;
}
void PlaneCutter::setArrowVisible(bool visible)
{
if (d_ptr->topBallActor) {
d_ptr->isArrowVisible = visible;
d_ptr->topBallActor->SetVisibility(visible);
d_ptr->bottomBallActor->SetVisibility(visible);
d_ptr->normalLineActor->SetVisibility(visible);
d_ptr->originActor->SetVisibility(visible);
graph()->update();
}
}
bool PlaneCutter::isArrowVisible() const
{
return d_ptr->isArrowVisible;
}
void PlaneCutter::setCutPlaneVisible(bool visible)
{
if (d_ptr->cutSurfaceActor) {
d_ptr->isCutPlaneVisible = visible;
d_ptr->cutSurfaceActor->SetVisibility(visible);
graph()->update();
}
}
bool PlaneCutter::isCutPlaneVisible() const
{
if (d_ptr->cutSurfaceActor)
return d_ptr->cutSurfaceActor->GetVisibility();
return false;
}
void PlaneCutter::setVisible(bool visible)
{
if (d_ptr->cutLineActor && d_ptr->cutLineActor->GetVisibility() != visible) {
d_ptr->cutLineActor->SetVisibility(visible);
d_ptr->cutSurfaceActor->SetVisibility(visible);
d_ptr->originActor->SetVisibility(visible);
d_ptr->normalLineActor->SetVisibility(visible);
d_ptr->topBallActor->SetVisibility(visible);
d_ptr->bottomBallActor->SetVisibility(visible);
Interactor::setVisible(visible);
}
}
bool PlaneCutter::isVisible() const
{
if (d_ptr->cutLineActor)
return d_ptr->cutLineActor->GetVisibility();
return Interactor::isVisible();
}
void PlaneCutter::onMouseReleased()
{
d_ptr->isChangingOrigin = false;
d_ptr->isRotating = false;
}
void PlaneCutter::onUpdate()
{
setArrowVisible(true);
processor()->apply();
}
void PlaneCutter::onOriginChanged(double *pos)
{
d_ptr->isChangingOrigin = true;
double* bds = bounds();
double tmp[3];
tmp[0] = ComDataGui3D::detail::boundedValue(pos[0], bds[0], bds[1]);
tmp[1] = ComDataGui3D::detail::boundedValue(pos[1], bds[2], bds[3]);
tmp[2] = ComDataGui3D::detail::boundedValue(pos[2], bds[4], bds[5]);
double newOrigin[3];
vtkPlane::ProjectPoint(tmp, this->origin(), this->normal(), newOrigin);
setOrigin(newOrigin);
emit originChanged(newOrigin);
}
void PlaneCutter::onNormalChanged(bool positive, double *pos)
{
d_ptr->isRotating = true;
double newNormal[3];
if (positive) {
newNormal[0] = pos[0] - this->origin()[0];
newNormal[1] = pos[1] - this->origin()[1];
newNormal[2] = pos[2] - this->origin()[2];
} else {
newNormal[0] = this->origin()[0] - pos[0];
newNormal[1] = this->origin()[1] - pos[1];
newNormal[2] = this->origin()[2] - pos[2];
}
ComDataGui3D::detail::Normalizer()(newNormal, newNormal);
setNormal(newNormal);
emit normalChanged(newNormal);
}
void PlaneCutter::onPlaneChanged(double *pos)
{
double newOri[3];
// have to use normalized normal
double newNormal[3];
ComDataGui3D::detail::Normalizer()(normal(), newNormal);
vtkPlane::ProjectPoint(origin(), pos, newNormal, newOri);
double* bds = bounds();
newOri[0] = ComDataGui3D::detail::boundedValue(newOri[0], bds[0], bds[1]);
newOri[1] = ComDataGui3D::detail::boundedValue(newOri[1], bds[2], bds[3]);
newOri[2] = ComDataGui3D::detail::boundedValue(newOri[2], bds[4], bds[5]);
setOrigin(newOri);
emit originChanged(newOri);
}
void PlaneCutter::setSpecialInteractorStyle()
{
DisableRotationInteractorStyle* style = DisableRotationInteractorStyle::New();
style->setGraph(graph());
style->SetDefaultRenderer(renderer());
style->setPlaneActor(d_ptr->cutSurfaceActor);
style->setFrameActor(d_ptr->cutLineActor);
style->setOriginActor(d_ptr->originActor);
style->setTopBallActor(d_ptr->topBallActor);
style->setBottomBallActor(d_ptr->bottomBallActor);
style->setStickActor(d_ptr->normalLineActor);
style->setOrigin(origin());
style->setNormal(normal());
style->setBounds(bounds());
// in the initial state, set the top & bottom ball's position
style->onStickPointsChanged(d_ptr->topBallPos, d_ptr->bottomBallPos);
connect(this, SIGNAL(stickPointsChanged(double*,double*)), style, SLOT(onStickPointsChanged(double*,double*)));
connect(style, SIGNAL(originChanged(double*)), this, SLOT(onOriginChanged(double*)));
connect(style, SIGNAL(normalChanged(bool, double*)), this, SLOT(onNormalChanged(bool, double*)));
connect(style, SIGNAL(planeChanged(double*)), this, SLOT(onPlaneChanged(double*)));
connect(this, SIGNAL(originChanged(double*)), style, SLOT(setOrigin(double*)));
connect(graph(), SIGNAL(clickPositionChanged(QPoint)), style, SLOT(setClickPosition(QPoint)));
connect(graph(), SIGNAL(movePositionChanged(QPoint)), style, SLOT(setMovePosition(QPoint)));
connect(style, SIGNAL(update()), this, SLOT(onUpdate()));
graph()->GetRenderWindow()->GetInteractor()->SetInteractorStyle(style);
}
================================================
FILE: libs/vtkutils/planecutter.h
================================================
#ifndef PLANECUTTER_H
#define PLANECUTTER_H
#include "interactor.h"
class vtkPolyData;
class PlaneCutterPrivate;
class PlaneCutter : public Interactor
{
Q_OBJECT
public:
explicit PlaneCutter(QObject* parent = nullptr);
~PlaneCutter();
int type() const;
void update();
void attach(ComDataGui3D::PostProcessor* pp);
void detach();
void setOrigin(double* origin, bool update = true);
double* origin() const;
void setNormal(double* normal, bool update = true);
double* normal() const;
void setBoxData(vtkPolyData* data);
void setArrowVisible(bool visible);
bool isArrowVisible() const;
void setCutPlaneVisible(bool visible);
bool isCutPlaneVisible() const;
void setVisible(bool visible);
bool isVisible() const;
signals:
void stickPointsChanged(double* topPot, double* bottomPot);
void originChanged(double* origin);
void normalChanged(double* normal);
private slots:
void onMouseReleased();
void onUpdate();
void onOriginChanged(double* pos);
void onNormalChanged(bool positive, double* pos);
void onPlaneChanged(double* pos);
protected:
void setSpecialInteractorStyle();
private:
PlaneCutterPrivate* d_ptr;
Q_DISABLE_COPY(PlaneCutter)
};
#endif // PLANECUTTER_H
================================================
FILE: libs/vtkutils/pointmover.cpp
================================================
#include "pointmover.h"
#include "util.h"
#include "movepointinteractorstyle.h"
#include "../graph3d.h"
#include "../postprocessor.h"
#include <vtkActor.h>
#include <vtkSphereSource.h>
#include <vtkSmartPointer.h>
#include <vtkPolyDataMapper.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
class PointMoverPrivate
{
public:
vtkActor* pointActor = nullptr;
double position[3];
};
PointMover::PointMover(QObject* parent) : Interactor(parent)
{
d_ptr = new PointMoverPrivate;
ComDataGui3D::detail::ArrayInitializer<double>()(d_ptr->position);
}
PointMover::~PointMover()
{
delete d_ptr;
}
int PointMover::type() const
{
return POINTMOVER;
}
void PointMover::update()
{
double* bds = this->bounds();
ComDataGui3D::vtkInitOnce(&d_ptr->pointActor);
d_ptr->pointActor->SetPickable(true);
double xRange = bds[1] - bds[0];
double yRange = bds[3] - bds[2];
double zRange = bds[5] - bds[4];
double maxRange = qMax(qMax(xRange, yRange), zRange);
double radius = maxRange / 100;
CREATE_VTKOBJ(vtkSphereSource, ss);
ss->SetRadius(radius);
ss->SetCenter(d_ptr->position);
ss->Update();
CREATE_VTKOBJ(vtkPolyDataMapper, mapper);
mapper->SetInputConnection(ss->GetOutputPort());
d_ptr->pointActor->SetMapper(mapper);
renderer()->AddActor(d_ptr->pointActor);
graph()->update();
}
void PointMover::attach(ComDataGui3D::PostProcessor* pp)
{
if (!pp)
return;
Interactor::attach(pp);
update();
setSpecialInteractorStyle();
}
void PointMover::detach()
{
renderer()->RemoveActor(d_ptr->pointActor);
Interactor::detach();
}
void PointMover::setPosition(double* pos)
{
if (ComDataGui3D::detail::ArrayComparator<double>()(d_ptr->position, pos))
return;
ComDataGui3D::detail::ArrayAssigner<double>()(d_ptr->position, pos);
update();
}
double* PointMover::position() const
{
return d_ptr->position;
}
void PointMover::setPointVisible(bool visible)
{
if (d_ptr->pointActor)
d_ptr->pointActor->SetVisibility(visible);
}
bool PointMover::isPointVisible() const
{
if (d_ptr->pointActor)
return d_ptr->pointActor->GetVisibility();
return false;
}
void PointMover::setVisible(bool visible)
{
if (d_ptr->pointActor && d_ptr->pointActor->GetVisibility() != visible) {
d_ptr->pointActor->SetVisibility(visible);
Interactor::setVisible(visible);
}
}
bool PointMover::isVisible() const
{
return isPointVisible();
}
void PointMover::onCenterChanged(double *center)
{
ComDataGui3D::detail::ArrayAssigner<double>()(d_ptr->position, center);
update();
}
void PointMover::onMouseReleased()
{
if (processor())
processor()->apply();
}
void PointMover::setSpecialInteractorStyle()
{
MovePointInteractorStyle* style = MovePointInteractorStyle::New();
style->setGraph(graph());
style->SetDefaultRenderer(renderer());
style->setBounds(bounds());
style->setActor(d_ptr->pointActor);
connect(graph(), SIGNAL(clickPositionChanged(QPoint)), style, SLOT(setClickPosition(QPoint)), Qt::DirectConnection);
connect(graph(), SIGNAL(movePositionChanged(QPoint)), style, SLOT(setMovePosition(QPoint)), Qt::DirectConnection);
connect(style, SIGNAL(centerChanged(double*)), this, SIGNAL(pointChanged(double*)));
connect(style, SIGNAL(centerChanged(double*)), this, SLOT(onCenterChanged(double*)));
connect(style, SIGNAL(mouseReleased()), this, SLOT(onMouseReleased()), Qt::DirectConnection);
graph()->GetRenderWindow()->GetInteractor()->SetInteractorStyle(style);
}
================================================
FILE: libs/vtkutils/pointmover.h
================================================
#ifndef POINTMOVER_H
#define POINTMOVER_H
#include "interactor.h"
class PointMoverPrivate;
class PointMover : public Interactor
{
Q_OBJECT
public:
explicit PointMover(QObject* parent = nullptr);
~PointMover();
int type() const;
public slots:
void update();
void attach(ComDataGui3D::PostProcessor* pp);
void detach();
void setPosition(double* pos);
double* position() const;
void setPointVisible(bool visible);
bool isPointVisible() const;
void setVisible(bool visible);
bool isVisible() const;
signals:
void pointChanged(double* pos);
private slots:
void onCenterChanged(double* center);
void onMouseReleased();
protected:
void setSpecialInteractorStyle();
private:
PointMoverPrivate* d_ptr;
Q_DISABLE_COPY(PointMover)
};
#endif // POINTMOVER_H
================================================
FILE: libs/vtkutils/pointstopolydataconverter.cpp
================================================
#include "vtkutils.h"
#include "pointstopolydataconverter.h"
#include <vtkPoints.h>
#include <vtkDoubleArray.h>
namespace VtkUtils
{
PointsToPolyDataConverter::PointsToPolyDataConverter(const QList<Utils::Point3F>& points) : m_points(points)
{
}
void PointsToPolyDataConverter::run()
{
if (m_points.isEmpty()) {
emit finished();
return;
}
VtkUtils::vtkInitOnce(m_polyData);
VTK_CREATE(vtkPoints, vtkpoints);
VTK_CREATE(vtkDoubleArray, scalarArray);
scalarArray->SetName("scalar");
for (int i = 0; i < m_points.size(); ++i) {
const Utils::Point3F& p3f = m_points.at(i);
vtkpoints->InsertNextPoint(p3f.x, p3f.y, p3f.z);
scalarArray->InsertNextTuple1(p3f.z); // z value as scalar
}
m_polyData->SetPoints(vtkpoints);
m_polyData->GetPointData()->SetScalars(scalarArray);
emit finished();
}
vtkPolyData* PointsToPolyDataConverter::polyData() const
{
return m_polyData;
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/pointstopolydataconverter.h
================================================
#ifndef POINTSTOPOLYDATACONVERTER_H
#define POINTSTOPOLYDATACONVERTER_H
#include <utils/point3f.h>
#include <utils/signalledrunable.h>
#include <vtkSmartPointer.h>
#include "vtkutils_global.h"
class vtkPolyData;
namespace VtkUtils
{
class VTKUTILS_EXPORT PointsToPolyDataConverter : public Utils::SignalledRunnable
{
Q_OBJECT
public:
explicit PointsToPolyDataConverter(const QList<Utils::Point3F>& points);
void run();
vtkPolyData* polyData() const;
private:
QList<Utils::Point3F> m_points;
vtkSmartPointer<vtkPolyData> m_polyData;
};
} // namespace VtkUtils
#endif // POINTSTOPOLYDATACONVERTER_H
================================================
FILE: libs/vtkutils/pointwidgetobserver.cpp
================================================
#include "pointwidgetobserver.h"
#include <vtkPointWidget.h>
namespace VtkUtils
{
PointWidgetObserver::PointWidgetObserver(QObject* parent) : AbstractWidgetObserver(parent)
{
}
void PointWidgetObserver::Execute(vtkObject *caller, unsigned long eventId, void *callData)
{
Q_UNUSED(eventId)
Q_UNUSED(callData)
vtkPointWidget* widget = reinterpret_cast<vtkPointWidget*>(caller);
if (widget)
emit positionChanged(widget->GetPosition());
}
} // namespace VtkUtils
================================================
FILE: libs/vtkutils/pointwidgetobserver.h
================================================
#ifndef POINTWIDGETOBSERVER_H
#define POINTWIDGETOBSERVER_H
#include "abstractwidgetobserver.h"
namespace VtkUtils
{
class VTKUTILS_EXPORT PointWidgetObserver : public AbstractWidgetObserver
{
Q_OBJECT
public:
explicit PointWidgetObserver(QObject* parent = nullptr);
signals:
void positionChanged(double* position);
protected:
void Execute(vtkObject *caller, unsigned long eventId, void *callData);
};
} // namespace VtkUtils
#endif // POINTWIDGETOBSERVER_H
================================================
FILE: libs/vtkutils/rendererslayoutalgo.h
================================================
#ifndef RENDERERSLAYOUTALGO_H
#define RENDERERSLAYOUTALGO_H
#include <vtkRenderer.h>
#include <QList>
namespace VtkUtils
{
template <int count>
inline void layoutRenderers(const QList<vtkRenderer*>& renderers)
{
}
// |X|
template <>
inline void layoutRenderers<1>(const QList<vtkRenderer*>& renderers)
{
Q_ASSERT(renderers.size() == 1);
vtkRenderer* renderer = renderers.first();
renderer->SetViewport(0.0, 0.0, 1.0, 1.0);
}
// |X|X|
template <>
inline void layoutRenderers<2>(const QList<vtkRenderer*>& renderers)
{
Q_ASSERT(renderers.size() == 2);
vtkRenderer* renderer1 = renderers.at(0);
vtkRenderer* renderer2 = renderers.at(1);
renderer1->SetViewport(0.0, 0.0, 0.5, 1.0);
renderer2->SetViewport(0.5, 0.0, 1.0, 1.0);
}
// |X|X|
// | X |
template <>
inline void layoutRenderers<3>(const QList<vtkRenderer*>& renderers)
{
Q_ASSERT(renderers.size() == 3);
vtkRenderer* renderer1 = renderers.at(0);
vtkRenderer* renderer2 = renderers.at(1);
vtkRenderer* renderer3 = renderers.at(2);
renderer1->SetViewport(0.0, 0.0, 0.5, 0.5);
renderer2->SetViewport(0.5, 0.0, 1.0, 0.5);
renderer3->SetViewport(0.0, 0.5, 1.0, 1.0);
}
// |X|X|
// |X|X|
template <>
inline void layoutRenderers<4>(const QList<vtkRenderer*>& renderers)
{
Q_ASSERT(renderers.size() == 4);
vtkRenderer* renderer1 = renderers.at(0);
vtkRenderer* renderer2 = renderers.at(1);
vtkRenderer* renderer3 = renderers.at(2);
vtkRenderer* renderer4 = renderers.at(3);
renderer1->SetViewport(0.0, 0.0, 0.5, 0.5);
renderer2->SetViewport(0.5, 0.0, 1.0, 0.5);
renderer3->SetViewport(0.0, 0.5, 0.5, 1.0);
renderer4->SetViewport(0.5, 0.5, 1.0, 1.0);
}
// |X|X|
// |X|X|
// | X |
template <>
inline void layoutRenderers<5>(const QList<vtkRenderer*>& renderers)
{
Q_ASSERT(renderers.size() == 5);
qreal dy = (qreal) 1 / 3;
vtkRenderer* renderer1 = renderers.at(0);
vtkRenderer* renderer2 = renderers.at(1);
vtkRenderer* renderer3 = renderers.at(2);
vtkRenderer* renderer4 = renderers.at(3);
vtkRenderer* renderer5 = renderers.at(4);
renderer1->SetViewport(0.0, 0.0, 0.5, dy);
renderer2->SetViewport(0.5, 0.0, 1.0, dy);
renderer3->SetViewport(0.0, dy, 0.5, 2 * dy);
renderer4->SetViewport(0.5, dy, 1.0, 2 * dy);
renderer5->SetViewport(0.0, 2 * dy, 1.0, 1.0);
}
// |X|X|X|
// |X|X|X|
template <>
inline void layoutRenderers<6>(const QList<vtkRenderer*>& renderers)
{
Q_ASSERT(renderers.size() == 6);
qreal dx = (qreal) 1 / 3;
vtkRenderer* renderer1 = renderers.at(0);
vtkRenderer* renderer2 = renderers.at(1);
vtkRenderer* renderer3 = renderers.at(2);
vtkRenderer* renderer4 = renderers.at(3);
vtkRenderer* renderer5 = renderers.at(4);
vtkRenderer* renderer6 = renderers.at(5);
renderer1->SetViewport(0.0, 0.0, dx, 0.5);
renderer2->SetViewport(dx, 0.0, 2 * dx, 0.5);
renderer3->SetViewport(2 * dx, 0.0, 1.0, 0.5);
renderer4->SetViewport(0.0, 0.5, dx, 1.0);
renderer5->SetViewport(dx, 0.5, 2 * dx, 1.0);
renderer6->SetViewport(2 * dx, 0.5, 1.0, 1.0);
}
// |X|X|X|
// |X|X|X|
// | X |
template <>
inline void layoutRenderers<7>(const QList<vtkRenderer*>& renderers)
{
Q_ASSERT(renderers.size() == 7);
qreal dx = (qreal) 1 / 3;
qreal dy = (qreal) 1 / 3;
vtkRenderer* renderer1 = renderers.at(0);
vtkRenderer* renderer2 = renderers.at(1);
vtkRenderer* renderer3 = renderers.at(2);
vtkRenderer* renderer4 = renderers.at(3);
vtkRenderer* renderer5 = renderers.at(4);
vtkRenderer* renderer6 = renderers.at(5);
vtkRenderer* renderer7 = renderers.at(6);
renderer1->SetViewport(0.0, 0.0, dx, dy);
renderer2->SetViewport(dx, 0.0, 2 * dx, dy);
renderer3->SetViewport(2 * dx, 0.0, 1.0, dy);
renderer4->SetViewport(0.0, dy, dx, 2 * dy);
renderer5->SetViewport(dx, dy, 2 * dx, 2 * dy);
renderer6->SetViewport(2 * dx, dy, 1.0, 2 * dy);
renderer7->SetViewport(0.0, 2 * dy, 1.0, 1.0);
}
// |X|X|X|X|
// |X|X|X|X|
template <>
inline void layoutRenderers<8>(const QList<vtkRenderer*>& renderers)
{
Q_ASSERT(renderers.size() == 8);
qreal dx = (qreal) 1 / 4;
qreal dy = (qreal) 1 / 2;
vtkRenderer* renderer1 = renderers.at(0);
vtkRenderer* renderer2 = renderers.at(1);
vtkRenderer* renderer3 = renderers.at(2);
vtkRenderer* renderer4 = renderers.at(3);
vtkRenderer* renderer5 = renderers.at(4);
vtkRenderer* renderer6 = renderers.at(5);
vtkRenderer* renderer7 = renderers.at(6);
vtkRenderer* renderer8 = renderers.at(7);
renderer1->SetViewport(0.0, 0.0, dx, dy);
renderer2->SetViewport(dx, 0.0, 2 * dx, dy);
renderer3->SetViewport(2 * dx, 0.0, 1.0, dy);
renderer4->SetViewport(3 * dx, dy, 1.0, dy);
renderer5->SetViewport(0.0, dy, dx, 1.0);
renderer6->SetViewport(dx, dy, 2 * dx, 1.0);
renderer7->SetViewport(2 * dx, dy, 3 * dx, 1.0);
renderer8->SetViewport(3 * dx, dy, 1.0, 1.0);
}
// |X|X|X|
// |X|X|X|
// |X|X|X|
template <>
inline void layoutRenderers<9>(const QList<vtkRenderer*>& renderers)
{
Q_ASSERT(renderers.size() == 9);
qreal dx = (qreal) 1 / 3;
qreal dy = (qreal) 1 / 3;
vtkRenderer* renderer1 = renderers.at(0);
vtkRenderer* renderer2 = renderers.at(1);
vtkRenderer* renderer3 = renderers.at(2);
vtkRenderer* renderer4 = renderers.at(3);
vtkRenderer* renderer5 = renderers.at(4);
vtkRenderer* renderer6 = renderers.at(5);
vtkRenderer* renderer7 = renderers.at(6);
vtkRenderer* renderer8 = renderers.at(7);
vtkRenderer* renderer9 = renderers.at(8);
renderer1->SetViewport(0.0, 0.0, dx, dy);
renderer2->SetViewport(dx, 0.0, 2 * dx, dy);
renderer3->SetViewport(2 * dx, 0.0, 1.0, dy);
renderer4->SetViewport(0.0, dy, dx,2 * dy);
re
gitextract_uerwcxh8/ ├── README.md ├── app.pri ├── demos.pri ├── demos.pro ├── lib.pri ├── libs/ │ ├── 3dparty/ │ │ ├── 3dparty.pri │ │ ├── 3dparty.pro │ │ ├── 3dparty_dependencies.pri │ │ ├── 3dparty_global.h │ │ ├── QRoundProgressBar.cpp │ │ ├── QRoundProgressBar.h │ │ ├── flowlayout.cpp │ │ └── flowlayout.h │ ├── libs.pro │ ├── utils/ │ │ ├── colorseries.cpp │ │ ├── colorseries.h │ │ ├── doublespinboxdelegate.cpp │ │ ├── doublespinboxdelegate.h │ │ ├── iplugin.h │ │ ├── ivtkplugin.cpp │ │ ├── ivtkplugin.h │ │ ├── modeltopointsconverter.cpp │ │ ├── modeltopointsconverter.h │ │ ├── modeltovectorsconverter.cpp │ │ ├── modeltovectorsconverter.h │ │ ├── point3f.cpp │ │ ├── point3f.h │ │ ├── pointsreader.cpp │ │ ├── pointsreader.h │ │ ├── pointstomodelconverter.cpp │ │ ├── pointstomodelconverter.h │ │ ├── signalblocker.cpp │ │ ├── signalblocker.h │ │ ├── signalledrunable.cpp │ │ ├── signalledrunable.h │ │ ├── tablemodel.cpp │ │ ├── tablemodel.h │ │ ├── utils.cpp │ │ ├── utils.h │ │ ├── utils.pri │ │ ├── utils.pro │ │ ├── utils_dependencies.pri │ │ ├── utils_global.h │ │ ├── vector4f.cpp │ │ └── vector4f.h │ ├── vtkutils/ │ │ ├── abstractimageprocessor.cpp │ │ ├── abstractimageprocessor.h │ │ ├── abstractwidgetobserver.cpp │ │ ├── abstractwidgetobserver.h │ │ ├── actorexporter.cpp │ │ ├── actorexporter.h │ │ ├── anglewidgetobserver.cpp │ │ ├── anglewidgetobserver.h │ │ ├── boxcutter.cpp │ │ ├── boxcutter.h │ │ ├── boxwidgetobserver.cpp │ │ ├── boxwidgetobserver.h │ │ ├── contour.cpp │ │ ├── contour.h │ │ ├── contourwidgetobserver.cpp │ │ ├── contourwidgetobserver.h │ │ ├── custominteractorstyle.cpp │ │ ├── custominteractorstyle.h │ │ ├── datafilter.cpp │ │ ├── datafilter.h │ │ ├── disablerotationinteractorstyle.cpp │ │ ├── disablerotationinteractorstyle.h │ │ ├── distancewidgetobserver.cpp │ │ ├── distancewidgetobserver.h │ │ ├── filereaderutils.cpp │ │ ├── filereaderutils.h │ │ ├── implicitplanewidgetobserver.cpp │ │ ├── implicitplanewidgetobserver.h │ │ ├── interactor.cpp │ │ ├── interactor.h │ │ ├── lineprober.cpp │ │ ├── lineprober.h │ │ ├── linewidgetobserver.cpp │ │ ├── linewidgetobserver.h │ │ ├── modeltovtktableconverter.cpp │ │ ├── modeltovtktableconverter.h │ │ ├── moveactorinteractorstyle.cpp │ │ ├── moveactorinteractorstyle.h │ │ ├── movelineinteractorstyle.cpp │ │ ├── movelineinteractorstyle.h │ │ ├── movepointinteractorstyle.cpp │ │ ├── movepointinteractorstyle.h │ │ ├── planecutter.cpp │ │ ├── planecutter.h │ │ ├── pointmover.cpp │ │ ├── pointmover.h │ │ ├── pointstopolydataconverter.cpp │ │ ├── pointstopolydataconverter.h │ │ ├── pointwidgetobserver.cpp │ │ ├── pointwidgetobserver.h │ │ ├── rendererslayoutalgo.h │ │ ├── sliderwidgetobserver.cpp │ │ ├── sliderwidgetobserver.h │ │ ├── spherecutter.cpp │ │ ├── spherecutter.h │ │ ├── spherewidgetobserver.cpp │ │ ├── spherewidgetobserver.h │ │ ├── surface.cpp │ │ ├── surface.h │ │ ├── vtkUnstructuredGridRelevantPointsFilter.cpp │ │ ├── vtkUnstructuredGridRelevantPointsFilter.h │ │ ├── vtkplot2dwidget.cpp │ │ ├── vtkplot2dwidget.h │ │ ├── vtkplot3dwidget.cpp │ │ ├── vtkplot3dwidget.h │ │ ├── vtkplotpiewidget.cpp │ │ ├── vtkplotpiewidget.h │ │ ├── vtkplotwidget.cpp │ │ ├── vtkplotwidget.h │ │ ├── vtkutils.cpp │ │ ├── vtkutils.h │ │ ├── vtkutils.pri │ │ ├── vtkutils.pro │ │ ├── vtkutils_dependencies.pri │ │ ├── vtkutils_global.h │ │ ├── vtkwidget.cpp │ │ └── vtkwidget.h │ └── widgets/ │ ├── colorcombobox.cpp │ ├── colorcombobox.h │ ├── colorpushbutton.cpp │ ├── colorpushbutton.h │ ├── fontpushbutton.cpp │ ├── fontpushbutton.h │ ├── gradientcombobox.cpp │ ├── gradientcombobox.h │ ├── imagecompareboard.cpp │ ├── imagecompareboard.h │ ├── penstylebox.cpp │ ├── penstylebox.h │ ├── qtcolorpicker.cpp │ ├── qtcolorpicker.h │ ├── tagwidget.cpp │ ├── tagwidget.h │ ├── widgets.pro │ ├── widgets_dependencies.pri │ └── widgets_global.h ├── plugin.pri ├── plugins/ │ ├── animation/ │ │ ├── animation.pro │ │ ├── animation_dependencies.pri │ │ ├── animationplugin.cpp │ │ ├── animationplugin.h │ │ ├── animationscenewindow.cpp │ │ ├── animationscenewindow.h │ │ ├── animationscenewindow.ui │ │ ├── basicanimationwindow.cpp │ │ ├── basicanimationwindow.h │ │ ├── basicanimationwindow.ui │ │ └── res.qrc │ ├── buildinsources/ │ │ ├── buildinsources.pro │ │ ├── buildinsources_dependencies.pri │ │ ├── buildinsourcesplugin.cpp │ │ ├── buildinsourcesplugin.h │ │ ├── res.qrc │ │ ├── texturewindow.cpp │ │ ├── texturewindow.h │ │ └── texturewindow.ui │ ├── buildinwidgets/ │ │ ├── anglewidgetconfig.ui │ │ ├── anglewidgetwindow.cpp │ │ ├── anglewidgetwindow.h │ │ ├── basewidgetwindow.cpp │ │ ├── basewidgetwindow.h │ │ ├── basewidgetwindow.ui │ │ ├── buildinwidgets.pro │ │ ├── buildinwidgets_dependencies.pri │ │ ├── buildinwidgetsplugin.cpp │ │ ├── buildinwidgetsplugin.h │ │ ├── camerawidgetconfig.ui │ │ ├── camerawidgetwindow.cpp │ │ ├── camerawidgetwindow.h │ │ ├── contourwidgetconfig.ui │ │ ├── contourwidgetwindow.cpp │ │ ├── contourwidgetwindow.h │ │ ├── distancewidgetconfig.ui │ │ ├── distancewidgetwindow.cpp │ │ ├── distancewidgetwindow.h │ │ ├── scalarbarwidgetconfig.ui │ │ ├── scalarbarwidgetwindow.cpp │ │ ├── scalarbarwidgetwindow.h │ │ ├── sliderwidgetconfig.ui │ │ ├── sliderwidgetwindow.cpp │ │ ├── sliderwidgetwindow.h │ │ ├── textwidgetconfig.ui │ │ ├── textwidgetwindow.cpp │ │ └── textwidgetwindow.h │ ├── camera/ │ │ ├── axesactorwindow.cpp │ │ ├── axesactorwindow.h │ │ ├── axesactorwindow.ui │ │ ├── camera.pro │ │ ├── camera_dependencies.pri │ │ ├── cameraplugin.cpp │ │ ├── cameraplugin.h │ │ ├── camerawindow.cpp │ │ ├── camerawindow.h │ │ ├── camerawindow.ui │ │ ├── mainwidget.cpp │ │ ├── mainwidget.h │ │ └── mainwidget.ui │ ├── chart3d/ │ │ ├── bar3dwindow.cpp │ │ ├── bar3dwindow.h │ │ ├── chart3d.pro │ │ ├── chart3d_dependencies.pri │ │ ├── chart3dplugin.cpp │ │ ├── chart3dplugin.h │ │ ├── chart3dwindow.cpp │ │ ├── chart3dwindow.h │ │ ├── chart3dwindow.ui │ │ ├── configpoints3d.ui │ │ ├── lines3dwindow.cpp │ │ ├── lines3dwindow.h │ │ ├── points3dwindow.cpp │ │ └── points3dwindow.h │ ├── constructsurface/ │ │ ├── constructsurface.pro │ │ ├── constructsurface_dependencies.pri │ │ ├── constructsurfaceplugin.cpp │ │ ├── constructsurfaceplugin.h │ │ ├── contourwindow.cpp │ │ ├── contourwindow.h │ │ ├── contourwindow.ui │ │ ├── data.qrc │ │ ├── datafiles/ │ │ │ ├── demo.txt │ │ │ └── pit.txt │ │ ├── dialog.cpp │ │ ├── dialog.h │ │ ├── dialog.ui │ │ ├── quadricwindow.ui │ │ ├── rendersurface.cpp │ │ ├── rendersurface.h │ │ ├── rendersurface.ui │ │ ├── widget.cpp │ │ └── widget.h │ ├── contour2d/ │ │ ├── abstractcontourgenerator.cpp │ │ ├── abstractcontourgenerator.h │ │ ├── bandedcontourgenerator.cpp │ │ ├── bandedcontourgenerator.h │ │ ├── contour2d.pro │ │ ├── contour2d_dependencies.pri │ │ ├── contour2dinteractorstyle.cpp │ │ ├── contour2dinteractorstyle.h │ │ ├── contour2dplugin.cpp │ │ ├── contour2dplugin.h │ │ ├── contourwindow.cpp │ │ ├── contourwindow.h │ │ ├── contourwindow.ui │ │ ├── data.qrc │ │ ├── datafiles/ │ │ │ ├── demo.txt │ │ │ └── pit.txt │ │ ├── smoothcontourgenerator.cpp │ │ └── smoothcontourgenerator.h │ ├── custom3dwidget/ │ │ ├── custom3dwidget.pro │ │ ├── custom3dwidget_dependencies.pri │ │ ├── custom3dwidgetplugin.cpp │ │ ├── custom3dwidgetplugin.h │ │ ├── customxyplotrepresentation.cpp │ │ ├── customxyplotrepresentation.h │ │ ├── customxyplotwidget.cpp │ │ ├── customxyplotwidget.h │ │ ├── usearrowwidgetwindow.cpp │ │ ├── usearrowwidgetwindow.h │ │ ├── usearrowwidgetwindow.ui │ │ ├── usecustomwidgetwindow.cpp │ │ ├── usecustomwidgetwindow.h │ │ ├── usecustomwidgetwindow.ui │ │ ├── vtkarrowrepresentation.cpp │ │ ├── vtkarrowrepresentation.h │ │ ├── vtkarrowwidget.cpp │ │ └── vtkarrowwidget.h │ ├── displaychinese/ │ │ ├── dialog.cpp │ │ ├── dialog.h │ │ ├── dialog.ui │ │ ├── displaychinese.pro │ │ ├── displaychinese_dependencies.pri │ │ ├── displaychineseplugin.cpp │ │ ├── displaychineseplugin.h │ │ ├── main.cpp │ │ ├── widget.cpp │ │ └── widget.h │ ├── filereader/ │ │ ├── filereader.pro │ │ ├── filereader_dependencies.pri │ │ ├── filereaderplugin.cpp │ │ ├── filereaderplugin.h │ │ ├── filetree.cpp │ │ ├── filetree.h │ │ ├── mainwidget.cpp │ │ ├── mainwidget.h │ │ ├── mainwidget.ui │ │ ├── widget.cpp │ │ └── widget.h │ ├── filters/ │ │ ├── clipconfig.ui │ │ ├── clipwindow.cpp │ │ ├── clipwindow.h │ │ ├── cutconfig.ui │ │ ├── cutwindow.cpp │ │ ├── cutwindow.h │ │ ├── decimateconfig.ui │ │ ├── decimatewindow.cpp │ │ ├── decimatewindow.h │ │ ├── filters.pro │ │ ├── filters_dependencies.pri │ │ ├── filtersplugin.cpp │ │ ├── filtersplugin.h │ │ ├── filterwindow.cpp │ │ ├── filterwindow.h │ │ ├── generalfilterwindow.ui │ │ ├── glyphconfig.ui │ │ ├── glyphwindow.cpp │ │ ├── glyphwindow.h │ │ ├── isosurfaceconfig.ui │ │ ├── isosurfacewindow.cpp │ │ ├── isosurfacewindow.h │ │ ├── probeconfig.ui │ │ ├── probewindow.cpp │ │ ├── probewindow.h │ │ ├── qcustomplot.cpp │ │ ├── qcustomplot.h │ │ ├── slicewindow.cpp │ │ ├── slicewindow.h │ │ ├── smoothconfig.ui │ │ ├── smoothwindow.cpp │ │ ├── smoothwindow.h │ │ ├── streamlineconfig.ui │ │ ├── streamlinewindow.cpp │ │ ├── streamlinewindow.h │ │ ├── thresholdwindow.cpp │ │ └── thresholdwindow.h │ ├── imageprocessing/ │ │ ├── imageprocessing.pro │ │ ├── imageprocessing_dependencies.pri │ │ ├── imageprocessingplugin.cpp │ │ ├── imageprocessingplugin.h │ │ ├── imagetree.cpp │ │ ├── imagetree.h │ │ ├── mainwidget.cpp │ │ ├── mainwidget.h │ │ ├── mainwidget.ui │ │ └── res.qrc │ ├── light/ │ │ ├── galaxywindow.cpp │ │ ├── galaxywindow.h │ │ ├── galaxywindow.ui │ │ ├── light.pro │ │ ├── light_dependencies.pri │ │ ├── lightplugin.cpp │ │ ├── lightplugin.h │ │ ├── mainwidget.cpp │ │ ├── mainwidget.h │ │ ├── mainwidget.ui │ │ └── res.qrc │ ├── miscellaneous/ │ │ ├── backgroundwindow.cpp │ │ ├── backgroundwindow.h │ │ ├── backgroundwindow.ui │ │ ├── colormapwindow.cpp │ │ ├── colormapwindow.h │ │ ├── colormapwindow.ui │ │ ├── conicspiralconfig.ui │ │ ├── diniconfig.ui │ │ ├── ellipsoidconfig.ui │ │ ├── miscellaneous.pro │ │ ├── miscellaneous_dependencies.pri │ │ ├── miscellaneousplugin.cpp │ │ ├── miscellaneousplugin.h │ │ ├── parametricobjectswindow.cpp │ │ ├── parametricobjectswindow.h │ │ ├── parametricobjectswindow.ui │ │ ├── randomhillsconfig.ui │ │ ├── representationwidget.cpp │ │ ├── representationwidget.h │ │ ├── representationwidget.ui │ │ ├── romanconfig.ui │ │ ├── scaleaxeswindow.cpp │ │ ├── scaleaxeswindow.h │ │ ├── scaleaxeswindow.ui │ │ ├── splineconfig.ui │ │ ├── superellipsoidconfig.ui │ │ ├── supertoroidconfig.ui │ │ └── torusconfig.ui │ ├── picking/ │ │ ├── drawspherewindow.cpp │ │ ├── drawspherewindow.h │ │ ├── drawspherewindow.ui │ │ ├── drawsurfacewindow.cpp │ │ ├── drawsurfacewindow.h │ │ ├── drawsurfacewindow.ui │ │ ├── mouseeventinteractorstyle.cpp │ │ ├── mouseeventinteractorstyle.h │ │ ├── pickactorwindow.cpp │ │ ├── pickactorwindow.h │ │ ├── pickactorwindow.ui │ │ ├── pickcellinteractorstyle.cpp │ │ ├── pickcellinteractorstyle.h │ │ ├── pickcellwindow.cpp │ │ ├── pickcellwindow.h │ │ ├── pickcellwindow.ui │ │ ├── picking.pro │ │ ├── picking_dependencies.pri │ │ ├── pickingplugin.cpp │ │ ├── pickingplugin.h │ │ ├── selectareainteractorstyle.cpp │ │ ├── selectareainteractorstyle.h │ │ ├── selectareawindow.cpp │ │ ├── selectareawindow.h │ │ └── selectareawindow.ui │ ├── pipeline/ │ │ ├── arrowitem.cpp │ │ ├── arrowitem.h │ │ ├── pipeline.pro │ │ ├── pipeline_dependencies.pri │ │ ├── pipelineplugin.cpp │ │ ├── pipelineplugin.h │ │ ├── pipelinewindow.cpp │ │ ├── pipelinewindow.h │ │ └── pipelinewindow.ui │ ├── plot2d/ │ │ ├── bagplotwidget.cpp │ │ ├── bagplotwidget.h │ │ ├── barplotsettings.ui │ │ ├── barplotwidget.cpp │ │ ├── barplotwidget.h │ │ ├── lineplotsettings.ui │ │ ├── lineplotwidget.cpp │ │ ├── lineplotwidget.h │ │ ├── pieplotwidget.cpp │ │ ├── pieplotwidget.h │ │ ├── plot2d.pro │ │ ├── plot2d_dependencies.pri │ │ ├── plot2dplugin.cpp │ │ ├── plot2dplugin.h │ │ ├── plotwidget.cpp │ │ ├── plotwidget.h │ │ ├── scatterplotsettings.ui │ │ ├── scatterplotwidget.cpp │ │ ├── scatterplotwidget.h │ │ ├── stackedplotwidget.cpp │ │ ├── stackedplotwidget.h │ │ └── tableplotwidget.ui │ ├── plot3d/ │ │ ├── plot3d.pro │ │ ├── plot3d_dependencies.pri │ │ ├── plot3dplugin.cpp │ │ ├── plot3dplugin.h │ │ ├── plotline3dwindow.cpp │ │ ├── plotline3dwindow.h │ │ ├── plotpoints3dwindow.cpp │ │ ├── plotpoints3dwindow.h │ │ ├── plotsurfacewindow.cpp │ │ ├── plotsurfacewindow.h │ │ ├── plotwindow.cpp │ │ ├── plotwindow.h │ │ └── tablewidgetwindow.ui │ ├── plotactor/ │ │ ├── barchartactorwindow.cpp │ │ ├── barchartactorwindow.h │ │ ├── piechartactorwindow.cpp │ │ ├── piechartactorwindow.h │ │ ├── piesettings.ui │ │ ├── plotactor.pro │ │ ├── plotactor_dependencies.pri │ │ ├── plotactorplugin.cpp │ │ ├── plotactorplugin.h │ │ ├── plotactorwindow.cpp │ │ ├── plotactorwindow.h │ │ ├── plotactorwindow.ui │ │ ├── spiderplotactorwindow.cpp │ │ ├── spiderplotactorwindow.h │ │ ├── spidersettings.ui │ │ ├── xyplotactorwindow.cpp │ │ └── xyplotactorwindow.h │ ├── plugins.pro │ ├── rendersphere/ │ │ ├── main.cpp │ │ ├── rendersphere.pro │ │ ├── rendersphere_dependencies.pri │ │ ├── rendersphereplugin.cpp │ │ ├── rendersphereplugin.h │ │ ├── widget.cpp │ │ └── widget.h │ ├── screenshot/ │ │ ├── screenshot.pro │ │ ├── screenshot_dependencies.pri │ │ ├── screenshotplugin.cpp │ │ ├── screenshotplugin.h │ │ ├── screenshotwindow.cpp │ │ ├── screenshotwindow.h │ │ └── screenshotwindow.ui │ ├── shader/ │ │ ├── editshaderwindow.cpp │ │ ├── editshaderwindow.h │ │ ├── editshaderwindow.ui │ │ ├── shader.pro │ │ ├── shader_dependencies.pri │ │ ├── shaderplugin.cpp │ │ ├── shaderplugin.h │ │ ├── shaderwindow.cpp │ │ ├── shaderwindow.h │ │ └── shaderwindow.ui │ ├── template/ │ │ ├── template.pro │ │ ├── template_dependencies.pri │ │ ├── templateplugin.cpp │ │ └── templateplugin.h │ └── volumerendering/ │ ├── volumerendering.pro │ ├── volumerendering_dependencies.pri │ ├── volumerenderingplugin.cpp │ ├── volumerenderingplugin.h │ ├── volumerenderingwindow.cpp │ ├── volumerenderingwindow.h │ └── volumerenderingwindow.ui ├── rpath.pri ├── src/ │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ ├── mainwindow.ui │ ├── src.pro │ └── src_dependencies.pri └── vtk_inc.pri
SYMBOL INDEX (748 symbols across 250 files)
FILE: libs/3dparty/QRoundProgressBar.cpp
function QString (line 313) | QString QRoundProgressBar::valueToText(double value) const
FILE: libs/3dparty/QRoundProgressBar.h
type BarStyle (line 88) | enum BarStyle
function virtual (line 231) | virtual int heightForWidth(int w) const { return w; }
FILE: libs/3dparty/flowlayout.cpp
function QLayoutItem (line 106) | QLayoutItem *FlowLayout::itemAt(int index) const
function QLayoutItem (line 111) | QLayoutItem *FlowLayout::takeAt(int index)
function QSize (line 141) | QSize FlowLayout::sizeHint() const
function QSize (line 146) | QSize FlowLayout::minimumSize() const
function foreach (line 167) | foreach (item, itemList) {
FILE: libs/utils/colorseries.cpp
type Utils (line 3) | namespace Utils
function QColor (line 8) | static inline QColor hexToColor(QRgb num)
class ColorSeriesPrivate (line 13) | class ColorSeriesPrivate
function QColor (line 75) | QColor ColorSeries::color(int index) const
function QColor (line 100) | QColor ColorSeries::nextColor() const
FILE: libs/utils/colorseries.h
function namespace (line 8) | namespace Utils
FILE: libs/utils/doublespinboxdelegate.cpp
type Utils (line 5) | namespace Utils
function QWidget (line 13) | QWidget *DoubleSpinBoxDelegate::createEditor(QWidget *parent,
FILE: libs/utils/doublespinboxdelegate.h
function namespace (line 8) | namespace Utils
FILE: libs/utils/iplugin.h
function namespace (line 6) | namespace Utils {
FILE: libs/utils/ivtkplugin.cpp
type Utils (line 3) | namespace Utils
FILE: libs/utils/modeltopointsconverter.cpp
type Utils (line 5) | namespace Utils
FILE: libs/utils/modeltopointsconverter.h
function namespace (line 9) | namespace Utils
FILE: libs/utils/modeltovectorsconverter.cpp
type Utils (line 6) | namespace Utils
FILE: libs/utils/modeltovectorsconverter.h
function namespace (line 8) | namespace Utils
FILE: libs/utils/point3f.h
function namespace (line 6) | namespace Utils
FILE: libs/utils/pointsreader.cpp
type Utils (line 7) | namespace Utils
FILE: libs/utils/pointsreader.h
function namespace (line 11) | namespace Utils
FILE: libs/utils/pointstomodelconverter.cpp
type Utils (line 6) | namespace Utils
FILE: libs/utils/pointstomodelconverter.h
function namespace (line 12) | namespace Utils
FILE: libs/utils/signalblocker.cpp
type Utils (line 3) | namespace Utils
FILE: libs/utils/signalblocker.h
function namespace (line 8) | namespace Utils
FILE: libs/utils/signalledrunable.cpp
type Utils (line 3) | namespace Utils
FILE: libs/utils/signalledrunable.h
function namespace (line 9) | namespace Utils
FILE: libs/utils/tablemodel.cpp
type Utils (line 7) | namespace Utils
function QVariantList (line 104) | QVariantList TableModel::horizontalHeaderData() const
function QVariantList (line 117) | QVariantList TableModel::verticalHeaderData() const
function QVariant (line 134) | QVariant TableModel::headerData(int section, Qt::Orientation orientati...
function QVariant (line 154) | QVariant TableModel::data(const QModelIndex &index, int role) const
function qreal (line 165) | qreal TableModel::data(int row, int col) const
FILE: libs/utils/tablemodel.h
function namespace (line 8) | namespace Utils
FILE: libs/utils/utils.cpp
type Utils (line 8) | namespace Utils
function QString (line 11) | QString character(int index)
function explorer (line 18) | void explorer(const QString &path)
function QImage (line 28) | QImage star(const QSize& size)
function random (line 50) | double random(int low, int high)
function vtkColor (line 56) | void vtkColor(const QColor& clr, double* vtkClr)
function QColor (line 66) | QColor qColor(double* pClr)
function RGB2HSV (line 71) | static void RGB2HSV(float r, float g, float b, float *h, float *s, flo...
function qColor2HSV (line 97) | void qColor2HSV(const QColor& clr, double* hsv)
FILE: libs/utils/utils.h
function namespace (line 13) | namespace Utils
function T (line 110) | T boundedValue(const T& value, const T& min, const T& max)
function module (line 120) | inline double module(T* vector)
function distance (line 126) | inline double distance(T* pot1, T* pot2)
function normal (line 138) | inline void normal(T* inPot1, T* inPot2, T* outPot)
FILE: libs/utils/vector4f.h
function namespace (line 6) | namespace Utils
FILE: libs/vtkutils/abstractimageprocessor.cpp
type VtkUtils (line 3) | namespace VtkUtils
FILE: libs/vtkutils/abstractimageprocessor.h
function namespace (line 12) | namespace VtkUtils
FILE: libs/vtkutils/abstractwidgetobserver.cpp
type VtkUtils (line 5) | namespace VtkUtils
FILE: libs/vtkutils/abstractwidgetobserver.h
function namespace (line 11) | namespace VtkUtils
FILE: libs/vtkutils/actorexporter.cpp
type VtkUtils (line 9) | namespace VtkUtils
FILE: libs/vtkutils/actorexporter.h
function namespace (line 10) | namespace VtkUtils
FILE: libs/vtkutils/anglewidgetobserver.cpp
type VtkUtils (line 7) | namespace VtkUtils
FILE: libs/vtkutils/anglewidgetobserver.h
function namespace (line 6) | namespace VtkUtils
FILE: libs/vtkutils/boxcutter.cpp
class BoxCutterPrivate (line 3) | class BoxCutterPrivate
FILE: libs/vtkutils/boxcutter.h
function class (line 7) | class BoxCutter : public Interactor
FILE: libs/vtkutils/boxwidgetobserver.cpp
type VtkUtils (line 6) | namespace VtkUtils
FILE: libs/vtkutils/boxwidgetobserver.h
function namespace (line 9) | namespace VtkUtils
FILE: libs/vtkutils/contour.cpp
type VtkUtils (line 15) | namespace VtkUtils
class ContourPrivate (line 17) | class ContourPrivate
function foreach (line 87) | foreach (const Utils::Vector4F& vec, d_ptr->vectors) {
FILE: libs/vtkutils/contour.h
function namespace (line 8) | namespace VtkUtils
FILE: libs/vtkutils/contourwidgetobserver.cpp
type VtkUtils (line 7) | namespace VtkUtils
FILE: libs/vtkutils/contourwidgetobserver.h
function namespace (line 9) | namespace VtkUtils
FILE: libs/vtkutils/custominteractorstyle.cpp
function vtkActor (line 91) | vtkActor* CustomInteractorStyle::pickedActor()
function vtkActor (line 102) | vtkActor* CustomInteractorStyle::hoverdActor()
function foreach (line 146) | foreach (vtkActor* actor, m_watchedActorList) {
FILE: libs/vtkutils/custominteractorstyle.h
function namespace (line 8) | namespace ComDataGui3D
FILE: libs/vtkutils/datafilter.cpp
type VtkUtils (line 3) | namespace VtkUtils
function QString (line 6) | QString VTKUTILS_EXPORT filterName(FilterType type)
FILE: libs/vtkutils/datafilter.h
function namespace (line 41) | namespace VtkUtils
FILE: libs/vtkutils/disablerotationinteractorstyle.h
function namespace (line 7) | namespace ComDataGui3D
function class (line 13) | class DisableRotationInteractorStyle : public CustomInteractorStyle
FILE: libs/vtkutils/distancewidgetobserver.cpp
type VtkUtils (line 6) | namespace VtkUtils
FILE: libs/vtkutils/distancewidgetobserver.h
function namespace (line 6) | namespace VtkUtils
FILE: libs/vtkutils/filereaderutils.cpp
type VtkUtils (line 23) | namespace VtkUtils
function Getf (line 26) | static float Getf(const char *s)
function Geti (line 83) | static int Geti(const char *s)
function QString (line 109) | QString AbstractFileReader::fileName() const
function QString (line 120) | QString AbstractFileReader::title() const
FILE: libs/vtkutils/filereaderutils.h
function namespace (line 23) | namespace VtkUtils
FILE: libs/vtkutils/implicitplanewidgetobserver.cpp
type VtkUtils (line 5) | namespace VtkUtils
FILE: libs/vtkutils/implicitplanewidgetobserver.h
function namespace (line 6) | namespace VtkUtils
FILE: libs/vtkutils/interactor.cpp
class InteractorPrivate (line 11) | class InteractorPrivate
function vtkRenderer (line 90) | vtkRenderer* Interactor::renderer() const
FILE: libs/vtkutils/interactor.h
function namespace (line 13) | namespace ComDataGui3D
function class (line 21) | class Interactor : public QObject
FILE: libs/vtkutils/lineprober.cpp
class Plot2DOverlay (line 41) | class Plot2DOverlay
class LineProberPrivate (line 42) | class LineProberPrivate
FILE: libs/vtkutils/lineprober.h
function class (line 8) | class LineProber : public Interactor
FILE: libs/vtkutils/linewidgetobserver.cpp
type VtkUtils (line 5) | namespace VtkUtils
FILE: libs/vtkutils/linewidgetobserver.h
function namespace (line 8) | namespace VtkUtils
FILE: libs/vtkutils/modeltovtktableconverter.cpp
type VtkUtils (line 11) | namespace VtkUtils
function QStringList (line 24) | QStringList ModelToVtkTableConverter::labels() const
function vtkTable (line 59) | vtkTable* ModelToVtkTableConverter::table() const
FILE: libs/vtkutils/modeltovtktableconverter.h
function namespace (line 8) | namespace Utils
function namespace (line 14) | namespace VtkUtils
FILE: libs/vtkutils/moveactorinteractorstyle.cpp
type VtkUtils (line 24) | namespace VtkUtils
FILE: libs/vtkutils/moveactorinteractorstyle.h
function namespace (line 11) | namespace VtkUtils
FILE: libs/vtkutils/movelineinteractorstyle.h
function namespace (line 6) | namespace ComDataGui3D
function class (line 12) | class MoveLineInteractorStyle : public CustomInteractorStyle
FILE: libs/vtkutils/movepointinteractorstyle.cpp
type VtkUtils (line 3) | namespace VtkUtils
FILE: libs/vtkutils/movepointinteractorstyle.h
function namespace (line 8) | namespace VtkUtils
FILE: libs/vtkutils/planecutter.cpp
class PlaneCutterPrivate (line 28) | class PlaneCutterPrivate
FILE: libs/vtkutils/planecutter.h
function class (line 8) | class PlaneCutter : public Interactor
FILE: libs/vtkutils/pointmover.cpp
class PointMoverPrivate (line 14) | class PointMoverPrivate
FILE: libs/vtkutils/pointmover.h
function class (line 7) | class PointMover : public Interactor
FILE: libs/vtkutils/pointstopolydataconverter.cpp
type VtkUtils (line 7) | namespace VtkUtils
function vtkPolyData (line 40) | vtkPolyData* PointsToPolyDataConverter::polyData() const
FILE: libs/vtkutils/pointstopolydataconverter.h
function namespace (line 12) | namespace VtkUtils
FILE: libs/vtkutils/pointwidgetobserver.cpp
type VtkUtils (line 5) | namespace VtkUtils
FILE: libs/vtkutils/pointwidgetobserver.h
function namespace (line 6) | namespace VtkUtils
FILE: libs/vtkutils/rendererslayoutalgo.h
function namespace (line 7) | namespace VtkUtils
FILE: libs/vtkutils/sliderwidgetobserver.cpp
type VtkUtils (line 6) | namespace VtkUtils
FILE: libs/vtkutils/sliderwidgetobserver.h
function namespace (line 6) | namespace VtkUtils
FILE: libs/vtkutils/spherecutter.cpp
class SphereCutterPrivate (line 15) | class SphereCutterPrivate
FILE: libs/vtkutils/spherecutter.h
function class (line 7) | class SphereCutter : public Interactor
FILE: libs/vtkutils/spherewidgetobserver.cpp
type VtkUtils (line 5) | namespace VtkUtils
FILE: libs/vtkutils/spherewidgetobserver.h
function namespace (line 6) | namespace VtkUtils
FILE: libs/vtkutils/surface.cpp
type VtkUtils (line 11) | namespace VtkUtils
class SurfacePrivate (line 14) | class SurfacePrivate
method SurfacePrivate (line 17) | SurfacePrivate(Surface* q) : q_ptr(q) {}
function vtkActor (line 67) | vtkActor* Surface::surfaceActor() const
FILE: libs/vtkutils/surface.h
function namespace (line 10) | namespace VtkUtils
FILE: libs/vtkutils/vtkUnstructuredGridRelevantPointsFilter.h
function class (line 61) | class vtkUnstructuredGridRelevantPointsFilter :
FILE: libs/vtkutils/vtkplot2dwidget.cpp
type VtkUtils (line 9) | namespace VtkUtils
class VtkPlot2DWidgetPrivate (line 11) | class VtkPlot2DWidgetPrivate
function vtkContextItem (line 27) | vtkContextItem* VtkPlot2DWidget::chart() const
FILE: libs/vtkutils/vtkplot2dwidget.h
function namespace (line 7) | namespace VtkUtils
FILE: libs/vtkutils/vtkplot3dwidget.cpp
type VtkUtils (line 8) | namespace VtkUtils
class VtkPlot3DWidgetPrivate (line 10) | class VtkPlot3DWidgetPrivate
function vtkContextItem (line 26) | vtkContextItem* VtkPlot3DWidget::chart() const
FILE: libs/vtkutils/vtkplot3dwidget.h
function namespace (line 7) | namespace VtkUtils
FILE: libs/vtkutils/vtkplotpiewidget.cpp
type VtkUtils (line 9) | namespace VtkUtils
class VtkPlotPieWidgetPrivate (line 12) | class VtkPlotPieWidgetPrivate
function vtkContextItem (line 28) | vtkContextItem* VtkPlotPieWidget::chart() const
FILE: libs/vtkutils/vtkplotpiewidget.h
function namespace (line 6) | namespace VtkUtils
FILE: libs/vtkutils/vtkplotwidget.cpp
type VtkUtils (line 20) | namespace VtkUtils
class VtkPlotWidgetPrivate (line 23) | class VtkPlotWidgetPrivate
function vtkContextView (line 56) | vtkContextView* VtkPlotWidget::contextView() const
FILE: libs/vtkutils/vtkplotwidget.h
function namespace (line 19) | namespace VtkUtils
FILE: libs/vtkutils/vtkutils.cpp
type VtkUtils (line 26) | namespace VtkUtils
function QImage (line 29) | QImage vtkImageDataToQImage(vtkImageData* imageData)
function qImageToVtkImage (line 53) | void qImageToVtkImage(QImage& img, vtkImageData* imageData)
function QImage (line 66) | QImage vtkWidgetSnapshot(QVTKWidget* widget)
function exportActorToFile (line 73) | void exportActorToFile(vtkActor* actor, const QString& outfile)
FILE: libs/vtkutils/vtkutils.h
function namespace (line 31) | namespace VtkUtils
FILE: libs/vtkutils/vtkwidget.cpp
type VtkUtils (line 18) | namespace VtkUtils
class VtkWidgetPrivate (line 21) | class VtkWidgetPrivate
function columnCount (line 64) | static int columnCount(int count)
function QColor (line 265) | QColor VtkWidget::backgroundColor() const
function vtkRenderer (line 270) | vtkRenderer* VtkWidget::defaultRenderer()
FILE: libs/vtkutils/vtkwidget.h
function namespace (line 18) | namespace VtkUtils
FILE: libs/widgets/colorcombobox.cpp
type Widgets (line 25) | namespace Widgets
function QColor (line 105) | QColor ColorComboBox::color() const
function QColor (line 128) | QColor ColorComboBox::color(int colorIndex)
function QStringList (line 165) | QStringList ColorComboBox::colorNames()
function QColor (line 180) | QColor ColorComboBox::defaultColor(int colorIndex)
function QStringList (line 211) | QStringList ColorComboBox::defaultColorNames()
FILE: libs/widgets/colorpushbutton.cpp
type Widgets (line 22) | namespace Widgets
FILE: libs/widgets/colorpushbutton.h
function namespace (line 23) | namespace Widgets {
FILE: libs/widgets/fontpushbutton.cpp
type Widgets (line 5) | namespace Widgets
FILE: libs/widgets/fontpushbutton.h
function namespace (line 8) | namespace Widgets
FILE: libs/widgets/gradientcombobox.cpp
type Widgets (line 10) | namespace Widgets
type GradientData (line 13) | struct GradientData
method GradientData (line 15) | GradientData(const QString& name, const QColor& clr1, const QColor& ...
method GradientData (line 22) | GradientData(const GradientData& other)
class GradientLabel (line 36) | class GradientLabel : public QWidget
method QColor (line 42) | QColor color1() const { return m_color1; }
method QColor (line 43) | QColor color2() const { return m_color2; }
class GradientWidgetItem (line 53) | class GradientWidgetItem : public QWidget
method QString (line 58) | QString name() const { return m_gradientData.name; }
method QColor (line 59) | QColor color1() const { return m_gradientData.color1; }
method QColor (line 60) | QColor color2() const { return m_gradientData.color2; }
class GradientComboBoxPrivate (line 107) | class GradientComboBoxPrivate
function QString (line 269) | QString GradientComboBox::currentName() const
function QColor (line 278) | QColor GradientComboBox::currentColor1() const
function QColor (line 287) | QColor GradientComboBox::currentColor2() const
function QSize (line 362) | QSize GradientComboBox::minimumSizeHint() const
FILE: libs/widgets/gradientcombobox.h
function namespace (line 9) | namespace Widgets
FILE: libs/widgets/imagecompareboard.cpp
type Widgets (line 9) | namespace Widgets
class ImageCompareBoardPrivate (line 12) | class ImageCompareBoardPrivate
function QImage (line 67) | QImage ImageCompareBoard::originalImage() const
function QImage (line 78) | QImage ImageCompareBoard::comparedImage() const
FILE: libs/widgets/imagecompareboard.h
function namespace (line 9) | namespace Widgets
FILE: libs/widgets/penstylebox.cpp
type Widgets (line 21) | namespace Widgets
FILE: libs/widgets/penstylebox.h
function namespace (line 25) | namespace Widgets
FILE: libs/widgets/qtcolorpicker.cpp
type Widgets (line 143) | namespace Widgets
class ColorPickerButton (line 146) | class ColorPickerButton : public QFrame
class ColorPickerItem (line 170) | class ColorPickerItem : public QFrame
class ColorPickerPopup (line 207) | class ColorPickerPopup : public QFrame
function QColor (line 387) | QColor QtColorPicker::currentColor() const
function QColor (line 395) | QColor QtColorPicker::color(int index) const
function QColor (line 509) | QColor QtColorPicker::getColor(const QPoint &point, bool allowCustomCo...
function ColorPickerItem (line 582) | ColorPickerItem *ColorPickerPopup::find(const QColor &col) const
function QColor (line 637) | QColor ColorPickerPopup::color(int index) const
function QColor (line 818) | QColor ColorPickerPopup::lastSelected() const
function QColor (line 933) | QColor ColorPickerItem::color() const
function QString (line 943) | QString ColorPickerItem::text() const
FILE: libs/widgets/qtcolorpicker.h
function namespace (line 59) | namespace Widgets
FILE: libs/widgets/tagwidget.cpp
type Widgets (line 7) | namespace Widgets
class TagWidgetPrivate (line 10) | class TagWidgetPrivate
function QStringList (line 70) | QStringList TagWidget::tags() const
FILE: libs/widgets/tagwidget.h
function namespace (line 8) | namespace Widgets
FILE: plugins/animation/animationplugin.cpp
function QString (line 17) | QString AnimationPlugin::category() const
function QStringList (line 30) | QStringList AnimationPlugin::keywords() const
FILE: plugins/animation/animationscenewindow.cpp
class ActorAnimator (line 18) | class ActorAnimator
method ActorAnimator (line 21) | ActorAnimator()
method SetActor (line 41) | void SetActor(vtkActor *actor)
method SetStartPosition (line 50) | void SetStartPosition(std::vector<double> position)
method SetEndPosition (line 54) | void SetEndPosition(std::vector<double> position)
method AddObserversToCue (line 58) | void AddObserversToCue(vtkAnimationCue *cue)
method Start (line 65) | void Start(vtkAnimationCue::AnimationCueInfo *vtkNotUsed(info))
method Tick (line 72) | void Tick(vtkAnimationCue::AnimationCueInfo *info)
method End (line 84) | void End(vtkAnimationCue::AnimationCueInfo *vtkNotUsed(info))
class AnimationCueObserver (line 92) | class AnimationCueObserver : public vtkCommand
method AnimationCueObserver (line 95) | static AnimationCueObserver *New()
method Execute (line 100) | virtual void Execute(vtkObject *vtkNotUsed(caller),
method AnimationCueObserver (line 123) | AnimationCueObserver()
class AnimationSceneObserver (line 136) | class AnimationSceneObserver : public vtkCommand
method AnimationSceneObserver (line 139) | static AnimationSceneObserver *New()
method SetRenderWindow (line 144) | void SetRenderWindow( vtkRenderWindow *renWin)
method Execute (line 154) | virtual void Execute(vtkObject *vtkNotUsed(caller),
method AnimationSceneObserver (line 170) | AnimationSceneObserver()
FILE: plugins/animation/animationscenewindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 20) | class AnimationSceneWindow : public QWidget
FILE: plugins/animation/basicanimationwindow.cpp
class AnimationCallback (line 24) | class AnimationCallback : public vtkCommand
method AnimationCallback (line 27) | static AnimationCallback *New()
method Execute (line 34) | virtual void Execute(vtkObject *caller, unsigned long eventId,
FILE: plugins/animation/basicanimationwindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 20) | class BasicAnimationWindow : public QWidget
FILE: plugins/buildinsources/buildinsourcesplugin.cpp
function QString (line 36) | QString BuildinSourcePlugin::category() const
function QColor (line 50) | static inline QColor color3ubToQColor(const vtkColor3ub& c3ub)
function vtkActor (line 55) | static inline vtkActor* createPlatonicSolidActor(const vtkSmartPointer<v...
function QStringList (line 116) | QStringList BuildinSourcePlugin::keywords() const
FILE: plugins/buildinsources/texturewindow.cpp
function QListWidgetItem (line 162) | static inline QListWidgetItem* textureItem(const QString& texture, const...
FILE: plugins/buildinsources/texturewindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 21) | class TextureWindow : public QWidget
FILE: plugins/buildinwidgets/anglewidgetwindow.h
function namespace (line 6) | namespace Ui
function class (line 14) | class AngleWidgetWindow : public BaseWidgetWindow
FILE: plugins/buildinwidgets/basewidgetwindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 20) | class BaseWidgetWindow : public QWidget
FILE: plugins/buildinwidgets/buildinwidgetsplugin.cpp
class BoxCallback (line 36) | class BoxCallback : public vtkCommand
method BoxCallback (line 39) | static BoxCallback *New()
method Execute (line 41) | virtual void Execute(vtkObject *caller, unsigned long, void*)
class PlaneCallBack (line 53) | class PlaneCallBack : public vtkCommand
method PlaneCallBack (line 56) | static PlaneCallBack *New() { return new PlaneCallBack; }
method Execute (line 58) | virtual void Execute(vtkObject *caller, unsigned long eventId, void *c...
function QString (line 76) | QString BuildinWidgetsPlugin::category() const
function QWidget (line 82) | static QWidget* createWidget(const QString& title)
function QStringList (line 126) | QStringList BuildinWidgetsPlugin::keywords() const
FILE: plugins/buildinwidgets/camerawidgetwindow.h
function namespace (line 6) | namespace Ui
function class (line 13) | class CameraWidgetWindow : public BaseWidgetWindow
FILE: plugins/buildinwidgets/contourwidgetwindow.h
function namespace (line 6) | namespace Ui
function class (line 14) | class ContourWidgetWindow : public BaseWidgetWindow
FILE: plugins/buildinwidgets/distancewidgetwindow.h
function namespace (line 6) | namespace Ui
function class (line 14) | class DistanceWidgetWindow : public BaseWidgetWindow
FILE: plugins/buildinwidgets/scalarbarwidgetwindow.h
function namespace (line 6) | namespace Ui
function class (line 13) | class ScalarBarWidgetWindow : public BaseWidgetWindow
FILE: plugins/buildinwidgets/sliderwidgetwindow.h
function namespace (line 6) | namespace Ui
function class (line 15) | class SliderWidgetWindow : public BaseWidgetWindow
FILE: plugins/buildinwidgets/textwidgetwindow.h
function namespace (line 6) | namespace Ui
function class (line 13) | class TextWidgetWindow : public BaseWidgetWindow
FILE: plugins/camera/axesactorwindow.h
function namespace (line 6) | namespace Ui
function namespace (line 11) | namespace VtkUtils
function class (line 16) | class AxesActorWindow : public QWidget
FILE: plugins/camera/cameraplugin.cpp
function QString (line 18) | QString CameraPlugin::category() const
function QStringList (line 31) | QStringList CameraPlugin::keywords() const
FILE: plugins/camera/camerawindow.cpp
function CameraModifiedCallback (line 17) | static void CameraModifiedCallback(vtkObject* caller,
FILE: plugins/camera/camerawindow.h
function namespace (line 8) | namespace Ui {
function namespace (line 12) | namespace VtkUtils
function class (line 19) | class CameraWindow : public QWidget
FILE: plugins/camera/mainwidget.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 20) | class MainWidget : public QWidget
FILE: plugins/chart3d/bar3dwindow.cpp
function vtkPolyData (line 21) | static vtkPolyData* barData(double pot[3], double spacing, double zMin, ...
FILE: plugins/chart3d/bar3dwindow.h
function class (line 6) | class Bar3DWindow : public Chart3DWindow
FILE: plugins/chart3d/chart3dplugin.cpp
function QString (line 18) | QString Chart3DPlugin::category() const
function QStringList (line 32) | QStringList Chart3DPlugin::keywords() const
FILE: plugins/chart3d/chart3dwindow.cpp
function vtkPolyData (line 121) | vtkPolyData* Chart3DWindow::polyData() const
function qreal (line 126) | qreal Chart3DWindow::xRange() const
function qreal (line 131) | qreal Chart3DWindow::yRange() const
function qreal (line 136) | qreal Chart3DWindow::zRange() const
FILE: plugins/chart3d/chart3dwindow.h
function namespace (line 9) | namespace Ui
function namespace (line 14) | namespace Utils
function namespace (line 19) | namespace VtkUtils
function class (line 29) | class Chart3DWindow : public QWidget
FILE: plugins/chart3d/lines3dwindow.h
function class (line 6) | class Lines3DWindow : public Chart3DWindow
FILE: plugins/chart3d/points3dwindow.h
function namespace (line 8) | namespace Ui
function class (line 14) | class Points3DWindow : public Chart3DWindow
FILE: plugins/constructsurface/constructsurfaceplugin.cpp
function QString (line 18) | QString ConstructSurfacePlugin::category() const
function QStringList (line 30) | QStringList ConstructSurfacePlugin::keywords() const
FILE: plugins/constructsurface/contourwindow.h
function namespace (line 6) | namespace Ui
function namespace (line 11) | namespace Utils
function namespace (line 16) | namespace VtkUtils
function class (line 21) | class ContourWindow : public QWidget
FILE: plugins/constructsurface/dialog.h
function namespace (line 6) | namespace Ui
function namespace (line 11) | namespace Utils
function namespace (line 16) | namespace VtkUtils
function class (line 21) | class Dialog : public QDialog
FILE: plugins/constructsurface/rendersurface.cpp
function foreach (line 65) | foreach (const QString& file, fileList) {
FILE: plugins/constructsurface/rendersurface.h
function namespace (line 9) | namespace Ui
function namespace (line 14) | namespace Utils
function namespace (line 19) | namespace VtkUtils
function class (line 33) | class RenderSurface : public QWidget
FILE: plugins/constructsurface/widget.h
function namespace (line 14) | namespace Utils
function class (line 20) | class VTKWidget : public QVTKWidget
FILE: plugins/contour2d/abstractcontourgenerator.cpp
class AbstractContourGeneratorPrivate (line 6) | class AbstractContourGeneratorPrivate
function vtkPolyData (line 34) | vtkPolyData* AbstractContourGenerator::polyData()
function vtkPolyData (line 74) | vtkPolyData* AbstractContourGenerator::contourData() const
function vtkPolyData (line 79) | vtkPolyData* AbstractContourGenerator::contourLinesData() const
function vtkPolyData (line 84) | vtkPolyData* AbstractContourGenerator::contourLabelsData() const
FILE: plugins/contour2d/abstractcontourgenerator.h
function class (line 8) | class AbstractContourGenerator : public Utils::SignalledRunnable
FILE: plugins/contour2d/bandedcontourgenerator.h
function class (line 6) | class BandedContourGenerator : public AbstractContourGenerator
FILE: plugins/contour2d/contour2dplugin.cpp
function QString (line 16) | QString Contour2DPlugin::category() const
function QStringList (line 28) | QStringList Contour2DPlugin::keywords() const
FILE: plugins/contour2d/contourwindow.cpp
function normal (line 207) | static inline void normal(T* inPot1, T* inPot2, T* outPot)
function pairLess (line 214) | inline static bool pairLess(const QPair<double, double>& lhs, const QPai...
FILE: plugins/contour2d/contourwindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function namespace (line 18) | namespace Utils
function class (line 38) | class ContourWindow : public QWidget
FILE: plugins/contour2d/smoothcontourgenerator.h
function class (line 6) | class SmoothContourGenerator : public AbstractContourGenerator
FILE: plugins/custom3dwidget/custom3dwidgetplugin.cpp
function QString (line 17) | QString Custom3DWidgetPlugin::category() const
function QStringList (line 30) | QStringList Custom3DWidgetPlugin::keywords() const
FILE: plugins/custom3dwidget/customxyplotrepresentation.h
function class (line 10) | class CustomXYPlotRepresentation : public vtkBorderRepresentation
FILE: plugins/custom3dwidget/customxyplotwidget.h
function class (line 7) | class CustomXYPlotWidget : public vtkBorderWidget
FILE: plugins/custom3dwidget/usearrowwidgetwindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 19) | class UseArrowWidgetWindow : public QWidget
FILE: plugins/custom3dwidget/usecustomwidgetwindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 20) | class UseCustomWidgetWindow : public QWidget
FILE: plugins/custom3dwidget/vtkarrowrepresentation.h
function class (line 8) | class vtkArrowRepresentation : public vtkWidgetRepresentation
FILE: plugins/custom3dwidget/vtkarrowwidget.cpp
class vtkArrowWidgetCallback (line 16) | class vtkArrowWidgetCallback : public vtkCommand
method vtkArrowWidgetCallback (line 19) | static vtkArrowWidgetCallback *New() { return new vtkArrowWidgetCallba...
method Execute (line 20) | virtual void Execute(vtkObject*, unsigned long eventId, void*)
FILE: plugins/custom3dwidget/vtkarrowwidget.h
function class (line 8) | class vtkArrowWidget : public vtkAbstractWidget
FILE: plugins/displaychinese/dialog.h
function namespace (line 6) | namespace Ui {
function class (line 11) | class Dialog : public QDialog
FILE: plugins/displaychinese/displaychineseplugin.cpp
function QString (line 16) | QString DisplayChinesePlugin::category() const
function QStringList (line 28) | QStringList DisplayChinesePlugin::keywords() const
FILE: plugins/displaychinese/main.cpp
function main (line 6) | int main(int argc, char* argv[])
FILE: plugins/displaychinese/widget.h
function class (line 16) | class VTKWidget : public QVTKWidget
FILE: plugins/filereader/filereaderplugin.cpp
function QString (line 17) | QString FileReaderPlugin::category() const
function QStringList (line 29) | QStringList FileReaderPlugin::keywords() const
FILE: plugins/filereader/filetree.cpp
function QAction (line 160) | QAction* FileTree::createFilterAction(const QString& text, VtkUtils::Fil...
FILE: plugins/filereader/filetree.h
function class (line 8) | class FileTree : public QTreeWidget
FILE: plugins/filereader/mainwidget.h
function namespace (line 7) | namespace Ui
function namespace (line 12) | namespace VtkUtils
function class (line 20) | class MainWidget : public QWidget
FILE: plugins/filereader/widget.h
function class (line 14) | class VTKWidget : public QVTKWidget
FILE: plugins/filters/clipwindow.h
function namespace (line 6) | namespace Ui
function class (line 11) | class ClipWindow : public CutWindow
FILE: plugins/filters/cutwindow.h
function namespace (line 8) | namespace Ui
function class (line 18) | class CutWindow : public FilterWindow
FILE: plugins/filters/decimatewindow.h
function namespace (line 6) | namespace Ui
function class (line 11) | class DecimateWindow : public FilterWindow
FILE: plugins/filters/filtersplugin.cpp
function QString (line 24) | QString FiltersPlugin::category() const
function QStringList (line 44) | QStringList FiltersPlugin::keywords() const
FILE: plugins/filters/filterwindow.cpp
function QString (line 54) | QString FilterWindow::fileName() const
function QString (line 219) | QString FilterWindow::fileFilter() const
function vtkDataObject (line 315) | vtkDataObject* FilterWindow::resultData() const
function QColor (line 330) | QColor FilterWindow::color1() const
function QColor (line 335) | QColor FilterWindow::color2() const
FILE: plugins/filters/filterwindow.h
function namespace (line 9) | namespace Ui
function namespace (line 14) | namespace VtkUtils
function namespace (line 19) | namespace Utils
function class (line 29) | class FilterWindow : public QWidget
FILE: plugins/filters/glyphwindow.h
function namespace (line 6) | namespace Ui
function class (line 12) | class GlyphWindow : public FilterWindow
FILE: plugins/filters/isosurfacewindow.h
function namespace (line 6) | namespace Ui
function class (line 11) | class IsosurfaceWindow : public FilterWindow
FILE: plugins/filters/probewindow.h
function namespace (line 6) | namespace Ui
function class (line 17) | class ProbeWindow : public FilterWindow
FILE: plugins/filters/qcustomplot.cpp
function QRect (line 1203) | QRect QCPLayerable::clipRect() const
function QCPRange (line 1363) | QCPRange QCPRange::expanded(const QCPRange &otherRange) const
function QCPRange (line 1382) | QCPRange QCPRange::sanitizedForLogScale() const
function QCPRange (line 1431) | QCPRange QCPRange::sanitizedForLinScale() const
function foreach (line 1933) | foreach (QCP::MarginSide side, allMarginSides)
function QSize (line 1958) | QSize QCPLayoutElement::minimumSizeHint() const
function QSize (line 1970) | QSize QCPLayoutElement::maximumSizeHint() const
function foreach (line 2026) | foreach (QCPLayoutElement* el, elements(false))
function QCPLayoutElement (line 2510) | QCPLayoutElement *QCPLayoutGrid::element(int row, int column) const
function QCPLayoutElement (line 2834) | QCPLayoutElement *QCPLayoutGrid::elementAt(int index) const
function QCPLayoutElement (line 2843) | QCPLayoutElement *QCPLayoutGrid::takeAt(int index)
function QSize (line 2952) | QSize QCPLayoutGrid::minimumSizeHint() const
function QSize (line 2967) | QSize QCPLayoutGrid::maximumSizeHint() const
function QRectF (line 3129) | QRectF QCPLayoutInset::insetRect(int index) const
function QCPLayoutElement (line 3237) | QCPLayoutElement *QCPLayoutInset::elementAt(int index) const
function QCPLayoutElement (line 3246) | QCPLayoutElement *QCPLayoutInset::takeAt(int index)
function QString (line 4099) | QString QCPAxis::numberFormat() const
function QCPLineEnding (line 4149) | QCPLineEnding QCPAxis::lowerEnding() const
function QCPLineEnding (line 4155) | QCPLineEnding QCPAxis::upperEnding() const
function QPen (line 5917) | QPen QCPAxis::getBasePen() const
function QPen (line 5927) | QPen QCPAxis::getTickPen() const
function QPen (line 5937) | QPen QCPAxis::getSubTickPen() const
function QFont (line 5947) | QFont QCPAxis::getTickLabelFont() const
function QFont (line 5957) | QFont QCPAxis::getLabelFont() const
function QColor (line 5967) | QColor QCPAxis::getTickLabelColor() const
function QColor (line 5977) | QColor QCPAxis::getLabelColor() const
function QByteArray (line 6347) | QByteArray QCPAxisPainterPrivate::generateLabelParameterHash() const
function QPointF (line 6565) | QPointF QCPAxisPainterPrivate::getTickLabelDrawOffset(const TickLabelDat...
function QRect (line 7167) | QRect QCPAbstractPlottable::clipRect() const
function QPointF (line 7213) | const QPointF QCPAbstractPlottable::coordsToPixels(double key, double va...
function QPen (line 7267) | QPen QCPAbstractPlottable::mainPen() const
function QBrush (line 7277) | QBrush QCPAbstractPlottable::mainBrush() const
function QPointF (line 7479) | QPointF QCPItemAnchor::pixelPoint() const
function QCPAxisRect (line 7657) | QCPAxisRect *QCPItemPosition::axisRect() const
function QPointF (line 7947) | QPointF QCPItemPosition::pixelPoint() const
function QCPAxisRect (line 8359) | QCPAxisRect *QCPAbstractItem::clipAxisRect() const
function QCPItemPosition (line 8441) | QCPItemPosition *QCPAbstractItem::position(const QString &name) const
function QCPItemAnchor (line 8462) | QCPItemAnchor *QCPAbstractItem::anchor(const QString &name) const
function QRect (line 8500) | QRect QCPAbstractItem::clipRect() const
function QPointF (line 8610) | QPointF QCPAbstractItem::anchorPixelPoint(int anchorId) const
function QCPItemPosition (line 8630) | QCPItemPosition *QCPAbstractItem::createPosition(const QString &name)
function QCPItemAnchor (line 8664) | QCPItemAnchor *QCPAbstractItem::createAnchor(const QString &name, int an...
function QCPAbstractPlottable (line 9455) | QCPAbstractPlottable *QCustomPlot::plottable(int index)
function QCPAbstractPlottable (line 9474) | QCPAbstractPlottable *QCustomPlot::plottable()
function foreach (line 9594) | foreach (QCPAbstractPlottable *plottable, mPlottables)
function QCPAbstractPlottable (line 9614) | QCPAbstractPlottable *QCustomPlot::plottableAt(const QPointF &pos, bool ...
function QCPGraph (line 9655) | QCPGraph *QCustomPlot::graph(int index) const
function QCPGraph (line 9674) | QCPGraph *QCustomPlot::graph() const
function QCPGraph (line 9695) | QCPGraph *QCustomPlot::addGraph(QCPAxis *keyAxis, QCPAxis *valueAxis)
function foreach (line 9784) | foreach (QCPGraph *graph, mGraphs)
function QCPAbstractItem (line 9800) | QCPAbstractItem *QCustomPlot::item(int index) const
function QCPAbstractItem (line 9819) | QCPAbstractItem *QCustomPlot::item() const
function foreach (line 9918) | foreach (QCPAbstractItem *item, mItems)
function QCPAbstractItem (line 9939) | QCPAbstractItem *QCustomPlot::itemAt(const QPointF &pos, bool onlySelect...
function QCPLayer (line 9980) | QCPLayer *QCustomPlot::layer(const QString &name) const
function QCPLayer (line 9996) | QCPLayer *QCustomPlot::layer(int index) const
function QCPLayer (line 10011) | QCPLayer *QCustomPlot::currentLayer() const
function QCPAxisRect (line 10203) | QCPAxisRect *QCustomPlot::axisRect(int index) const
function QCPLayoutElement (line 10253) | QCPLayoutElement *QCustomPlot::layoutElementAt(const QPointF &pos) const
function foreach (line 10286) | foreach (QCPAxis *axis, allAxes)
function foreach (line 10340) | foreach (QCPLayer *layer, mLayers)
function QSize (line 10667) | QSize QCustomPlot::minimumSizeHint() const
function QSize (line 10678) | QSize QCustomPlot::sizeHint() const
function foreach (line 10827) | foreach (QCPLayer *layer, mLayers)
function foreach (line 10919) | foreach (QCPLayer *layer, mLayers)
function QCPLayerable (line 11040) | QCPLayerable *QCustomPlot::layerableAt(const QPointF &pos, bool onlySele...
function QPixmap (line 11094) | QPixmap QCustomPlot::toPixmap(int width, int height, double scale)
function QRgb (line 11402) | QRgb QCPColorGradient::color(double position, const QCPRange &range, boo...
function QCPColorGradient (line 11555) | QCPColorGradient QCPColorGradient::inverted() const
function QCPAxis (line 11829) | QCPAxis *QCPAxisRect::axis(QCPAxis::AxisType type, int index) const
function QCPAxis (line 11899) | QCPAxis *QCPAxisRect::addAxis(QCPAxis::AxisType type, QCPAxis *axis)
function QCPAxis (line 12296) | QCPAxis *QCPAxisRect::rangeDragAxis(Qt::Orientation orientation)
function QCPAxis (line 12306) | QCPAxis *QCPAxisRect::rangeZoomAxis(Qt::Orientation orientation)
function QRect (line 12789) | QRect QCPAbstractLegendItem::clipRect() const
function QPen (line 12868) | QPen QCPPlottableLegendItem::getIconBorderPen() const
function QColor (line 12878) | QColor QCPPlottableLegendItem::getTextColor() const
function QFont (line 12888) | QFont QCPPlottableLegendItem::getFont() const
function QSize (line 12928) | QSize QCPPlottableLegendItem::minimumSizeHint() const
function QCPAbstractLegendItem (line 13264) | QCPAbstractLegendItem *QCPLegend::item(int index) const
function QCPPlottableLegendItem (line 13275) | QCPPlottableLegendItem *QCPLegend::itemWithPlottable(const QCPAbstractPl...
function QPen (line 13422) | QPen QCPLegend::getBorderPen() const
function QBrush (line 13432) | QBrush QCPLegend::getBrush() const
function QSize (line 13679) | QSize QCPPlotTitle::minimumSizeHint() const
function QSize (line 13689) | QSize QCPPlotTitle::maximumSizeHint() const
function QFont (line 13742) | QFont QCPPlotTitle::mainFont() const
function QColor (line 13752) | QColor QCPPlotTitle::mainTextColor() const
function QString (line 13862) | QString QCPColorScale::label() const
function foreach (line 13932) | foreach (QCPAxis::AxisType atype, allAxisTypes)
function foreach (line 14267) | foreach (QCPAxis::AxisType type, allAxisTypes)
function foreach (line 14364) | foreach (QCPAxis::AxisType type, allAxisTypes)
function foreach (line 14389) | foreach (QCPAxis::AxisType type, allAxisTypes)
function QPointF (line 16093) | QPointF QCPGraph::lowerFillBasePoint(double lowerKey) const
function QPointF (line 16158) | QPointF QCPGraph::upperFillBasePoint(double upperKey) const
function QPolygonF (line 16218) | const QPolygonF QCPGraph::getChannelFillPolygon(const QVector<QPointF> *...
function QCPRange (line 16513) | QCPRange QCPGraph::getKeyRange(bool &foundRange, SignDomain inSignDomain...
function QCPRange (line 16521) | QCPRange QCPGraph::getValueRange(bool &foundRange, SignDomain inSignDoma...
function QCPRange (line 16534) | QCPRange QCPGraph::getKeyRange(bool &foundRange, SignDomain inSignDomain...
function QCPRange (line 16649) | QCPRange QCPGraph::getValueRange(bool &foundRange, SignDomain inSignDoma...
function QPointF (line 17390) | QPointF QCPCurve::getOptimizedPoint(int otherRegion, double otherKey, do...
function QCPRange (line 17971) | QCPRange QCPCurve::getKeyRange(bool &foundRange, SignDomain inSignDomain...
function QCPRange (line 18007) | QCPRange QCPCurve::getValueRange(bool &foundRange, SignDomain inSignDoma...
function QCPBars (line 18156) | QCPBars *QCPBarsGroup::bars(int index) const
function foreach (line 18277) | foreach (const QCPBars *b, mBars)
function QPolygonF (line 18922) | QPolygonF QCPBars::getBarPolygon(double key, double value) const
function QCPRange (line 19076) | QCPRange QCPBars::getKeyRange(bool &foundRange, SignDomain inSignDomain)...
function QCPRange (line 19126) | QCPRange QCPBars::getValueRange(bool &foundRange, SignDomain inSignDomai...
function QCPRange (line 19536) | QCPRange QCPStatisticalBox::getKeyRange(bool &foundRange, SignDomain inS...
function QCPRange (line 19570) | QCPRange QCPStatisticalBox::getValueRange(bool &foundRange, SignDomain i...
function QCPColorMapData (line 19696) | QCPColorMapData &QCPColorMapData::operator=(const QCPColorMapData &other)
function QCPRange (line 20521) | QCPRange QCPColorMap::getKeyRange(bool &foundRange, SignDomain inSignDom...
function QCPRange (line 20543) | QCPRange QCPColorMap::getValueRange(bool &foundRange, SignDomain inSignD...
function QCPFinancialDataMap (line 20993) | QCPFinancialDataMap QCPFinancial::timeSeriesToOhlc(const QVector<double>...
function QCPRange (line 21111) | QCPRange QCPFinancial::getKeyRange(bool &foundRange, QCPAbstractPlottabl...
function QCPRange (line 21147) | QCPRange QCPFinancial::getValueRange(bool &foundRange, QCPAbstractPlotta...
function QLineF (line 21582) | QLineF QCPItemStraightLine::getRectClippedStraightLine(const QVector2D &...
function QPen (line 21666) | QPen QCPItemStraightLine::mainPen() const
function QLineF (line 21794) | QLineF QCPItemLine::getRectClippedLine(const QVector2D &start, const QVe...
function QPen (line 21892) | QPen QCPItemLine::mainPen() const
function QPen (line 22051) | QPen QCPItemCurve::mainPen() const
function QPointF (line 22171) | QPointF QCPItemRect::anchorPixelPoint(int anchorId) const
function QPen (line 22193) | QPen QCPItemRect::mainPen() const
function QBrush (line 22203) | QBrush QCPItemRect::mainBrush() const
function QPointF (line 22454) | QPointF QCPItemText::anchorPixelPoint(int anchorId) const
function QPointF (line 22495) | QPointF QCPItemText::getTextDrawPoint(const QPointF &pos, const QRectF &...
function QFont (line 22517) | QFont QCPItemText::mainFont() const
function QColor (line 22527) | QColor QCPItemText::mainColor() const
function QPen (line 22537) | QPen QCPItemText::mainPen() const
function QBrush (line 22547) | QBrush QCPItemText::mainBrush() const
function QPointF (line 22696) | QPointF QCPItemEllipse::anchorPixelPoint(int anchorId) const
function QPen (line 22721) | QPen QCPItemEllipse::mainPen() const
function QBrush (line 22731) | QBrush QCPItemEllipse::mainBrush() const
function QPointF (line 22858) | QPointF QCPItemPixmap::anchorPixelPoint(int anchorId) const
function QRect (line 22930) | QRect QCPItemPixmap::getFinalRect(bool *flippedHorz, bool *flippedVert) ...
function QPen (line 22974) | QPen QCPItemPixmap::mainPen() const
function QPen (line 23327) | QPen QCPItemTracer::mainPen() const
function QBrush (line 23337) | QBrush QCPItemTracer::mainBrush() const
function QPointF (line 23548) | QPointF QCPItemBracket::anchorPixelPoint(int anchorId) const
function QPen (line 23574) | QPen QCPItemBracket::mainPen() const
FILE: plugins/filters/qcustomplot.h
function namespace (line 92) | namespace QCP
function Q_DECLARE_OPERATORS_FOR_FLAGS (line 227) | Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::AntialiasedElements)
type PainterMode (line 319) | enum PainterMode { pmDefault = 0x00 ///< <tt>0x00</tt> Default m...
function antialiasing (line 332) | bool antialiasing() const { return testRenderHint(QPainter::Antialiasing...
function QCP_LIB_DECL (line 364) | QCP_LIB_DECL QCPLayer : public QObject
function QCustomPlot (line 423) | QCustomPlot *parentPlot() const { return mParentPlot; }
function QCPLayerable (line 424) | QCPLayerable *parentLayerable() const { return mParentLayerable.data(); }
function QCPLayer (line 425) | QCPLayer *layer() const { return mLayer; }
function isEmpty (line 608) | bool isEmpty() const;
function elementCount (line 729) | int elementCount() const = 0;
function virtual (line 789) | virtual int elementCount() const;
function Q_GADGET (line 873) | Q_GADGET
function boundingDistance (line 915) | double boundingDistance() const;
function Q_OBJECT (line 981) | Q_OBJECT
function QString (line 1112) | QString numberFormat() const;
function tickLengthIn (line 1117) | int tickLengthIn() const;
function virtual (line 1327) | virtual int size() const;
type CachedLabel (line 1361) | struct CachedLabel
type TickLabelData (line 1366) | struct TickLabelData
function virtual (line 1377) | virtual QByteArray generateLabelParameterHash() const;
function QCPAxis (line 1416) | QCPAxis *keyAxis() const { return mKeyAxis.data(); }
function QCPAxis (line 1417) | QCPAxis *valueAxis() const { return mValueAxis.data(); }
function virtual (line 1439) | virtual bool removeFromLegend() const;
type PositionType (line 1548) | enum PositionType { ptAbsolute ///< Static positioning in pixels,...
function QCPItemAnchor (line 1565) | QCPItemAnchor *parentAnchor() const { return parentAnchorX(); }
function QCPItemAnchor (line 1566) | QCPItemAnchor *parentAnchorX() const { return mParentAnchorX; }
function QCPItemAnchor (line 1567) | QCPItemAnchor *parentAnchorY() const { return mParentAnchorY; }
function QCPAxis (line 1571) | QCPAxis *keyAxis() const { return mKeyAxis.data(); }
function QCPAxis (line 1572) | QCPAxis *valueAxis() const { return mValueAxis.data(); }
function QCPLayoutGrid (line 1722) | QCPLayoutGrid *plotLayout() const { return mPlotLayout; }
type ColorInterpolation (line 1911) | enum ColorInterpolation { ciRGB ///< Color channels red, green and blue...
function GradientPreset (line 1914) | Q_ENUMS(ColorInterpolation)
function QCPLayoutInset (line 2019) | QCPLayoutInset *insetLayout() const { return mInsetLayout; }
function QCPLegend (line 2099) | QCPLegend *parentLegend() const { return mParentLegend; }
function virtual (line 2132) | virtual QCP::Interaction selectionCategory() const;
function virtual (line 2162) | virtual QSize minimumSizeHint() const;
function SelectableParts (line 2215) | SelectableParts selectedParts() const;
function virtual (line 2349) | virtual QSize minimumSizeHint() const;
function QCPAxis (line 2406) | QCPAxis *axis() const { return mColorAxis.data(); }
function QString (line 2411) | QString label() const;
type QMap (line 2487) | typedef QMap<double, QCPData> QCPDataMap;
type QMapIterator (line 2488) | typedef QMapIterator<double, QCPData> QCPDataMapIterator;
type QMutableMapIterator (line 2489) | typedef QMutableMapIterator<double, QCPData> QCPDataMutableMapIterator;
function ErrorType (line 2519) | Q_ENUMS(LineStyle)
function class (line 2640) | class QCP_LIB_DECL QCPCurveData
type QMap (line 2657) | typedef QMap<double, QCPCurveData> QCPCurveDataMap;
type QMapIterator (line 2658) | typedef QMapIterator<double, QCPCurveData> QCPCurveDataMapIterator;
type QMutableMapIterator (line 2659) | typedef QMutableMapIterator<double, QCPCurveData> QCPCurveDataMutableMap...
type LineStyle (line 2675) | enum LineStyle { lsNone ///< No line is drawn between data points (e.g....
function QCPCurveDataMap (line 2682) | QCPCurveDataMap *data() const { return mData; }
type SpacingType (line 2756) | enum SpacingType { stAbsolute ///< Bar spacing is in absolute pixels
function contains (line 2777) | bool contains(QCPBars *bars) const { return mBars.contains(bars); }
function class (line 2804) | class QCP_LIB_DECL QCPBarData
type QMap (line 2820) | typedef QMap<double, QCPBarData> QCPBarDataMap;
type QMapIterator (line 2821) | typedef QMapIterator<double, QCPBarData> QCPBarDataMapIterator;
type QMutableMapIterator (line 2822) | typedef QMutableMapIterator<double, QCPBarData> QCPBarDataMutableMapIter...
function Q_OBJECT (line 2827) | Q_OBJECT
function class (line 2999) | class QCP_LIB_DECL QCPColorMapData
function QCPColorMapData (line 3064) | QCPColorMapData *data() const { return mMapData; }
function QCPColorScale (line 3070) | QCPColorScale *colorScale() const { return mColorScale.data(); }
function class (line 3126) | class QCP_LIB_DECL QCPFinancialData
type QMap (line 3142) | typedef QMap<double, QCPFinancialData> QCPFinancialDataMap;
type QMapIterator (line 3143) | typedef QMapIterator<double, QCPFinancialData> QCPFinancialDataMapIterator;
type QMutableMapIterator (line 3144) | typedef QMutableMapIterator<double, QCPFinancialData> QCPFinancialDataMu...
function Q_OBJECT (line 3149) | Q_OBJECT
type AnchorIndex (line 3407) | enum AnchorIndex {aiTop, aiTopRight, aiRight, aiBottom, aiBottomLeft, ai...
function virtual (line 3415) | virtual QPointF anchorPixelPoint(int anchorId) const;
type AnchorIndex (line 3489) | enum AnchorIndex {aiTopLeft, aiTop, aiTopRight, aiRight, aiBottomRight, ...
function virtual (line 3504) | virtual QPointF anchorPixelPoint(int anchorId) const;
type AnchorIndex (line 3556) | enum AnchorIndex {aiTopLeftRim, aiTop, aiTopRightRim, aiRight, aiBottomR...
function virtual (line 3564) | virtual QPointF anchorPixelPoint(int anchorId) const;
type AnchorIndex (line 3614) | enum AnchorIndex {aiTop, aiTopRight, aiRight, aiBottom, aiBottomLeft, ai...
function Q_OBJECT (line 3637) | Q_OBJECT
function Q_OBJECT (line 3717) | Q_OBJECT
FILE: plugins/filters/slicewindow.h
function class (line 6) | class SliceWindow : public CutWindow
FILE: plugins/filters/smoothwindow.h
function namespace (line 6) | namespace Ui
function class (line 11) | class SmoothWindow : public FilterWindow
FILE: plugins/filters/streamlinewindow.h
function namespace (line 8) | namespace Ui
function class (line 15) | class StreamlineWindow : public FilterWindow
FILE: plugins/filters/thresholdwindow.h
function class (line 6) | class ThresholdWindow : public IsosurfaceWindow
FILE: plugins/imageprocessing/imageprocessingplugin.cpp
function QString (line 16) | QString ImageProcessingPlugin::category() const
function QStringList (line 28) | QStringList ImageProcessingPlugin::keywords() const
FILE: plugins/imageprocessing/imagetree.h
function class (line 8) | class ImageTree : public QTreeWidget
FILE: plugins/imageprocessing/mainwidget.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace Widgets
function class (line 19) | class MainWidget : public QWidget
FILE: plugins/light/galaxywindow.cpp
function vtkActor (line 58) | static vtkActor* createSphereActor(double radius)
FILE: plugins/light/galaxywindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 22) | class GalaxyWindow : public QWidget
FILE: plugins/light/lightplugin.cpp
function QString (line 28) | QString LightPlugin::category() const
function QStringList (line 68) | QStringList LightPlugin::keywords() const
FILE: plugins/light/mainwidget.h
function namespace (line 6) | namespace Ui {
function class (line 10) | class MainWidget : public QWidget
FILE: plugins/miscellaneous/backgroundwindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 22) | class BackgroundWindow : public QWidget
FILE: plugins/miscellaneous/colormapwindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 20) | class ColorMapWindow : public QWidget
FILE: plugins/miscellaneous/miscellaneousplugin.cpp
function QString (line 20) | QString MiscellaneousPlugin::category() const
function QStringList (line 36) | QStringList MiscellaneousPlugin::keywords() const
FILE: plugins/miscellaneous/parametricobjectswindow.cpp
function QWidget (line 538) | QWidget* ParametricObjectsWindow::createConfigWidgetTempl()
FILE: plugins/miscellaneous/parametricobjectswindow.h
function namespace (line 9) | namespace Ui
function namespace (line 14) | namespace Utils
function namespace (line 19) | namespace VtkUtils
function class (line 26) | class ParametricObjectsWindow : public QWidget
FILE: plugins/miscellaneous/representationwidget.cpp
function vtkPoints (line 28) | static vtkPoints* createPoints()
FILE: plugins/miscellaneous/representationwidget.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 19) | class RepresentationWidget : public QWidget
FILE: plugins/miscellaneous/scaleaxeswindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function namespace (line 18) | namespace Utils
function class (line 28) | class ScaleAxesWindow : public QWidget
FILE: plugins/picking/drawspherewindow.h
function namespace (line 11) | namespace Ui
function namespace (line 16) | namespace VtkUtils
function class (line 24) | class DrawSphereWindow : public QWidget
FILE: plugins/picking/drawsurfacewindow.cpp
function foreach (line 145) | foreach (vtkActor* actor, m_pointActors) {
FILE: plugins/picking/drawsurfacewindow.h
function namespace (line 10) | namespace Ui
function namespace (line 15) | namespace Utils
function namespace (line 20) | namespace VtkUtils
function class (line 29) | class DrawSurfaceWindow : public QWidget
FILE: plugins/picking/pickactorwindow.h
function namespace (line 9) | namespace Ui
function namespace (line 14) | namespace VtkUtils
function class (line 20) | class PickActorWindow : public QWidget
FILE: plugins/picking/pickcellwindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 20) | class PickCellWindow : public QWidget
FILE: plugins/picking/pickingplugin.cpp
function QString (line 20) | QString PickingPlugin::category() const
function QStringList (line 36) | QStringList PickingPlugin::keywords() const
FILE: plugins/picking/selectareawindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 21) | class SelectAreaWindow : public QWidget
FILE: plugins/pipeline/arrowitem.cpp
function QRectF (line 21) | QRectF ArrowItem::boundingRect() const
function QPainterPath (line 31) | QPainterPath ArrowItem::shape() const
FILE: plugins/pipeline/arrowitem.h
function class (line 13) | class ArrowItem : public QGraphicsLineItem
FILE: plugins/pipeline/pipelineplugin.cpp
function QString (line 16) | QString PipelinePlugin::category() const
function QStringList (line 28) | QStringList PipelinePlugin::keywords() const
FILE: plugins/pipeline/pipelinewindow.h
function namespace (line 6) | namespace Ui
function class (line 12) | class PipelineWindow : public QWidget
FILE: plugins/plot2d/bagplotwidget.h
function namespace (line 6) | namespace Ui
function class (line 12) | class BagPlotWidget : public PlotWidget
FILE: plugins/plot2d/barplotwidget.h
function namespace (line 6) | namespace Ui
function class (line 12) | class BarPlotWidget : public PlotWidget
FILE: plugins/plot2d/lineplotwidget.h
function namespace (line 7) | namespace Ui
function class (line 15) | class LinePlotWidget : public PlotWidget
FILE: plugins/plot2d/pieplotwidget.h
function namespace (line 6) | namespace Ui
function class (line 11) | class PiePlotWidget : public PlotWidget
FILE: plugins/plot2d/plot2dplugin.cpp
function QString (line 21) | QString Plot2DPlugin::category() const
function QStringList (line 40) | QStringList Plot2DPlugin::keywords() const
FILE: plugins/plot2d/plotwidget.cpp
function vtkTable (line 92) | vtkTable* PlotWidget::convertModelToVtkTable()
FILE: plugins/plot2d/plotwidget.h
function namespace (line 9) | namespace Utils
function namespace (line 14) | namespace VtkUtils
function class (line 28) | class PlotWidget : public QWidget
FILE: plugins/plot2d/scatterplotwidget.h
function namespace (line 6) | namespace Ui
function class (line 12) | class ScatterPlotWidget : public PlotWidget
FILE: plugins/plot2d/stackedplotwidget.h
function namespace (line 6) | namespace Ui
function class (line 12) | class StackedPlotWidget : public PlotWidget
FILE: plugins/plot3d/plot3dplugin.cpp
function QString (line 28) | QString Plot3DPlugin::category() const
function QStringList (line 53) | QStringList Plot3DPlugin::keywords() const
FILE: plugins/plot3d/plotline3dwindow.h
function namespace (line 6) | namespace Ui
function class (line 11) | class PlotLine3DWindow : public PlotWindow
FILE: plugins/plot3d/plotpoints3dwindow.h
function namespace (line 6) | namespace Ui
function class (line 11) | class PlotPoints3DWindow : public PlotWindow
FILE: plugins/plot3d/plotsurfacewindow.h
function namespace (line 6) | namespace Ui
function class (line 11) | class PlotSurfaceWindow : public PlotWindow
FILE: plugins/plot3d/plotwindow.cpp
function vtkTable (line 136) | vtkTable* PlotWindow::convertModelToVtkTable()
FILE: plugins/plot3d/plotwindow.h
function namespace (line 8) | namespace Utils
function namespace (line 13) | namespace VtkUtils
function class (line 21) | class PlotWindow : public QWidget
FILE: plugins/plotactor/barchartactorwindow.h
function namespace (line 6) | namespace Ui
function class (line 12) | class BarChartActorWindow : public PlotActorWindow
FILE: plugins/plotactor/piechartactorwindow.cpp
function vtkDataObject (line 202) | vtkDataObject* PieChartActorWindow::createPlotData()
FILE: plugins/plotactor/piechartactorwindow.h
function namespace (line 6) | namespace Ui
function class (line 12) | class PieChartActorWindow : public PlotActorWindow
FILE: plugins/plotactor/plotactorplugin.cpp
function QString (line 38) | QString PlotActorPlugin::category() const
function vtkDataObject (line 43) | static vtkDataObject* createPlotData()
function QStringList (line 134) | QStringList PlotActorPlugin::keywords() const
FILE: plugins/plotactor/plotactorwindow.cpp
function vtkColor3ub (line 45) | vtkColor3ub PlotActorWindow::coolColor(int index)
function vtkColor3ub (line 53) | vtkColor3ub PlotActorWindow::warmColor(int index)
function vtkDataObject (line 85) | vtkDataObject* PlotActorWindow::createPlotData()
FILE: plugins/plotactor/plotactorwindow.h
function namespace (line 8) | namespace Ui {
function namespace (line 12) | namespace VtkUtils
function namespace (line 17) | namespace Utils
function namespace (line 22) | namespace Widgets
function class (line 37) | class PlotActorWindow : public QWidget
FILE: plugins/plotactor/spiderplotactorwindow.cpp
function vtkDataObject (line 63) | vtkDataObject* SpiderPlotActorWindow::createPlotData()
FILE: plugins/plotactor/spiderplotactorwindow.h
function namespace (line 6) | namespace Ui
function class (line 11) | class SpiderPlotActorWindow : public PlotActorWindow
FILE: plugins/plotactor/xyplotactorwindow.h
function class (line 7) | class XYPlotActorWindow : public PlotActorWindow
FILE: plugins/rendersphere/main.cpp
function main (line 5) | int main(int argc, char* argv[])
FILE: plugins/rendersphere/rendersphereplugin.cpp
function QString (line 16) | QString RenderSpherePlugin::category() const
FILE: plugins/rendersphere/widget.h
function class (line 14) | class VTKWidget : public QVTKWidget
FILE: plugins/screenshot/screenshotplugin.cpp
function QString (line 16) | QString ScreenshotPlugin::category() const
function QStringList (line 28) | QStringList ScreenshotPlugin::keywords() const
FILE: plugins/screenshot/screenshotwindow.h
function namespace (line 6) | namespace Ui {
function namespace (line 10) | namespace VtkUtils
function class (line 15) | class ScreenshotWindow : public QWidget
FILE: plugins/shader/editshaderwindow.h
function namespace (line 8) | namespace Ui
function namespace (line 13) | namespace VtkUtils
function class (line 20) | class EditShaderWindow : public QWidget
FILE: plugins/shader/shaderplugin.cpp
function QString (line 17) | QString ShaderPlugin::category() const
function QStringList (line 30) | QStringList ShaderPlugin::keywords() const
FILE: plugins/shader/shaderwindow.h
function namespace (line 6) | namespace Ui
function namespace (line 11) | namespace VtkUtils
function class (line 16) | class ShaderWindow : public QWidget
FILE: plugins/template/templateplugin.cpp
function QString (line 15) | QString TemplatePlugin::category() const
function QStringList (line 26) | QStringList TemplatePlugin::keywords() const
FILE: plugins/volumerendering/volumerenderingplugin.cpp
function QString (line 16) | QString VolumeRenderingPlugin::category() const
function QStringList (line 28) | QStringList VolumeRenderingPlugin::keywords() const
FILE: plugins/volumerendering/volumerenderingwindow.h
function namespace (line 6) | namespace Ui
function namespace (line 11) | namespace VtkUtils
function class (line 16) | class VolumeRenderingWindow : public QWidget
FILE: src/main.cpp
function main (line 5) | int main(int argc, char* argv[])
FILE: src/mainwindow.cpp
function loadPlugins (line 25) | QMap<Interface*, QVariantMap> loadPlugins(const QString& strPluginDir)
function loadPlugin (line 50) | QPair<Interface*, QVariantMap> loadPlugin(const QString& pluginFile, QSt...
function QSize (line 79) | QSize MainWindow::sizeHint() const
function widgetIndex (line 189) | static inline int widgetIndex(const QWidgetList& widgetList, const QStri...
function foreach (line 261) | foreach (QWidget* widget, examples) {
function foreach (line 283) | foreach (QWidget* widget, examples) {
FILE: src/mainwindow.h
function namespace (line 7) | namespace Widgets
function class (line 18) | class MainWindow : public QWidget
Condensed preview — 508 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,412K chars).
[
{
"path": "README.md",
"chars": 3072,
"preview": "# QVTKDemo\n\nUsing VTK-Qt binding to demonstrate VTK features.\n\n\n# Demo snapshots\n\nSources\n<img src=\"https://cloud.github"
},
{
"path": "app.pri",
"chars": 307,
"preview": "include($$replace(_PRO_FILE_PWD_, ([^/]+$), \\\\1/\\\\1_dependencies.pri))\nTARGET = $$APP_NAME\n\ninclude(demos.pri)\ninclude(r"
},
{
"path": "demos.pri",
"chars": 5035,
"preview": "!isEmpty(QVTKDEMOS_PRI_INCLUDED):error(\"demos.pri already included\")\n\nQVTKDEMOS_PRI_INCLUDED = 1\n\nVERSION = 1.0\nQMAKE_TA"
},
{
"path": "demos.pro",
"chars": 114,
"preview": "include(demos.pri)\n\nTEMPLATE = subdirs\nCONFIG += ordered\n\nSUBDIRS += libs \\\n plugins \\\n src \\\n"
},
{
"path": "lib.pri",
"chars": 401,
"preview": "include($$replace(_PRO_FILE_PWD_, ([^/]+$), \\\\1/\\\\1_dependencies.pri))\nTARGET = $$LIB_NAME\n\ninclude(demos.pri)\n\nwin32 {\n"
},
{
"path": "libs/3dparty/3dparty.pri",
"chars": 87,
"preview": "contains(QT, core): QT += concurrent\ncontains(QT, gui): QT += widgets\n\nCONFIG += c++11\n"
},
{
"path": "libs/3dparty/3dparty.pro",
"chars": 246,
"preview": "INCLUDEPATH += $$PWD\nDEPENDPATH += $$PWD\n\ninclude(../../lib.pri)\n\nDEFINES += THIRDPARTY_LIBRARY\n\nHEADERS += 3dparty_glob"
},
{
"path": "libs/3dparty/3dparty_dependencies.pri",
"chars": 35,
"preview": "LIB_NAME = 3dparty\nLIB_DEPENDS += \n"
},
{
"path": "libs/3dparty/3dparty_global.h",
"chars": 246,
"preview": "#ifndef THIRDPARTY_GLOBAL_H\n#define THIRDPARTY_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(THIRDPARTY_LIBRARY)\n# "
},
{
"path": "libs/3dparty/QRoundProgressBar.cpp",
"chars": 8643,
"preview": "/*\n * QRoundProgressBar - a circular progress bar Qt widget.\n *\n * Sintegrial Technologies (c) 2015-now\n *\n * The softwa"
},
{
"path": "libs/3dparty/QRoundProgressBar.h",
"chars": 8970,
"preview": "/*\n * QRoundProgressBar - a circular progress bar Qt widget.\n *\n * Sintegrial Technologies (c) 2015-now\n *\n * The softwa"
},
{
"path": "libs/3dparty/flowlayout.cpp",
"chars": 6146,
"preview": "/****************************************************************************\n**\n** Copyright (C) 2016 The Qt Company Lt"
},
{
"path": "libs/3dparty/flowlayout.h",
"chars": 3665,
"preview": "/****************************************************************************\n**\n** Copyright (C) 2016 The Qt Company Lt"
},
{
"path": "libs/libs.pro",
"chars": 104,
"preview": "TEMPLATE = subdirs\nCONFIG += ordered\n\nSUBDIRS += \\\n utils \\\n vtkutils \\\n widgets \\\n 3dparty\n"
},
{
"path": "libs/utils/colorseries.cpp",
"chars": 3389,
"preview": "#include \"colorseries.h\"\n\nnamespace Utils\n{\n\ntypedef QList<QColor> ColorList;\n\nstatic inline QColor hexToColor(QRgb num)"
},
{
"path": "libs/utils/colorseries.h",
"chars": 537,
"preview": "#ifndef COLORSERIES_H\n#define COLORSERIES_H\n\n#include <QColor>\n\n#include \"utils_global.h\"\n\nnamespace Utils\n{\n\nclass Colo"
},
{
"path": "libs/utils/doublespinboxdelegate.cpp",
"chars": 1420,
"preview": "#include \"doublespinboxdelegate.h\"\n\n#include <QDoubleSpinBox>\n\nnamespace Utils\n{\n\nDoubleSpinBoxDelegate::DoubleSpinBoxDe"
},
{
"path": "libs/utils/doublespinboxdelegate.h",
"chars": 840,
"preview": "#ifndef DOUBLESPINBOXDELEGATE_H\n#define DOUBLESPINBOXDELEGATE_H\n\n#include <QStyledItemDelegate>\n\n#include \"utils_global."
},
{
"path": "libs/utils/iplugin.h",
"chars": 860,
"preview": "#ifndef IPLUGIN_H\n#define IPLUGIN_H\n\n#include <QtPlugin>\n\nnamespace Utils {\n\n/*!\n * \\class IPlugin\n\n * \\brief 类 IPlugin "
},
{
"path": "libs/utils/ivtkplugin.cpp",
"chars": 109,
"preview": "#include \"ivtkplugin.h\"\n\nnamespace Utils\n{\n\nIVtkPlugin::IVtkPlugin()\n{\n\n}\n\nIVtkPlugin::~IVtkPlugin()\n{\n\n}\n\n}\n"
},
{
"path": "libs/utils/ivtkplugin.h",
"chars": 448,
"preview": "#ifndef IVTKPLUGIN_H\n#define IVTKPLUGIN_H\n\n#include \"iplugin.h\"\n#include \"utils_global.h\"\n\nnamespace Utils\n{\n\nclass UTIL"
},
{
"path": "libs/utils/modeltopointsconverter.cpp",
"chars": 834,
"preview": "#include \"modeltopointsconverter.h\"\n\n#include <QDebug>\n\nnamespace Utils\n{\n\nModelToPointsConverter::ModelToPointsConverte"
},
{
"path": "libs/utils/modeltopointsconverter.h",
"chars": 517,
"preview": "#ifndef MODELTOPOINTSCONVERTER_H\n#define MODELTOPOINTSCONVERTER_H\n\n#include \"signalledrunable.h\"\n#include \"utils.h\"\n#inc"
},
{
"path": "libs/utils/modeltovectorsconverter.cpp",
"chars": 892,
"preview": "#include \"modeltovectorsconverter.h\"\n#include \"tablemodel.h\"\n\n#include <QDebug>\n\nnamespace Utils\n{\n\nModelToVectorsConver"
},
{
"path": "libs/utils/modeltovectorsconverter.h",
"chars": 510,
"preview": "#ifndef MODELTOVECTORSCONVERTER_H\n#define MODELTOVECTORSCONVERTER_H\n\n#include \"signalledrunable.h\"\n#include \"utils.h\"\n#i"
},
{
"path": "libs/utils/point3f.cpp",
"chars": 21,
"preview": "#include \"point3f.h\"\n"
},
{
"path": "libs/utils/point3f.h",
"chars": 198,
"preview": "#ifndef POINT3F_H\n#define POINT3F_H\n\n#include \"utils_global.h\"\n\nnamespace Utils\n{\n\nstruct UTILS_EXPORT Point3F\n{\n qre"
},
{
"path": "libs/utils/pointsreader.cpp",
"chars": 903,
"preview": "#include \"pointsreader.h\"\n\n#include <QFile>\n#include <QTextStream>\n#include <QDebug>\n\nnamespace Utils\n{\n\nPointsReader::P"
},
{
"path": "libs/utils/pointsreader.h",
"chars": 484,
"preview": "#ifndef POINTSREADER_H\n#define POINTSREADER_H\n\n#include <QRunnable>\n\n#include \"signalledrunable.h\"\n#include \"utils.h\"\n#i"
},
{
"path": "libs/utils/pointstomodelconverter.cpp",
"chars": 770,
"preview": "#include \"pointstomodelconverter.h\"\n#include \"tablemodel.h\"\n\n#include <QDebug>\n\nnamespace Utils\n{\n\nPointsToModelConverte"
},
{
"path": "libs/utils/pointstomodelconverter.h",
"chars": 563,
"preview": "#ifndef POINTSTOMODELCONVERTER_H\n#define POINTSTOMODELCONVERTER_H\n\n#include <QObject>\n#include <QRunnable>\n\n#include \"ut"
},
{
"path": "libs/utils/signalblocker.cpp",
"chars": 403,
"preview": "#include \"signalblocker.h\"\n\nnamespace Utils\n{\n\nSignalBlocker::SignalBlocker(QObject* object)\n{\n addObject(object);\n}\n"
},
{
"path": "libs/utils/signalblocker.h",
"chars": 364,
"preview": "#ifndef SIGNALBLOCKER_H\n#define SIGNALBLOCKER_H\n\n#include <QObject>\n\n#include \"utils_global.h\"\n\nnamespace Utils\n{\n\nclass"
},
{
"path": "libs/utils/signalledrunable.cpp",
"chars": 116,
"preview": "#include \"signalledrunable.h\"\n\nnamespace Utils\n{\n\nSignalledRunnable::SignalledRunnable()\n{\n\n}\n\n} // namespace Utils\n"
},
{
"path": "libs/utils/signalledrunable.h",
"chars": 349,
"preview": "#ifndef SIGNALLEDRUNNABLE_H\n#define SIGNALLEDRUNNABLE_H\n\n#include <QObject>\n#include <QRunnable>\n\n#include \"utils_global"
},
{
"path": "libs/utils/tablemodel.cpp",
"chars": 4231,
"preview": "#include \"tablemodel.h\"\n\n#include \"utils.h\"\n\n#include <QDebug>\n\nnamespace Utils\n{\n\nTableModel::TableModel(int column, in"
},
{
"path": "libs/utils/tablemodel.h",
"chars": 1593,
"preview": "#ifndef TABLEMODEL_H\n#define TABLEMODEL_H\n\n#include <QAbstractTableModel>\n\n#include \"utils_global.h\"\n\nnamespace Utils\n{\n"
},
{
"path": "libs/utils/utils.cpp",
"chars": 2420,
"preview": "#include \"utils.h\"\n\n#include <QProcess>\n#include <QPainter>\n\nconst float Pi = 3.14159f;\n\nnamespace Utils\n{\n\nQString char"
},
{
"path": "libs/utils/utils.h",
"chars": 3067,
"preview": "#ifndef UTILS_H\n#define UTILS_H\n\n#include <QImage>\n#include <QColor>\n#include <QtMath>\n\n#include <complex>\n\n#include \"ut"
},
{
"path": "libs/utils/utils.pri",
"chars": 285,
"preview": "INCLUDEPATH += $$PWD\nDEPENDPATH += $$PWD\n\nDEFINES += UTILS_LIBRARY\n\nHEADERS += $$PWD/utils_global.h \\\n $$PWD/d"
},
{
"path": "libs/utils/utils.pro",
"chars": 975,
"preview": "INCLUDEPATH += $$PWD\nDEPENDPATH += $$PWD\n\ninclude(../../lib.pri)\n\nDEFINES += UTILS_LIBRARY\n\nHEADERS += utils_global.h \\"
},
{
"path": "libs/utils/utils_dependencies.pri",
"chars": 33,
"preview": "LIB_NAME = utils\nLIB_DEPENDS += \n"
},
{
"path": "libs/utils/utils_global.h",
"chars": 216,
"preview": "#ifndef UTILS_GLOBAL_H\n#define UTILS_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(UTILS_LIBRARY)\n# define UTILS_E"
},
{
"path": "libs/utils/vector4f.cpp",
"chars": 22,
"preview": "#include \"vector4f.h\"\n"
},
{
"path": "libs/utils/vector4f.h",
"chars": 214,
"preview": "#ifndef VECTOR4F_H\n#define VECTOR4F_H\n\n#include \"utils_global.h\"\n\nnamespace Utils\n{\n\nstruct UTILS_EXPORT Vector4F\n{\n "
},
{
"path": "libs/vtkutils/abstractimageprocessor.cpp",
"chars": 138,
"preview": "#include \"abstractimageprocessor.h\"\n\nnamespace VtkUtils\n{\n\nAbstractImageProcessor::AbstractImageProcessor()\n{\n\n}\n\n} // n"
},
{
"path": "libs/vtkutils/abstractimageprocessor.h",
"chars": 1083,
"preview": "#ifndef ABSTRACTIMAGEPROCESSOR_H\n#define ABSTRACTIMAGEPROCESSOR_H\n\n#include \"vtkutils_global.h\"\n\n#include <utils/signall"
},
{
"path": "libs/vtkutils/abstractwidgetobserver.cpp",
"chars": 529,
"preview": "#include \"abstractwidgetobserver.h\"\n\n#include <vtkInteractorObserver.h>\n\nnamespace VtkUtils\n{\n\nAbstractWidgetObserver::A"
},
{
"path": "libs/vtkutils/abstractwidgetobserver.h",
"chars": 666,
"preview": "#ifndef ABSTRACTWIDGETOBSERVER_H\n#define ABSTRACTWIDGETOBSERVER_H\n\n#include <QObject>\n\n#include <vtkCommand.h>\n\n#include"
},
{
"path": "libs/vtkutils/actorexporter.cpp",
"chars": 757,
"preview": "#include \"actorexporter.h\"\n#include \"vtkutils.h\"\n\n#include <vtkActor.h>\n#include <vtkRenderWindow.h>\n#include <vtkRender"
},
{
"path": "libs/vtkutils/actorexporter.h",
"chars": 422,
"preview": "#ifndef ACTOREXPORTER_H\n#define ACTOREXPORTER_H\n\n#include <QRunnable>\n#include <QString>\n\n#include \"vtkutils_global.h\"\n\n"
},
{
"path": "libs/vtkutils/anglewidgetobserver.cpp",
"chars": 1481,
"preview": "#include \"anglewidgetobserver.h\"\n\n#include <vtkAngleWidget.h>\n#include <vtkAngleRepresentation2D.h>\n#include <vtkAngleRe"
},
{
"path": "libs/vtkutils/anglewidgetobserver.h",
"chars": 731,
"preview": "#ifndef ANGLEWIDGETOBSERVER_H\n#define ANGLEWIDGETOBSERVER_H\n\n#include \"abstractwidgetobserver.h\"\n\nnamespace VtkUtils\n{\n\n"
},
{
"path": "libs/vtkutils/boxcutter.cpp",
"chars": 615,
"preview": "#include \"boxcutter.h\"\n\nclass BoxCutterPrivate\n{\npublic:\n\n};\n\nBoxCutter::BoxCutter(QObject* parent) : Interactor(parent)"
},
{
"path": "libs/vtkutils/boxcutter.h",
"chars": 539,
"preview": "#ifndef BOXCUTTER_H\n#define BOXCUTTER_H\n\n#include \"interactor.h\"\n\nclass BoxCutterPrivate;\nclass BoxCutter : public Inter"
},
{
"path": "libs/vtkutils/boxwidgetobserver.cpp",
"chars": 562,
"preview": "#include \"boxwidgetobserver.h\"\n\n#include <vtkBoxWidget.h>\n#include <vtkPlanes.h>\n\nnamespace VtkUtils\n{\n\nBoxWidgetObserve"
},
{
"path": "libs/vtkutils/boxwidgetobserver.h",
"chars": 558,
"preview": "#ifndef BOXWIDGETOBSERVER_H\n#define BOXWIDGETOBSERVER_H\n\n#include \"abstractwidgetobserver.h\"\n\n#include <vtkSmartPointer."
},
{
"path": "libs/vtkutils/contour.cpp",
"chars": 2518,
"preview": "#include \"contour.h\"\n\n#include <vtkContourFilter.h>\n#include <vtkDelaunay2D.h>\n#include <vtkPolyDataMapper.h>\n#include <"
},
{
"path": "libs/vtkutils/contour.h",
"chars": 707,
"preview": "#ifndef CONTOUR_H\n#define CONTOUR_H\n\n#include \"surface.h\"\n\n#include <utils/vector4f.h>\n\nnamespace VtkUtils\n{\nclass Conto"
},
{
"path": "libs/vtkutils/contourwidgetobserver.cpp",
"chars": 861,
"preview": "#include \"contourwidgetobserver.h\"\n\n#include <vtkPolyData.h>\n#include <vtkContourWidget.h>\n#include <vtkContourRepresent"
},
{
"path": "libs/vtkutils/contourwidgetobserver.h",
"chars": 582,
"preview": "#ifndef CONTOURWIDGETOBSERVER_H\n#define CONTOURWIDGETOBSERVER_H\n\n#include \"abstractwidgetobserver.h\"\n\n#include <vtkSmart"
},
{
"path": "libs/vtkutils/custominteractorstyle.cpp",
"chars": 4018,
"preview": "#include \"custominteractorstyle.h\"\n#include \"../graph3d.h\"\n#include \"util.h\"\n\n#include <vtkSmartPointer.h>\n#include <vtk"
},
{
"path": "libs/vtkutils/custominteractorstyle.h",
"chars": 1368,
"preview": "#ifndef CUSTOMINTERACTORSTYLE_H\n#define CUSTOMINTERACTORSTYLE_H\n\n#include <QObject>\n#include <vtkInteractorStyleTrackbal"
},
{
"path": "libs/vtkutils/datafilter.cpp",
"chars": 866,
"preview": "#include \"datafilter.h\"\n\nnamespace VtkUtils\n{\n\nQString VTKUTILS_EXPORT filterName(FilterType type)\n{\n QString strType"
},
{
"path": "libs/vtkutils/datafilter.h",
"chars": 3150,
"preview": "#ifndef DATAFILTER_H\n#define DATAFILTER_H\n\n#include <QRunnable>\n#include <QObject>\n\n#include <utils/signalledrunable.h>\n"
},
{
"path": "libs/vtkutils/disablerotationinteractorstyle.cpp",
"chars": 6598,
"preview": "#include \"disablerotationinteractorstyle.h\"\n#include \"../graph3d.h\"\n#include \"util.h\"\n\n#include <vtkObjectFactory.h>\n#in"
},
{
"path": "libs/vtkutils/disablerotationinteractorstyle.h",
"chars": 1964,
"preview": "#ifndef DISABLEROTATIONINTERACTORSTYLE_H\n#define DISABLEROTATIONINTERACTORSTYLE_H\n\n#include \"custominteractorstyle.h\"\n#i"
},
{
"path": "libs/vtkutils/distancewidgetobserver.cpp",
"chars": 1325,
"preview": "#include \"distancewidgetobserver.h\"\n\n#include <vtkDistanceWidget.h>\n#include <vtkDistanceRepresentation.h>\n\nnamespace Vt"
},
{
"path": "libs/vtkutils/distancewidgetobserver.h",
"chars": 662,
"preview": "#ifndef DISTANCEWIDGETOBSERVER_H\n#define DISTANCEWIDGETOBSERVER_H\n\n#include \"abstractwidgetobserver.h\"\n\nnamespace VtkUti"
},
{
"path": "libs/vtkutils/filereaderutils.cpp",
"chars": 29333,
"preview": "#include \"filereaderutils.h\"\n#include \"vtkUnstructuredGridRelevantPointsFilter.h\"\n\n#include <vtkUnstructuredGrid.h>\n#inc"
},
{
"path": "libs/vtkutils/filereaderutils.h",
"chars": 3673,
"preview": "#ifndef FILEREADERUTILS_H\n#define FILEREADERUTILS_H\n\n#include <QObject>\n#include <QRunnable>\n#include <QMap>\n\n#include <"
},
{
"path": "libs/vtkutils/implicitplanewidgetobserver.cpp",
"chars": 598,
"preview": "#include \"implicitplanewidgetobserver.h\"\n\n#include <vtkImplicitPlaneWidget.h>\n\nnamespace VtkUtils\n{\n\nImplicitPlaneWidget"
},
{
"path": "libs/vtkutils/implicitplanewidgetobserver.h",
"chars": 556,
"preview": "#ifndef IMPLICITPLANEWIDGETOBSERVER_H\n#define IMPLICITPLANEWIDGETOBSERVER_H\n\n#include \"abstractwidgetobserver.h\"\n\nnamesp"
},
{
"path": "libs/vtkutils/interactor.cpp",
"chars": 2287,
"preview": "#include \"interactor.h\"\n#include \"../graph3d.h\"\n#include \"../postprocessor.h\"\n#include \"util.h\"\n\n#include <vtkRenderer.h"
},
{
"path": "libs/vtkutils/interactor.h",
"chars": 1045,
"preview": "#ifndef INTERACTOR_H\n#define INTERACTOR_H\n\n#define DEFAULT 0\n#define BOXCUTTER 1\n#define LINEPROBER 2\n#define PLANECUTTE"
},
{
"path": "libs/vtkutils/lineprober.cpp",
"chars": 9054,
"preview": "#include \"lineprober.h\"\n#include \"detail/util.h\"\n#include \"qcustomplot.h\"\n#include \"movelineinteractorstyle.h\"\n#include "
},
{
"path": "libs/vtkutils/lineprober.h",
"chars": 1083,
"preview": "#ifndef LINEPROBER_H\n#define LINEPROBER_H\n\n#include \"interactor.h\"\n\nclass vtkPointData;\nclass LineProberPrivate;\nclass L"
},
{
"path": "libs/vtkutils/linewidgetobserver.cpp",
"chars": 446,
"preview": "#include \"linewidgetobserver.h\"\n\n#include <vtkLineWidget.h>\n\nnamespace VtkUtils\n{\n\nLineWidgetObserver::LineWidgetObserve"
},
{
"path": "libs/vtkutils/linewidgetobserver.h",
"chars": 494,
"preview": "#ifndef LINEWIDGETOBSERVER_H\n#define LINEWIDGETOBSERVER_H\n\n#include \"abstractwidgetobserver.h\"\n\nclass vtkLineWidget;\n\nna"
},
{
"path": "libs/vtkutils/modeltovtktableconverter.cpp",
"chars": 1457,
"preview": "#include \"modeltovtktableconverter.h\"\n#include \"vtkutils.h\"\n\n#include <utils/tablemodel.h>\n#include <utils/utils.h>\n\n#in"
},
{
"path": "libs/vtkutils/modeltovtktableconverter.h",
"chars": 691,
"preview": "#ifndef MODELTOVTKTABLECONVERTER_H\n#define MODELTOVTKTABLECONVERTER_H\n\n#include <utils/signalledrunable.h>\n\n#include \"vt"
},
{
"path": "libs/vtkutils/moveactorinteractorstyle.cpp",
"chars": 3887,
"preview": "#include \"moveactorinteractorstyle.h\"\n\n#include <utils/utils.h>\n\n#include <vtkutils/vtkutils.h>\n\n#include <vtkObjectFact"
},
{
"path": "libs/vtkutils/moveactorinteractorstyle.h",
"chars": 1087,
"preview": "#ifndef MOVEACTORINTERACTORSTYLE_H\n#define MOVEACTORINTERACTORSTYLE_H\n\n#include <QObject>\n\n#include <vtkInteractorStyleT"
},
{
"path": "libs/vtkutils/movelineinteractorstyle.cpp",
"chars": 3045,
"preview": "#include \"movelineinteractorstyle.h\"\n#include \"../graph3d.h\"\n#include \"util.h\"\n\n#include <vtkObjectFactory.h>\n#include <"
},
{
"path": "libs/vtkutils/movelineinteractorstyle.h",
"chars": 947,
"preview": "#ifndef MOVELINEINTERACTORSTYLE_H\n#define MOVELINEINTERACTORSTYLE_H\n\n#include \"custominteractorstyle.h\"\n\nnamespace ComDa"
},
{
"path": "libs/vtkutils/movepointinteractorstyle.cpp",
"chars": 177,
"preview": "#include \"movepointinteractorstyle.h\"\n\nnamespace VtkUtils\n{\n\nMovePointInteractorStyle::MovePointInteractorStyle(QObject "
},
{
"path": "libs/vtkutils/movepointinteractorstyle.h",
"chars": 380,
"preview": "#ifndef MOVEPOINTINTERACTORSTYLE_H\n#define MOVEPOINTINTERACTORSTYLE_H\n\n#include <QObject>\n\n#include \"vtkutils_global.h\"\n"
},
{
"path": "libs/vtkutils/planecutter.cpp",
"chars": 15078,
"preview": "#include \"planecutter.h\"\n#include \"../graph3d.h\"\n#include \"util.h\"\n#include \"disablerotationinteractorstyle.h\"\n#include "
},
{
"path": "libs/vtkutils/planecutter.h",
"chars": 1292,
"preview": "#ifndef PLANECUTTER_H\n#define PLANECUTTER_H\n\n#include \"interactor.h\"\n\nclass vtkPolyData;\nclass PlaneCutterPrivate;\nclass"
},
{
"path": "libs/vtkutils/pointmover.cpp",
"chars": 3605,
"preview": "#include \"pointmover.h\"\n#include \"util.h\"\n#include \"movepointinteractorstyle.h\"\n#include \"../graph3d.h\"\n#include \"../pos"
},
{
"path": "libs/vtkutils/pointmover.h",
"chars": 835,
"preview": "#ifndef POINTMOVER_H\n#define POINTMOVER_H\n\n#include \"interactor.h\"\n\nclass PointMoverPrivate;\nclass PointMover : public I"
},
{
"path": "libs/vtkutils/pointstopolydataconverter.cpp",
"chars": 989,
"preview": "#include \"vtkutils.h\"\n#include \"pointstopolydataconverter.h\"\n\n#include <vtkPoints.h>\n#include <vtkDoubleArray.h>\n\nnamesp"
},
{
"path": "libs/vtkutils/pointstopolydataconverter.h",
"chars": 629,
"preview": "#ifndef POINTSTOPOLYDATACONVERTER_H\n#define POINTSTOPOLYDATACONVERTER_H\n\n#include <utils/point3f.h>\n#include <utils/sign"
},
{
"path": "libs/vtkutils/pointwidgetobserver.cpp",
"chars": 490,
"preview": "#include \"pointwidgetobserver.h\"\n\n#include <vtkPointWidget.h>\n\nnamespace VtkUtils\n{\n\nPointWidgetObserver::PointWidgetObs"
},
{
"path": "libs/vtkutils/pointwidgetobserver.h",
"chars": 480,
"preview": "#ifndef POINTWIDGETOBSERVER_H\n#define POINTWIDGETOBSERVER_H\n\n#include \"abstractwidgetobserver.h\"\n\nnamespace VtkUtils\n{\n\n"
},
{
"path": "libs/vtkutils/rendererslayoutalgo.h",
"chars": 7573,
"preview": "#ifndef RENDERERSLAYOUTALGO_H\n#define RENDERERSLAYOUTALGO_H\n\n#include <vtkRenderer.h>\n#include <QList>\n\nnamespace VtkUti"
},
{
"path": "libs/vtkutils/sliderwidgetobserver.cpp",
"chars": 640,
"preview": "#include \"sliderwidgetobserver.h\"\n\n#include <vtkSliderWidget.h>\n#include <vtkSliderRepresentation.h>\n\nnamespace VtkUtils"
},
{
"path": "libs/vtkutils/sliderwidgetobserver.h",
"chars": 478,
"preview": "#ifndef SLIDERWIDGETOBSERVER_H\n#define SLIDERWIDGETOBSERVER_H\n\n#include \"abstractwidgetobserver.h\"\n\nnamespace VtkUtils\n{"
},
{
"path": "libs/vtkutils/spherecutter.cpp",
"chars": 3870,
"preview": "#include \"spherecutter.h\"\n#include \"util.h\"\n#include \"../graph3d.h\"\n#include \"../postprocessor.h\"\n#include \"movepointint"
},
{
"path": "libs/vtkutils/spherecutter.h",
"chars": 837,
"preview": "#ifndef SPHERECUTTER_H\n#define SPHERECUTTER_H\n\n#include \"interactor.h\"\n\nclass SphereCutterPrivate;\nclass SphereCutter : "
},
{
"path": "libs/vtkutils/spherewidgetobserver.cpp",
"chars": 439,
"preview": "#include \"spherewidgetobserver.h\"\n\n#include <vtkSphereWidget.h>\n\nnamespace VtkUtils\n{\n\nSphereWidgetObserver::SphereWidge"
},
{
"path": "libs/vtkutils/spherewidgetobserver.h",
"chars": 476,
"preview": "#ifndef SPHEREWIDGETOBSERVER_H\n#define SPHEREWIDGETOBSERVER_H\n\n#include \"abstractwidgetobserver.h\"\n\nnamespace VtkUtils\n{"
},
{
"path": "libs/vtkutils/surface.cpp",
"chars": 1412,
"preview": "#include \"surface.h\"\n\n#include <vtkutils/vtkutils.h>\n\n#include <vtkDelaunay2D.h>\n#include <vtkPolyDataMapper.h>\n#include"
},
{
"path": "libs/vtkutils/surface.h",
"chars": 576,
"preview": "#ifndef SURFACE_H\n#define SURFACE_H\n\n#include \"vtkwidget.h\"\n#include \"vtkutils_global.h\"\n\n#include <utils/point3f.h>\n\ncl"
},
{
"path": "libs/vtkutils/vtkUnstructuredGridRelevantPointsFilter.cpp",
"chars": 6169,
"preview": "/*=========================================================================\n\n Program: Visualization Toolkit\n Module"
},
{
"path": "libs/vtkutils/vtkUnstructuredGridRelevantPointsFilter.h",
"chars": 3482,
"preview": "/*=========================================================================\n\n Program: Visualization Toolkit\n Module"
},
{
"path": "libs/vtkutils/vtkplot2dwidget.cpp",
"chars": 611,
"preview": "#include \"vtkplot2dwidget.h\"\n\n#include <vtkutils/vtkutils.h>\n\n#include <vtkChartXY.h>\n#include <vtkContextScene.h>\n#incl"
},
{
"path": "libs/vtkutils/vtkplot2dwidget.h",
"chars": 499,
"preview": "#ifndef VTKPLOT2DWIDGET_H\n#define VTKPLOT2DWIDGET_H\n\n#include \"vtkplotwidget.h\"\n#include \"vtkutils_global.h\"\n\nnamespace "
},
{
"path": "libs/vtkutils/vtkplot3dwidget.cpp",
"chars": 737,
"preview": "#include \"vtkplot3dwidget.h\"\n#include \"vtkutils.h\"\n\n#include <vtkChartXYZ.h>\n#include <vtkContextScene.h>\n#include <vtkC"
},
{
"path": "libs/vtkutils/vtkplot3dwidget.h",
"chars": 499,
"preview": "#ifndef VTKPLOT3DWIDGET_H\n#define VTKPLOT3DWIDGET_H\n\n#include \"vtkplotwidget.h\"\n#include \"vtkutils_global.h\"\n\nnamespace "
},
{
"path": "libs/vtkutils/vtkplotpiewidget.cpp",
"chars": 622,
"preview": "#include \"vtkplotpiewidget.h\"\n\n#include <vtkutils/vtkutils.h>\n\n#include <vtkChartPie.h>\n#include <vtkContextScene.h>\n#in"
},
{
"path": "libs/vtkutils/vtkplotpiewidget.h",
"chars": 479,
"preview": "#ifndef VTKPLOTPIEWIDGET_H\n#define VTKPLOTPIEWIDGET_H\n\n#include \"vtkplotwidget.h\"\n\nnamespace VtkUtils\n{\nclass VtkPlotPie"
},
{
"path": "libs/vtkutils/vtkplotwidget.cpp",
"chars": 1225,
"preview": "#include \"vtkplotwidget.h\"\n\n#include <vtkutils/vtkutils.h>\n\n#include <vtkContextView.h>\n#include <vtkChartXY.h>\n#include"
},
{
"path": "libs/vtkutils/vtkplotwidget.h",
"chars": 980,
"preview": "#ifndef VTKPLOTWIDGET_H\n#define VTKPLOTWIDGET_H\n\n#define vtkRenderingCore_AUTOINIT 3(vtkInteractionStyle,vtkRenderingFre"
},
{
"path": "libs/vtkutils/vtkutils.cpp",
"chars": 2138,
"preview": "#include \"vtkutils.h\"\n#include \"actorexporter.h\"\n\n#include <vtkDiskSource.h>\n#include <vtkPlaneSource.h>\n#include <vtkAc"
},
{
"path": "libs/vtkutils/vtkutils.h",
"chars": 3720,
"preview": "#ifndef VTKUTILS_H\n#define VTKUTILS_H\n\n#include <vtkSmartPointer.h>\n#include <vtkPolyDataMapper.h>\n#include <vtkPoints.h"
},
{
"path": "libs/vtkutils/vtkutils.pri",
"chars": 856,
"preview": "INCLUDEPATH += $$PWD\nDEPENDPATH += $$PWD\n\nHEADERS += \\\n# $$PWD/interactor.h \\\n# $$PWD/boxcutter.h \\\n"
},
{
"path": "libs/vtkutils/vtkutils.pro",
"chars": 2154,
"preview": "INCLUDEPATH += $$PWD\nDEPENDPATH += $$PWD\n\ninclude(../../lib.pri)\ninclude(../../vtk_inc.pri)\n\nDEFINES += VTKUTILS_LIBRARY"
},
{
"path": "libs/vtkutils/vtkutils_dependencies.pri",
"chars": 41,
"preview": "LIB_NAME = vtkutils\nLIB_DEPENDS += utils\n"
},
{
"path": "libs/vtkutils/vtkutils_global.h",
"chars": 231,
"preview": "#ifndef VTKUTILS_GLOBAL_H\n#define VTKUTILS_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(VTKUTILS_LIBRARY)\n# defin"
},
{
"path": "libs/vtkutils/vtkwidget.cpp",
"chars": 7885,
"preview": "#include \"vtkwidget.h\"\n\n#include <vtkRenderWindow.h>\n#include <vtkActor.h>\n#include <vtkRenderer.h>\n#include <vtkRendere"
},
{
"path": "libs/vtkutils/vtkwidget.h",
"chars": 1491,
"preview": "#ifndef VTKWIDGET_H\n#define VTKWIDGET_H\n\n#define vtkRenderingCore_AUTOINIT 3(vtkInteractionStyle,vtkRenderingFreeType,vt"
},
{
"path": "libs/widgets/colorcombobox.cpp",
"chars": 5481,
"preview": "/*! \\file\n* \\brief Picture基本界面\n* \\author 杨永盛 谭立方\n* \\date 2013\n* \\version 1.0\n* \\copyright 2013 PERAGlobal Ltd. All "
},
{
"path": "libs/widgets/colorcombobox.h",
"chars": 1290,
"preview": "/*! \\file\n* \\brief Picture基本界面\n* \\author 杨永盛 谭立方\n* \\date 2013\n* \\version 1.0\n* \\copyright 2013 PERAGlobal Ltd. All "
},
{
"path": "libs/widgets/colorpushbutton.cpp",
"chars": 1425,
"preview": "/*! \\file\n* \\brief Picture基本界面\n* \\author 杨永盛 谭立方\n* \\date 2013\n* \\version 1.0\n* \\copyright 2013 PERAGlobal Ltd. All "
},
{
"path": "libs/widgets/colorpushbutton.h",
"chars": 893,
"preview": "/*! \\file\n* \\brief Picture基本界面\n* \\author 杨永盛 谭立方\n* \\date 2013\n* \\version 1.0\n* \\copyright 2013 PERAGlobal Ltd. All "
},
{
"path": "libs/widgets/fontpushbutton.cpp",
"chars": 703,
"preview": "#include \"fontpushbutton.h\"\n\n#include <QFontDialog>\n\nnamespace Widgets\n{\n\nFontPushButton::FontPushButton(QWidget *parent"
},
{
"path": "libs/widgets/fontpushbutton.h",
"chars": 477,
"preview": "#ifndef FONTPUSHBUTTON_H\n#define FONTPUSHBUTTON_H\n\n#include <QPushButton>\n\n#include \"widgets_global.h\"\n\nnamespace Widget"
},
{
"path": "libs/widgets/gradientcombobox.cpp",
"chars": 17868,
"preview": "#include \"gradientcombobox.h\"\n\n#include <QListWidget>\n#include <QLabel>\n#include <QPainter>\n#include <QHBoxLayout>\n#incl"
},
{
"path": "libs/widgets/gradientcombobox.h",
"chars": 1021,
"preview": "#ifndef GRADIENTCOMBOBOX_H\n#define GRADIENTCOMBOBOX_H\n\n#include <QComboBox>\n\n#include \"widgets_global.h\"\n\nclass QListWid"
},
{
"path": "libs/widgets/imagecompareboard.cpp",
"chars": 2436,
"preview": "#include \"imagecompareboard.h\"\n\n#include <QLabel>\n#include <QScrollArea>\n#include <QSplitter>\n#include <QHBoxLayout>\n#in"
},
{
"path": "libs/widgets/imagecompareboard.h",
"chars": 652,
"preview": "#ifndef IMAGECOMPAREBOARD_H\n#define IMAGECOMPAREBOARD_H\n\n#include <QWidget>\n\n#include \"imagecompareboard.h\"\n#include \"wi"
},
{
"path": "libs/widgets/penstylebox.cpp",
"chars": 2014,
"preview": "/*! \\file\n* \\brief Picture基本界面\n* \\author 杨永盛 谭立方\n* \\date 2013\n* \\version 1.0\n* \\copyright 2013 PERAGlobal Ltd. All "
},
{
"path": "libs/widgets/penstylebox.h",
"chars": 903,
"preview": "/*! \\file\n* \\brief Picture基本界面\n* \\author 杨永盛 谭立方\n* \\date 2013\n* \\version 1.0\n* \\copyright 2013 PERAGlobal Ltd. All "
},
{
"path": "libs/widgets/qtcolorpicker.cpp",
"chars": 29311,
"preview": "/****************************************************************************\n**\n** This file is part of a Qt Solutions "
},
{
"path": "libs/widgets/qtcolorpicker.h",
"chars": 3523,
"preview": "/****************************************************************************\n**\n** This file is part of a Qt Solutions "
},
{
"path": "libs/widgets/tagwidget.cpp",
"chars": 1341,
"preview": "#include \"tagwidget.h\"\n\n#include <3dparty/flowlayout.h>\n\n#include <QLabel>\n\nnamespace Widgets\n{\n\nclass TagWidgetPrivate\n"
},
{
"path": "libs/widgets/tagwidget.h",
"chars": 520,
"preview": "#ifndef TAGWIDGET_H\n#define TAGWIDGET_H\n\n#include <QWidget>\n\n#include \"widgets_global.h\"\n\nnamespace Widgets\n{\nclass TagW"
},
{
"path": "libs/widgets/widgets.pro",
"chars": 520,
"preview": "INCLUDEPATH += $$PWD\nDEPENDPATH += $$PWD\n\ninclude(../../lib.pri)\n\nDEFINES += WIDGETS_LIBRARY\n\nHEADERS += \\ \n imagecom"
},
{
"path": "libs/widgets/widgets_dependencies.pri",
"chars": 42,
"preview": "LIB_NAME = widgets\nLIB_DEPENDS += 3dparty\n"
},
{
"path": "libs/widgets/widgets_global.h",
"chars": 226,
"preview": "#ifndef WIDGETS_GLOBAL_H\n#define WIDGETS_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(WIDGETS_LIBRARY)\n# define W"
},
{
"path": "plugin.pri",
"chars": 524,
"preview": "include($$replace(_PRO_FILE_PWD_, ([^/]+$), \\\\1/\\\\1_dependencies.pri))\nTARGET = $$PLUGIN_NAME\n\ninclude(demos.pri)\n\nisEmp"
},
{
"path": "plugins/animation/animation.pro",
"chars": 335,
"preview": "include(../../vtk_inc.pri)\ninclude(../../plugin.pri)\n\nHEADERS += animationplugin.h \\\n basicanimationwindow.h \\\n an"
},
{
"path": "plugins/animation/animation_dependencies.pri",
"chars": 71,
"preview": "PLUGIN_NAME = animation\nLIB_DEPENDS += utils \\\n vtkutils\n"
},
{
"path": "plugins/animation/animationplugin.cpp",
"chars": 597,
"preview": "#include \"animationplugin.h\"\n#include \"basicanimationwindow.h\"\n#include \"animationscenewindow.h\"\n\n#include <QMap>\n\nAnima"
},
{
"path": "plugins/animation/animationplugin.h",
"chars": 446,
"preview": "#ifndef ANIMATIONPLUGIN_H\n#define ANIMATIONPLUGIN_H\n\n#include <utils/ivtkplugin.h>\n\nclass AnimationPlugin : public QObje"
},
{
"path": "plugins/animation/animationscenewindow.cpp",
"chars": 7064,
"preview": "#include \"animationscenewindow.h\"\n#include \"ui_animationscenewindow.h\"\n\n#include <vtkutils/vtkwidget.h>\n#include <vtkuti"
},
{
"path": "plugins/animation/animationscenewindow.h",
"chars": 732,
"preview": "#ifndef ANIMATIONSCENEWINDOW_H\n#define ANIMATIONSCENEWINDOW_H\n\n#include <QWidget>\n\n#include <vtkSmartPointer.h>\n\nnamespa"
},
{
"path": "plugins/animation/animationscenewindow.ui",
"chars": 2178,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>AnimationSceneWindow</class>\n <widget class=\"QWidget\" "
},
{
"path": "plugins/animation/basicanimationwindow.cpp",
"chars": 4478,
"preview": "#include \"basicanimationwindow.h\"\n#include \"ui_basicanimationwindow.h\"\n\n#include <vtkutils/vtkwidget.h>\n#include <vtkuti"
},
{
"path": "plugins/animation/basicanimationwindow.h",
"chars": 1037,
"preview": "#ifndef BASICANIMATIONWINDOW_H\n#define BASICANIMATIONWINDOW_H\n\n#include <QWidget>\n\n#include <vtkSmartPointer.h>\n\nnamespa"
},
{
"path": "plugins/animation/basicanimationwindow.ui",
"chars": 2959,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>BasicAnimationWindow</class>\n <widget class=\"QWidget\" "
},
{
"path": "plugins/animation/res.qrc",
"chars": 133,
"preview": "<RCC>\n <qresource prefix=\"/\">\n <file alias=\"earth_surface\">images/texture_earth_surface.jpg</file>\n </qreso"
},
{
"path": "plugins/buildinsources/buildinsources.pro",
"chars": 234,
"preview": "include(../../vtk_inc.pri)\ninclude(../../plugin.pri)\n\nHEADERS += buildinsourcesplugin.h \\\n texturewindow.h\n\nSOURCES +"
},
{
"path": "plugins/buildinsources/buildinsources_dependencies.pri",
"chars": 53,
"preview": "PLUGIN_NAME = buildinsources\nLIB_DEPENDS += vtkutils\n"
},
{
"path": "plugins/buildinsources/buildinsourcesplugin.cpp",
"chars": 3923,
"preview": "#include \"buildinsourcesplugin.h\"\n#include \"texturewindow.h\"\n\n#include <vtkutils/vtkutils.h>\n#include <vtkutils/vtkwidge"
},
{
"path": "plugins/buildinsources/buildinsourcesplugin.h",
"chars": 477,
"preview": "#ifndef BUILDINSOURCESPLUGIN_H\n#define BUILDINSOURCESPLUGIN_H\n\n#include <utils/ivtkplugin.h>\n\nclass BuildinSourcePlugin "
},
{
"path": "plugins/buildinsources/res.qrc",
"chars": 1467,
"preview": "<RCC>\n <qresource prefix=\"/\">\n <file alias=\"earthclouds\">images/earthclouds.png</file>\n <file alias=\"te"
},
{
"path": "plugins/buildinsources/texturewindow.cpp",
"chars": 6870,
"preview": "#include \"texturewindow.h\"\n#include \"ui_texturewindow.h\"\n\n#include <vtkutils/vtkutils.h>\n#include <vtkutils/vtkwidget.h>"
},
{
"path": "plugins/buildinsources/texturewindow.h",
"chars": 948,
"preview": "#ifndef TEXTUREWINDOW_H\n#define TEXTUREWINDOW_H\n\n#include <QWidget>\n\n#include <vtkSmartPointer.h>\n\nnamespace Ui\n{\n cl"
},
{
"path": "plugins/buildinsources/texturewindow.ui",
"chars": 3122,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>TextureWindow</class>\n <widget class=\"QWidget\" name=\"T"
},
{
"path": "plugins/buildinwidgets/anglewidgetconfig.ui",
"chars": 3279,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>AngleWidgetConfig</class>\n <widget class=\"QWidget\" nam"
},
{
"path": "plugins/buildinwidgets/anglewidgetwindow.cpp",
"chars": 1381,
"preview": "#include \"anglewidgetwindow.h\"\n#include \"ui_anglewidgetconfig.h\"\n#include \"ui_basewidgetwindow.h\"\n\n#include <vtkutils/vt"
},
{
"path": "plugins/buildinwidgets/anglewidgetwindow.h",
"chars": 780,
"preview": "#ifndef ANGLEWIDGETWINDOW_H\n#define ANGLEWIDGETWINDOW_H\n\n#include \"basewidgetwindow.h\"\n\nnamespace Ui\n{\n class AngleWi"
},
{
"path": "plugins/buildinwidgets/basewidgetwindow.cpp",
"chars": 735,
"preview": "#include \"basewidgetwindow.h\"\n#include \"ui_basewidgetwindow.h\"\n\n#include <vtkutils/vtkwidget.h>\n#include <vtkutils/vtkut"
},
{
"path": "plugins/buildinwidgets/basewidgetwindow.h",
"chars": 878,
"preview": "#ifndef BASEWIDGETWINDOW_H\n#define BASEWIDGETWINDOW_H\n\n#include <QWidget>\n\n#include <vtkSmartPointer.h>\n\nnamespace Ui\n{\n"
},
{
"path": "plugins/buildinwidgets/basewidgetwindow.ui",
"chars": 1437,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>BaseWidgetWindow</class>\n <widget class=\"QWidget\" name"
},
{
"path": "plugins/buildinwidgets/buildinwidgets.pro",
"chars": 813,
"preview": "include(../../vtk_inc.pri)\ninclude(../../plugin.pri)\n\nHEADERS += buildinwidgetsplugin.h \\\n basewidgetwindow.h \\\n d"
},
{
"path": "plugins/buildinwidgets/buildinwidgets_dependencies.pri",
"chars": 101,
"preview": "PLUGIN_NAME = buildinwidgets\nLIB_DEPENDS += utils \\\n vtkutils \\\n widgets\n"
},
{
"path": "plugins/buildinwidgets/buildinwidgetsplugin.cpp",
"chars": 4004,
"preview": "#include \"buildinwidgetsplugin.h\"\n#include \"distancewidgetwindow.h\"\n#include \"anglewidgetwindow.h\"\n#include \"sliderwidge"
},
{
"path": "plugins/buildinwidgets/buildinwidgetsplugin.h",
"chars": 481,
"preview": "#ifndef BUILDINWIDGETSPLUGIN_H\n#define BUILDINWIDGETSPLUGIN_H\n\n#include <utils/ivtkplugin.h>\n\nclass BuildinWidgetsPlugin"
},
{
"path": "plugins/buildinwidgets/camerawidgetconfig.ui",
"chars": 401,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>CameraWidgetConfig</class>\n <widget class=\"QWidget\" na"
},
{
"path": "plugins/buildinwidgets/camerawidgetwindow.cpp",
"chars": 939,
"preview": "#include \"camerawidgetwindow.h\"\n#include \"ui_basewidgetwindow.h\"\n#include \"ui_camerawidgetconfig.h\"\n\n#include <vtkutils/"
},
{
"path": "plugins/buildinwidgets/camerawidgetwindow.h",
"chars": 579,
"preview": "#ifndef CAMERAWIDGETWINDOW_H\n#define CAMERAWIDGETWINDOW_H\n\n#include \"basewidgetwindow.h\"\n\nnamespace Ui\n{\n class Camer"
},
{
"path": "plugins/buildinwidgets/contourwidgetconfig.ui",
"chars": 1315,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>ContourWidgetConfig</class>\n <widget class=\"QWidget\" n"
},
{
"path": "plugins/buildinwidgets/contourwidgetwindow.cpp",
"chars": 4755,
"preview": "#include \"contourwidgetwindow.h\"\n#include \"ui_contourwidgetconfig.h\"\n#include \"ui_basewidgetwindow.h\"\n\n#include <utils/s"
},
{
"path": "plugins/buildinwidgets/contourwidgetwindow.h",
"chars": 693,
"preview": "#ifndef CONTOURWIDGETWINDOW_H\n#define CONTOURWIDGETWINDOW_H\n\n#include \"basewidgetwindow.h\"\n\nnamespace Ui\n{\n class Con"
},
{
"path": "plugins/buildinwidgets/distancewidgetconfig.ui",
"chars": 2779,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>DistanceWidgetConfig</class>\n <widget class=\"QWidget\" "
},
{
"path": "plugins/buildinwidgets/distancewidgetwindow.cpp",
"chars": 5833,
"preview": "#include \"distancewidgetwindow.h\"\n#include \"ui_distancewidgetconfig.h\"\n#include \"ui_basewidgetwindow.h\"\n\n#include <utils"
},
{
"path": "plugins/buildinwidgets/distancewidgetwindow.h",
"chars": 1358,
"preview": "#ifndef DISTANCEWIDGETWINDOW_H\n#define DISTANCEWIDGETWINDOW_H\n\n#include \"basewidgetwindow.h\"\n\nnamespace Ui\n{\n class D"
},
{
"path": "plugins/buildinwidgets/scalarbarwidgetconfig.ui",
"chars": 2964,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>ScalarBarWidgetConfig</class>\n <widget class=\"QWidget\""
},
{
"path": "plugins/buildinwidgets/scalarbarwidgetwindow.cpp",
"chars": 3796,
"preview": "#include \"scalarbarwidgetwindow.h\"\n#include \"ui_scalarbarwidgetconfig.h\"\n#include \"ui_basewidgetwindow.h\"\n\n#include <uti"
},
{
"path": "plugins/buildinwidgets/scalarbarwidgetwindow.h",
"chars": 951,
"preview": "#ifndef SCALARBARWIDGETWINDOW_H\n#define SCALARBARWIDGETWINDOW_H\n\n#include \"basewidgetwindow.h\"\n\nnamespace Ui\n{\n class"
},
{
"path": "plugins/buildinwidgets/sliderwidgetconfig.ui",
"chars": 2292,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>SliderWidgetConfig</class>\n <widget class=\"QWidget\" na"
},
{
"path": "plugins/buildinwidgets/sliderwidgetwindow.cpp",
"chars": 3952,
"preview": "#include \"sliderwidgetwindow.h\"\n#include \"ui_sliderwidgetconfig.h\"\n#include \"ui_basewidgetwindow.h\"\n\n#include <utils/sig"
},
{
"path": "plugins/buildinwidgets/sliderwidgetwindow.h",
"chars": 1179,
"preview": "#ifndef SLIDERWIDGETWINDOW_H\n#define SLIDERWIDGETWINDOW_H\n\n#include \"basewidgetwindow.h\"\n\nnamespace Ui\n{\n class Slide"
},
{
"path": "plugins/buildinwidgets/textwidgetconfig.ui",
"chars": 2766,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>TextWidgetConfig</class>\n <widget class=\"QWidget\" name"
},
{
"path": "plugins/buildinwidgets/textwidgetwindow.cpp",
"chars": 1453,
"preview": "#include \"textwidgetwindow.h\"\n#include \"ui_textwidgetconfig.h\"\n#include \"ui_basewidgetwindow.h\"\n\n#include <utils/signalb"
},
{
"path": "plugins/buildinwidgets/textwidgetwindow.h",
"chars": 790,
"preview": "#ifndef TEXTWIDGETWINDOW_H\n#define TEXTWIDGETWINDOW_H\n\n#include \"basewidgetwindow.h\"\n\nnamespace Ui\n{\n class TextWidge"
},
{
"path": "plugins/camera/axesactorwindow.cpp",
"chars": 1702,
"preview": "#include \"axesactorwindow.h\"\n#include \"ui_axesactorwindow.h\"\n\n#include <vtkutils/vtkwidget.h>\n#include <vtkutils/vtkutil"
},
{
"path": "plugins/camera/axesactorwindow.h",
"chars": 422,
"preview": "#ifndef AXESACTORWINDOW_H\n#define AXESACTORWINDOW_H\n\n#include <QWidget>\n\nnamespace Ui\n{\n class AxesActorWindow;\n}\n\nna"
},
{
"path": "plugins/camera/axesactorwindow.ui",
"chars": 551,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>AxesActorWindow</class>\n <widget class=\"QWidget\" name="
},
{
"path": "plugins/camera/camera.pro",
"chars": 322,
"preview": "include(../../vtk_inc.pri)\ninclude(../../plugin.pri)\n\nHEADERS += cameraplugin.h \\\n mainwidget.h \\\n camerawindow.h "
},
{
"path": "plugins/camera/camera_dependencies.pri",
"chars": 68,
"preview": "PLUGIN_NAME = camera\nLIB_DEPENDS += utils \\\n vtkutils\n"
},
{
"path": "plugins/camera/cameraplugin.cpp",
"chars": 575,
"preview": "#include \"cameraplugin.h\"\n#include \"mainwidget.h\"\n#include \"camerawindow.h\"\n#include \"axesactorwindow.h\"\n\n#include <QMap"
},
{
"path": "plugins/camera/cameraplugin.h",
"chars": 425,
"preview": "#ifndef CAMERAPLUGIN_H\n#define CAMERAPLUGIN_H\n\n#include <utils/ivtkplugin.h>\n\nclass CameraPlugin : public QObject, publi"
},
{
"path": "plugins/camera/camerawindow.cpp",
"chars": 3323,
"preview": "#include \"camerawindow.h\"\n#include \"ui_camerawindow.h\"\n\n#include <vtkutils/vtkutils.h>\n#include <vtkutils/vtkwidget.h>\n\n"
},
{
"path": "plugins/camera/camerawindow.h",
"chars": 714,
"preview": "#ifndef CAMERAWINDOW_H\n#define CAMERAWINDOW_H\n\n#include <QWidget>\n\n#include <vtkSmartPointer.h>\n\nnamespace Ui {\nclass Ca"
},
{
"path": "plugins/camera/camerawindow.ui",
"chars": 545,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>CameraWindow</class>\n <widget class=\"QWidget\" name=\"Ca"
},
{
"path": "plugins/camera/mainwidget.cpp",
"chars": 577,
"preview": "#include \"mainwidget.h\"\n#include \"ui_mainwidget.h\"\n\n#include <vtkutils/vtkutils.h>\n#include <vtkutils/vtkwidget.h>\n\n#inc"
}
]
// ... and 308 more files (download for full content)
About this extraction
This page contains the full source code of the kimtaikee/QVTKDemo GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 508 files (2.2 MB), approximately 595.4k tokens, and a symbol index with 748 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.