20 #ifndef __ctkEventTranslatorPlayerWidget_h
21 #define __ctkEventTranslatorPlayerWidget_h
25 #include <QMainWindow>
28 #if !defined(NO_SYMBOL_EXPORT)
29 # include "ctkQtTestingExport.h"
31 # define CTK_QTTESTING_EXPORT
34 class ctkEventTranslatorPlayerWidgetPrivate;
38 class pqWidgetEventPlayer;
39 class pqWidgetEventTranslator;
42 #define CTKCOMPARE(actual, expected) \
45 if (!ctkEventTranslatorPlayerWidget::compare(actual, expected, #actual, #expected, __FILE__, __LINE__))\
61 void addTestCase(QWidget* widget, QString fileName,
void(*newCallback)(
void* data));
62 void addTestCase(QDialog* dialog, QString fileName,
void(*newCallback)(
void* data));
70 static const char*
enumValueToKey(QObject*
object,
const char* enumName,
int value);
72 static bool compare(
const double& actual,
const double& expected,
73 const char* actualName,
const char* expectedName,
const char *
function,
int line);
74 static bool compare(
const int& actual,
const int& expected,
75 const char* actualName,
const char* expectedName,
const char *
function,
int line);
76 static bool compare(
const QString& actual,
const QString& expected,
77 const char* actualName,
const char* expectedName,
const char *
function,
int line);
78 static bool compare(
const QStringList& actual,
const QStringList& expected,
79 const char* actualName,
const char* expectedName,
const char *
function,
int line);
80 static bool compare(
const QDateTime& actual,
const QDateTime& expected,
81 const char* actualName,
const char* expectedName,
const char *
function,
int line);
82 static bool compare(
const QColor& actual,
const QColor& expected,
83 const char* actualName,
const char* expectedName,
const char *
function,
int line);
84 static bool compare(
const QImage& actual,
const QImage& expected,
85 const char* actualName,
const char* expectedName,
const char *
function,
int line);
92 bool play(
int currentTestCase);
104 QScopedPointer< ctkEventTranslatorPlayerWidgetPrivate >
d_ptr;
109 struct InfoTestCase {