GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
QWinTerminalImpl.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2011-2019 Michael Goffioul
4 
5 This file is part of QConsole.
6 
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program. If not,
19 see <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #ifndef __QConsole_h__
24 #define __QConsole_h__ 1
25 
26 #include <QWidget>
27 #include "QTerminal.h"
28 class QFocusEvent;
29 class QKeyEvent;
30 class QPainter;
31 class QPaintEvent;
32 class QResizeEvent;
33 class QWheelEvent;
34 class QPoint;
35 class QDragEnterEvent;
36 class QDropEvent;
37 
38 class QConsolePrivate;
39 class QConsoleThread;
40 class QConsoleView;
41 
42 //////////////////////////////////////////////////////////////////////////////
43 
45 {
46  Q_OBJECT
47  friend class QConsolePrivate;
48  friend class QConsoleThread;
49  friend class QConsoleView;
50 
51 public:
52  QWinTerminalImpl (octave::base_qobject&, QWidget* parent);
53  ~QWinTerminalImpl (void);
54 
55  void setTerminalFont (const QFont& font);
56  void setSize (int columns, int lines);
57  void sendText (const QString& s);
58  void setCursorType (CursorType type, bool blinking);
59 
60  void setBackgroundColor (const QColor& color);
61  void setForegroundColor (const QColor& color);
62  void setSelectionColor (const QColor& color);
63  void setCursorColor (bool useForegoundColor, const QColor& color);
64  void setScrollBufferSize(int value);
65 
66  QString selectedText ();
67 
68  void has_extra_interrupt (bool);
69 
70 public slots:
71  void copyClipboard (void);
72  void pasteClipboard (void);
73  void selectAll (void);
74  void blinkCursorEvent (void);
75  void init_terminal_size (void);
76 
77 signals:
78  void terminated (void);
79  void titleChanged (const QString&);
80 
81 protected:
82  void viewPaintEvent (QConsoleView*, QPaintEvent*);
83  void setBlinkingCursor (bool blink);
84  void setBlinkingCursorState (bool blink);
85  void viewResizeEvent (QConsoleView*, QResizeEvent*);
86  void wheelEvent (QWheelEvent*);
87  void focusInEvent (QFocusEvent*);
88  void focusOutEvent (QFocusEvent*);
89  void keyPressEvent (QKeyEvent*);
90  virtual void start (void);
91  void mouseMoveEvent (QMouseEvent *event);
92  void mousePressEvent (QMouseEvent *event);
93  void mouseReleaseEvent (QMouseEvent *event);
94  void mouseDoubleClickEvent (QMouseEvent* event);
95  void mouseTripleClickEvent (QMouseEvent* event);
96 
97  bool eventFilter(QObject *obj, QEvent *ev);
98 
99  void dragEnterEvent(QDragEnterEvent *event);
100  void dropEvent(QDropEvent *event);
101 
102 private slots:
103  void horizontalScrollValueChanged (int value);
104  void verticalScrollValueChanged (int value);
105  void monitorConsole (void);
106  void updateSelection (void);
107  void tripleClickTimeout (void);
108 
109 private:
113 };
114 
115 //////////////////////////////////////////////////////////////////////////////
116 
117 #endif // __QConsole_h__
void setCursorColor(bool useForegoundColor, const QColor &color)
void dropEvent(QDropEvent *event)
void setForegroundColor(const QColor &color)
void mouseReleaseEvent(QMouseEvent *event)
void init_terminal_size(void)
void setSize(int columns, int lines)
void terminated(void)
void sendText(const QString &s)
void dragEnterEvent(QDragEnterEvent *event)
void setTerminalFont(const QFont &font)
void horizontalScrollValueChanged(int value)
void tripleClickTimeout(void)
QWinTerminalImpl(octave::base_qobject &, QWidget *parent)
void setBlinkingCursorState(bool blink)
void setScrollBufferSize(int value)
void mouseDoubleClickEvent(QMouseEvent *event)
void mousePressEvent(QMouseEvent *event)
void has_extra_interrupt(bool)
virtual void start(void)
void setCursorType(CursorType type, bool blinking)
void focusInEvent(QFocusEvent *)
void wheelEvent(QWheelEvent *)
void verticalScrollValueChanged(int value)
bool eventFilter(QObject *obj, QEvent *ev)
void viewResizeEvent(QConsoleView *, QResizeEvent *)
void viewPaintEvent(QConsoleView *, QPaintEvent *)
void setBackgroundColor(const QColor &color)
void setSelectionColor(const QColor &color)
void setBlinkingCursor(bool blink)
void mouseMoveEvent(QMouseEvent *event)
void titleChanged(const QString &)
QConsolePrivate * d
void keyPressEvent(QKeyEvent *)
void focusOutEvent(QFocusEvent *)
void mouseTripleClickEvent(QMouseEvent *event)