annotate libgui/qterminal/libqterminal/unix/TerminalView.h @ 17920:5c3f22dd0bbb

raise SIGINT in octave_interpreter instead of in QTerminal * QTerminal.h (QTerminal::interrupt_signal): New signal. (QTerminal::terminal_interrupt): New slot. * QUnixTerminalImpl.cpp (QUnixTerminalImpl::initialize): Connect m_terminalView::interrupt_signal to QTerminal::terminal_interrupt. * TerminalView.h (TerminalView::interrupt_signal): New signal. * TerminalView.cpp (TerminalView::copyClipboard): Emit interrupt_signal instead of calling raising SIGINT signal. * terminal-dock-widget.h, terminal-dock-widget.cc (terminal_dock_widget::interrupt_signal): New signal. (terminal_dock_widget::terminal_interrupt): New slot. (terminal_dock_widget::terminal_dock_widget): Connect terminal::interrupt_signal to terminal_dock_widget::terminal_interrupt slot. (terminal_dock_widget::terminal_interrupt): New function. Emit terminal_dock_widget::interrupt_signal. * QWinTerminalImpl.cpp (QWinTerminalImpl::copyClipboard): Call terminal_interrupt instead of raising SIGINT signal. main-window.cc (main_window::construct_octave_qt_link): Connect command_window::interrupt_signal to _octave_qt_link::terminal_interrupt slot. * octave-qt-link.h, octave-qt-link.cc (octave_qt_link::terminal_interrupt): New slot. * octave-interpreter.h, octave_interpreter.cc (octave_interpreter::interrupt): New slot. Raise SIGINT here.
author John W. Eaton <jwe@octave.org>
date Tue, 12 Nov 2013 15:46:59 -0500
parents 2de613986374
children 2d5d0d86432e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
1 /*
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
2 Copyright (C) 2007 by Robert Knight <robertknight@gmail.com>
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
3 Copyright (C) 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
4
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
5 Rewritten for QT4 by e_k <e_k at users.sourceforge.net>, Copyright (C)2008
17744
d63878346099 maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents: 16970
diff changeset
6 Copyright (C) 2012-2013 Jacob Dawid <jacob.dawid@googlemail.com>
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
7
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
8 This program is free software; you can redistribute it and/or modify
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
9 it under the terms of the GNU General Public License as published by
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
10 the Free Software Foundation; either version 2 of the License, or
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
11 (at your option) any later version.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
12
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
13 This program is distributed in the hope that it will be useful,
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
16 GNU General Public License for more details.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
17
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
19 along with this program; if not, write to the Free Software
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
21 02110-1301 USA.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
22 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
23
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
24 #ifndef TERMINALVIEW_H
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
25 #define TERMINALVIEW_H
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
26
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
27 // Qt
17827
2de613986374 include Qt files with <QFoo> instead of <QtGui/QFoo> (bug #40252)
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
28 #include <QColor>
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
29 #include <QtCore/QPointer>
17827
2de613986374 include Qt files with <QFoo> instead of <QtGui/QFoo> (bug #40252)
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
30 #include <QWidget>
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
31
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
32 // Konsole
15653
35c891dce299 Removed INCLUDEPATH.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15651
diff changeset
33 #include "unix/Filter.h"
35c891dce299 Removed INCLUDEPATH.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15651
diff changeset
34 #include "unix/Character.h"
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
35
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
36 class QDrag;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
37 class QDragEnterEvent;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
38 class QDropEvent;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
39 class QLabel;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
40 class QTimer;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
41 class QEvent;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
42 class QFrame;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
43 class QGridLayout;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
44 class QKeyEvent;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
45 class QScrollBar;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
46 class QShowEvent;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
47 class QHideEvent;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
48 class QWidget;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
49
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
50 extern unsigned short vt100_graphics[32];
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
51
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
52 class ScreenWindow;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
53
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
54 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
55 * A widget which displays output from a terminal emulation and sends input keypresses and mouse activity
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
56 * to the terminal.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
57 *
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
58 * When the terminal emulation receives new output from the program running in the terminal,
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
59 * it will update the display by calling updateImage().
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
60 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
61 * TODO More documentation
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
62 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
63 class TerminalView : public QWidget
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
64 {
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
65 Q_OBJECT
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
66
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
67 public:
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
68 /** Constructs a new terminal display widget with the specified parent. */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
69 TerminalView(QWidget *parent = 0);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
70 virtual ~TerminalView();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
71
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
72 /** Returns the terminal color palette used by the display. */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
73 const ColorEntry* colorTable() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
74 /** Sets the terminal color palette used by the display. */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
75 void setColorTable(const ColorEntry table[]);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
76 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
77 * Sets the seed used to generate random colors for the display
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
78 * (in color schemes that support them).
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
79 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
80 void setRandomSeed(uint seed);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
81 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
82 * Returns the seed used to generate random colors for the display
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
83 * (in color schemes that support them).
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
84 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
85 uint randomSeed() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
86
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
87
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
88 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
89 * This enum describes the location where the scroll bar is positioned in the display widget.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
90 */
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
91 enum ScrollBarPosition
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
92 {
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
93 /** Do not show the scroll bar. */
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
94 NoScrollBar=0,
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
95 /** Show the scroll bar on the left side of the display. */
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
96 ScrollBarLeft=1,
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
97 /** Show the scroll bar on the right side of the display. */
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
98 ScrollBarRight=2
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
99 };
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
100 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
101 * Specifies whether the terminal display has a vertical scroll bar, and if so whether it
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
102 * is shown on the left or right side of the display.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
103 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
104 void setScrollBarPosition(ScrollBarPosition position);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
105
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
106 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
107 * Sets the current position and range of the display's scroll bar.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
108 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
109 * @param cursor The position of the scroll bar's thumb.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
110 * @param lines The maximum value of the scroll bar.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
111 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
112 void setScroll(int cursor, int lines);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
113
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
114 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
115 * Returns the display's filter chain. When the image for the display is updated,
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
116 * the text is passed through each filter in the chain. Each filter can define
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
117 * hotspots which correspond to certain strings (such as URLs or particular words).
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
118 * Depending on the type of the hotspots created by the filter ( returned by Filter::Hotspot::type() )
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
119 * the view will draw visual cues such as underlines on mouse-over for links or translucent
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
120 * rectangles for markers.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
121 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
122 * To add a new filter to the view, call:
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
123 * viewWidget->filterChain()->addFilter( filterObject );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
124 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
125 FilterChain* filterChain() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
126
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
127 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
128 * Updates the filters in the display's filter chain. This will cause
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
129 * the hotspots to be updated to match the current image.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
130 *
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
131 * WARNING: This function can be expensive depending on the
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
132 * image size and number of filters in the filterChain()
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
133 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
134 * TODO - This API does not really allow efficient usage. Revise it so
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
135 * that the processing can be done in a better way.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
136 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
137 * eg:
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
138 * - Area of interest may be known ( eg. mouse cursor hovering
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
139 * over an area )
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
140 */
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
141 void processFilters();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
142
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
143 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
144 * Returns a list of menu actions created by the filters for the content
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
145 * at the given @p position.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
146 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
147 QList<QAction*> filterActions(const QPoint& position);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
148
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
149 /** Returns true if the cursor is set to blink or false otherwise. */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
150 bool blinkingCursor() { return _hasBlinkingCursor; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
151 /** Specifies whether or not the cursor blinks. */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
152 void setBlinkingCursor(bool blink);
16609
6f7940e36322 improve handling of cursor blinking for unix GUI terminal window
John W. Eaton <jwe@octave.org>
parents: 15681
diff changeset
153 void setBlinkingCursorState(bool blink);
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
154
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
155 void setCtrlDrag(bool enable) { _ctrlDrag=enable; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
156 bool ctrlDrag() { return _ctrlDrag; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
157
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
158 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
159 * This enum describes the methods for selecting text when
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
160 * the user triple-clicks within the display.
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
161 */
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
162 enum TripleClickMode
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
163 {
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
164 /** Select the whole line underneath the cursor. */
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
165 SelectWholeLine,
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
166 /** Select from the current cursor position to the end of the line. */
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
167 SelectForwardsFromCursor
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
168 };
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
169 /** Sets how the text is selected when the user triple clicks within the display. */
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
170 void setTripleClickMode(TripleClickMode mode) { _tripleClickMode = mode; }
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
171 /** See setTripleClickSelectionMode() */
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
172 TripleClickMode tripleClickMode() { return _tripleClickMode; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
173
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
174 void setLineSpacing(uint);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
175 uint lineSpacing() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
176
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
177 void emitSelection(bool useXselection,bool appendReturn);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
178
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
179 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
180 * This enum describes the available shapes for the keyboard cursor.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
181 * See setKeyboardCursorShape()
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
182 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
183 enum KeyboardCursorShape
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
184 {
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
185 /** A rectangular block which covers the entire area of the cursor character. */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
186 BlockCursor,
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
187 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
188 * A single flat line which occupies the space at the bottom of the cursor
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
189 * character's area.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
190 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
191 UnderlineCursor,
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
192 /**
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
193 * An cursor shaped like the capital letter 'I', similar to the IBeam
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
194 * cursor used in Qt/KDE text editors.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
195 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
196 IBeamCursor
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
197 };
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
198 /**
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
199 * Sets the shape of the keyboard cursor. This is the cursor drawn
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
200 * at the position in the terminal where keyboard input will appear.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
201 *
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
202 * In addition the terminal display widget also has a cursor for
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
203 * the mouse pointer, which can be set using the QWidget::setCursor()
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
204 * method.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
205 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
206 * Defaults to BlockCursor
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
207 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
208 void setKeyboardCursorShape(KeyboardCursorShape shape);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
209 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
210 * Returns the shape of the keyboard cursor. See setKeyboardCursorShape()
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
211 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
212 KeyboardCursorShape keyboardCursorShape() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
213
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
214 /**
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
215 * Sets the color used to draw the keyboard cursor.
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
216 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
217 * The keyboard cursor defaults to using the foreground color of the character
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
218 * underneath it.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
219 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
220 * @param useForegroundColor If true, the cursor color will change to match
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
221 * the foreground color of the character underneath it as it is moved, in this
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
222 * case, the @p color parameter is ignored and the color of the character
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
223 * under the cursor is inverted to ensure that it is still readable.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
224 * @param color The color to use to draw the cursor. This is only taken into
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
225 * account if @p useForegroundColor is false.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
226 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
227 void setKeyboardCursorColor(bool useForegroundColor , const QColor& color);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
228
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
229 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
230 * Returns the color of the keyboard cursor, or an invalid color if the keyboard
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
231 * cursor color is set to change according to the foreground color of the character
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
232 * underneath it.
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
233 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
234 QColor keyboardCursorColor() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
235
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
236 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
237 * Returns the number of lines of text which can be displayed in the widget.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
238 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
239 * This will depend upon the height of the widget and the current font.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
240 * See fontHeight()
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
241 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
242 int lines() { return _lines; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
243 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
244 * Returns the number of characters of text which can be displayed on
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
245 * each line in the widget.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
246 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
247 * This will depend upon the width of the widget and the current font.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
248 * See fontWidth()
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
249 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
250 int columns() { return _columns; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
251
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
252 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
253 * Returns the height of the characters in the font used to draw the text in the display.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
254 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
255 int fontHeight() { return _fontHeight; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
256 /**
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
257 * Returns the width of the characters in the display.
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
258 * This assumes the use of a fixed-width font.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
259 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
260 int fontWidth() { return _fontWidth; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
261
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
262 void setSize(int cols, int lins);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
263 void setFixedSize(int cols, int lins);
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
264
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
265 // reimplemented
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
266 QSize sizeHint() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
267
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
268 /**
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
269 * Sets which characters, in addition to letters and numbers,
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
270 * are regarded as being part of a word for the purposes
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
271 * of selecting words in the display by double clicking on them.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
272 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
273 * The word boundaries occur at the first and last characters which
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
274 * are either a letter, number, or a character in @p wc
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
275 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
276 * @param wc An array of characters which are to be considered parts
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
277 * of a word ( in addition to letters and numbers ).
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
278 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
279 void setWordCharacters(const QString& wc);
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
280 /**
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
281 * Returns the characters which are considered part of a word for the
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
282 * purpose of selecting words in the display with the mouse.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
283 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
284 * @see setWordCharacters()
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
285 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
286 QString wordCharacters() { return _wordCharacters; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
287
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
288 /**
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
289 * Sets the type of effect used to alert the user when a 'bell' occurs in the
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
290 * terminal session.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
291 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
292 * The terminal session can trigger the bell effect by calling bell() with
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
293 * the alert message.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
294 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
295 void setBellMode(int mode);
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
296 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
297 * Returns the type of effect used to alert the user when a 'bell' occurs in
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
298 * the terminal session.
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
299 *
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
300 * See setBellMode()
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
301 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
302 int bellMode() { return _bellMode; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
303
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
304 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
305 * This enum describes the different types of sounds and visual effects which
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
306 * can be used to alert the user when a 'bell' occurs in the terminal
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
307 * session.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
308 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
309 enum BellMode
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
310 {
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
311 /** A system beep. */
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
312 SystemBeepBell=0,
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
313 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
314 * KDE notification. This may play a sound, show a passive popup
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
315 * or perform some other action depending on the user's settings.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
316 */
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
317 NotifyBell=1,
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
318 /** A silent, visual bell (eg. inverting the display's colors briefly) */
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
319 VisualBell=2,
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
320 /** No bell effects */
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
321 NoBell=3
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
322 };
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
323
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
324 void setSelection(const QString &t);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
325
16794
1d1f02e0f6b4 GUI: enable clipboard content detection for terminal window context menu
John Donoghue <john.donoghue@ieee.org>
parents: 16609
diff changeset
326 QString selectedText ();
1d1f02e0f6b4 GUI: enable clipboard content detection for terminal window context menu
John Donoghue <john.donoghue@ieee.org>
parents: 16609
diff changeset
327
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
328 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
329 * Reimplemented. Has no effect. Use setVTFont() to change the font
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
330 * used to draw characters in the display.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
331 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
332 virtual void setFont(const QFont &);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
333
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
334
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
335 /** Returns the font used to draw characters in the display */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
336 QFont getVTFont() { return font(); }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
337
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
338 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
339 * Sets the font used to draw the display. Has no effect if @p font
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
340 * is larger than the size of the display itself.
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
341 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
342 void setVTFont(const QFont& font);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
343
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
344
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
345 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
346 * Specified whether terminal widget should be at read-only mode
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
347 * Defaults to false.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
348 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
349 void setReadOnly( bool readonly) { _readonly = readonly; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
350
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
351 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
352 * Specified whether anti-aliasing of text in the terminal display
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
353 * is enabled or not. Defaults to enabled.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
354 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
355 static void setAntialias( bool antialias ) { _antialiasText = antialias; }
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
356 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
357 * Returns true if anti-aliasing of text in the terminal is enabled.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
358 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
359 static bool antialias() { return _antialiasText; }
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
360
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
361 /**
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
362 * Sets whether or not the current height and width of the
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
363 * terminal in lines and columns is displayed whilst the widget
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
364 * is being resized.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
365 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
366 void setTerminalSizeHint(bool on) { _terminalSizeHint=on; }
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
367 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
368 * Returns whether or not the current height and width of
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
369 * the terminal in lines and columns is displayed whilst the widget
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
370 * is being resized.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
371 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
372 bool terminalSizeHint() { return _terminalSizeHint; }
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
373 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
374 * Sets whether the terminal size display is shown briefly
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
375 * after the widget is first shown.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
376 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
377 * See setTerminalSizeHint() , isTerminalSizeHint()
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
378 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
379 void setTerminalSizeStartup(bool on) { _terminalSizeStartup=on; }
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
380
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
381 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
382 * Sets the terminal screen section which is displayed in this widget.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
383 * When updateImage() is called, the display fetches the latest character image from the
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
384 * the associated terminal screen window.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
385 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
386 * In terms of the model-view paradigm, the ScreenWindow is the model which is rendered
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
387 * by the TerminalDisplay.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
388 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
389 void setScreenWindow( ScreenWindow* window );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
390 /** Returns the terminal screen section which is displayed in this widget. See setScreenWindow() */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
391 ScreenWindow* screenWindow() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
392
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
393 public slots:
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
394
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
395 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
396 * Causes the terminal display to fetch the latest character image from the associated
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
397 * terminal screen ( see setScreenWindow() ) and redraw the display.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
398 */
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
399 void updateImage();
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
400 /**
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
401 * Causes the terminal display to fetch the latest line status flags from the
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
402 * associated terminal screen ( see setScreenWindow() ).
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
403 */
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
404 void updateLineProperties();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
405
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
406 /** Copies the selected text to the clipboard. */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
407 void copyClipboard();
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
408 /**
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
409 * Pastes the content of the clipboard into the
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
410 * display.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
411 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
412 void pasteClipboard();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
413 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
414 * Pastes the content of the selection into the
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
415 * display.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
416 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
417 void pasteSelection();
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
418
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
419 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
420 * Causes the widget to display or hide a message informing the user that terminal
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
421 * output has been suspended (by using the flow control key combination Ctrl+S)
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
422 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
423 * @param suspended True if terminal output has been suspended and the warning message should
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
424 * be shown or false to indicate that terminal output has been resumed and that
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
425 * the warning message should disappear.
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
426 */
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
427 void outputSuspended(bool suspended);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
428
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
429 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
430 * Sets whether the program whoose output is being displayed in the view
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
431 * is interested in mouse events.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
432 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
433 * If this is set to true, mouse signals will be emitted by the view when the user clicks, drags
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
434 * or otherwise moves the mouse inside the view.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
435 * The user interaction needed to create selections will also change, and the user will be required
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
436 * to hold down the shift key to create a selection or perform other mouse activities inside the
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
437 * view area - since the program running in the terminal is being allowed to handle normal mouse
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
438 * events itself.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
439 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
440 * @param usesMouse Set to true if the program running in the terminal is interested in mouse events
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
441 * or false otherwise.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
442 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
443 void setUsesMouse(bool usesMouse);
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
444
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
445 /** See setUsesMouse() */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
446 bool usesMouse() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
447
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
448 signals:
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
449
17920
5c3f22dd0bbb raise SIGINT in octave_interpreter instead of in QTerminal
John W. Eaton <jwe@octave.org>
parents: 17827
diff changeset
450 void interrupt_signal (void);
5c3f22dd0bbb raise SIGINT in octave_interpreter instead of in QTerminal
John W. Eaton <jwe@octave.org>
parents: 17827
diff changeset
451
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
452 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
453 * Emitted when the user presses a key whilst the terminal widget has focus.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
454 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
455 void keyPressedSignal(QKeyEvent *e);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
456
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
457 /**
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
458 * A mouse event occurred.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
459 * @param button The mouse button (0 for left button, 1 for middle button, 2 for right button, 3 for release)
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
460 * @param column The character column where the event occurred
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
461 * @param line The character row where the event occurred
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
462 * @param eventType The type of event. 0 for a mouse press / release or 1 for mouse motion
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
463 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
464 void mouseSignal(int button, int column, int line, int eventType);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
465 void changedFontMetricSignal(int height, int width);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
466 void changedContentSizeSignal(int height, int width);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
467
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
468 /**
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
469 * Emitted when the user right clicks on the display, or right-clicks with the Shift
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
470 * key held down if usesMouse() is true.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
471 *
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
472 * This can be used to display a context menu.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
473 */
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
474 void configureRequest( TerminalView*, int state, const QPoint& position );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
475
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
476 void isBusySelecting(bool);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
477 void sendStringToEmu(const char*);
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
478
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
479 void tripleClicked( const QString& text );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
480
16970
78116b88dbf5 enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents: 16794
diff changeset
481 /**
78116b88dbf5 enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents: 16794
diff changeset
482 * Emitted when focus changes
78116b88dbf5 enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents: 16794
diff changeset
483 */
78116b88dbf5 enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents: 16794
diff changeset
484 void set_global_shortcuts_signal (bool);
78116b88dbf5 enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents: 16794
diff changeset
485
78116b88dbf5 enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents: 16794
diff changeset
486
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
487 protected:
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
488 virtual bool event( QEvent * );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
489
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
490 virtual void paintEvent( QPaintEvent * );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
491
16609
6f7940e36322 improve handling of cursor blinking for unix GUI terminal window
John W. Eaton <jwe@octave.org>
parents: 15681
diff changeset
492 void focusInEvent(QFocusEvent *focusEvent);
6f7940e36322 improve handling of cursor blinking for unix GUI terminal window
John W. Eaton <jwe@octave.org>
parents: 15681
diff changeset
493 void focusOutEvent(QFocusEvent *focusEvent);
6f7940e36322 improve handling of cursor blinking for unix GUI terminal window
John W. Eaton <jwe@octave.org>
parents: 15681
diff changeset
494
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
495 virtual void showEvent(QShowEvent*);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
496 virtual void hideEvent(QHideEvent*);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
497 virtual void resizeEvent(QResizeEvent*);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
498
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
499 virtual void fontChange(const QFont &font);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
500
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
501 virtual void keyPressEvent(QKeyEvent* event);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
502 virtual void mouseDoubleClickEvent(QMouseEvent* ev);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
503 virtual void mousePressEvent( QMouseEvent* );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
504 virtual void mouseReleaseEvent( QMouseEvent* );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
505 virtual void mouseMoveEvent( QMouseEvent* );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
506 virtual void extendSelection( const QPoint& pos );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
507 virtual void wheelEvent( QWheelEvent* );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
508
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
509 virtual bool focusNextPrevChild( bool next );
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
510
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
511 // drag and drop
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
512 virtual void dragEnterEvent(QDragEnterEvent* event);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
513 virtual void dropEvent(QDropEvent* event);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
514 void doDrag();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
515 enum DragState { diNone, diPending, diDragging };
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
516
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
517 struct _dragInfo {
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
518 DragState state;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
519 QPoint start;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
520 QDrag *dragObject;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
521 } dragInfo;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
522
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
523 virtual int charClass(quint16) const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
524
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
525 void clearImage();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
526
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
527 void mouseTripleClickEvent(QMouseEvent* ev);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
528
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
529 // reimplemented
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
530 virtual void inputMethodEvent ( QInputMethodEvent* event );
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
531 virtual QVariant inputMethodQuery( Qt::InputMethodQuery query ) const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
532
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
533 protected slots:
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
534
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
535 void scrollBarPositionChanged(int value);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
536 void blinkEvent();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
537 void blinkCursorEvent();
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
538
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
539 //Renables bell noises and visuals. Used to disable further bells for a short period of time
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
540 //after emitting the first in a sequence of bell events.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
541 void enableBell();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
542
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
543 private slots:
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
544
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
545 void swapColorTable();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
546 void tripleClickTimeout(); // resets possibleTripleClick
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
547
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
548 private:
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
549
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
550 // -- Drawing helpers --
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
551
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
552 // divides the part of the display specified by 'rect' into
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
553 // fragments according to their colors and styles and calls
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
554 // drawTextFragment() to draw the fragments
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
555 void drawContents(QPainter &paint, const QRect &rect);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
556 // draws a section of text, all the text in this section
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
557 // has a common color and style
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
558 void drawTextFragment(QPainter& painter, const QRect& rect,
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
559 const QString& text, const Character* style);
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
560 // draws the background for a text fragment
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
561 // if useOpacitySetting is true then the color's alpha value will be set to
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
562 // the display's transparency (set with setOpacity()), otherwise the background
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
563 // will be drawn fully opaque
15675
22bd268429d3 Cursor is now blinking in the terminal.
Jacob Dawid <jacob.dawid@gmail.com>
parents: 15671
diff changeset
564 void drawBackground(QPainter& painter, const QRect& rect, const QColor& color);
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
565 // draws the cursor character
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
566 void drawCursor(QPainter& painter, const QRect& rect , const QColor& foregroundColor,
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
567 const QColor& backgroundColor , bool& invertColors);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
568 // draws the characters or line graphics in a text fragment
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
569 void drawCharacters(QPainter& painter, const QRect& rect, const QString& text,
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
570 const Character* style, bool invertCharacterColor);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
571 // draws a string of line graphics
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
572 void drawLineCharString(QPainter& painter, int x, int y,
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
573 const QString& str, const Character* attributes);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
574
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
575 // draws the preedit string for input methods
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
576 void drawInputMethodPreeditString(QPainter& painter , const QRect& rect);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
577
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
578 // --
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
579
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
580 // maps an area in the character image to an area on the widget
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
581 QRect imageToWidget(const QRect& imageArea) const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
582
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
583 // maps a point on the widget to the position ( ie. line and column )
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
584 // of the character at that point.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
585 void getCharacterPosition(const QPoint& widgetPoint,int& line,int& column) const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
586
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
587 // the area where the preedit string for input methods will be draw
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
588 QRect preeditRect() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
589
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
590 // shows a notification window in the middle of the widget indicating the terminal's
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
591 // current size in columns and lines
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
592 void showResizeNotification();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
593
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
594 // scrolls the image by a number of lines.
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
595 // 'lines' may be positive ( to scroll the image down )
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
596 // or negative ( to scroll the image up )
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
597 // 'region' is the part of the image to scroll - currently only
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
598 // the top, bottom and height of 'region' are taken into account,
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
599 // the left and right are ignored.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
600 void scrollImage(int lines , const QRect& region);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
601
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
602 void calcGeometry();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
603 void propagateSize();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
604 void updateImageSize();
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
605 void makeImage();
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
606
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
607 void paintFilters(QPainter& painter);
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
608
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
609 // returns a region covering all of the areas of the widget which contain
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
610 // a hotspot
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
611 QRegion hotSpotRegion() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
612
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
613 // returns the position of the cursor in columns and lines
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
614 QPoint cursorPosition() const;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
615
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
616 // the window onto the terminal screen which this display
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
617 // is currently showing.
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
618 QPointer<ScreenWindow> _screenWindow;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
619
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
620 bool _allowBell;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
621
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
622 QGridLayout* _gridLayout;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
623
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
624 bool _fixedFont; // has fixed pitch
15678
a1bcffac7fa8 fixed cursor position
Jen Stewart <jen.stewart.london@gmail.com>
parents: 15676
diff changeset
625
a1bcffac7fa8 fixed cursor position
Jen Stewart <jen.stewart.london@gmail.com>
parents: 15676
diff changeset
626 double _fontHeight; // height
a1bcffac7fa8 fixed cursor position
Jen Stewart <jen.stewart.london@gmail.com>
parents: 15676
diff changeset
627 double _fontWidth; // width
a1bcffac7fa8 fixed cursor position
Jen Stewart <jen.stewart.london@gmail.com>
parents: 15676
diff changeset
628 //type double to decrease rounding errors
a1bcffac7fa8 fixed cursor position
Jen Stewart <jen.stewart.london@gmail.com>
parents: 15676
diff changeset
629
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
630 int _fontAscent; // ascend
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
631
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
632 int _leftMargin; // offset
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
633 int _topMargin; // offset
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
634
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
635 int _lines; // the number of lines that can be displayed in the widget
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
636 int _columns; // the number of columns that can be displayed in the widget
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
637
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
638 int _usedLines; // the number of lines that are actually being used, this will be less
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
639 // than 'lines' if the character image provided with setImage() is smaller
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
640 // than the maximum image size which can be displayed
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
641
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
642 int _usedColumns; // the number of columns that are actually being used, this will be less
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
643 // than 'columns' if the character image provided with setImage() is smaller
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
644 // than the maximum image size which can be displayed
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
645
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
646 int _contentHeight;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
647 int _contentWidth;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
648 Character* _image; // [lines][columns]
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
649 // only the area [usedLines][usedColumns] in the image contains valid data
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
650
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
651 int _imageSize;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
652 QVector<LineProperty> _lineProperties;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
653
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
654 ColorEntry _colorTable[TABLE_COLORS];
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
655 uint _randomSeed;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
656
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
657 bool _resizing;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
658 bool _terminalSizeHint;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
659 bool _terminalSizeStartup;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
660 bool _mouseMarks;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
661
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
662 QPoint _iPntSel; // initial selection point
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
663 QPoint _pntSel; // current selection point
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
664 QPoint _tripleSelBegin; // help avoid flicker
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
665 int _actSel; // selection state
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
666 bool _wordSelectionMode;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
667 bool _lineSelectionMode;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
668 bool _preserveLineBreaks;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
669 bool _columnSelectionMode;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
670
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
671 QClipboard* _clipboard;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
672 QScrollBar* _scrollBar;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
673 ScrollBarPosition _scrollbarLocation;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
674 QString _wordCharacters;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
675 int _bellMode;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
676
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
677 bool _blinking; // hide text in paintEvent
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
678 bool _hasBlinker; // has characters to blink
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
679 bool _cursorBlinking; // hide cursor in paintEvent
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
680 bool _hasBlinkingCursor; // has blinking cursor enabled
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
681 bool _ctrlDrag; // require Ctrl key for drag
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
682 TripleClickMode _tripleClickMode;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
683 bool _isFixedSize; //Columns / lines are locked.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
684 QTimer* _blinkTimer; // active when hasBlinker
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
685 QTimer* _blinkCursorTimer; // active when hasBlinkingCursor
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
686
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
687 // KMenu* _drop;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
688 QString _dropText;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
689 int _dndFileCount;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
690
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
691 bool _possibleTripleClick; // is set in mouseDoubleClickEvent and deleted
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
692 // after QApplication::doubleClickInterval() delay
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
693
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
694
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
695 QLabel* _resizeWidget;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
696 QTimer* _resizeTimer;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
697
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
698 bool _flowControlWarningEnabled;
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
699
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
700 //widgets related to the warning message that appears when the user presses Ctrl+S to suspend
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
701 //terminal output - informing them what has happened and how to resume output
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
702 QLabel* _outputSuspendedLabel;
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
703
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
704 uint _lineSpacing;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
705
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
706 bool _colorsInverted; // true during visual bell
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
707
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
708 QSize _size;
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
709
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
710 QRgb _blendColor;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
711
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
712 // list of filters currently applied to the display. used for links and
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
713 // search highlight
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
714 TerminalImageFilterChain* _filterChain;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
715 QRect _mouseOverHotspotArea;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
716
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
717 KeyboardCursorShape _cursorShape;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
718
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
719 // custom cursor color. if this is invalid then the foreground
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
720 // color of the character under the cursor is used
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
721 QColor _cursorColor;
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
722
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
723
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
724 struct InputMethodData
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
725 {
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
726 QString preeditString;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
727 QRect previousPreeditRect;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
728 };
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
729 InputMethodData _inputMethodData;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
730
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
731 static bool _antialiasText; // do we antialias or not
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
732
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
733 //the delay in milliseconds between redrawing blinking text
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
734 static const int BLINK_DELAY = 500;
15671
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
735 static const int DEFAULT_LEFT_MARGIN = 2;
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
736 static const int DEFAULT_TOP_MARGIN = 2;
14da85a0d1c3 Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15653
diff changeset
737
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
738 bool _readonly;
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
739 };
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
740
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
741 #endif // TERMINALVIEW_H