| 1 |
/* |
| 2 |
This file is part of Konsole, a terminal emulator for KDE. |
| 3 |
|
| 4 |
Copyright 2006-2008 by Robert Knight <[email protected]> |
| 5 |
Copyright 1997,1998 by Lars Doelle <[email protected]> |
| 6 |
|
| 7 |
This program is free software; you can redistribute it and/or modify |
| 8 |
it under the terms of the GNU General Public License as published by |
| 9 |
the Free Software Foundation; either version 2 of the License, or |
| 10 |
(at your option) any later version. |
| 11 |
|
| 12 |
This program is distributed in the hope that it will be useful, |
| 13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
GNU General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with this program; if not, write to the Free Software |
| 19 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 20 |
02110-1301 USA. |
| 21 |
*/ |
| 22 |
|
| 23 |
// Own |
| 24 |
#include "TerminalDisplay.h"cxx . . $ `<file>/lib/TerminalDisplay.h`/ |
| 25 |
|
| 26 |
// C++ |
| 27 |
#include <cmath> |
| 28 |
|
| 29 |
// Qt |
| 30 |
#include <QAbstractButton> |
| 31 |
#include <QApplication> |
| 32 |
#include <QBoxLayout> |
| 33 |
#include <QClipboard> |
| 34 |
#include <QKeyEvent> |
| 35 |
#include <QEvent> |
| 36 |
#include <QTime> |
| 37 |
#include <QFile> |
| 38 |
#include <QGridLayout> |
| 39 |
#include <QLabel> |
| 40 |
#include <QLayout> |
| 41 |
#include <QMessageBox> |
| 42 |
#include <QPainter> |
| 43 |
#include <QPixmap> |
| 44 |
#include <QRegularExpression> |
| 45 |
#include <QScrollBar> |
| 46 |
#include <QStyle> |
| 47 |
#include <QTimer> |
| 48 |
#include <QtDebug> |
| 49 |
#include <QUrl> |
| 50 |
#include <QMimeData> |
| 51 |
#include <QDrag> |
| 52 |
|
| 53 |
// KDE |
| 54 |
//#include <kshell.h> |
| 55 |
//#include <KColorScheme> |
| 56 |
//#include <KCursor> |
| 57 |
//#include <kdebug.h> |
| 58 |
//#include <KLocale> |
| 59 |
//#include <KMenu> |
| 60 |
//#include <KNotification> |
| 61 |
//#include <KGlobalSettings> |
| 62 |
//#include <KShortcut> |
| 63 |
//#include <KIO/NetAccess> |
| 64 |
|
| 65 |
// Konsole |
| 66 |
//#include <config-apps.h> |
| 67 |
#include "Filter.h"cxx . . $ `<file>/lib/Filter.h`/ |
| 68 |
#include "konsole_wcwidth.h"cxx . . $ `<file>/lib/konsole_wcwidth.h`/ |
| 69 |
#include "ScreenWindow.h"cxx . . $ `<file>/lib/ScreenWindow.h`/ |
| 70 |
#include "TerminalCharacterDecoder.h"cxx . . $ `<file>/lib/TerminalCharacterDecoder.h`/ |
| 71 |
|
| 72 |
using namespace Konsole; |
| 73 |
|
| 74 |
#ifndef loc |
| 75 |
#define loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(X,Y) ((Y)*_columns+(X)) |
| 76 |
#endif |
| 77 |
|
| 78 |
#define yMouseScrollcxx . . $ `lib/TerminalDisplay.cpp:78:9`! 1 |
| 79 |
|
| 80 |
#define REPCHARcxx . . $ `lib/TerminalDisplay.cpp:80:9`! "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ |
| 81 |
"abcdefgjijklmnopqrstuvwxyz" \ |
| 82 |
"0123456789./+@" |
| 83 |
|
| 84 |
const ColorEntrycxx . . $ Konsole/ColorEntry# Konsolecxx . . $ Konsole/::base_color_tablecxx . . $ Konsole/base_color_table.[TABLE_COLORScxx . . $ `lib/CharacterColor.h:103:9`!] = |
| 85 |
// The following are almost IBM standard color codes, with some slight |
| 86 |
// gamma correction for the dim colors to compensate for bright X screens. |
| 87 |
// It contains the 8 ansiterm/xterm colors in 2 intensities. |
| 88 |
{ |
| 89 |
// Fixme: could add faint colors here, also. |
| 90 |
// normal |
| 91 |
ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0x00,0x00,0x00), false), ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).( QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0xB2,0xB2,0xB2), true), // Dfore, Dback |
| 92 |
ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0x00,0x00,0x00), false), ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).( QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0xB2,0x18,0x18), false), // Black, Red |
| 93 |
ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0x18,0xB2,0x18), false), ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).( QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0xB2,0x68,0x18), false), // Green, Yellow |
| 94 |
ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0x18,0x18,0xB2), false), ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).( QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0xB2,0x18,0xB2), false), // Blue, Magenta |
| 95 |
ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0x18,0xB2,0xB2), false), ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).( QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0xB2,0xB2,0xB2), false), // Cyan, White |
| 96 |
// intensiv |
| 97 |
ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0x00,0x00,0x00), false), ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).( QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0xFF,0xFF,0xFF), true), |
| 98 |
ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0x68,0x68,0x68), false), ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).( QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0xFF,0x54,0x54), false), |
| 99 |
ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0x54,0xFF,0x54), false), ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).( QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0xFF,0xFF,0x54), false), |
| 100 |
ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0x54,0x54,0xFF), false), ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).( QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0xFF,0x54,0xFF), false), |
| 101 |
ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0x54,0xFF,0xFF), false), ColorEntrycxx . . $ Konsole/ColorEntry#ColorEntry(357007224962ed03).( QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0xFF,0xFF,0xFF), false) |
| 102 |
}; |
| 103 |
|
| 104 |
// scroll increment used when dragging selection at top/bottom of window. |
| 105 |
|
| 106 |
// static |
| 107 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::_antialiasTextcxx . . $ Konsole/TerminalDisplay#_antialiasText. = true; |
| 108 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::HAVE_TRANSPARENCYcxx . . $ Konsole/TerminalDisplay#HAVE_TRANSPARENCY. = false; |
| 109 |
|
| 110 |
// we use this to force QPainter to display text in LTR mode |
| 111 |
// more information can be found in: http://unicode.org/reports/tr9/ |
| 112 |
const QCharcxx . . $ QChar# LTR_OVERRIDE_CHARcxx . . $ LTR_OVERRIDE_CHAR.( 0x202D ); |
| 113 |
|
| 114 |
/* ------------------------------------------------------------------------- */ |
| 115 |
/* */ |
| 116 |
/* Colors */ |
| 117 |
/* */ |
| 118 |
/* ------------------------------------------------------------------------- */ |
| 119 |
|
| 120 |
/* Note that we use ANSI color order (bgr), while IBMPC color order is (rgb) |
| 121 |
|
| 122 |
Code 0 1 2 3 4 5 6 7 |
| 123 |
----------- ------- ------- ------- ------- ------- ------- ------- ------- |
| 124 |
ANSI (bgr) Black Red Green Yellow Blue Magenta Cyan White |
| 125 |
IBMPC (rgb) Black Blue Green Cyan Red Magenta Yellow White |
| 126 |
*/ |
| 127 |
|
| 128 |
ScreenWindowcxx . . $ Konsole/ScreenWindow#* TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::screenWindowcxx . . $ Konsole/TerminalDisplay#screenWindow(b0bba43055925575).() const |
| 129 |
{ |
| 130 |
return _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.; |
| 131 |
} |
| 132 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setScreenWindowcxx . . $ Konsole/TerminalDisplay#setScreenWindow(f95587e758ec8843).(ScreenWindowcxx . . $ Konsole/ScreenWindow#* window) |
| 133 |
{ |
| 134 |
// disconnect existing screen window if any |
| 135 |
if ( _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) |
| 136 |
{ |
| 137 |
disconnectcxx . . $ QObject#disconnect(cc30ff19c637f8ed).( _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. , nullptr , this , nullptr ); |
| 138 |
} |
| 139 |
|
| 140 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. =cxx . . $ QPointer#`operator=`(500fb76d9e491ab0). window; |
| 141 |
|
| 142 |
if ( window ) |
| 143 |
{ |
| 144 |
connectcxx . . $ QObject#connect(835f87066c895669).(_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow., &ScreenWindowcxx . . $ Konsole/ScreenWindow#::outputChangedcxx . . $ Konsole/ScreenWindow#outputChanged(49f6e7a06ebc5aa8)., this, &TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::updateLinePropertiescxx . . $ Konsole/TerminalDisplay#updateLineProperties(49f6e7a06ebc5aa8).); |
| 145 |
connectcxx . . $ QObject#connect(835f87066c895669).(_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow., &ScreenWindowcxx . . $ Konsole/ScreenWindow#::outputChangedcxx . . $ Konsole/ScreenWindow#outputChanged(49f6e7a06ebc5aa8)., this, &TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::updateImagecxx . . $ Konsole/TerminalDisplay#updateImage(49f6e7a06ebc5aa8).); |
| 146 |
connectcxx . . $ QObject#connect(835f87066c895669).(_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow., &ScreenWindowcxx . . $ Konsole/ScreenWindow#::scrollToEndcxx . . $ Konsole/ScreenWindow#scrollToEnd(49f6e7a06ebc5aa8)., this, &TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::scrollToEndcxx . . $ Konsole/TerminalDisplay#scrollToEnd(49f6e7a06ebc5aa8).); |
| 147 |
window->setWindowLinescxx . . $ Konsole/ScreenWindow#setWindowLines(d4f767463ce0a6b3).(_linescxx . . $ Konsole/TerminalDisplay#_lines.); |
| 148 |
} |
| 149 |
} |
| 150 |
|
| 151 |
const ColorEntrycxx . . $ Konsole/ColorEntry#* TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::colorTablecxx . . $ Konsole/TerminalDisplay#colorTable(ec15202fc6ea9dfb).() const |
| 152 |
{ |
| 153 |
return _colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.; |
| 154 |
} |
| 155 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setBackgroundColorcxx . . $ Konsole/TerminalDisplay#setBackgroundColor(129a55e114526ad3).(const QColorcxx . . $ QColor#& color) |
| 156 |
{ |
| 157 |
_colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.[DEFAULT_BACK_COLORcxx . . $ `lib/CharacterColor.h:106:9`!].colorcxx . . $ Konsole/ColorEntry#color. =cxx . . $ QColor#`operator=`(a3db1be773b26671). color; |
| 158 |
QPalettecxx . . $ QPalette# p = palettecxx . . $ Konsole/TerminalDisplay#palette(d9f8a6603c6966ab).(); |
| 159 |
p.setColorcxx . . $ QPalette#setColor(4fd5272df43acd68).( backgroundRolecxx . . $ Konsole/TerminalDisplay#backgroundRole(66f9c6b7f2ab2976).(), color ); |
| 160 |
setPalettecxx . . $ Konsole/TerminalDisplay#setPalette(f826ed73d5553cd5).( p ); |
| 161 |
|
| 162 |
// Avoid propagating the palette change to the scroll bar |
| 163 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setPalettecxx . . $ QWidget#setPalette(f826ed73d5553cd5).( QApplicationcxx . . $ QApplication#::palettecxx . . $ QApplication#palette(522fbdbbff1b5a68).() ); |
| 164 |
|
| •165 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! backgroundColorChangedcxx . . $ Konsole/TerminalDisplay#backgroundColorChanged(49f6e7a06ebc5aa8).(); |
| 166 |
updatecxx . . $ Konsole/TerminalDisplay#update(49f6e7a06ebc5aa8).(); |
| 167 |
} |
| 168 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setForegroundColorcxx . . $ Konsole/TerminalDisplay#setForegroundColor(129a55e114526ad3).(const QColorcxx . . $ QColor#& color) |
| 169 |
{ |
| 170 |
_colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.[DEFAULT_FORE_COLORcxx . . $ `lib/CharacterColor.h:105:9`!].colorcxx . . $ Konsole/ColorEntry#color. =cxx . . $ QColor#`operator=`(a3db1be773b26671). color; |
| •171 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! foregroundColorChangedcxx . . $ Konsole/TerminalDisplay#foregroundColorChanged(49f6e7a06ebc5aa8).(); |
| 172 |
updatecxx . . $ Konsole/TerminalDisplay#update(49f6e7a06ebc5aa8).(); |
| 173 |
} |
| •174 |
QColorcxx . . $ QColor# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::backgroundColorcxx . . $ Konsole/TerminalDisplay#backgroundColor(6d62b116d5d1b12f).() const |
| 175 |
{ |
| 176 |
return _colorTablecxx . . $ QColor#QColor(c396aab421781ee8).[DEFAULT_BACK_COLORcxx . . $ `lib/CharacterColor.h:106:9`!].colorcxx . . $ Konsole/ColorEntry#color.; |
| 177 |
} |
| 178 |
QColorcxx . . $ QColor# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::foregroundColorcxx . . $ Konsole/TerminalDisplay#foregroundColor(6d62b116d5d1b12f).() const |
| 179 |
{ |
| 180 |
return _colorTablecxx . . $ QColor#QColor(c396aab421781ee8).[DEFAULT_FORE_COLORcxx . . $ `lib/CharacterColor.h:105:9`!].colorcxx . . $ Konsole/ColorEntry#color.; |
| 181 |
} |
| 182 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setColorTablecxx . . $ Konsole/TerminalDisplay#setColorTable(b25cc3fd5c7c482d).(const ColorEntrycxx . . $ Konsole/ColorEntry# table[]) |
| 183 |
{ |
| 184 |
for (int i = 0; i < TABLE_COLORScxx . . $ `lib/CharacterColor.h:103:9`!; i++) |
| 185 |
_colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.[i] =cxx . . $ Konsole/ColorEntry#`operator=`(281706dbae4a8f9). table[i]; |
| 186 |
|
| 187 |
setBackgroundColorcxx . . $ Konsole/TerminalDisplay#setBackgroundColor(129a55e114526ad3).(_colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.[DEFAULT_BACK_COLORcxx . . $ `lib/CharacterColor.h:106:9`!].colorcxx . . $ Konsole/ColorEntry#color.); |
| •188 |
setForegroundColorcxx . . $ Konsole/TerminalDisplay#setForegroundColor(129a55e114526ad3).(_colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.[DEFAULT_FORE_COLORcxx . . $ `lib/CharacterColor.h:105:9`!].colorcxx . . $ Konsole/ColorEntry#color.); |
| 189 |
} |
| 190 |
|
| 191 |
/* ------------------------------------------------------------------------- */ |
| 192 |
/* */ |
| 193 |
/* Font */ |
| 194 |
/* */ |
| 195 |
/* ------------------------------------------------------------------------- */ |
| 196 |
|
| 197 |
/* |
| 198 |
The VT100 has 32 special graphical characters. The usual vt100 extended |
| 199 |
xterm fonts have these at 0x00..0x1f. |
| 200 |
|
| 201 |
QT's iso mapping leaves 0x00..0x7f without any changes. But the graphicals |
| 202 |
come in here as proper unicode characters. |
| 203 |
|
| 204 |
We treat non-iso10646 fonts as VT100 extended and do the requiered mapping |
| 205 |
from unicode to 0x00..0x1f. The remaining translation is then left to the |
| 206 |
QCodec. |
| 207 |
*/ |
| 208 |
|
| 209 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::isLineCharcxx . . $ Konsole/TerminalDisplay#isLineChar(beeb25e058ed20bb).(wchar_t c) const { |
| 210 |
return _drawLineCharscxx . . $ Konsole/TerminalDisplay#_drawLineChars. && ((c & 0xFF80) == 0x2500); |
| 211 |
} |
| 212 |
|
| 213 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::isLineCharStringcxx . . $ Konsole/TerminalDisplay#isLineCharString(330196f35372e4a).(const std::wstringcxx . . $ std/wstring#& string) const { |
| 214 |
return (string.lengthcxx . . $ std/__cxx11/basic_string#length(6f8bd5c0ea8fb29a).() > 0) && (isLineCharcxx . . $ Konsole/TerminalDisplay#isLineChar(beeb25e058ed20bb).(string[cxx . . $ std/__cxx11/basic_string#`operator[]`(dd01cf3f78ddc127).0])); |
| 215 |
} |
| 216 |
|
| 217 |
|
| 218 |
// assert for i in [0..31] : vt100extended(vt100_graphics[i]) == i. |
| 219 |
|
| 220 |
unsigned short Konsolecxx . . $ Konsole/::vt100_graphicscxx . . $ Konsole/vt100_graphics.[32] = |
| 221 |
{ // 0/8 1/9 2/10 3/11 4/12 5/13 6/14 7/15 |
| 222 |
0x0020, 0x25C6, 0x2592, 0x2409, 0x240c, 0x240d, 0x240a, 0x00b0, |
| 223 |
0x00b1, 0x2424, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, |
| 224 |
0xF800, 0xF801, 0x2500, 0xF803, 0xF804, 0x251c, 0x2524, 0x2534, |
| 225 |
0x252c, 0x2502, 0x2264, 0x2265, 0x03C0, 0x2260, 0x00A3, 0x00b7 |
| 226 |
}; |
| 227 |
|
| 228 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::fontChangecxx . . $ Konsole/TerminalDisplay#fontChange(d0a4bd0c8524b912).(const QFontcxx . . $ QFont#&) |
| 229 |
{ |
| 230 |
QFontMetricscxx . . $ QFontMetrics# fmcxx . . $ QFontMetrics#QFontMetrics(d0a4bd0c8524b912).(fontcxx . . $ Konsole/TerminalDisplay#font(9958934e48c66a6a).()); |
| 231 |
_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. = fm.heightcxx . . $ QFontMetrics#height(455f465bc33b4cdf).() + _lineSpacingcxx . . $ Konsole/TerminalDisplay#_lineSpacing.; |
| 232 |
|
| 233 |
// waba TerminalDisplay 1.123: |
| 234 |
// "Base character width on widest ASCII character. This prevents too wide |
| 235 |
// characters in the presence of double wide (e.g. Japanese) characters." |
| 236 |
// Get the width from representative normal width characters |
| 237 |
_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. = qRoundcxx . . $ qRound(620b9ac44d2573a6).((double)fm.widthcxx . . $ QFontMetrics#width(91f46685ef4c12b5).(QLatin1Stringcxx . . $ QString#QString(4641beeb24e75d60).(REPCHARcxx . . $ `lib/TerminalDisplay.cpp:80:9`!))/(double)qstrlencxx . . $ qstrlen(c61c63047ce273de).(REPCHARcxx . . $ `lib/TerminalDisplay.cpp:80:9`!)); |
| 238 |
|
| 239 |
_fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont. = true; |
| 240 |
|
| 241 |
int fw = fm.widthcxx . . $ QFontMetrics#width(cb11a8ddef27242a).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).(REPCHARcxx . . $ `lib/TerminalDisplay.cpp:80:9`![0])); |
| 242 |
for(unsigned int i=1; i< qstrlencxx . . $ qstrlen(c61c63047ce273de).(REPCHARcxx . . $ `lib/TerminalDisplay.cpp:80:9`!); i++) |
| 243 |
{ |
| 244 |
if (fw != fm.widthcxx . . $ QFontMetrics#width(cb11a8ddef27242a).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).(REPCHARcxx . . $ `lib/TerminalDisplay.cpp:80:9`![i]))) |
| 245 |
{ |
| 246 |
_fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont. = false; |
| 247 |
break; |
| 248 |
} |
| 249 |
} |
| 250 |
|
| 251 |
if (_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. < 1) |
| 252 |
_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth.=1; |
| 253 |
|
| 254 |
_fontAscentcxx . . $ Konsole/TerminalDisplay#_fontAscent. = fm.ascentcxx . . $ QFontMetrics#ascent(455f465bc33b4cdf).(); |
| 255 |
|
| 256 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! changedFontMetricSignalcxx . . $ Konsole/TerminalDisplay#changedFontMetricSignal(3e454b8ccf442868).( _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight., _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. ); |
| 257 |
propagateSizecxx . . $ Konsole/TerminalDisplay#propagateSize(49f6e7a06ebc5aa8).(); |
| 258 |
updatecxx . . $ Konsole/TerminalDisplay#update(49f6e7a06ebc5aa8).(); |
| 259 |
} |
| 260 |
|
| 261 |
//void TerminalDisplay::calDrawTextAdditionHeight(QPainter& painter) |
| 262 |
//{ |
| 263 |
// QRect test_rect, feedback_rect; |
| 264 |
// test_rect.setRect(1, 1, _fontWidth * 4, _fontHeight); |
| 265 |
// painter.drawText(test_rect, Qt::AlignBottom, LTR_OVERRIDE_CHAR + QLatin1String("Mq"), &feedback_rect); |
| 266 |
|
| 267 |
// //qDebug() << "test_rect:" << test_rect << "feeback_rect:" << feedback_rect; |
| 268 |
|
| 269 |
// _drawTextAdditionHeight = (feedback_rect.height() - _fontHeight) / 2; |
| 270 |
// if(_drawTextAdditionHeight < 0) { |
| 271 |
// _drawTextAdditionHeight = 0; |
| 272 |
// } |
| 273 |
|
| 274 |
// _drawTextTestFlag = false; |
| 275 |
//} |
| 276 |
|
| 277 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setVTFontcxx . . $ Konsole/TerminalDisplay#setVTFont(d0a4bd0c8524b912).(const QFontcxx . . $ QFont#& f) |
| 278 |
{ |
| 279 |
QFontcxx . . $ QFont# font = fcxx . . $ QFont#QFont(d0a4bd0c8524b912).; |
| 280 |
|
| 281 |
// This was originally set for OS X only: |
| 282 |
// mac uses floats for font width specification. |
| 283 |
// this ensures the same handling for all platforms |
| 284 |
// but then there was revealed that various Linux distros |
| 285 |
// have this problem too... |
| 286 |
font.setStyleStrategycxx . . $ QFont#setStyleStrategy(4368996cc451f1f7).(QFontcxx . . $ QFont#::ForceIntegerMetricscxx . . $ QFont#ForceIntegerMetrics.); |
| 287 |
|
| 288 |
QFontMetricscxx . . $ QFontMetrics# metricscxx . . $ QFontMetrics#QFontMetrics(d0a4bd0c8524b912).(font); |
| 289 |
|
| 290 |
if ( !QFontInfocxx . . $ QFontInfo#QFontInfo(d0a4bd0c8524b912).(font).fixedPitchcxx . . $ QFontInfo#fixedPitch(50ce9a9e25b4a850).() ) |
| 291 |
{ |
| 292 |
qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Using a variable-width font in the terminal. This may cause performance degradation and display/alignment errors."; |
| 293 |
} |
| 294 |
|
| 295 |
// hint that text should be drawn without anti-aliasing. |
| 296 |
// depending on the user's font configuration, this may not be respected |
| 297 |
if (!_antialiasTextcxx . . $ Konsole/TerminalDisplay#_antialiasText.) |
| 298 |
font.setStyleStrategycxx . . $ QFont#setStyleStrategy(4368996cc451f1f7).( QFontcxx . . $ QFont#::NoAntialiascxx . . $ QFont#NoAntialias. ); |
| 299 |
|
| 300 |
// experimental optimization. Konsole assumes that the terminal is using a |
| 301 |
// mono-spaced font, in which case kerning information should have an effect. |
| 302 |
// Disabling kerning saves some computation when rendering text. |
| 303 |
font.setKerningcxx . . $ QFont#setKerning(b45ddcbc8423892c).(false); |
| 304 |
|
| 305 |
m_fontcxx . . $ Konsole/TerminalDisplay#m_font. =cxx . . $ QFont#`operator=`(49a3a30190653d0b). font; |
| 306 |
fontChangecxx . . $ Konsole/TerminalDisplay#fontChange(d0a4bd0c8524b912).(font); |
| 307 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! vtFontChangedcxx . . $ Konsole/TerminalDisplay#vtFontChanged(49f6e7a06ebc5aa8).(); |
| 308 |
} |
| 309 |
|
| 310 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setBoldIntensecxx . . $ Konsole/TerminalDisplay#setBoldIntense(b45ddcbc8423892c).(bool value) |
| 311 |
{ |
| 312 |
if ( _boldIntensecxx . . $ Konsole/TerminalDisplay#_boldIntense. != value ) { |
| 313 |
_boldIntensecxx . . $ Konsole/TerminalDisplay#_boldIntense. = value; |
| 314 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! boldIntenseChangedcxx . . $ Konsole/TerminalDisplay#boldIntenseChanged(49f6e7a06ebc5aa8).(); |
| 315 |
} |
| 316 |
} |
| 317 |
|
| 318 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setFontcxx . . $ Konsole/TerminalDisplay#setFont(d0a4bd0c8524b912).(const QFontcxx . . $ QFont# &f) |
| 319 |
{ |
| 320 |
Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(f); |
| 321 |
// ignore font change request if not coming from konsole itself |
| 322 |
} |
| 323 |
|
| 324 |
/* ------------------------------------------------------------------------- */ |
| 325 |
/* */ |
| 326 |
/* Constructor / Destructor */ |
| 327 |
/* */ |
| 328 |
/* ------------------------------------------------------------------------- */ |
| 329 |
|
| 330 |
TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::TerminalDisplaycxx . . $ Konsole/TerminalDisplay#TerminalDisplay(28aa4acb8f529eea).(QQuickItemcxx . . $ QQuickItem# *parent) |
| 331 |
:QQuickPaintedItemcxx . . $ QQuickPaintedItem#(parent) |
| 332 |
,_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.(nullptr) |
| 333 |
,_allowBellcxx . . $ Konsole/TerminalDisplay#_allowBell.(true) |
| 334 |
,_gridLayoutcxx . . $ Konsole/TerminalDisplay#_gridLayout.(nullptr) |
| 335 |
,_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.(1) |
| 336 |
,_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth.(1) |
| 337 |
,_fontAscentcxx . . $ Konsole/TerminalDisplay#_fontAscent.(1) |
| 338 |
,_boldIntensecxx . . $ Konsole/TerminalDisplay#_boldIntense.(true) |
| 339 |
,_linescxx . . $ Konsole/TerminalDisplay#_lines.(1) |
| 340 |
,_columnscxx . . $ Konsole/TerminalDisplay#_columns.(1) |
| 341 |
,_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines.(1) |
| 342 |
,_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.(1) |
| 343 |
,_contentHeightcxx . . $ Konsole/TerminalDisplay#_contentHeight.(1) |
| 344 |
,_contentWidthcxx . . $ Konsole/TerminalDisplay#_contentWidth.(1) |
| 345 |
,_imagecxx . . $ Konsole/TerminalDisplay#_image.(nullptr) |
| 346 |
,_randomSeedcxx . . $ Konsole/TerminalDisplay#_randomSeed.(0) |
| 347 |
,_resizingcxx . . $ Konsole/TerminalDisplay#_resizing.(false) |
| 348 |
,_terminalSizeHintcxx . . $ Konsole/TerminalDisplay#_terminalSizeHint.(false) |
| 349 |
,_terminalSizeStartupcxx . . $ Konsole/TerminalDisplay#_terminalSizeStartup.(true) |
| 350 |
,_bidiEnabledcxx . . $ Konsole/TerminalDisplay#_bidiEnabled.(false) |
| 351 |
,_mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks.(false) |
| 352 |
,_disabledBracketedPasteModecxx . . $ Konsole/TerminalDisplay#_disabledBracketedPasteMode.(false) |
| 353 |
,_actSelcxx . . $ Konsole/TerminalDisplay#_actSel.(0) |
| 354 |
,_wordSelectionModecxx . . $ Konsole/TerminalDisplay#_wordSelectionMode.(false) |
| 355 |
,_lineSelectionModecxx . . $ Konsole/TerminalDisplay#_lineSelectionMode.(false) |
| 356 |
,_preserveLineBreakscxx . . $ Konsole/TerminalDisplay#_preserveLineBreaks.(false) |
| 357 |
,_columnSelectionModecxx . . $ Konsole/TerminalDisplay#_columnSelectionMode.(false) |
| 358 |
,_scrollbarLocationcxx . . $ Konsole/TerminalDisplay#_scrollbarLocation.(QTermWidgetcxx . . $ QTermWidget#::NoScrollBarcxx . . $ QTermWidget#NoScrollBar.) |
| 359 |
,_wordCharacterscxx . . $ Konsole/TerminalDisplay#_wordCharacters.(QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).(":@-./_~")) |
| 360 |
,_bellModecxx . . $ Konsole/TerminalDisplay#_bellMode.(SystemBeepBellcxx . . $ Konsole/TerminalDisplay#SystemBeepBell.) |
| 361 |
,_blinkingcxx . . $ Konsole/TerminalDisplay#_blinking.(false) |
| 362 |
,_hasBlinkercxx . . $ Konsole/TerminalDisplay#_hasBlinker.(false) |
| 363 |
,_cursorBlinkingcxx . . $ Konsole/TerminalDisplay#_cursorBlinking.(false) |
| 364 |
,_hasBlinkingCursorcxx . . $ Konsole/TerminalDisplay#_hasBlinkingCursor.(false) |
| 365 |
,_allowBlinkingTextcxx . . $ Konsole/TerminalDisplay#_allowBlinkingText.(true) |
| 366 |
,_ctrlDragcxx . . $ Konsole/TerminalDisplay#_ctrlDrag.(false) |
| 367 |
,_tripleClickModecxx . . $ Konsole/TerminalDisplay#_tripleClickMode.(SelectWholeLinecxx . . $ Konsole/TerminalDisplay#SelectWholeLine.) |
| 368 |
,_isFixedSizecxx . . $ Konsole/TerminalDisplay#_isFixedSize.(false) |
| 369 |
,_possibleTripleClickcxx . . $ Konsole/TerminalDisplay#_possibleTripleClick.(false) |
| 370 |
,_resizeWidgetcxx . . $ Konsole/TerminalDisplay#_resizeWidget.(nullptr) |
| 371 |
,_resizeTimercxx . . $ Konsole/TerminalDisplay#_resizeTimer.(nullptr) |
| 372 |
,_flowControlWarningEnabledcxx . . $ Konsole/TerminalDisplay#_flowControlWarningEnabled.(false) |
| 373 |
,_outputSuspendedLabelcxx . . $ Konsole/TerminalDisplay#_outputSuspendedLabel.(nullptr) |
| 374 |
,_lineSpacingcxx . . $ Konsole/TerminalDisplay#_lineSpacing.(0) |
| •375 |
,_colorSchemeRefcxx . . $ Konsole/TerminalDisplay#_colorSchemeRef.(0) |
| 376 |
,_colorsInvertedcxx . . $ Konsole/TerminalDisplay#_colorsInverted.(false) |
| 377 |
,_opacitycxx . . $ Konsole/TerminalDisplay#_opacity.(static_cast<qrealcxx . . $ qreal#>(1)) |
| 378 |
,_backgroundModecxx . . $ Konsole/TerminalDisplay#_backgroundMode.(Nonecxx . . $ Konsole/None.) |
| 379 |
,_filterChaincxx . . $ Konsole/TerminalDisplay#_filterChain.(new TerminalImageFilterChaincxx . . $ Konsole/TerminalImageFilterChain#()) |
| 380 |
,_cursorShapecxx . . $ Konsole/TerminalDisplay#_cursorShape.(Emulationcxx . . $ Konsole/Emulation#::KeyboardCursorShapecxx . . $ Konsole/Emulation#KeyboardCursorShape#::BlockCursorcxx . . $ Konsole/Emulation#KeyboardCursorShape#BlockCursor.) |
| 381 |
,mMotionAfterPastingcxx . . $ Konsole/TerminalDisplay#mMotionAfterPasting.(NoMoveScreenWindowcxx . . $ Konsole/NoMoveScreenWindow.) |
| 382 |
,m_fontcxx . . $ Konsole/TerminalDisplay#m_font.("Monospace"cxx . . $ QString#QString(85c52e162fed56f9)., 12) |
| 383 |
,m_color_rolecxx . . $ Konsole/TerminalDisplay#m_color_role.(QPalettecxx . . $ QPalette#::Backgroundcxx . . $ QPalette#Background.) |
| 384 |
,m_full_cursor_heightcxx . . $ Konsole/TerminalDisplay#m_full_cursor_height.(false) |
| 385 |
,_leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin.(1) |
| 386 |
,_topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin.(1) |
| 387 |
,_drawLineCharscxx . . $ Konsole/TerminalDisplay#_drawLineChars.(true) |
| 388 |
{ |
| 389 |
// terminal applications are not designed with Right-To-Left in mind, |
| 390 |
// so the layout is forced to Left-To-Right |
| 391 |
//setLayoutDirection(Qt::LeftToRight); |
| 392 |
|
| 393 |
// The offsets are not yet calculated. |
| 394 |
// Do not calculate these too often to be more smoothly when resizing |
| 395 |
// konsole in opaque mode. |
| 396 |
_topMargincxx . . $ Konsole/TerminalDisplay#_topMargin. = _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin.; |
| 397 |
_leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin. = _leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin.; |
| 398 |
|
| 399 |
m_palettecxx . . $ Konsole/TerminalDisplay#m_palette. =cxx . . $ QPalette#`operator=`(3b0e55c770d77b23). qAppcxx . . $ `<external>/6022697617041041825/qapplication.h:70:9`!->palettecxx . . $ QGuiApplication#palette(522fbdbbff1b5a68).(); |
| 400 |
|
| 401 |
setVTFontcxx . . $ Konsole/TerminalDisplay#setVTFont(d0a4bd0c8524b912).(m_fontcxx . . $ Konsole/TerminalDisplay#m_font.); |
| 402 |
|
| 403 |
// create scroll bar for scrolling output up and down |
| 404 |
// set the scroll bar's slider to occupy the whole area of the scroll bar initially |
| 405 |
|
| 406 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar. = new QScrollBarcxx . . $ QScrollBar#QScrollBar(108f35f7aa7f3cf9).(); |
| 407 |
setScrollcxx . . $ Konsole/TerminalDisplay#setScroll(3e454b8ccf442868).(0,0); |
| 408 |
|
| 409 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setCursorcxx . . $ QWidget#setCursor(abdcfda6ee8376ea).( Qtcxx . . $ QCursor#QCursor(1a9232e7b845eb22).::ArrowCursorcxx . . $ Qt/ArrowCursor. ); |
| 410 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(valueChanged(int)), this, |
| 411 |
SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(scrollBarPositionChanged(int))); |
| 412 |
// qtermwidget: we have to hide it here due the _scrollbarLocation==NoScrollBar |
| 413 |
// check in TerminalDisplay::setScrollBarPosition(ScrollBarPosition position) |
| 414 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).(); |
| 415 |
|
| 416 |
// setup timers for blinking cursor and text |
| 417 |
_blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer. = new QTimercxx . . $ QTimer#QTimer(749de1b6ae65bddd).(this); |
| 418 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(_blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(timeout()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(blinkEvent())); |
| 419 |
_blinkCursorTimercxx . . $ Konsole/TerminalDisplay#_blinkCursorTimer. = new QTimercxx . . $ QTimer#QTimer(749de1b6ae65bddd).(this); |
| 420 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(_blinkCursorTimercxx . . $ Konsole/TerminalDisplay#_blinkCursorTimer., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(timeout()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(blinkCursorEvent())); |
| 421 |
|
| 422 |
// KCursor::setAutoHideCursor( this, true ); |
| 423 |
|
| 424 |
setUsesMousecxx . . $ Konsole/TerminalDisplay#setUsesMouse(b45ddcbc8423892c).(true); |
| 425 |
setBracketedPasteModecxx . . $ Konsole/TerminalDisplay#setBracketedPasteMode(b45ddcbc8423892c).(false); |
| 426 |
setColorTablecxx . . $ Konsole/TerminalDisplay#setColorTable(b25cc3fd5c7c482d).(base_color_tablecxx . . $ Konsole/base_color_table.); |
| 427 |
//setMouseTracking(true); |
| 428 |
|
| 429 |
setAcceptedMouseButtonscxx . . $ QQuickItem#setAcceptedMouseButtons(957a51772c477b73).(Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::LeftButtoncxx . . $ Qt/LeftButton.); |
| 430 |
|
| 431 |
setFlagscxx . . $ QQuickItem#setFlags(4b51ea829caec93d).(ItemHasContentscxx . . $ QQuickItem#ItemHasContents. |cxx . . $ `operator|`(63040c0f4034988). ItemAcceptsInputMethodcxx . . $ QQuickItem#ItemAcceptsInputMethod.); |
| 432 |
|
| 433 |
//Setup scrollbar. Be sure it is not darw on screen. |
| 434 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setAttributecxx . . $ QWidget#setAttribute(52fc7bf162518f7f).(Qtcxx . . $ Qt/::WA_DontShowOnScreencxx . . $ Qt/WA_DontShowOnScreen.); |
| 435 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(false); |
| 436 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(valueChanged(int)), this, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(scrollbarParamsChanged(int))); |
| 437 |
|
| 438 |
// TODO Forcing rendering to Framebuffer. We need to determine if this is ok |
| 439 |
// always or if we need to make this customizable. |
| 440 |
setRenderTargetcxx . . $ QQuickPaintedItem#setRenderTarget(4622fd915bedbfdd).(QQuickPaintedItemcxx . . $ QQuickPaintedItem#::FramebufferObjectcxx . . $ QQuickPaintedItem#FramebufferObject.); |
| 441 |
|
| 442 |
// setFocusPolicy( Qt::WheelFocus ); |
| 443 |
|
| 444 |
// enable input method support |
| 445 |
// setAttribute(Qt::WA_InputMethodEnabled, true); |
| 446 |
|
| 447 |
// this is an important optimization, it tells Qt |
| 448 |
// that TerminalDisplay will handle repainting its entire area. |
| 449 |
// setAttribute(Qt::WA_OpaquePaintEvent); |
| 450 |
|
| 451 |
// _gridLayout = new QGridLayout(this); |
| 452 |
// _gridLayout->setContentsMargins(0, 0, 0, 0); |
| 453 |
|
| 454 |
// new AutoScrollHandler(this); |
| 455 |
} |
| 456 |
|
| 457 |
TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::~cxx . . $ Konsole/TerminalDisplay#`~TerminalDisplay`(ced63f7c635d850d).TerminalDisplaycxx . . $ Konsole/TerminalDisplay#() |
| 458 |
{ |
| 459 |
disconnectcxx . . $ QObject#disconnect(105bbb4f746c4352).(_blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer.); |
| 460 |
disconnectcxx . . $ QObject#disconnect(105bbb4f746c4352).(_blinkCursorTimercxx . . $ Konsole/TerminalDisplay#_blinkCursorTimer.); |
| 461 |
qAppcxx . . $ `<external>/6022697617041041825/qapplication.h:70:9`!->removeEventFiltercxx . . $ QObject#removeEventFilter(749de1b6ae65bddd).( this ); |
| 462 |
|
| 463 |
delete[] _imagecxx . . $ Konsole/TerminalDisplay#_image.; |
| 464 |
|
| 465 |
delete _gridLayoutcxx . . $ Konsole/TerminalDisplay#_gridLayout.; |
| 466 |
delete _outputSuspendedLabelcxx . . $ Konsole/TerminalDisplay#_outputSuspendedLabel.; |
| 467 |
delete _filterChaincxx . . $ Konsole/TerminalDisplay#_filterChain.; |
| 468 |
} |
| 469 |
|
| 470 |
/* ------------------------------------------------------------------------- */ |
| 471 |
/* */ |
| 472 |
/* Display Operations */ |
| 473 |
/* */ |
| 474 |
/* ------------------------------------------------------------------------- */ |
| 475 |
|
| 476 |
/** |
| 477 |
A table for emulating the simple (single width) unicode drawing chars. |
| 478 |
It represents the 250x - 257x glyphs. If it's zero, we can't use it. |
| 479 |
if it's not, it's encoded as follows: imagine a 5x5 grid where the points are numbered |
| 480 |
0 to 24 left to top, top to bottom. Each point is represented by the corresponding bit. |
| 481 |
|
| 482 |
Then, the pixels basically have the following interpretation: |
| 483 |
_|||_ |
| 484 |
-...- |
| 485 |
-...- |
| 486 |
-...- |
| 487 |
_|||_ |
| 488 |
|
| 489 |
where _ = none |
| 490 |
| = vertical line. |
| 491 |
- = horizontal line. |
| 492 |
*/ |
| 493 |
|
| 494 |
|
| 495 |
enum LineEncodecxx . . $ LineEncode# |
| 496 |
{ |
| 497 |
TopLcxx . . $ TopL. = (1<<1), |
| 498 |
TopCcxx . . $ TopC. = (1<<2), |
| 499 |
TopRcxx . . $ TopR. = (1<<3), |
| 500 |
|
| 501 |
LeftTcxx . . $ LeftT. = (1<<5), |
| 502 |
Int11cxx . . $ Int11. = (1<<6), |
| 503 |
Int12cxx . . $ Int12. = (1<<7), |
| 504 |
Int13cxx . . $ Int13. = (1<<8), |
| 505 |
RightTcxx . . $ RightT. = (1<<9), |
| 506 |
|
| 507 |
LeftCcxx . . $ LeftC. = (1<<10), |
| 508 |
Int21cxx . . $ Int21. = (1<<11), |
| 509 |
Int22cxx . . $ Int22. = (1<<12), |
| 510 |
Int23cxx . . $ Int23. = (1<<13), |
| 511 |
RightCcxx . . $ RightC. = (1<<14), |
| 512 |
|
| 513 |
LeftBcxx . . $ LeftB. = (1<<15), |
| 514 |
Int31cxx . . $ Int31. = (1<<16), |
| 515 |
Int32cxx . . $ Int32. = (1<<17), |
| 516 |
Int33cxx . . $ Int33. = (1<<18), |
| 517 |
RightBcxx . . $ RightB. = (1<<19), |
| 518 |
|
| 519 |
BotLcxx . . $ BotL. = (1<<21), |
| 520 |
BotCcxx . . $ BotC. = (1<<22), |
| 521 |
BotRcxx . . $ BotR. = (1<<23) |
| 522 |
}; |
| 523 |
|
| 524 |
#include "LineFont.h"cxx . . $ `<file>/lib/LineFont.h`/ |
| 525 |
|
| 526 |
static void drawLineCharcxx . . $ drawLineChar(ac8e37f8dc34b4d).(QPaintercxx . . $ QPainter#& paint, int x, int y, int w, int h, uint8_tcxx . . $ uint8_t# code) |
| 527 |
{ |
| 528 |
//Calculate cell midpoints, end points. |
| 529 |
int cx = x + w/2; |
| 530 |
int cy = y + h/2; |
| 531 |
int ex = x + w - 1; |
| 532 |
int ey = y + h - 1; |
| 533 |
|
| 534 |
quint32cxx . . $ quint32# toDraw = LineCharscxx . . $ LineChars.[code]; |
| 535 |
|
| 536 |
//Top _lines: |
| 537 |
if (toDraw & TopLcxx . . $ TopL.) |
| 538 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx-1, y, cx-1, cy-2); |
| 539 |
if (toDraw & TopCcxx . . $ TopC.) |
| 540 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx, y, cx, cy-2); |
| 541 |
if (toDraw & TopRcxx . . $ TopR.) |
| 542 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx+1, y, cx+1, cy-2); |
| 543 |
|
| 544 |
//Bot _lines: |
| 545 |
if (toDraw & BotLcxx . . $ BotL.) |
| 546 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx-1, cy+2, cx-1, ey); |
| 547 |
if (toDraw & BotCcxx . . $ BotC.) |
| 548 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx, cy+2, cx, ey); |
| 549 |
if (toDraw & BotRcxx . . $ BotR.) |
| 550 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx+1, cy+2, cx+1, ey); |
| 551 |
|
| 552 |
//Left _lines: |
| 553 |
if (toDraw & LeftTcxx . . $ LeftT.) |
| 554 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(x, cy-1, cx-2, cy-1); |
| 555 |
if (toDraw & LeftCcxx . . $ LeftC.) |
| 556 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(x, cy, cx-2, cy); |
| 557 |
if (toDraw & LeftBcxx . . $ LeftB.) |
| 558 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(x, cy+1, cx-2, cy+1); |
| 559 |
|
| 560 |
//Right _lines: |
| 561 |
if (toDraw & RightTcxx . . $ RightT.) |
| 562 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx+2, cy-1, ex, cy-1); |
| 563 |
if (toDraw & RightCcxx . . $ RightC.) |
| 564 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx+2, cy, ex, cy); |
| 565 |
if (toDraw & RightBcxx . . $ RightB.) |
| 566 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx+2, cy+1, ex, cy+1); |
| 567 |
|
| 568 |
//Intersection points. |
| 569 |
if (toDraw & Int11cxx . . $ Int11.) |
| 570 |
paint.drawPointcxx . . $ QPainter#drawPoint(3e454b8ccf442868).(cx-1, cy-1); |
| 571 |
if (toDraw & Int12cxx . . $ Int12.) |
| 572 |
paint.drawPointcxx . . $ QPainter#drawPoint(3e454b8ccf442868).(cx, cy-1); |
| 573 |
if (toDraw & Int13cxx . . $ Int13.) |
| 574 |
paint.drawPointcxx . . $ QPainter#drawPoint(3e454b8ccf442868).(cx+1, cy-1); |
| 575 |
|
| 576 |
if (toDraw & Int21cxx . . $ Int21.) |
| 577 |
paint.drawPointcxx . . $ QPainter#drawPoint(3e454b8ccf442868).(cx-1, cy); |
| 578 |
if (toDraw & Int22cxx . . $ Int22.) |
| 579 |
paint.drawPointcxx . . $ QPainter#drawPoint(3e454b8ccf442868).(cx, cy); |
| 580 |
if (toDraw & Int23cxx . . $ Int23.) |
| 581 |
paint.drawPointcxx . . $ QPainter#drawPoint(3e454b8ccf442868).(cx+1, cy); |
| 582 |
|
| 583 |
if (toDraw & Int31cxx . . $ Int31.) |
| 584 |
paint.drawPointcxx . . $ QPainter#drawPoint(3e454b8ccf442868).(cx-1, cy+1); |
| 585 |
if (toDraw & Int32cxx . . $ Int32.) |
| 586 |
paint.drawPointcxx . . $ QPainter#drawPoint(3e454b8ccf442868).(cx, cy+1); |
| 587 |
if (toDraw & Int33cxx . . $ Int33.) |
| 588 |
paint.drawPointcxx . . $ QPainter#drawPoint(3e454b8ccf442868).(cx+1, cy+1); |
| 589 |
|
| 590 |
} |
| 591 |
|
| 592 |
static void drawOtherCharcxx . . $ drawOtherChar(ac8e37f8dc34b4d).(QPaintercxx . . $ QPainter#& paint, int x, int y, int w, int h, ucharcxx . . $ uchar# code) |
| 593 |
{ |
| 594 |
//Calculate cell midpoints, end points. |
| 595 |
const int cx = x + w / 2; |
| 596 |
const int cy = y + h / 2; |
| 597 |
const int ex = x + w - 1; |
| 598 |
const int ey = y + h - 1; |
| 599 |
|
| 600 |
// Double dashes |
| 601 |
if (0x4C <= code && code <= 0x4F) { |
| 602 |
const int xHalfGap = qMaxcxx . . $ qMax(2a338fce5842aa6a).(w / 15, 1); |
| 603 |
const int yHalfGap = qMaxcxx . . $ qMax(2a338fce5842aa6a).(h / 15, 1); |
| 604 |
switch (code) { |
| 605 |
case 0x4D: // BOX DRAWINGS HEAVY DOUBLE DASH HORIZONTAL |
| 606 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(x, cy - 1, cx - xHalfGap - 1, cy - 1); |
| 607 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(x, cy + 1, cx - xHalfGap - 1, cy + 1); |
| 608 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx + xHalfGap, cy - 1, ex, cy - 1); |
| 609 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx + xHalfGap, cy + 1, ex, cy + 1); |
| 610 |
/* Falls through. */ |
| 611 |
case 0x4C: // BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL |
| 612 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(x, cy, cx - xHalfGap - 1, cy); |
| 613 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx + xHalfGap, cy, ex, cy); |
| 614 |
break; |
| 615 |
case 0x4F: // BOX DRAWINGS HEAVY DOUBLE DASH VERTICAL |
| 616 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx - 1, y, cx - 1, cy - yHalfGap - 1); |
| 617 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx + 1, y, cx + 1, cy - yHalfGap - 1); |
| 618 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx - 1, cy + yHalfGap, cx - 1, ey); |
| 619 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx + 1, cy + yHalfGap, cx + 1, ey); |
| 620 |
/* Falls through. */ |
| 621 |
case 0x4E: // BOX DRAWINGS LIGHT DOUBLE DASH VERTICAL |
| 622 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx, y, cx, cy - yHalfGap - 1); |
| 623 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx, cy + yHalfGap, cx, ey); |
| 624 |
break; |
| 625 |
} |
| 626 |
} |
| 627 |
|
| 628 |
// Rounded corner characters |
| 629 |
else if (0x6D <= code && code <= 0x70) { |
| 630 |
const int r = w * 3 / 8; |
| 631 |
const int d = 2 * r; |
| 632 |
switch (code) { |
| 633 |
case 0x6D: // BOX DRAWINGS LIGHT ARC DOWN AND RIGHT |
| 634 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx, cy + r, cx, ey); |
| 635 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx + r, cy, ex, cy); |
| 636 |
paint.drawArccxx . . $ QPainter#drawArc(4df37d5d0c1dcce).(cx, cy, d, d, 90 * 16, 90 * 16); |
| 637 |
break; |
| 638 |
case 0x6E: // BOX DRAWINGS LIGHT ARC DOWN AND LEFT |
| 639 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx, cy + r, cx, ey); |
| 640 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(x, cy, cx - r, cy); |
| 641 |
paint.drawArccxx . . $ QPainter#drawArc(4df37d5d0c1dcce).(cx - d, cy, d, d, 0 * 16, 90 * 16); |
| 642 |
break; |
| 643 |
case 0x6F: // BOX DRAWINGS LIGHT ARC UP AND LEFT |
| 644 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx, y, cx, cy - r); |
| 645 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(x, cy, cx - r, cy); |
| 646 |
paint.drawArccxx . . $ QPainter#drawArc(4df37d5d0c1dcce).(cx - d, cy - d, d, d, 270 * 16, 90 * 16); |
| 647 |
break; |
| 648 |
case 0x70: // BOX DRAWINGS LIGHT ARC UP AND RIGHT |
| 649 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx, y, cx, cy - r); |
| 650 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cx + r, cy, ex, cy); |
| 651 |
paint.drawArccxx . . $ QPainter#drawArc(4df37d5d0c1dcce).(cx, cy - d, d, d, 180 * 16, 90 * 16); |
| 652 |
break; |
| 653 |
} |
| 654 |
} |
| 655 |
|
| 656 |
// Diagonals |
| 657 |
else if (0x71 <= code && code <= 0x73) { |
| 658 |
switch (code) { |
| 659 |
case 0x71: // BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT |
| 660 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(ex, y, x, ey); |
| 661 |
break; |
| 662 |
case 0x72: // BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT |
| 663 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(x, y, ex, ey); |
| 664 |
break; |
| 665 |
case 0x73: // BOX DRAWINGS LIGHT DIAGONAL CROSS |
| 666 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(ex, y, x, ey); |
| 667 |
paint.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(x, y, ex, ey); |
| 668 |
break; |
| 669 |
} |
| 670 |
} |
| 671 |
} |
| 672 |
|
| 673 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::drawLineCharStringcxx . . $ Konsole/TerminalDisplay#drawLineCharString(635ec380c65fbc2f).( QPaintercxx . . $ QPainter#& painter, int x, int y, const std::wstringcxx . . $ std/wstring#& str, |
| 674 |
const Charactercxx . . $ Konsole/Character#* attributes) const |
| 675 |
{ |
| 676 |
const QPencxx . . $ QPen#& currentPen = painter.pencxx . . $ QPainter#pen(c2cf52b1ccff3464).(); |
| 677 |
|
| 678 |
if ( (attributes->renditioncxx . . $ Konsole/Character#rendition. & RE_BOLDcxx . . $ `lib/Character.h:43:9`!) && _boldIntensecxx . . $ Konsole/TerminalDisplay#_boldIntense. ) |
| 679 |
{ |
| 680 |
QPencxx . . $ QPen# boldPencxx . . $ QPen#QPen(1b21ef842481f36f).(currentPen); |
| 681 |
boldPen.setWidthcxx . . $ QPen#setWidth(d4f767463ce0a6b3).(3); |
| 682 |
painter.setPencxx . . $ QPainter#setPen(af0a25dfda3214db).( boldPen ); |
| 683 |
} |
| 684 |
|
| 685 |
for (size_tcxx . . $ size_t# i=0 ; i < str.lengthcxx . . $ std/__cxx11/basic_string#length(6f8bd5c0ea8fb29a).(); i++) |
| 686 |
{ |
| 687 |
uint8_tcxx . . $ uint8_t# code = static_cast<uint8_tcxx . . $ uint8_t#>(str[cxx . . $ std/__cxx11/basic_string#`operator[]`(dd01cf3f78ddc127).i] & 0xffU); |
| 688 |
if (LineCharscxx . . $ LineChars.[code]) |
| 689 |
drawLineCharcxx . . $ drawLineChar(ac8e37f8dc34b4d).(painter, x + (_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth.*i), y, _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth., _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight., code); |
| 690 |
else |
| 691 |
drawOtherCharcxx . . $ drawOtherChar(ac8e37f8dc34b4d).(painter, x + (_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. * i), y, _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth., _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight., code); |
| 692 |
} |
| 693 |
|
| 694 |
painter.setPencxx . . $ QPainter#setPen(af0a25dfda3214db).( currentPen ); |
| 695 |
} |
| 696 |
|
| 697 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setKeyboardCursorShapecxx . . $ Konsole/TerminalDisplay#setKeyboardCursorShape(df9f11dc433d3ca3).(QTermWidgetcxx . . $ QTermWidget#::KeyboardCursorShapecxx . . $ QTermWidget#KeyboardCursorShape# shape) |
| 698 |
{ |
| 699 |
_cursorShapecxx . . $ Konsole/TerminalDisplay#_cursorShape. = shape; |
| 700 |
|
| 701 |
updateCursorcxx . . $ Konsole/TerminalDisplay#updateCursor(49f6e7a06ebc5aa8).(); |
| 702 |
} |
| 703 |
QTermWidgetcxx . . $ QTermWidget#::KeyboardCursorShapecxx . . $ QTermWidget#KeyboardCursorShape# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::keyboardCursorShapecxx . . $ Konsole/TerminalDisplay#keyboardCursorShape(a825ec257d6720a).() const |
| 704 |
{ |
| 705 |
return _cursorShapecxx . . $ Konsole/TerminalDisplay#_cursorShape.; |
| 706 |
} |
| 707 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setKeyboardCursorColorcxx . . $ Konsole/TerminalDisplay#setKeyboardCursorColor(1951bc94b747584d).(bool useForegroundColor, const QColorcxx . . $ QColor#& color) |
| 708 |
{ |
| 709 |
if (useForegroundColor) |
| 710 |
_cursorColorcxx . . $ Konsole/TerminalDisplay#_cursorColor. =cxx . . $ QColor#`operator=`(fd1b853fb77c9003). QColorcxx . . $ QColor#QColor(ced63f7c635d850d).(); // an invalid color means that |
| 711 |
// the foreground color of the |
| 712 |
// current character should |
| 713 |
// be used |
| 714 |
|
| 715 |
else |
| 716 |
_cursorColorcxx . . $ Konsole/TerminalDisplay#_cursorColor. =cxx . . $ QColor#`operator=`(a3db1be773b26671). color; |
| 717 |
} |
| 718 |
QColorcxx . . $ QColor# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::keyboardCursorColorcxx . . $ Konsole/TerminalDisplay#keyboardCursorColor(6d62b116d5d1b12f).() const |
| 719 |
{ |
| 720 |
return _cursorColorcxx . . $ QColor#QColor(c396aab421781ee8).; |
| 721 |
} |
| 722 |
|
| 723 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setOpacitycxx . . $ Konsole/TerminalDisplay#setOpacity(ba8836b59fb42830).(qrealcxx . . $ qreal# opacity) |
| 724 |
{ |
| 725 |
_opacitycxx . . $ Konsole/TerminalDisplay#_opacity. = qBoundcxx . . $ qBound(3dbe0c69cb86ae06).(static_cast<qrealcxx . . $ qreal#>(0), opacity, static_cast<qrealcxx . . $ qreal#>(1)); |
| 726 |
} |
| 727 |
|
| 728 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setBackgroundImagecxx . . $ Konsole/TerminalDisplay#setBackgroundImage(3520e46b33348bf6).(const QStringcxx . . $ QString#& backgroundImage) |
| 729 |
{ |
| 730 |
if (!backgroundImage.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) |
| 731 |
{ |
| 732 |
_backgroundImagecxx . . $ Konsole/TerminalDisplay#_backgroundImage..loadcxx . . $ QPixmap#load(5bf89e790e720f21).(backgroundImage); |
| 733 |
//setAttribute(Qt::WA_OpaquePaintEvent, false); |
| 734 |
} |
| 735 |
else |
| 736 |
{ |
| 737 |
_backgroundImagecxx . . $ Konsole/TerminalDisplay#_backgroundImage. =cxx . . $ QPixmap#`operator=`(4972951fe8d596b5). QPixmapcxx . . $ QPixmap#QPixmap(49f6e7a06ebc5aa8).(); |
| 738 |
//setAttribute(Qt::WA_OpaquePaintEvent, true); |
| 739 |
} |
| 740 |
} |
| 741 |
|
| 742 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setBackgroundModecxx . . $ Konsole/TerminalDisplay#setBackgroundMode(69c8e311f4d891b6).(BackgroundModecxx . . $ Konsole/BackgroundMode# mode) |
| 743 |
{ |
| 744 |
_backgroundModecxx . . $ Konsole/TerminalDisplay#_backgroundMode. = mode; |
| 745 |
} |
| 746 |
|
| 747 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::drawBackgroundcxx . . $ Konsole/TerminalDisplay#drawBackground(e8484d876dbc605a).(QPaintercxx . . $ QPainter#& painter, const QRectcxx . . $ QRect#& rect, const QColorcxx . . $ QColor#& backgroundColor, bool useOpacitySetting ) |
| 748 |
{ |
| 749 |
// The whole widget rectangle is filled by the background color from |
| 750 |
// the color scheme set in setColorTable(), while the scrollbar is |
| 751 |
// left to the widget style for a consistent look. |
| 752 |
if ( useOpacitySetting ) |
| 753 |
{ |
| 754 |
if (_backgroundImagecxx . . $ Konsole/TerminalDisplay#_backgroundImage..isNullcxx . . $ QPixmap#isNull(50ce9a9e25b4a850).()) { |
| 755 |
QColorcxx . . $ QColor# colorcxx . . $ QColor#QColor(c396aab421781ee8).(backgroundColor); |
| 756 |
color.setAlphaFcxx . . $ QColor#setAlphaF(ba8836b59fb42830).(_opacitycxx . . $ Konsole/TerminalDisplay#_opacity.); |
| 757 |
|
| 758 |
painter.savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).(); |
| 759 |
painter.setCompositionModecxx . . $ QPainter#setCompositionMode(233e5f91a307c5b).(QPaintercxx . . $ QPainter#::CompositionMode_Sourcecxx . . $ QPainter#CompositionMode_Source.); |
| 760 |
painter.fillRectcxx . . $ QPainter#fillRect(b5c43933f089f858).(rect, color); |
| 761 |
painter.restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).(); |
| 762 |
} |
| 763 |
} |
| 764 |
else |
| 765 |
painter.fillRectcxx . . $ QPainter#fillRect(b5c43933f089f858).(rect, backgroundColor); |
| 766 |
} |
| 767 |
|
| 768 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::drawCursorcxx . . $ Konsole/TerminalDisplay#drawCursor(73ea19ad007b7edc).(QPaintercxx . . $ QPainter#& painter, |
| 769 |
const QRectcxx . . $ QRect#& rect, |
| 770 |
const QColorcxx . . $ QColor#& foregroundColor, |
| 771 |
const QColorcxx . . $ QColor#& /*backgroundColor*/, |
| 772 |
bool& invertCharacterColor) |
| 773 |
{ |
| 774 |
QRectcxx . . $ QRect# cursorRect = rect; |
| 775 |
|
| 776 |
cursorRect.setHeightcxx . . $ QRect#setHeight(f349c77f591a7878).(_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. - ((m_full_cursor_heightcxx . . $ Konsole/TerminalDisplay#m_full_cursor_height.) ? 0 : _lineSpacingcxx . . $ Konsole/TerminalDisplay#_lineSpacing. - 1)); |
| 777 |
|
| 778 |
if (!_cursorBlinkingcxx . . $ Konsole/TerminalDisplay#_cursorBlinking.) |
| 779 |
{ |
| 780 |
if ( _cursorColorcxx . . $ Konsole/TerminalDisplay#_cursorColor..isValidcxx . . $ QColor#isValid(3482b152b9333168).() ) |
| 781 |
painter.setPencxx . . $ QPainter#setPen(129a55e114526ad3).(_cursorColorcxx . . $ Konsole/TerminalDisplay#_cursorColor.); |
| 782 |
else |
| 783 |
painter.setPencxx . . $ QPainter#setPen(129a55e114526ad3).(foregroundColor); |
| 784 |
|
| 785 |
if ( _cursorShapecxx . . $ Konsole/TerminalDisplay#_cursorShape. == Emulationcxx . . $ Konsole/Emulation#::KeyboardCursorShapecxx . . $ Konsole/Emulation#KeyboardCursorShape#::BlockCursorcxx . . $ Konsole/Emulation#KeyboardCursorShape#BlockCursor. ) |
| 786 |
{ |
| 787 |
// draw the cursor outline, adjusting the area so that |
| 788 |
// it is draw entirely inside 'rect' |
| 789 |
float penWidth = qMaxcxx . . $ qMax(2a338fce5842aa6a).(1,painter.pencxx . . $ QPainter#pen(c2cf52b1ccff3464).().widthcxx . . $ QPen#width(455f465bc33b4cdf).()); |
| 790 |
|
| 791 |
// |
| 792 |
painter.drawRectcxx . . $ QPainter#drawRect(22ba0428947158b).( |
| 793 |
cursorRect.adjustedcxx . . $ QRect#adjusted(951e984c0912901).( |
| 794 |
+ penWidth/2 + fmod(penWidth, 2), |
| 795 |
+ penWidth/2 + fmod(penWidth, 2), |
| 796 |
- penWidth/2 - fmod(penWidth, 2), |
| 797 |
- penWidth/2 - fmod(penWidth, 2) |
| 798 |
) |
| 799 |
); |
| 800 |
|
| 801 |
//if ( hasFocus() ) |
| 802 |
if ( true ) //QMLTermWidget: Always fill the cursor. Even when not in focus. |
| 803 |
{ |
| 804 |
painter.fillRectcxx . . $ QPainter#fillRect(b5c43933f089f858).(cursorRect, _cursorColorcxx . . $ Konsole/TerminalDisplay#_cursorColor..isValidcxx . . $ QColor#isValid(3482b152b9333168).() ? _cursorColorcxx . . $ Konsole/TerminalDisplay#_cursorColor. : foregroundColor); |
| 805 |
|
| 806 |
if ( !_cursorColorcxx . . $ Konsole/TerminalDisplay#_cursorColor..isValidcxx . . $ QColor#isValid(3482b152b9333168).() ) |
| 807 |
{ |
| 808 |
// invert the colour used to draw the text to ensure that the character at |
| 809 |
// the cursor position is readable |
| 810 |
invertCharacterColor = true; |
| 811 |
} |
| 812 |
} |
| 813 |
} |
| 814 |
else if ( _cursorShapecxx . . $ Konsole/TerminalDisplay#_cursorShape. == Emulationcxx . . $ Konsole/Emulation#::KeyboardCursorShapecxx . . $ Konsole/Emulation#KeyboardCursorShape#::UnderlineCursorcxx . . $ Konsole/Emulation#KeyboardCursorShape#UnderlineCursor. ) |
| 815 |
painter.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cursorRect.leftcxx . . $ QRect#left(ea6fe5115c70a13f).(), |
| 816 |
cursorRect.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).(), |
| 817 |
cursorRect.rightcxx . . $ QRect#right(ea6fe5115c70a13f).(), |
| 818 |
cursorRect.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).()); |
| 819 |
else if ( _cursorShapecxx . . $ Konsole/TerminalDisplay#_cursorShape. == Emulationcxx . . $ Konsole/Emulation#::KeyboardCursorShapecxx . . $ Konsole/Emulation#KeyboardCursorShape#::IBeamCursorcxx . . $ Konsole/Emulation#KeyboardCursorShape#IBeamCursor. ) |
| 820 |
painter.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(cursorRect.leftcxx . . $ QRect#left(ea6fe5115c70a13f).(), |
| 821 |
cursorRect.topcxx . . $ QRect#top(ea6fe5115c70a13f).(), |
| 822 |
cursorRect.leftcxx . . $ QRect#left(ea6fe5115c70a13f).(), |
| 823 |
cursorRect.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).()); |
| 824 |
|
| 825 |
} |
| 826 |
} |
| 827 |
|
| 828 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::drawCharacterscxx . . $ Konsole/TerminalDisplay#drawCharacters(683bc66187729b95).(QPaintercxx . . $ QPainter#& painter, |
| 829 |
const QRectcxx . . $ QRect#& rect, |
| 830 |
const std::wstringcxx . . $ std/wstring#& text, |
| 831 |
const Charactercxx . . $ Konsole/Character#* style, |
| 832 |
bool invertCharacterColor) |
| 833 |
{ |
| 834 |
// don't draw text which is currently blinking |
| 835 |
if ( _blinkingcxx . . $ Konsole/TerminalDisplay#_blinking. && (style->renditioncxx . . $ Konsole/Character#rendition. & RE_BLINKcxx . . $ `lib/Character.h:44:9`!) ) |
| 836 |
return; |
| 837 |
|
| 838 |
// don't draw concealed characters |
| 839 |
if (style->renditioncxx . . $ Konsole/Character#rendition. & RE_CONCEALcxx . . $ `lib/Character.h:53:9`!) |
| 840 |
return; |
| 841 |
|
| 842 |
// setup bold and underline |
| 843 |
bool useBold = ((style->renditioncxx . . $ Konsole/Character#rendition. & RE_BOLDcxx . . $ `lib/Character.h:43:9`!) && _boldIntensecxx . . $ Konsole/TerminalDisplay#_boldIntense.) || fontcxx . . $ Konsole/TerminalDisplay#font(9958934e48c66a6a).().boldcxx . . $ QFont#bold(50ce9a9e25b4a850).(); |
| 844 |
const bool useUnderline = style->renditioncxx . . $ Konsole/Character#rendition. & RE_UNDERLINEcxx . . $ `lib/Character.h:45:9`! || fontcxx . . $ Konsole/TerminalDisplay#font(9958934e48c66a6a).().underlinecxx . . $ QFont#underline(50ce9a9e25b4a850).(); |
| 845 |
const bool useItalic = style->renditioncxx . . $ Konsole/Character#rendition. & RE_ITALICcxx . . $ `lib/Character.h:48:9`! || fontcxx . . $ Konsole/TerminalDisplay#font(9958934e48c66a6a).().italiccxx . . $ QFont#italic(50ce9a9e25b4a850).(); |
| 846 |
const bool useStrikeOut = style->renditioncxx . . $ Konsole/Character#rendition. & RE_STRIKEOUTcxx . . $ `lib/Character.h:52:9`! || fontcxx . . $ Konsole/TerminalDisplay#font(9958934e48c66a6a).().strikeOutcxx . . $ QFont#strikeOut(50ce9a9e25b4a850).(); |
| 847 |
const bool useOverline = style->renditioncxx . . $ Konsole/Character#rendition. & RE_OVERLINEcxx . . $ `lib/Character.h:54:9`! || fontcxx . . $ Konsole/TerminalDisplay#font(9958934e48c66a6a).().overlinecxx . . $ QFont#overline(50ce9a9e25b4a850).(); |
| 848 |
|
| 849 |
painter.setFontcxx . . $ QPainter#setFont(d0a4bd0c8524b912).(fontcxx . . $ Konsole/TerminalDisplay#font(9958934e48c66a6a).()); |
| 850 |
|
| 851 |
QFontcxx . . $ QFont# font = paintercxx . . $ QFont#QFont(d0a4bd0c8524b912)..fontcxx . . $ QPainter#font(c5040538afc47120).(); |
| 852 |
if ( font.boldcxx . . $ QFont#bold(50ce9a9e25b4a850).() != useBold |
| 853 |
|| font.underlinecxx . . $ QFont#underline(50ce9a9e25b4a850).() != useUnderline |
| 854 |
|| font.italiccxx . . $ QFont#italic(50ce9a9e25b4a850).() != useItalic |
| 855 |
|| font.strikeOutcxx . . $ QFont#strikeOut(50ce9a9e25b4a850).() != useStrikeOut |
| 856 |
|| font.overlinecxx . . $ QFont#overline(50ce9a9e25b4a850).() != useOverline) { |
| 857 |
font.setBoldcxx . . $ QFont#setBold(b45ddcbc8423892c).(useBold); |
| 858 |
font.setUnderlinecxx . . $ QFont#setUnderline(b45ddcbc8423892c).(useUnderline); |
| 859 |
font.setItaliccxx . . $ QFont#setItalic(b45ddcbc8423892c).(useItalic); |
| 860 |
font.setStrikeOutcxx . . $ QFont#setStrikeOut(b45ddcbc8423892c).(useStrikeOut); |
| 861 |
font.setOverlinecxx . . $ QFont#setOverline(b45ddcbc8423892c).(useOverline); |
| 862 |
painter.setFontcxx . . $ QPainter#setFont(d0a4bd0c8524b912).(font); |
| 863 |
} |
| 864 |
|
| 865 |
// setup pen |
| 866 |
const CharacterColorcxx . . $ Konsole/CharacterColor#& textColor = ( invertCharacterColor ? style->backgroundColorcxx . . $ Konsole/Character#backgroundColor. : style->foregroundColorcxx . . $ Konsole/Character#foregroundColor. ); |
| 867 |
const QColorcxx . . $ QColor# color = textColor.colorcxx . . $ Konsole/CharacterColor#color(b83b316448997199).(_colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.); |
| 868 |
QPencxx . . $ QPen# pen = paintercxx . . $ QPen#QPen(1b21ef842481f36f)..pencxx . . $ QPainter#pen(c2cf52b1ccff3464).(); |
| 869 |
if ( pen.colorcxx . . $ QPen#color(6d62b116d5d1b12f).() !=cxx . . $ QColor#`operator!=`(8df5130dab4f572b). color ) |
| 870 |
{ |
| 871 |
pen.setColorcxx . . $ QPen#setColor(129a55e114526ad3).(color); |
| 872 |
painter.setPencxx . . $ QPainter#setPen(129a55e114526ad3).(color); |
| 873 |
} |
| 874 |
|
| 875 |
// draw text |
| 876 |
if ( isLineCharStringcxx . . $ Konsole/TerminalDisplay#isLineCharString(330196f35372e4a).(text) ) |
| 877 |
drawLineCharStringcxx . . $ Konsole/TerminalDisplay#drawLineCharString(635ec380c65fbc2f).(painter,rect.xcxx . . $ QRect#x(ea6fe5115c70a13f).(),rect.ycxx . . $ QRect#y(ea6fe5115c70a13f).(),text,style); |
| 878 |
else |
| 879 |
{ |
| 880 |
// Force using LTR as the document layout for the terminal area, because |
| 881 |
// there is no use cases for RTL emulator and RTL terminal application. |
| 882 |
// |
| 883 |
// This still allows RTL characters to be rendered in the RTL way. |
| 884 |
painter.setLayoutDirectioncxx . . $ QPainter#setLayoutDirection(c4f507b8ff4f71fc).(Qtcxx . . $ Qt/::LeftToRightcxx . . $ Qt/LeftToRight.); |
| 885 |
|
| 886 |
if (_bidiEnabledcxx . . $ Konsole/TerminalDisplay#_bidiEnabled.) { |
| 887 |
painter.drawTextcxx . . $ QPainter#drawText(c89d651b24440698).(rect.xcxx . . $ QRect#x(ea6fe5115c70a13f).(), rect.ycxx . . $ QRect#y(ea6fe5115c70a13f).() + _fontAscentcxx . . $ Konsole/TerminalDisplay#_fontAscent. + _lineSpacingcxx . . $ Konsole/TerminalDisplay#_lineSpacing., QStringcxx . . $ QString#::fromStdWStringcxx . . $ QString#fromStdWString(f337decc2b7aedbe).(text)); |
| 888 |
} else { |
| 889 |
painter.drawTextcxx . . $ QPainter#drawText(c89d651b24440698).(rect.xcxx . . $ QRect#x(ea6fe5115c70a13f).(), rect.ycxx . . $ QRect#y(ea6fe5115c70a13f).() + _fontAscentcxx . . $ Konsole/TerminalDisplay#_fontAscent. + _lineSpacingcxx . . $ Konsole/TerminalDisplay#_lineSpacing., LTR_OVERRIDE_CHARcxx . . $ LTR_OVERRIDE_CHAR. +cxx . . $ operator+(b63c95cc3b9a9a38). QStringcxx . . $ QString#::fromStdWStringcxx . . $ QString#fromStdWString(f337decc2b7aedbe).(text)); |
| 890 |
} |
| 891 |
} |
| 892 |
} |
| 893 |
|
| 894 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::drawTextFragmentcxx . . $ Konsole/TerminalDisplay#drawTextFragment(dce02916890c04de).(QPaintercxx . . $ QPainter#& painter , |
| 895 |
const QRectcxx . . $ QRect#& rect, |
| 896 |
const std::wstringcxx . . $ std/wstring#& text, |
| 897 |
const Charactercxx . . $ Konsole/Character#* style) |
| 898 |
{ |
| 899 |
painter.savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).(); |
| 900 |
|
| 901 |
// setup painter |
| 902 |
const QColorcxx . . $ QColor# foregroundColor = style->foregroundColorcxx . . $ Konsole/Character#foregroundColor..colorcxx . . $ Konsole/CharacterColor#color(b83b316448997199).(_colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.); |
| 903 |
const QColorcxx . . $ QColor# backgroundColor = style->backgroundColorcxx . . $ Konsole/Character#backgroundColor..colorcxx . . $ Konsole/CharacterColor#color(b83b316448997199).(_colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.); |
| 904 |
|
| 905 |
// draw background if different from the display's background color |
| 906 |
if ( backgroundColor !=cxx . . $ QColor#`operator!=`(8df5130dab4f572b). palettecxx . . $ Konsole/TerminalDisplay#palette(d9f8a6603c6966ab).().backgroundcxx . . $ QPalette#background(e14a554c07951b96).().colorcxx . . $ QBrush#color(a1044652a6e0ddd).() ) |
| 907 |
drawBackgroundcxx . . $ Konsole/TerminalDisplay#drawBackground(e8484d876dbc605a).(painter,rect,backgroundColor, |
| 908 |
false /* do not use transparency */); |
| 909 |
|
| 910 |
// draw cursor shape if the current character is the cursor |
| 911 |
// this may alter the foreground and background colors |
| 912 |
bool invertCharacterColor = false; |
| 913 |
if ( style->renditioncxx . . $ Konsole/Character#rendition. & RE_CURSORcxx . . $ `lib/Character.h:49:9`! ) |
| 914 |
drawCursorcxx . . $ Konsole/TerminalDisplay#drawCursor(73ea19ad007b7edc).(painter,rect,foregroundColor,backgroundColor,invertCharacterColor); |
| 915 |
|
| 916 |
// draw text |
| 917 |
drawCharacterscxx . . $ Konsole/TerminalDisplay#drawCharacters(683bc66187729b95).(painter,rect,text,style,invertCharacterColor); |
| 918 |
|
| 919 |
painter.restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).(); |
| 920 |
} |
| 921 |
|
| 922 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setRandomSeedcxx . . $ Konsole/TerminalDisplay#setRandomSeed(cb2f890c2fdad230).(uintcxx . . $ uint# randomSeed) { _randomSeedcxx . . $ Konsole/TerminalDisplay#_randomSeed. = randomSeed; } |
| 923 |
uintcxx . . $ uint# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::randomSeedcxx . . $ Konsole/TerminalDisplay#randomSeed(ddd8539a2fcdd4ce).() const { return _randomSeedcxx . . $ Konsole/TerminalDisplay#_randomSeed.; } |
| 924 |
|
| 925 |
#if 0 |
| 926 |
/*! |
| 927 |
Set XIM Position |
| 928 |
*/ |
| 929 |
void TerminalDisplay::setCursorPos(const int curx, const int cury) |
| 930 |
{ |
| 931 |
QPoint tL = contentsRect().topLeft(); |
| 932 |
int tLx = tL.x(); |
| 933 |
int tLy = tL.y(); |
| 934 |
|
| 935 |
int xpos, ypos; |
| 936 |
ypos = _topMargin + tLy + _fontHeight*(cury-1) + _fontAscent; |
| 937 |
xpos = _leftMargin + tLx + _fontWidth*curx; |
| 938 |
//setMicroFocusHint(xpos, ypos, 0, _fontHeight); //### ??? |
| 939 |
// fprintf(stderr, "x/y = %d/%d\txpos/ypos = %d/%d\n", curx, cury, xpos, ypos); |
| 940 |
_cursorLine = cury; |
| 941 |
_cursorCol = curx; |
| 942 |
} |
| 943 |
#endif |
| 944 |
|
| 945 |
// scrolls the image by 'lines', down if lines > 0 or up otherwise. |
| 946 |
// |
| 947 |
// the terminal emulation keeps track of the scrolling of the character |
| 948 |
// image as it receives input, and when the view is updated, it calls scrollImage() |
| 949 |
// with the final scroll amount. this improves performance because scrolling the |
| 950 |
// display is much cheaper than re-rendering all the text for the |
| 951 |
// part of the image which has moved up or down. |
| 952 |
// Instead only new lines have to be drawn |
| 953 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::scrollImagecxx . . $ Konsole/TerminalDisplay#scrollImage(f77025cb21ba58a9).(int lines , const QRectcxx . . $ QRect#& screenWindowRegion) |
| 954 |
{ |
| 955 |
// if the flow control warning is enabled this will interfere with the |
| 956 |
// scrolling optimizations and cause artifacts. the simple solution here |
| 957 |
// is to just disable the optimization whilst it is visible |
| 958 |
if ( _outputSuspendedLabelcxx . . $ Konsole/TerminalDisplay#_outputSuspendedLabel. && _outputSuspendedLabelcxx . . $ Konsole/TerminalDisplay#_outputSuspendedLabel.->isVisiblecxx . . $ QWidget#isVisible(50ce9a9e25b4a850).() ) |
| 959 |
return; |
| 960 |
|
| 961 |
// constrain the region to the display |
| 962 |
// the bottom of the region is capped to the number of lines in the display's |
| 963 |
// internal image - 2, so that the height of 'region' is strictly less |
| 964 |
// than the height of the internal image. |
| 965 |
QRectcxx . . $ QRect# region = screenWindowRegion; |
| 966 |
region.setBottomcxx . . $ QRect#setBottom(f349c77f591a7878).( qMincxx . . $ qMin(2a338fce5842aa6a).(region.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).(),this->_linescxx . . $ Konsole/TerminalDisplay#_lines.-2) ); |
| 967 |
|
| 968 |
// return if there is nothing to do |
| 969 |
if ( lines == 0 |
| 970 |
|| _imagecxx . . $ Konsole/TerminalDisplay#_image. == nullptr |
| 971 |
|| !region.isValidcxx . . $ QRect#isValid(3482b152b9333168).() |
| 972 |
|| (region.topcxx . . $ QRect#top(ea6fe5115c70a13f).() + abs(lines)) >= region.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).() |
| 973 |
|| this->_linescxx . . $ Konsole/TerminalDisplay#_lines. <= region.heightcxx . . $ QRect#height(ea6fe5115c70a13f).() ) return; |
| 974 |
|
| 975 |
// hide terminal size label to prevent it being scrolled |
| 976 |
if (_resizeWidgetcxx . . $ Konsole/TerminalDisplay#_resizeWidget. && _resizeWidgetcxx . . $ Konsole/TerminalDisplay#_resizeWidget.->isVisiblecxx . . $ QWidget#isVisible(50ce9a9e25b4a850).()) |
| 977 |
_resizeWidgetcxx . . $ Konsole/TerminalDisplay#_resizeWidget.->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).(); |
| 978 |
|
| 979 |
// Note: With Qt 4.4 the left edge of the scrolled area must be at 0 |
| 980 |
// to get the correct (newly exposed) part of the widget repainted. |
| 981 |
// |
| 982 |
// The right edge must be before the left edge of the scroll bar to |
| 983 |
// avoid triggering a repaint of the entire widget, the distance is |
| 984 |
// given by SCROLLBAR_CONTENT_GAP |
| 985 |
// |
| 986 |
// Set the QT_FLUSH_PAINT environment variable to '1' before starting the |
| 987 |
// application to monitor repainting. |
| 988 |
// |
| 989 |
int scrollBarWidth = _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->isHiddencxx . . $ QWidget#isHidden(50ce9a9e25b4a850).() ? 0 : |
| 990 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->stylecxx . . $ QWidget#style(5bbb00d3017c281f).()->styleHintcxx . . $ QStyle#styleHint(671b55e70cc3dc02).(QStylecxx . . $ QStyle#::SH_ScrollBar_Transientcxx . . $ QStyle#SH_ScrollBar_Transient., nullptr, _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.) ? |
| 991 |
0 : _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->widthcxx . . $ QWidget#width(455f465bc33b4cdf).(); |
| 992 |
const int SCROLLBAR_CONTENT_GAP = scrollBarWidth == 0 ? 0 : 1; |
| 993 |
QRectcxx . . $ QRect# scrollRectcxx . . $ QRect#QRect(ced63f7c635d850d).; |
| 994 |
if ( _scrollbarLocationcxx . . $ Konsole/TerminalDisplay#_scrollbarLocation. == QTermWidgetcxx . . $ QTermWidget#::ScrollBarLeftcxx . . $ QTermWidget#ScrollBarLeft. ) |
| 995 |
{ |
| 996 |
scrollRect.setLeftcxx . . $ QRect#setLeft(f349c77f591a7878).(scrollBarWidth+SCROLLBAR_CONTENT_GAP); |
| 997 |
scrollRect.setRightcxx . . $ QRect#setRight(f349c77f591a7878).(widthcxx . . $ QQuickItem#width(21b6c25e127938e2).()); |
| 998 |
} |
| 999 |
else |
| 1000 |
{ |
| 1001 |
scrollRect.setLeftcxx . . $ QRect#setLeft(f349c77f591a7878).(0); |
| 1002 |
scrollRect.setRightcxx . . $ QRect#setRight(f349c77f591a7878).(widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() - scrollBarWidth - SCROLLBAR_CONTENT_GAP); |
| 1003 |
} |
| 1004 |
void* firstCharPos = &_imagecxx . . $ Konsole/TerminalDisplay#_image.[ region.topcxx . . $ QRect#top(ea6fe5115c70a13f).() * this->_columnscxx . . $ Konsole/TerminalDisplay#_columns. ]; |
| 1005 |
void* lastCharPos = &_imagecxx . . $ Konsole/TerminalDisplay#_image.[ (region.topcxx . . $ QRect#top(ea6fe5115c70a13f).() + abs(lines)) * this->_columnscxx . . $ Konsole/TerminalDisplay#_columns. ]; |
| 1006 |
|
| 1007 |
int top = _topMargincxx . . $ Konsole/TerminalDisplay#_topMargin. + (region.topcxx . . $ QRect#top(ea6fe5115c70a13f).() * _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.); |
| 1008 |
int linesToMove = region.heightcxx . . $ QRect#height(ea6fe5115c70a13f).() - abs(lines); |
| 1009 |
int bytesToMove = linesToMove * |
| 1010 |
this->_columnscxx . . $ Konsole/TerminalDisplay#_columns. * |
| 1011 |
sizeof(Charactercxx . . $ Konsole/Character#); |
| 1012 |
|
| 1013 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( linesToMove > 0 ); |
| 1014 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( bytesToMove > 0 ); |
| 1015 |
|
| 1016 |
//scroll internal image |
| 1017 |
if ( lines > 0 ) |
| 1018 |
{ |
| 1019 |
// check that the memory areas that we are going to move are valid |
| 1020 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( (char*)lastCharPos + bytesToMove < |
| 1021 |
(char*)(_image + (this->_lines * this->_columns)) ); |
| 1022 |
|
| 1023 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( (lines*this->_columns) < _imageSize ); |
| 1024 |
|
| 1025 |
//scroll internal image down |
| 1026 |
memmove( firstCharPos , lastCharPos , bytesToMove ); |
| 1027 |
|
| 1028 |
//set region of display to scroll |
| 1029 |
scrollRect.setTopcxx . . $ QRect#setTop(f349c77f591a7878).(top); |
| 1030 |
} |
| 1031 |
else |
| 1032 |
{ |
| 1033 |
// check that the memory areas that we are going to move are valid |
| 1034 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( (char*)firstCharPos + bytesToMove < |
| 1035 |
(char*)(_image + (this->_lines * this->_columns)) ); |
| 1036 |
|
| 1037 |
//scroll internal image up |
| 1038 |
memmove( lastCharPos , firstCharPos , bytesToMove ); |
| 1039 |
|
| 1040 |
//set region of the display to scroll |
| 1041 |
scrollRect.setTopcxx . . $ QRect#setTop(f349c77f591a7878).(top + abs(lines) * _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.); |
| 1042 |
} |
| 1043 |
scrollRect.setHeightcxx . . $ QRect#setHeight(f349c77f591a7878).(linesToMove * _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. ); |
| 1044 |
|
| 1045 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(scrollRect.isValid() && !scrollRect.isEmpty()); |
| 1046 |
|
| 1047 |
//scroll the display vertically to match internal _image |
| 1048 |
//scroll( 0 , _fontHeight * (-lines) , scrollRect ); |
| 1049 |
} |
| 1050 |
|
| 1051 |
QRegioncxx . . $ QRegion# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::hotSpotRegioncxx . . $ Konsole/TerminalDisplay#hotSpotRegion(60241c9f822a04d8).() const |
| 1052 |
{ |
| 1053 |
QRegioncxx . . $ QRegion# regioncxx . . $ QRegion#QRegion(49f6e7a06ebc5aa8).; |
| 1054 |
const auto hotSpots = _filterChaincxx . . $ Konsole/TerminalDisplay#_filterChain.->hotSpotscxx . . $ Konsole/FilterChain#hotSpots(927ee1eeecce351e).(); |
| 1055 |
for( Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#* const hotSpot : hotSpots ) |
| 1056 |
{ |
| 1057 |
QRectcxx . . $ QRect# rcxx . . $ QRect#QRect(ced63f7c635d850d).; |
| 1058 |
if (hotSpot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()==hotSpot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()) { |
| 1059 |
r.setLeftcxx . . $ QRect#setLeft(f349c77f591a7878).(hotSpot->startColumncxx . . $ Konsole/Filter#HotSpot#startColumn(455f465bc33b4cdf).()); |
| 1060 |
r.setTopcxx . . $ QRect#setTop(f349c77f591a7878).(hotSpot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()); |
| 1061 |
r.setRightcxx . . $ QRect#setRight(f349c77f591a7878).(hotSpot->endColumncxx . . $ Konsole/Filter#HotSpot#endColumn(455f465bc33b4cdf).()); |
| 1062 |
r.setBottomcxx . . $ QRect#setBottom(f349c77f591a7878).(hotSpot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()); |
| 1063 |
region |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). imageToWidgetcxx . . $ QRegion#QRegion(c9f450b5feb9110c).(r);; |
| 1064 |
} else { |
| 1065 |
r.setLeftcxx . . $ QRect#setLeft(f349c77f591a7878).(hotSpot->startColumncxx . . $ Konsole/Filter#HotSpot#startColumn(455f465bc33b4cdf).()); |
| 1066 |
r.setTopcxx . . $ QRect#setTop(f349c77f591a7878).(hotSpot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()); |
| 1067 |
r.setRightcxx . . $ QRect#setRight(f349c77f591a7878).(_columnscxx . . $ Konsole/TerminalDisplay#_columns.); |
| 1068 |
r.setBottomcxx . . $ QRect#setBottom(f349c77f591a7878).(hotSpot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()); |
| 1069 |
region |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). imageToWidgetcxx . . $ QRegion#QRegion(c9f450b5feb9110c).(r);; |
| 1070 |
for ( int line = hotSpot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()+1 ; line < hotSpot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).() ; line++ ) { |
| 1071 |
r.setLeftcxx . . $ QRect#setLeft(f349c77f591a7878).(0); |
| 1072 |
r.setTopcxx . . $ QRect#setTop(f349c77f591a7878).(line); |
| 1073 |
r.setRightcxx . . $ QRect#setRight(f349c77f591a7878).(_columnscxx . . $ Konsole/TerminalDisplay#_columns.); |
| 1074 |
r.setBottomcxx . . $ QRect#setBottom(f349c77f591a7878).(line); |
| 1075 |
region |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). imageToWidgetcxx . . $ QRegion#QRegion(c9f450b5feb9110c).(r);; |
| 1076 |
} |
| 1077 |
r.setLeftcxx . . $ QRect#setLeft(f349c77f591a7878).(0); |
| 1078 |
r.setTopcxx . . $ QRect#setTop(f349c77f591a7878).(hotSpot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()); |
| 1079 |
r.setRightcxx . . $ QRect#setRight(f349c77f591a7878).(hotSpot->endColumncxx . . $ Konsole/Filter#HotSpot#endColumn(455f465bc33b4cdf).()); |
| 1080 |
r.setBottomcxx . . $ QRect#setBottom(f349c77f591a7878).(hotSpot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()); |
| 1081 |
region |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). imageToWidgetcxx . . $ QRegion#QRegion(c9f450b5feb9110c).(r);; |
| 1082 |
} |
| 1083 |
} |
| 1084 |
return regioncxx . . $ QRegion#QRegion(b22ee7760bd2c0ca).; |
| 1085 |
} |
| 1086 |
|
| 1087 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::processFilterscxx . . $ Konsole/TerminalDisplay#processFilters(49f6e7a06ebc5aa8).() |
| 1088 |
{ |
| 1089 |
if (!_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.) |
| 1090 |
return; |
| 1091 |
|
| 1092 |
QRegioncxx . . $ QRegion# preUpdateHotSpots = hotSpotRegioncxx . . $ Konsole/TerminalDisplay#hotSpotRegion(60241c9f822a04d8).(); |
| 1093 |
|
| 1094 |
// use _screenWindow->getImage() here rather than _image because |
| 1095 |
// other classes may call processFilters() when this display's |
| 1096 |
// ScreenWindow emits a scrolled() signal - which will happen before |
| 1097 |
// updateImage() is called on the display and therefore _image is |
| 1098 |
// out of date at this point |
| 1099 |
_filterChaincxx . . $ Konsole/TerminalDisplay#_filterChain.->setImagecxx . . $ Konsole/TerminalImageFilterChain#setImage(ebf247e562f15df0).( _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).getImagecxx . . $ Konsole/ScreenWindow#getImage(2b1e201a0ed1a40e).(), |
| 1100 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).(), |
| 1101 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).windowColumnscxx . . $ Konsole/ScreenWindow#windowColumns(455f465bc33b4cdf).(), |
| 1102 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).getLinePropertiescxx . . $ Konsole/ScreenWindow#getLineProperties(a3e81cde8669a353).() ); |
| 1103 |
_filterChaincxx . . $ Konsole/TerminalDisplay#_filterChain.->processcxx . . $ Konsole/FilterChain#process(49f6e7a06ebc5aa8).(); |
| 1104 |
|
| 1105 |
QRegioncxx . . $ QRegion# postUpdateHotSpots = hotSpotRegioncxx . . $ Konsole/TerminalDisplay#hotSpotRegion(60241c9f822a04d8).(); |
| 1106 |
|
| 1107 |
updatecxx . . $ Konsole/TerminalDisplay#update(bd1064c840c6b6e8).( preUpdateHotSpots |cxx . . $ QRegion#`operator|`(cd5438909e4a68c). postUpdateHotSpots ); |
| 1108 |
} |
| 1109 |
|
| 1110 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::updateImagecxx . . $ Konsole/TerminalDisplay#updateImage(49f6e7a06ebc5aa8).() |
| 1111 |
{ |
| 1112 |
if ( !_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) |
| 1113 |
return; |
| 1114 |
|
| 1115 |
// TODO QMLTermWidget at the moment I'm disabling this. |
| 1116 |
// Since this can't be scrolled we need to determine if this |
| 1117 |
// is useful or not. |
| 1118 |
|
| 1119 |
// optimization - scroll the existing image where possible and |
| 1120 |
// avoid expensive text drawing for parts of the image that |
| 1121 |
// can simply be moved up or down |
| 1122 |
// scrollImage( _screenWindow->scrollCount() , |
| 1123 |
// _screenWindow->scrollRegion() ); |
| 1124 |
// _screenWindow->resetScrollCount(); |
| 1125 |
|
| 1126 |
if (!_imagecxx . . $ Konsole/TerminalDisplay#_image.) { |
| 1127 |
// Create _image. |
| 1128 |
// The emitted changedContentSizeSignal also leads to getImage being recreated, so do this first. |
| 1129 |
updateImageSizecxx . . $ Konsole/TerminalDisplay#updateImageSize(49f6e7a06ebc5aa8).(); |
| 1130 |
} |
| 1131 |
|
| 1132 |
Charactercxx . . $ Konsole/Character#* const newimg = _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).getImagecxx . . $ Konsole/ScreenWindow#getImage(2b1e201a0ed1a40e).(); |
| 1133 |
int lines = _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).(); |
| 1134 |
int columns = _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).windowColumnscxx . . $ Konsole/ScreenWindow#windowColumns(455f465bc33b4cdf).(); |
| 1135 |
|
| 1136 |
setScrollcxx . . $ Konsole/TerminalDisplay#setScroll(3e454b8ccf442868).( _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).() , _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).lineCountcxx . . $ Konsole/ScreenWindow#lineCount(455f465bc33b4cdf).() ); |
| 1137 |
|
| 1138 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( this->_usedLines <= this->_lines ); |
| 1139 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( this->_usedColumns <= this->_columns ); |
| 1140 |
|
| 1141 |
int y,x,len; |
| 1142 |
|
| 1143 |
QPointcxx . . $ QPoint# tL = contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(); |
| 1144 |
int tLx = tL.xcxx . . $ QPoint#x(455f465bc33b4cdf).(); |
| 1145 |
int tLy = tL.ycxx . . $ QPoint#y(455f465bc33b4cdf).(); |
| 1146 |
_hasBlinkercxx . . $ Konsole/TerminalDisplay#_hasBlinker. = false; |
| 1147 |
|
| 1148 |
CharacterColorcxx . . $ Konsole/CharacterColor# cfcxx . . $ Konsole/CharacterColor#CharacterColor(49f6e7a06ebc5aa8).; // undefined |
| 1149 |
CharacterColorcxx . . $ Konsole/CharacterColor# _clipboardcxx . . $ Konsole/CharacterColor#CharacterColor(49f6e7a06ebc5aa8).; // undefined |
| 1150 |
int cr = -1; // undefined |
| 1151 |
|
| 1152 |
const int linesToUpdate = qMincxx . . $ qMin(2a338fce5842aa6a).(this->_linescxx . . $ Konsole/TerminalDisplay#_lines., qMaxcxx . . $ qMax(2a338fce5842aa6a).(0,lines )); |
| 1153 |
const int columnsToUpdate = qMincxx . . $ qMin(2a338fce5842aa6a).(this->_columnscxx . . $ Konsole/TerminalDisplay#_columns.,qMaxcxx . . $ qMax(2a338fce5842aa6a).(0,columns)); |
| 1154 |
|
| 1155 |
wchar_t *disstrU = new wchar_t[columnsToUpdate]; |
| 1156 |
char *dirtyMask = new char[columnsToUpdate+2]; |
| 1157 |
QRegioncxx . . $ QRegion# dirtyRegioncxx . . $ QRegion#QRegion(49f6e7a06ebc5aa8).; |
| 1158 |
|
| 1159 |
// debugging variable, this records the number of lines that are found to |
| 1160 |
// be 'dirty' ( ie. have changed from the old _image to the new _image ) and |
| 1161 |
// which therefore need to be repainted |
| 1162 |
int dirtyLineCount = 0; |
| 1163 |
|
| 1164 |
for (y = 0; y < linesToUpdate; ++y) |
| 1165 |
{ |
| 1166 |
const Charactercxx . . $ Konsole/Character#* currentLine = &_imagecxx . . $ Konsole/TerminalDisplay#_image.[y*this->_columnscxx . . $ Konsole/TerminalDisplay#_columns.]; |
| 1167 |
const Charactercxx . . $ Konsole/Character#* const newLine = &newimg[y*columns]; |
| 1168 |
|
| 1169 |
bool updateLine = false; |
| 1170 |
|
| 1171 |
// The dirty mask indicates which characters need repainting. We also |
| 1172 |
// mark surrounding neighbours dirty, in case the character exceeds |
| 1173 |
// its cell boundaries |
| 1174 |
memset(dirtyMask, 0, columnsToUpdate+2); |
| 1175 |
|
| 1176 |
for( x = 0 ; x < columnsToUpdate ; ++x) |
| 1177 |
{ |
| 1178 |
if ( newLine[x] !=cxx . . $ Konsole/`operator!=`(2e6b4567d0fd245f). currentLine[x] ) |
| 1179 |
{ |
| 1180 |
dirtyMask[x] = true; |
| 1181 |
} |
| 1182 |
} |
| 1183 |
|
| 1184 |
if (!_resizingcxx . . $ Konsole/TerminalDisplay#_resizing.) // not while _resizing, we're expecting a paintEvent |
| 1185 |
for (x = 0; x < columnsToUpdate; ++x) |
| 1186 |
{ |
| 1187 |
_hasBlinkercxx . . $ Konsole/TerminalDisplay#_hasBlinker. |= (newLine[x].renditioncxx . . $ Konsole/Character#rendition. & RE_BLINKcxx . . $ `lib/Character.h:44:9`!); |
| 1188 |
|
| 1189 |
// Start drawing if this character or the next one differs. |
| 1190 |
// We also take the next one into account to handle the situation |
| 1191 |
// where characters exceed their cell width. |
| 1192 |
if (dirtyMask[x]) |
| 1193 |
{ |
| 1194 |
wchar_t c = newLine[x+0].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.; |
| 1195 |
if ( !c ) |
| 1196 |
continue; |
| 1197 |
int p = 0; |
| 1198 |
disstrU[p++] = c; //fontMap(c); |
| 1199 |
bool lineDraw = isLineCharcxx . . $ Konsole/TerminalDisplay#isLineChar(beeb25e058ed20bb).(c); |
| 1200 |
bool doubleWidth = (x+1 == columnsToUpdate) ? false : (newLine[x+1].charactercxx . . $ Konsole/Character#$anonymous_type_0#character. == 0); |
| 1201 |
cr = newLine[x].renditioncxx . . $ Konsole/Character#rendition.; |
| 1202 |
_clipboard =cxx . . $ Konsole/CharacterColor#`operator=`(d3b4b4caeab41583). newLine[x].backgroundColorcxx . . $ Konsole/Character#backgroundColor.; |
| 1203 |
if (newLine[x].foregroundColorcxx . . $ Konsole/Character#foregroundColor. !=cxx . . $ Konsole/`operator!=`(40f11079b1efd097). cf) cf =cxx . . $ Konsole/CharacterColor#`operator=`(d3b4b4caeab41583). newLine[x].foregroundColorcxx . . $ Konsole/Character#foregroundColor.; |
| 1204 |
int lln = columnsToUpdate - x; |
| 1205 |
for (len = 1; len < lln; ++len) |
| 1206 |
{ |
| 1207 |
const Charactercxx . . $ Konsole/Character#& ch = newLine[x+len]; |
| 1208 |
|
| 1209 |
if (!ch.charactercxx . . $ Konsole/Character#$anonymous_type_0#character.) |
| 1210 |
continue; // Skip trailing part of multi-col chars. |
| 1211 |
|
| 1212 |
bool nextIsDoubleWidth = (x+len+1 == columnsToUpdate) ? false : (newLine[x+len+1].charactercxx . . $ Konsole/Character#$anonymous_type_0#character. == 0); |
| 1213 |
|
| 1214 |
if ( ch.foregroundColorcxx . . $ Konsole/Character#foregroundColor. !=cxx . . $ Konsole/`operator!=`(40f11079b1efd097). cf || |
| 1215 |
ch.backgroundColorcxx . . $ Konsole/Character#backgroundColor. !=cxx . . $ Konsole/`operator!=`(40f11079b1efd097). _clipboard || |
| 1216 |
ch.renditioncxx . . $ Konsole/Character#rendition. != cr || |
| 1217 |
!dirtyMask[x+len] || |
| 1218 |
isLineCharcxx . . $ Konsole/TerminalDisplay#isLineChar(beeb25e058ed20bb).(c) != lineDraw || |
| 1219 |
nextIsDoubleWidth != doubleWidth ) |
| 1220 |
break; |
| 1221 |
|
| 1222 |
disstrU[p++] = c; //fontMap(c); |
| 1223 |
} |
| 1224 |
|
| 1225 |
std::wstringcxx . . $ std/wstring# unistrcxx . . $ std/__cxx11/basic_string#basic_string(f26a9578972d3fae).(disstrU, p); |
| 1226 |
|
| 1227 |
bool saveFixedFont = _fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont.; |
| 1228 |
if (lineDraw) |
| 1229 |
_fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont. = false; |
| 1230 |
if (doubleWidth) |
| 1231 |
_fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont. = false; |
| 1232 |
|
| 1233 |
updateLine = true; |
| 1234 |
|
| 1235 |
_fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont. = saveFixedFont; |
| 1236 |
x += len - 1; |
| 1237 |
} |
| 1238 |
|
| 1239 |
} |
| 1240 |
|
| 1241 |
//both the top and bottom halves of double height _lines must always be redrawn |
| 1242 |
//although both top and bottom halves contain the same characters, only |
| 1243 |
//the top one is actually |
| 1244 |
//drawn. |
| 1245 |
if (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties..countcxx . . $ QVector#count(455f465bc33b4cdf).() > y) |
| 1246 |
updateLine |= (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).y] & LINE_DOUBLEHEIGHTcxx . . $ Konsole/LINE_DOUBLEHEIGHT.); |
| 1247 |
|
| 1248 |
// if the characters on the line are different in the old and the new _image |
| 1249 |
// then this line must be repainted. |
| 1250 |
if (updateLine) |
| 1251 |
{ |
| 1252 |
dirtyLineCount++; |
| 1253 |
|
| 1254 |
// add the area occupied by this line to the region which needs to be |
| 1255 |
// repainted |
| 1256 |
QRectcxx . . $ QRect# dirtyRect = QRectcxx . . $ QRect#QRect(2261ffe5112eab06).( _leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin.+tLx , |
| 1257 |
_topMargincxx . . $ Konsole/TerminalDisplay#_topMargin.+tLy+_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.*y , |
| 1258 |
_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. * columnsToUpdate , |
| 1259 |
_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. ); |
| 1260 |
|
| 1261 |
dirtyRegion |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). dirtyRectcxx . . $ QRegion#QRegion(c9f450b5feb9110c).; |
| 1262 |
} |
| 1263 |
|
| 1264 |
// replace the line of characters in the old _image with the |
| 1265 |
// current line of the new _image |
| 1266 |
memcpy((void*)currentLine,(const void*)newLine,columnsToUpdate*sizeof(Charactercxx . . $ Konsole/Character#)); |
| 1267 |
} |
| 1268 |
|
| 1269 |
// if the new _image is smaller than the previous _image, then ensure that the area |
| 1270 |
// outside the new _image is cleared |
| 1271 |
if ( linesToUpdate < _usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines. ) |
| 1272 |
{ |
| 1273 |
dirtyRegion |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). QRectcxx . . $ QRegion#QRegion(c9f450b5feb9110c).( _leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin.+tLx , |
| 1274 |
_topMargincxx . . $ Konsole/TerminalDisplay#_topMargin.+tLy+_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.*linesToUpdate , |
| 1275 |
_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. * this->_columnscxx . . $ Konsole/TerminalDisplay#_columns. , |
| 1276 |
_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. * (_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines.-linesToUpdate) ); |
| 1277 |
} |
| 1278 |
_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines. = linesToUpdate; |
| 1279 |
|
| 1280 |
if ( columnsToUpdate < _usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns. ) |
| 1281 |
{ |
| 1282 |
dirtyRegion |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). QRectcxx . . $ QRegion#QRegion(c9f450b5feb9110c).( _leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin.+tLx+columnsToUpdate*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. , |
| 1283 |
_topMargincxx . . $ Konsole/TerminalDisplay#_topMargin.+tLy , |
| 1284 |
_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. * (_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.-columnsToUpdate) , |
| 1285 |
_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. * this->_linescxx . . $ Konsole/TerminalDisplay#_lines. ); |
| 1286 |
} |
| 1287 |
_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns. = columnsToUpdate; |
| 1288 |
|
| 1289 |
dirtyRegion |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). _inputMethodDatacxx . . $ QRegion#QRegion(c9f450b5feb9110c)..previousPreeditRectcxx . . $ Konsole/TerminalDisplay#InputMethodData#previousPreeditRect.; |
| 1290 |
|
| 1291 |
// update the parts of the display which have changed |
| 1292 |
updatecxx . . $ Konsole/TerminalDisplay#update(bd1064c840c6b6e8).(dirtyRegion); |
| 1293 |
|
| 1294 |
if ( _hasBlinkercxx . . $ Konsole/TerminalDisplay#_hasBlinker. && !_blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer.->isActivecxx . . $ QTimer#isActive(50ce9a9e25b4a850).()) _blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer.->startcxx . . $ QTimer#start(d4f767463ce0a6b3).( TEXT_BLINK_DELAYcxx . . $ Konsole/TerminalDisplay#TEXT_BLINK_DELAY. ); |
| 1295 |
if (!_hasBlinkercxx . . $ Konsole/TerminalDisplay#_hasBlinker. && _blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer.->isActivecxx . . $ QTimer#isActive(50ce9a9e25b4a850).()) { _blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer.->stopcxx . . $ QTimer#stop(49f6e7a06ebc5aa8).(); _blinkingcxx . . $ Konsole/TerminalDisplay#_blinking. = false; } |
| 1296 |
delete[] dirtyMask; |
| 1297 |
delete[] disstrU; |
| 1298 |
|
| 1299 |
} |
| 1300 |
|
| 1301 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::showResizeNotificationcxx . . $ Konsole/TerminalDisplay#showResizeNotification(49f6e7a06ebc5aa8).() |
| 1302 |
{ |
| 1303 |
// if (_terminalSizeHint && isVisible()) |
| 1304 |
// { |
| 1305 |
// if (_terminalSizeStartup) { |
| 1306 |
// _terminalSizeStartup=false; |
| 1307 |
// return; |
| 1308 |
// } |
| 1309 |
// if (!_resizeWidget) |
| 1310 |
// { |
| 1311 |
// _resizeWidget = new QLabel("Size: XXX x XXX", this); |
| 1312 |
// _resizeWidget->setMinimumWidth(_resizeWidget->fontMetrics().width("Size: XXX x XXX")); |
| 1313 |
// _resizeWidget->setMinimumHeight(_resizeWidget->sizeHint().height()); |
| 1314 |
// _resizeWidget->setAlignment(Qt::AlignCenter); |
| 1315 |
|
| 1316 |
// _resizeWidget->setStyleSheet("background-color:palette(window);border-style:solid;border-width:1px;border-color:palette(dark)"); |
| 1317 |
|
| 1318 |
// _resizeTimer = new QTimer(this); |
| 1319 |
// _resizeTimer->setSingleShot(true); |
| 1320 |
// connect(_resizeTimer, SIGNAL(timeout()), _resizeWidget, SLOT(hide())); |
| 1321 |
// } |
| 1322 |
// QString sizeStr = QString("Size: %1 x %2").arg(_columns).arg(_lines); |
| 1323 |
// _resizeWidget->setText(sizeStr); |
| 1324 |
// _resizeWidget->move((width()-_resizeWidget->width())/2, |
| 1325 |
// (height()-_resizeWidget->height())/2+20); |
| 1326 |
// _resizeWidget->show(); |
| 1327 |
// _resizeTimer->start(1000); |
| 1328 |
// } |
| 1329 |
} |
| 1330 |
|
| 1331 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setBlinkingCursorcxx . . $ Konsole/TerminalDisplay#setBlinkingCursor(b45ddcbc8423892c).(bool blink) |
| 1332 |
{ |
| 1333 |
if (_hasBlinkingCursorcxx . . $ Konsole/TerminalDisplay#_hasBlinkingCursor. != blink) |
| 1334 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! blinkingCursorStateChangedcxx . . $ Konsole/TerminalDisplay#blinkingCursorStateChanged(49f6e7a06ebc5aa8).(); |
| 1335 |
|
| 1336 |
_hasBlinkingCursorcxx . . $ Konsole/TerminalDisplay#_hasBlinkingCursor.=blink; |
| 1337 |
|
| 1338 |
if (blink && !_blinkCursorTimercxx . . $ Konsole/TerminalDisplay#_blinkCursorTimer.->isActivecxx . . $ QTimer#isActive(50ce9a9e25b4a850).()) |
| 1339 |
_blinkCursorTimercxx . . $ Konsole/TerminalDisplay#_blinkCursorTimer.->startcxx . . $ QTimer#start(d4f767463ce0a6b3).(QApplicationcxx . . $ QApplication#::cursorFlashTimecxx . . $ QApplication#cursorFlashTime(b126dc7c1de90089).() / 2); |
| 1340 |
|
| 1341 |
if (!blink && _blinkCursorTimercxx . . $ Konsole/TerminalDisplay#_blinkCursorTimer.->isActivecxx . . $ QTimer#isActive(50ce9a9e25b4a850).()) |
| 1342 |
{ |
| 1343 |
_blinkCursorTimercxx . . $ Konsole/TerminalDisplay#_blinkCursorTimer.->stopcxx . . $ QTimer#stop(49f6e7a06ebc5aa8).(); |
| 1344 |
if (_cursorBlinkingcxx . . $ Konsole/TerminalDisplay#_cursorBlinking.) |
| 1345 |
blinkCursorEventcxx . . $ Konsole/TerminalDisplay#blinkCursorEvent(49f6e7a06ebc5aa8).(); |
| 1346 |
else |
| 1347 |
_cursorBlinkingcxx . . $ Konsole/TerminalDisplay#_cursorBlinking. = false; |
| 1348 |
} |
| 1349 |
} |
| 1350 |
|
| 1351 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setBlinkingTextEnabledcxx . . $ Konsole/TerminalDisplay#setBlinkingTextEnabled(b45ddcbc8423892c).(bool blink) |
| 1352 |
{ |
| 1353 |
_allowBlinkingTextcxx . . $ Konsole/TerminalDisplay#_allowBlinkingText. = blink; |
| 1354 |
|
| 1355 |
if (blink && !_blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer.->isActivecxx . . $ QTimer#isActive(50ce9a9e25b4a850).()) |
| 1356 |
_blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer.->startcxx . . $ QTimer#start(d4f767463ce0a6b3).(TEXT_BLINK_DELAYcxx . . $ Konsole/TerminalDisplay#TEXT_BLINK_DELAY.); |
| 1357 |
|
| 1358 |
if (!blink && _blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer.->isActivecxx . . $ QTimer#isActive(50ce9a9e25b4a850).()) |
| 1359 |
{ |
| 1360 |
_blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer.->stopcxx . . $ QTimer#stop(49f6e7a06ebc5aa8).(); |
| 1361 |
_blinkingcxx . . $ Konsole/TerminalDisplay#_blinking. = false; |
| 1362 |
} |
| 1363 |
} |
| 1364 |
|
| 1365 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::focusOutEventcxx . . $ Konsole/TerminalDisplay#focusOutEvent(897a5ce4b6676619).(QFocusEventcxx . . $ QFocusEvent#*) |
| 1366 |
{ |
| 1367 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! termLostFocuscxx . . $ Konsole/TerminalDisplay#termLostFocus(49f6e7a06ebc5aa8).(); |
| 1368 |
// trigger a repaint of the cursor so that it is both visible (in case |
| 1369 |
// it was hidden during blinking) |
| 1370 |
// and drawn in a focused out state |
| 1371 |
_cursorBlinkingcxx . . $ Konsole/TerminalDisplay#_cursorBlinking. = false; |
| 1372 |
updateCursorcxx . . $ Konsole/TerminalDisplay#updateCursor(49f6e7a06ebc5aa8).(); |
| 1373 |
|
| 1374 |
_blinkCursorTimercxx . . $ Konsole/TerminalDisplay#_blinkCursorTimer.->stopcxx . . $ QTimer#stop(49f6e7a06ebc5aa8).(); |
| 1375 |
if (_blinkingcxx . . $ Konsole/TerminalDisplay#_blinking.) |
| 1376 |
blinkEventcxx . . $ Konsole/TerminalDisplay#blinkEvent(49f6e7a06ebc5aa8).(); |
| 1377 |
|
| 1378 |
_blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer.->stopcxx . . $ QTimer#stop(49f6e7a06ebc5aa8).(); |
| 1379 |
} |
| 1380 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::focusInEventcxx . . $ Konsole/TerminalDisplay#focusInEvent(897a5ce4b6676619).(QFocusEventcxx . . $ QFocusEvent#*) |
| 1381 |
{ |
| 1382 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! termGetFocuscxx . . $ Konsole/TerminalDisplay#termGetFocus(49f6e7a06ebc5aa8).(); |
| 1383 |
if (_hasBlinkingCursorcxx . . $ Konsole/TerminalDisplay#_hasBlinkingCursor.) |
| 1384 |
{ |
| 1385 |
_blinkCursorTimercxx . . $ Konsole/TerminalDisplay#_blinkCursorTimer.->startcxx . . $ QTimer#start(49f6e7a06ebc5aa8).(); |
| 1386 |
} |
| 1387 |
updateCursorcxx . . $ Konsole/TerminalDisplay#updateCursor(49f6e7a06ebc5aa8).(); |
| 1388 |
|
| 1389 |
if (_hasBlinkercxx . . $ Konsole/TerminalDisplay#_hasBlinker.) |
| 1390 |
_blinkTimercxx . . $ Konsole/TerminalDisplay#_blinkTimer.->startcxx . . $ QTimer#start(49f6e7a06ebc5aa8).(); |
| 1391 |
} |
| 1392 |
|
| 1393 |
// QMLTermWidget version. See the upstream commented version for reference. |
| 1394 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::paintcxx . . $ Konsole/TerminalDisplay#paint(c81d535d1ac9d52).(QPaintercxx . . $ QPainter# *painter) |
| 1395 |
{ |
| 1396 |
QRectcxx . . $ QRect# clipRect = painter->clipBoundingRectcxx . . $ QPainter#clipBoundingRect(19f9350443f914b1).().toAlignedRectcxx . . $ QRectF#toAlignedRect(e6cdfbae3abc21e7).(); |
| 1397 |
QRectcxx . . $ QRect# dirtyRect = clipRect.isValidcxx . . $ QRect#isValid(3482b152b9333168).() ? clipRect : contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).(); |
| 1398 |
drawContentscxx . . $ Konsole/TerminalDisplay#drawContents(b0f466568e76e62).(*painter, dirtyRect); |
| 1399 |
} |
| 1400 |
|
| 1401 |
// qtermwidget upstream version, might be useful for reference. |
| 1402 |
//void TerminalDisplay::paintEvent( QPaintEvent* pe ) |
| 1403 |
//{ |
| 1404 |
// QPainter paint(this); |
| 1405 |
// QRect cr = contentsRect(); |
| 1406 |
|
| 1407 |
// if ( !_backgroundImage.isNull() ) |
| 1408 |
// { |
| 1409 |
// QColor background = _colorTable[DEFAULT_BACK_COLOR].color; |
| 1410 |
// if (_opacity < static_cast<qreal>(1)) |
| 1411 |
// { |
| 1412 |
// background.setAlphaF(_opacity); |
| 1413 |
// paint.save(); |
| 1414 |
// paint.setCompositionMode(QPainter::CompositionMode_Source); |
| 1415 |
// paint.fillRect(cr, background); |
| 1416 |
// paint.restore(); |
| 1417 |
// } |
| 1418 |
// else |
| 1419 |
// { |
| 1420 |
// paint.fillRect(cr, background); |
| 1421 |
// } |
| 1422 |
|
| 1423 |
// paint.save(); |
| 1424 |
// paint.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); |
| 1425 |
|
| 1426 |
// if (_backgroundMode == Stretch) |
| 1427 |
// { // scale the image without keeping its proportions to fill the screen |
| 1428 |
// paint.drawPixmap(cr, _backgroundImage, _backgroundImage.rect()); |
| 1429 |
// } |
| 1430 |
// else if (_backgroundMode == Zoom) |
| 1431 |
// { // zoom in/out the image to fit it |
| 1432 |
// QRect r = _backgroundImage.rect(); |
| 1433 |
// qreal wRatio = static_cast<qreal>(cr.width()) / r.width(); |
| 1434 |
// qreal hRatio = static_cast<qreal>(cr.height()) / r.height(); |
| 1435 |
// if (wRatio > hRatio) |
| 1436 |
// { |
| 1437 |
// r.setWidth(qRound(r.width() * hRatio)); |
| 1438 |
// r.setHeight(cr.height()); |
| 1439 |
// } |
| 1440 |
// else |
| 1441 |
// { |
| 1442 |
// r.setHeight(qRound(r.height() * wRatio)); |
| 1443 |
// r.setWidth(cr.width()); |
| 1444 |
// } |
| 1445 |
// r.moveCenter(cr.center()); |
| 1446 |
// paint.drawPixmap(r, _backgroundImage, _backgroundImage.rect()); |
| 1447 |
// } |
| 1448 |
// else if (_backgroundMode == Fit) |
| 1449 |
// { // if the image is bigger than the terminal, zoom it out to fit it |
| 1450 |
// QRect r = _backgroundImage.rect(); |
| 1451 |
// qreal wRatio = static_cast<qreal>(cr.width()) / r.width(); |
| 1452 |
// qreal hRatio = static_cast<qreal>(cr.height()) / r.height(); |
| 1453 |
// if (r.width() > cr.width()) |
| 1454 |
// { |
| 1455 |
// if (wRatio <= hRatio) |
| 1456 |
// { |
| 1457 |
// r.setHeight(qRound(r.height() * wRatio)); |
| 1458 |
// r.setWidth(cr.width()); |
| 1459 |
// } |
| 1460 |
// else |
| 1461 |
// { |
| 1462 |
// r.setWidth(qRound(r.width() * hRatio)); |
| 1463 |
// r.setHeight(cr.height()); |
| 1464 |
// } |
| 1465 |
// } |
| 1466 |
// else if (r.height() > cr.height()) |
| 1467 |
// { |
| 1468 |
// r.setWidth(qRound(r.width() * hRatio)); |
| 1469 |
// r.setHeight(cr.height()); |
| 1470 |
// } |
| 1471 |
// r.moveCenter(cr.center()); |
| 1472 |
// paint.drawPixmap(r, _backgroundImage, _backgroundImage.rect()); |
| 1473 |
// } |
| 1474 |
// else if (_backgroundMode == Center) |
| 1475 |
// { // center the image without scaling/zooming |
| 1476 |
// QRect r = _backgroundImage.rect(); |
| 1477 |
// r.moveCenter(cr.center()); |
| 1478 |
// paint.drawPixmap(r.topLeft(), _backgroundImage); |
| 1479 |
// } |
| 1480 |
// else //if (_backgroundMode == None) |
| 1481 |
// { |
| 1482 |
// paint.drawPixmap(0, 0, _backgroundImage); |
| 1483 |
// } |
| 1484 |
|
| 1485 |
// paint.restore(); |
| 1486 |
// } |
| 1487 |
|
| 1488 |
// if(_drawTextTestFlag) |
| 1489 |
// { |
| 1490 |
// calDrawTextAdditionHeight(paint); |
| 1491 |
// } |
| 1492 |
|
| 1493 |
// const auto rects = (pe->region() & cr).rects(); |
| 1494 |
// for (const QRect &rect : rects) |
| 1495 |
// { |
| 1496 |
// drawBackground(paint,rect,palette().background().color(), |
| 1497 |
// true /* use opacity setting */); |
| 1498 |
// drawContents(paint, rect); |
| 1499 |
// } |
| 1500 |
// drawInputMethodPreeditString(paint,preeditRect()); |
| 1501 |
// paintFilters(paint); |
| 1502 |
|
| 1503 |
QPointcxx . . $ QPoint# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::cursorPositioncxx . . $ Konsole/TerminalDisplay#cursorPosition(75d69cfbd3c4b2dd).() const |
| 1504 |
{ |
| 1505 |
if (_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.) |
| 1506 |
return _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).cursorPositioncxx . . $ Konsole/ScreenWindow#cursorPosition(75d69cfbd3c4b2dd).(); |
| 1507 |
else |
| 1508 |
return {cxx . . $ QPoint#QPoint(3e454b8ccf442868).0,0}; |
| 1509 |
} |
| 1510 |
|
| 1511 |
QRectcxx . . $ QRect# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::preeditRectcxx . . $ Konsole/TerminalDisplay#preeditRect(d857385bac04cbf7).() const |
| 1512 |
{ |
| 1513 |
const int preeditLength = string_widthcxx . . $ string_width(b67f1dc07021228a).(_inputMethodDatacxx . . $ Konsole/TerminalDisplay#_inputMethodData..preeditStringcxx . . $ Konsole/TerminalDisplay#InputMethodData#preeditString.); |
| 1514 |
|
| 1515 |
if ( preeditLength == 0 ) |
| 1516 |
return {cxx . . $ QRect#QRect(ced63f7c635d850d).}; |
| 1517 |
|
| 1518 |
return QRectcxx . . $ QRect#QRect(2261ffe5112eab06).(_leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin. + _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth.*cursorPositioncxx . . $ Konsole/TerminalDisplay#cursorPosition(75d69cfbd3c4b2dd).().xcxx . . $ QPoint#x(455f465bc33b4cdf).(), |
| 1519 |
_topMargincxx . . $ Konsole/TerminalDisplay#_topMargin. + _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.*cursorPositioncxx . . $ Konsole/TerminalDisplay#cursorPosition(75d69cfbd3c4b2dd).().ycxx . . $ QPoint#y(455f465bc33b4cdf).(), |
| 1520 |
_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth.*preeditLength, |
| 1521 |
_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.); |
| 1522 |
} |
| 1523 |
|
| 1524 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::drawInputMethodPreeditStringcxx . . $ Konsole/TerminalDisplay#drawInputMethodPreeditString(b0f466568e76e62).(QPaintercxx . . $ QPainter#& painter , const QRectcxx . . $ QRect#& rect) |
| 1525 |
{ |
| 1526 |
if ( _inputMethodDatacxx . . $ Konsole/TerminalDisplay#_inputMethodData..preeditStringcxx . . $ Konsole/TerminalDisplay#InputMethodData#preeditString..emptycxx . . $ std/__cxx11/basic_string#empty(3482b152b9333168).() ) |
| 1527 |
return; |
| 1528 |
|
| 1529 |
const QPointcxx . . $ QPoint# cursorPos = cursorPositioncxx . . $ Konsole/TerminalDisplay#cursorPosition(75d69cfbd3c4b2dd).(); |
| 1530 |
|
| 1531 |
bool invertColors = false; |
| 1532 |
const QColorcxx . . $ QColor# background = _colorTablecxx . . $ QColor#QColor(c396aab421781ee8).[DEFAULT_BACK_COLORcxx . . $ `lib/CharacterColor.h:106:9`!].colorcxx . . $ Konsole/ColorEntry#color.; |
| 1533 |
const QColorcxx . . $ QColor# foreground = _colorTablecxx . . $ QColor#QColor(c396aab421781ee8).[DEFAULT_FORE_COLORcxx . . $ `lib/CharacterColor.h:105:9`!].colorcxx . . $ Konsole/ColorEntry#color.; |
| 1534 |
const Charactercxx . . $ Konsole/Character#* style = &_imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(cursorPos.x(),cursorPos.y())]; |
| 1535 |
|
| 1536 |
drawBackgroundcxx . . $ Konsole/TerminalDisplay#drawBackground(e8484d876dbc605a).(painter,rect,background,true); |
| 1537 |
drawCursorcxx . . $ Konsole/TerminalDisplay#drawCursor(73ea19ad007b7edc).(painter,rect,foreground,background,invertColors); |
| 1538 |
drawCharacterscxx . . $ Konsole/TerminalDisplay#drawCharacters(683bc66187729b95).(painter,rect,_inputMethodDatacxx . . $ Konsole/TerminalDisplay#_inputMethodData..preeditStringcxx . . $ Konsole/TerminalDisplay#InputMethodData#preeditString.,style,invertColors); |
| 1539 |
|
| 1540 |
_inputMethodDatacxx . . $ Konsole/TerminalDisplay#_inputMethodData..previousPreeditRectcxx . . $ Konsole/TerminalDisplay#InputMethodData#previousPreeditRect. =cxx . . $ QRect#`operator=`(7cfd2b8ed4e6a4e). rect; |
| 1541 |
} |
| 1542 |
|
| 1543 |
FilterChaincxx . . $ Konsole/FilterChain#* TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::filterChaincxx . . $ Konsole/TerminalDisplay#filterChain(a12532596442fae1).() const |
| 1544 |
{ |
| 1545 |
return _filterChaincxx . . $ Konsole/TerminalDisplay#_filterChain.; |
| 1546 |
} |
| 1547 |
|
| 1548 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::paintFilterscxx . . $ Konsole/TerminalDisplay#paintFilters(a44752e0c3add9e1).(QPaintercxx . . $ QPainter#& painter) |
| 1549 |
{ |
| 1550 |
// get color of character under mouse and use it to draw |
| 1551 |
// lines for filters |
| 1552 |
QPointcxx . . $ QPoint# cursorPos = mapFromScenecxx . . $ QQuickItem#mapFromScene(d99487573c8c6d6c).(QCursorcxx . . $ QPointF#QPointF(4f9e9534be445c03).::poscxx . . $ QCursor#pos(c189c43f91c31e1b).()).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).(); |
| 1553 |
int cursorLine; |
| 1554 |
int cursorColumn; |
| 1555 |
int leftMargin = _leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin. |
| 1556 |
+ ((_scrollbarLocationcxx . . $ Konsole/TerminalDisplay#_scrollbarLocation. == QTermWidgetcxx . . $ QTermWidget#::ScrollBarLeftcxx . . $ QTermWidget#ScrollBarLeft. |
| 1557 |
&& !_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->stylecxx . . $ QWidget#style(5bbb00d3017c281f).()->styleHintcxx . . $ QStyle#styleHint(671b55e70cc3dc02).(QStylecxx . . $ QStyle#::SH_ScrollBar_Transientcxx . . $ QStyle#SH_ScrollBar_Transient., nullptr, _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.)) |
| 1558 |
? _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->widthcxx . . $ QWidget#width(455f465bc33b4cdf).() : 0); |
| 1559 |
|
| 1560 |
getCharacterPositioncxx . . $ Konsole/TerminalDisplay#getCharacterPosition(e49d6c685ff5f9bc).( cursorPos , cursorLine , cursorColumn ); |
| 1561 |
Charactercxx . . $ Konsole/Character# cursorCharacter = _imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(cursorColumn,cursorLine)]; |
| 1562 |
|
| 1563 |
painter.setPencxx . . $ QPainter#setPen(af0a25dfda3214db).( QPencxx . . $ QPen#QPen(129a55e114526ad3).(cursorCharacter.foregroundColorcxx . . $ Konsole/Character#foregroundColor..colorcxx . . $ Konsole/CharacterColor#color(b83b316448997199).(colorTablecxx . . $ Konsole/TerminalDisplay#colorTable(ec15202fc6ea9dfb).())) ); |
| 1564 |
|
| 1565 |
// iterate over hotspots identified by the display's currently active filters |
| 1566 |
// and draw appropriate visuals to indicate the presence of the hotspot |
| 1567 |
|
| 1568 |
QListcxx . . $ QList#<Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#*> spots = _filterChaincxx . . $ Konsole/TerminalDisplay#_filterChain.->hotSpotscxx . . $ Konsole/FilterChain#hotSpots(927ee1eeecce351e).(); |
| 1569 |
QListIteratorcxx . . $ QListIterator#<Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#*> itercxx . . $ QListIterator#QListIterator(742a15f66a895bc5).(spots); |
| 1570 |
while (iter.hasNextcxx . . $ QListIterator#hasNext(50ce9a9e25b4a850).()) |
| 1571 |
{ |
| 1572 |
Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#* spot = iter.nextcxx . . $ QListIterator#next(1306adbac230aeaa).(); |
| 1573 |
|
| 1574 |
QRegioncxx . . $ QRegion# regioncxx . . $ QRegion#QRegion(49f6e7a06ebc5aa8).; |
| 1575 |
if ( spot->typecxx . . $ Konsole/Filter#HotSpot#type(d53492adece367cf).() == Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::Linkcxx . . $ Konsole/Filter#HotSpot#Link. ) { |
| 1576 |
QRectcxx . . $ QRect# rcxx . . $ QRect#QRect(ced63f7c635d850d).; |
| 1577 |
if (spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()==spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()) { |
| 1578 |
r.setCoordscxx . . $ QRect#setCoords(2261ffe5112eab06).( spot->startColumncxx . . $ Konsole/Filter#HotSpot#startColumn(455f465bc33b4cdf).()*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + 1 + leftMargin, |
| 1579 |
spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + 1 + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin., |
| 1580 |
spot->endColumncxx . . $ Konsole/Filter#HotSpot#endColumn(455f465bc33b4cdf).()*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. - 1 + leftMargin, |
| 1581 |
(spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()+1)*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. - 1 + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin. ); |
| 1582 |
region |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). rcxx . . $ QRegion#QRegion(c9f450b5feb9110c).; |
| 1583 |
} else { |
| 1584 |
r.setCoordscxx . . $ QRect#setCoords(2261ffe5112eab06).( spot->startColumncxx . . $ Konsole/Filter#HotSpot#startColumn(455f465bc33b4cdf).()*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + 1 + leftMargin, |
| 1585 |
spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + 1 + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin., |
| 1586 |
_columnscxx . . $ Konsole/TerminalDisplay#_columns.*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. - 1 + leftMargin, |
| 1587 |
(spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()+1)*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. - 1 + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin. ); |
| 1588 |
region |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). rcxx . . $ QRegion#QRegion(c9f450b5feb9110c).; |
| 1589 |
for ( int line = spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()+1 ; line < spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).() ; line++ ) { |
| 1590 |
r.setCoordscxx . . $ QRect#setCoords(2261ffe5112eab06).( 0*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + 1 + leftMargin, |
| 1591 |
line*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + 1 + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin., |
| 1592 |
_columnscxx . . $ Konsole/TerminalDisplay#_columns.*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. - 1 + leftMargin, |
| 1593 |
(line+1)*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. - 1 + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin. ); |
| 1594 |
region |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). rcxx . . $ QRegion#QRegion(c9f450b5feb9110c).; |
| 1595 |
} |
| 1596 |
r.setCoordscxx . . $ QRect#setCoords(2261ffe5112eab06).( 0*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + 1 + leftMargin, |
| 1597 |
spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + 1 + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin., |
| 1598 |
spot->endColumncxx . . $ Konsole/Filter#HotSpot#endColumn(455f465bc33b4cdf).()*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. - 1 + leftMargin, |
| 1599 |
(spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()+1)*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. - 1 + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin. ); |
| 1600 |
region |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). rcxx . . $ QRegion#QRegion(c9f450b5feb9110c).; |
| 1601 |
} |
| 1602 |
} |
| 1603 |
|
| 1604 |
for ( int line = spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).() ; line <= spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).() ; line++ ) |
| 1605 |
{ |
| 1606 |
int startColumn = 0; |
| 1607 |
int endColumn = _columnscxx . . $ Konsole/TerminalDisplay#_columns.-1; // TODO use number of _columns which are actually |
| 1608 |
// occupied on this line rather than the width of the |
| 1609 |
// display in _columns |
| 1610 |
|
| 1611 |
// ignore whitespace at the end of the lines |
| 1612 |
while ( QCharcxx . . $ QChar#(_imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(endColumn,line)].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.).isSpacecxx . . $ QChar#isSpace(3482b152b9333168).() && endColumn > 0 ) |
| 1613 |
endColumn--; |
| 1614 |
|
| 1615 |
// increment here because the column which we want to set 'endColumn' to |
| 1616 |
// is the first whitespace character at the end of the line |
| 1617 |
endColumn++; |
| 1618 |
|
| 1619 |
if ( line == spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).() ) |
| 1620 |
startColumn = spot->startColumncxx . . $ Konsole/Filter#HotSpot#startColumn(455f465bc33b4cdf).(); |
| 1621 |
if ( line == spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).() ) |
| 1622 |
endColumn = spot->endColumncxx . . $ Konsole/Filter#HotSpot#endColumn(455f465bc33b4cdf).(); |
| 1623 |
|
| 1624 |
// subtract one pixel from |
| 1625 |
// the right and bottom so that |
| 1626 |
// we do not overdraw adjacent |
| 1627 |
// hotspots |
| 1628 |
// |
| 1629 |
// subtracting one pixel from all sides also prevents an edge case where |
| 1630 |
// moving the mouse outside a link could still leave it underlined |
| 1631 |
// because the check below for the position of the cursor |
| 1632 |
// finds it on the border of the target area |
| 1633 |
QRectcxx . . $ QRect# rcxx . . $ QRect#QRect(ced63f7c635d850d).; |
| 1634 |
r.setCoordscxx . . $ QRect#setCoords(2261ffe5112eab06).( startColumn*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + 1 + leftMargin, |
| 1635 |
line*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + 1 + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin., |
| 1636 |
endColumn*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. - 1 + leftMargin, |
| 1637 |
(line+1)*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. - 1 + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin. ); |
| 1638 |
// Underline link hotspots |
| 1639 |
if ( spot->typecxx . . $ Konsole/Filter#HotSpot#type(d53492adece367cf).() == Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::Linkcxx . . $ Konsole/Filter#HotSpot#Link. ) |
| 1640 |
{ |
| 1641 |
QFontMetricscxx . . $ QFontMetrics# metricscxx . . $ QFontMetrics#QFontMetrics(d0a4bd0c8524b912).(fontcxx . . $ Konsole/TerminalDisplay#font(9958934e48c66a6a).()); |
| 1642 |
|
| 1643 |
// find the baseline (which is the invisible line that the characters in the font sit on, |
| 1644 |
// with some having tails dangling below) |
| 1645 |
int baseline = r.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).() - metrics.descentcxx . . $ QFontMetrics#descent(455f465bc33b4cdf).(); |
| 1646 |
// find the position of the underline below that |
| 1647 |
int underlinePos = baseline + metrics.underlinePoscxx . . $ QFontMetrics#underlinePos(455f465bc33b4cdf).(); |
| 1648 |
|
| 1649 |
if ( region.containscxx . . $ QRegion#contains(9dbdd6d3c629d116).( mapFromScenecxx . . $ QQuickItem#mapFromScene(d99487573c8c6d6c).(QCursorcxx . . $ QPointF#QPointF(4f9e9534be445c03).::poscxx . . $ QCursor#pos(c189c43f91c31e1b).()).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).() ) ){ |
| 1650 |
painter.drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).( r.leftcxx . . $ QRect#left(ea6fe5115c70a13f).() , underlinePos , r.rightcxx . . $ QRect#right(ea6fe5115c70a13f).() , underlinePos ); |
| 1651 |
} |
| 1652 |
} |
| 1653 |
// Marker hotspots simply have a transparent rectanglular shape |
| 1654 |
// drawn on top of them |
| 1655 |
else if ( spot->typecxx . . $ Konsole/Filter#HotSpot#type(d53492adece367cf).() == Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::Markercxx . . $ Konsole/Filter#HotSpot#Marker. ) |
| 1656 |
{ |
| 1657 |
//TODO - Do not use a hardcoded colour for this |
| 1658 |
painter.fillRectcxx . . $ QPainter#fillRect(a493e38a50e0b286).(r,QBrushcxx . . $ QBrush#QBrush(b50947b0752ea6ac).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255,0,0,120))); |
| 1659 |
} |
| 1660 |
} |
| 1661 |
} |
| 1662 |
} |
| 1663 |
|
| 1664 |
int TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::textWidthcxx . . $ Konsole/TerminalDisplay#textWidth(ccfa90015542b148).(const int startColumn, const int length, const int line) const |
| 1665 |
{ |
| 1666 |
QFontMetricscxx . . $ QFontMetrics# fmcxx . . $ QFontMetrics#QFontMetrics(d0a4bd0c8524b912).(fontcxx . . $ Konsole/TerminalDisplay#font(9958934e48c66a6a).()); |
| 1667 |
int result = 0; |
| 1668 |
for (int column = 0; column < length; column++) { |
| 1669 |
result += fm.widthcxx . . $ QFontMetrics#width(cb11a8ddef27242a).(_imagecxx . . $ QChar#QChar(f349c77f591a7878).[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(startColumn + column, line)].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.); |
| 1670 |
} |
| 1671 |
return result; |
| 1672 |
} |
| 1673 |
|
| 1674 |
QRectcxx . . $ QRect# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::calculateTextAreacxx . . $ Konsole/TerminalDisplay#calculateTextArea(53f364db87716c6c).(int topLeftX, int topLeftY, int startColumn, int line, int length) { |
| 1675 |
int left = _fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont. ? _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. * startColumn : textWidthcxx . . $ Konsole/TerminalDisplay#textWidth(ccfa90015542b148).(0, startColumn, line); |
| 1676 |
int top = _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. * line; |
| 1677 |
int width = _fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont. ? _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. * length : textWidthcxx . . $ Konsole/TerminalDisplay#textWidth(ccfa90015542b148).(startColumn, length, line); |
| 1678 |
return {cxx . . $ QRect#QRect(2261ffe5112eab06)._leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin. + topLeftX + left, |
| 1679 |
_topMargincxx . . $ Konsole/TerminalDisplay#_topMargin. + topLeftY + top, |
| 1680 |
width, |
| 1681 |
_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.}; |
| 1682 |
} |
| 1683 |
|
| 1684 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::drawContentscxx . . $ Konsole/TerminalDisplay#drawContents(b0f466568e76e62).(QPaintercxx . . $ QPainter# &paint, const QRectcxx . . $ QRect# &rect) |
| 1685 |
{ |
| 1686 |
QPointcxx . . $ QPoint# tL = contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(); |
| 1687 |
int tLx = tL.xcxx . . $ QPoint#x(455f465bc33b4cdf).(); |
| 1688 |
int tLy = tL.ycxx . . $ QPoint#y(455f465bc33b4cdf).(); |
| 1689 |
|
| 1690 |
int lux = qMincxx . . $ qMin(2a338fce5842aa6a).(_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.-1, qMaxcxx . . $ qMax(2a338fce5842aa6a).(0,(rect.leftcxx . . $ QRect#left(ea6fe5115c70a13f).() - tLx - _leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin. ) / _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth.)); |
| 1691 |
int luy = qMincxx . . $ qMin(2a338fce5842aa6a).(_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines.-1, qMaxcxx . . $ qMax(2a338fce5842aa6a).(0,(rect.topcxx . . $ QRect#top(ea6fe5115c70a13f).() - tLy - _topMargincxx . . $ Konsole/TerminalDisplay#_topMargin. ) / _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.)); |
| 1692 |
int rlx = qMincxx . . $ qMin(2a338fce5842aa6a).(_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.-1, qMaxcxx . . $ qMax(2a338fce5842aa6a).(0,(rect.rightcxx . . $ QRect#right(ea6fe5115c70a13f).() - tLx - _leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin. ) / _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth.)); |
| 1693 |
int rly = qMincxx . . $ qMin(2a338fce5842aa6a).(_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines.-1, qMaxcxx . . $ qMax(2a338fce5842aa6a).(0,(rect.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).() - tLy - _topMargincxx . . $ Konsole/TerminalDisplay#_topMargin. ) / _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.)); |
| 1694 |
|
| 1695 |
if(!_imagecxx . . $ Konsole/TerminalDisplay#_image.) |
| 1696 |
return; |
| 1697 |
|
| 1698 |
const int bufferSize = _usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.; |
| 1699 |
std::wstringcxx . . $ std/wstring# unistrcxx . . $ std/__cxx11/basic_string#basic_string(925dcc5e17f50391).; |
| 1700 |
unistr.reservecxx . . $ std/__cxx11/basic_string#reserve(9dac5f4bebd06212).(bufferSize); |
| 1701 |
for (int y = luy; y <= rly; y++) |
| 1702 |
{ |
| 1703 |
quint32cxx . . $ quint32# c = _imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(lux,y)].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.; |
| 1704 |
int x = lux; |
| 1705 |
if(!c && x) |
| 1706 |
x--; // Search for start of multi-column character |
| 1707 |
for (; x <= rlx; x++) |
| 1708 |
{ |
| 1709 |
int len = 1; |
| 1710 |
int p = 0; |
| 1711 |
|
| 1712 |
// reset our buffer to the maximal size |
| 1713 |
unistr.resizecxx . . $ std/__cxx11/basic_string#resize(9dac5f4bebd06212).(bufferSize); |
| 1714 |
|
| 1715 |
// is this a single character or a sequence of characters ? |
| 1716 |
if ( _imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x,y)].renditioncxx . . $ Konsole/Character#rendition. & RE_EXTENDED_CHARcxx . . $ `lib/Character.h:50:9`! ) |
| 1717 |
{ |
| 1718 |
// sequence of characters |
| 1719 |
ushortcxx . . $ ushort# extendedCharLength = 0; |
| 1720 |
ushortcxx . . $ ushort#* chars = ExtendedCharTablecxx . . $ Konsole/ExtendedCharTable#::instancecxx . . $ Konsole/ExtendedCharTable#instance. |
| 1721 |
.lookupExtendedCharcxx . . $ Konsole/ExtendedCharTable#lookupExtendedChar(9d4345af5ccf9989).(_imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x,y)].charSequencecxx . . $ Konsole/Character#$anonymous_type_0#charSequence.,extendedCharLength); |
| 1722 |
for ( int index = 0 ; index < extendedCharLength ; index++ ) |
| 1723 |
{ |
| 1724 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( p < bufferSize ); |
| 1725 |
unistr[cxx . . $ std/__cxx11/basic_string#`operator[]`(7b73c3179b3cb3ad).p++] = chars[index]; |
| 1726 |
} |
| 1727 |
} |
| 1728 |
else |
| 1729 |
{ |
| 1730 |
// single character |
| 1731 |
c = _imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x,y)].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.; |
| 1732 |
if (c) |
| 1733 |
{ |
| 1734 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( p < bufferSize ); |
| 1735 |
unistr[cxx . . $ std/__cxx11/basic_string#`operator[]`(7b73c3179b3cb3ad).p++] = c; //fontMap(c); |
| 1736 |
} |
| 1737 |
} |
| 1738 |
|
| 1739 |
bool lineDraw = isLineCharcxx . . $ Konsole/TerminalDisplay#isLineChar(beeb25e058ed20bb).(c); |
| 1740 |
bool doubleWidth = (_imagecxx . . $ Konsole/TerminalDisplay#_image.[ qMincxx . . $ qMin(2a338fce5842aa6a).(loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x,y)+1,_imageSizecxx . . $ Konsole/TerminalDisplay#_imageSize.) ].charactercxx . . $ Konsole/Character#$anonymous_type_0#character. == 0); |
| 1741 |
CharacterColorcxx . . $ Konsole/CharacterColor# currentForeground = _imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x,y)].foregroundColorcxx . . $ Konsole/Character#foregroundColor.; |
| 1742 |
CharacterColorcxx . . $ Konsole/CharacterColor# currentBackground = _imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x,y)].backgroundColorcxx . . $ Konsole/Character#backgroundColor.; |
| 1743 |
quint8cxx . . $ quint8# currentRendition = _imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x,y)].renditioncxx . . $ Konsole/Character#rendition.; |
| 1744 |
|
| 1745 |
while (x+len <= rlx && |
| 1746 |
_imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x+len,y)].foregroundColorcxx . . $ Konsole/Character#foregroundColor. ==cxx . . $ Konsole/`operator==`(40f11079b1efd097). currentForeground && |
| 1747 |
_imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x+len,y)].backgroundColorcxx . . $ Konsole/Character#backgroundColor. ==cxx . . $ Konsole/`operator==`(40f11079b1efd097). currentBackground && |
| 1748 |
_imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x+len,y)].renditioncxx . . $ Konsole/Character#rendition. == currentRendition && |
| 1749 |
(_imagecxx . . $ Konsole/TerminalDisplay#_image.[ qMincxx . . $ qMin(2a338fce5842aa6a).(loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x+len,y)+1,_imageSizecxx . . $ Konsole/TerminalDisplay#_imageSize.) ].charactercxx . . $ Konsole/Character#$anonymous_type_0#character. == 0) == doubleWidth && |
| 1750 |
isLineCharcxx . . $ Konsole/TerminalDisplay#isLineChar(beeb25e058ed20bb).( c = _imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x+len,y)].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.) == lineDraw) // Assignment! |
| 1751 |
{ |
| 1752 |
if (c) |
| 1753 |
unistr[cxx . . $ std/__cxx11/basic_string#`operator[]`(7b73c3179b3cb3ad).p++] = c; //fontMap(c); |
| 1754 |
if (doubleWidth) // assert((_image[loc(x+len,y)+1].character == 0)), see above if condition |
| 1755 |
len++; // Skip trailing part of multi-column character |
| 1756 |
len++; |
| 1757 |
} |
| 1758 |
if ((x+len < _usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.) && (!_imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x+len,y)].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.)) |
| 1759 |
len++; // Adjust for trailing part of multi-column character |
| 1760 |
|
| 1761 |
bool save__fixedFont = _fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont.; |
| 1762 |
if (lineDraw) |
| 1763 |
_fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont. = false; |
| 1764 |
unistr.resizecxx . . $ std/__cxx11/basic_string#resize(9dac5f4bebd06212).(p); |
| 1765 |
|
| 1766 |
// Create a text scaling matrix for double width and double height lines. |
| 1767 |
QTransformcxx . . $ QTransform# textScalecxx . . $ QTransform#QTransform(49f6e7a06ebc5aa8).; |
| 1768 |
|
| 1769 |
if (y < _linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties..sizecxx . . $ QVector#size(455f465bc33b4cdf).()) |
| 1770 |
{ |
| 1771 |
if (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).y] & LINE_DOUBLEWIDTHcxx . . $ Konsole/LINE_DOUBLEWIDTH.) |
| 1772 |
textScale.scalecxx . . $ QTransform#scale(8cff7b8c4086936d).(2,1); |
| 1773 |
|
| 1774 |
if (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).y] & LINE_DOUBLEHEIGHTcxx . . $ Konsole/LINE_DOUBLEHEIGHT.) |
| 1775 |
textScale.scalecxx . . $ QTransform#scale(8cff7b8c4086936d).(1,2); |
| 1776 |
} |
| 1777 |
|
| 1778 |
//Apply text scaling matrix. |
| 1779 |
paint.setWorldTransformcxx . . $ QPainter#setWorldTransform(6027f8f6db98365c).(textScale, true); |
| 1780 |
|
| 1781 |
//calculate the area in which the text will be drawn |
| 1782 |
QRectcxx . . $ QRect# textArea = calculateTextAreacxx . . $ Konsole/TerminalDisplay#calculateTextArea(53f364db87716c6c).(tLx, tLy, x, y, len); |
| 1783 |
|
| 1784 |
//move the calculated area to take account of scaling applied to the painter. |
| 1785 |
//the position of the area from the origin (0,0) is scaled |
| 1786 |
//by the opposite of whatever |
| 1787 |
//transformation has been applied to the painter. this ensures that |
| 1788 |
//painting does actually start from textArea.topLeft() |
| 1789 |
//(instead of textArea.topLeft() * painter-scale) |
| 1790 |
textArea.moveTopLeftcxx . . $ QRect#moveTopLeft(4c7e4a2350b03b37).( textScale.invertedcxx . . $ QTransform#inverted(90d4d5b277fa8e30).().mapcxx . . $ QTransform#map(1aa4d425351b0c99).(textArea.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).()) ); |
| 1791 |
|
| 1792 |
//paint text fragment |
| 1793 |
drawTextFragmentcxx . . $ Konsole/TerminalDisplay#drawTextFragment(dce02916890c04de).( paint, |
| 1794 |
textArea, |
| 1795 |
unistr, |
| 1796 |
&_imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(x,y)] ); //, |
| 1797 |
//0, |
| 1798 |
//!_isPrinting ); |
| 1799 |
|
| 1800 |
_fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont. = save__fixedFont; |
| 1801 |
|
| 1802 |
//reset back to single-width, single-height _lines |
| 1803 |
paint.setWorldTransformcxx . . $ QPainter#setWorldTransform(6027f8f6db98365c).(textScale.invertedcxx . . $ QTransform#inverted(90d4d5b277fa8e30).(), true); |
| 1804 |
|
| 1805 |
if (y < _linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties..sizecxx . . $ QVector#size(455f465bc33b4cdf).()-1) |
| 1806 |
{ |
| 1807 |
//double-height _lines are represented by two adjacent _lines |
| 1808 |
//containing the same characters |
| 1809 |
//both _lines will have the LINE_DOUBLEHEIGHT attribute. |
| 1810 |
//If the current line has the LINE_DOUBLEHEIGHT attribute, |
| 1811 |
//we can therefore skip the next line |
| 1812 |
if (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).y] & LINE_DOUBLEHEIGHTcxx . . $ Konsole/LINE_DOUBLEHEIGHT.) |
| 1813 |
y++; |
| 1814 |
} |
| 1815 |
|
| 1816 |
x += len - 1; |
| 1817 |
} |
| 1818 |
} |
| 1819 |
} |
| 1820 |
|
| 1821 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::blinkEventcxx . . $ Konsole/TerminalDisplay#blinkEvent(49f6e7a06ebc5aa8).() |
| 1822 |
{ |
| 1823 |
if (!_allowBlinkingTextcxx . . $ Konsole/TerminalDisplay#_allowBlinkingText.) return; |
| 1824 |
|
| 1825 |
_blinkingcxx . . $ Konsole/TerminalDisplay#_blinking. = !_blinkingcxx . . $ Konsole/TerminalDisplay#_blinking.; |
| 1826 |
|
| 1827 |
//TODO: Optimize to only repaint the areas of the widget |
| 1828 |
// where there is blinking text |
| 1829 |
// rather than repainting the whole widget. |
| 1830 |
updatecxx . . $ Konsole/TerminalDisplay#update(49f6e7a06ebc5aa8).(); |
| 1831 |
} |
| 1832 |
|
| 1833 |
QRectcxx . . $ QRect# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::imageToWidgetcxx . . $ Konsole/TerminalDisplay#imageToWidget(a74d2a1e09b26a6c).(const QRectcxx . . $ QRect#& imageArea) const |
| 1834 |
{ |
| 1835 |
QRectcxx . . $ QRect# resultcxx . . $ QRect#QRect(ced63f7c635d850d).; |
| 1836 |
result.setLeftcxx . . $ QRect#setLeft(f349c77f591a7878).( _leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin. + _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. * imageArea.leftcxx . . $ QRect#left(ea6fe5115c70a13f).() ); |
| 1837 |
result.setTopcxx . . $ QRect#setTop(f349c77f591a7878).( _topMargincxx . . $ Konsole/TerminalDisplay#_topMargin. + _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. * imageArea.topcxx . . $ QRect#top(ea6fe5115c70a13f).() ); |
| 1838 |
result.setWidthcxx . . $ QRect#setWidth(f349c77f591a7878).( _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. * imageArea.widthcxx . . $ QRect#width(ea6fe5115c70a13f).() ); |
| 1839 |
result.setHeightcxx . . $ QRect#setHeight(f349c77f591a7878).( _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. * imageArea.heightcxx . . $ QRect#height(ea6fe5115c70a13f).() ); |
| 1840 |
|
| 1841 |
return result; |
| 1842 |
} |
| 1843 |
|
| 1844 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::updateCursorcxx . . $ Konsole/TerminalDisplay#updateCursor(49f6e7a06ebc5aa8).() |
| 1845 |
{ |
| 1846 |
QRectcxx . . $ QRect# cursorRect = imageToWidgetcxx . . $ Konsole/TerminalDisplay#imageToWidget(a74d2a1e09b26a6c).( QRectcxx . . $ QRect#QRect(250dfd8bdd830e67).(cursorPositioncxx . . $ Konsole/TerminalDisplay#cursorPosition(75d69cfbd3c4b2dd).(),QSizecxx . . $ QSize#QSize(c0d38f4800714fae).(1,1)) ); |
| 1847 |
updatecxx . . $ Konsole/TerminalDisplay#update(bd1064c840c6b6e8).(cursorRectcxx . . $ QRegion#QRegion(c9f450b5feb9110c).); |
| 1848 |
} |
| 1849 |
|
| 1850 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::blinkCursorEventcxx . . $ Konsole/TerminalDisplay#blinkCursorEvent(49f6e7a06ebc5aa8).() |
| 1851 |
{ |
| 1852 |
_cursorBlinkingcxx . . $ Konsole/TerminalDisplay#_cursorBlinking. = !_cursorBlinkingcxx . . $ Konsole/TerminalDisplay#_cursorBlinking.; |
| 1853 |
updateCursorcxx . . $ Konsole/TerminalDisplay#updateCursor(49f6e7a06ebc5aa8).(); |
| 1854 |
} |
| 1855 |
|
| 1856 |
/* ------------------------------------------------------------------------- */ |
| 1857 |
/* */ |
| 1858 |
/* Resizing */ |
| 1859 |
/* */ |
| 1860 |
/* ------------------------------------------------------------------------- */ |
| 1861 |
|
| 1862 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::resizeEventcxx . . $ Konsole/TerminalDisplay#resizeEvent(eeeec21cf8dc0387).(QResizeEventcxx . . $ QResizeEvent#*) |
| 1863 |
{ |
| 1864 |
updateImageSizecxx . . $ Konsole/TerminalDisplay#updateImageSize(49f6e7a06ebc5aa8).(); |
| 1865 |
processFilterscxx . . $ Konsole/TerminalDisplay#processFilters(49f6e7a06ebc5aa8).(); |
| 1866 |
} |
| 1867 |
|
| 1868 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::propagateSizecxx . . $ Konsole/TerminalDisplay#propagateSize(49f6e7a06ebc5aa8).() |
| 1869 |
{ |
| 1870 |
if (_isFixedSizecxx . . $ Konsole/TerminalDisplay#_isFixedSize.) |
| 1871 |
{ |
| 1872 |
setSizecxx . . $ Konsole/TerminalDisplay#setSize(3e454b8ccf442868).(_columnscxx . . $ Konsole/TerminalDisplay#_columns., _linescxx . . $ Konsole/TerminalDisplay#_lines.); |
| 1873 |
//QWidget::setFixedSize(sizeHint()); |
| 1874 |
//parentWidget()->adjustSize(); |
| 1875 |
//parentWidget()->setFixedSize(parentWidget()->sizeHint()); |
| 1876 |
return; |
| 1877 |
} |
| 1878 |
if (_imagecxx . . $ Konsole/TerminalDisplay#_image.) |
| 1879 |
updateImageSizecxx . . $ Konsole/TerminalDisplay#updateImageSize(49f6e7a06ebc5aa8).(); |
| 1880 |
} |
| 1881 |
|
| 1882 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::updateImageSizecxx . . $ Konsole/TerminalDisplay#updateImageSize(49f6e7a06ebc5aa8).() |
| 1883 |
{ |
| 1884 |
Charactercxx . . $ Konsole/Character#* oldimg = _imagecxx . . $ Konsole/TerminalDisplay#_image.; |
| 1885 |
int oldlin = _linescxx . . $ Konsole/TerminalDisplay#_lines.; |
| 1886 |
int oldcol = _columnscxx . . $ Konsole/TerminalDisplay#_columns.; |
| 1887 |
|
| 1888 |
makeImagecxx . . $ Konsole/TerminalDisplay#makeImage(49f6e7a06ebc5aa8).(); |
| 1889 |
|
| 1890 |
// copy the old image to reduce flicker |
| 1891 |
int lines = qMincxx . . $ qMin(2a338fce5842aa6a).(oldlin,_linescxx . . $ Konsole/TerminalDisplay#_lines.); |
| 1892 |
int columns = qMincxx . . $ qMin(2a338fce5842aa6a).(oldcol,_columnscxx . . $ Konsole/TerminalDisplay#_columns.); |
| 1893 |
|
| 1894 |
if (oldimg) |
| 1895 |
{ |
| 1896 |
for (int line = 0; line < lines; line++) |
| 1897 |
{ |
| 1898 |
memcpy((void*)&_imagecxx . . $ Konsole/TerminalDisplay#_image.[_columnscxx . . $ Konsole/TerminalDisplay#_columns.*line], |
| 1899 |
(void*)&oldimg[oldcol*line],columns*sizeof(Charactercxx . . $ Konsole/Character#)); |
| 1900 |
} |
| 1901 |
delete[] oldimg; |
| 1902 |
} |
| 1903 |
|
| 1904 |
if (_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.) |
| 1905 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setWindowLinescxx . . $ Konsole/ScreenWindow#setWindowLines(d4f767463ce0a6b3).(_linescxx . . $ Konsole/TerminalDisplay#_lines.); |
| 1906 |
|
| 1907 |
_resizingcxx . . $ Konsole/TerminalDisplay#_resizing. = (oldlin!=_linescxx . . $ Konsole/TerminalDisplay#_lines.) || (oldcol!=_columnscxx . . $ Konsole/TerminalDisplay#_columns.); |
| 1908 |
|
| 1909 |
if ( _resizingcxx . . $ Konsole/TerminalDisplay#_resizing. ) |
| 1910 |
{ |
| 1911 |
showResizeNotificationcxx . . $ Konsole/TerminalDisplay#showResizeNotification(49f6e7a06ebc5aa8).(); |
| 1912 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! changedContentSizeSignalcxx . . $ Konsole/TerminalDisplay#changedContentSizeSignal(3e454b8ccf442868).(_contentHeightcxx . . $ Konsole/TerminalDisplay#_contentHeight., _contentWidthcxx . . $ Konsole/TerminalDisplay#_contentWidth.); // expose resizeEvent |
| 1913 |
} |
| 1914 |
|
| 1915 |
_resizingcxx . . $ Konsole/TerminalDisplay#_resizing. = false; |
| 1916 |
} |
| 1917 |
|
| 1918 |
//showEvent and hideEvent are reimplemented here so that it appears to other classes that the |
| 1919 |
//display has been resized when the display is hidden or shown. |
| 1920 |
// |
| 1921 |
//TODO: Perhaps it would be better to have separate signals for show and hide instead of using |
| 1922 |
//the same signal as the one for a content size change |
| 1923 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::showEventcxx . . $ Konsole/TerminalDisplay#showEvent(bc3b8402ee8753a7).(QShowEventcxx . . $ QShowEvent#*) |
| 1924 |
{ |
| 1925 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! changedContentSizeSignalcxx . . $ Konsole/TerminalDisplay#changedContentSizeSignal(3e454b8ccf442868).(_contentHeightcxx . . $ Konsole/TerminalDisplay#_contentHeight.,_contentWidthcxx . . $ Konsole/TerminalDisplay#_contentWidth.); |
| 1926 |
} |
| 1927 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::hideEventcxx . . $ Konsole/TerminalDisplay#hideEvent(6177daf7b5c7b9b3).(QHideEventcxx . . $ QHideEvent#*) |
| 1928 |
{ |
| 1929 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! changedContentSizeSignalcxx . . $ Konsole/TerminalDisplay#changedContentSizeSignal(3e454b8ccf442868).(_contentHeightcxx . . $ Konsole/TerminalDisplay#_contentHeight.,_contentWidthcxx . . $ Konsole/TerminalDisplay#_contentWidth.); |
| 1930 |
} |
| 1931 |
|
| 1932 |
/* ------------------------------------------------------------------------- */ |
| 1933 |
/* */ |
| 1934 |
/* Scrollbar */ |
| 1935 |
/* */ |
| 1936 |
/* ------------------------------------------------------------------------- */ |
| 1937 |
|
| 1938 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::scrollBarPositionChangedcxx . . $ Konsole/TerminalDisplay#scrollBarPositionChanged(d4f767463ce0a6b3).(int) |
| 1939 |
{ |
| 1940 |
if ( !_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) |
| 1941 |
return; |
| 1942 |
|
| 1943 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).scrollTocxx . . $ Konsole/ScreenWindow#scrollTo(d4f767463ce0a6b3).( _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() ); |
| 1944 |
|
| 1945 |
// if the thumb has been moved to the bottom of the _scrollBar then set |
| 1946 |
// the display to automatically track new output, |
| 1947 |
// that is, scroll down automatically |
| 1948 |
// to how new _lines as they are added |
| 1949 |
const bool atEndOfOutput = (_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() == _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).()); |
| 1950 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setTrackOutputcxx . . $ Konsole/ScreenWindow#setTrackOutput(b45ddcbc8423892c).( atEndOfOutput ); |
| 1951 |
|
| 1952 |
updateImagecxx . . $ Konsole/TerminalDisplay#updateImage(49f6e7a06ebc5aa8).(); |
| 1953 |
|
| 1954 |
// QMLTermWidget: notify qml side of the change only when needed. |
| 1955 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! scrollbarValueChangedcxx . . $ Konsole/TerminalDisplay#scrollbarValueChanged(49f6e7a06ebc5aa8).(); |
| 1956 |
} |
| 1957 |
|
| 1958 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setScrollcxx . . $ Konsole/TerminalDisplay#setScroll(3e454b8ccf442868).(int cursor, int slines) |
| 1959 |
{ |
| 1960 |
// update _scrollBar if the range or value has changed, |
| 1961 |
// otherwise return |
| 1962 |
// |
| 1963 |
// setting the range or value of a _scrollBar will always trigger |
| 1964 |
// a repaint, so it should be avoided if it is not necessary |
| 1965 |
if ( _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->minimumcxx . . $ QAbstractSlider#minimum(455f465bc33b4cdf).() == 0 && |
| 1966 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).() == (slines - _linescxx . . $ Konsole/TerminalDisplay#_lines.) && |
| 1967 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() == cursor ) |
| 1968 |
{ |
| 1969 |
return; |
| 1970 |
} |
| 1971 |
|
| 1972 |
disconnectcxx . . $ QObject#disconnect(cc30ff19c637f8ed).(_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(valueChanged(int)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(scrollBarPositionChanged(int))); |
| 1973 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setRangecxx . . $ QAbstractSlider#setRange(3e454b8ccf442868).(0,slines - _linescxx . . $ Konsole/TerminalDisplay#_lines.); |
| 1974 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setSingleStepcxx . . $ QAbstractSlider#setSingleStep(d4f767463ce0a6b3).(1); |
| 1975 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setPageStepcxx . . $ QAbstractSlider#setPageStep(d4f767463ce0a6b3).(_linescxx . . $ Konsole/TerminalDisplay#_lines.); |
| 1976 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setValuecxx . . $ QAbstractSlider#setValue(d4f767463ce0a6b3).(cursor); |
| 1977 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(valueChanged(int)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(scrollBarPositionChanged(int))); |
| 1978 |
} |
| 1979 |
|
| 1980 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::scrollToEndcxx . . $ Konsole/TerminalDisplay#scrollToEnd(49f6e7a06ebc5aa8).() |
| 1981 |
{ |
| 1982 |
disconnectcxx . . $ QObject#disconnect(cc30ff19c637f8ed).(_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(valueChanged(int)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(scrollBarPositionChanged(int))); |
| 1983 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setValuecxx . . $ QAbstractSlider#setValue(d4f767463ce0a6b3).( _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).() ); |
| 1984 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(valueChanged(int)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(scrollBarPositionChanged(int))); |
| 1985 |
|
| 1986 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).scrollTocxx . . $ Konsole/ScreenWindow#scrollTo(d4f767463ce0a6b3).( _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() + 1 ); |
| 1987 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setTrackOutputcxx . . $ Konsole/ScreenWindow#setTrackOutput(b45ddcbc8423892c).( _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).atEndOfOutputcxx . . $ Konsole/ScreenWindow#atEndOfOutput(50ce9a9e25b4a850).() ); |
| 1988 |
} |
| 1989 |
|
| 1990 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setScrollBarPositioncxx . . $ Konsole/TerminalDisplay#setScrollBarPosition(568e8147827de94f).(QTermWidgetcxx . . $ QTermWidget#::ScrollBarPositioncxx . . $ QTermWidget#ScrollBarPosition# position) |
| 1991 |
{ |
| 1992 |
if (_scrollbarLocationcxx . . $ Konsole/TerminalDisplay#_scrollbarLocation. == position) |
| 1993 |
return; |
| 1994 |
|
| 1995 |
if ( position == QTermWidgetcxx . . $ QTermWidget#::NoScrollBarcxx . . $ QTermWidget#NoScrollBar. ) |
| 1996 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).(); |
| 1997 |
else |
| 1998 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->showcxx . . $ QWidget#show(49f6e7a06ebc5aa8).(); |
| 1999 |
|
| 2000 |
_topMargincxx . . $ Konsole/TerminalDisplay#_topMargin. = _leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin. = 1; |
| 2001 |
_scrollbarLocationcxx . . $ Konsole/TerminalDisplay#_scrollbarLocation. = position; |
| 2002 |
|
| 2003 |
propagateSizecxx . . $ Konsole/TerminalDisplay#propagateSize(49f6e7a06ebc5aa8).(); |
| 2004 |
updatecxx . . $ Konsole/TerminalDisplay#update(49f6e7a06ebc5aa8).(); |
| 2005 |
} |
| 2006 |
|
| 2007 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::mousePressEventcxx . . $ Konsole/TerminalDisplay#mousePressEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent#* ev) |
| 2008 |
{ |
| 2009 |
if ( _possibleTripleClickcxx . . $ Konsole/TerminalDisplay#_possibleTripleClick. && (ev->buttoncxx . . $ QMouseEvent#button(4a2598559eeedfc9).()==Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton.) ) { |
| 2010 |
mouseTripleClickEventcxx . . $ Konsole/TerminalDisplay#mouseTripleClickEvent(702858a82d06265c).(ev); |
| 2011 |
return; |
| 2012 |
} |
| 2013 |
|
| 2014 |
if ( !contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().containscxx . . $ QRect#contains(eaee943b37977784).(ev->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).()) ) return; |
| 2015 |
|
| 2016 |
if ( !_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) return; |
| 2017 |
|
| 2018 |
int charLine; |
| 2019 |
int charColumn; |
| 2020 |
getCharacterPositioncxx . . $ Konsole/TerminalDisplay#getCharacterPosition(e49d6c685ff5f9bc).(ev->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).(),charLine,charColumn); |
| 2021 |
QPointcxx . . $ QPoint# pos = QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(charColumn,charLine); |
| 2022 |
|
| 2023 |
if ( ev->buttoncxx . . $ QMouseEvent#button(4a2598559eeedfc9).() == Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton.) |
| 2024 |
{ |
| 2025 |
_lineSelectionModecxx . . $ Konsole/TerminalDisplay#_lineSelectionMode. = false; |
| 2026 |
_wordSelectionModecxx . . $ Konsole/TerminalDisplay#_wordSelectionMode. = false; |
| 2027 |
|
| 2028 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! isBusySelectingcxx . . $ Konsole/TerminalDisplay#isBusySelecting(b45ddcbc8423892c).(true); // Keep it steady... |
| 2029 |
// Drag only when the Control key is hold |
| 2030 |
bool selected = false; |
| 2031 |
|
| 2032 |
// The receiver of the testIsSelected() signal will adjust |
| 2033 |
// 'selected' accordingly. |
| 2034 |
//emit testIsSelected(pos.x(), pos.y(), selected); |
| 2035 |
|
| 2036 |
selected = _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).isSelectedcxx . . $ Konsole/ScreenWindow#isSelected(cf9ef193275fa6d8).(pos.xcxx . . $ QPoint#x(455f465bc33b4cdf).(),pos.ycxx . . $ QPoint#y(455f465bc33b4cdf).()); |
| 2037 |
|
| 2038 |
if ((!_ctrlDragcxx . . $ Konsole/TerminalDisplay#_ctrlDrag. || ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ControlModifiercxx . . $ Qt/ControlModifier.) && selected ) { |
| 2039 |
// The user clicked inside selected text |
| 2040 |
dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..statecxx . . $ Konsole/TerminalDisplay#_dragInfo#state. = diPendingcxx . . $ Konsole/TerminalDisplay#diPending.; |
| 2041 |
dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..startcxx . . $ Konsole/TerminalDisplay#_dragInfo#start. =cxx . . $ QPoint#`operator=`(2950c70ea382b4e5). ev->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).(); |
| 2042 |
} |
| 2043 |
else { |
| 2044 |
// No reason to ever start a drag event |
| 2045 |
dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..statecxx . . $ Konsole/TerminalDisplay#_dragInfo#state. = diNonecxx . . $ Konsole/TerminalDisplay#diNone.; |
| 2046 |
|
| 2047 |
_preserveLineBreakscxx . . $ Konsole/TerminalDisplay#_preserveLineBreaks. = !( ( ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ControlModifiercxx . . $ Qt/ControlModifier. ) && !cxx . . $ QFlags#`operator!`(3482b152b9333168).(ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::AltModifiercxx . . $ Qt/AltModifier.) ); |
| 2048 |
_columnSelectionModecxx . . $ Konsole/TerminalDisplay#_columnSelectionMode. = (ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::AltModifiercxx . . $ Qt/AltModifier.) && (ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ControlModifiercxx . . $ Qt/ControlModifier.); |
| 2049 |
|
| 2050 |
if (_mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks. || (ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ShiftModifiercxx . . $ Qt/ShiftModifier.)) |
| 2051 |
{ |
| 2052 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).clearSelectioncxx . . $ Konsole/ScreenWindow#clearSelection(49f6e7a06ebc5aa8).(); |
| 2053 |
|
| 2054 |
//emit clearSelectionSignal(); |
| 2055 |
pos.rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).() += _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).(); |
| 2056 |
_iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel. =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). _pntSelcxx . . $ Konsole/TerminalDisplay#_pntSel. =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). pos; |
| 2057 |
_actSelcxx . . $ Konsole/TerminalDisplay#_actSel. = 1; // left mouse button pressed but nothing selected yet. |
| 2058 |
|
| 2059 |
} |
| 2060 |
else |
| 2061 |
{ |
| 2062 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! mouseSignalcxx . . $ Konsole/TerminalDisplay#mouseSignal(748afa4755bc9595).( 0, charColumn + 1, charLine + 1 +_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() -_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).() , 0); |
| 2063 |
} |
| 2064 |
|
| 2065 |
Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot# *spot = _filterChaincxx . . $ Konsole/TerminalDisplay#_filterChain.->hotSpotAtcxx . . $ Konsole/FilterChain#hotSpotAt(a340944fd47eb4c3).(charLine, charColumn); |
| 2066 |
if (spot && spot->typecxx . . $ Konsole/Filter#HotSpot#type(d53492adece367cf).() == Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::Linkcxx . . $ Konsole/Filter#HotSpot#Link.) |
| 2067 |
spot->activatecxx . . $ Konsole/Filter#HotSpot#activate(3520e46b33348bf6).(QLatin1Stringcxx . . $ QString#QString(4641beeb24e75d60).("click-action")); |
| 2068 |
} |
| 2069 |
} |
| 2070 |
else if ( ev->buttoncxx . . $ QMouseEvent#button(4a2598559eeedfc9).() == Qtcxx . . $ Qt/::MidButtoncxx . . $ Qt/MidButton. ) |
| 2071 |
{ |
| 2072 |
if ( _mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks. || (ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ShiftModifiercxx . . $ Qt/ShiftModifier.) ) |
| 2073 |
emitSelectioncxx . . $ Konsole/TerminalDisplay#emitSelection(b0b38cda41d4ede4).(true,ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ControlModifiercxx . . $ Qt/ControlModifier.); |
| 2074 |
else |
| 2075 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! mouseSignalcxx . . $ Konsole/TerminalDisplay#mouseSignal(748afa4755bc9595).( 1, charColumn +1, charLine +1 +_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() -_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).() , 0); |
| 2076 |
} |
| 2077 |
else if ( ev->buttoncxx . . $ QMouseEvent#button(4a2598559eeedfc9).() == Qtcxx . . $ Qt/::RightButtoncxx . . $ Qt/RightButton. ) |
| 2078 |
{ |
| 2079 |
if (_mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks. || (ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ShiftModifiercxx . . $ Qt/ShiftModifier.)) |
| 2080 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! configureRequestcxx . . $ Konsole/TerminalDisplay#configureRequest(4f9e9534be445c03).(ev->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).()); |
| 2081 |
else |
| 2082 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! mouseSignalcxx . . $ Konsole/TerminalDisplay#mouseSignal(748afa4755bc9595).( 2, charColumn +1, charLine +1 +_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() -_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).() , 0); |
| 2083 |
} |
| 2084 |
} |
| 2085 |
|
| 2086 |
QListcxx . . $ QList#<QActioncxx . . $ QAction#*> TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::filterActionscxx . . $ Konsole/TerminalDisplay#filterActions(9fc2ada70f0071b2).(const QPointcxx . . $ QPoint#& position) |
| 2087 |
{ |
| 2088 |
int charLine, charColumn; |
| 2089 |
getCharacterPositioncxx . . $ Konsole/TerminalDisplay#getCharacterPosition(e49d6c685ff5f9bc).(position,charLine,charColumn); |
| 2090 |
|
| 2091 |
Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#* spot = _filterChaincxx . . $ Konsole/TerminalDisplay#_filterChain.->hotSpotAtcxx . . $ Konsole/FilterChain#hotSpotAt(a340944fd47eb4c3).(charLine,charColumn); |
| 2092 |
|
| 2093 |
return spot ? spot->actionscxx . . $ Konsole/Filter#HotSpot#actions(c4b3bc0793dee689).() : QListcxx . . $ QList#QList(ced63f7c635d850d).<QActioncxx . . $ QAction#*>(); |
| 2094 |
} |
| 2095 |
|
| 2096 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::mouseMoveEventcxx . . $ Konsole/TerminalDisplay#mouseMoveEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent#* ev) |
| 2097 |
{ |
| 2098 |
int charLine = 0; |
| 2099 |
int charColumn = 0; |
| 2100 |
int leftMargin = _leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin. |
| 2101 |
+ ((_scrollbarLocationcxx . . $ Konsole/TerminalDisplay#_scrollbarLocation. == QTermWidgetcxx . . $ QTermWidget#::ScrollBarLeftcxx . . $ QTermWidget#ScrollBarLeft. |
| 2102 |
&& !_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->stylecxx . . $ QWidget#style(5bbb00d3017c281f).()->styleHintcxx . . $ QStyle#styleHint(671b55e70cc3dc02).(QStylecxx . . $ QStyle#::SH_ScrollBar_Transientcxx . . $ QStyle#SH_ScrollBar_Transient., nullptr, _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.)) |
| 2103 |
? _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->widthcxx . . $ QWidget#width(455f465bc33b4cdf).() : 0); |
| 2104 |
|
| 2105 |
getCharacterPositioncxx . . $ Konsole/TerminalDisplay#getCharacterPosition(e49d6c685ff5f9bc).(ev->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).(),charLine,charColumn); |
| 2106 |
|
| 2107 |
// handle filters |
| 2108 |
// change link hot-spot appearance on mouse-over |
| 2109 |
Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#* spot = _filterChaincxx . . $ Konsole/TerminalDisplay#_filterChain.->hotSpotAtcxx . . $ Konsole/FilterChain#hotSpotAt(a340944fd47eb4c3).(charLine,charColumn); |
| 2110 |
if ( spot && spot->typecxx . . $ Konsole/Filter#HotSpot#type(d53492adece367cf).() == Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::Linkcxx . . $ Konsole/Filter#HotSpot#Link.) |
| 2111 |
{ |
| 2112 |
QRegioncxx . . $ QRegion# previousHotspotArea = _mouseOverHotspotAreacxx . . $ QRegion#QRegion(bd1064c840c6b6e8).; |
| 2113 |
_mouseOverHotspotAreacxx . . $ Konsole/TerminalDisplay#_mouseOverHotspotArea. =cxx . . $ QRegion#`operator=`(282fa80fbc32c2c1). QRegioncxx . . $ QRegion#QRegion(49f6e7a06ebc5aa8).(); |
| 2114 |
QRectcxx . . $ QRect# rcxx . . $ QRect#QRect(ced63f7c635d850d).; |
| 2115 |
if (spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()==spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()) { |
| 2116 |
r.setCoordscxx . . $ QRect#setCoords(2261ffe5112eab06).( spot->startColumncxx . . $ Konsole/Filter#HotSpot#startColumn(455f465bc33b4cdf).()*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + leftMargin, |
| 2117 |
spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin., |
| 2118 |
spot->endColumncxx . . $ Konsole/Filter#HotSpot#endColumn(455f465bc33b4cdf).()*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + leftMargin, |
| 2119 |
(spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()+1)*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. - 1 + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin. ); |
| 2120 |
_mouseOverHotspotAreacxx . . $ Konsole/TerminalDisplay#_mouseOverHotspotArea. |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). rcxx . . $ QRegion#QRegion(c9f450b5feb9110c).; |
| 2121 |
} else { |
| 2122 |
r.setCoordscxx . . $ QRect#setCoords(2261ffe5112eab06).( spot->startColumncxx . . $ Konsole/Filter#HotSpot#startColumn(455f465bc33b4cdf).()*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + leftMargin, |
| 2123 |
spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin., |
| 2124 |
_columnscxx . . $ Konsole/TerminalDisplay#_columns.*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. - 1 + leftMargin, |
| 2125 |
(spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()+1)*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin. ); |
| 2126 |
_mouseOverHotspotAreacxx . . $ Konsole/TerminalDisplay#_mouseOverHotspotArea. |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). rcxx . . $ QRegion#QRegion(c9f450b5feb9110c).; |
| 2127 |
for ( int line = spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).()+1 ; line < spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).() ; line++ ) { |
| 2128 |
r.setCoordscxx . . $ QRect#setCoords(2261ffe5112eab06).( 0*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + leftMargin, |
| 2129 |
line*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin., |
| 2130 |
_columnscxx . . $ Konsole/TerminalDisplay#_columns.*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + leftMargin, |
| 2131 |
(line+1)*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin. ); |
| 2132 |
_mouseOverHotspotAreacxx . . $ Konsole/TerminalDisplay#_mouseOverHotspotArea. |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). rcxx . . $ QRegion#QRegion(c9f450b5feb9110c).; |
| 2133 |
} |
| 2134 |
r.setCoordscxx . . $ QRect#setCoords(2261ffe5112eab06).( 0*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + leftMargin, |
| 2135 |
spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin., |
| 2136 |
spot->endColumncxx . . $ Konsole/Filter#HotSpot#endColumn(455f465bc33b4cdf).()*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. + leftMargin, |
| 2137 |
(spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).()+1)*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight. + _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin. ); |
| 2138 |
_mouseOverHotspotAreacxx . . $ Konsole/TerminalDisplay#_mouseOverHotspotArea. |=cxx . . $ QRegion#`operator|=`(bb6e10599cc2bdd1). rcxx . . $ QRegion#QRegion(c9f450b5feb9110c).; |
| 2139 |
} |
| 2140 |
updatecxx . . $ Konsole/TerminalDisplay#update(bd1064c840c6b6e8).( _mouseOverHotspotAreacxx . . $ Konsole/TerminalDisplay#_mouseOverHotspotArea. |cxx . . $ QRegion#`operator|`(cd5438909e4a68c). previousHotspotArea ); |
| 2141 |
} |
| 2142 |
else if ( !_mouseOverHotspotAreacxx . . $ Konsole/TerminalDisplay#_mouseOverHotspotArea..isEmptycxx . . $ QRegion#isEmpty(50ce9a9e25b4a850).() ) |
| 2143 |
{ |
| 2144 |
updatecxx . . $ Konsole/TerminalDisplay#update(bd1064c840c6b6e8).( _mouseOverHotspotAreacxx . . $ Konsole/TerminalDisplay#_mouseOverHotspotArea. ); |
| 2145 |
// set hotspot area to an invalid rectangle |
| 2146 |
_mouseOverHotspotAreacxx . . $ Konsole/TerminalDisplay#_mouseOverHotspotArea. =cxx . . $ QRegion#`operator=`(282fa80fbc32c2c1). QRegioncxx . . $ QRegion#QRegion(49f6e7a06ebc5aa8).(); |
| 2147 |
} |
| 2148 |
|
| 2149 |
// for auto-hiding the cursor, we need mouseTracking |
| 2150 |
if (ev->buttonscxx . . $ QMouseEvent#buttons(4523555da7f36dd2).() == Qtcxx . . $ Qt/::NoButtoncxx . . $ Qt/NoButton. ) return; |
| 2151 |
|
| 2152 |
// if the terminal is interested in mouse movements |
| 2153 |
// then emit a mouse movement signal, unless the shift |
| 2154 |
// key is being held down, which overrides this. |
| 2155 |
if (!_mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks. && !cxx . . $ QFlags#`operator!`(3482b152b9333168).(ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ShiftModifiercxx . . $ Qt/ShiftModifier.)) |
| 2156 |
{ |
| 2157 |
int button = 3; |
| 2158 |
if (ev->buttonscxx . . $ QMouseEvent#buttons(4523555da7f36dd2).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton.) |
| 2159 |
button = 0; |
| 2160 |
if (ev->buttonscxx . . $ QMouseEvent#buttons(4523555da7f36dd2).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::MidButtoncxx . . $ Qt/MidButton.) |
| 2161 |
button = 1; |
| 2162 |
if (ev->buttonscxx . . $ QMouseEvent#buttons(4523555da7f36dd2).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::RightButtoncxx . . $ Qt/RightButton.) |
| 2163 |
button = 2; |
| 2164 |
|
| 2165 |
|
| 2166 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! mouseSignalcxx . . $ Konsole/TerminalDisplay#mouseSignal(748afa4755bc9595).( button, |
| 2167 |
charColumn + 1, |
| 2168 |
charLine + 1 +_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() -_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).(), |
| 2169 |
1 ); |
| 2170 |
|
| 2171 |
return; |
| 2172 |
} |
| 2173 |
|
| 2174 |
if (dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..statecxx . . $ Konsole/TerminalDisplay#_dragInfo#state. == diPendingcxx . . $ Konsole/TerminalDisplay#diPending.) |
| 2175 |
{ |
| 2176 |
// we had a mouse down, but haven't confirmed a drag yet |
| 2177 |
// if the mouse has moved sufficiently, we will confirm |
| 2178 |
|
| 2179 |
// int distance = KGlobalSettings::dndEventDelay(); |
| 2180 |
int distance = QApplicationcxx . . $ QApplication#::startDragDistancecxx . . $ QApplication#startDragDistance(b126dc7c1de90089).(); |
| 2181 |
if ( ev->xcxx . . $ QMouseEvent#x(455f465bc33b4cdf).() > dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..startcxx . . $ Konsole/TerminalDisplay#_dragInfo#start..xcxx . . $ QPoint#x(455f465bc33b4cdf).() + distance || ev->xcxx . . $ QMouseEvent#x(455f465bc33b4cdf).() < dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..startcxx . . $ Konsole/TerminalDisplay#_dragInfo#start..xcxx . . $ QPoint#x(455f465bc33b4cdf).() - distance || |
| 2182 |
ev->ycxx . . $ QMouseEvent#y(455f465bc33b4cdf).() > dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..startcxx . . $ Konsole/TerminalDisplay#_dragInfo#start..ycxx . . $ QPoint#y(455f465bc33b4cdf).() + distance || ev->ycxx . . $ QMouseEvent#y(455f465bc33b4cdf).() < dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..startcxx . . $ Konsole/TerminalDisplay#_dragInfo#start..ycxx . . $ QPoint#y(455f465bc33b4cdf).() - distance) |
| 2183 |
{ |
| 2184 |
// we've left the drag square, we can start a real drag operation now |
| 2185 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! isBusySelectingcxx . . $ Konsole/TerminalDisplay#isBusySelecting(b45ddcbc8423892c).(false); // Ok.. we can breath again. |
| 2186 |
|
| 2187 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).clearSelectioncxx . . $ Konsole/ScreenWindow#clearSelection(49f6e7a06ebc5aa8).(); |
| 2188 |
doDragcxx . . $ Konsole/TerminalDisplay#doDrag(49f6e7a06ebc5aa8).(); |
| 2189 |
} |
| 2190 |
return; |
| 2191 |
} |
| 2192 |
else if (dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..statecxx . . $ Konsole/TerminalDisplay#_dragInfo#state. == diDraggingcxx . . $ Konsole/TerminalDisplay#diDragging.) |
| 2193 |
{ |
| 2194 |
// this isn't technically needed because mouseMoveEvent is suppressed during |
| 2195 |
// Qt drag operations, replaced by dragMoveEvent |
| 2196 |
return; |
| 2197 |
} |
| 2198 |
|
| 2199 |
if (_actSelcxx . . $ Konsole/TerminalDisplay#_actSel. == 0) return; |
| 2200 |
|
| 2201 |
// don't extend selection while pasting |
| 2202 |
if (ev->buttonscxx . . $ QMouseEvent#buttons(4523555da7f36dd2).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::MidButtoncxx . . $ Qt/MidButton.) return; |
| 2203 |
|
| 2204 |
extendSelectioncxx . . $ Konsole/TerminalDisplay#extendSelection(4f9e9534be445c03).( ev->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).() ); |
| 2205 |
} |
| 2206 |
|
| 2207 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::extendSelectioncxx . . $ Konsole/TerminalDisplay#extendSelection(4f9e9534be445c03).( const QPointcxx . . $ QPoint#& position ) |
| 2208 |
{ |
| 2209 |
QPointcxx . . $ QPoint# pos = position; |
| 2210 |
|
| 2211 |
if ( !_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) |
| 2212 |
return; |
| 2213 |
|
| 2214 |
//if ( !contentsRect().contains(ev->pos()) ) return; |
| 2215 |
QPointcxx . . $ QPoint# tL = contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(); |
| 2216 |
int tLx = tL.xcxx . . $ QPoint#x(455f465bc33b4cdf).(); |
| 2217 |
int tLy = tL.ycxx . . $ QPoint#y(455f465bc33b4cdf).(); |
| 2218 |
int scroll = _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).(); |
| 2219 |
|
| 2220 |
// we're in the process of moving the mouse with the left button pressed |
| 2221 |
// the mouse cursor will kept caught within the bounds of the text in |
| 2222 |
// this widget. |
| 2223 |
|
| 2224 |
int linesBeyondWidget = 0; |
| 2225 |
|
| 2226 |
QRectcxx . . $ QRect# textBoundscxx . . $ QRect#QRect(2261ffe5112eab06).(tLx + _leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin., |
| 2227 |
tLy + _topMargincxx . . $ Konsole/TerminalDisplay#_topMargin., |
| 2228 |
_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.*_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth.-1, |
| 2229 |
_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines.*_fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.-1); |
| 2230 |
|
| 2231 |
// Adjust position within text area bounds. |
| 2232 |
QPointcxx . . $ QPoint# oldpos = pos; |
| 2233 |
|
| 2234 |
pos.setXcxx . . $ QPoint#setX(d4f767463ce0a6b3).( qBoundcxx . . $ qBound(3dbe0c69cb86ae06).(textBounds.leftcxx . . $ QRect#left(ea6fe5115c70a13f).(),pos.xcxx . . $ QPoint#x(455f465bc33b4cdf).(),textBounds.rightcxx . . $ QRect#right(ea6fe5115c70a13f).()) ); |
| 2235 |
pos.setYcxx . . $ QPoint#setY(d4f767463ce0a6b3).( qBoundcxx . . $ qBound(3dbe0c69cb86ae06).(textBounds.topcxx . . $ QRect#top(ea6fe5115c70a13f).(),pos.ycxx . . $ QPoint#y(455f465bc33b4cdf).(),textBounds.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).()) ); |
| 2236 |
|
| 2237 |
if ( oldpos.ycxx . . $ QPoint#y(455f465bc33b4cdf).() > textBounds.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).() ) |
| 2238 |
{ |
| 2239 |
linesBeyondWidget = (oldpos.ycxx . . $ QPoint#y(455f465bc33b4cdf).()-textBounds.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).()) / _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.; |
| 2240 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setValuecxx . . $ QAbstractSlider#setValue(d4f767463ce0a6b3).(_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).()+linesBeyondWidget+1); // scrollforward |
| 2241 |
} |
| 2242 |
if ( oldpos.ycxx . . $ QPoint#y(455f465bc33b4cdf).() < textBounds.topcxx . . $ QRect#top(ea6fe5115c70a13f).() ) |
| 2243 |
{ |
| 2244 |
linesBeyondWidget = (textBounds.topcxx . . $ QRect#top(ea6fe5115c70a13f).()-oldpos.ycxx . . $ QPoint#y(455f465bc33b4cdf).()) / _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.; |
| 2245 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setValuecxx . . $ QAbstractSlider#setValue(d4f767463ce0a6b3).(_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).()-linesBeyondWidget-1); // history |
| 2246 |
} |
| 2247 |
|
| 2248 |
int charColumn = 0; |
| 2249 |
int charLine = 0; |
| 2250 |
getCharacterPositioncxx . . $ Konsole/TerminalDisplay#getCharacterPosition(e49d6c685ff5f9bc).(pos,charLine,charColumn); |
| 2251 |
|
| 2252 |
QPointcxx . . $ QPoint# here = QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(charColumn,charLine); //QPoint((pos.x()-tLx-_leftMargin+(_fontWidth/2))/_fontWidth,(pos.y()-tLy-_topMargin)/_fontHeight); |
| 2253 |
QPointcxx . . $ QPoint# oherecxx . . $ QPoint#QPoint(49f6e7a06ebc5aa8).; |
| 2254 |
QPointcxx . . $ QPoint# _iPntSelCorr = _iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel.; |
| 2255 |
_iPntSelCorr.rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).() -= _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).(); |
| 2256 |
QPointcxx . . $ QPoint# _pntSelCorr = _pntSelcxx . . $ Konsole/TerminalDisplay#_pntSel.; |
| 2257 |
_pntSelCorr.rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).() -= _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).(); |
| 2258 |
bool swapping = false; |
| 2259 |
|
| 2260 |
if ( _wordSelectionModecxx . . $ Konsole/TerminalDisplay#_wordSelectionMode. ) |
| 2261 |
{ |
| 2262 |
// Extend to word boundaries |
| 2263 |
int i; |
| 2264 |
QCharcxx . . $ QChar# selClasscxx . . $ QChar#QChar(ced63f7c635d850d).; |
| 2265 |
|
| 2266 |
bool left_not_right = ( here.ycxx . . $ QPoint#y(455f465bc33b4cdf).() < _iPntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() || |
| 2267 |
( here.ycxx . . $ QPoint#y(455f465bc33b4cdf).() == _iPntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() && here.xcxx . . $ QPoint#x(455f465bc33b4cdf).() < _iPntSelCorr.xcxx . . $ QPoint#x(455f465bc33b4cdf).() ) ); |
| 2268 |
bool old_left_not_right = ( _pntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() < _iPntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() || |
| 2269 |
( _pntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() == _iPntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() && _pntSelCorr.xcxx . . $ QPoint#x(455f465bc33b4cdf).() < _iPntSelCorr.xcxx . . $ QPoint#x(455f465bc33b4cdf).() ) ); |
| 2270 |
swapping = left_not_right != old_left_not_right; |
| 2271 |
|
| 2272 |
// Find left (left_not_right ? from here : from start) |
| 2273 |
QPointcxx . . $ QPoint# left = left_not_right ? here : _iPntSelCorr; |
| 2274 |
i = loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(left.x(),left.y()); |
| 2275 |
if (i>=0 && i<=_imageSizecxx . . $ Konsole/TerminalDisplay#_imageSize.) { |
| 2276 |
selClass =cxx . . $ QChar#`operator=`(81d7e7f12920c16). charClasscxx . . $ Konsole/TerminalDisplay#charClass(321a25151d1569e7).(_imagecxx . . $ QChar#QChar(f349c77f591a7878).[i].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.); |
| 2277 |
while ( ((left.xcxx . . $ QPoint#x(455f465bc33b4cdf).()>0) || (left.ycxx . . $ QPoint#y(455f465bc33b4cdf).()>0 && (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).left.ycxx . . $ QPoint#y(455f465bc33b4cdf).()-1] & LINE_WRAPPEDcxx . . $ Konsole/LINE_WRAPPED.) )) |
| 2278 |
&& charClasscxx . . $ Konsole/TerminalDisplay#charClass(321a25151d1569e7).(_imagecxx . . $ QChar#QChar(f349c77f591a7878).[i-1].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.) ==cxx . . $ `operator==`(a468b2f18a3afe8). selClass ) |
| 2279 |
{ i--; if (left.xcxx . . $ QPoint#x(455f465bc33b4cdf).()>0) left.rxcxx . . $ QPoint#rx(ffa05e89dbf2c50f).()--; else {left.rxcxx . . $ QPoint#rx(ffa05e89dbf2c50f).()=_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.-1; left.rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).()--;} } |
| 2280 |
} |
| 2281 |
|
| 2282 |
// Find left (left_not_right ? from start : from here) |
| 2283 |
QPointcxx . . $ QPoint# right = left_not_right ? _iPntSelCorr : here; |
| 2284 |
i = loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(right.x(),right.y()); |
| 2285 |
if (i>=0 && i<=_imageSizecxx . . $ Konsole/TerminalDisplay#_imageSize.) { |
| 2286 |
selClass =cxx . . $ QChar#`operator=`(81d7e7f12920c16). charClasscxx . . $ Konsole/TerminalDisplay#charClass(321a25151d1569e7).(_imagecxx . . $ QChar#QChar(f349c77f591a7878).[i].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.); |
| 2287 |
while( ((right.xcxx . . $ QPoint#x(455f465bc33b4cdf).()<_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.-1) || (right.ycxx . . $ QPoint#y(455f465bc33b4cdf).()<_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines.-1 && (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).right.ycxx . . $ QPoint#y(455f465bc33b4cdf).()] & LINE_WRAPPEDcxx . . $ Konsole/LINE_WRAPPED.) )) |
| 2288 |
&& charClasscxx . . $ Konsole/TerminalDisplay#charClass(321a25151d1569e7).(_imagecxx . . $ QChar#QChar(f349c77f591a7878).[i+1].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.) ==cxx . . $ `operator==`(a468b2f18a3afe8). selClass ) |
| 2289 |
{ i++; if (right.xcxx . . $ QPoint#x(455f465bc33b4cdf).()<_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.-1) right.rxcxx . . $ QPoint#rx(ffa05e89dbf2c50f).()++; else {right.rxcxx . . $ QPoint#rx(ffa05e89dbf2c50f).()=0; right.rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).()++; } } |
| 2290 |
} |
| 2291 |
|
| 2292 |
// Pick which is start (ohere) and which is extension (here) |
| 2293 |
if ( left_not_right ) |
| 2294 |
{ |
| 2295 |
here =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). left; ohere =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). right; |
| 2296 |
} |
| 2297 |
else |
| 2298 |
{ |
| 2299 |
here =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). right; ohere =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). left; |
| 2300 |
} |
| 2301 |
ohere.rxcxx . . $ QPoint#rx(ffa05e89dbf2c50f).()++; |
| 2302 |
} |
| 2303 |
|
| 2304 |
if ( _lineSelectionModecxx . . $ Konsole/TerminalDisplay#_lineSelectionMode. ) |
| 2305 |
{ |
| 2306 |
// Extend to complete line |
| 2307 |
bool above_not_below = ( here.ycxx . . $ QPoint#y(455f465bc33b4cdf).() < _iPntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() ); |
| 2308 |
|
| 2309 |
QPointcxx . . $ QPoint# above = above_not_below ? here : _iPntSelCorr; |
| 2310 |
QPointcxx . . $ QPoint# below = above_not_below ? _iPntSelCorr : here; |
| 2311 |
|
| 2312 |
while (above.ycxx . . $ QPoint#y(455f465bc33b4cdf).()>0 && (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).above.ycxx . . $ QPoint#y(455f465bc33b4cdf).()-1] & LINE_WRAPPEDcxx . . $ Konsole/LINE_WRAPPED.) ) |
| 2313 |
above.rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).()--; |
| 2314 |
while (below.ycxx . . $ QPoint#y(455f465bc33b4cdf).()<_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines.-1 && (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).below.ycxx . . $ QPoint#y(455f465bc33b4cdf).()] & LINE_WRAPPEDcxx . . $ Konsole/LINE_WRAPPED.) ) |
| 2315 |
below.rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).()++; |
| 2316 |
|
| 2317 |
above.setXcxx . . $ QPoint#setX(d4f767463ce0a6b3).(0); |
| 2318 |
below.setXcxx . . $ QPoint#setX(d4f767463ce0a6b3).(_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.-1); |
| 2319 |
|
| 2320 |
// Pick which is start (ohere) and which is extension (here) |
| 2321 |
if ( above_not_below ) |
| 2322 |
{ |
| 2323 |
here =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). above; ohere =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). below; |
| 2324 |
} |
| 2325 |
else |
| 2326 |
{ |
| 2327 |
here =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). below; ohere =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). above; |
| 2328 |
} |
| 2329 |
|
| 2330 |
QPointcxx . . $ QPoint# newSelBegin = QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).( ohere.xcxx . . $ QPoint#x(455f465bc33b4cdf).(), ohere.ycxx . . $ QPoint#y(455f465bc33b4cdf).() ); |
| 2331 |
swapping = !(_tripleSelBegincxx . . $ Konsole/TerminalDisplay#_tripleSelBegin.==cxx . . $ `operator==`(195a822b08741ba6).newSelBegin); |
| 2332 |
_tripleSelBegincxx . . $ Konsole/TerminalDisplay#_tripleSelBegin. =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). newSelBegin; |
| 2333 |
|
| 2334 |
ohere.rxcxx . . $ QPoint#rx(ffa05e89dbf2c50f).()++; |
| 2335 |
} |
| 2336 |
|
| 2337 |
int offset = 0; |
| 2338 |
if ( !_wordSelectionModecxx . . $ Konsole/TerminalDisplay#_wordSelectionMode. && !_lineSelectionModecxx . . $ Konsole/TerminalDisplay#_lineSelectionMode. ) |
| 2339 |
{ |
| 2340 |
int i; |
| 2341 |
QCharcxx . . $ QChar# selClasscxx . . $ QChar#QChar(ced63f7c635d850d).; |
| 2342 |
|
| 2343 |
bool left_not_right = ( here.ycxx . . $ QPoint#y(455f465bc33b4cdf).() < _iPntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() || |
| 2344 |
( here.ycxx . . $ QPoint#y(455f465bc33b4cdf).() == _iPntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() && here.xcxx . . $ QPoint#x(455f465bc33b4cdf).() < _iPntSelCorr.xcxx . . $ QPoint#x(455f465bc33b4cdf).() ) ); |
| 2345 |
bool old_left_not_right = ( _pntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() < _iPntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() || |
| 2346 |
( _pntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() == _iPntSelCorr.ycxx . . $ QPoint#y(455f465bc33b4cdf).() && _pntSelCorr.xcxx . . $ QPoint#x(455f465bc33b4cdf).() < _iPntSelCorr.xcxx . . $ QPoint#x(455f465bc33b4cdf).() ) ); |
| 2347 |
swapping = left_not_right != old_left_not_right; |
| 2348 |
|
| 2349 |
// Find left (left_not_right ? from here : from start) |
| 2350 |
QPointcxx . . $ QPoint# left = left_not_right ? here : _iPntSelCorr; |
| 2351 |
|
| 2352 |
// Find left (left_not_right ? from start : from here) |
| 2353 |
QPointcxx . . $ QPoint# right = left_not_right ? _iPntSelCorr : here; |
| 2354 |
if ( right.xcxx . . $ QPoint#x(455f465bc33b4cdf).() > 0 && !_columnSelectionModecxx . . $ Konsole/TerminalDisplay#_columnSelectionMode. ) |
| 2355 |
{ |
| 2356 |
i = loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(right.x(),right.y()); |
| 2357 |
if (i>=0 && i<=_imageSizecxx . . $ Konsole/TerminalDisplay#_imageSize.) { |
| 2358 |
selClass =cxx . . $ QChar#`operator=`(81d7e7f12920c16). charClasscxx . . $ Konsole/TerminalDisplay#charClass(321a25151d1569e7).(_imagecxx . . $ QChar#QChar(f349c77f591a7878).[i-1].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.); |
| 2359 |
/* if (selClass == ' ') |
| 2360 |
{ |
| 2361 |
while ( right.x() < _usedColumns-1 && charClass(_image[i+1].character) == selClass && (right.y()<_usedLines-1) && |
| 2362 |
!(_lineProperties[right.y()] & LINE_WRAPPED)) |
| 2363 |
{ i++; right.rx()++; } |
| 2364 |
if (right.x() < _usedColumns-1) |
| 2365 |
right = left_not_right ? _iPntSelCorr : here; |
| 2366 |
else |
| 2367 |
right.rx()++; // will be balanced later because of offset=-1; |
| 2368 |
}*/ |
| 2369 |
} |
| 2370 |
} |
| 2371 |
|
| 2372 |
// Pick which is start (ohere) and which is extension (here) |
| 2373 |
if ( left_not_right ) |
| 2374 |
{ |
| 2375 |
here =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). left; ohere =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). right; offset = 0; |
| 2376 |
} |
| 2377 |
else |
| 2378 |
{ |
| 2379 |
here =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). right; ohere =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). left; offset = -1; |
| 2380 |
} |
| 2381 |
} |
| 2382 |
|
| 2383 |
if ((here ==cxx . . $ `operator==`(195a822b08741ba6). _pntSelCorr) && (scroll == _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).())) return; // not moved |
| 2384 |
|
| 2385 |
if (here ==cxx . . $ `operator==`(195a822b08741ba6). ohere) return; // It's not left, it's not right. |
| 2386 |
|
| 2387 |
if ( _actSelcxx . . $ Konsole/TerminalDisplay#_actSel. < 2 || swapping ) |
| 2388 |
{ |
| 2389 |
if ( _columnSelectionModecxx . . $ Konsole/TerminalDisplay#_columnSelectionMode. && !_lineSelectionModecxx . . $ Konsole/TerminalDisplay#_lineSelectionMode. && !_wordSelectionModecxx . . $ Konsole/TerminalDisplay#_wordSelectionMode. ) |
| 2390 |
{ |
| 2391 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setSelectionStartcxx . . $ Konsole/ScreenWindow#setSelectionStart(6908015b96d379c0).( ohere.xcxx . . $ QPoint#x(455f465bc33b4cdf).() , ohere.ycxx . . $ QPoint#y(455f465bc33b4cdf).() , true ); |
| 2392 |
} |
| 2393 |
else |
| 2394 |
{ |
| 2395 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setSelectionStartcxx . . $ Konsole/ScreenWindow#setSelectionStart(6908015b96d379c0).( ohere.xcxx . . $ QPoint#x(455f465bc33b4cdf).()-1-offset , ohere.ycxx . . $ QPoint#y(455f465bc33b4cdf).() , false ); |
| 2396 |
} |
| 2397 |
|
| 2398 |
} |
| 2399 |
|
| 2400 |
_actSelcxx . . $ Konsole/TerminalDisplay#_actSel. = 2; // within selection |
| 2401 |
_pntSelcxx . . $ Konsole/TerminalDisplay#_pntSel. =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). here; |
| 2402 |
_pntSelcxx . . $ Konsole/TerminalDisplay#_pntSel..rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).() += _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).(); |
| 2403 |
|
| 2404 |
if ( _columnSelectionModecxx . . $ Konsole/TerminalDisplay#_columnSelectionMode. && !_lineSelectionModecxx . . $ Konsole/TerminalDisplay#_lineSelectionMode. && !_wordSelectionModecxx . . $ Konsole/TerminalDisplay#_wordSelectionMode. ) |
| 2405 |
{ |
| 2406 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setSelectionEndcxx . . $ Konsole/ScreenWindow#setSelectionEnd(3e454b8ccf442868).( here.xcxx . . $ QPoint#x(455f465bc33b4cdf).() , here.ycxx . . $ QPoint#y(455f465bc33b4cdf).() ); |
| 2407 |
} |
| 2408 |
else |
| 2409 |
{ |
| 2410 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setSelectionEndcxx . . $ Konsole/ScreenWindow#setSelectionEnd(3e454b8ccf442868).( here.xcxx . . $ QPoint#x(455f465bc33b4cdf).()+offset , here.ycxx . . $ QPoint#y(455f465bc33b4cdf).() ); |
| 2411 |
} |
| 2412 |
|
| 2413 |
} |
| 2414 |
|
| 2415 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::mouseReleaseEventcxx . . $ Konsole/TerminalDisplay#mouseReleaseEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent#* ev) |
| 2416 |
{ |
| 2417 |
if ( !_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) |
| 2418 |
return; |
| 2419 |
|
| 2420 |
int charLine; |
| 2421 |
int charColumn; |
| 2422 |
getCharacterPositioncxx . . $ Konsole/TerminalDisplay#getCharacterPosition(e49d6c685ff5f9bc).(ev->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).(),charLine,charColumn); |
| 2423 |
|
| 2424 |
if ( ev->buttoncxx . . $ QMouseEvent#button(4a2598559eeedfc9).() == Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton.) |
| 2425 |
{ |
| 2426 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! isBusySelectingcxx . . $ Konsole/TerminalDisplay#isBusySelecting(b45ddcbc8423892c).(false); |
| 2427 |
if(dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..statecxx . . $ Konsole/TerminalDisplay#_dragInfo#state. == diPendingcxx . . $ Konsole/TerminalDisplay#diPending.) |
| 2428 |
{ |
| 2429 |
// We had a drag event pending but never confirmed. Kill selection |
| 2430 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).clearSelectioncxx . . $ Konsole/ScreenWindow#clearSelection(49f6e7a06ebc5aa8).(); |
| 2431 |
//emit clearSelectionSignal(); |
| 2432 |
} |
| 2433 |
else |
| 2434 |
{ |
| 2435 |
if ( _actSelcxx . . $ Konsole/TerminalDisplay#_actSel. > 1 ) |
| 2436 |
{ |
| 2437 |
setSelectioncxx . . $ Konsole/TerminalDisplay#setSelection(3520e46b33348bf6).( _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).selectedTextcxx . . $ Konsole/ScreenWindow#selectedText(11ecdffe9192d1a2).(_preserveLineBreakscxx . . $ Konsole/TerminalDisplay#_preserveLineBreaks.) ); |
| 2438 |
} |
| 2439 |
|
| 2440 |
_actSelcxx . . $ Konsole/TerminalDisplay#_actSel. = 0; |
| 2441 |
|
| 2442 |
//FIXME: emits a release event even if the mouse is |
| 2443 |
// outside the range. The procedure used in `mouseMoveEvent' |
| 2444 |
// applies here, too. |
| 2445 |
|
| 2446 |
if (!_mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks. && !cxx . . $ QFlags#`operator!`(3482b152b9333168).(ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ShiftModifiercxx . . $ Qt/ShiftModifier.)) |
| 2447 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! mouseSignalcxx . . $ Konsole/TerminalDisplay#mouseSignal(748afa4755bc9595).( 0, |
| 2448 |
charColumn + 1, |
| 2449 |
charLine + 1 +_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() -_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).() , 2); |
| 2450 |
} |
| 2451 |
dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..statecxx . . $ Konsole/TerminalDisplay#_dragInfo#state. = diNonecxx . . $ Konsole/TerminalDisplay#diNone.; |
| 2452 |
} |
| 2453 |
|
| 2454 |
|
| 2455 |
if ( !_mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks. && |
| 2456 |
((ev->buttoncxx . . $ QMouseEvent#button(4a2598559eeedfc9).() == Qtcxx . . $ Qt/::RightButtoncxx . . $ Qt/RightButton. && !cxx . . $ QFlags#`operator!`(3482b152b9333168).(ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ShiftModifiercxx . . $ Qt/ShiftModifier.)) |
| 2457 |
|| ev->buttoncxx . . $ QMouseEvent#button(4a2598559eeedfc9).() == Qtcxx . . $ Qt/::MidButtoncxx . . $ Qt/MidButton.) ) |
| 2458 |
{ |
| 2459 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! mouseSignalcxx . . $ Konsole/TerminalDisplay#mouseSignal(748afa4755bc9595).( ev->buttoncxx . . $ QMouseEvent#button(4a2598559eeedfc9).() == Qtcxx . . $ Qt/::MidButtoncxx . . $ Qt/MidButton. ? 1 : 2, |
| 2460 |
charColumn + 1, |
| 2461 |
charLine + 1 +_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() -_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).() , |
| 2462 |
2); |
| 2463 |
} |
| 2464 |
} |
| 2465 |
|
| 2466 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::getCharacterPositioncxx . . $ Konsole/TerminalDisplay#getCharacterPosition(e49d6c685ff5f9bc).(const QPointcxx . . $ QPoint#& widgetPoint,int& line,int& column) const |
| 2467 |
{ |
| 2468 |
line = (widgetPoint.ycxx . . $ QPoint#y(455f465bc33b4cdf).()-contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().topcxx . . $ QRect#top(ea6fe5115c70a13f).()-_topMargincxx . . $ Konsole/TerminalDisplay#_topMargin.) / _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.; |
| 2469 |
if (line < 0) |
| 2470 |
line = 0; |
| 2471 |
if (line >= _usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines.) |
| 2472 |
line = _usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines. - 1; |
| 2473 |
|
| 2474 |
int x = widgetPoint.xcxx . . $ QPoint#x(455f465bc33b4cdf).() + _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth. / 2 - contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().leftcxx . . $ QRect#left(ea6fe5115c70a13f).() - _leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin.; |
| 2475 |
if ( _fixedFontcxx . . $ Konsole/TerminalDisplay#_fixedFont. ) |
| 2476 |
column = x / _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth.; |
| 2477 |
else |
| 2478 |
{ |
| 2479 |
column = 0; |
| 2480 |
while(column + 1 < _usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns. && x > textWidthcxx . . $ Konsole/TerminalDisplay#textWidth(ccfa90015542b148).(0, column + 1, line)) |
| 2481 |
column++; |
| 2482 |
} |
| 2483 |
|
| 2484 |
if ( column < 0 ) |
| 2485 |
column = 0; |
| 2486 |
|
| 2487 |
// the column value returned can be equal to _usedColumns, which |
| 2488 |
// is the position just after the last character displayed in a line. |
| 2489 |
// |
| 2490 |
// this is required so that the user can select characters in the right-most |
| 2491 |
// column (or left-most for right-to-left input) |
| 2492 |
if ( column > _usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns. ) |
| 2493 |
column = _usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.; |
| 2494 |
} |
| 2495 |
|
| 2496 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::updateFilterscxx . . $ Konsole/TerminalDisplay#updateFilters(49f6e7a06ebc5aa8).() |
| 2497 |
{ |
| 2498 |
if ( !_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) |
| 2499 |
return; |
| 2500 |
|
| 2501 |
processFilterscxx . . $ Konsole/TerminalDisplay#processFilters(49f6e7a06ebc5aa8).(); |
| 2502 |
} |
| 2503 |
|
| 2504 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::updateLinePropertiescxx . . $ Konsole/TerminalDisplay#updateLineProperties(49f6e7a06ebc5aa8).() |
| 2505 |
{ |
| 2506 |
if ( !_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) |
| 2507 |
return; |
| 2508 |
|
| 2509 |
_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties. =cxx . . $ QVector#`operator=`(70978f0ed5016e46). _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).getLinePropertiescxx . . $ Konsole/ScreenWindow#getLineProperties(a3e81cde8669a353).(); |
| 2510 |
} |
| 2511 |
|
| 2512 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::mouseDoubleClickEventcxx . . $ Konsole/TerminalDisplay#mouseDoubleClickEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent#* ev) |
| 2513 |
{ |
| 2514 |
if ( ev->buttoncxx . . $ QMouseEvent#button(4a2598559eeedfc9).() != Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton.) return; |
| 2515 |
if ( !_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) return; |
| 2516 |
|
| 2517 |
int charLine = 0; |
| 2518 |
int charColumn = 0; |
| 2519 |
|
| 2520 |
getCharacterPositioncxx . . $ Konsole/TerminalDisplay#getCharacterPosition(e49d6c685ff5f9bc).(ev->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).(),charLine,charColumn); |
| 2521 |
|
| 2522 |
QPointcxx . . $ QPoint# poscxx . . $ QPoint#QPoint(3e454b8ccf442868).(charColumn,charLine); |
| 2523 |
|
| 2524 |
// pass on double click as two clicks. |
| 2525 |
if (!_mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks. && !cxx . . $ QFlags#`operator!`(3482b152b9333168).(ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ShiftModifiercxx . . $ Qt/ShiftModifier.)) |
| 2526 |
{ |
| 2527 |
// Send just _ONE_ click event, since the first click of the double click |
| 2528 |
// was already sent by the click handler |
| 2529 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! mouseSignalcxx . . $ Konsole/TerminalDisplay#mouseSignal(748afa4755bc9595).( 0, |
| 2530 |
pos.xcxx . . $ QPoint#x(455f465bc33b4cdf).()+1, |
| 2531 |
pos.ycxx . . $ QPoint#y(455f465bc33b4cdf).()+1 +_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() -_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).(), |
| 2532 |
0 ); // left button |
| 2533 |
return; |
| 2534 |
} |
| 2535 |
|
| 2536 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).clearSelectioncxx . . $ Konsole/ScreenWindow#clearSelection(49f6e7a06ebc5aa8).(); |
| 2537 |
QPointcxx . . $ QPoint# bgnSel = pos; |
| 2538 |
QPointcxx . . $ QPoint# endSel = pos; |
| 2539 |
int i = loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(bgnSel.x(),bgnSel.y()); |
| 2540 |
_iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel. =cxx . . $ QPoint#`operator=`(e5d756a35ca1af6b). bgnSel; |
| 2541 |
_iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).() += _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).(); |
| 2542 |
|
| 2543 |
_wordSelectionModecxx . . $ Konsole/TerminalDisplay#_wordSelectionMode. = true; |
| 2544 |
|
| 2545 |
// find word boundaries... |
| 2546 |
QCharcxx . . $ QChar# selClass = charClasscxx . . $ Konsole/TerminalDisplay#charClass(321a25151d1569e7).(_imagecxx . . $ QChar#QChar(f349c77f591a7878).[i].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.); |
| 2547 |
{ |
| 2548 |
// find the start of the word |
| 2549 |
int x = bgnSel.xcxx . . $ QPoint#x(455f465bc33b4cdf).(); |
| 2550 |
while ( ((x>0) || (bgnSel.ycxx . . $ QPoint#y(455f465bc33b4cdf).()>0 && (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).bgnSel.ycxx . . $ QPoint#y(455f465bc33b4cdf).()-1] & LINE_WRAPPEDcxx . . $ Konsole/LINE_WRAPPED.) )) |
| 2551 |
&& charClasscxx . . $ Konsole/TerminalDisplay#charClass(321a25151d1569e7).(_imagecxx . . $ QChar#QChar(f349c77f591a7878).[i-1].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.) ==cxx . . $ `operator==`(a468b2f18a3afe8). selClass ) |
| 2552 |
{ |
| 2553 |
i--; |
| 2554 |
if (x>0) |
| 2555 |
x--; |
| 2556 |
else |
| 2557 |
{ |
| 2558 |
x=_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.-1; |
| 2559 |
bgnSel.rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).()--; |
| 2560 |
} |
| 2561 |
} |
| 2562 |
|
| 2563 |
bgnSel.setXcxx . . $ QPoint#setX(d4f767463ce0a6b3).(x); |
| 2564 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setSelectionStartcxx . . $ Konsole/ScreenWindow#setSelectionStart(6908015b96d379c0).( bgnSel.xcxx . . $ QPoint#x(455f465bc33b4cdf).() , bgnSel.ycxx . . $ QPoint#y(455f465bc33b4cdf).() , false ); |
| 2565 |
|
| 2566 |
// find the end of the word |
| 2567 |
i = loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!( endSel.x(), endSel.y() ); |
| 2568 |
x = endSel.xcxx . . $ QPoint#x(455f465bc33b4cdf).(); |
| 2569 |
while( ((x<_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.-1) || (endSel.ycxx . . $ QPoint#y(455f465bc33b4cdf).()<_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines.-1 && (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).endSel.ycxx . . $ QPoint#y(455f465bc33b4cdf).()] & LINE_WRAPPEDcxx . . $ Konsole/LINE_WRAPPED.) )) |
| 2570 |
&& charClasscxx . . $ Konsole/TerminalDisplay#charClass(321a25151d1569e7).(_imagecxx . . $ QChar#QChar(f349c77f591a7878).[i+1].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.) ==cxx . . $ `operator==`(a468b2f18a3afe8). selClass ) |
| 2571 |
{ |
| 2572 |
i++; |
| 2573 |
if (x<_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.-1) |
| 2574 |
x++; |
| 2575 |
else |
| 2576 |
{ |
| 2577 |
x=0; |
| 2578 |
endSel.rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).()++; |
| 2579 |
} |
| 2580 |
} |
| 2581 |
|
| 2582 |
endSel.setXcxx . . $ QPoint#setX(d4f767463ce0a6b3).(x); |
| 2583 |
|
| 2584 |
// In word selection mode don't select @ (64) if at end of word. |
| 2585 |
if ( ( QCharcxx . . $ QChar#( _imagecxx . . $ Konsole/TerminalDisplay#_image.[i].charactercxx . . $ Konsole/Character#$anonymous_type_0#character. ) ==cxx . . $ `operator==`(a468b2f18a3afe8). QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('@') ) && ( ( endSel.xcxx . . $ QPoint#x(455f465bc33b4cdf).() - bgnSel.xcxx . . $ QPoint#x(455f465bc33b4cdf).() ) > 0 ) ) |
| 2586 |
endSel.setXcxx . . $ QPoint#setX(d4f767463ce0a6b3).( x - 1 ); |
| 2587 |
|
| 2588 |
|
| 2589 |
_actSelcxx . . $ Konsole/TerminalDisplay#_actSel. = 2; // within selection |
| 2590 |
|
| 2591 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setSelectionEndcxx . . $ Konsole/ScreenWindow#setSelectionEnd(3e454b8ccf442868).( endSel.xcxx . . $ QPoint#x(455f465bc33b4cdf).() , endSel.ycxx . . $ QPoint#y(455f465bc33b4cdf).() ); |
| 2592 |
|
| 2593 |
setSelectioncxx . . $ Konsole/TerminalDisplay#setSelection(3520e46b33348bf6).( _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).selectedTextcxx . . $ Konsole/ScreenWindow#selectedText(11ecdffe9192d1a2).(_preserveLineBreakscxx . . $ Konsole/TerminalDisplay#_preserveLineBreaks.) ); |
| 2594 |
} |
| 2595 |
|
| 2596 |
_possibleTripleClickcxx . . $ Konsole/TerminalDisplay#_possibleTripleClick.=true; |
| 2597 |
|
| 2598 |
QTimercxx . . $ QTimer#::singleShotcxx . . $ QTimer#singleShot(24d02da3284e5f26).(QApplicationcxx . . $ QApplication#::doubleClickIntervalcxx . . $ QApplication#doubleClickInterval(b126dc7c1de90089).(),this, |
| 2599 |
SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(tripleClickTimeout())); |
| 2600 |
} |
| 2601 |
|
| 2602 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::wheelEventcxx . . $ Konsole/TerminalDisplay#wheelEvent(92d40974398e4832).( QWheelEventcxx . . $ QWheelEvent#* ev ) |
| 2603 |
{ |
| 2604 |
if (ev->orientationcxx . . $ QWheelEvent#orientation(4cb85ee07ca33cb).() != Qtcxx . . $ Qt/::Verticalcxx . . $ Qt/Vertical.) |
| 2605 |
return; |
| 2606 |
|
| 2607 |
// if the terminal program is not interested mouse events |
| 2608 |
// then send the event to the scrollbar if the slider has room to move |
| 2609 |
// or otherwise send simulated up / down key presses to the terminal program |
| 2610 |
// for the benefit of programs such as 'less' |
| 2611 |
if ( _mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks. ) |
| 2612 |
{ |
| 2613 |
bool canScroll = _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).() > 0; |
| 2614 |
if (canScroll) |
| 2615 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->eventcxx . . $ QScrollBar#event(f123fa2ce489f0bd).(ev); |
| 2616 |
else |
| 2617 |
{ |
| 2618 |
// assume that each Up / Down key event will cause the terminal application |
| 2619 |
// to scroll by one line. |
| 2620 |
// |
| 2621 |
// to get a reasonable scrolling speed, scroll by one line for every 5 degrees |
| 2622 |
// of mouse wheel rotation. Mouse wheels typically move in steps of 15 degrees, |
| 2623 |
// giving a scroll of 3 lines |
| 2624 |
int key = ev->deltacxx . . $ QWheelEvent#delta(455f465bc33b4cdf).() > 0 ? Qtcxx . . $ Qt/::Key_Upcxx . . $ Qt/Key_Up. : Qtcxx . . $ Qt/::Key_Downcxx . . $ Qt/Key_Down.; |
| 2625 |
|
| 2626 |
// QWheelEvent::delta() gives rotation in eighths of a degree |
| 2627 |
int wheelDegrees = ev->deltacxx . . $ QWheelEvent#delta(455f465bc33b4cdf).() / 8; |
| 2628 |
int linesToScroll = abs(wheelDegrees) / 5; |
| 2629 |
|
| 2630 |
QKeyEventcxx . . $ QKeyEvent# keyScrollEventcxx . . $ QKeyEvent#QKeyEvent(ef4dc924c19ba5f1).(QEventcxx . . $ QEvent#::KeyPresscxx . . $ QEvent#KeyPress.,key,Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier.); |
| 2631 |
|
| 2632 |
for (int i=0;i<linesToScroll;i++) |
| 2633 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! keyPressedSignalcxx . . $ Konsole/TerminalDisplay#keyPressedSignal(4ced653b20f45578).(&keyScrollEvent, false); |
| 2634 |
} |
| 2635 |
} |
| 2636 |
else |
| 2637 |
{ |
| 2638 |
// terminal program wants notification of mouse activity |
| 2639 |
|
| 2640 |
int charLine; |
| 2641 |
int charColumn; |
| 2642 |
getCharacterPositioncxx . . $ Konsole/TerminalDisplay#getCharacterPosition(e49d6c685ff5f9bc).( ev->poscxx . . $ QWheelEvent#pos(75d69cfbd3c4b2dd).() , charLine , charColumn ); |
| 2643 |
|
| 2644 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! mouseSignalcxx . . $ Konsole/TerminalDisplay#mouseSignal(748afa4755bc9595).( ev->deltacxx . . $ QWheelEvent#delta(455f465bc33b4cdf).() > 0 ? 4 : 5, |
| 2645 |
charColumn + 1, |
| 2646 |
charLine + 1 +_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).() -_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).() , |
| 2647 |
0); |
| 2648 |
} |
| 2649 |
} |
| 2650 |
|
| 2651 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::tripleClickTimeoutcxx . . $ Konsole/TerminalDisplay#tripleClickTimeout(49f6e7a06ebc5aa8).() |
| 2652 |
{ |
| 2653 |
_possibleTripleClickcxx . . $ Konsole/TerminalDisplay#_possibleTripleClick.=false; |
| 2654 |
} |
| 2655 |
|
| 2656 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::mouseTripleClickEventcxx . . $ Konsole/TerminalDisplay#mouseTripleClickEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent#* ev) |
| 2657 |
{ |
| 2658 |
if ( !_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) return; |
| 2659 |
|
| 2660 |
int charLine; |
| 2661 |
int charColumn; |
| 2662 |
getCharacterPositioncxx . . $ Konsole/TerminalDisplay#getCharacterPosition(e49d6c685ff5f9bc).(ev->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).(),charLine,charColumn); |
| 2663 |
_iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel. =cxx . . $ QPoint#`operator=`(2950c70ea382b4e5). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(charColumn,charLine); |
| 2664 |
|
| 2665 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).clearSelectioncxx . . $ Konsole/ScreenWindow#clearSelection(49f6e7a06ebc5aa8).(); |
| 2666 |
|
| 2667 |
_lineSelectionModecxx . . $ Konsole/TerminalDisplay#_lineSelectionMode. = true; |
| 2668 |
_wordSelectionModecxx . . $ Konsole/TerminalDisplay#_wordSelectionMode. = false; |
| 2669 |
|
| 2670 |
_actSelcxx . . $ Konsole/TerminalDisplay#_actSel. = 2; // within selection |
| 2671 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! isBusySelectingcxx . . $ Konsole/TerminalDisplay#isBusySelecting(b45ddcbc8423892c).(true); // Keep it steady... |
| 2672 |
|
| 2673 |
while (_iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..ycxx . . $ QPoint#y(455f465bc33b4cdf).()>0 && (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533)._iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..ycxx . . $ QPoint#y(455f465bc33b4cdf).()-1] & LINE_WRAPPEDcxx . . $ Konsole/LINE_WRAPPED.) ) |
| 2674 |
_iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).()--; |
| 2675 |
|
| 2676 |
if (_tripleClickModecxx . . $ Konsole/TerminalDisplay#_tripleClickMode. == SelectForwardsFromCursorcxx . . $ Konsole/TerminalDisplay#SelectForwardsFromCursor.) { |
| 2677 |
// find word boundary start |
| 2678 |
int i = loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(_iPntSel.x(),_iPntSel.y()); |
| 2679 |
QCharcxx . . $ QChar# selClass = charClasscxx . . $ Konsole/TerminalDisplay#charClass(321a25151d1569e7).(_imagecxx . . $ QChar#QChar(f349c77f591a7878).[i].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.); |
| 2680 |
int x = _iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..xcxx . . $ QPoint#x(455f465bc33b4cdf).(); |
| 2681 |
|
| 2682 |
while ( ((x>0) || |
| 2683 |
(_iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..ycxx . . $ QPoint#y(455f465bc33b4cdf).()>0 && (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533)._iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..ycxx . . $ QPoint#y(455f465bc33b4cdf).()-1] & LINE_WRAPPEDcxx . . $ Konsole/LINE_WRAPPED.) ) |
| 2684 |
) |
| 2685 |
&& charClasscxx . . $ Konsole/TerminalDisplay#charClass(321a25151d1569e7).(_imagecxx . . $ QChar#QChar(f349c77f591a7878).[i-1].charactercxx . . $ Konsole/Character#$anonymous_type_0#character.) ==cxx . . $ `operator==`(a468b2f18a3afe8). selClass ) |
| 2686 |
{ |
| 2687 |
i--; |
| 2688 |
if (x>0) |
| 2689 |
x--; |
| 2690 |
else |
| 2691 |
{ |
| 2692 |
x=_columnscxx . . $ Konsole/TerminalDisplay#_columns.-1; |
| 2693 |
_iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).()--; |
| 2694 |
} |
| 2695 |
} |
| 2696 |
|
| 2697 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setSelectionStartcxx . . $ Konsole/ScreenWindow#setSelectionStart(6908015b96d379c0).( x , _iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..ycxx . . $ QPoint#y(455f465bc33b4cdf).() , false ); |
| 2698 |
_tripleSelBegincxx . . $ Konsole/TerminalDisplay#_tripleSelBegin. =cxx . . $ QPoint#`operator=`(2950c70ea382b4e5). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).( x, _iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..ycxx . . $ QPoint#y(455f465bc33b4cdf).() ); |
| 2699 |
} |
| 2700 |
else if (_tripleClickModecxx . . $ Konsole/TerminalDisplay#_tripleClickMode. == SelectWholeLinecxx . . $ Konsole/TerminalDisplay#SelectWholeLine.) { |
| 2701 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setSelectionStartcxx . . $ Konsole/ScreenWindow#setSelectionStart(6908015b96d379c0).( 0 , _iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..ycxx . . $ QPoint#y(455f465bc33b4cdf).() , false ); |
| 2702 |
_tripleSelBegincxx . . $ Konsole/TerminalDisplay#_tripleSelBegin. =cxx . . $ QPoint#`operator=`(2950c70ea382b4e5). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).( 0, _iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..ycxx . . $ QPoint#y(455f465bc33b4cdf).() ); |
| 2703 |
} |
| 2704 |
|
| 2705 |
while (_iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..ycxx . . $ QPoint#y(455f465bc33b4cdf).()<_linescxx . . $ Konsole/TerminalDisplay#_lines.-1 && (_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533)._iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..ycxx . . $ QPoint#y(455f465bc33b4cdf).()] & LINE_WRAPPEDcxx . . $ Konsole/LINE_WRAPPED.) ) |
| 2706 |
_iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).()++; |
| 2707 |
|
| 2708 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setSelectionEndcxx . . $ Konsole/ScreenWindow#setSelectionEnd(3e454b8ccf442868).( _columnscxx . . $ Konsole/TerminalDisplay#_columns. - 1 , _iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..ycxx . . $ QPoint#y(455f465bc33b4cdf).() ); |
| 2709 |
|
| 2710 |
setSelectioncxx . . $ Konsole/TerminalDisplay#setSelection(3520e46b33348bf6).(_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).selectedTextcxx . . $ Konsole/ScreenWindow#selectedText(11ecdffe9192d1a2).(_preserveLineBreakscxx . . $ Konsole/TerminalDisplay#_preserveLineBreaks.)); |
| 2711 |
|
| 2712 |
_iPntSelcxx . . $ Konsole/TerminalDisplay#_iPntSel..rycxx . . $ QPoint#ry(ffa05e89dbf2c50f).() += _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).(); |
| 2713 |
} |
| 2714 |
|
| 2715 |
|
| 2716 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::focusNextPrevChildcxx . . $ Konsole/TerminalDisplay#focusNextPrevChild(efaadfb7dc14930a).( bool next ) |
| 2717 |
{ |
| 2718 |
if (next) |
| 2719 |
return false; // This disables changing the active part in konqueror |
| 2720 |
// when pressing Tab |
| 2721 |
return false; |
| 2722 |
//return QWidget::focusNextPrevChild( next ); |
| 2723 |
} |
| 2724 |
|
| 2725 |
|
| 2726 |
QCharcxx . . $ QChar# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::charClasscxx . . $ Konsole/TerminalDisplay#charClass(321a25151d1569e7).(QCharcxx . . $ QChar# qch) const |
| 2727 |
{ |
| 2728 |
if ( qch.isSpacecxx . . $ QChar#isSpace(3482b152b9333168).() ) return QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).(' '); |
| 2729 |
|
| 2730 |
if ( qch.isLetterOrNumbercxx . . $ QChar#isLetterOrNumber(3482b152b9333168).() || _wordCharacterscxx . . $ Konsole/TerminalDisplay#_wordCharacters..containscxx . . $ QString#contains(7cf081d1b6a1defd).(qch, Qtcxx . . $ Qt/::CaseInsensitivecxx . . $ Qt/CaseInsensitive. ) ) |
| 2731 |
return QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('a'); |
| 2732 |
|
| 2733 |
return qch; |
| 2734 |
} |
| 2735 |
|
| 2736 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setWordCharacterscxx . . $ Konsole/TerminalDisplay#setWordCharacters(3520e46b33348bf6).(const QStringcxx . . $ QString#& wc) |
| 2737 |
{ |
| 2738 |
_wordCharacterscxx . . $ Konsole/TerminalDisplay#_wordCharacters. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). wc; |
| 2739 |
} |
| 2740 |
|
| 2741 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setUsesMousecxx . . $ Konsole/TerminalDisplay#setUsesMouse(b45ddcbc8423892c).(bool on) |
| 2742 |
{ |
| 2743 |
if (_mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks. != on) { |
| 2744 |
_mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks. = on; |
| 2745 |
setCursorcxx . . $ QQuickItem#setCursor(abdcfda6ee8376ea).( _mouseMarkscxx . . $ QCursor#QCursor(1a9232e7b845eb22). ? Qtcxx . . $ Qt/::IBeamCursorcxx . . $ Qt/IBeamCursor. : Qtcxx . . $ Qt/::ArrowCursorcxx . . $ Qt/ArrowCursor. ); |
| 2746 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! usesMouseChangedcxx . . $ Konsole/TerminalDisplay#usesMouseChanged(49f6e7a06ebc5aa8).(); |
| 2747 |
} |
| 2748 |
} |
| 2749 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::usesMousecxx . . $ Konsole/TerminalDisplay#usesMouse(50ce9a9e25b4a850).() const |
| 2750 |
{ |
| 2751 |
return _mouseMarkscxx . . $ Konsole/TerminalDisplay#_mouseMarks.; |
| 2752 |
} |
| 2753 |
|
| 2754 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setBracketedPasteModecxx . . $ Konsole/TerminalDisplay#setBracketedPasteMode(b45ddcbc8423892c).(bool on) |
| 2755 |
{ |
| 2756 |
_bracketedPasteModecxx . . $ Konsole/TerminalDisplay#_bracketedPasteMode. = on; |
| 2757 |
} |
| 2758 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::bracketedPasteModecxx . . $ Konsole/TerminalDisplay#bracketedPasteMode(50ce9a9e25b4a850).() const |
| 2759 |
{ |
| 2760 |
return _bracketedPasteModecxx . . $ Konsole/TerminalDisplay#_bracketedPasteMode.; |
| 2761 |
} |
| 2762 |
|
| 2763 |
/* ------------------------------------------------------------------------- */ |
| 2764 |
/* */ |
| 2765 |
/* Clipboard */ |
| 2766 |
/* */ |
| 2767 |
/* ------------------------------------------------------------------------- */ |
| 2768 |
|
| 2769 |
#undef KeyPress |
| 2770 |
|
| 2771 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::emitSelectioncxx . . $ Konsole/TerminalDisplay#emitSelection(b0b38cda41d4ede4).(bool useXselection,bool appendReturn) |
| 2772 |
{ |
| 2773 |
if ( !_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) |
| 2774 |
return; |
| 2775 |
|
| 2776 |
// Paste Clipboard by simulating keypress events |
| 2777 |
QStringcxx . . $ QString# text = QApplicationcxx . . $ QApplication#::clipboardcxx . . $ QGuiApplication#clipboard(a5a00f8d44f5ac9e).()->textcxx . . $ QClipboard#text(736a4da42e4ed99d).(useXselection ? QClipboardcxx . . $ QClipboard#::Selectioncxx . . $ QClipboard#Selection. : |
| 2778 |
QClipboardcxx . . $ QClipboard#::Clipboardcxx . . $ QClipboard#Clipboard.); |
| 2779 |
if ( ! text.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).() ) |
| 2780 |
{ |
| 2781 |
text.replacecxx . . $ QString#replace(bf3f4488886b9fb7).(QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("\r\n"), QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("\n")); |
| 2782 |
text.replacecxx . . $ QString#replace(8514d9896be75a4a).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\n'), QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\r')); |
| 2783 |
|
| 2784 |
if (_trimPastedTrailingNewlinescxx . . $ Konsole/TerminalDisplay#_trimPastedTrailingNewlines.) { |
| 2785 |
text.replacecxx . . $ QString#replace(bb08417d5c5b4bb6).(QRegularExpressioncxx . . $ QRegularExpression#QRegularExpression(4279d2539df7cd4a).(QStringLiteralcxx . . $ `<external>/2817157206922689722/qstringliteral.h:65:9`!("\\r+$")), QStringcxx . . $ QString#QString(ced63f7c635d850d).()); |
| 2786 |
} |
| 2787 |
|
| 2788 |
// TODO QMLTERMWIDGET We should expose this as a signal. |
| 2789 |
// if (_confirmMultilinePaste && text.contains(QLatin1Char('\r'))) { |
| 2790 |
// QMessageBox confirmation(this); |
| 2791 |
// confirmation.setWindowTitle(tr("Paste multiline text")); |
| 2792 |
// confirmation.setText(tr("Are you sure you want to paste this text?")); |
| 2793 |
// confirmation.setDetailedText(text); |
| 2794 |
// confirmation.setStandardButtons(QMessageBox::Yes | QMessageBox::No); |
| 2795 |
// // Click "Show details..." to show those by default |
| 2796 |
// const auto buttons = confirmation.buttons(); |
| 2797 |
// for( QAbstractButton * btn : buttons ) { |
| 2798 |
// if (confirmation.buttonRole(btn) == QMessageBox::ActionRole && btn->text() == QMessageBox::tr("Show Details...")) { |
| 2799 |
// Q_EMIT btn->clicked(); |
| 2800 |
// break; |
| 2801 |
// } |
| 2802 |
// } |
| 2803 |
// confirmation.setDefaultButton(QMessageBox::Yes); |
| 2804 |
// confirmation.exec(); |
| 2805 |
// if (confirmation.standardButton(confirmation.clickedButton()) != QMessageBox::Yes) { |
| 2806 |
// return; |
| 2807 |
// } |
| 2808 |
// } |
| 2809 |
|
| 2810 |
bracketTextcxx . . $ Konsole/TerminalDisplay#bracketText(e91a184ddc958453).(text); |
| 2811 |
|
| 2812 |
// appendReturn is intentionally handled _after_ enclosing texts with brackets as |
| 2813 |
// that feature is used to allow execution of commands immediately after paste. |
| 2814 |
// Ref: https://bugs.kde.org/show_bug.cgi?id=16179 |
| 2815 |
// Ref: https://github.com/KDE/konsole/commit/83d365f2ebfe2e659c1e857a2f5f247c556ab571 |
| 2816 |
if(appendReturn) { |
| 2817 |
text.appendcxx . . $ QString#append(3a2ffbdf8ecc25e2).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\r')); |
| 2818 |
} |
| 2819 |
|
| 2820 |
QKeyEventcxx . . $ QKeyEvent# ecxx . . $ QKeyEvent#QKeyEvent(ef4dc924c19ba5f1).(QEventcxx . . $ QEvent#::KeyPresscxx . . $ QEvent#KeyPress., 0, Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., text); |
| 2821 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! keyPressedSignalcxx . . $ Konsole/TerminalDisplay#keyPressedSignal(4ced653b20f45578).(&e, true); // expose as a big fat keypress event |
| 2822 |
|
| 2823 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).clearSelectioncxx . . $ Konsole/ScreenWindow#clearSelection(49f6e7a06ebc5aa8).(); |
| 2824 |
|
| 2825 |
switch(mMotionAfterPastingcxx . . $ Konsole/TerminalDisplay#mMotionAfterPasting.) |
| 2826 |
{ |
| 2827 |
case MoveStartScreenWindowcxx . . $ Konsole/MoveStartScreenWindow.: |
| 2828 |
// Temporarily stop tracking output, or pasting contents triggers |
| 2829 |
// ScreenWindow::notifyOutputChanged() and the latter scrolls the |
| 2830 |
// terminal to the last line. It will be re-enabled when needed |
| 2831 |
// (e.g., scrolling to the last line). |
| 2832 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).setTrackOutputcxx . . $ Konsole/ScreenWindow#setTrackOutput(b45ddcbc8423892c).(false); |
| 2833 |
_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).scrollTocxx . . $ Konsole/ScreenWindow#scrollTo(d4f767463ce0a6b3).(0); |
| 2834 |
break; |
| 2835 |
case MoveEndScreenWindowcxx . . $ Konsole/MoveEndScreenWindow.: |
| 2836 |
scrollToEndcxx . . $ Konsole/TerminalDisplay#scrollToEnd(49f6e7a06ebc5aa8).(); |
| 2837 |
break; |
| 2838 |
case NoMoveScreenWindowcxx . . $ Konsole/NoMoveScreenWindow.: |
| 2839 |
break; |
| 2840 |
} |
| 2841 |
} |
| 2842 |
} |
| 2843 |
|
| 2844 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::bracketTextcxx . . $ Konsole/TerminalDisplay#bracketText(e91a184ddc958453).(QStringcxx . . $ QString#& text) const |
| 2845 |
{ |
| 2846 |
if (bracketedPasteModecxx . . $ Konsole/TerminalDisplay#bracketedPasteMode(50ce9a9e25b4a850).() && !_disabledBracketedPasteModecxx . . $ Konsole/TerminalDisplay#_disabledBracketedPasteMode.) |
| 2847 |
{ |
| 2848 |
text.prependcxx . . $ QString#prepend(10913c921d46e09a).(QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("\033[200~")); |
| 2849 |
text.appendcxx . . $ QString#append(10913c921d46e09a).(QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("\033[201~")); |
| 2850 |
} |
| 2851 |
} |
| 2852 |
|
| 2853 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setSelectioncxx . . $ Konsole/TerminalDisplay#setSelection(3520e46b33348bf6).(const QStringcxx . . $ QString#& t) |
| 2854 |
{ |
| 2855 |
if (QApplicationcxx . . $ QApplication#::clipboardcxx . . $ QGuiApplication#clipboard(a5a00f8d44f5ac9e).()->supportsSelectioncxx . . $ QClipboard#supportsSelection(50ce9a9e25b4a850).()) |
| 2856 |
{ |
| 2857 |
QApplicationcxx . . $ QApplication#::clipboardcxx . . $ QGuiApplication#clipboard(a5a00f8d44f5ac9e).()->setTextcxx . . $ QClipboard#setText(9f492b8a441aa8de).(t, QClipboardcxx . . $ QClipboard#::Selectioncxx . . $ QClipboard#Selection.); |
| 2858 |
} |
| 2859 |
} |
| 2860 |
|
| 2861 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::copyClipboardcxx . . $ Konsole/TerminalDisplay#copyClipboard(49f6e7a06ebc5aa8).() |
| 2862 |
{ |
| 2863 |
if ( !_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ) |
| 2864 |
return; |
| 2865 |
|
| 2866 |
QStringcxx . . $ QString# text = _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).selectedTextcxx . . $ Konsole/ScreenWindow#selectedText(11ecdffe9192d1a2).(_preserveLineBreakscxx . . $ Konsole/TerminalDisplay#_preserveLineBreaks.); |
| 2867 |
if (!text.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) |
| 2868 |
QApplicationcxx . . $ QApplication#::clipboardcxx . . $ QGuiApplication#clipboard(a5a00f8d44f5ac9e).()->setTextcxx . . $ QClipboard#setText(9f492b8a441aa8de).(text); |
| 2869 |
} |
| 2870 |
|
| 2871 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::pasteClipboardcxx . . $ Konsole/TerminalDisplay#pasteClipboard(49f6e7a06ebc5aa8).() |
| 2872 |
{ |
| 2873 |
emitSelectioncxx . . $ Konsole/TerminalDisplay#emitSelection(b0b38cda41d4ede4).(false,false); |
| 2874 |
} |
| 2875 |
|
| 2876 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::pasteSelectioncxx . . $ Konsole/TerminalDisplay#pasteSelection(49f6e7a06ebc5aa8).() |
| 2877 |
{ |
| 2878 |
emitSelectioncxx . . $ Konsole/TerminalDisplay#emitSelection(b0b38cda41d4ede4).(true,false); |
| 2879 |
} |
| 2880 |
|
| •2881 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::isClipboardEmptycxx . . $ Konsole/TerminalDisplay#isClipboardEmpty(c9857a73d68e59ba).() |
| 2882 |
{ |
| 2883 |
return QApplicationcxx . . $ QApplication#::clipboardcxx . . $ QGuiApplication#clipboard(a5a00f8d44f5ac9e).()->textcxx . . $ QClipboard#text(736a4da42e4ed99d).().isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).(); |
| 2884 |
} |
| 2885 |
|
| 2886 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::isSelectionEmptycxx . . $ Konsole/TerminalDisplay#isSelectionEmpty(c9857a73d68e59ba).() |
| 2887 |
{ |
| 2888 |
return _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).selectedTextcxx . . $ Konsole/ScreenWindow#selectedText(11ecdffe9192d1a2).(_preserveLineBreakscxx . . $ Konsole/TerminalDisplay#_preserveLineBreaks.).isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).(); |
| 2889 |
} |
| 2890 |
|
| 2891 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setConfirmMultilinePastecxx . . $ Konsole/TerminalDisplay#setConfirmMultilinePaste(b45ddcbc8423892c).(bool confirmMultilinePaste) { |
| 2892 |
_confirmMultilinePastecxx . . $ Konsole/TerminalDisplay#_confirmMultilinePaste. = confirmMultilinePaste; |
| 2893 |
} |
| 2894 |
|
| 2895 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setTrimPastedTrailingNewlinescxx . . $ Konsole/TerminalDisplay#setTrimPastedTrailingNewlines(b45ddcbc8423892c).(bool trimPastedTrailingNewlines) { |
| 2896 |
_trimPastedTrailingNewlinescxx . . $ Konsole/TerminalDisplay#_trimPastedTrailingNewlines. = trimPastedTrailingNewlines; |
| 2897 |
} |
| 2898 |
|
| 2899 |
/* ------------------------------------------------------------------------- */ |
| 2900 |
/* */ |
| 2901 |
/* Keyboard */ |
| 2902 |
/* */ |
| 2903 |
/* ------------------------------------------------------------------------- */ |
| 2904 |
|
| 2905 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setFlowControlWarningEnabledcxx . . $ Konsole/TerminalDisplay#setFlowControlWarningEnabled(b45ddcbc8423892c).( bool enable ) |
| 2906 |
{ |
| 2907 |
_flowControlWarningEnabledcxx . . $ Konsole/TerminalDisplay#_flowControlWarningEnabled. = enable; |
| 2908 |
|
| 2909 |
// if the dialog is currently visible and the flow control warning has |
| 2910 |
// been disabled then hide the dialog |
| 2911 |
if (!enable) |
| 2912 |
outputSuspendedcxx . . $ Konsole/TerminalDisplay#outputSuspended(b45ddcbc8423892c).(false); |
| 2913 |
} |
| 2914 |
|
| 2915 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setMotionAfterPastingcxx . . $ Konsole/TerminalDisplay#setMotionAfterPasting(b27c40b2256d1e48).(MotionAfterPastingcxx . . $ Konsole/MotionAfterPasting# action) |
| 2916 |
{ |
| 2917 |
mMotionAfterPastingcxx . . $ Konsole/TerminalDisplay#mMotionAfterPasting. = action; |
| 2918 |
} |
| 2919 |
|
| 2920 |
int TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::motionAfterPastingcxx . . $ Konsole/TerminalDisplay#motionAfterPasting(b126dc7c1de90089).() |
| 2921 |
{ |
| 2922 |
return mMotionAfterPastingcxx . . $ Konsole/TerminalDisplay#mMotionAfterPasting.; |
| 2923 |
} |
| 2924 |
|
| 2925 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::keyPressEventcxx . . $ Konsole/TerminalDisplay#keyPressEvent(c92999c1b6b09cc0).( QKeyEventcxx . . $ QKeyEvent#* event ) |
| 2926 |
{ |
| 2927 |
_actSelcxx . . $ Konsole/TerminalDisplay#_actSel.=0; // Key stroke implies a screen update, so TerminalDisplay won't |
| 2928 |
// know where the current selection is. |
| 2929 |
|
| 2930 |
if (_hasBlinkingCursorcxx . . $ Konsole/TerminalDisplay#_hasBlinkingCursor.) |
| 2931 |
{ |
| 2932 |
_blinkCursorTimercxx . . $ Konsole/TerminalDisplay#_blinkCursorTimer.->startcxx . . $ QTimer#start(d4f767463ce0a6b3).(QApplicationcxx . . $ QApplication#::cursorFlashTimecxx . . $ QApplication#cursorFlashTime(b126dc7c1de90089).() / 2); |
| 2933 |
if (_cursorBlinkingcxx . . $ Konsole/TerminalDisplay#_cursorBlinking.) |
| 2934 |
blinkCursorEventcxx . . $ Konsole/TerminalDisplay#blinkCursorEvent(49f6e7a06ebc5aa8).(); |
| 2935 |
else |
| 2936 |
_cursorBlinkingcxx . . $ Konsole/TerminalDisplay#_cursorBlinking. = false; |
| 2937 |
} |
| 2938 |
|
| 2939 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! keyPressedSignalcxx . . $ Konsole/TerminalDisplay#keyPressedSignal(4ced653b20f45578).(event, false); |
| 2940 |
|
| 2941 |
event->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 2942 |
} |
| 2943 |
|
| 2944 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::inputMethodEventcxx . . $ Konsole/TerminalDisplay#inputMethodEvent(eb30d52aff958119).( QInputMethodEventcxx . . $ QInputMethodEvent#* event ) |
| 2945 |
{ |
| 2946 |
QKeyEventcxx . . $ QKeyEvent# keyEventcxx . . $ QKeyEvent#QKeyEvent(ef4dc924c19ba5f1).(QEventcxx . . $ QEvent#::KeyPresscxx . . $ QEvent#KeyPress.,0,Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier.,event->commitStringcxx . . $ QInputMethodEvent#commitString(a2fb7a6ce195d51).()); |
| 2947 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! keyPressedSignalcxx . . $ Konsole/TerminalDisplay#keyPressedSignal(4ced653b20f45578).(&keyEvent, false); |
| 2948 |
|
| 2949 |
_inputMethodDatacxx . . $ Konsole/TerminalDisplay#_inputMethodData..preeditStringcxx . . $ Konsole/TerminalDisplay#InputMethodData#preeditString. =cxx . . $ std/__cxx11/basic_string#`operator=`(36befb0d0c9f966). event->preeditStringcxx . . $ QInputMethodEvent#preeditString(a2fb7a6ce195d51).().toStdWStringcxx . . $ QString#toStdWString(d07e96ea086800fd).(); |
| 2950 |
updatecxx . . $ Konsole/TerminalDisplay#update(bd1064c840c6b6e8).(preeditRectcxx . . $ QRegion#QRegion(c9f450b5feb9110c).() |cxx . . $ QRect#`operator|`(c87a5916684a953). _inputMethodDatacxx . . $ Konsole/TerminalDisplay#_inputMethodData..previousPreeditRectcxx . . $ Konsole/TerminalDisplay#InputMethodData#previousPreeditRect.); |
| 2951 |
|
| 2952 |
event->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 2953 |
} |
| 2954 |
|
| 2955 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::inputMethodQuerycxx . . $ Konsole/TerminalDisplay#inputMethodQuery(6445f52ba9e49a42).(QInputMethodQueryEventcxx . . $ QInputMethodQueryEvent# *event) |
| 2956 |
{ |
| 2957 |
event->setValuecxx . . $ QInputMethodQueryEvent#setValue(b8229672e0d0c5d6).(Qtcxx . . $ Qt/::ImEnabledcxx . . $ Qt/ImEnabled., truecxx . . $ QVariant#QVariant(b45ddcbc8423892c).); |
| 2958 |
event->setValuecxx . . $ QInputMethodQueryEvent#setValue(b8229672e0d0c5d6).(Qtcxx . . $ Qt/::ImHintscxx . . $ Qt/ImHints., QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(Qtcxx . . $ Qt/::ImhNoPredictiveTextcxx . . $ Qt/ImhNoPredictiveText. |cxx . . $ Qt/`operator|`(8e98a6f4076b1567). Qtcxx . . $ Qt/::ImhNoAutoUppercasecxx . . $ Qt/ImhNoAutoUppercase.)); |
| 2959 |
event->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 2960 |
} |
| 2961 |
|
| 2962 |
QVariantcxx . . $ QVariant# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::inputMethodQuerycxx . . $ Konsole/TerminalDisplay#inputMethodQuery(3c7e6bad31462e7e).( Qtcxx . . $ Qt/::InputMethodQuerycxx . . $ Qt/InputMethodQuery# query ) const |
| 2963 |
{ |
| 2964 |
const QPointcxx . . $ QPoint# cursorPos = _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow. ? _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).cursorPositioncxx . . $ Konsole/ScreenWindow#cursorPosition(75d69cfbd3c4b2dd).() : QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0,0); |
| 2965 |
switch ( query ) |
| 2966 |
{ |
| 2967 |
case Qtcxx . . $ Qt/::ImMicroFocuscxx . . $ Qt/ImMicroFocus.: |
| 2968 |
return imageToWidgetcxx . . $ QVariant#QVariant(22ba0428947158b).(QRectcxx . . $ QRect#QRect(2261ffe5112eab06).(cursorPos.xcxx . . $ QPoint#x(455f465bc33b4cdf).(),cursorPos.ycxx . . $ QPoint#y(455f465bc33b4cdf).(),1,1)); |
| 2969 |
break; |
| 2970 |
case Qtcxx . . $ Qt/::ImFontcxx . . $ Qt/ImFont.: |
| 2971 |
return fontcxx . . $ Konsole/TerminalDisplay#font(9958934e48c66a6a).(); |
| 2972 |
break; |
| 2973 |
case Qtcxx . . $ Qt/::ImCursorPositioncxx . . $ Qt/ImCursorPosition.: |
| 2974 |
// return the cursor position within the current line |
| 2975 |
return cursorPoscxx . . $ QVariant#QVariant(d4f767463ce0a6b3)..xcxx . . $ QPoint#x(455f465bc33b4cdf).(); |
| 2976 |
break; |
| 2977 |
case Qtcxx . . $ Qt/::ImSurroundingTextcxx . . $ Qt/ImSurroundingText.: |
| 2978 |
{ |
| 2979 |
// return the text from the current line |
| 2980 |
QStringcxx . . $ QString# lineTextcxx . . $ QString#QString(ced63f7c635d850d).; |
| 2981 |
QTextStreamcxx . . $ QTextStream# streamcxx . . $ QTextStream#QTextStream(16e3d097052a73db).(&lineText); |
| 2982 |
PlainTextDecodercxx . . $ Konsole/PlainTextDecoder# decodercxx . . $ Konsole/PlainTextDecoder#PlainTextDecoder(49f6e7a06ebc5aa8).; |
| 2983 |
decoder.begincxx . . $ Konsole/PlainTextDecoder#begin(aca783e314870a73).(&stream); |
| 2984 |
decoder.decodeLinecxx . . $ Konsole/PlainTextDecoder#decodeLine(aa119f8849ce0e23).(&_imagecxx . . $ Konsole/TerminalDisplay#_image.[loccxx . . $ `lib/TerminalDisplay.cpp:75:9`!(0,cursorPos.y())],_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.,_linePropertiescxx . . $ Konsole/TerminalDisplay#_lineProperties.[cxx . . $ QVector#`operator[]`(e2681f9bb6b2f357).cursorPos.ycxx . . $ QPoint#y(455f465bc33b4cdf).()]); |
| 2985 |
decoder.endcxx . . $ Konsole/PlainTextDecoder#end(49f6e7a06ebc5aa8).(); |
| 2986 |
return lineTextcxx . . $ QVariant#QVariant(3520e46b33348bf6).; |
| 2987 |
} |
| 2988 |
break; |
| 2989 |
case Qtcxx . . $ Qt/::ImCurrentSelectioncxx . . $ Qt/ImCurrentSelection.: |
| 2990 |
return QStringcxx . . $ QVariant#QVariant(3520e46b33348bf6).(); |
| 2991 |
break; |
| 2992 |
default: |
| 2993 |
break; |
| 2994 |
} |
| 2995 |
|
| 2996 |
return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).(); |
| 2997 |
} |
| 2998 |
|
| 2999 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::handleShortcutOverrideEventcxx . . $ Konsole/TerminalDisplay#handleShortcutOverrideEvent(654f5f472df72c38).(QKeyEventcxx . . $ QKeyEvent#* keyEvent) |
| 3000 |
{ |
| 3001 |
int modifiers = keyEvent->modifierscxx . . $ QKeyEvent#modifiers(bf228902b3e5e63b).(); |
| 3002 |
|
| 3003 |
// When a possible shortcut combination is pressed, |
| 3004 |
// emit the overrideShortcutCheck() signal to allow the host |
| 3005 |
// to decide whether the terminal should override it or not. |
| 3006 |
if (modifiers != Qtcxx . . $ Qt/::NoModifiercxx . . $ Qt/NoModifier.) |
| 3007 |
{ |
| 3008 |
int modifierCount = 0; |
| 3009 |
unsigned int currentModifier = Qtcxx . . $ Qt/::ShiftModifiercxx . . $ Qt/ShiftModifier.; |
| 3010 |
|
| 3011 |
while (currentModifier <= Qtcxx . . $ Qt/::KeypadModifiercxx . . $ Qt/KeypadModifier.) |
| 3012 |
{ |
| 3013 |
if (modifiers & currentModifier) |
| 3014 |
modifierCount++; |
| 3015 |
currentModifier <<= 1; |
| 3016 |
} |
| 3017 |
if (modifierCount < 2) |
| 3018 |
{ |
| 3019 |
bool override = false; |
| 3020 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! overrideShortcutCheckcxx . . $ Konsole/TerminalDisplay#overrideShortcutCheck(309c2049881de95d).(keyEvent,override); |
| 3021 |
if (override) |
| 3022 |
{ |
| 3023 |
keyEvent->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 3024 |
return true; |
| 3025 |
} |
| 3026 |
} |
| 3027 |
} |
| 3028 |
|
| 3029 |
// Override any of the following shortcuts because |
| 3030 |
// they are needed by the terminal |
| 3031 |
int keyCode = keyEvent->keycxx . . $ QKeyEvent#key(455f465bc33b4cdf).() | modifiers; |
| 3032 |
switch ( keyCode ) |
| 3033 |
{ |
| 3034 |
// list is taken from the QLineEdit::event() code |
| 3035 |
case Qtcxx . . $ Qt/::Key_Tabcxx . . $ Qt/Key_Tab.: |
| 3036 |
case Qtcxx . . $ Qt/::Key_Deletecxx . . $ Qt/Key_Delete.: |
| 3037 |
case Qtcxx . . $ Qt/::Key_Homecxx . . $ Qt/Key_Home.: |
| 3038 |
case Qtcxx . . $ Qt/::Key_Endcxx . . $ Qt/Key_End.: |
| 3039 |
case Qtcxx . . $ Qt/::Key_Backspacecxx . . $ Qt/Key_Backspace.: |
| 3040 |
case Qtcxx . . $ Qt/::Key_Leftcxx . . $ Qt/Key_Left.: |
| 3041 |
case Qtcxx . . $ Qt/::Key_Rightcxx . . $ Qt/Key_Right.: |
| 3042 |
case Qtcxx . . $ Qt/::Key_Escapecxx . . $ Qt/Key_Escape.: |
| 3043 |
keyEvent->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 3044 |
return true; |
| 3045 |
} |
| 3046 |
return false; |
| 3047 |
} |
| 3048 |
|
| 3049 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::eventcxx . . $ Konsole/TerminalDisplay#event(f123fa2ce489f0bd).(QEventcxx . . $ QEvent#* event) |
| 3050 |
{ |
| 3051 |
bool eventHandled = false; |
| 3052 |
switch (event->typecxx . . $ QEvent#type(916a8de57f4d422b).()) |
| 3053 |
{ |
| 3054 |
case QEventcxx . . $ QEvent#::ShortcutOverridecxx . . $ QEvent#ShortcutOverride.: |
| 3055 |
eventHandled = handleShortcutOverrideEventcxx . . $ Konsole/TerminalDisplay#handleShortcutOverrideEvent(654f5f472df72c38).((QKeyEventcxx . . $ QKeyEvent#*)event); |
| 3056 |
break; |
| 3057 |
case QEventcxx . . $ QEvent#::PaletteChangecxx . . $ QEvent#PaletteChange.: |
| 3058 |
case QEventcxx . . $ QEvent#::ApplicationPaletteChangecxx . . $ QEvent#ApplicationPaletteChange.: |
| 3059 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setPalettecxx . . $ QWidget#setPalette(f826ed73d5553cd5).( QApplicationcxx . . $ QApplication#::palettecxx . . $ QApplication#palette(522fbdbbff1b5a68).() ); |
| 3060 |
case QEventcxx . . $ QEvent#::InputMethodQuerycxx . . $ QEvent#InputMethodQuery.: |
| 3061 |
inputMethodQuerycxx . . $ Konsole/TerminalDisplay#inputMethodQuery(6445f52ba9e49a42).(static_cast<QInputMethodQueryEventcxx . . $ QInputMethodQueryEvent# *>(event)); |
| 3062 |
eventHandled = true; |
| 3063 |
break; |
| 3064 |
default: |
| 3065 |
break; |
| 3066 |
} |
| 3067 |
return eventHandled ? true : QQuickItemcxx . . $ QQuickItem#::eventcxx . . $ QQuickItem#event(f123fa2ce489f0bd).(event); |
| 3068 |
} |
| 3069 |
|
| 3070 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setBellModecxx . . $ Konsole/TerminalDisplay#setBellMode(d4f767463ce0a6b3).(int mode) |
| 3071 |
{ |
| 3072 |
_bellModecxx . . $ Konsole/TerminalDisplay#_bellMode.=mode; |
| 3073 |
} |
| 3074 |
|
| 3075 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::enableBellcxx . . $ Konsole/TerminalDisplay#enableBell(49f6e7a06ebc5aa8).() |
| 3076 |
{ |
| 3077 |
_allowBellcxx . . $ Konsole/TerminalDisplay#_allowBell. = true; |
| 3078 |
} |
| 3079 |
|
| 3080 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::bellcxx . . $ Konsole/TerminalDisplay#bell(3520e46b33348bf6).(const QStringcxx . . $ QString#& message) |
| 3081 |
{ |
| 3082 |
if (_bellModecxx . . $ Konsole/TerminalDisplay#_bellMode.==NoBellcxx . . $ Konsole/TerminalDisplay#NoBell.) return; |
| 3083 |
|
| 3084 |
//limit the rate at which bells can occur |
| 3085 |
//...mainly for sound effects where rapid bells in sequence |
| 3086 |
//produce a horrible noise |
| 3087 |
if ( _allowBellcxx . . $ Konsole/TerminalDisplay#_allowBell. ) |
| 3088 |
{ |
| 3089 |
_allowBellcxx . . $ Konsole/TerminalDisplay#_allowBell. = false; |
| 3090 |
QTimercxx . . $ QTimer#::singleShotcxx . . $ QTimer#singleShot(24d02da3284e5f26).(500,this,SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(enableBell())); |
| 3091 |
|
| 3092 |
if (_bellModecxx . . $ Konsole/TerminalDisplay#_bellMode.==SystemBeepBellcxx . . $ Konsole/TerminalDisplay#SystemBeepBell.) |
| 3093 |
{ |
| 3094 |
QApplicationcxx . . $ QApplication#::beepcxx . . $ QApplication#beep(49f6e7a06ebc5aa8).(); |
| 3095 |
} |
| 3096 |
else if (_bellModecxx . . $ Konsole/TerminalDisplay#_bellMode.==NotifyBellcxx . . $ Konsole/TerminalDisplay#NotifyBell.) |
| 3097 |
{ |
| 3098 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! notifyBellcxx . . $ Konsole/TerminalDisplay#notifyBell(3520e46b33348bf6).(message); |
| 3099 |
} |
| 3100 |
else if (_bellModecxx . . $ Konsole/TerminalDisplay#_bellMode.==VisualBellcxx . . $ Konsole/TerminalDisplay#VisualBell.) |
| 3101 |
{ |
| 3102 |
swapColorTablecxx . . $ Konsole/TerminalDisplay#swapColorTable(49f6e7a06ebc5aa8).(); |
| 3103 |
QTimercxx . . $ QTimer#::singleShotcxx . . $ QTimer#singleShot(24d02da3284e5f26).(200,this,SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(swapColorTable())); |
| 3104 |
} |
| 3105 |
} |
| 3106 |
} |
| 3107 |
|
| 3108 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::selectionChangedcxx . . $ Konsole/TerminalDisplay#selectionChanged(49f6e7a06ebc5aa8).() |
| 3109 |
{ |
| 3110 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! copyAvailablecxx . . $ Konsole/TerminalDisplay#copyAvailable(b45ddcbc8423892c).(_screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).selectedTextcxx . . $ Konsole/ScreenWindow#selectedText(11ecdffe9192d1a2).(false).isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).() == false); |
| 3111 |
} |
| 3112 |
|
| 3113 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::swapColorTablecxx . . $ Konsole/TerminalDisplay#swapColorTable(49f6e7a06ebc5aa8).() |
| 3114 |
{ |
| 3115 |
ColorEntrycxx . . $ Konsole/ColorEntry# color = _colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.[1]; |
| 3116 |
_colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.[1]=cxx . . $ Konsole/ColorEntry#`operator=`(281706dbae4a8f9)._colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.[0]; |
| 3117 |
_colorTablecxx . . $ Konsole/TerminalDisplay#_colorTable.[0]=cxx . . $ Konsole/ColorEntry#`operator=`(281706dbae4a8f9). color; |
| 3118 |
_colorsInvertedcxx . . $ Konsole/TerminalDisplay#_colorsInverted. = !_colorsInvertedcxx . . $ Konsole/TerminalDisplay#_colorsInverted.; |
| 3119 |
updatecxx . . $ Konsole/TerminalDisplay#update(49f6e7a06ebc5aa8).(); |
| 3120 |
} |
| 3121 |
|
| 3122 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::clearImagecxx . . $ Konsole/TerminalDisplay#clearImage(49f6e7a06ebc5aa8).() |
| 3123 |
{ |
| 3124 |
// We initialize _image[_imageSize] too. See makeImage() |
| 3125 |
for (int i = 0; i <= _imageSizecxx . . $ Konsole/TerminalDisplay#_imageSize.; i++) |
| 3126 |
{ |
| 3127 |
_imagecxx . . $ Konsole/TerminalDisplay#_image.[i].charactercxx . . $ Konsole/Character#$anonymous_type_0#character. = ' '; |
| 3128 |
_imagecxx . . $ Konsole/TerminalDisplay#_image.[i].foregroundColorcxx . . $ Konsole/Character#foregroundColor. =cxx . . $ Konsole/CharacterColor#`operator=`(c6f5dc6c5b403458). CharacterColorcxx . . $ Konsole/CharacterColor#CharacterColor(d5cb1b1d97598ec6).(COLOR_SPACE_DEFAULTcxx . . $ `lib/CharacterColor.h:130:9`!, |
| 3129 |
DEFAULT_FORE_COLORcxx . . $ `lib/CharacterColor.h:105:9`!); |
| 3130 |
_imagecxx . . $ Konsole/TerminalDisplay#_image.[i].backgroundColorcxx . . $ Konsole/Character#backgroundColor. =cxx . . $ Konsole/CharacterColor#`operator=`(c6f5dc6c5b403458). CharacterColorcxx . . $ Konsole/CharacterColor#CharacterColor(d5cb1b1d97598ec6).(COLOR_SPACE_DEFAULTcxx . . $ `lib/CharacterColor.h:130:9`!, |
| 3131 |
DEFAULT_BACK_COLORcxx . . $ `lib/CharacterColor.h:106:9`!); |
| 3132 |
_imagecxx . . $ Konsole/TerminalDisplay#_image.[i].renditioncxx . . $ Konsole/Character#rendition. = DEFAULT_RENDITIONcxx . . $ `lib/Character.h:42:9`!; |
| 3133 |
} |
| 3134 |
} |
| 3135 |
|
| 3136 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::calcGeometrycxx . . $ Konsole/TerminalDisplay#calcGeometry(49f6e7a06ebc5aa8).() |
| 3137 |
{ |
| 3138 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->resizecxx . . $ QWidget#resize(3e454b8ccf442868).(_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->sizeHintcxx . . $ QScrollBar#sizeHint(4b3b776e5ee2b367).().widthcxx . . $ QSize#width(ea6fe5115c70a13f).(), contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().heightcxx . . $ QRect#height(ea6fe5115c70a13f).()); |
| 3139 |
int scrollBarWidth = _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->stylecxx . . $ QWidget#style(5bbb00d3017c281f).()->styleHintcxx . . $ QStyle#styleHint(671b55e70cc3dc02).(QStylecxx . . $ QStyle#::SH_ScrollBar_Transientcxx . . $ QStyle#SH_ScrollBar_Transient., nullptr, _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.) |
| 3140 |
? 0 : _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->widthcxx . . $ QWidget#width(455f465bc33b4cdf).(); |
| 3141 |
switch(_scrollbarLocationcxx . . $ Konsole/TerminalDisplay#_scrollbarLocation.) |
| 3142 |
{ |
| 3143 |
case QTermWidgetcxx . . $ QTermWidget#::NoScrollBarcxx . . $ QTermWidget#NoScrollBar. : |
| 3144 |
_leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin. = _leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin.; |
| 3145 |
_contentWidthcxx . . $ Konsole/TerminalDisplay#_contentWidth. = contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().widthcxx . . $ QRect#width(ea6fe5115c70a13f).() - 2 * _leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin.; |
| 3146 |
break; |
| 3147 |
case QTermWidgetcxx . . $ QTermWidget#::ScrollBarLeftcxx . . $ QTermWidget#ScrollBarLeft. : |
| 3148 |
_leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin. = _leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin. + scrollBarWidth; |
| 3149 |
_contentWidthcxx . . $ Konsole/TerminalDisplay#_contentWidth. = contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().widthcxx . . $ QRect#width(ea6fe5115c70a13f).() - 2 * _leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin. - scrollBarWidth; |
| 3150 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->movecxx . . $ QWidget#move(4f9e9534be445c03).(contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).()); |
| 3151 |
break; |
| 3152 |
case QTermWidgetcxx . . $ QTermWidget#::ScrollBarRightcxx . . $ QTermWidget#ScrollBarRight.: |
| 3153 |
_leftMargincxx . . $ Konsole/TerminalDisplay#_leftMargin. = _leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin.; |
| 3154 |
_contentWidthcxx . . $ Konsole/TerminalDisplay#_contentWidth. = contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().widthcxx . . $ QRect#width(ea6fe5115c70a13f).() - 2 * _leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin. - scrollBarWidth; |
| 3155 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->movecxx . . $ QWidget#move(4f9e9534be445c03).(contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).() -cxx . . $ operator-(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->widthcxx . . $ QWidget#width(455f465bc33b4cdf).()-1, 0)); |
| 3156 |
break; |
| 3157 |
} |
| 3158 |
|
| 3159 |
_topMargincxx . . $ Konsole/TerminalDisplay#_topMargin. = _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin.; |
| 3160 |
_contentHeightcxx . . $ Konsole/TerminalDisplay#_contentHeight. = contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).().heightcxx . . $ QRect#height(ea6fe5115c70a13f).() - 2 * _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin. + /* mysterious */ 1; |
| 3161 |
|
| 3162 |
if (!_isFixedSizecxx . . $ Konsole/TerminalDisplay#_isFixedSize.) |
| 3163 |
{ |
| 3164 |
// ensure that display is always at least one column wide |
| 3165 |
_columnscxx . . $ Konsole/TerminalDisplay#_columns. = qMaxcxx . . $ qMax(2a338fce5842aa6a).(1,_contentWidthcxx . . $ Konsole/TerminalDisplay#_contentWidth. / _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth.); |
| 3166 |
_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns. = qMincxx . . $ qMin(2a338fce5842aa6a).(_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.,_columnscxx . . $ Konsole/TerminalDisplay#_columns.); |
| 3167 |
|
| 3168 |
// ensure that display is always at least one line high |
| 3169 |
_linescxx . . $ Konsole/TerminalDisplay#_lines. = qMaxcxx . . $ qMax(2a338fce5842aa6a).(1,_contentHeightcxx . . $ Konsole/TerminalDisplay#_contentHeight. / _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.); |
| 3170 |
_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines. = qMincxx . . $ qMin(2a338fce5842aa6a).(_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines.,_linescxx . . $ Konsole/TerminalDisplay#_lines.); |
| 3171 |
} |
| 3172 |
} |
| 3173 |
|
| 3174 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::makeImagecxx . . $ Konsole/TerminalDisplay#makeImage(49f6e7a06ebc5aa8).() |
| 3175 |
{ |
| 3176 |
calcGeometrycxx . . $ Konsole/TerminalDisplay#calcGeometry(49f6e7a06ebc5aa8).(); |
| 3177 |
|
| 3178 |
// confirm that array will be of non-zero size, since the painting code |
| 3179 |
// assumes a non-zero array length |
| 3180 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( _lines > 0 && _columns > 0 ); |
| 3181 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( _usedLines <= _lines && _usedColumns <= _columns ); |
| 3182 |
|
| 3183 |
_imageSizecxx . . $ Konsole/TerminalDisplay#_imageSize.=_linescxx . . $ Konsole/TerminalDisplay#_lines.*_columnscxx . . $ Konsole/TerminalDisplay#_columns.; |
| 3184 |
|
| 3185 |
// We over-commit one character so that we can be more relaxed in dealing with |
| 3186 |
// certain boundary conditions: _image[_imageSize] is a valid but unused position |
| 3187 |
_imagecxx . . $ Konsole/TerminalDisplay#_image. = new Charactercxx . . $ Konsole/Character#Character(775c6e5ba34caf00).[_imageSizecxx . . $ Konsole/TerminalDisplay#_imageSize.+1]; |
| 3188 |
|
| 3189 |
clearImagecxx . . $ Konsole/TerminalDisplay#clearImage(49f6e7a06ebc5aa8).(); |
| 3190 |
} |
| 3191 |
|
| 3192 |
// calculate the needed size, this must be synced with calcGeometry() |
| 3193 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setSizecxx . . $ Konsole/TerminalDisplay#setSize(3e454b8ccf442868).(int columns, int lines) |
| 3194 |
{ |
| 3195 |
int scrollBarWidth = (_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->isHiddencxx . . $ QWidget#isHidden(50ce9a9e25b4a850).() |
| 3196 |
|| _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->stylecxx . . $ QWidget#style(5bbb00d3017c281f).()->styleHintcxx . . $ QStyle#styleHint(671b55e70cc3dc02).(QStylecxx . . $ QStyle#::SH_ScrollBar_Transientcxx . . $ QStyle#SH_ScrollBar_Transient., nullptr, _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.)) |
| 3197 |
? 0 : _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->sizeHintcxx . . $ QScrollBar#sizeHint(4b3b776e5ee2b367).().widthcxx . . $ QSize#width(ea6fe5115c70a13f).(); |
| 3198 |
int horizontalMargin = 2 * _leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin.; |
| 3199 |
int verticalMargin = 2 * _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin.; |
| 3200 |
|
| 3201 |
QSizecxx . . $ QSize# newSize = QSizecxx . . $ QSize#QSize(c0d38f4800714fae).( horizontalMargin + scrollBarWidth + (columns * _fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth.) , |
| 3202 |
verticalMargin + (lines * _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.) ); |
| 3203 |
|
| 3204 |
if ( newSize !=cxx . . $ `operator!=`(1de60fa97ecbf80a). sizecxx . . $ Konsole/TerminalDisplay#size(4b3b776e5ee2b367).() ) |
| 3205 |
{ |
| 3206 |
_sizecxx . . $ Konsole/TerminalDisplay#_size. =cxx . . $ QSize#`operator=`(f8d31cf8106198f1). newSize; |
| 3207 |
//updateGeometry(); |
| 3208 |
//TODO Manage geometry change |
| 3209 |
|
| 3210 |
} |
| 3211 |
} |
| 3212 |
|
| 3213 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setFixedSizecxx . . $ Konsole/TerminalDisplay#setFixedSize(3e454b8ccf442868).(int cols, int lins) |
| 3214 |
{ |
| 3215 |
_isFixedSizecxx . . $ Konsole/TerminalDisplay#_isFixedSize. = true; |
| 3216 |
|
| 3217 |
//ensure that display is at least one line by one column in size |
| 3218 |
_columnscxx . . $ Konsole/TerminalDisplay#_columns. = qMaxcxx . . $ qMax(2a338fce5842aa6a).(1,cols); |
| 3219 |
_linescxx . . $ Konsole/TerminalDisplay#_lines. = qMaxcxx . . $ qMax(2a338fce5842aa6a).(1,lins); |
| 3220 |
_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns. = qMincxx . . $ qMin(2a338fce5842aa6a).(_usedColumnscxx . . $ Konsole/TerminalDisplay#_usedColumns.,_columnscxx . . $ Konsole/TerminalDisplay#_columns.); |
| 3221 |
_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines. = qMincxx . . $ qMin(2a338fce5842aa6a).(_usedLinescxx . . $ Konsole/TerminalDisplay#_usedLines.,_linescxx . . $ Konsole/TerminalDisplay#_lines.); |
| 3222 |
|
| 3223 |
if (_imagecxx . . $ Konsole/TerminalDisplay#_image.) |
| 3224 |
{ |
| 3225 |
delete[] _imagecxx . . $ Konsole/TerminalDisplay#_image.; |
| 3226 |
makeImagecxx . . $ Konsole/TerminalDisplay#makeImage(49f6e7a06ebc5aa8).(); |
| 3227 |
} |
| 3228 |
setSizecxx . . $ Konsole/TerminalDisplay#setSize(3e454b8ccf442868).(cols, lins); |
| 3229 |
//QWidget::setFixedSize(_size); |
| 3230 |
} |
| 3231 |
|
| 3232 |
QSizecxx . . $ QSize# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::sizeHintcxx . . $ Konsole/TerminalDisplay#sizeHint(4b3b776e5ee2b367).() const |
| 3233 |
{ |
| 3234 |
return _sizecxx . . $ Konsole/TerminalDisplay#_size.; |
| 3235 |
} |
| 3236 |
|
| 3237 |
|
| 3238 |
/* --------------------------------------------------------------------- */ |
| 3239 |
/* */ |
| 3240 |
/* Drag & Drop */ |
| 3241 |
/* */ |
| 3242 |
/* --------------------------------------------------------------------- */ |
| 3243 |
|
| 3244 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::dragEnterEventcxx . . $ Konsole/TerminalDisplay#dragEnterEvent(f87bde08e579de69).(QDragEnterEventcxx . . $ QDragEnterEvent#* event) |
| 3245 |
{ |
| 3246 |
if (event->mimeDatacxx . . $ QDropEvent#mimeData(30712b663b74d9e6).()->hasFormatcxx . . $ QMimeData#hasFormat(f3b39adf77d9c36c).(QLatin1Stringcxx . . $ QString#QString(4641beeb24e75d60).("text/plain"))) |
| 3247 |
event->acceptProposedActioncxx . . $ QDropEvent#acceptProposedAction(49f6e7a06ebc5aa8).(); |
| 3248 |
if (event->mimeDatacxx . . $ QDropEvent#mimeData(30712b663b74d9e6).()->urlscxx . . $ QMimeData#urls(c6c41d17fe0b8cf7).().countcxx . . $ QList#count(455f465bc33b4cdf).()) |
| 3249 |
event->acceptProposedActioncxx . . $ QDropEvent#acceptProposedAction(49f6e7a06ebc5aa8).(); |
| 3250 |
} |
| 3251 |
|
| 3252 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::dropEventcxx . . $ Konsole/TerminalDisplay#dropEvent(163a41ccaa120447).(QDropEventcxx . . $ QDropEvent#* event) |
| 3253 |
{ |
| 3254 |
//KUrl::List urls = KUrl::List::fromMimeData(event->mimeData()); |
| 3255 |
QListcxx . . $ QList#<QUrlcxx . . $ QUrl#> urls = event->mimeDatacxx . . $ QDropEvent#mimeData(30712b663b74d9e6).()->urlscxx . . $ QMimeData#urls(c6c41d17fe0b8cf7).(); |
| 3256 |
|
| 3257 |
QStringcxx . . $ QString# dropTextcxx . . $ QString#QString(ced63f7c635d850d).; |
| 3258 |
if (!urls.isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) |
| 3259 |
{ |
| 3260 |
// TODO/FIXME: escape or quote pasted things if neccessary... |
| 3261 |
qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "TerminalDisplay: handling urls. It can be broken. Report any errors, please"; |
| 3262 |
for ( int i = 0 ; i < urls.countcxx . . $ QList#count(455f465bc33b4cdf).() ; i++ ) |
| 3263 |
{ |
| 3264 |
//KUrl url = KIO::NetAccess::mostLocalUrl( urls[i] , 0 ); |
| 3265 |
QUrlcxx . . $ QUrl# url = urlscxx . . $ QUrl#QUrl(37355d2f77053a23).[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i]; |
| 3266 |
|
| 3267 |
QStringcxx . . $ QString# urlTextcxx . . $ QString#QString(ced63f7c635d850d).; |
| 3268 |
|
| 3269 |
if (url.isLocalFilecxx . . $ QUrl#isLocalFile(50ce9a9e25b4a850).()) |
| 3270 |
urlText =cxx . . $ QString#`operator=`(4f35bf974e7f8568). url.pathcxx . . $ QUrl#path(9d7420bec8bfe6c9).(); |
| 3271 |
else |
| 3272 |
urlText =cxx . . $ QString#`operator=`(4f35bf974e7f8568). url.toStringcxx . . $ QUrl#toString(632475ebea3355f1).(); |
| 3273 |
|
| 3274 |
// in future it may be useful to be able to insert file names with drag-and-drop |
| 3275 |
// without quoting them (this only affects paths with spaces in) |
| 3276 |
//urlText = KShell::quoteArg(urlText); |
| 3277 |
|
| 3278 |
dropText +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). urlText; |
| 3279 |
|
| 3280 |
if ( i != urls.countcxx . . $ QList#count(455f465bc33b4cdf).()-1 ) |
| 3281 |
dropText +=cxx . . $ QString#`operator+=`(3a2ffbdf8ecc25e2). QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).(' '); |
| 3282 |
} |
| 3283 |
} |
| 3284 |
else |
| 3285 |
{ |
| 3286 |
dropText =cxx . . $ QString#`operator=`(4f35bf974e7f8568). event->mimeDatacxx . . $ QDropEvent#mimeData(30712b663b74d9e6).()->textcxx . . $ QMimeData#text(6ef7b6c27b00b43d).(); |
| 3287 |
} |
| 3288 |
|
| 3289 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! sendStringToEmucxx . . $ Konsole/TerminalDisplay#sendStringToEmu(85c52e162fed56f9).(dropText.toLocal8Bitcxx . . $ QString#toLocal8Bit(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).()); |
| 3290 |
} |
| 3291 |
|
| 3292 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::doDragcxx . . $ Konsole/TerminalDisplay#doDrag(49f6e7a06ebc5aa8).() |
| 3293 |
{ |
| 3294 |
dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..statecxx . . $ Konsole/TerminalDisplay#_dragInfo#state. = diDraggingcxx . . $ Konsole/TerminalDisplay#diDragging.; |
| 3295 |
dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..dragObjectcxx . . $ Konsole/TerminalDisplay#_dragInfo#dragObject. = new QDragcxx . . $ QDrag#QDrag(749de1b6ae65bddd).(this); |
| 3296 |
QMimeDatacxx . . $ QMimeData# *mimeData = new QMimeDatacxx . . $ QMimeData#QMimeData(49f6e7a06ebc5aa8).; |
| 3297 |
mimeData->setTextcxx . . $ QMimeData#setText(3520e46b33348bf6).(QApplicationcxx . . $ QApplication#::clipboardcxx . . $ QGuiApplication#clipboard(a5a00f8d44f5ac9e).()->textcxx . . $ QClipboard#text(736a4da42e4ed99d).(QClipboardcxx . . $ QClipboard#::Selectioncxx . . $ QClipboard#Selection.)); |
| 3298 |
dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..dragObjectcxx . . $ Konsole/TerminalDisplay#_dragInfo#dragObject.->setMimeDatacxx . . $ QDrag#setMimeData(bd56712671a29709).(mimeData); |
| 3299 |
dragInfocxx . . $ Konsole/TerminalDisplay#dragInfo..dragObjectcxx . . $ Konsole/TerminalDisplay#_dragInfo#dragObject.->startcxx . . $ QDrag#start(699ed7f230d6996f).(Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::CopyActioncxx . . $ Qt/CopyAction.); |
| 3300 |
// Don't delete the QTextDrag object. Qt will delete it when it's done with it. |
| 3301 |
} |
| 3302 |
|
| 3303 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::outputSuspendedcxx . . $ Konsole/TerminalDisplay#outputSuspended(b45ddcbc8423892c).(bool suspended) |
| 3304 |
{ |
| 3305 |
//create the label when this function is first called |
| 3306 |
|
| 3307 |
// if (!_outputSuspendedLabel) |
| 3308 |
// { |
| 3309 |
// //This label includes a link to an English language website |
| 3310 |
// //describing the 'flow control' (Xon/Xoff) feature found in almost |
| 3311 |
// //all terminal emulators. |
| 3312 |
// //If there isn't a suitable article available in the target language the link |
| 3313 |
// //can simply be removed. |
| 3314 |
// _outputSuspendedLabel = new QLabel( tr("<qt>Output has been " |
| 3315 |
// "<a href=\"http://en.wikipedia.org/wiki/Flow_control\">suspended</a>" |
| 3316 |
// " by pressing Ctrl+S." |
| 3317 |
// " Press <b>Ctrl+Q</b> to resume.</qt>"), |
| 3318 |
// this ); |
| 3319 |
|
| 3320 |
// QPalette palette(_outputSuspendedLabel->palette()); |
| 3321 |
// //KColorScheme::adjustBackground(palette,KColorScheme::NeutralBackground); |
| 3322 |
// _outputSuspendedLabel->setPalette(palette); |
| 3323 |
// _outputSuspendedLabel->setAutoFillBackground(true); |
| 3324 |
// _outputSuspendedLabel->setBackgroundRole(QPalette::Base); |
| 3325 |
// _outputSuspendedLabel->setFont(QApplication::font()); |
| 3326 |
// _outputSuspendedLabel->setContentsMargins(5, 5, 5, 5); |
| 3327 |
|
| 3328 |
// //enable activation of "Xon/Xoff" link in label |
| 3329 |
// _outputSuspendedLabel->setTextInteractionFlags(Qt::LinksAccessibleByMouse | |
| 3330 |
// Qt::LinksAccessibleByKeyboard); |
| 3331 |
// _outputSuspendedLabel->setOpenExternalLinks(true); |
| 3332 |
// _outputSuspendedLabel->setVisible(false); |
| 3333 |
|
| 3334 |
// _gridLayout->addWidget(_outputSuspendedLabel); |
| 3335 |
// _gridLayout->addItem( new QSpacerItem(0,0,QSizePolicy::Expanding, |
| 3336 |
// QSizePolicy::Expanding), |
| 3337 |
// 1,0); |
| 3338 |
|
| 3339 |
// } |
| 3340 |
|
| 3341 |
_outputSuspendedLabelcxx . . $ Konsole/TerminalDisplay#_outputSuspendedLabel.->setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(suspended); |
| 3342 |
} |
| 3343 |
|
| 3344 |
uintcxx . . $ uint# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::lineSpacingcxx . . $ Konsole/TerminalDisplay#lineSpacing(ddd8539a2fcdd4ce).() const |
| 3345 |
{ |
| 3346 |
return _lineSpacingcxx . . $ Konsole/TerminalDisplay#_lineSpacing.; |
| 3347 |
} |
| 3348 |
|
| 3349 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setLineSpacingcxx . . $ Konsole/TerminalDisplay#setLineSpacing(cb2f890c2fdad230).(uintcxx . . $ uint# i) |
| 3350 |
{ |
| 3351 |
if ( i != _lineSpacingcxx . . $ Konsole/TerminalDisplay#_lineSpacing. ) { |
| 3352 |
_lineSpacingcxx . . $ Konsole/TerminalDisplay#_lineSpacing. = i; |
| 3353 |
setVTFontcxx . . $ Konsole/TerminalDisplay#setVTFont(d0a4bd0c8524b912).(fontcxx . . $ Konsole/TerminalDisplay#font(9958934e48c66a6a).()); // Trigger an update. |
| 3354 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! lineSpacingChangedcxx . . $ Konsole/TerminalDisplay#lineSpacingChanged(49f6e7a06ebc5aa8).(); |
| 3355 |
} |
| 3356 |
} |
| 3357 |
|
| 3358 |
int TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::margincxx . . $ Konsole/TerminalDisplay#margin(455f465bc33b4cdf).() const |
| 3359 |
{ |
| 3360 |
return _topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin.; |
| 3361 |
} |
| 3362 |
|
| 3363 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setMargincxx . . $ Konsole/TerminalDisplay#setMargin(d4f767463ce0a6b3).(int i) |
| 3364 |
{ |
| 3365 |
_topBaseMargincxx . . $ Konsole/TerminalDisplay#_topBaseMargin. = i; |
| 3366 |
_leftBaseMargincxx . . $ Konsole/TerminalDisplay#_leftBaseMargin. = i; |
| 3367 |
} |
| 3368 |
|
| 3369 |
AutoScrollHandlercxx . . $ Konsole/AutoScrollHandler#::AutoScrollHandlercxx . . $ Konsole/AutoScrollHandler#AutoScrollHandler(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent) |
| 3370 |
: QObjectcxx . . $ QObject#QObject(749de1b6ae65bddd).(parent) |
| 3371 |
, _timerIdcxx . . $ Konsole/AutoScrollHandler#_timerId.(0) |
| 3372 |
{ |
| 3373 |
parent->installEventFiltercxx . . $ QObject#installEventFilter(749de1b6ae65bddd).(this); |
| 3374 |
} |
| 3375 |
void AutoScrollHandlercxx . . $ Konsole/AutoScrollHandler#::timerEventcxx . . $ Konsole/AutoScrollHandler#timerEvent(b9e57d1150f23bf5).(QTimerEventcxx . . $ QTimerEvent#* event) |
| 3376 |
{ |
| 3377 |
if (event->timerIdcxx . . $ QTimerEvent#timerId(455f465bc33b4cdf).() != _timerIdcxx . . $ Konsole/AutoScrollHandler#_timerId.) |
| 3378 |
return; |
| 3379 |
|
| 3380 |
QMouseEventcxx . . $ QMouseEvent# mouseEventcxx . . $ QMouseEvent#QMouseEvent(990cda8c87b92972).( QEventcxx . . $ QEvent#::MouseMovecxx . . $ QEvent#MouseMove., |
| 3381 |
widgetcxx . . $ QPointF#QPointF(4f9e9534be445c03).()->mapFromGlobalcxx . . $ QWidget#mapFromGlobal(1aa4d425351b0c99).(QCursorcxx . . $ QCursor#::poscxx . . $ QCursor#pos(c189c43f91c31e1b).()), |
| 3382 |
Qtcxx . . $ Qt/::NoButtoncxx . . $ Qt/NoButton., |
| 3383 |
Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::LeftButtoncxx . . $ Qt/LeftButton., |
| 3384 |
Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier.); |
| 3385 |
|
| 3386 |
QApplicationcxx . . $ QApplication#::sendEventcxx . . $ QCoreApplication#sendEvent(978aa4af1d030efa).(widgetcxx . . $ Konsole/AutoScrollHandler#widget(27f420ad5cce8994).(),&mouseEvent); |
| 3387 |
} |
| 3388 |
bool AutoScrollHandlercxx . . $ Konsole/AutoScrollHandler#::eventFiltercxx . . $ Konsole/AutoScrollHandler#eventFilter(978aa4af1d030efa).(QObjectcxx . . $ QObject#* watched,QEventcxx . . $ QEvent#* event) |
| 3389 |
{ |
| 3390 |
Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( watched == parent() ); |
| 3391 |
Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!( watched ); |
| 3392 |
|
| 3393 |
QMouseEventcxx . . $ QMouseEvent#* mouseEvent = (QMouseEventcxx . . $ QMouseEvent#*)event; |
| 3394 |
switch (event->typecxx . . $ QEvent#type(916a8de57f4d422b).()) |
| 3395 |
{ |
| 3396 |
case QEventcxx . . $ QEvent#::MouseMovecxx . . $ QEvent#MouseMove.: |
| 3397 |
{ |
| 3398 |
bool mouseInWidget = widgetcxx . . $ Konsole/AutoScrollHandler#widget(27f420ad5cce8994).()->rectcxx . . $ QWidget#rect(d857385bac04cbf7).().containscxx . . $ QRect#contains(eaee943b37977784).(mouseEvent->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).()); |
| 3399 |
|
| 3400 |
if (mouseInWidget) |
| 3401 |
{ |
| 3402 |
if (_timerIdcxx . . $ Konsole/AutoScrollHandler#_timerId.) |
| 3403 |
killTimercxx . . $ QObject#killTimer(d4f767463ce0a6b3).(_timerIdcxx . . $ Konsole/AutoScrollHandler#_timerId.); |
| 3404 |
_timerIdcxx . . $ Konsole/AutoScrollHandler#_timerId. = 0; |
| 3405 |
} |
| 3406 |
else |
| 3407 |
{ |
| 3408 |
if (!_timerIdcxx . . $ Konsole/AutoScrollHandler#_timerId. && (mouseEvent->buttonscxx . . $ QMouseEvent#buttons(4523555da7f36dd2).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton.)) |
| 3409 |
_timerIdcxx . . $ Konsole/AutoScrollHandler#_timerId. = startTimercxx . . $ QObject#startTimer(cf5d4a693bb15cf1).(100); |
| 3410 |
} |
| 3411 |
break; |
| 3412 |
} |
| 3413 |
case QEventcxx . . $ QEvent#::MouseButtonReleasecxx . . $ QEvent#MouseButtonRelease.: |
| 3414 |
if (_timerIdcxx . . $ Konsole/AutoScrollHandler#_timerId. && (mouseEvent->buttonscxx . . $ QMouseEvent#buttons(4523555da7f36dd2).() &cxx . . $ QFlags#`operator&`(4389476332fab2e8). ~Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton.)) |
| 3415 |
{ |
| 3416 |
killTimercxx . . $ QObject#killTimer(d4f767463ce0a6b3).(_timerIdcxx . . $ Konsole/AutoScrollHandler#_timerId.); |
| 3417 |
_timerIdcxx . . $ Konsole/AutoScrollHandler#_timerId. = 0; |
| 3418 |
} |
| 3419 |
break; |
| 3420 |
default: |
| 3421 |
break; |
| 3422 |
}; |
| 3423 |
|
| 3424 |
return false; |
| 3425 |
} |
| 3426 |
|
| 3427 |
// QMLTermWidget specific functions /////////////////////////////////////////// |
| 3428 |
|
| 3429 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::geometryChangedcxx . . $ Konsole/TerminalDisplay#geometryChanged(2c8a152f426e0ea3).(const QRectFcxx . . $ QRectF# &newGeometry, const QRectFcxx . . $ QRectF# &oldGeometry) |
| 3430 |
{ |
| 3431 |
if (newGeometry !=cxx . . $ `operator!=`(844795bf13b447e6). oldGeometry) { |
| 3432 |
resizeEventcxx . . $ Konsole/TerminalDisplay#resizeEvent(eeeec21cf8dc0387).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 3433 |
updatecxx . . $ Konsole/TerminalDisplay#update(49f6e7a06ebc5aa8).(); |
| 3434 |
} |
| 3435 |
|
| 3436 |
QQuickPaintedItemcxx . . $ QQuickPaintedItem#::geometryChangedcxx . . $ QQuickItem#geometryChanged(2c8a152f426e0ea3).(newGeometry,oldGeometry); |
| 3437 |
} |
| 3438 |
|
| 3439 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::updatecxx . . $ Konsole/TerminalDisplay#update(bd1064c840c6b6e8).(const QRegioncxx . . $ QRegion# ®ion) |
| 3440 |
{ |
| 3441 |
Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(region); |
| 3442 |
// TODO this function might be optimized |
| 3443 |
// foreach (QRect rect, region.rects()) { |
| 3444 |
// QQuickPaintedItem::update(rect.adjusted(-1, -1, +1, +1)); |
| 3445 |
// } |
| 3446 |
QQuickPaintedItemcxx . . $ QQuickPaintedItem#::updatecxx . . $ QQuickPaintedItem#update(22ba0428947158b).(region.boundingRectcxx . . $ QRegion#boundingRect(e6cdfbae3abc21e7).().adjustedcxx . . $ QRect#adjusted(951e984c0912901).(-1, -1, +1, +1)); |
| 3447 |
|
| 3448 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! imagePaintedcxx . . $ Konsole/TerminalDisplay#imagePainted(49f6e7a06ebc5aa8).(); |
| 3449 |
} |
| 3450 |
|
| 3451 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::updatecxx . . $ Konsole/TerminalDisplay#update(49f6e7a06ebc5aa8).() |
| 3452 |
{ |
| 3453 |
QQuickPaintedItemcxx . . $ QQuickPaintedItem#::updatecxx . . $ QQuickPaintedItem#update(22ba0428947158b).(contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).()); |
| 3454 |
} |
| 3455 |
|
| 3456 |
QRectcxx . . $ QRect# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::contentsRectcxx . . $ Konsole/TerminalDisplay#contentsRect(d857385bac04cbf7).() const |
| 3457 |
{ |
| 3458 |
return QRectcxx . . $ QRect#QRect(2261ffe5112eab06).(0, 0, this->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).(), this->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).()); |
| 3459 |
} |
| 3460 |
|
| 3461 |
QSizecxx . . $ QSize# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::sizecxx . . $ Konsole/TerminalDisplay#size(4b3b776e5ee2b367).() const |
| 3462 |
{ |
| 3463 |
return QSizecxx . . $ QSize#QSize(c0d38f4800714fae).(this->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).(), this->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).()); |
| 3464 |
} |
| 3465 |
|
| 3466 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setSessioncxx . . $ Konsole/TerminalDisplay#setSession(d3af3380e0f4dac0).(KSessioncxx . . $ KSession# * session) |
| 3467 |
{ |
| 3468 |
if (m_sessioncxx . . $ Konsole/TerminalDisplay#m_session. != session) { |
| 3469 |
// qDebug() << "SetSession called"; |
| 3470 |
// if (m_session) |
| 3471 |
// m_session->removeView(this); |
| 3472 |
|
| 3473 |
m_sessioncxx . . $ Konsole/TerminalDisplay#m_session. = session; |
| 3474 |
|
| 3475 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(this, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(copyAvailable(bool)), |
| 3476 |
m_sessioncxx . . $ Konsole/TerminalDisplay#m_session., SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(selectionChanged(bool))); |
| 3477 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(this, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(termGetFocus()), |
| 3478 |
m_sessioncxx . . $ Konsole/TerminalDisplay#m_session., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(termGetFocus())); |
| 3479 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(this, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(termLostFocus()), |
| 3480 |
m_sessioncxx . . $ Konsole/TerminalDisplay#m_session., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(termLostFocus())); |
| 3481 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(this, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(keyPressedSignal(QKeyEvent *, bool)), |
| 3482 |
m_sessioncxx . . $ Konsole/TerminalDisplay#m_session., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(termKeyPressed(QKeyEvent *, bool))); |
| 3483 |
|
| 3484 |
m_sessioncxx . . $ Konsole/TerminalDisplay#m_session.->addViewcxx . . $ KSession#addView(d1be2bc5a38bdd21).(this); |
| 3485 |
|
| 3486 |
setRandomSeedcxx . . $ Konsole/TerminalDisplay#setRandomSeed(cb2f890c2fdad230).(m_sessioncxx . . $ Konsole/TerminalDisplay#m_session.->getRandomSeedcxx . . $ KSession#getRandomSeed(b126dc7c1de90089).()); |
| 3487 |
updatecxx . . $ Konsole/TerminalDisplay#update(49f6e7a06ebc5aa8).(); |
| 3488 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! sessionChangedcxx . . $ Konsole/TerminalDisplay#sessionChanged(49f6e7a06ebc5aa8).(); |
| 3489 |
} |
| 3490 |
} |
| 3491 |
|
| 3492 |
|
| 3493 |
KSessioncxx . . $ KSession#* TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::getSessioncxx . . $ Konsole/TerminalDisplay#getSession(af8a2e5b2374616e).() |
| 3494 |
{ |
| 3495 |
return m_sessioncxx . . $ Konsole/TerminalDisplay#m_session.; |
| 3496 |
} |
| 3497 |
|
| 3498 |
QStringListcxx . . $ QStringList# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::availableColorSchemescxx . . $ Konsole/TerminalDisplay#availableColorSchemes(669a05bc42dd57cc).() |
| 3499 |
{ |
| 3500 |
QStringListcxx . . $ QStringList# retcxx . . $ QStringList#QStringList(ced63f7c635d850d).; |
| 3501 |
foreachcxx . . $ `<external>/15045578679651060896/qglobal.h:1145:13`! (const ColorScheme* cs, ColorSchemeManager::instance()->allColorSchemes()) |
| 3502 |
ret.appendcxx . . $ QList#append(77d9f17553126ecb).(cs->namecxx . . $ Konsole/ColorScheme#name(6ef7b6c27b00b43d).()); |
| 3503 |
return ret; |
| 3504 |
} |
| 3505 |
|
| 3506 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setColorSchemecxx . . $ Konsole/TerminalDisplay#setColorScheme(3520e46b33348bf6).(const QStringcxx . . $ QString# &name) |
| 3507 |
{ |
| 3508 |
if ( name !=cxx . . $ `operator!=`(5bc2975d2d751687). _colorSchemecxx . . $ Konsole/TerminalDisplay#_colorScheme. ) { |
| •3509 |
if (_colorSchemeRefcxx . . $ Konsole/TerminalDisplay#_colorSchemeRef.) { |
| 3510 |
disconnectcxx . . $ QObject#disconnect(cc30ff19c637f8ed).(_colorSchemeRefcxx . . $ Konsole/TerminalDisplay#_colorSchemeRef., 0, this, 0); |
| 3511 |
} |
| 3512 |
// avoid legacy (int) solution |
| 3513 |
if (!availableColorSchemescxx . . $ Konsole/TerminalDisplay#availableColorSchemes(669a05bc42dd57cc).().containscxx . . $ QStringList#contains(8cce4688c16f48f3).(name)) |
| •3514 |
_colorSchemeRefcxx . . $ Konsole/TerminalDisplay#_colorSchemeRef. = ColorSchemeManagercxx . . $ Konsole/ColorSchemeManager#::instancecxx . . $ Konsole/ColorSchemeManager#instance(604bba33ddb2d782).()->defaultColorSchemecxx . . $ Konsole/ColorSchemeManager#defaultColorScheme(b3d5baf7ec74d27d).(); |
| 3515 |
else |
| •3516 |
_colorSchemeRefcxx . . $ Konsole/TerminalDisplay#_colorSchemeRef. = ColorSchemeManagercxx . . $ Konsole/ColorSchemeManager#::instancecxx . . $ Konsole/ColorSchemeManager#instance(604bba33ddb2d782).()->findColorSchemecxx . . $ Konsole/ColorSchemeManager#findColorScheme(c2b30146a6fdc030).(name); |
| 3517 |
|
| •3518 |
if (! _colorSchemeRefcxx . . $ Konsole/TerminalDisplay#_colorSchemeRef.) |
| 3519 |
{ |
| 3520 |
qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Cannot load color scheme: " <<cxx . . $ QDebug#`operator<<`(4cf17434affdd8). name; |
| 3521 |
return; |
| 3522 |
} |
| 3523 |
|
| •3524 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(_colorSchemeRefcxx . . $ Konsole/TerminalDisplay#_colorSchemeRef., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(colorChanged(int)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(applyColorScheme())); |
| 3525 |
connectcxx . . $ QObject#connect(158df1d9a01a3410).(_colorSchemeRefcxx . . $ Konsole/TerminalDisplay#_colorSchemeRef., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(opacityChanged()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(applyColorScheme())); |
| 3526 |
applyColorSchemecxx . . $ Konsole/TerminalDisplay#applyColorScheme(49f6e7a06ebc5aa8).(); |
| 3527 |
_colorSchemecxx . . $ Konsole/TerminalDisplay#_colorScheme. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). name; |
| 3528 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! colorSchemeChangedcxx . . $ Konsole/TerminalDisplay#colorSchemeChanged(49f6e7a06ebc5aa8).(); |
| 3529 |
} |
| 3530 |
} |
| 3531 |
|
| 3532 |
QStringcxx . . $ QString# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::colorSchemecxx . . $ Konsole/TerminalDisplay#colorScheme(6ef7b6c27b00b43d).() const |
| 3533 |
{ |
| 3534 |
return _colorSchemecxx . . $ QString#QString(132dd6869045752b).; |
| 3535 |
} |
| 3536 |
|
| •3537 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::applyColorSchemecxx . . $ Konsole/TerminalDisplay#applyColorScheme(49f6e7a06ebc5aa8).() |
| 3538 |
{ |
| 3539 |
ColorEntrycxx . . $ Konsole/ColorEntry# tablecxx . . $ Konsole/ColorEntry#ColorEntry(49f6e7a06ebc5aa8).[TABLE_COLORScxx . . $ `lib/CharacterColor.h:103:9`!]; |
| 3540 |
_colorSchemeRefcxx . . $ Konsole/TerminalDisplay#_colorSchemeRef.->getColorTablecxx . . $ Konsole/ColorScheme#getColorTable(3c246d1658e3993f).(table); |
| 3541 |
setColorTablecxx . . $ Konsole/TerminalDisplay#setColorTable(b25cc3fd5c7c482d).(table); |
| 3542 |
QColorcxx . . $ QColor# backgroundColor = _colorTablecxx . . $ QColor#QColor(c396aab421781ee8).[DEFAULT_BACK_COLORcxx . . $ `lib/CharacterColor.h:106:9`!].colorcxx . . $ Konsole/ColorEntry#color.; |
| 3543 |
backgroundColor.setAlphaFcxx . . $ QColor#setAlphaF(ba8836b59fb42830).(_colorSchemeRefcxx . . $ Konsole/TerminalDisplay#_colorSchemeRef.->opacitycxx . . $ Konsole/ColorScheme#opacity(21b6c25e127938e2).()); |
| 3544 |
setBackgroundColorcxx . . $ Konsole/TerminalDisplay#setBackgroundColor(129a55e114526ad3).(backgroundColor); |
| 3545 |
setFillColorcxx . . $ QQuickPaintedItem#setFillColor(129a55e114526ad3).(backgroundColor); |
| 3546 |
} |
| 3547 |
|
| 3548 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::simulateKeyPresscxx . . $ Konsole/TerminalDisplay#simulateKeyPress(61d28ec346736494).(int key, int modifiers, bool pressed, quint32cxx . . $ quint32# nativeScanCode, const QStringcxx . . $ QString# &text) |
| 3549 |
{ |
| 3550 |
Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(nativeScanCode); |
| 3551 |
QEventcxx . . $ QEvent#::Typecxx . . $ QEvent#Type# type = pressed ? QEventcxx . . $ QEvent#::KeyPresscxx . . $ QEvent#KeyPress. : QEventcxx . . $ QEvent#::KeyReleasecxx . . $ QEvent#KeyRelease.; |
| 3552 |
QKeyEventcxx . . $ QKeyEvent# event = QKeyEventcxx . . $ QKeyEvent#QKeyEvent(ef4dc924c19ba5f1).(type, key, (cxx . . $ QFlags#QFlags(93d577a3e9528307).Qtcxx . . $ Qt/::KeyboardModifiercxx . . $ Qt/KeyboardModifier#) modifiers, text); |
| 3553 |
keyPressedSignalcxx . . $ Konsole/TerminalDisplay#keyPressedSignal(4ced653b20f45578).(&event, false); |
| 3554 |
} |
| 3555 |
|
| 3556 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::simulateKeySequencecxx . . $ Konsole/TerminalDisplay#simulateKeySequence(462600f892e8a1ee).(const QKeySequencecxx . . $ QKeySequence# &keySequence) |
| 3557 |
{ |
| 3558 |
for (int i = 0; i < keySequence.countcxx . . $ QKeySequence#count(455f465bc33b4cdf).(); ++i) { |
| 3559 |
const Qtcxx . . $ Qt/::Keycxx . . $ Qt/Key# key = Qtcxx . . $ Qt/::Keycxx . . $ Qt/Key#(keySequence[cxx . . $ QKeySequence#`operator[]`(b89e35493f65ea2b).i] & ~Qtcxx . . $ Qt/::KeyboardModifierMaskcxx . . $ Qt/KeyboardModifierMask.); |
| 3560 |
const Qtcxx . . $ Qt/::KeyboardModifierscxx . . $ Qt/KeyboardModifiers# modifiers = Qtcxx . . $ Qt/::KeyboardModifierscxx . . $ Qt/KeyboardModifiers#(keySequencecxx . . $ QFlag#QFlag(6bab9b75950d6f3).[cxx . . $ QKeySequence#`operator[]`(b89e35493f65ea2b).i] & Qtcxx . . $ Qt/::KeyboardModifierMaskcxx . . $ Qt/KeyboardModifierMask.); |
| 3561 |
QKeyEventcxx . . $ QKeyEvent# eventPress = QKeyEventcxx . . $ QKeyEvent#QKeyEvent(ef4dc924c19ba5f1).(QEventcxx . . $ QEvent#::KeyPresscxx . . $ QEvent#KeyPress., key, modifiers, ""cxx . . $ QString#QString(85c52e162fed56f9).); |
| 3562 |
keyPressedSignalcxx . . $ Konsole/TerminalDisplay#keyPressedSignal(4ced653b20f45578).(&eventPress, false); |
| 3563 |
} |
| 3564 |
} |
| 3565 |
|
| 3566 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::simulateWheelcxx . . $ Konsole/TerminalDisplay#simulateWheel(6daba774ea832f60).(int x, int y, int buttons, int modifiers, QPointFcxx . . $ QPointF# angleDelta){ |
| 3567 |
QWheelEventcxx . . $ QWheelEvent# eventcxx . . $ QWheelEvent#QWheelEvent(f964e2fbf76d376d).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x,y), angleDelta.ycxx . . $ QPointF#y(21b6c25e127938e2).(), (cxx . . $ QFlags#QFlags(93d577a3e9528307).Qtcxx . . $ Qt/::MouseButtoncxx . . $ Qt/MouseButton#) buttons, (cxx . . $ QFlags#QFlags(93d577a3e9528307).Qtcxx . . $ Qt/::KeyboardModifiercxx . . $ Qt/KeyboardModifier#) modifiers); |
| 3568 |
wheelEventcxx . . $ Konsole/TerminalDisplay#wheelEvent(92d40974398e4832).(&event); |
| 3569 |
} |
| 3570 |
|
| 3571 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::simulateMouseMovecxx . . $ Konsole/TerminalDisplay#simulateMouseMove(1559a299834bcdd5).(int x, int y, int button, int buttons, int modifiers){ |
| 3572 |
QMouseEventcxx . . $ QMouseEvent# eventcxx . . $ QMouseEvent#QMouseEvent(990cda8c87b92972).(QEventcxx . . $ QEvent#::MouseMovecxx . . $ QEvent#MouseMove., QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x, y),(Qtcxx . . $ Qt/::MouseButtoncxx . . $ Qt/MouseButton#) button, (cxx . . $ QFlags#QFlags(9935dc90bb38b82).Qtcxx . . $ Qt/::MouseButtonscxx . . $ Qt/MouseButtons#) buttonscxx . . $ QFlag#QFlag(f349c77f591a7878)., (cxx . . $ QFlags#QFlags(9935dc90bb38b82).Qtcxx . . $ Qt/::KeyboardModifierscxx . . $ Qt/KeyboardModifiers#) modifierscxx . . $ QFlag#QFlag(f349c77f591a7878).); |
| 3573 |
mouseMoveEventcxx . . $ Konsole/TerminalDisplay#mouseMoveEvent(702858a82d06265c).(&event); |
| 3574 |
} |
| 3575 |
|
| 3576 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::simulateMousePresscxx . . $ Konsole/TerminalDisplay#simulateMousePress(1559a299834bcdd5).(int x, int y, int button, int buttons, int modifiers){ |
| 3577 |
QMouseEventcxx . . $ QMouseEvent# eventcxx . . $ QMouseEvent#QMouseEvent(990cda8c87b92972).(QEventcxx . . $ QEvent#::MouseButtonPresscxx . . $ QEvent#MouseButtonPress., QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x, y),(Qtcxx . . $ Qt/::MouseButtoncxx . . $ Qt/MouseButton#) button, (cxx . . $ QFlags#QFlags(9935dc90bb38b82).Qtcxx . . $ Qt/::MouseButtonscxx . . $ Qt/MouseButtons#) buttonscxx . . $ QFlag#QFlag(f349c77f591a7878)., (cxx . . $ QFlags#QFlags(9935dc90bb38b82).Qtcxx . . $ Qt/::KeyboardModifierscxx . . $ Qt/KeyboardModifiers#) modifierscxx . . $ QFlag#QFlag(f349c77f591a7878).); |
| 3578 |
mousePressEventcxx . . $ Konsole/TerminalDisplay#mousePressEvent(702858a82d06265c).(&event); |
| 3579 |
} |
| 3580 |
|
| 3581 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::simulateMouseReleasecxx . . $ Konsole/TerminalDisplay#simulateMouseRelease(1559a299834bcdd5).(int x, int y, int button, int buttons, int modifiers){ |
| 3582 |
QMouseEventcxx . . $ QMouseEvent# eventcxx . . $ QMouseEvent#QMouseEvent(990cda8c87b92972).(QEventcxx . . $ QEvent#::MouseButtonReleasecxx . . $ QEvent#MouseButtonRelease., QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x, y),(Qtcxx . . $ Qt/::MouseButtoncxx . . $ Qt/MouseButton#) button, (cxx . . $ QFlags#QFlags(9935dc90bb38b82).Qtcxx . . $ Qt/::MouseButtonscxx . . $ Qt/MouseButtons#) buttonscxx . . $ QFlag#QFlag(f349c77f591a7878)., (cxx . . $ QFlags#QFlags(9935dc90bb38b82).Qtcxx . . $ Qt/::KeyboardModifierscxx . . $ Qt/KeyboardModifiers#) modifierscxx . . $ QFlag#QFlag(f349c77f591a7878).); |
| 3583 |
mouseReleaseEventcxx . . $ Konsole/TerminalDisplay#mouseReleaseEvent(702858a82d06265c).(&event); |
| 3584 |
} |
| 3585 |
|
| 3586 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::simulateMouseDoubleClickcxx . . $ Konsole/TerminalDisplay#simulateMouseDoubleClick(1559a299834bcdd5).(int x, int y, int button, int buttons, int modifiers){ |
| 3587 |
QMouseEventcxx . . $ QMouseEvent# eventcxx . . $ QMouseEvent#QMouseEvent(990cda8c87b92972).(QEventcxx . . $ QEvent#::MouseButtonDblClickcxx . . $ QEvent#MouseButtonDblClick., QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x, y),(Qtcxx . . $ Qt/::MouseButtoncxx . . $ Qt/MouseButton#) button, (cxx . . $ QFlags#QFlags(9935dc90bb38b82).Qtcxx . . $ Qt/::MouseButtonscxx . . $ Qt/MouseButtons#) buttonscxx . . $ QFlag#QFlag(f349c77f591a7878)., (cxx . . $ QFlags#QFlags(9935dc90bb38b82).Qtcxx . . $ Qt/::KeyboardModifierscxx . . $ Qt/KeyboardModifiers#) modifierscxx . . $ QFlag#QFlag(f349c77f591a7878).); |
| 3588 |
mouseDoubleClickEventcxx . . $ Konsole/TerminalDisplay#mouseDoubleClickEvent(702858a82d06265c).(&event); |
| 3589 |
} |
| 3590 |
|
| 3591 |
QSizecxx . . $ QSize# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::getTerminalSizecxx . . $ Konsole/TerminalDisplay#getTerminalSize(dc21773d1a733566).() |
| 3592 |
{ |
| 3593 |
return QSizecxx . . $ QSize#QSize(c0d38f4800714fae).(_linescxx . . $ Konsole/TerminalDisplay#_lines., _columnscxx . . $ Konsole/TerminalDisplay#_columns.); |
| 3594 |
} |
| 3595 |
|
| 3596 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::getUsesMousecxx . . $ Konsole/TerminalDisplay#getUsesMouse(c9857a73d68e59ba).() |
| 3597 |
{ |
| 3598 |
return !usesMousecxx . . $ Konsole/TerminalDisplay#usesMouse(50ce9a9e25b4a850).(); |
| 3599 |
} |
| 3600 |
|
| 3601 |
int TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::getScrollbarValuecxx . . $ Konsole/TerminalDisplay#getScrollbarValue(b126dc7c1de90089).() |
| 3602 |
{ |
| 3603 |
return _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).(); |
| 3604 |
} |
| 3605 |
|
| •3606 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setScrollbarValuecxx . . $ Konsole/TerminalDisplay#setScrollbarValue(d4f767463ce0a6b3).(int value) |
| 3607 |
{ |
| 3608 |
if (value != _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->valuecxx . . $ QAbstractSlider#value(455f465bc33b4cdf).()) { |
| 3609 |
_scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->setValuecxx . . $ QAbstractSlider#setValue(d4f767463ce0a6b3).(value); |
| 3610 |
} |
| 3611 |
} |
| 3612 |
|
| 3613 |
int TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::getScrollbarMaximumcxx . . $ Konsole/TerminalDisplay#getScrollbarMaximum(b126dc7c1de90089).() |
| 3614 |
{ |
| 3615 |
return _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).(); |
| 3616 |
} |
| 3617 |
|
| 3618 |
int TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::getScrollbarMinimumcxx . . $ Konsole/TerminalDisplay#getScrollbarMinimum(b126dc7c1de90089).() |
| 3619 |
{ |
| 3620 |
return _scrollBarcxx . . $ Konsole/TerminalDisplay#_scrollBar.->minimumcxx . . $ QAbstractSlider#minimum(455f465bc33b4cdf).(); |
| 3621 |
} |
| 3622 |
|
| 3623 |
QSizecxx . . $ QSize# TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::getFontMetricscxx . . $ Konsole/TerminalDisplay#getFontMetrics(dc21773d1a733566).() |
| 3624 |
{ |
| 3625 |
return QSizecxx . . $ QSize#QSize(c0d38f4800714fae).(_fontWidthcxx . . $ Konsole/TerminalDisplay#_fontWidth., _fontHeightcxx . . $ Konsole/TerminalDisplay#_fontHeight.); |
| 3626 |
} |
| 3627 |
|
| 3628 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::setFullCursorHeightcxx . . $ Konsole/TerminalDisplay#setFullCursorHeight(b45ddcbc8423892c).(bool val) |
| 3629 |
{ |
| 3630 |
if ( m_full_cursor_heightcxx . . $ Konsole/TerminalDisplay#m_full_cursor_height. != val ) { |
| 3631 |
m_full_cursor_heightcxx . . $ Konsole/TerminalDisplay#m_full_cursor_height. = val; |
| 3632 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! fullCursorHeightChangedcxx . . $ Konsole/TerminalDisplay#fullCursorHeightChanged(49f6e7a06ebc5aa8).(); |
| 3633 |
} |
| 3634 |
} |
| 3635 |
|
| 3636 |
bool TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::fullCursorHeightcxx . . $ Konsole/TerminalDisplay#fullCursorHeight(50ce9a9e25b4a850).() const |
| 3637 |
{ |
| 3638 |
return m_full_cursor_heightcxx . . $ Konsole/TerminalDisplay#m_full_cursor_height.; |
| 3639 |
} |
| 3640 |
|
| 3641 |
void TerminalDisplaycxx . . $ Konsole/TerminalDisplay#::itemChangecxx . . $ Konsole/TerminalDisplay#itemChange(6dfad8b9065d088c).(ItemChangecxx . . $ QQuickItem#ItemChange# change, const ItemChangeDatacxx . . $ QQuickItem#ItemChangeData# & value) |
| 3642 |
{ |
| 3643 |
switch (change) { |
| 3644 |
case QQuickItemcxx . . $ QQuickItem#::ItemVisibleHasChangedcxx . . $ QQuickItem#ItemVisibleHasChanged.: |
| 3645 |
if (value.boolValuecxx . . $ QQuickItem#ItemChangeData#boolValue. && _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.) { |
| 3646 |
if (this->columnscxx . . $ Konsole/TerminalDisplay#columns(b126dc7c1de90089).() != _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).columnCountcxx . . $ Konsole/ScreenWindow#columnCount(455f465bc33b4cdf).() || |
| 3647 |
this->linescxx . . $ Konsole/TerminalDisplay#lines(b126dc7c1de90089).() != _screenWindowcxx . . $ Konsole/TerminalDisplay#_screenWindow.->cxx . . $ QPointer#`operator->`(5a2a78a048fb49a8).lineCountcxx . . $ Konsole/ScreenWindow#lineCount(455f465bc33b4cdf).()) { |
| 3648 |
|
| 3649 |
emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! changedContentSizeSignalcxx . . $ Konsole/TerminalDisplay#changedContentSizeSignal(3e454b8ccf442868).(_contentHeightcxx . . $ Konsole/TerminalDisplay#_contentHeight., _contentWidthcxx . . $ Konsole/TerminalDisplay#_contentWidth.); |
| 3650 |
} |
| 3651 |
} |
| 3652 |
break; |
| 3653 |
default: |
| 3654 |
break; |
| 3655 |
} |
| 3656 |
|
| 3657 |
QQuickPaintedItemcxx . . $ QQuickPaintedItem#::itemChangecxx . . $ QQuickPaintedItem#itemChange(6dfad8b9065d088c).(change, value); |
| 3658 |
} |
| 3659 |
|
| 3660 |
//#include "TerminalDisplay.moc" |