Commit 93f82594 authored by Aron Helser's avatar Aron Helser
Browse files

Lights: add GUI test, add/remove light

Add documentation on how to add a tests.

Also remove debugging printout.
parent 54eba32d
......@@ -116,6 +116,7 @@ SET (TESTS_WITH_INLINE_COMPARES
${CMAKE_CURRENT_SOURCE_DIR}/DisconnectAndSaveAnimation.xml
${CMAKE_CURRENT_SOURCE_DIR}/Ensemble.xml
${CMAKE_CURRENT_SOURCE_DIR}/FileSeries.xml
${CMAKE_CURRENT_SOURCE_DIR}/LightAddRemove.xml
${CMAKE_CURRENT_SOURCE_DIR}/LineChartSelection.xml
${CMAKE_CURRENT_SOURCE_DIR}/LoadStateMultiView.xml
${CMAKE_CURRENT_SOURCE_DIR}/LogColorMap.xml
......
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuTools" />
<pqevent object="pqClientMainWindow/menubar/menuTools" command="activate" arguments="actionTesting_Window_Size_Custom" />
<pqevent object="pqClientMainWindow/pqLockViewSizeCustomDialog/Width" command="set_string" arguments="400" />
<pqevent object="pqClientMainWindow/pqLockViewSizeCustomDialog/Height" command="set_string" arguments="400" />
<pqevent object="pqClientMainWindow/pqLockViewSizeCustomDialog/ButtonBox/1QPushButton0" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="SphereSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mousePress" arguments="1,1,0,12,50" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseMove" arguments="1,0,0,11,386" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseRelease" arguments="1,0,0,11,386" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/SearchBox/AdvancedButton" command="set_boolean" arguments="true" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/ViewFrame/ProxyPanel/LightsEditor/1QPushButton0" command="activate" arguments="" />
<pqevent object="LightsEditor/LightKit" command="mousePress" arguments="1,1,0,71,12" />
<pqevent object="LightsEditor/LightKit" command="mouseRelease" arguments="1,0,0,71,12" />
<pqevent object="LightsEditor/Close" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/addLight" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget0/DiffuseColor/ColorButton" command="setChosenColor" arguments="10,10,255" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.679688,0.476563,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.4625,0.478516,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.4625,0.478516,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="keyEvent" arguments="6:16777248:33554432::0:1" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.564063,0.457031,2,2,33554432)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.378125,0.449219,2,0,33554432)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.378125,0.449219,2,0,33554432)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="keyEvent" arguments="7:16777248:0::0:1" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/addLight" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget1/Positional/ComboBox" command="activated" arguments="positional" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget1/DiffuseColor/ColorButton" command="setChosenColor" arguments="7,255,3" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget1/SyncToCamera/0QPushButton0" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget1/ConeAngle/DoubleRangeWidget/LineEdit" command="set_string" arguments="25" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget1/ConeAngle/DoubleRangeWidget/LineEdit" command="set_string" arguments="25" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget1/ConeAngle/DoubleRangeWidget/LineEdit" command="key" arguments="16777220" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget1/ConeAngle/DoubleRangeWidget/LineEdit" command="key" arguments="16777220" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.384375,0.416016,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.482812,0.441406,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.482812,0.441406,1,0,0)" />
<pqevent object="" command="comment" arguments="two lights, green and blue" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/LightAddRemove1.png" width="400" height="400" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget0/RemoveLight/0QPushButton0" command="activate" arguments="" />
<pqevent object="" command="comment" arguments="Remove blue, green remains" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget0/LightType/ComboBox" command="activated" arguments="headlight" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget0/Positional/ComboBox" command="activated" arguments="directional" />
<pqevent object="pqClientMainWindow/lightInspectorDock/lightInspectorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/0pqProxyWidget0/Positional/ComboBox" command="activated" arguments="positional" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/LightAddRemove2.png" width="400" height="400" />
</pqevents>
......@@ -121,8 +121,7 @@ cases, being your topic name with the issue number.
$ git commit
Caveats:
* To add data follow [these instructions](https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md),
from VTK.
* To add data follow these [vtk instructions][].
Commit messages must contain a brief description as the first line
and a more detailed description of what the commit contains. If
......@@ -133,6 +132,22 @@ cases, being your topic name with the issue number.
bug is described in the bug tracker, the commit message must
contain a reference to the bug number.
4. Add some tests
* Start `paraview.exe -dr` to ignore prefs (disable registry)
* Choose `Tools .. Record Test` to start.
* Choose `Tools .. Lock View Size Custom...` - a 400x400 window works well.
* Perform actions in the GUI that exercise your feature. Stop recording.
* Put the resulting XML file into `Applications/ParaView/Testing/XML`
* Add it to CMakeLists.txt, probably in a TESTS_WITH_BASELINES section
* you can manually add `<pqcompareview>` for multiple image comparisons, then add to the TESTS_WITH_INLINE_COMPARES section
* Follow the [vtk instructions][] to add the baseline images, which live in `Testing/Data/Baseline/`.
* Add all testing files to your topic.
Some background is in the [testing design wiki](https://www.paraview.org/Wiki/Testing_design).
[vtk instructions]: https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md
Share a Topic
-------------
......
......@@ -2441,12 +2441,10 @@ void vtkPVRenderView::SetLightType(int val)
//----------------------------------------------------------------------------
void vtkPVRenderView::AddLight(vtkLight* newLight)
{
cerr << "ADDING LIGHT " << newLight << endl;
this->GetRenderer()->AddLight(newLight);
}
void vtkPVRenderView::RemoveLight(vtkLight* oldLight)
{
cerr << "REMOVING LIGHT " << oldLight << endl;
this->GetRenderer()->RemoveLight(oldLight);
}
......
5ad9915d18c1d4fdf5e43e2f3dc72ee3
607ba1035a88404b74c4c398eee8c2a3
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment