#ifndef _DEBUGDLG_H_ #define _DEBUGDLG_H_ #include #include #include /*! \class DebugDlg \brief Debug window Text window used for printing debug messages. Instead of printing messages to stdout. */ class DebugDlg : public QDialog { public: /*! Creates the text field used for debug messages */ DebugDlg( QWidget* parent = 0, const char* name = 0 ); /*! Prints a debug message in the debug window \param str The string to be printed */ #ifdef _DEBUG void print( const QString& str ); void log( const QString& str); #else void print( const QString& str ){} void log( const QString& str) {} #endif private: /*! The text area displaying debug messages */ QTextEdit* text; QTextStream stream; #ifdef _DEBUG protected: virtual void closeEvent(QCloseEvent * e); #endif }; extern DebugDlg* debugWin; #endif