1
/***************************************************************************
2
* Copyright (c) 2006 Werner Mayer <werner.wm.mayer@gmx.de> *
4
* This file is part of the FreeCAD CAx development system. *
6
* This library is free software; you can redistribute it and/or *
7
* modify it under the terms of the GNU Library General Public *
8
* License as published by the Free Software Foundation; either *
9
* version 2 of the License, or (at your option) any later version. *
11
* This library is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU Library General Public License for more details. *
16
* You should have received a copy of the GNU Library General Public *
17
* License along with this library; see the file COPYING.LIB. If not, *
18
* write to the Free Software Foundation, Inc., 59 Temple Place, *
19
* Suite 330, Boston, MA 02111-1307, USA *
21
***************************************************************************/
24
#ifndef TESTGUI_UNITTESTIMP_H
25
#define TESTGUI_UNITTESTIMP_H
27
#include "ui_UnitTest.h"
29
#include <Base/PyObjectBase.h>
33
# include <Gui/Qt4All.h>
38
class UnitTestDialog : public QDialog, public Ui_UnitTest
43
void showErrorDialog(const char* title, const char* message);
44
void addUnitTest(const QString& unit);
45
void setUnitTest(const QString& unit);
46
QString getUnitTest() const;
47
void setStatusText(const QString& text);
48
void setProgressFraction(float fraction, const QString& = QString::null);
49
void clearErrorList();
50
void insertError(const QString& failure, const QString& details);
51
void setRunCount(int);
52
void setFailCount(int);
53
void setErrorCount(int);
54
void setRemainCount(int);
58
static UnitTestDialog* instance();
59
static void destruct();
60
static bool hasInstance();
63
UnitTestDialog(QWidget* parent = 0, Qt::WFlags f = 0);
65
void setProgressColor(const QColor& col);
68
void on_treeViewFailure_itemDoubleClicked (QTreeWidgetItem * item, int column);
69
void on_helpButton_clicked();
70
void on_aboutButton_clicked();
71
void on_startButton_clicked();
74
static UnitTestDialog* _instance;
77
} // namespace TestGui
80
#endif // TESTGUI_UNITTESTIMP_H