GNU Octave 7.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
3Copyright (C) 2011-2019 Michael Goffioul
4
5This file is part of QConsole.
6
7This program is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 3 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program. If not,
19see <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"
28class QFocusEvent;
29class QKeyEvent;
30class QPainter;
31class QPaintEvent;
32class QResizeEvent;
33class QWheelEvent;
34class QPoint;
35class QDragEnterEvent;
36class QDropEvent;
37
38class QConsolePrivate;
39class QConsoleThread;
40class QConsoleView;
41
42//////////////////////////////////////////////////////////////////////////////
43
45{
46 Q_OBJECT
47 friend class QConsolePrivate;
48 friend class QConsoleThread;
49 friend class QConsoleView;
50
51public:
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
70public slots:
71 void copyClipboard (void);
72 void pasteClipboard (void);
73 void selectAll (void);
74 void blinkCursorEvent (void);
75 void init_terminal_size (void);
76
77signals:
78 void terminated (void);
79 void titleChanged (const QString&);
80
81protected:
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
102private slots:
103 void horizontalScrollValueChanged (int value);
104 void verticalScrollValueChanged (int value);
105 void monitorConsole (void);
106 void updateSelection (void);
107 void tripleClickTimeout (void);
108
109private:
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)
Base class for Octave interfaces that use Qt.