00001 #ifndef _VALIDATIONREPORTDLG_H 00002 #define _VALIDATIONREPORTDLG_H 00003 00004 #include <qdialog.h> 00005 #include <qlayout.h> 00006 #include <qvbox.h> 00007 #include <qtextbrowser.h> 00008 00009 #include "ValidationReport.h" 00010 #include "TraceLog.h" 00011 00012 using namespace std ; 00013 00030 class ValidationReportDlg : public QObject { 00031 Q_OBJECT 00032 00033 protected: 00034 ValidationReport * report ; 00035 QString filename ; 00036 QTextBrowser * reportWindow ; 00037 00038 public: 00043 ValidationReportDlg() { 00044 report = NULL ; 00045 reportWindow = NULL ; 00046 } 00047 00054 ValidationReportDlg( ValidationReport * newReport ) ; 00055 00059 ~ValidationReportDlg() {;} 00060 00064 void setReport (ValidationReport * newReport) { 00065 report = newReport ; 00066 if (report != NULL) { 00067 reportWindow->setText (report->getReport().c_str()) ; 00068 } 00069 } 00070 00074 void setReportFilename (QString newFilename) { 00075 filename = newFilename ; 00076 reportWindow->setSource (filename) ; 00077 } 00078 00079 public slots: 00080 00084 void show () { 00085 reportWindow->setText(report->getReport().c_str()) ; 00086 reportWindow->show() ; 00087 } 00088 00092 void hide () { 00093 reportWindow->hide() ; 00094 } 00095 }; 00096 00097 #endif 00098 00099 00100