Mercurial > hg > octave-nkf
annotate libgui/qterminal/libqterminal/unix/TerminalView.h @ 16609:6f7940e36322
improve handling of cursor blinking for unix GUI terminal window
* QUnixTerminalImpl.h, QUnixTerminalImpl.cpp
(QUnixTerminalImpl::focusInEvent): Delete.
* TerminalView.h, TerminalView.cpp (TerminalView::drawCursor):
Don't check focus.
(TerminalView::setBlinkingCursorState): New function.
(TerminalView::setBlinkingCursor): Use it.
(TerminalView::focusInEvent, TerminalView::focusOutEvent):
New functions.
(TerminalView::blinkCursorEvent): Only toggle state if
_hasBlinkingCursor is true.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 04 May 2013 01:01:44 -0400 |
parents | 018c46ef8a0c |
children | 1d1f02e0f6b4 |
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 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
6 Copyright (C) 2012 Jacob Dawid <jacob.dawid@googlemail.com> |
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 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
28 #include <QtGui/QColor> |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
29 #include <QtCore/QPointer> |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
30 #include <QtGui/QWidget> |
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 |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
326 /** |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
327 * Reimplemented. Has no effect. Use setVTFont() to change the font |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
328 * used to draw characters in the display. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
329 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
330 virtual void setFont(const QFont &); |
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 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
333 /** Returns the font used to draw characters in the display */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
334 QFont getVTFont() { return font(); } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
335 |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
336 /** |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
337 * 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
|
338 * is larger than the size of the display itself. |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
339 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
340 void setVTFont(const QFont& font); |
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 |
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 * Specified whether terminal widget should be at read-only mode |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
345 * Defaults to false. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
346 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
347 void setReadOnly( bool readonly) { _readonly = readonly; } |
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 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
350 * Specified whether anti-aliasing of text in the terminal display |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
351 * is enabled or not. Defaults to enabled. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
352 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
353 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
|
354 /** |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
355 * 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
|
356 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
357 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
|
358 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
359 /** |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
360 * 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
|
361 * terminal in lines and columns is displayed whilst the widget |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
362 * is being resized. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
363 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
364 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
|
365 /** |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
366 * Returns whether or not the current height and width of |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
367 * 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
|
368 * is being resized. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
369 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
370 bool terminalSizeHint() { return _terminalSizeHint; } |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
371 /** |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
372 * Sets whether the terminal size display is shown briefly |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
373 * after the widget is first shown. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
374 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
375 * See setTerminalSizeHint() , isTerminalSizeHint() |
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 void setTerminalSizeStartup(bool on) { _terminalSizeStartup=on; } |
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 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
380 * 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
|
381 * 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
|
382 * the associated terminal screen window. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
383 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
384 * 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
|
385 * by the TerminalDisplay. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
386 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
387 void setScreenWindow( ScreenWindow* window ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
388 /** 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
|
389 ScreenWindow* screenWindow() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
390 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
391 public slots: |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
392 |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
393 /** |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
394 * 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
|
395 * terminal screen ( see setScreenWindow() ) and redraw the display. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
396 */ |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
397 void updateImage(); |
15651
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 * 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
|
400 * associated terminal screen ( see setScreenWindow() ). |
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
401 */ |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
402 void updateLineProperties(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
403 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
404 /** Copies the selected text to the clipboard. */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
405 void copyClipboard(); |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
406 /** |
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
407 * Pastes the content of the clipboard into the |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
408 * display. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
409 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
410 void pasteClipboard(); |
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 * Pastes the content of the selection into the |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
413 * display. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
414 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
415 void pasteSelection(); |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
416 |
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
417 /** |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
418 * 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
|
419 * 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
|
420 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
421 * @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
|
422 * 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
|
423 * 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
|
424 */ |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
425 void outputSuspended(bool suspended); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
426 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
427 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
428 * 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
|
429 * is interested in mouse events. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
430 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
431 * 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
|
432 * or otherwise moves the mouse inside the view. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
433 * 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
|
434 * 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
|
435 * 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
|
436 * events itself. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
437 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
438 * @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
|
439 * or false otherwise. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
440 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
441 void setUsesMouse(bool usesMouse); |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
442 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
443 /** See setUsesMouse() */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
444 bool usesMouse() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
445 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
446 signals: |
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 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
449 * 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
|
450 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
451 void keyPressedSignal(QKeyEvent *e); |
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 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
454 * A mouse event occurred. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
455 * @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
|
456 * @param column The character column where the event occurred |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
457 * @param line The character row where the event occurred |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
458 * @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
|
459 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
460 void mouseSignal(int button, int column, int line, int eventType); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
461 void changedFontMetricSignal(int height, int width); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
462 void changedContentSizeSignal(int height, int width); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
463 |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
464 /** |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
465 * 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
|
466 * key held down if usesMouse() is true. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
467 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
468 * This can be used to display a context menu. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
469 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
470 void configureRequest( TerminalView*, int state, const QPoint& position ); |
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 void isBusySelecting(bool); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
473 void sendStringToEmu(const char*); |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
474 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
475 void tripleClicked( const QString& text ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
476 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
477 protected: |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
478 virtual bool event( QEvent * ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
479 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
480 virtual void paintEvent( QPaintEvent * ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
481 |
16609
6f7940e36322
improve handling of cursor blinking for unix GUI terminal window
John W. Eaton <jwe@octave.org>
parents:
15681
diff
changeset
|
482 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
|
483 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
|
484 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
485 virtual void showEvent(QShowEvent*); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
486 virtual void hideEvent(QHideEvent*); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
487 virtual void resizeEvent(QResizeEvent*); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
488 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
489 virtual void fontChange(const QFont &font); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
490 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
491 virtual void keyPressEvent(QKeyEvent* event); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
492 virtual void mouseDoubleClickEvent(QMouseEvent* ev); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
493 virtual void mousePressEvent( QMouseEvent* ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
494 virtual void mouseReleaseEvent( QMouseEvent* ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
495 virtual void mouseMoveEvent( QMouseEvent* ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
496 virtual void extendSelection( const QPoint& pos ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
497 virtual void wheelEvent( QWheelEvent* ); |
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 bool focusNextPrevChild( bool next ); |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
500 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
501 // drag and drop |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
502 virtual void dragEnterEvent(QDragEnterEvent* event); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
503 virtual void dropEvent(QDropEvent* event); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
504 void doDrag(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
505 enum DragState { diNone, diPending, diDragging }; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
506 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
507 struct _dragInfo { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
508 DragState state; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
509 QPoint start; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
510 QDrag *dragObject; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
511 } dragInfo; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
512 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
513 virtual int charClass(quint16) const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
514 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
515 void clearImage(); |
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 void mouseTripleClickEvent(QMouseEvent* ev); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
518 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
519 // reimplemented |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
520 virtual void inputMethodEvent ( QInputMethodEvent* event ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
521 virtual QVariant inputMethodQuery( Qt::InputMethodQuery query ) const; |
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 protected slots: |
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 scrollBarPositionChanged(int value); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
526 void blinkEvent(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
527 void blinkCursorEvent(); |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
528 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
529 //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
|
530 //after emitting the first in a sequence of bell events. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
531 void enableBell(); |
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 private 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 swapColorTable(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
536 void tripleClickTimeout(); // resets possibleTripleClick |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
537 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
538 private: |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
539 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
540 // -- Drawing helpers -- |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
541 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
542 // divides the part of the display specified by 'rect' into |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
543 // 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
|
544 // drawTextFragment() to draw the fragments |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
545 void drawContents(QPainter &paint, const QRect &rect); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
546 // 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
|
547 // 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
|
548 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
|
549 const QString& text, const Character* style); |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
550 // draws the background for a text fragment |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
551 // 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
|
552 // the display's transparency (set with setOpacity()), otherwise the background |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
553 // will be drawn fully opaque |
15675
22bd268429d3
Cursor is now blinking in the terminal.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15671
diff
changeset
|
554 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
|
555 // draws the cursor character |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
556 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
|
557 const QColor& backgroundColor , bool& invertColors); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
558 // 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
|
559 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
|
560 const Character* style, bool invertCharacterColor); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
561 // 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
|
562 void drawLineCharString(QPainter& painter, int x, int y, |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
563 const QString& str, const Character* attributes); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
564 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
565 // draws the preedit string for input methods |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
566 void drawInputMethodPreeditString(QPainter& painter , const QRect& rect); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
567 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
568 // -- |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
569 |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
570 // 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
|
571 QRect imageToWidget(const QRect& imageArea) const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
572 |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
573 // 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
|
574 // of the character at that point. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
575 void getCharacterPosition(const QPoint& widgetPoint,int& line,int& column) const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
576 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
577 // 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
|
578 QRect preeditRect() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
579 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
580 // 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
|
581 // current size in columns and lines |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
582 void showResizeNotification(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
583 |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
584 // 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
|
585 // 'lines' may be positive ( to scroll the image down ) |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
586 // or negative ( to scroll the image up ) |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
587 // '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
|
588 // 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
|
589 // the left and right are ignored. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
590 void scrollImage(int lines , const QRect& region); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
591 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
592 void calcGeometry(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
593 void propagateSize(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
594 void updateImageSize(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
595 void makeImage(); |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
596 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
597 void paintFilters(QPainter& painter); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
598 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
599 // 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
|
600 // a hotspot |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
601 QRegion hotSpotRegion() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
602 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
603 // returns the position of the cursor in columns and lines |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
604 QPoint cursorPosition() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
605 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
606 // 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
|
607 // is currently showing. |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
608 QPointer<ScreenWindow> _screenWindow; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
609 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
610 bool _allowBell; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
611 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
612 QGridLayout* _gridLayout; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
613 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
614 bool _fixedFont; // has fixed pitch |
15678
a1bcffac7fa8
fixed cursor position
Jen Stewart <jen.stewart.london@gmail.com>
parents:
15676
diff
changeset
|
615 |
a1bcffac7fa8
fixed cursor position
Jen Stewart <jen.stewart.london@gmail.com>
parents:
15676
diff
changeset
|
616 double _fontHeight; // height |
a1bcffac7fa8
fixed cursor position
Jen Stewart <jen.stewart.london@gmail.com>
parents:
15676
diff
changeset
|
617 double _fontWidth; // width |
a1bcffac7fa8
fixed cursor position
Jen Stewart <jen.stewart.london@gmail.com>
parents:
15676
diff
changeset
|
618 //type double to decrease rounding errors |
a1bcffac7fa8
fixed cursor position
Jen Stewart <jen.stewart.london@gmail.com>
parents:
15676
diff
changeset
|
619 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
620 int _fontAscent; // ascend |
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 int _leftMargin; // offset |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
623 int _topMargin; // offset |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
624 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
625 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
|
626 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
|
627 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
628 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
|
629 // 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
|
630 // than the maximum image size which can be displayed |
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 _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
|
633 // 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
|
634 // 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
|
635 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
636 int _contentHeight; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
637 int _contentWidth; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
638 Character* _image; // [lines][columns] |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
639 // 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
|
640 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
641 int _imageSize; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
642 QVector<LineProperty> _lineProperties; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
643 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
644 ColorEntry _colorTable[TABLE_COLORS]; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
645 uint _randomSeed; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
646 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
647 bool _resizing; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
648 bool _terminalSizeHint; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
649 bool _terminalSizeStartup; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
650 bool _mouseMarks; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
651 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
652 QPoint _iPntSel; // initial selection point |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
653 QPoint _pntSel; // current selection point |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
654 QPoint _tripleSelBegin; // help avoid flicker |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
655 int _actSel; // selection state |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
656 bool _wordSelectionMode; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
657 bool _lineSelectionMode; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
658 bool _preserveLineBreaks; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
659 bool _columnSelectionMode; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
660 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
661 QClipboard* _clipboard; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
662 QScrollBar* _scrollBar; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
663 ScrollBarPosition _scrollbarLocation; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
664 QString _wordCharacters; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
665 int _bellMode; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
666 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
667 bool _blinking; // hide text in paintEvent |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
668 bool _hasBlinker; // has characters to blink |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
669 bool _cursorBlinking; // hide cursor in paintEvent |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
670 bool _hasBlinkingCursor; // has blinking cursor enabled |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
671 bool _ctrlDrag; // require Ctrl key for drag |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
672 TripleClickMode _tripleClickMode; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
673 bool _isFixedSize; //Columns / lines are locked. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
674 QTimer* _blinkTimer; // active when hasBlinker |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
675 QTimer* _blinkCursorTimer; // active when hasBlinkingCursor |
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 // KMenu* _drop; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
678 QString _dropText; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
679 int _dndFileCount; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
680 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
681 bool _possibleTripleClick; // is set in mouseDoubleClickEvent and deleted |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
682 // after QApplication::doubleClickInterval() delay |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
683 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
684 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
685 QLabel* _resizeWidget; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
686 QTimer* _resizeTimer; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
687 |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
688 bool _flowControlWarningEnabled; |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
689 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
690 //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
|
691 //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
|
692 QLabel* _outputSuspendedLabel; |
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
693 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
694 uint _lineSpacing; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
695 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
696 bool _colorsInverted; // true during visual bell |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
697 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
698 QSize _size; |
15671
14da85a0d1c3
Set terminal to fixed width, renamed some variables.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
699 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
700 QRgb _blendColor; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
701 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
702 // 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
|
703 // search highlight |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
704 TerminalImageFilterChain* _filterChain; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
705 QRect _mouseOverHotspotArea; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
706 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
707 KeyboardCursorShape _cursorShape; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
708 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
709 // custom cursor color. if this is invalid then the foreground |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
710 // 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
|
711 QColor _cursorColor; |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
712 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
713 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
714 struct InputMethodData |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
715 { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
716 QString preeditString; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
717 QRect previousPreeditRect; |
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 InputMethodData _inputMethodData; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
720 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
721 static bool _antialiasText; // do we antialias or not |
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 //the delay in milliseconds between redrawing blinking text |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
724 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
|
725 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
|
726 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
|
727 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
728 bool _readonly; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
729 }; |
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 #endif // TERMINALVIEW_H |