VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtConsoleLogWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtConsoleLogWidget.h,v $ $Revision: 1.10 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtConsoleLogWidget_H_
14 #define DtConsoleLogWidget_H_
15 
16 #include <vrvCoreQt/vrvCoreQt.h>
17 #include <vrvCoreQt/DtDockable.h>
18 
19 class QTextEdit;
20 
21 #include <QtCore/QFile>
22 #include <QtGui/QWidget>
23 #include <iostream>
24 #include <streambuf>
25 #include <string>
26 #include <sstream>
27 
28 namespace makVrv
29 {
30  //
32  //
35  //
37  //
39  //
42  //
44  //
47  //
49  class DT_DLL_VRVCOREQT QDebugStream : public std::basic_streambuf<char>
50  {
51 
52  public:
53 
54  //
56  //
57  QDebugStream(std::ostream &stream, QTextEdit* pTE);
58 
59  //
61  //
62  QDebugStream(std::ostream &stream, QString& fileName);
63 
64  //
66  //
67  QDebugStream(std::ostream &stream, QTextEdit* pTE, QString& fileName);
68 
69  ~QDebugStream();
70 
71  protected:
72 
73  virtual std::ios::int_type overflow(std::ios::int_type v);
74  virtual std::streamsize xsputn(const char *p, std::streamsize n);
75 
76  private:
77 
78  std::ostream &m_stream;
79  std::streambuf *m_old_buf;
80  std::string m_string;
82  QFile logFile;
83 
84  };
85 
89  : public QWidget
90  , public DtDockable
91  {
92 
93  Q_OBJECT;
94 
95  public:
96 
98  DtConsoleLogWidget(DtDe& de, QWidget* parent,
99  Qt::WindowFlags f = Qt::Widget);
100 
102  virtual ~DtConsoleLogWidget();
103 
106  virtual bool initiallyVisible() const;
107 
108  public slots:
109 
115 
116  protected:
117 
119  void setupGui();
120 
121  protected:
122 
125  //QDebugStream* myStdErrStream;
127 
129 
130  };
131 }
132 
133 #endif
134 

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)