Commit d4e39c46 authored by Mathieu Westphal's avatar Mathieu Westphal
Browse files

Correcting DoubleClick related Testing

parent 1f803a27
......@@ -13,12 +13,12 @@
<pqevent object="pqClientMainWindow/pqPresetDialog/gradients" command="mouseRelease" arguments="1,0,0,228,13,/6:0" />
<pqevent object="pqClientMainWindow/pqPresetDialog/apply" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pqPresetDialog/close" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mousePress" arguments="(0.402516,0.525,1,1,0)" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mouseMove" arguments="(0.402516,0.525,1,0,0)" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mouseRelease" arguments="(0.402516,0.525,1,0,0)" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mouseDblClick" arguments="1,1,0,118,18" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mouseMove" arguments="(0.402516,0.525,1,0,0)" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mouseRelease" arguments="(0.402516,0.525,1,0,0)" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mousePress" arguments="(0.402516,0.425,1,1,0)" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mouseRelease" arguments="(0.402516,0.425,1,0,0)" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mousePress" arguments="(0.347305,0.425,1,1,0)" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mouseRelease" arguments="(0.347305,0.425,1,0,0)" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mouseDblClick" arguments="(0.347305,0.425,1,1,0)" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QVTKWidget0" command="mouseRelease" arguments="(0.347305,0.425,1,0,0)" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QColorDialog0" command="setChosenColor" arguments="0,85,0" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/ColorOpacityEditor/ColorEditor/1QColorDialog0" command="done" arguments="1" />
<pqevent object="pqClientMainWindow/colorMapEditorDock/colorMapEditorPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/Properties/NanColor/ColorButton" command="setChosenColor" arguments="170,85,0" />
......
......@@ -85,24 +85,14 @@
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqQVTKWidget0" command="mousePress" arguments="(0.285714,0.669643,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqQVTKWidget0" command="mouseMove" arguments="(0.357143,0.65625,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqQVTKWidget0" command="mouseRelease" arguments="(0.357143,0.65625,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mousePress" arguments="(0.8625,0.276786,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseMove" arguments="(0.8625,0.276786,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseRelease" arguments="(0.8625,0.276786,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mousePress" arguments="(0.8625,0.276786,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseMove" arguments="(0.8625,0.276786,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseRelease" arguments="(0.8625,0.276786,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mousePress" arguments="(0.8625,0.276786,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseMove" arguments="(0.8625,0.276786,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseRelease" arguments="(0.8625,0.276786,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseDblClick" arguments="1,1,0,69,62" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseMove" arguments="(0.8625,0.276786,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseRelease" arguments="(0.8625,0.276786,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mousePress" arguments="(0.875,0.723214,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseMove" arguments="(0.875,0.723214,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseRelease" arguments="(0.875,0.723214,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseDblClick" arguments="1,1,0,70,162" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseMove" arguments="(0.875,0.723214,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseRelease" arguments="(0.875,0.723214,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mousePress" arguments="(0.8875,0.275536,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseRelease" arguments="(0.8875,0.275536,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseDblClick" arguments="(0.8875,0.275536,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseRelease" arguments="(0.8875,0.275536,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mousePress" arguments="(0.8625,0.736607,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseRelease" arguments="(0.8625,0.736607,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseDblClick" arguments="(0.8625,0.736607,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport/1pqMultiSliceAxisWidget0/1QVTKWidget0" command="mouseRelease" arguments="(0.8625,0.736607,1,0,0)" />
<pqevent object="pqClientMainWindow/variableToolbar/actionScalarBarVisibility" command="set_boolean" arguments="false" />
<pqevent object="pqClientMainWindow/axesToolbar/actionShowOrientationAxes" command="set_boolean" arguments="false" />
</pqevents>
......@@ -55,7 +55,8 @@ bool pqQVTKWidgetEventPlayer::playEvent(
QVTKOpenGLSimpleWidget* qvtkWidget = qobject_cast<QVTKOpenGLSimpleWidget*>(Object);
if (baseWidget || qvtkWidget)
{
if (Command == "mousePress" || Command == "mouseRelease" || Command == "mouseMove")
if (Command == "mousePress" || Command == "mouseRelease" || Command == "mouseMove" ||
Command == "mouseDblClick")
{
QRegExp mouseRegExp("\\(([^,]*),([^,]*),([^,]),([^,]),([^,]*)\\)");
if (mouseRegExp.indexIn(Arguments) != -1)
......@@ -71,9 +72,24 @@ bool pqQVTKWidgetEventPlayer::playEvent(
Qt::MouseButtons buttons = static_cast<Qt::MouseButton>(v.toInt());
v = mouseRegExp.cap(5);
Qt::KeyboardModifiers keym = static_cast<Qt::KeyboardModifier>(v.toInt());
QEvent::Type type = (Command == "mousePress")
? QEvent::MouseButtonPress
: ((Command == "mouseMove") ? QEvent::MouseMove : QEvent::MouseButtonRelease);
QEvent::Type type = QEvent::None;
if (Command == "mousePress")
{
type = QEvent::MouseButtonPress;
}
else if (Command == "mouseRelease")
{
type = QEvent::MouseButtonRelease;
}
else if (Command == "mouseMove")
{
type = QEvent::MouseMove;
}
else if (Command == "mouseDblClick")
{
type = QEvent::MouseButtonDblClick;
}
QMouseEvent e(type, QPoint(x, y), button, buttons, keym);
if (baseWidget != nullptr)
......
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