BALL  1.5.0
logView.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_VIEW_WIDGETS_LOGVIEW_H
6 #define BALL_VIEW_WIDGETS_LOGVIEW_H
7 
8 #include <BALL/common.h>
10 
11 #include <QtWidgets/QTextBrowser>
12 #include <QtGui/QDragEnterEvent>
13 #include <QtGui/QDragLeaveEvent>
14 #include <QtGui/QDropEvent>
15 
16 namespace BALL
17 {
18  namespace VIEW
19  {
21  : public QTextBrowser
22  {
23  Q_OBJECT
24 
25  public:
26 
27  DragLogView(QWidget* parent);
28 
29  public Q_SLOTS:
30  virtual void contentsDragEnterEvent(QDragEnterEvent* e);
31  virtual void contentsDragLeaveEvent(QDragLeaveEvent* e);
32  virtual void contentsDropEvent(QDropEvent* e);
33  virtual void setSource(const QUrl& /* name */);
34  };
35 
48  : public DockWidget,
49  public LogStreamNotifier
50  {
51  Q_OBJECT
52 
53  public:
54 
56 
57 
64  LogView(QWidget *parent = 0, const char *name = 0);
65 
70  LogView(const LogView& view);
71 
75  virtual ~LogView();
76 
79  virtual void initializeWidget(MainControl& main_control);
80 
83  virtual void finalizeWidget(MainControl& main_control);
84 
85  // output a string
86  void logString(const String& text);
87 
88  public Q_SLOTS:
89 
90  virtual void showGuestContextMenu(const QPoint&);
91 
93  bool eventFilter(QObject*, QEvent*);
94 
95  protected:
96 
103  void logNotify();
104 
105  private:
106 
107  QTextEdit* text_edit_;
108  };
109 
110 } } // namespaces
111 
112 #endif // BALL_VIEW_WIDGETS_LOGVIEW_H
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition: embeddable.h:31
virtual void contentsDropEvent(QDropEvent *e)
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
BALL_VIEW_EXPORT void logString(const String &data)
thread safe output to logview
Definition: constants.h:12
virtual void setSource(const QUrl &)
DragLogView(QWidget *parent)
virtual void contentsDragLeaveEvent(QDragLeaveEvent *e)
virtual void contentsDragEnterEvent(QDragEnterEvent *e)