VR-Forces 4.8 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 
std::streambuf * m_old_buf
Definition: DtConsoleLogWidget.h:78
QTextEdit * pLogWindow
Definition: DtConsoleLogWidget.h:80
This widget displays the console log.
Definition: DtConsoleLogWidget.h:87
std::string m_string
Definition: DtConsoleLogWidget.h:79
The dockable class provides the docking interface for any class to be a dockable widget in the DtDeMa...
Definition: DtDockable.h:31
std::ostream & m_stream
Definition: DtConsoleLogWidget.h:77
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
QDebugStream * myStdOutStream
Definition: DtConsoleLogWidget.h:123
QDebugStream * myIgLogStream
Definition: DtConsoleLogWidget.h:125
Contains makVrv::DtDockable class.
QFile logFile
Definition: DtConsoleLogWidget.h:81
QTextEdit * myTextEdit
Definition: DtConsoleLogWidget.h:122
This class redirects cout/cerr to the text edit that&#39;s passed in:
Definition: DtConsoleLogWidget.h:48
voidpf stream
Definition: ioapi.h:39
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)