QTestApp.h
Go to the documentation of this file.
/*=========================================================================
Program: Visualization Toolkit
Module: QTestApp.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/*-------------------------------------------------------------------------
Copyright 2008 Sandia Corporation.
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/
#ifndef QTestApp_h
#define QTestApp_h
#include <QApplication>
#include <QByteArray>
#include <QVector>
class QTestApp
{
public:
QTestApp(int _argc, char** _argv);
~QTestApp();
static int exec();
static void messageHandler(
QtMsgType type, const QMessageLogContext& context, const QString& message);
static void delay(int ms);
static void simulateEvent(QWidget* w, QEvent* e);
static void keyUp(QWidget* w, Qt::Key key, Qt::KeyboardModifiers mod, int ms);
static void keyDown(QWidget* w, Qt::Key key, Qt::KeyboardModifiers mod, int ms);
static void keyClick(QWidget* w, Qt::Key key, Qt::KeyboardModifiers mod, int ms);
static void mouseDown(
QWidget* w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms);
static void mouseUp(
QWidget* w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms);
static void mouseMove(
QWidget* w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms);
static void mouseClick(
QWidget* w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms);
private:
QApplication* App;
static int Error;
QList<QByteArray> Argv;
QVector<char*> Argvp;
int Argc;
};
#endif
QTestApp::mouseDown
static void mouseDown(QWidget *w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms)
QTestApp::exec
static int exec()
vtkX3D::type
@ type
Definition: vtkX3D.h:522
QTestApp::keyClick
static void keyClick(QWidget *w, Qt::Key key, Qt::KeyboardModifiers mod, int ms)
vtkX3D::key
@ key
Definition: vtkX3D.h:263
QTestApp::mouseMove
static void mouseMove(QWidget *w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms)
QTestApp::~QTestApp
~QTestApp()
QTestApp::keyUp
static void keyUp(QWidget *w, Qt::Key key, Qt::KeyboardModifiers mod, int ms)
QTestApp::mouseUp
static void mouseUp(QWidget *w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms)
QTestApp::simulateEvent
static void simulateEvent(QWidget *w, QEvent *e)
QTestApp::mouseClick
static void mouseClick(QWidget *w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms)
QTestApp::QTestApp
QTestApp(int _argc, char **_argv)
QTestApp
Definition: QTestApp.h:28
QTestApp::keyDown
static void keyDown(QWidget *w, Qt::Key key, Qt::KeyboardModifiers mod, int ms)
QTestApp::delay
static void delay(int ms)
QTestApp::messageHandler
static void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message)