GNU Octave  6.2.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 (QWidget* parent = 0);
53  QWinTerminalImpl (const QString& cmd, QWidget* parent = 0);
54  ~QWinTerminalImpl (void);
55 
56  void setTerminalFont (const QFont& font);
57  void setSize (int columns, int lines);
58  void sendText (const QString& s);
59  void setCursorType (CursorType type, bool blinking);
60 
61  void setBackgroundColor (const QColor& color);
62  void setForegroundColor (const QColor& color);
63  void setSelectionColor (const QColor& color);
64  void setCursorColor (bool useForegoundColor, const QColor& color);
65  void setScrollBufferSize(int value);
66 
67  QString selectedText ();
68 
69  void has_extra_interrupt (bool);
70 
71 public slots:
72  void copyClipboard (void);
73  void pasteClipboard (void);
74  void selectAll (void);
75  void blinkCursorEvent (void);
76  void init_terminal_size (void);
77 
78 signals:
79  void terminated (void);
80  void titleChanged (const QString&);
82  void set_screen_size_signal (int, int);
83 
84 protected:
85  void viewPaintEvent (QConsoleView*, QPaintEvent*);
86  void setBlinkingCursor (bool blink);
87  void setBlinkingCursorState (bool blink);
88  void viewResizeEvent (QConsoleView*, QResizeEvent*);
89  void wheelEvent (QWheelEvent*);
90  void focusInEvent (QFocusEvent*);
91  void focusOutEvent (QFocusEvent*);
92  void keyPressEvent (QKeyEvent*);
93  virtual void start (void);
94  void mouseMoveEvent (QMouseEvent *event);
95  void mousePressEvent (QMouseEvent *event);
96  void mouseReleaseEvent (QMouseEvent *event);
97  void mouseDoubleClickEvent (QMouseEvent* event);
98  void mouseTripleClickEvent (QMouseEvent* event);
99 
100  bool eventFilter(QObject *obj, QEvent *ev);
101 
102  void dragEnterEvent(QDragEnterEvent *event);
103  void dropEvent(QDropEvent *event);
104 
105 private slots:
106  void horizontalScrollValueChanged (int value);
107  void verticalScrollValueChanged (int value);
108  void monitorConsole (void);
109  void updateSelection (void);
110  void tripleClickTimeout (void);
111 
112 private:
116 };
117 
118 //////////////////////////////////////////////////////////////////////////////
119 
120 #endif // __QConsole_h__
void setCursorColor(bool useForegoundColor, const QColor &color)
void dropEvent(QDropEvent *event)
void set_global_shortcuts_signal(bool)
void set_screen_size_signal(int, int)
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)
void setBlinkingCursorState(bool blink)
void setScrollBufferSize(int value)
void mouseDoubleClickEvent(QMouseEvent *event)
void mousePressEvent(QMouseEvent *event)
void has_extra_interrupt(bool)
QWinTerminalImpl(QWidget *parent=0)
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)