UnitTestImp.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2006 Werner Mayer <wmayer[at]users.sourceforge.net>     *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 
00024 #ifndef TESTGUI_UNITTESTIMP_H
00025 #define TESTGUI_UNITTESTIMP_H
00026 
00027 #include "ui_UnitTest.h"
00028 
00029 #include <Base/PyObjectBase.h>
00030 
00031 namespace TestGui {
00032 
00033 class UnitTestDialog : public QDialog, public Ui_UnitTest
00034 {
00035     Q_OBJECT
00036 
00037 public:
00038     void showErrorDialog(const char* title, const char* message);
00039     void addUnitTest(const QString& unit);
00040     void setUnitTest(const QString& unit);
00041     QString getUnitTest() const;
00042     void setStatusText(const QString& text);
00043     void setProgressFraction(float fraction, const QString& = QString::null);
00044     void clearErrorList();
00045     void insertError(const QString& failure, const QString& details);
00046     void setRunCount(int);
00047     void setFailCount(int);
00048     void setErrorCount(int);
00049     void setRemainCount(int);
00050     void reset();
00051     void reject();
00052 
00053     static UnitTestDialog* instance();
00054     static void destruct();
00055     static bool hasInstance();
00056 
00057 protected:
00058     UnitTestDialog(QWidget* parent = 0, Qt::WFlags f = 0);
00059     ~UnitTestDialog();
00060     void setProgressColor(const QColor& col);
00061 
00062 public Q_SLOTS:
00063     void on_treeViewFailure_itemDoubleClicked (QTreeWidgetItem * item, int column);
00064     void on_helpButton_clicked();
00065     void on_aboutButton_clicked();
00066     void on_startButton_clicked();
00067 
00068 private:
00069     static UnitTestDialog* _instance;
00070 };
00071 
00072 } // namespace TestGui
00073 
00074 
00075 #endif // TESTGUI_UNITTESTIMP_H
00076 

Generated on Wed Nov 23 19:00:56 2011 for FreeCAD by  doxygen 1.6.1