Commit 13136187 authored by Clinton Stimpson's avatar Clinton Stimpson
Browse files

Add support for 3d views and native file dialogs.

3D view recording/playback is generic and works off a given class name.

pqTestUtility has methods for an application to add data directories.  If a file is opened or saved from under a data
directory, a label for that directory is recorded.  Playback reverses the label to an absolute file.
parent d6b0baa8
...@@ -78,6 +78,7 @@ GET_DIRECTORY_PROPERTY(include_dirs_tmp INCLUDE_DIRECTORIES) ...@@ -78,6 +78,7 @@ GET_DIRECTORY_PROPERTY(include_dirs_tmp INCLUDE_DIRECTORIES)
SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${MOC_INCLUDE_DIRS}") SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${MOC_INCLUDE_DIRS}")
QT4_WRAP_CPP(MOC_BUILT_SOURCES QT4_WRAP_CPP(MOC_BUILT_SOURCES
pq3DViewEventTranslator.h
pqAbstractButtonEventTranslator.h pqAbstractButtonEventTranslator.h
pqAbstractItemViewEventTranslator.h pqAbstractItemViewEventTranslator.h
pqAbstractSliderEventTranslator.h pqAbstractSliderEventTranslator.h
...@@ -91,6 +92,8 @@ QT4_WRAP_CPP(MOC_BUILT_SOURCES ...@@ -91,6 +92,8 @@ QT4_WRAP_CPP(MOC_BUILT_SOURCES
pqEventTranslator.h pqEventTranslator.h
pqLineEditEventTranslator.h pqLineEditEventTranslator.h
pqMenuEventTranslator.h pqMenuEventTranslator.h
pqNativeFileDialogEventTranslator.h
pqNativeFileDialogEventPlayer.h
pqRecordEventsDialog.h pqRecordEventsDialog.h
pqSpinBoxEventTranslator.h pqSpinBoxEventTranslator.h
pqStdoutEventObserver.h pqStdoutEventObserver.h
...@@ -111,6 +114,10 @@ QT4_WRAP_UI(UI_BUILT_SOURCES ...@@ -111,6 +114,10 @@ QT4_WRAP_UI(UI_BUILT_SOURCES
ADD_LIBRARY(QtTesting ADD_LIBRARY(QtTesting
QtTestingExport.h QtTestingExport.h
pq3DViewEventPlayer.cxx
pq3DViewEventPlayer.h
pq3DViewEventTranslator.cxx
pq3DViewEventTranslator.h
pqAbstractActivateEventPlayer.cxx pqAbstractActivateEventPlayer.cxx
pqAbstractActivateEventPlayer.h pqAbstractActivateEventPlayer.h
pqAbstractBooleanEventPlayer.cxx pqAbstractBooleanEventPlayer.cxx
...@@ -150,6 +157,10 @@ ADD_LIBRARY(QtTesting ...@@ -150,6 +157,10 @@ ADD_LIBRARY(QtTesting
pqEventSource.h pqEventSource.h
pqLineEditEventTranslator.cxx pqLineEditEventTranslator.cxx
pqLineEditEventTranslator.h pqLineEditEventTranslator.h
pqNativeFileDialogEventPlayer.cxx
pqNativeFileDialogEventPlayer.h
pqNativeFileDialogEventTranslator.cxx
pqNativeFileDialogEventTranslator.h
pqMenuEventTranslator.cxx pqMenuEventTranslator.cxx
pqMenuEventTranslator.h pqMenuEventTranslator.h
pqObjectNaming.cxx pqObjectNaming.cxx
......
/*=========================================================================
Program: ParaView
Module: pq3DViewEventPlayer.cxx
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.2.
See License_v1.2.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
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 AUTHORS 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.
=========================================================================*/
#include "pq3DViewEventPlayer.h"
#include <QApplication>
#include <QKeyEvent>
#include <QMouseEvent>
#include <QtDebug>
#include <QRegExp>
#include <QWidget>
pq3DViewEventPlayer::pq3DViewEventPlayer(const QByteArray& classname, QObject * p)
: pqWidgetEventPlayer(p), mClassType(classname)
{
}
bool pq3DViewEventPlayer::playEvent(QObject* Object,
const QString& Command,
const QString& Arguments,
bool& Error)
{
QWidget* widget = qobject_cast<QWidget*>(Object);
if(widget && Object->inherits(mClassType.data()))
{
if (Command == "mousePress" || Command=="mouseRelease" || Command=="mouseMove")
{
QRegExp mouseRegExp("\\(([^,]*),([^,]*),([^,]),([^,]),([^,]*)\\)");
if (mouseRegExp.indexIn(Arguments)!= -1)
{
QVariant v = mouseRegExp.cap(1);
int x = static_cast<int>(v.toDouble() * widget->size().width());
v = mouseRegExp.cap(2);
int y = static_cast<int>(v.toDouble() * widget->size().height());
v = mouseRegExp.cap(3);
Qt::MouseButton button = static_cast<Qt::MouseButton>(v.toInt());
v = mouseRegExp.cap(4);
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);
QMouseEvent e(type, QPoint(x,y), button, buttons, keym);
QCoreApplication::sendEvent(Object, &e);
}
return true;
}
}
return false;
}
/*=========================================================================
Program: ParaView
Module: pq3DViewEventPlayer.h
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.2.
See License_v1.2.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
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 AUTHORS 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.
=========================================================================*/
#ifndef _pq3DViewEventPlayer_h
#define _pq3DViewEventPlayer_h
#include "pqWidgetEventPlayer.h"
/**
Concrete implementation of pqWidgetEventPlayer that handles playback of "activate" events for 3d views.
It is not registered by default, and user can register with their own 3d view type.
\sa pqEventPlayer
*/
class QTTESTING_EXPORT pq3DViewEventPlayer :
public pqWidgetEventPlayer
{
public:
pq3DViewEventPlayer(const QByteArray& classname, QObject* p = 0);
bool playEvent(QObject* Object, const QString& Command, const QString& Arguments, bool& Error);
protected:
QByteArray mClassType;
private:
pq3DViewEventPlayer(const pq3DViewEventPlayer&);
pq3DViewEventPlayer& operator=(const pq3DViewEventPlayer&);
};
#endif // !_pq3DViewEventPlayer_h
/*=========================================================================
Program: ParaView
Module: pq3DViewEventTranslator.cxx
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.2.
See License_v1.2.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
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 AUTHORS 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.
=========================================================================*/
#include "pq3DViewEventTranslator.h"
#include <QEvent>
#include <QMouseEvent>
#include <QKeyEvent>
#include <QWidget>
pq3DViewEventTranslator::pq3DViewEventTranslator(const QByteArray& classname, QObject* p)
: pqWidgetEventTranslator(p), mClassType(classname),
lastMoveEvent(QEvent::MouseButtonPress, QPoint(), Qt::MouseButton(),
Qt::MouseButtons(), Qt::KeyboardModifiers())
{
}
pq3DViewEventTranslator::~pq3DViewEventTranslator()
{
}
bool pq3DViewEventTranslator::translateEvent(QObject* Object, QEvent* Event,
bool& /*Error*/)
{
QWidget* widget = qobject_cast<QWidget*>(Object);
if(!widget || !Object->inherits(mClassType.data()))
{
return false;
}
bool handled = false;
switch(Event->type())
{
case QEvent::ContextMenu:
handled=true;
break;
case QEvent::MouseButtonPress:
{
QMouseEvent* mouseEvent = dynamic_cast<QMouseEvent*>(Event);
if (mouseEvent)
{
QSize size = widget->size();
double normalized_x = mouseEvent->x()/static_cast<double>(size.width());
double normalized_y = mouseEvent->y()/static_cast<double>(size.height());
int button = mouseEvent->button();
int buttons = mouseEvent->buttons();
int modifiers = mouseEvent->modifiers();
emit recordEvent(Object, "mousePress", QString("(%1,%2,%3,%4,%5)")
.arg(normalized_x)
.arg(normalized_y)
.arg(button)
.arg(buttons)
.arg(modifiers));
}
// reset lastMoveEvent
QMouseEvent e(QEvent::MouseButtonPress, QPoint(), Qt::MouseButton(),
Qt::MouseButtons(), Qt::KeyboardModifiers());
lastMoveEvent = e;
}
handled = true;
break;
case QEvent::MouseMove:
{
QMouseEvent* mouseEvent = dynamic_cast<QMouseEvent*>(Event);
if (mouseEvent)
{
QMouseEvent e(QEvent::MouseMove, QPoint(mouseEvent->x(), mouseEvent->y()),
mouseEvent->button(), mouseEvent->buttons(),
mouseEvent->modifiers());
lastMoveEvent = e;
}
}
handled = true;
break;
case QEvent::MouseButtonRelease:
{
QMouseEvent* mouseEvent = dynamic_cast<QMouseEvent*>(Event);
if (mouseEvent)
{
QSize size = widget->size();
// record last move event if it is valid
if(lastMoveEvent.type() == QEvent::MouseMove)
{
double normalized_x = lastMoveEvent.x()/static_cast<double>(size.width());
double normalized_y = lastMoveEvent.y()/static_cast<double>(size.height());
int button = lastMoveEvent.button();
int buttons = lastMoveEvent.buttons();
int modifiers = lastMoveEvent.modifiers();
emit recordEvent(Object, "mouseMove", QString("(%1,%2,%3,%4,%5)")
.arg(normalized_x)
.arg(normalized_y)
.arg(button)
.arg(buttons)
.arg(modifiers));
}
double normalized_x = mouseEvent->x()/static_cast<double>(size.width());
double normalized_y = mouseEvent->y()/static_cast<double>(size.height());
int button = mouseEvent->button();
int buttons = mouseEvent->buttons();
int modifiers = mouseEvent->modifiers();
emit recordEvent(Object, "mouseRelease", QString("(%1,%2,%3,%4,%5)")
.arg(normalized_x)
.arg(normalized_y)
.arg(button)
.arg(buttons)
.arg(modifiers));
}
}
handled = true;
break;
case QEvent::KeyPress:
case QEvent::KeyRelease:
{
QKeyEvent* ke = static_cast<QKeyEvent*>(Event);
QString data =QString("%1:%2:%3:%4:%5:%6")
.arg(ke->type())
.arg(ke->key())
.arg(static_cast<int>(ke->modifiers()))
.arg(ke->text())
.arg(ke->isAutoRepeat())
.arg(ke->count());
emit recordEvent(Object, "keyEvent", data);
}
break;
default:
break;
}
return handled;
}
/*=========================================================================
Program: ParaView
Module: pq3DViewEventTranslator.h
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.2.
See License_v1.2.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
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 AUTHORS 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.
=========================================================================*/
#ifndef _pq3DViewEventTranslator_h
#define _pq3DViewEventTranslator_h
#include "pqWidgetEventTranslator.h"
#include <QMouseEvent>
/**
Translates low-level Qt events into high-level ParaView events that can be recorded as test cases.
\sa pqEventTranslator
*/
class QTTESTING_EXPORT pq3DViewEventTranslator :
public pqWidgetEventTranslator
{
Q_OBJECT
public:
pq3DViewEventTranslator(const QByteArray& classname, QObject* p=0);
~pq3DViewEventTranslator();
virtual bool translateEvent(QObject* Object, QEvent* Event, bool& Error);
protected:
QByteArray mClassType;
QMouseEvent lastMoveEvent;
private:
pq3DViewEventTranslator(const pq3DViewEventTranslator&);
pq3DViewEventTranslator& operator=(const pq3DViewEventTranslator&);
};
#endif // !_pq3DViewEventTranslator_h
...@@ -40,7 +40,7 @@ Concrete implementation of pqWidgetEventPlayer that translates high-level ParaVi ...@@ -40,7 +40,7 @@ Concrete implementation of pqWidgetEventPlayer that translates high-level ParaVi
\sa pqEventPlayer \sa pqEventPlayer
*/ */
class pqAbstractBooleanEventPlayer : class QTTESTING_EXPORT pqAbstractBooleanEventPlayer :
public pqWidgetEventPlayer public pqWidgetEventPlayer
{ {
public: public:
......
...@@ -43,7 +43,7 @@ Translates low-level Qt events into high-level ParaView events that can be recor ...@@ -43,7 +43,7 @@ Translates low-level Qt events into high-level ParaView events that can be recor
\sa pqEventTranslator \sa pqEventTranslator
*/ */
class pqAbstractButtonEventTranslator : class QTTESTING_EXPORT pqAbstractButtonEventTranslator :
public pqWidgetEventTranslator public pqWidgetEventTranslator
{ {
Q_OBJECT Q_OBJECT
......
...@@ -41,7 +41,7 @@ Concrete implementation of pqWidgetEventPlayer that translates high-level ParaVi ...@@ -41,7 +41,7 @@ Concrete implementation of pqWidgetEventPlayer that translates high-level ParaVi
\sa pqEventPlayer \sa pqEventPlayer
*/ */
class pqAbstractDoubleEventPlayer : class QTTESTING_EXPORT pqAbstractDoubleEventPlayer :
public pqWidgetEventPlayer public pqWidgetEventPlayer
{ {
public: public:
......
...@@ -104,6 +104,8 @@ bool pqEventDispatcher::playEvents(pqEventSource& source, pqEventPlayer& player) ...@@ -104,6 +104,8 @@ bool pqEventDispatcher::playEvents(pqEventSource& source, pqEventPlayer& player)
return false; return false;
} }
emit this->started();
this->ActiveSource = &source; this->ActiveSource = &source;
this->ActivePlayer = &player; this->ActivePlayer = &player;
...@@ -140,6 +142,8 @@ bool pqEventDispatcher::playEvents(pqEventSource& source, pqEventPlayer& player) ...@@ -140,6 +142,8 @@ bool pqEventDispatcher::playEvents(pqEventSource& source, pqEventPlayer& player)
QObject::disconnect(QAbstractEventDispatcher::instance(), SIGNAL(awake()), QObject::disconnect(QAbstractEventDispatcher::instance(), SIGNAL(awake()),
this, SLOT(awake())); this, SLOT(awake()));
emit this->stopped();
return this->PlayBackStatus; return this->PlayBackStatus;
} }
......
...@@ -69,6 +69,14 @@ public: ...@@ -69,6 +69,14 @@ public:
calling Qt version, since that will break test playback*/ calling Qt version, since that will break test playback*/
static void processEvents(QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents); static void processEvents(QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents);
signals:
/// signal when playback starts
void started();
/// signal when playback stops
void stopped();
protected slots: protected slots:
/// Plays a single event. this->PlayBackFinished and this->PlayBackStatus are /// Plays a single event. this->PlayBackFinished and this->PlayBackStatus are
/// updated by this method. /// updated by this method.
......
...@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqObjectNaming.h" #include "pqObjectNaming.h"
#include "pqTabBarEventPlayer.h" #include "pqTabBarEventPlayer.h"
#include "pqTreeViewEventPlayer.h" #include "pqTreeViewEventPlayer.h"
#include "pqNativeFileDialogEventPlayer.h"
#include "pq3DViewEventPlayer.h"
#include <QApplication> #include <QApplication>
#include <QWidget> #include <QWidget>
...@@ -56,7 +58,7 @@ pqEventPlayer::~pqEventPlayer() ...@@ -56,7 +58,7 @@ pqEventPlayer::~pqEventPlayer()
{ {
} }
void pqEventPlayer::addDefaultWidgetEventPlayers() void pqEventPlayer::addDefaultWidgetEventPlayers(pqTestUtility* util)
{ {
addWidgetEventPlayer(new pqBasicWidgetEventPlayer()); addWidgetEventPlayer(new pqBasicWidgetEventPlayer());
addWidgetEventPlayer(new pqAbstractActivateEventPlayer()); addWidgetEventPlayer(new pqAbstractActivateEventPlayer());
...@@ -68,6 +70,8 @@ void pqEventPlayer::addDefaultWidgetEventPlayers() ...@@ -68,6 +70,8 @@ void pqEventPlayer::addDefaultWidgetEventPlayers()
addWidgetEventPlayer(new pqTabBarEventPlayer()); addWidgetEventPlayer(new pqTabBarEventPlayer());
addWidgetEventPlayer(new pqTreeViewEventPlayer()); addWidgetEventPlayer(new pqTreeViewEventPlayer());
addWidgetEventPlayer(new pqAbstractMiscellaneousEventPlayer()); addWidgetEventPlayer(new pqAbstractMiscellaneousEventPlayer());
addWidgetEventPlayer(new pq3DViewEventPlayer("QGLWidget"));
addWidgetEventPlayer(new pqNativeFileDialogEventPlayer(util));
} }
void pqEventPlayer::addWidgetEventPlayer(pqWidgetEventPlayer* Player) void pqEventPlayer::addWidgetEventPlayer(pqWidgetEventPlayer* Player)
......
...@@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QList> #include <QList>
class pqWidgetEventPlayer; class pqWidgetEventPlayer;
class pqTestUtility;
/** /**
Manages playback of test-cases, demos, tutorials, etc. Manages playback of test-cases, demos, tutorials, etc.
...@@ -80,7 +81,7 @@ public: ...@@ -80,7 +81,7 @@ public:
/** Adds the default set of widget players to the current working set. /** Adds the default set of widget players to the current working set.
Players are executed in-order, so you can call addWidgetEventPlayer() Players are executed in-order, so you can call addWidgetEventPlayer()
before this function to override default players. */ before this function to override default players. */
void addDefaultWidgetEventPlayers(); void addDefaultWidgetEventPlayers(pqTestUtility* util);
/** Adds a new player to the current working set of widget players. /** Adds a new player to the current working set of widget players.
pqEventPlayer assumes control of the lifetime of the supplied object. */ pqEventPlayer assumes control of the lifetime of the supplied object. */
void addWidgetEventPlayer(pqWidgetEventPlayer*); void addWidgetEventPlayer(pqWidgetEventPlayer*);
......
...@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqSpinBoxEventTranslator.h" #include "pqSpinBoxEventTranslator.h"
#include "pqTabBarEventTranslator.h" #include "pqTabBarEventTranslator.h"
#include "pqTreeViewEventTranslator.h" #include "pqTreeViewEventTranslator.h"
#include "pqNativeFileDialogEventTranslator.h"
#include "pq3DViewEventTranslator.h"
#include <QCoreApplication> #include <QCoreApplication>
#include <QtDebug> #include <QtDebug>
...@@ -87,14 +89,16 @@ pqEventTranslator::~pqEventTranslator() ...@@ -87,14 +89,16 @@ pqEventTranslator::~pqEventTranslator()
void pqEventTranslator::start() void pqEventTranslator::start()
{ {
QCoreApplication::instance()->installEventFilter(this); QCoreApplication::instance()->installEventFilter(this);
emit this->started();
} }
void pqEventTranslator::stop() void pqEventTranslator::stop()
{ {
emit this->stopped();