Debian Codegraph @

lib/qtermwidget.h

raw symbols SCIP
1 /* Copyright (C) 2008 e_k ([email protected])
2
3 This library is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Library General Public
5 License as published by the Free Software Foundation; either
6 version 2 of the License, or (at your option) any later version.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17 */
18
19
20 #ifndef _Q_TERM_WIDGET
21 #define _Q_TERM_WIDGETcxx . . $ `lib/qtermwidget.h:21:9`!
22
23 #include <QTranslator>
24 #include <QWidget>
25 #include "Emulation.h"cxx . . $ `<file>/lib/Emulation.h`/
26 #include "Filter.h"cxx . . $ `<file>/lib/Filter.h`/
27
28 class QVBoxLayoutcxx . . $ QVBoxLayout#;
29 class TermWidgetImplcxx . . $ TermWidgetImpl#;
30 class SearchBarcxx . . $ SearchBar#;
31 class QUrlcxx . . $ QUrl#;
32
33 class QTermWidgetcxx . . $ QTermWidget# : public QWidgetcxx . . $ QWidget# {
34 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
35 public:
36
37 /**
38 * This enum describes the location where the scroll bar is positioned in the display widget.
39 */
40 enum ScrollBarPositioncxx . . $ QTermWidget#ScrollBarPosition# {
41 /** Do not show the scroll bar. */
42 NoScrollBarcxx . . $ QTermWidget#NoScrollBar. = 0,
43 /** Show the scroll bar on the left side of the display. */
44 ScrollBarLeftcxx . . $ QTermWidget#ScrollBarLeft. = 1,
45 /** Show the scroll bar on the right side of the display. */
46 ScrollBarRightcxx . . $ QTermWidget#ScrollBarRight. = 2
47 };
48
49 using KeyboardCursorShapecxx . . $ QTermWidget#KeyboardCursorShape# = Konsolecxx . . $ Konsole/::Emulationcxx . . $ Konsole/Emulation#::KeyboardCursorShapecxx . . $ Konsole/Emulation#KeyboardCursorShape#;
50
51 //Creation of widget
52 QTermWidgetcxx . . $ QTermWidget#QTermWidget(2a5d9dfebf5c0b7a).(int startnow, // 1 = start shell programm immediatelly
53 QWidgetcxx . . $ QWidget# * parent = nullptr);
54 // A dummy constructor for Qt Designer. startnow is 1 by default
55 QTermWidgetcxx . . $ QTermWidget#QTermWidget(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# *parent = nullptr);
56
57 ~cxx . . $ QTermWidget#`~QTermWidget`(ced63f7c635d850d).QTermWidgetcxx . . $ QTermWidget#() override;
58
59 //Initial size
60 QSizecxx . . $ QSize# sizeHintcxx . . $ QTermWidget#sizeHint(4b3b776e5ee2b367).() const override;
61
62 // expose TerminalDisplay::TerminalSizeHint, setTerminalSizeHint
63 void setTerminalSizeHintcxx . . $ QTermWidget#setTerminalSizeHint(b45ddcbc8423892c).(bool on);
64 bool terminalSizeHintcxx . . $ QTermWidget#terminalSizeHint(c9857a73d68e59ba).();
65
66 //start shell program if it was not started in constructor
67 void startShellProgramcxx . . $ QTermWidget#startShellProgram(49f6e7a06ebc5aa8).();
68
69 /**
70 * Start terminal teletype as is
71 * and redirect data for external recipient.
72 * It can be used for display and control a remote terminal.
73 */
74 void startTerminalTeletypecxx . . $ QTermWidget#startTerminalTeletype(49f6e7a06ebc5aa8).();
75
76 int getShellPIDcxx . . $ QTermWidget#getShellPID(b126dc7c1de90089).();
77
78 void changeDircxx . . $ QTermWidget#changeDir(3520e46b33348bf6).(const QStringcxx . . $ QString# & dir);
79
80 //look-n-feel, if you don`t like defaults
81
82 // Terminal font
83 // Default is application font with family Monospace, size 10
84 // Beware of a performance penalty and display/alignment issues when using a proportional font.
85 void setTerminalFontcxx . . $ QTermWidget#setTerminalFont(d0a4bd0c8524b912).(const QFontcxx . . $ QFont# & font);
86 QFontcxx . . $ QFont# getTerminalFontcxx . . $ QTermWidget#getTerminalFont(a5342c57202bca31).();
87 void setTerminalOpacitycxx . . $ QTermWidget#setTerminalOpacity(ba8836b59fb42830).(qrealcxx . . $ qreal# level);
88 void setTerminalBackgroundImagecxx . . $ QTermWidget#setTerminalBackgroundImage(3520e46b33348bf6).(const QStringcxx . . $ QString#& backgroundImage);
89 void setTerminalBackgroundModecxx . . $ QTermWidget#setTerminalBackgroundMode(d4f767463ce0a6b3).(int mode);
90
91 //environment
92 void setEnvironmentcxx . . $ QTermWidget#setEnvironment(631c0101495f0328).(const QStringListcxx . . $ QStringList# & environment);
93
94 // Shell program, default is /bin/bash
95 void setShellProgramcxx . . $ QTermWidget#setShellProgram(3520e46b33348bf6).(const QStringcxx . . $ QString# & progname);
96
97 //working directory
98 void setWorkingDirectorycxx . . $ QTermWidget#setWorkingDirectory(3520e46b33348bf6).(const QStringcxx . . $ QString# & dir);
99 QStringcxx . . $ QString# workingDirectorycxx . . $ QTermWidget#workingDirectory(4365c3963150523e).();
100
101 // Shell program args, default is none
102 void setArgscxx . . $ QTermWidget#setArgs(631c0101495f0328).(const QStringListcxx . . $ QStringList# & args);
103
104 //Text codec, default is UTF-8
105 void setTextCodeccxx . . $ QTermWidget#setTextCodec(1f30447839ed391).(QTextCodeccxx . . $ QTextCodec# * codec);
106
107 /** @brief Sets the color scheme, default is white on black
108 *
109 * @param[in] name The name of the color scheme, either returned from
110 * availableColorSchemes() or a full path to a color scheme.
111 */
112 void setColorSchemecxx . . $ QTermWidget#setColorScheme(3520e46b33348bf6).(const QStringcxx . . $ QString# & name);
113 static QStringListcxx . . $ QStringList# availableColorSchemescxx . . $ QTermWidget#availableColorSchemes(669a05bc42dd57cc).();
114 static void addCustomColorSchemeDircxx . . $ QTermWidget#addCustomColorSchemeDir(3520e46b33348bf6).(const QStringcxx . . $ QString#& custom_dir);
115
116 // History size for scrolling
117 void setHistorySizecxx . . $ QTermWidget#setHistorySize(d4f767463ce0a6b3).(int lines); //infinite if lines < 0
118
119 // Presence of scrollbar
120 void setScrollBarPositioncxx . . $ QTermWidget#setScrollBarPosition(568e8147827de94f).(ScrollBarPositioncxx . . $ QTermWidget#ScrollBarPosition#);
121
122 // Wrapped, scroll to end.
123 void scrollToEndcxx . . $ QTermWidget#scrollToEnd(49f6e7a06ebc5aa8).();
124
125 // Send some text to terminal
126 void sendTextcxx . . $ QTermWidget#sendText(3520e46b33348bf6).(const QStringcxx . . $ QString# & text);
127
128 // Send key event to terminal
129 void sendKeyEventcxx . . $ QTermWidget#sendKeyEvent(c92999c1b6b09cc0).(QKeyEventcxx . . $ QKeyEvent#* e);
130
131 // Sets whether flow control is enabled
132 void setFlowControlEnabledcxx . . $ QTermWidget#setFlowControlEnabled(b45ddcbc8423892c).(bool enabled);
133
134 // Returns whether flow control is enabled
135 bool flowControlEnabledcxx . . $ QTermWidget#flowControlEnabled(c9857a73d68e59ba).(void);
136
137 /**
138 * Sets whether the flow control warning box should be shown
139 * when the flow control stop key (Ctrl+S) is pressed.
140 */
141 void setFlowControlWarningEnabledcxx . . $ QTermWidget#setFlowControlWarningEnabled(b45ddcbc8423892c).(bool enabled);
142
143 /*! Get all available keyboard bindings
144 */
145 static QStringListcxx . . $ QStringList# availableKeyBindingscxx . . $ QTermWidget#availableKeyBindings(669a05bc42dd57cc).();
146
147 //! Return current key bindings
148 QStringcxx . . $ QString# keyBindingscxx . . $ QTermWidget#keyBindings(4365c3963150523e).();
149
150 void setMotionAfterPastingcxx . . $ QTermWidget#setMotionAfterPasting(d4f767463ce0a6b3).(int);
151
152 /** Return the number of lines in the history buffer. */
153 int historyLinesCountcxx . . $ QTermWidget#historyLinesCount(b126dc7c1de90089).();
154
155 int screenColumnsCountcxx . . $ QTermWidget#screenColumnsCount(b126dc7c1de90089).();
156 int screenLinesCountcxx . . $ QTermWidget#screenLinesCount(b126dc7c1de90089).();
157
158 void setSelectionStartcxx . . $ QTermWidget#setSelectionStart(3e454b8ccf442868).(int row, int column);
159 void setSelectionEndcxx . . $ QTermWidget#setSelectionEnd(3e454b8ccf442868).(int row, int column);
160 void getSelectionStartcxx . . $ QTermWidget#getSelectionStart(44820809252bebc4).(int& row, int& column);
161 void getSelectionEndcxx . . $ QTermWidget#getSelectionEnd(44820809252bebc4).(int& row, int& column);
162
163 /**
164 * Returns the currently selected text.
165 * @param preserveLineBreaks Specifies whether new line characters should
166 * be inserted into the returned text at the end of each terminal line.
167 */
168 QStringcxx . . $ QString# selectedTextcxx . . $ QTermWidget#selectedText(f4d483874300e612).(bool preserveLineBreaks = true);
169
170 void setMonitorActivitycxx . . $ QTermWidget#setMonitorActivity(b45ddcbc8423892c).(bool);
171 void setMonitorSilencecxx . . $ QTermWidget#setMonitorSilence(b45ddcbc8423892c).(bool);
172 void setSilenceTimeoutcxx . . $ QTermWidget#setSilenceTimeout(d4f767463ce0a6b3).(int seconds);
173
174 /** Returns the available hotspot for the given point \em pos.
175 *
176 * This method may return a nullptr if no hotspot is available.
177 *
178 * @param[in] pos The point of interest in the QTermWidget coordinates.
179 * @return Hotspot for the given position, or nullptr if no hotspot.
180 */
181 Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#* getHotSpotAtcxx . . $ QTermWidget#getHotSpotAt(53d3106549c5b2fc).(const QPointcxx . . $ QPoint#& pos) const;
182
183 /** Returns the available hotspots for the given row and column.
184 *
185 * @return Hotspot for the given position, or nullptr if no hotspot.
186 */
187 Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#* getHotSpotAtcxx . . $ QTermWidget#getHotSpotAt(a340944fd47eb4c3).(int row, int column) const;
188
189 /*
190 * Proxy for TerminalDisplay::filterActions
191 * */
192 QListcxx . . $ QList#<QActioncxx . . $ QAction#*> filterActionscxx . . $ QTermWidget#filterActions(9fc2ada70f0071b2).(const QPointcxx . . $ QPoint#& position);
193
194 /**
195 * Returns a pty slave file descriptor.
196 * This can be used for display and control
197 * a remote terminal.
198 */
199 int getPtySlaveFdcxx . . $ QTermWidget#getPtySlaveFd(455f465bc33b4cdf).() const;
200
201 /**
202 * Sets the shape of the keyboard cursor. This is the cursor drawn
203 * at the position in the terminal where keyboard input will appear.
204 */
205 void setKeyboardCursorShapecxx . . $ QTermWidget#setKeyboardCursorShape(df9f11dc433d3ca3).(KeyboardCursorShapecxx . . $ QTermWidget#KeyboardCursorShape# shape);
206
207 void setBlinkingCursorcxx . . $ QTermWidget#setBlinkingCursor(b45ddcbc8423892c).(bool blink);
208
209 /** Enables or disables bidi text in the terminal. */
210 void setBidiEnabledcxx . . $ QTermWidget#setBidiEnabled(b45ddcbc8423892c).(bool enabled);
211 bool isBidiEnabledcxx . . $ QTermWidget#isBidiEnabled(c9857a73d68e59ba).();
212
213 /**
214 * Automatically close the terminal session after the shell process exits or
215 * keep it running.
216 */
217 void setAutoClosecxx . . $ QTermWidget#setAutoClose(b45ddcbc8423892c).(bool);
218
219 QStringcxx . . $ QString# titlecxx . . $ QTermWidget#title(6ef7b6c27b00b43d).() const;
220 QStringcxx . . $ QString# iconcxx . . $ QTermWidget#icon(6ef7b6c27b00b43d).() const;
221
222 /** True if the title() or icon() was (ever) changed by the session. */
223 bool isTitleChangedcxx . . $ QTermWidget#isTitleChanged(50ce9a9e25b4a850).() const;
224
225 /** change and wrap text corresponding to paste mode **/
226 void bracketTextcxx . . $ QTermWidget#bracketText(4c89b026053e4d32).(QStringcxx . . $ QString#& text);
227
228 /** forcefully disable bracketed paste mode **/
229 void disableBracketedPasteModecxx . . $ QTermWidget#disableBracketedPasteMode(b45ddcbc8423892c).(bool disable);
230 bool bracketedPasteModeIsDisabledcxx . . $ QTermWidget#bracketedPasteModeIsDisabled(50ce9a9e25b4a850).() const;
231
232 /** Set the empty space outside the terminal */
233 void setMargincxx . . $ QTermWidget#setMargin(d4f767463ce0a6b3).(int);
234
235 /** Get the empty space outside the terminal */
236 int getMargincxx . . $ QTermWidget#getMargin(455f465bc33b4cdf).() const;
237
238 void setDrawLineCharscxx . . $ QTermWidget#setDrawLineChars(b45ddcbc8423892c).(bool drawLineChars);
239
240 void setBoldIntensecxx . . $ QTermWidget#setBoldIntense(b45ddcbc8423892c).(bool boldIntense);
241
242 void setConfirmMultilinePastecxx . . $ QTermWidget#setConfirmMultilinePaste(b45ddcbc8423892c).(bool confirmMultilinePaste);
243 void setTrimPastedTrailingNewlinescxx . . $ QTermWidget#setTrimPastedTrailingNewlines(b45ddcbc8423892c).(bool trimPastedTrailingNewlines);
244 signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!:
245 void finishedcxx . . $ QTermWidget#finished(49f6e7a06ebc5aa8).();
246 void copyAvailablecxx . . $ QTermWidget#copyAvailable(b45ddcbc8423892c).(bool);
247
248 void termGetFocuscxx . . $ QTermWidget#termGetFocus(49f6e7a06ebc5aa8).();
249 void termLostFocuscxx . . $ QTermWidget#termLostFocus(49f6e7a06ebc5aa8).();
250
251 void termKeyPressedcxx . . $ QTermWidget#termKeyPressed(c92999c1b6b09cc0).(QKeyEventcxx . . $ QKeyEvent# *);
252
253 void urlActivatedcxx . . $ QTermWidget#urlActivated(61e5b15e0cd21ddb).(const QUrlcxx . . $ QUrl#&, bool fromContextMenu);
254
255 void bellcxx . . $ QTermWidget#bell(3520e46b33348bf6).(const QStringcxx . . $ QString#& message);
256
257 void activitycxx . . $ QTermWidget#activity(49f6e7a06ebc5aa8).();
258 void silencecxx . . $ QTermWidget#silence(49f6e7a06ebc5aa8).();
259
260 /**
261 * Emitted when emulator send data to the terminal process
262 * (redirected for external recipient). It can be used for
263 * control and display the remote terminal.
264 */
265 void sendDatacxx . . $ QTermWidget#sendData(34d26762b42c433a).(const char *,int);
266
267 void profileChangedcxx . . $ QTermWidget#profileChanged(3520e46b33348bf6).(const QStringcxx . . $ QString# & profile);
268
269 void titleChangedcxx . . $ QTermWidget#titleChanged(49f6e7a06ebc5aa8).();
270
271 /**
272 * Signals that we received new data from the process running in the
273 * terminal emulator
274 */
275 void receivedDatacxx . . $ QTermWidget#receivedData(3520e46b33348bf6).(const QStringcxx . . $ QString# &text);
276
277 public slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!:
278 // Copy selection to clipboard
279 void copyClipboardcxx . . $ QTermWidget#copyClipboard(49f6e7a06ebc5aa8).();
280
281 // Paste clipboard to terminal
282 void pasteClipboardcxx . . $ QTermWidget#pasteClipboard(49f6e7a06ebc5aa8).();
283
284 // Paste selection to terminal
285 void pasteSelectioncxx . . $ QTermWidget#pasteSelection(49f6e7a06ebc5aa8).();
286
287 // Set zoom
288 void zoomIncxx . . $ QTermWidget#zoomIn(49f6e7a06ebc5aa8).();
289 void zoomOutcxx . . $ QTermWidget#zoomOut(49f6e7a06ebc5aa8).();
290
291 // Set size
292 void setSizecxx . . $ QTermWidget#setSize(1c5f201b4c2f0aba).(const QSizecxx . . $ QSize# &);
293
294 /*! Set named key binding for given widget
295 */
296 void setKeyBindingscxx . . $ QTermWidget#setKeyBindings(3520e46b33348bf6).(const QStringcxx . . $ QString# & kb);
297
298 /*! Clear the terminal content and move to home position
299 */
300 void clearcxx . . $ QTermWidget#clear(49f6e7a06ebc5aa8).();
301
302 void toggleShowSearchBarcxx . . $ QTermWidget#toggleShowSearchBar(49f6e7a06ebc5aa8).();
303
304 void saveHistorycxx . . $ QTermWidget#saveHistory(bebe8f2dee7f9e86).(QIODevicecxx . . $ QIODevice# *device);
305 protected:
306 void resizeEventcxx . . $ QTermWidget#resizeEvent(eeeec21cf8dc0387).(QResizeEventcxx . . $ QResizeEvent# *) override;
307
308 protected slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!:
309 void sessionFinishedcxx . . $ QTermWidget#sessionFinished(49f6e7a06ebc5aa8).();
310 void selectionChangedcxx . . $ QTermWidget#selectionChanged(b45ddcbc8423892c).(bool textSelected);
311
312 private slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!:
313 void findcxx . . $ QTermWidget#find(49f6e7a06ebc5aa8).();
314 void findNextcxx . . $ QTermWidget#findNext(49f6e7a06ebc5aa8).();
315 void findPreviouscxx . . $ QTermWidget#findPrevious(49f6e7a06ebc5aa8).();
316 void matchFoundcxx . . $ QTermWidget#matchFound(748afa4755bc9595).(int startColumn, int startLine, int endColumn, int endLine);
317 void noMatchFoundcxx . . $ QTermWidget#noMatchFound(49f6e7a06ebc5aa8).();
318 /**
319 * Emulation::cursorChanged() signal propogates to here and QTermWidget
320 * sends the specified cursor states to the terminal display
321 */
322 void cursorChangedcxx . . $ QTermWidget#cursorChanged(e433759c0c286c4c).(Konsolecxx . . $ Konsole/::Emulationcxx . . $ Konsole/Emulation#::KeyboardCursorShapecxx . . $ Konsole/Emulation#KeyboardCursorShape# cursorShape, bool blinkingCursorEnabled);
323
324 private:
325 void searchcxx . . $ QTermWidget#search(b0b38cda41d4ede4).(bool forwards, bool next);
326 void setZoomcxx . . $ QTermWidget#setZoom(d4f767463ce0a6b3).(int step);
327 void initcxx . . $ QTermWidget#init(d4f767463ce0a6b3).(int startnow);
328 TermWidgetImplcxx . . $ TermWidgetImpl# * m_implcxx . . $ QTermWidget#m_impl.;
329 SearchBarcxx . . $ SearchBar#* m_searchBarcxx . . $ QTermWidget#m_searchBar.;
330 QVBoxLayoutcxx . . $ QVBoxLayout# *m_layoutcxx . . $ QTermWidget#m_layout.;
331 QTranslatorcxx . . $ QTranslator# *m_translatorcxx . . $ QTermWidget#m_translator.;
332 };
333
334
335 //Maybe useful, maybe not
336
337 #ifdef __cpluspluscxx . . $ `<built-in>:470:9`!
338 extern "C"
339 #endif
340 void * createTermWidget(int startnow, void * parent);
341
342 #endif
343