1#ifndef __cxxtest__QtGui_h__
2#define __cxxtest__QtGui_h__
19#include <qapplication.h>
23#include <qmessagebox.h>
25#include <qprogressbar.h>
26#include <qstatusbar.h>
62 setIcon( QMessageBox::Warning );
72 setIcon( QMessageBox::Critical );
104 for (
int i = 1;
i < argc; ++
i ) {
105 QString arg( argv[
i] );
106 if ( arg ==
"-minimized" )
108 else if ( arg ==
"-keep" )
110 else if ( arg ==
"-title" && (
i + 1 < argc) )
156 setIcon( QMessageBox::Information );
183 void setCaption(
const QString &suiteName,
const QString &testName )
210 return QString::number( n );
216 palette.setColor( QColorGroup::Highlight, QColor( r,
g,
b ) );
222#if QT_VERSION >= 0x030000
223 _mainWindow->setIcon( QMessageBox::standardIcon( icon ) );
225 _mainWindow->setIcon( QMessageBox::standardIcon( icon, QApplication::style().guiStyle() ) );
236 QWidget *desktop = QApplication::desktop();
237 int xCenter = desktop->x() + (desktop->width() / 2);
238 int yCenter = desktop->y() + (desktop->height() / 2);
240 int windowWidth = (desktop->width() * 4) / 5;
242 _mainWindow->setGeometry( xCenter - (windowWidth / 2), yCenter - (windowHeight / 2), windowWidth, windowHeight );
260 summary = summary +
" passed";
void showTestsDone(unsigned testsDone)
QProgressBar * _progressBar
void createApplication(int &argc, char **argv)
void parseCommandLine(int argc, char **argv)
void guiEnterSuite(const char *suiteName)
void setCaption(const QString &suiteName, const QString &testName)
void showSuiteName(const QString &suiteName)
void advanceProgressBar()
void enterGui(int &argc, char **argv)
void getTotalTests(const WorldDescription &wd)
void setIcon(QMessageBox::Icon icon)
void enterWorld(const WorldDescription &wd)
void setColor(int r, int g, int b)
void createWindow(const WorldDescription &wd)
void guiEnterTest(const char *suiteName, const char *testName)
QApplication * _application
void showTestName(const QString &testName)
static QString asString(unsigned n)
unsigned failedTests() const
char * strTotalTests(char *) const
virtual unsigned numTotalTests(void) const =0