| 1 | /* |
| 2 | This file is part of Konsole, an X terminal. |
| 3 | |
| 4 | Copyright (C) 2007 by Robert Knight <[email protected]> |
| 5 | Copyright (C) 1997,1998 by Lars Doelle <[email protected]> |
| 6 | |
| 7 | Rewritten for QT4 by e_k <e_k at users.sourceforge.net>, Copyright (C)2008 |
| 8 | |
| 9 | This program is free software; you can redistribute it and/or modify |
| 10 | it under the terms of the GNU General Public License as published by |
| 11 | the Free Software Foundation; either version 2 of the License, or |
| 12 | (at your option) any later version. |
| 13 | |
| 14 | This program is distributed in the hope that it will be useful, |
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License for more details. |
| 18 | |
| 19 | You should have received a copy of the GNU General Public License |
| 20 | along with this program; if not, write to the Free Software |
| 21 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 22 | 02110-1301 USA. |
| 23 | */ |
| 24 | |
| 25 | #ifndef SESSION_H |
| 26 | #define SESSION_Hcxx . . $ `lib/Session.h:26:9`! |
| 27 | |
| 28 | #include <QStringList> |
| 29 | #include <QWidget> |
| 30 | |
| 31 | #include "Emulation.h"cxx . . $ `<file>/lib/Emulation.h`/ |
| 32 | #include "History.h"cxx . . $ `<file>/lib/History.h`/ |
| 33 | #include "ProcessInfo.h"cxx . . $ `<file>/lib/ProcessInfo.h`/ |
| 34 | |
| 35 | class KProcesscxx . . $ KProcess#; |
| 36 | |
| 37 | namespace Konsolecxx . . $ Konsole/ { |
| 38 | |
| 39 | class Emulationcxx . . $ Konsole/Emulation#; |
| 40 | class Ptycxx . . $ Konsole/Pty#; |
| 41 | class TerminalDisplaycxx . . $ Konsole/TerminalDisplay#; |
| 42 | //class ZModemDialog; |
| 43 | |
| 44 | /** |
| 45 | * Represents a terminal session consisting of a pseudo-teletype and a terminal emulation. |
| 46 | * The pseudo-teletype (or PTY) handles I/O between the terminal process and Konsole. |
| 47 | * The terminal emulation ( Emulation and subclasses ) processes the output stream from the |
| 48 | * PTY and produces a character image which is then shown on views connected to the session. |
| 49 | * |
| 50 | * Each Session can be connected to one or more views by using the addView() method. |
| 51 | * The attached views can then display output from the program running in the terminal |
| 52 | * or send input to the program in the terminal in the form of keypresses and mouse |
| 53 | * activity. |
| 54 | */ |
| 55 | class Sessioncxx . . $ Konsole/Session# : public QObjectcxx . . $ QObject# { |
| 56 | Q_OBJECTcxx . . $ Konsole/Session#tr(75d9f1c324b4579d). |
| 57 | |
| 58 | public: |
| 59 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(QString name READ nameTitle) |
| 60 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(int processId READ processId) |
| 61 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(QString keyBindings READ keyBindings WRITE setKeyBindings) |
| 62 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(QSize size READ size WRITE setSize) |
| 63 | |
| 64 | /** |
| 65 | * Constructs a new session. |
| 66 | * |
| 67 | * To start the terminal process, call the run() method, |
| 68 | * after specifying the program and arguments |
| 69 | * using setProgram() and setArguments() |
| 70 | * |
| 71 | * If no program or arguments are specified explicitly, the Session |
| 72 | * falls back to using the program specified in the SHELL environment |
| 73 | * variable. |
| 74 | */ |
| 75 | Sessioncxx . . $ Konsole/Session#Session(749de1b6ae65bddd).(QObjectcxx . . $ QObject#* parent = nullptr); |
| 76 | ~cxx . . $ Konsole/Session#`~Session`(ced63f7c635d850d).Sessioncxx . . $ Konsole/Session#() override; |
| 77 | |
| 78 | /** |
| 79 | * Returns true if the session is currently running. This will be true |
| 80 | * after run() has been called successfully. |
| 81 | */ |
| 82 | bool isRunningcxx . . $ Konsole/Session#isRunning(50ce9a9e25b4a850).() const; |
| 83 | |
| 84 | /** |
| 85 | * Sets the profile associated with this session. |
| 86 | * |
| 87 | * @param profileKey A key which can be used to obtain the current |
| 88 | * profile settings from the SessionManager |
| 89 | */ |
| 90 | void setProfileKeycxx . . $ Konsole/Session#setProfileKey(3520e46b33348bf6).(const QStringcxx . . $ QString# & profileKey); |
| 91 | /** |
| 92 | * Returns the profile key associated with this session. |
| 93 | * This can be passed to the SessionManager to obtain the current |
| 94 | * profile settings. |
| 95 | */ |
| 96 | QStringcxx . . $ QString# profileKeycxx . . $ Konsole/Session#profileKey(6ef7b6c27b00b43d).() const; |
| 97 | |
| 98 | /** |
| 99 | * Adds a new view for this session. |
| 100 | * |
| 101 | * The viewing widget will display the output from the terminal and |
| 102 | * input from the viewing widget (key presses, mouse activity etc.) |
| 103 | * will be sent to the terminal. |
| 104 | * |
| 105 | * Views can be removed using removeView(). The session is automatically |
| 106 | * closed when the last view is removed. |
| 107 | */ |
| 108 | void addViewcxx . . $ Konsole/Session#addView(d1be2bc5a38bdd21).(TerminalDisplaycxx . . $ Konsole/TerminalDisplay# * widget); |
| 109 | /** |
| 110 | * Removes a view from this session. When the last view is removed, |
| 111 | * the session will be closed automatically. |
| 112 | * |
| 113 | * @p widget will no longer display output from or send input |
| 114 | * to the terminal |
| 115 | */ |
| 116 | void removeViewcxx . . $ Konsole/Session#removeView(d1be2bc5a38bdd21).(TerminalDisplaycxx . . $ Konsole/TerminalDisplay# * widget); |
| 117 | |
| 118 | /** |
| 119 | * Returns the views connected to this session |
| 120 | */ |
| 121 | QListcxx . . $ QList#<TerminalDisplaycxx . . $ Konsole/TerminalDisplay# *> viewscxx . . $ Konsole/Session#views(575deae48586efe3).() const; |
| 122 | |
| 123 | /** |
| 124 | * Returns the terminal emulation instance being used to encode / decode |
| 125 | * characters to / from the process. |
| 126 | */ |
| 127 | Emulationcxx . . $ Konsole/Emulation# * emulationcxx . . $ Konsole/Session#emulation(6c49a54d02df9d82).() const; |
| 128 | |
| 129 | /** |
| 130 | * Returns the environment of this session as a list of strings like |
| 131 | * VARIABLE=VALUE |
| 132 | */ |
| 133 | QStringListcxx . . $ QStringList# environmentcxx . . $ Konsole/Session#environment(e1dbd5c4feadc8f5).() const; |
| 134 | /** |
| 135 | * Sets the environment for this session. |
| 136 | * @p environment should be a list of strings like |
| 137 | * VARIABLE=VALUE |
| 138 | */ |
| 139 | void setEnvironmentcxx . . $ Konsole/Session#setEnvironment(631c0101495f0328).(const QStringListcxx . . $ QStringList# & environment); |
| 140 | |
| 141 | /** Returns the unique ID for this session. */ |
| 142 | int sessionIdcxx . . $ Konsole/Session#sessionId(455f465bc33b4cdf).() const; |
| 143 | |
| 144 | /** |
| 145 | * Return the session title set by the user (ie. the program running |
| 146 | * in the terminal), or an empty string if the user has not set a custom title |
| 147 | */ |
| 148 | QStringcxx . . $ QString# userTitlecxx . . $ Konsole/Session#userTitle(6ef7b6c27b00b43d).() const; |
| 149 | |
| 150 | /** |
| 151 | * This enum describes the contexts for which separate |
| 152 | * tab title formats may be specified. |
| 153 | */ |
| 154 | enum TabTitleContextcxx . . $ Konsole/Session#TabTitleContext# { |
| 155 | /** Default tab title format */ |
| 156 | LocalTabTitlecxx . . $ Konsole/Session#LocalTabTitle., |
| 157 | /** |
| 158 | * Tab title format used session currently contains |
| 159 | * a connection to a remote computer (via SSH) |
| 160 | */ |
| 161 | RemoteTabTitlecxx . . $ Konsole/Session#RemoteTabTitle. |
| 162 | }; |
| 163 | /** |
| 164 | * Sets the format used by this session for tab titles. |
| 165 | * |
| 166 | * @param context The context whoose format should be set. |
| 167 | * @param format The tab title format. This may be a mixture |
| 168 | * of plain text and dynamic elements denoted by a '%' character |
| 169 | * followed by a letter. (eg. %d for directory). The dynamic |
| 170 | * elements available depend on the @p context |
| 171 | */ |
| 172 | void setTabTitleFormatcxx . . $ Konsole/Session#setTabTitleFormat(c8503acaf1ae823a).(TabTitleContextcxx . . $ Konsole/Session#TabTitleContext# context , const QStringcxx . . $ QString# & format); |
| 173 | /** Returns the format used by this session for tab titles. */ |
| 174 | QStringcxx . . $ QString# tabTitleFormatcxx . . $ Konsole/Session#tabTitleFormat(9aca552be220791).(TabTitleContextcxx . . $ Konsole/Session#TabTitleContext# context) const; |
| 175 | |
| 176 | |
| 177 | /** Returns the arguments passed to the shell process when run() is called. */ |
| 178 | QStringListcxx . . $ QStringList# argumentscxx . . $ Konsole/Session#arguments(e1dbd5c4feadc8f5).() const; |
| 179 | /** Returns the program name of the shell process started when run() is called. */ |
| 180 | QStringcxx . . $ QString# programcxx . . $ Konsole/Session#program(6ef7b6c27b00b43d).() const; |
| 181 | |
| 182 | /** |
| 183 | * Sets the command line arguments which the session's program will be passed when |
| 184 | * run() is called. |
| 185 | */ |
| 186 | void setArgumentscxx . . $ Konsole/Session#setArguments(631c0101495f0328).(const QStringListcxx . . $ QStringList# & arguments); |
| 187 | /** Sets the program to be executed when run() is called. */ |
| 188 | void setProgramcxx . . $ Konsole/Session#setProgram(3520e46b33348bf6).(const QStringcxx . . $ QString# & program); |
| 189 | |
| 190 | /** Returns the session's current working directory. */ |
| 191 | QStringcxx . . $ QString# initialWorkingDirectorycxx . . $ Konsole/Session#initialWorkingDirectory(4365c3963150523e).() { |
| 192 | return _initialWorkingDircxx . . $ Konsole/Session#_initialWorkingDir.; |
| 193 | } |
| 194 | |
| 195 | /** |
| 196 | * Sets the initial working directory for the session when it is run |
| 197 | * This has no effect once the session has been started. |
| 198 | */ |
| 199 | void setInitialWorkingDirectorycxx . . $ Konsole/Session#setInitialWorkingDirectory(3520e46b33348bf6).( const QStringcxx . . $ QString# & dir ); |
| 200 | |
| 201 | /** |
| 202 | * Sets the type of history store used by this session. |
| 203 | * Lines of output produced by the terminal are added |
| 204 | * to the history store. The type of history store |
| 205 | * used affects the number of lines which can be |
| 206 | * remembered before they are lost and the storage |
| 207 | * (in memory, on-disk etc.) used. |
| 208 | */ |
| 209 | void setHistoryTypecxx . . $ Konsole/Session#setHistoryType(8cdb70a5e6e0950).(const HistoryTypecxx . . $ Konsole/HistoryType# & type); |
| 210 | /** |
| 211 | * Returns the type of history store used by this session. |
| 212 | */ |
| 213 | const HistoryTypecxx . . $ Konsole/HistoryType# & historyTypecxx . . $ Konsole/Session#historyType(4823a4bab87d8bdc).() const; |
| 214 | /** |
| 215 | * Clears the history store used by this session. |
| 216 | */ |
| 217 | void clearHistorycxx . . $ Konsole/Session#clearHistory(49f6e7a06ebc5aa8).(); |
| 218 | |
| 219 | /** |
| 220 | * Enables monitoring for activity in the session. |
| 221 | * This will cause notifySessionState() to be emitted |
| 222 | * with the NOTIFYACTIVITY state flag when output is |
| 223 | * received from the terminal. |
| 224 | */ |
| 225 | void setMonitorActivitycxx . . $ Konsole/Session#setMonitorActivity(b45ddcbc8423892c).(bool); |
| 226 | /** Returns true if monitoring for activity is enabled. */ |
| 227 | bool isMonitorActivitycxx . . $ Konsole/Session#isMonitorActivity(50ce9a9e25b4a850).() const; |
| 228 | |
| 229 | /** |
| 230 | * Enables monitoring for silence in the session. |
| 231 | * This will cause notifySessionState() to be emitted |
| 232 | * with the NOTIFYSILENCE state flag when output is not |
| 233 | * received from the terminal for a certain period of |
| 234 | * time, specified with setMonitorSilenceSeconds() |
| 235 | */ |
| 236 | void setMonitorSilencecxx . . $ Konsole/Session#setMonitorSilence(b45ddcbc8423892c).(bool); |
| 237 | /** |
| 238 | * Returns true if monitoring for inactivity (silence) |
| 239 | * in the session is enabled. |
| 240 | */ |
| 241 | bool isMonitorSilencecxx . . $ Konsole/Session#isMonitorSilence(50ce9a9e25b4a850).() const; |
| 242 | /** See setMonitorSilence() */ |
| 243 | void setMonitorSilenceSecondscxx . . $ Konsole/Session#setMonitorSilenceSeconds(d4f767463ce0a6b3).(int seconds); |
| 244 | |
| 245 | /** |
| 246 | * Sets the key bindings used by this session. The bindings |
| 247 | * specify how input key sequences are translated into |
| 248 | * the character stream which is sent to the terminal. |
| 249 | * |
| 250 | * @param id The name of the key bindings to use. The |
| 251 | * names of available key bindings can be determined using the |
| 252 | * KeyboardTranslatorManager class. |
| 253 | */ |
| 254 | void setKeyBindingscxx . . $ Konsole/Session#setKeyBindings(3520e46b33348bf6).(const QStringcxx . . $ QString# & id); |
| 255 | /** Returns the name of the key bindings used by this session. */ |
| 256 | QStringcxx . . $ QString# keyBindingscxx . . $ Konsole/Session#keyBindings(6ef7b6c27b00b43d).() const; |
| 257 | |
| 258 | /** |
| 259 | * This enum describes the available title roles. |
| 260 | */ |
| 261 | enum TitleRolecxx . . $ Konsole/Session#TitleRole# { |
| 262 | /** The name of the session. */ |
| 263 | NameRolecxx . . $ Konsole/Session#NameRole., |
| 264 | /** The title of the session which is displayed in tabs etc. */ |
| 265 | DisplayedTitleRolecxx . . $ Konsole/Session#DisplayedTitleRole. |
| 266 | }; |
| 267 | |
| 268 | /** Sets the session's title for the specified @p role to @p title. */ |
| 269 | void setTitlecxx . . $ Konsole/Session#setTitle(3c5ac9fc232d1f59).(TitleRolecxx . . $ Konsole/Session#TitleRole# role , const QStringcxx . . $ QString# & title); |
| 270 | /** Returns the session's title for the specified @p role. */ |
| 271 | QStringcxx . . $ QString# titlecxx . . $ Konsole/Session#title(7af3d64a4238326e).(TitleRolecxx . . $ Konsole/Session#TitleRole# role) const; |
| 272 | /** Convenience method used to read the name property. Returns title(Session::NameRole). */ |
| 273 | QStringcxx . . $ QString# nameTitlecxx . . $ Konsole/Session#nameTitle(6ef7b6c27b00b43d).() const { |
| 274 | return titlecxx . . $ Konsole/Session#title(7af3d64a4238326e).(Sessioncxx . . $ Konsole/Session#::NameRolecxx . . $ Konsole/Session#NameRole.); |
| 275 | } |
| 276 | |
| 277 | /** Sets the name of the icon associated with this session. */ |
| 278 | void setIconNamecxx . . $ Konsole/Session#setIconName(3520e46b33348bf6).(const QStringcxx . . $ QString# & iconName); |
| 279 | /** Returns the name of the icon associated with this session. */ |
| 280 | QStringcxx . . $ QString# iconNamecxx . . $ Konsole/Session#iconName(6ef7b6c27b00b43d).() const; |
| 281 | |
| 282 | /** Sets the text of the icon associated with this session. */ |
| 283 | void setIconTextcxx . . $ Konsole/Session#setIconText(3520e46b33348bf6).(const QStringcxx . . $ QString# & iconText); |
| 284 | /** Returns the text of the icon associated with this session. */ |
| 285 | QStringcxx . . $ QString# iconTextcxx . . $ Konsole/Session#iconText(6ef7b6c27b00b43d).() const; |
| 286 | |
| 287 | /** Flag if the title/icon was changed by user/shell. */ |
| 288 | bool isTitleChangedcxx . . $ Konsole/Session#isTitleChanged(50ce9a9e25b4a850).() const; |
| 289 | |
| 290 | /** Specifies whether a utmp entry should be created for the pty used by this session. */ |
| 291 | void setAddToUtmpcxx . . $ Konsole/Session#setAddToUtmp(b45ddcbc8423892c).(bool); |
| 292 | |
| 293 | /** Sends the specified @p signal to the terminal process. */ |
| 294 | bool sendSignalcxx . . $ Konsole/Session#sendSignal(83c267b20bac841a).(int signal); |
| 295 | |
| 296 | /** |
| 297 | * Specifies whether to close the session automatically when the terminal |
| 298 | * process terminates. |
| 299 | */ |
| 300 | void setAutoClosecxx . . $ Konsole/Session#setAutoClose(b45ddcbc8423892c).(bool b) { |
| 301 | _autoClosecxx . . $ Konsole/Session#_autoClose. = b; |
| 302 | } |
| 303 | |
| 304 | /** |
| 305 | * Sets whether flow control is enabled for this terminal |
| 306 | * session. |
| 307 | */ |
| 308 | void setFlowControlEnabledcxx . . $ Konsole/Session#setFlowControlEnabled(b45ddcbc8423892c).(bool enabled); |
| 309 | |
| 310 | /** Returns whether flow control is enabled for this terminal session. */ |
| 311 | bool flowControlEnabledcxx . . $ Konsole/Session#flowControlEnabled(50ce9a9e25b4a850).() const; |
| 312 | |
| 313 | /** |
| 314 | * Sends @p text to the current foreground terminal program. |
| 315 | */ |
| 316 | void sendTextcxx . . $ Konsole/Session#sendText(7fba01612ab56717).(const QStringcxx . . $ QString# & text) const; |
| 317 | |
| 318 | void sendKeyEventcxx . . $ Konsole/Session#sendKeyEvent(9d43d107a3c26aae).(QKeyEventcxx . . $ QKeyEvent#* e) const; |
| 319 | |
| 320 | /** |
| 321 | * Returns the process id of the terminal process. |
| 322 | * This is the id used by the system API to refer to the process. |
| 323 | */ |
| 324 | int processIdcxx . . $ Konsole/Session#processId(455f465bc33b4cdf).() const; |
| 325 | |
| 326 | /** |
| 327 | * Returns the process id of the terminal's foreground process. |
| 328 | * This is initially the same as processId() but can change |
| 329 | * as the user starts other programs inside the terminal. |
| 330 | */ |
| 331 | int foregroundProcessIdcxx . . $ Konsole/Session#foregroundProcessId(455f465bc33b4cdf).() const; |
| 332 | |
| 333 | /** |
| 334 | * Returns the name of the terminal's foreground process. |
| 335 | */ |
| 336 | QStringcxx . . $ QString# foregroundProcessNamecxx . . $ Konsole/Session#foregroundProcessName(4365c3963150523e).(); |
| 337 | |
| 338 | /** |
| 339 | * Returns the current working directory of the process. |
| 340 | */ |
| 341 | QStringcxx . . $ QString# currentDircxx . . $ Konsole/Session#currentDir(4365c3963150523e).(); |
| 342 | |
| 343 | /** Returns the terminal session's window size in lines and columns. */ |
| 344 | QSizecxx . . $ QSize# sizecxx . . $ Konsole/Session#size(dc21773d1a733566).(); |
| 345 | /** |
| 346 | * Emits a request to resize the session to accommodate |
| 347 | * the specified window size. |
| 348 | * |
| 349 | * @param size The size in lines and columns to request. |
| 350 | */ |
| 351 | void setSizecxx . . $ Konsole/Session#setSize(1c5f201b4c2f0aba).(const QSizecxx . . $ QSize# & size); |
| 352 | |
| 353 | /** Sets the text codec used by this session's terminal emulation. */ |
| 354 | void setCodeccxx . . $ Konsole/Session#setCodec(ca93e7c01f42f36c).(QTextCodeccxx . . $ QTextCodec# * codec) const; |
| 355 | |
| 356 | /** |
| 357 | * Sets whether the session has a dark background or not. The session |
| 358 | * uses this information to set the COLORFGBG variable in the process's |
| 359 | * environment, which allows the programs running in the terminal to determine |
| 360 | * whether the background is light or dark and use appropriate colors by default. |
| 361 | * |
| 362 | * This has no effect once the session is running. |
| 363 | */ |
| 364 | void setDarkBackgroundcxx . . $ Konsole/Session#setDarkBackground(b45ddcbc8423892c).(bool darkBackground); |
| 365 | /** |
| 366 | * Returns true if the session has a dark background. |
| 367 | * See setDarkBackground() |
| 368 | */ |
| 369 | bool hasDarkBackgroundcxx . . $ Konsole/Session#hasDarkBackground(50ce9a9e25b4a850).() const; |
| 370 | |
| 371 | /** |
| 372 | * Attempts to get the shell program to redraw the current display area. |
| 373 | * This can be used after clearing the screen, for example, to get the |
| 374 | * shell to redraw the prompt line. |
| 375 | */ |
| 376 | void refreshcxx . . $ Konsole/Session#refresh(49f6e7a06ebc5aa8).(); |
| 377 | |
| 378 | // void startZModem(const QString &rz, const QString &dir, const QStringList &list); |
| 379 | // void cancelZModem(); |
| 380 | // bool isZModemBusy() { return _zmodemBusy; } |
| 381 | |
| 382 | /** |
| 383 | * Returns a pty slave file descriptor. |
| 384 | * This can be used for display and control |
| 385 | * a remote terminal. |
| 386 | */ |
| 387 | int getPtySlaveFdcxx . . $ Konsole/Session#getPtySlaveFd(455f465bc33b4cdf).() const; |
| 388 | |
| 389 | public slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 390 | |
| 391 | /** |
| 392 | * Starts the terminal session. |
| 393 | * |
| 394 | * This creates the terminal process and connects the teletype to it. |
| 395 | */ |
| 396 | void runcxx . . $ Konsole/Session#run(49f6e7a06ebc5aa8).(); |
| 397 | |
| 398 | /** |
| 399 | * Starts the terminal session for "as is" PTY |
| 400 | * (without the direction a data to internal terminal process). |
| 401 | * It can be used for control or display a remote/external terminal. |
| 402 | */ |
| 403 | void runEmptyPTYcxx . . $ Konsole/Session#runEmptyPTY(49f6e7a06ebc5aa8).(); |
| 404 | |
| 405 | /** |
| 406 | * Closes the terminal session. This sends a hangup signal |
| 407 | * (SIGHUP) to the terminal process and causes the done(Session*) |
| 408 | * signal to be emitted. |
| 409 | */ |
| 410 | void closecxx . . $ Konsole/Session#close(49f6e7a06ebc5aa8).(); |
| 411 | |
| 412 | /** |
| 413 | * Changes the session title or other customizable aspects of the terminal |
| 414 | * emulation display. For a list of what may be changed see the |
| 415 | * Emulation::titleChanged() signal. |
| 416 | */ |
| 417 | void setUserTitlecxx . . $ Konsole/Session#setUserTitle(4b11a7293b4ed91c).( int, const QStringcxx . . $ QString# & caption ); |
| 418 | |
| 419 | signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!: |
| 420 | |
| 421 | /** Emitted when the terminal process starts. */ |
| 422 | void startedcxx . . $ Konsole/Session#started(49f6e7a06ebc5aa8).(); |
| 423 | |
| 424 | /** |
| 425 | * Emitted when the terminal process exits. |
| 426 | */ |
| 427 | void finishedcxx . . $ Konsole/Session#finished(49f6e7a06ebc5aa8).(); |
| 428 | |
| 429 | /** |
| 430 | * Emitted when output is received from the terminal process. |
| 431 | */ |
| 432 | void receivedDatacxx . . $ Konsole/Session#receivedData(3520e46b33348bf6).( const QStringcxx . . $ QString# & text ); |
| 433 | |
| 434 | /** Emitted when the session's title has changed. */ |
| 435 | void titleChangedcxx . . $ Konsole/Session#titleChanged(49f6e7a06ebc5aa8).(); |
| 436 | |
| 437 | /** Emitted when the session's profile has changed. */ |
| 438 | void profileChangedcxx . . $ Konsole/Session#profileChanged(3520e46b33348bf6).(const QStringcxx . . $ QString# & profile); |
| 439 | |
| 440 | /** |
| 441 | * Emitted when the activity state of this session changes. |
| 442 | * |
| 443 | * @param state The new state of the session. This may be one |
| 444 | * of NOTIFYNORMAL, NOTIFYSILENCE or NOTIFYACTIVITY |
| 445 | */ |
| 446 | void stateChangedcxx . . $ Konsole/Session#stateChanged(d4f767463ce0a6b3).(int state); |
| 447 | |
| 448 | /** Emitted when a bell event occurs in the session. */ |
| 449 | void bellRequestcxx . . $ Konsole/Session#bellRequest(3520e46b33348bf6).( const QStringcxx . . $ QString# & message ); |
| 450 | |
| 451 | /** |
| 452 | * Requests that the color the text for any tabs associated with |
| 453 | * this session should be changed; |
| 454 | * |
| 455 | * TODO: Document what the parameter does |
| 456 | */ |
| 457 | void changeTabTextColorRequestcxx . . $ Konsole/Session#changeTabTextColorRequest(d4f767463ce0a6b3).(int); |
| 458 | |
| 459 | /** |
| 460 | * Requests that the background color of views on this session |
| 461 | * should be changed. |
| 462 | */ |
| 463 | void changeBackgroundColorRequestcxx . . $ Konsole/Session#changeBackgroundColorRequest(129a55e114526ad3).(const QColorcxx . . $ QColor# &); |
| 464 | |
| 465 | /** TODO: Document me. */ |
| 466 | void openUrlRequestcxx . . $ Konsole/Session#openUrlRequest(3520e46b33348bf6).(const QStringcxx . . $ QString# & url); |
| 467 | |
| 468 | /** TODO: Document me. */ |
| 469 | // void zmodemDetected(); |
| 470 | |
| 471 | /** |
| 472 | * Emitted when the terminal process requests a change |
| 473 | * in the size of the terminal window. |
| 474 | * |
| 475 | * @param size The requested window size in terms of lines and columns. |
| 476 | */ |
| 477 | void resizeRequestcxx . . $ Konsole/Session#resizeRequest(1c5f201b4c2f0aba).(const QSizecxx . . $ QSize# & size); |
| 478 | |
| 479 | /** |
| 480 | * Emitted when a profile change command is received from the terminal. |
| 481 | * |
| 482 | * @param text The text of the command. This is a string of the form |
| 483 | * "PropertyName=Value;PropertyName=Value ..." |
| 484 | */ |
| 485 | void profileChangeCommandReceivedcxx . . $ Konsole/Session#profileChangeCommandReceived(3520e46b33348bf6).(const QStringcxx . . $ QString# & text); |
| 486 | |
| 487 | /** |
| 488 | * Emitted when the flow control state changes. |
| 489 | * |
| 490 | * @param enabled True if flow control is enabled or false otherwise. |
| 491 | */ |
| 492 | void flowControlEnabledChangedcxx . . $ Konsole/Session#flowControlEnabledChanged(b45ddcbc8423892c).(bool enabled); |
| 493 | |
| 494 | /** |
| 495 | * Broker for Emulation::cursorChanged() signal |
| 496 | */ |
| 497 | void cursorChangedcxx . . $ Konsole/Session#cursorChanged(e433759c0c286c4c).(Emulationcxx . . $ Konsole/Emulation#::KeyboardCursorShapecxx . . $ Konsole/Emulation#KeyboardCursorShape# cursorShape, bool blinkingCursorEnabled); |
| 498 | |
| 499 | void silencecxx . . $ Konsole/Session#silence(49f6e7a06ebc5aa8).(); |
| 500 | void activitycxx . . $ Konsole/Session#activity(49f6e7a06ebc5aa8).(); |
| 501 | |
| 502 | private slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 503 | void donecxx . . $ Konsole/Session#done(d4f767463ce0a6b3).(int); |
| 504 | |
| 505 | // void fireZModemDetected(); |
| 506 | |
| 507 | void onReceiveBlockcxx . . $ Konsole/Session#onReceiveBlock(34d26762b42c433a).( const char * buffer, int len ); |
| 508 | void monitorTimerDonecxx . . $ Konsole/Session#monitorTimerDone(49f6e7a06ebc5aa8).(); |
| 509 | |
| 510 | void onViewSizeChangecxx . . $ Konsole/Session#onViewSizeChange(3e454b8ccf442868).(int height, int width); |
| 511 | void onEmulationSizeChangecxx . . $ Konsole/Session#onEmulationSizeChange(37ecf1dd6fafc2a).(QSizecxx . . $ QSize#); |
| 512 | |
| 513 | void activityStateSetcxx . . $ Konsole/Session#activityStateSet(d4f767463ce0a6b3).(int); |
| 514 | |
| 515 | //automatically detach views from sessions when view is destroyed |
| 516 | void viewDestroyedcxx . . $ Konsole/Session#viewDestroyed(749de1b6ae65bddd).(QObjectcxx . . $ QObject# * view); |
| 517 | |
| 518 | // void zmodemReadStatus(); |
| 519 | // void zmodemReadAndSendBlock(); |
| 520 | // void zmodemRcvBlock(const char *data, int len); |
| 521 | // void zmodemFinished(); |
| 522 | |
| 523 | private: |
| 524 | |
| 525 | void updateTerminalSizecxx . . $ Konsole/Session#updateTerminalSize(49f6e7a06ebc5aa8).(); |
| 526 | bool updateForegroundProcessInfocxx . . $ Konsole/Session#updateForegroundProcessInfo(c9857a73d68e59ba).(); |
| 527 | WIdcxx . . $ WId# windowIdcxx . . $ Konsole/Session#windowId(1c5fc1fd41a99ae7).() const; |
| 528 | |
| 529 | int _uniqueIdentifiercxx . . $ Konsole/Session#_uniqueIdentifier.; |
| 530 | |
| 531 | Ptycxx . . $ Konsole/Pty# *_shellProcesscxx . . $ Konsole/Session#_shellProcess.; |
| 532 | Emulationcxx . . $ Konsole/Emulation# * _emulationcxx . . $ Konsole/Session#_emulation.; |
| 533 | |
| 534 | QListcxx . . $ QList#<TerminalDisplaycxx . . $ Konsole/TerminalDisplay# *> _viewscxx . . $ Konsole/Session#_views.; |
| 535 | |
| 536 | bool _monitorActivitycxx . . $ Konsole/Session#_monitorActivity.; |
| 537 | bool _monitorSilencecxx . . $ Konsole/Session#_monitorSilence.; |
| 538 | bool _notifiedActivitycxx . . $ Konsole/Session#_notifiedActivity.; |
| 539 | bool _masterModecxx . . $ Konsole/Session#_masterMode.; |
| 540 | bool _autoClosecxx . . $ Konsole/Session#_autoClose.; |
| 541 | bool _wantedClosecxx . . $ Konsole/Session#_wantedClose.; |
| 542 | QTimercxx . . $ QTimer# * _monitorTimercxx . . $ Konsole/Session#_monitorTimer.; |
| 543 | |
| 544 | int _silenceSecondscxx . . $ Konsole/Session#_silenceSeconds.; |
| 545 | |
| 546 | QStringcxx . . $ QString# _nameTitlecxx . . $ Konsole/Session#_nameTitle.; |
| 547 | QStringcxx . . $ QString# _displayTitlecxx . . $ Konsole/Session#_displayTitle.; |
| 548 | QStringcxx . . $ QString# _userTitlecxx . . $ Konsole/Session#_userTitle.; |
| 549 | |
| 550 | QStringcxx . . $ QString# _localTabTitleFormatcxx . . $ Konsole/Session#_localTabTitleFormat.; |
| 551 | QStringcxx . . $ QString# _remoteTabTitleFormatcxx . . $ Konsole/Session#_remoteTabTitleFormat.; |
| 552 | |
| 553 | QStringcxx . . $ QString# _iconNamecxx . . $ Konsole/Session#_iconName.; |
| 554 | QStringcxx . . $ QString# _iconTextcxx . . $ Konsole/Session#_iconText.; // as set by: echo -en '\033]1;IconText\007 |
| 555 | bool _isTitleChangedcxx . . $ Konsole/Session#_isTitleChanged.; ///< flag if the title/icon was changed by user |
| 556 | bool _addToUtmpcxx . . $ Konsole/Session#_addToUtmp.; |
| 557 | bool _flowControlcxx . . $ Konsole/Session#_flowControl.; |
| 558 | bool _fullScriptingcxx . . $ Konsole/Session#_fullScripting.; |
| 559 | |
| 560 | QStringcxx . . $ QString# _programcxx . . $ Konsole/Session#_program.; |
| 561 | QStringListcxx . . $ QStringList# _argumentscxx . . $ Konsole/Session#_arguments.; |
| 562 | |
| 563 | QStringListcxx . . $ QStringList# _environmentcxx . . $ Konsole/Session#_environment.; |
| 564 | int _sessionIdcxx . . $ Konsole/Session#_sessionId.; |
| 565 | |
| 566 | QStringcxx . . $ QString# _initialWorkingDircxx . . $ Konsole/Session#_initialWorkingDir.; |
| 567 | |
| 568 | // ZModem |
| 569 | // bool _zmodemBusy; |
| 570 | // KProcess* _zmodemProc; |
| 571 | // ZModemDialog* _zmodemProgress; |
| 572 | |
| 573 | // Color/Font Changes by ESC Sequences |
| 574 | |
| 575 | QColorcxx . . $ QColor# _modifiedBackgroundcxx . . $ Konsole/Session#_modifiedBackground.; // as set by: echo -en '\033]11;Color\007 |
| 576 | |
| 577 | QStringcxx . . $ QString# _profileKeycxx . . $ Konsole/Session#_profileKey.; |
| 578 | |
| 579 | bool _hasDarkBackgroundcxx . . $ Konsole/Session#_hasDarkBackground.; |
| 580 | |
| 581 | ProcessInfocxx . . $ Konsole/ProcessInfo# *_foregroundProcessInfocxx . . $ Konsole/Session#_foregroundProcessInfo.; |
| 582 | int _foregroundPidcxx . . $ Konsole/Session#_foregroundPid.; |
| 583 | static int lastSessionIdcxx . . $ Konsole/Session#lastSessionId.; |
| 584 | int ptySlaveFdcxx . . $ Konsole/Session#ptySlaveFd.; |
| 585 | }; |
| 586 | |
| 587 | /** |
| 588 | * Provides a group of sessions which is divided into master and slave sessions. |
| 589 | * Activity in master sessions can be propagated to all sessions within the group. |
| 590 | * The type of activity which is propagated and method of propagation is controlled |
| 591 | * by the masterMode() flags. |
| 592 | */ |
| 593 | class SessionGroupcxx . . $ Konsole/SessionGroup# : public QObjectcxx . . $ QObject# { |
| 594 | Q_OBJECTcxx . . $ Konsole/SessionGroup#QPrivateSignal# |
| 595 | |
| 596 | public: |
| 597 | /** Constructs an empty session group. */ |
| 598 | SessionGroupcxx . . $ Konsole/SessionGroup#SessionGroup(49f6e7a06ebc5aa8).(); |
| 599 | /** Destroys the session group and removes all connections between master and slave sessions. */ |
| 600 | ~cxx . . $ Konsole/SessionGroup#`~SessionGroup`(ced63f7c635d850d).SessionGroupcxx . . $ Konsole/SessionGroup#() override; |
| 601 | |
| 602 | /** Adds a session to the group. */ |
| 603 | void addSessioncxx . . $ Konsole/SessionGroup#addSession(ef738ec9ceac78f7).( Sessioncxx . . $ Konsole/Session# * session ); |
| 604 | /** Removes a session from the group. */ |
| 605 | void removeSessioncxx . . $ Konsole/SessionGroup#removeSession(ef738ec9ceac78f7).( Sessioncxx . . $ Konsole/Session# * session ); |
| 606 | |
| 607 | /** Returns the list of sessions currently in the group. */ |
| 608 | QListcxx . . $ QList#<Sessioncxx . . $ Konsole/Session# *> sessionscxx . . $ Konsole/SessionGroup#sessions(5edbdf0cd34338c4).() const; |
| 609 | |
| 610 | /** |
| 611 | * Sets whether a particular session is a master within the group. |
| 612 | * Changes or activity in the group's master sessions may be propagated |
| 613 | * to all the sessions in the group, depending on the current masterMode() |
| 614 | * |
| 615 | * @param session The session whoose master status should be changed. |
| 616 | * @param master True to make this session a master or false otherwise |
| 617 | */ |
| 618 | void setMasterStatuscxx . . $ Konsole/SessionGroup#setMasterStatus(805765964c1e0c6f).( Sessioncxx . . $ Konsole/Session# * session , bool master ); |
| 619 | /** Returns the master status of a session. See setMasterStatus() */ |
| 620 | bool masterStatuscxx . . $ Konsole/SessionGroup#masterStatus(3a14d2907dd886d).( Sessioncxx . . $ Konsole/Session# * session ) const; |
| 621 | |
| 622 | /** |
| 623 | * This enum describes the options for propagating certain activity or |
| 624 | * changes in the group's master sessions to all sessions in the group. |
| 625 | */ |
| 626 | enum MasterModecxx . . $ Konsole/SessionGroup#MasterMode# { |
| 627 | /** |
| 628 | * Any input key presses in the master sessions are sent to all |
| 629 | * sessions in the group. |
| 630 | */ |
| 631 | CopyInputToAllcxx . . $ Konsole/SessionGroup#CopyInputToAll. = 1 |
| 632 | }; |
| 633 | |
| 634 | /** |
| 635 | * Specifies which activity in the group's master sessions is propagated |
| 636 | * to all sessions in the group. |
| 637 | * |
| 638 | * @param mode A bitwise OR of MasterMode flags. |
| 639 | */ |
| 640 | void setMasterModecxx . . $ Konsole/SessionGroup#setMasterMode(d4f767463ce0a6b3).( int mode ); |
| 641 | /** |
| 642 | * Returns a bitwise OR of the active MasterMode flags for this group. |
| 643 | * See setMasterMode() |
| 644 | */ |
| 645 | int masterModecxx . . $ Konsole/SessionGroup#masterMode(455f465bc33b4cdf).() const; |
| 646 | |
| 647 | private: |
| 648 | void connectPaircxx . . $ Konsole/SessionGroup#connectPair(9df48e0e96bba1ce).(Sessioncxx . . $ Konsole/Session# * master , Sessioncxx . . $ Konsole/Session# * other) const; |
| 649 | void disconnectPaircxx . . $ Konsole/SessionGroup#disconnectPair(9df48e0e96bba1ce).(Sessioncxx . . $ Konsole/Session# * master , Sessioncxx . . $ Konsole/Session# * other) const; |
| 650 | void connectAllcxx . . $ Konsole/SessionGroup#connectAll(b45ddcbc8423892c).(bool connect); |
| 651 | QListcxx . . $ QList#<Sessioncxx . . $ Konsole/Session# *> masterscxx . . $ Konsole/SessionGroup#masters(5edbdf0cd34338c4).() const; |
| 652 | |
| 653 | // maps sessions to their master status |
| 654 | QHashcxx . . $ QHash#<Sessioncxx . . $ Konsole/Session# *,bool> _sessionscxx . . $ Konsole/SessionGroup#_sessions.; |
| 655 | |
| 656 | int _masterModecxx . . $ Konsole/SessionGroup#_masterMode.; |
| 657 | }; |
| 658 | |
| 659 | } |
| 660 | |
| 661 | #endif |