Mercurial > hg > octave-nkf
annotate libqterminal/unix/TerminalView.h @ 15651:845cebf281aa
Added files of QConsole.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 30 Jan 2012 11:23:13 +0100 |
parents | |
children | 35c891dce299 |
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 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
33 #include "Filter.h" |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
34 #include "Character.h" |
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 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
58 * When the terminal emulation receives new output from the program running in the terminal, |
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 /** Sets the opacity of the terminal display. */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
88 void setOpacity(qreal opacity); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
89 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
90 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
91 * 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
|
92 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
93 enum ScrollBarPosition |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
94 { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
95 /** Do not show the scroll bar. */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
96 NoScrollBar=0, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
97 /** Show the scroll bar on the left side of the display. */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
98 ScrollBarLeft=1, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
99 /** Show the scroll bar on the right side of the display. */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
100 ScrollBarRight=2 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
101 }; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
102 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
103 * 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
|
104 * 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
|
105 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
106 void setScrollBarPosition(ScrollBarPosition position); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
107 |
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 * 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
|
110 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
111 * @param cursor The position of the scroll bar's thumb. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
112 * @param lines The maximum value of the scroll bar. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
113 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
114 void setScroll(int cursor, int lines); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
115 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
116 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
117 * 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
|
118 * 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
|
119 * 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
|
120 * 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
|
121 * 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
|
122 * rectangles for markers. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
123 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
124 * To add a new filter to the view, call: |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
125 * viewWidget->filterChain()->addFilter( filterObject ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
126 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
127 FilterChain* filterChain() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
128 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
129 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
130 * 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
|
131 * the hotspots to be updated to match the current image. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
132 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
133 * WARNING: This function can be expensive depending on the |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
134 * image size and number of filters in the filterChain() |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
135 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
136 * 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
|
137 * that the processing can be done in a better way. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
138 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
139 * eg: |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
140 * - Area of interest may be known ( eg. mouse cursor hovering |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
141 * over an area ) |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
142 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
143 void processFilters(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
144 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
145 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
146 * 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
|
147 * at the given @p 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 QList<QAction*> filterActions(const QPoint& position); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
150 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
151 /** 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
|
152 bool blinkingCursor() { return _hasBlinkingCursor; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
153 /** Specifies whether or not the cursor blinks. */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
154 void setBlinkingCursor(bool blink); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
155 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
156 void setCtrlDrag(bool enable) { _ctrlDrag=enable; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
157 bool ctrlDrag() { return _ctrlDrag; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
158 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
159 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
160 * This enum describes the methods for selecting text when |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
161 * the user triple-clicks within the display. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
162 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
163 enum TripleClickMode |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
164 { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
165 /** Select the whole line underneath the cursor. */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
166 SelectWholeLine, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
167 /** Select from the current cursor position to the end of the line. */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
168 SelectForwardsFromCursor |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
169 }; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
170 /** Sets how the text is selected when the user triple clicks within the display. */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
171 void setTripleClickMode(TripleClickMode mode) { _tripleClickMode = mode; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
172 /** See setTripleClickSelectionMode() */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
173 TripleClickMode tripleClickMode() { return _tripleClickMode; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
174 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
175 void setLineSpacing(uint); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
176 uint lineSpacing() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
177 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
178 void emitSelection(bool useXselection,bool appendReturn); |
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 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
181 * This enum describes the available shapes for the keyboard cursor. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
182 * See setKeyboardCursorShape() |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
183 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
184 enum KeyboardCursorShape |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
185 { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
186 /** 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
|
187 BlockCursor, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
188 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
189 * 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
|
190 * character's area. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
191 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
192 UnderlineCursor, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
193 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
194 * An cursor shaped like the capital letter 'I', similar to the IBeam |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
195 * cursor used in Qt/KDE text editors. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
196 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
197 IBeamCursor |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
198 }; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
199 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
200 * Sets the shape of the keyboard cursor. This is the cursor drawn |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
201 * 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
|
202 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
203 * In addition the terminal display widget also has a cursor for |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
204 * 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
|
205 * method. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
206 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
207 * Defaults to BlockCursor |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
208 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
209 void setKeyboardCursorShape(KeyboardCursorShape shape); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
210 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
211 * Returns the shape of the keyboard cursor. See setKeyboardCursorShape() |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
212 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
213 KeyboardCursorShape keyboardCursorShape() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
214 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
215 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
216 * Sets the color used to draw the keyboard cursor. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
217 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
218 * 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
|
219 * underneath it. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
220 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
221 * @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
|
222 * 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
|
223 * 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
|
224 * 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
|
225 * @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
|
226 * account if @p useForegroundColor is false. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
227 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
228 void setKeyboardCursorColor(bool useForegroundColor , const QColor& color); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
229 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
230 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
231 * 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
|
232 * cursor color is set to change according to the foreground color of the character |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
233 * underneath it. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
234 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
235 QColor keyboardCursorColor() const; |
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 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
238 * 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
|
239 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
240 * 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
|
241 * See fontHeight() |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
242 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
243 int lines() { return _lines; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
244 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
245 * 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
|
246 * each line in the widget. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
247 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
248 * 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
|
249 * See fontWidth() |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
250 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
251 int columns() { return _columns; } |
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 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
254 * 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
|
255 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
256 int fontHeight() { return _fontHeight; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
257 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
258 * Returns the width of the characters in the display. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
259 * This assumes the use of a fixed-width font. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
260 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
261 int fontWidth() { return _fontWidth; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
262 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
263 void setSize(int cols, int lins); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
264 void setFixedSize(int cols, int lins); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
265 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
266 // reimplemented |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
267 QSize sizeHint() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
268 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
269 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
270 * Sets which characters, in addition to letters and numbers, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
271 * 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
|
272 * 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
|
273 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
274 * 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
|
275 * 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
|
276 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
277 * @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
|
278 * of a word ( in addition to letters and numbers ). |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
279 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
280 void setWordCharacters(const QString& wc); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
281 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
282 * Returns the characters which are considered part of a word for the |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
283 * purpose of selecting words in the display with the mouse. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
284 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
285 * @see setWordCharacters() |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
286 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
287 QString wordCharacters() { return _wordCharacters; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
288 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
289 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
290 * Sets the type of effect used to alert the user when a 'bell' occurs in the |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
291 * terminal session. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
292 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
293 * 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
|
294 * the alert message. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
295 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
296 void setBellMode(int mode); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
297 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
298 * 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
|
299 * the terminal session. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
300 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
301 * See setBellMode() |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
302 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
303 int bellMode() { return _bellMode; } |
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 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
306 * 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
|
307 * 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
|
308 * session. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
309 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
310 enum BellMode |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
311 { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
312 /** A system beep. */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
313 SystemBeepBell=0, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
314 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
315 * 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
|
316 * 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
|
317 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
318 NotifyBell=1, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
319 /** A silent, visual bell (eg. inverting the display's colors briefly) */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
320 VisualBell=2, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
321 /** No bell effects */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
322 NoBell=3 |
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 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
325 void setSelection(const QString &t); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
326 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
327 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
328 * Reimplemented. Has no effect. Use setVTFont() to change the font |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
329 * used to draw characters in the display. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
330 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
331 virtual void setFont(const QFont &); |
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 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
334 /** Returns the font used to draw characters in the display */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
335 QFont getVTFont() { return font(); } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
336 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
337 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
338 * Sets the font used to draw the display. Has no effect if @p font |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
339 * is larger than the size of the display itself. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
340 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
341 void setVTFont(const QFont& font); |
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 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
345 * Specified whether terminal widget should be at read-only mode |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
346 * Defaults to false. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
347 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
348 void setReadOnly( bool readonly) { _readonly = readonly; } |
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 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
351 * Specified whether anti-aliasing of text in the terminal display |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
352 * is enabled or not. Defaults to enabled. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
353 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
354 static void setAntialias( bool antialias ) { _antialiasText = antialias; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
355 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
356 * 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
|
357 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
358 static bool antialias() { return _antialiasText; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
359 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
360 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
361 * Sets whether or not the current height and width of the |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
362 * terminal in lines and columns is displayed whilst the widget |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
363 * is being resized. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
364 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
365 void setTerminalSizeHint(bool on) { _terminalSizeHint=on; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
366 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
367 * Returns whether or not the current height and width of |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
368 * 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
|
369 * is being resized. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
370 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
371 bool terminalSizeHint() { return _terminalSizeHint; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
372 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
373 * Sets whether the terminal size display is shown briefly |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
374 * after the widget is first shown. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
375 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
376 * See setTerminalSizeHint() , isTerminalSizeHint() |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
377 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
378 void setTerminalSizeStartup(bool on) { _terminalSizeStartup=on; } |
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 void setBidiEnabled(bool set) { _bidiEnabled=set; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
381 bool isBidiEnabled() { return _bidiEnabled; } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
382 |
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 * 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
|
385 * 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
|
386 * the associated terminal screen window. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
387 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
388 * 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
|
389 * by the TerminalDisplay. |
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 void setScreenWindow( ScreenWindow* window ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
392 /** 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
|
393 ScreenWindow* screenWindow() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
394 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
395 static bool HAVE_TRANSPARENCY; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
396 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
397 public slots: |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
398 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
399 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
400 * 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
|
401 * terminal screen ( see setScreenWindow() ) and redraw the display. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
402 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
403 void updateImage(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
404 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
405 * Causes the terminal display to fetch the latest line status flags from the |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
406 * associated terminal screen ( see setScreenWindow() ). |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
407 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
408 void updateLineProperties(); |
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 /** Copies the selected text to the clipboard. */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
411 void copyClipboard(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
412 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
413 * Pastes the content of the clipboard into the |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
414 * display. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
415 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
416 void pasteClipboard(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
417 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
418 * Pastes the content of the selection into the |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
419 * display. |
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 void pasteSelection(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
422 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
423 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
424 * 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
|
425 * 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
|
426 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
427 * @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
|
428 * 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
|
429 * the warning message should disappear. |
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 void outputSuspended(bool suspended); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
432 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
433 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
434 * 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
|
435 * is interested in mouse events. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
436 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
437 * 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
|
438 * or otherwise moves the mouse inside the view. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
439 * The user interaction needed to create selections will also change, and the user will be required |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
440 * to hold down the shift key to create a selection or perform other mouse activities inside the |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
441 * 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
|
442 * events itself. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
443 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
444 * @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
|
445 * or false otherwise. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
446 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
447 void setUsesMouse(bool usesMouse); |
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 /** See setUsesMouse() */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
450 bool usesMouse() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
451 |
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 * Shows a notification that a bell event has occurred in the terminal. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
454 * TODO: More documentation here |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
455 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
456 void bell(const QString& message); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
457 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
458 signals: |
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 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
461 * 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
|
462 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
463 void keyPressedSignal(QKeyEvent *e); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
464 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
465 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
466 * Emitted when the user presses the suspend or resume flow control key combinations |
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 * @param suspend true if the user pressed Ctrl+S (the suspend output key combination) or |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
469 * false if the user pressed Ctrl+Q (the resume output key combination) |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
470 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
471 void flowControlKeyPressed(bool suspend); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
472 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
473 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
474 * A mouse event occurred. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
475 * @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
|
476 * @param column The character column where the event occurred |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
477 * @param line The character row where the event occurred |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
478 * @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
|
479 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
480 void mouseSignal(int button, int column, int line, int eventType); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
481 void changedFontMetricSignal(int height, int width); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
482 void changedContentSizeSignal(int height, int width); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
483 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
484 /** |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
485 * 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
|
486 * key held down if usesMouse() is true. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
487 * |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
488 * This can be used to display a context menu. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
489 */ |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
490 void configureRequest( TerminalView*, int state, const QPoint& position ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
491 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
492 void isBusySelecting(bool); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
493 void sendStringToEmu(const char*); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
494 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
495 void tripleClicked( const QString& text ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
496 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
497 protected: |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
498 virtual bool event( QEvent * ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
499 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
500 virtual void paintEvent( QPaintEvent * ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
501 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
502 virtual void showEvent(QShowEvent*); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
503 virtual void hideEvent(QHideEvent*); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
504 virtual void resizeEvent(QResizeEvent*); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
505 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
506 virtual void fontChange(const QFont &font); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
507 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
508 virtual void keyPressEvent(QKeyEvent* event); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
509 virtual void mouseDoubleClickEvent(QMouseEvent* ev); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
510 virtual void mousePressEvent( QMouseEvent* ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
511 virtual void mouseReleaseEvent( QMouseEvent* ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
512 virtual void mouseMoveEvent( QMouseEvent* ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
513 virtual void extendSelection( const QPoint& pos ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
514 virtual void wheelEvent( QWheelEvent* ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
515 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
516 virtual bool focusNextPrevChild( bool next ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
517 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
518 // drag and drop |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
519 virtual void dragEnterEvent(QDragEnterEvent* event); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
520 virtual void dropEvent(QDropEvent* event); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
521 void doDrag(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
522 enum DragState { diNone, diPending, diDragging }; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
523 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
524 struct _dragInfo { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
525 DragState state; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
526 QPoint start; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
527 QDrag *dragObject; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
528 } dragInfo; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
529 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
530 virtual int charClass(quint16) const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
531 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
532 void clearImage(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
533 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
534 void mouseTripleClickEvent(QMouseEvent* ev); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
535 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
536 // reimplemented |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
537 virtual void inputMethodEvent ( QInputMethodEvent* event ); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
538 virtual QVariant inputMethodQuery( Qt::InputMethodQuery query ) const; |
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 protected slots: |
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 void scrollBarPositionChanged(int value); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
543 void blinkEvent(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
544 void blinkCursorEvent(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
545 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
546 //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
|
547 //after emitting the first in a sequence of bell events. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
548 void enableBell(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
549 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
550 private slots: |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
551 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
552 void swapColorTable(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
553 void tripleClickTimeout(); // resets possibleTripleClick |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
554 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
555 private: |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
556 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
557 // -- Drawing helpers -- |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
558 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
559 // divides the part of the display specified by 'rect' into |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
560 // fragments according to their colors and styles and calls |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
561 // drawTextFragment() to draw the fragments |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
562 void drawContents(QPainter &paint, const QRect &rect); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
563 // 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
|
564 // has a common color and style |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
565 void drawTextFragment(QPainter& painter, const QRect& rect, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
566 const QString& text, const Character* style); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
567 // draws the background for a text fragment |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
568 // 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
|
569 // the display's transparency (set with setOpacity()), otherwise the background |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
570 // will be drawn fully opaque |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
571 void drawBackground(QPainter& painter, const QRect& rect, const QColor& color, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
572 bool useOpacitySetting); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
573 // draws the cursor character |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
574 void drawCursor(QPainter& painter, const QRect& rect , const QColor& foregroundColor, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
575 const QColor& backgroundColor , bool& invertColors); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
576 // draws the characters or line graphics in a text fragment |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
577 void drawCharacters(QPainter& painter, const QRect& rect, const QString& text, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
578 const Character* style, bool invertCharacterColor); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
579 // draws a string of line graphics |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
580 void drawLineCharString(QPainter& painter, int x, int y, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
581 const QString& str, const Character* attributes); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
582 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
583 // draws the preedit string for input methods |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
584 void drawInputMethodPreeditString(QPainter& painter , const QRect& rect); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
585 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
586 // -- |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
587 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
588 // maps an area in the character image to an area on the widget |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
589 QRect imageToWidget(const QRect& imageArea) const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
590 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
591 // maps a point on the widget to the position ( ie. line and column ) |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
592 // of the character at that point. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
593 void getCharacterPosition(const QPoint& widgetPoint,int& line,int& column) const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
594 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
595 // 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
|
596 QRect preeditRect() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
597 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
598 // 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
|
599 // current size in columns and lines |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
600 void showResizeNotification(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
601 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
602 // scrolls the image by a number of lines. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
603 // 'lines' may be positive ( to scroll the image down ) |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
604 // or negative ( to scroll the image up ) |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
605 // '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
|
606 // 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
|
607 // the left and right are ignored. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
608 void scrollImage(int lines , const QRect& region); |
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 void calcGeometry(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
611 void propagateSize(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
612 void updateImageSize(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
613 void makeImage(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
614 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
615 void paintFilters(QPainter& painter); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
616 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
617 // 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
|
618 // a hotspot |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
619 QRegion hotSpotRegion() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
620 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
621 // returns the position of the cursor in columns and lines |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
622 QPoint cursorPosition() const; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
623 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
624 // the window onto the terminal screen which this display |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
625 // is currently showing. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
626 QPointer<ScreenWindow> _screenWindow; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
627 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
628 bool _allowBell; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
629 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
630 QGridLayout* _gridLayout; |
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 bool _fixedFont; // has fixed pitch |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
633 int _fontHeight; // height |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
634 int _fontWidth; // width |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
635 int _fontAscent; // ascend |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
636 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
637 int _leftMargin; // offset |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
638 int _topMargin; // offset |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
639 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
640 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
|
641 int _columns; // the number of columns that can be displayed in the widget |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
642 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
643 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
|
644 // 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
|
645 // than the maximum image size which can be displayed |
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 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
|
648 // 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
|
649 // than the maximum image size which can be displayed |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
650 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
651 int _contentHeight; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
652 int _contentWidth; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
653 Character* _image; // [lines][columns] |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
654 // 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
|
655 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
656 int _imageSize; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
657 QVector<LineProperty> _lineProperties; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
658 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
659 ColorEntry _colorTable[TABLE_COLORS]; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
660 uint _randomSeed; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
661 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
662 bool _resizing; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
663 bool _terminalSizeHint; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
664 bool _terminalSizeStartup; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
665 bool _bidiEnabled; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
666 bool _mouseMarks; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
667 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
668 QPoint _iPntSel; // initial selection point |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
669 QPoint _pntSel; // current selection point |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
670 QPoint _tripleSelBegin; // help avoid flicker |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
671 int _actSel; // selection state |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
672 bool _wordSelectionMode; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
673 bool _lineSelectionMode; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
674 bool _preserveLineBreaks; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
675 bool _columnSelectionMode; |
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 QClipboard* _clipboard; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
678 QScrollBar* _scrollBar; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
679 ScrollBarPosition _scrollbarLocation; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
680 QString _wordCharacters; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
681 int _bellMode; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
682 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
683 bool _blinking; // hide text in paintEvent |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
684 bool _hasBlinker; // has characters to blink |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
685 bool _cursorBlinking; // hide cursor in paintEvent |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
686 bool _hasBlinkingCursor; // has blinking cursor enabled |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
687 bool _ctrlDrag; // require Ctrl key for drag |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
688 TripleClickMode _tripleClickMode; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
689 bool _isFixedSize; //Columns / lines are locked. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
690 QTimer* _blinkTimer; // active when hasBlinker |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
691 QTimer* _blinkCursorTimer; // active when hasBlinkingCursor |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
692 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
693 // KMenu* _drop; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
694 QString _dropText; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
695 int _dndFileCount; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
696 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
697 bool _possibleTripleClick; // is set in mouseDoubleClickEvent and deleted |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
698 // after QApplication::doubleClickInterval() delay |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
699 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
700 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
701 QLabel* _resizeWidget; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
702 QTimer* _resizeTimer; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
703 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
704 bool _flowControlWarningEnabled; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
705 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
706 //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
|
707 //terminal output - informing them what has happened and how to resume output |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
708 QLabel* _outputSuspendedLabel; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
709 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
710 uint _lineSpacing; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
711 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
712 bool _colorsInverted; // true during visual bell |
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 QSize _size; |
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 QRgb _blendColor; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
717 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
718 // 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
|
719 // search highlight |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
720 TerminalImageFilterChain* _filterChain; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
721 QRect _mouseOverHotspotArea; |
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 KeyboardCursorShape _cursorShape; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
724 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
725 // custom cursor color. if this is invalid then the foreground |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
726 // color of the character under the cursor is used |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
727 QColor _cursorColor; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
728 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
729 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
730 struct InputMethodData |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
731 { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
732 QString preeditString; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
733 QRect previousPreeditRect; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
734 }; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
735 InputMethodData _inputMethodData; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
736 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
737 static bool _antialiasText; // do we antialias or not |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
738 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
739 //the delay in milliseconds between redrawing blinking text |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
740 static const int BLINK_DELAY = 500; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
741 static const int DEFAULT_LEFT_MARGIN = 1; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
742 static const int DEFAULT_TOP_MARGIN = 1; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
743 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
744 bool _readonly; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
745 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
746 public: |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
747 static void setTransparencyEnabled(bool enable) |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
748 { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
749 HAVE_TRANSPARENCY = enable; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
750 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
751 }; |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
752 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
753 #endif // TERMINALVIEW_H |