| VTK 9.0.1

QTestApp.h
Go to the documentation of this file.
1 /*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: QTestApp.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16 Copyright 2008 Sandia Corporation.
17 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18 the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
20
21 #ifndef QTestApp_h
22 #define QTestApp_h
23
24 #include <QApplication>
25 #include <QByteArray>
26 #include <QVector>
27
28 class QTestApp
29 {
30 public:
31 QTestApp(int _argc, char** _argv);
32 ~QTestApp();
33
34 static int exec();
35
36 static void messageHandler(
37 QtMsgType type, const QMessageLogContext& context, const QString& message);
38
39 static void delay(int ms);
40
41 static void simulateEvent(QWidget* w, QEvent* e);
42
43 static void keyUp(QWidget* w, Qt::Key key, Qt::KeyboardModifiers mod, int ms);
44
45 static void keyDown(QWidget* w, Qt::Key key, Qt::KeyboardModifiers mod, int ms);
46
47 static void keyClick(QWidget* w, Qt::Key key, Qt::KeyboardModifiers mod, int ms);
48
49 static void mouseDown(
50 QWidget* w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms);
51
52 static void mouseUp(
53 QWidget* w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms);
54
55 static void mouseMove(
56 QWidget* w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms);
57
58 static void mouseClick(
59 QWidget* w, QPoint pos, Qt::MouseButton btn, Qt::KeyboardModifiers mod, int ms);
60
61 private:
62 QApplication* App;
63 static int Error;
64 QList<QByteArray> Argv;
65 QVector<char*> Argvp;
66 int Argc;
67 };
68
69 #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)