Qt 4.8
Namespaces | Macros | Functions
qtest_gui.h File Reference
#include <QtTest/qtestassert.h>
#include <QtTest/qtest.h>
#include <QtTest/qtestevent.h>
#include <QtTest/qtestmouse.h>
#include <QtTest/qtesttouch.h>
#include <QtTest/qtestkeyboard.h>
#include <QtGui/qicon.h>
#include <QtGui/qpixmap.h>

Go to the source code of this file.

Namespaces

 QTest
 The QTest namespace contains all the functions and declarations that are related to the QTestLib tool.
 

Macros

#define QT_GUI_LIB
 

Functions

static bool pixmapsAreEqual (const QPixmap *actual, const QPixmap *expected)
 
template<>
bool QTest::qCompare (QIcon const &t1, QIcon const &t2, const char *actual, const char *expected, const char *file, int line)
 
template<>
bool QTest::qCompare (QPixmap const &t1, QPixmap const &t2, const char *actual, const char *expected, const char *file, int line)
 
void qt_x11_wait_for_window_manager (QWidget *w)
 

Macro Definition Documentation

◆ QT_GUI_LIB

#define QT_GUI_LIB

Definition at line 47 of file qtest_gui.h.

Function Documentation

◆ pixmapsAreEqual()

static bool pixmapsAreEqual ( const QPixmap actual,
const QPixmap expected 
)
inlinestatic

Definition at line 97 of file qtest_gui.h.

98 {
99  if (!actual && !expected)
100  return true;
101  if (!actual || !expected)
102  return false;
103  if (actual->isNull() && expected->isNull())
104  return true;
105  if (actual->isNull() || expected->isNull() || actual->size() != expected->size())
106  return false;
107  return actual->toImage() == expected->toImage();
108 }
QImage toImage() const
Converts the pixmap to a QImage.
Definition: qpixmap.cpp:542
QSize size() const
Returns the size of the pixmap.
Definition: qpixmap.cpp:661
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
Definition: qpixmap.cpp:615

◆ qt_x11_wait_for_window_manager()

void qt_x11_wait_for_window_manager ( QWidget w)

Definition at line 408 of file qwidget_x11.cpp.

Referenced by pixmapsAreEqual().

409 {
411 }
void qt_x11_wait_for_window_manager(QWidget *w, bool sendPostedEvents)