VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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/DtDockable.h>
17 
18 class QTextEdit;
19 
20 #include <QtCore/QFile>
21 #include <QtWidgets/QWidget>
22 #include <iostream>
23 #include <streambuf>
24 #include <string>
25 #include <sstream>
26 
27 namespace makVrv
28 {
29  //
31  //
34  //
36  //
38  //
41  //
43  //
46  //
48  class DT_DLL_VRVCOREQT QDebugStream : public std::basic_streambuf<char>
49  {
50 
51  public:
52 
53  //
55  //
56  QDebugStream(std::ostream &stream, QTextEdit* pTE);
57 
58  //
60  //
61  QDebugStream(std::ostream &stream, QString& fileName);
62 
63  //
65  //
66  QDebugStream(std::ostream &stream, QTextEdit* pTE, QString& fileName);
67 
68  virtual ~QDebugStream();
69 
70  protected:
71 
72  virtual std::ios::int_type overflow(std::ios::int_type v);
73  virtual std::streamsize xsputn(const char *p, std::streamsize n);
74 
75  private:
76 
77  std::ostream &m_stream;
78  std::streambuf *m_old_buf;
79  std::string m_string;
80  QTextEdit* pLogWindow;
81  QFile logFile;
82 
83  };
84 
88  : public QWidget
89  , public DtDockable
90  {
91 
92  Q_OBJECT;
93 
94  public:
95 
97  DtConsoleLogWidget(DtDe& de, QWidget* parent,
98  Qt::WindowFlags f = Qt::Widget);
99 
101  virtual ~DtConsoleLogWidget();
102 
105  virtual bool initiallyVisible() const;
106 
107  public slots:
108 
114 
115  protected:
116 
118  void setupGui();
119 
120  protected:
121 
122  QTextEdit* myTextEdit;
124  //QDebugStream* myStdErrStream;
126 
127  };
128 }
129 
130 #endif
131 

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)