Diffstat (limited to 'core/apps/embeddedkonsole/TEWidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index 5171bf1..bee58e7 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp | |||
@@ -208,97 +208,97 @@ static QChar vt100extended(QChar c) | |||
208 | case 0x2424 : return 9; | 208 | case 0x2424 : return 9; |
209 | case 0x240b : return 10; | 209 | case 0x240b : return 10; |
210 | case 0x2518 : return 11; | 210 | case 0x2518 : return 11; |
211 | case 0x2510 : return 12; | 211 | case 0x2510 : return 12; |
212 | case 0x250c : return 13; | 212 | case 0x250c : return 13; |
213 | case 0x2514 : return 14; | 213 | case 0x2514 : return 14; |
214 | case 0x253c : return 15; | 214 | case 0x253c : return 15; |
215 | case 0xf800 : return 16; | 215 | case 0xf800 : return 16; |
216 | case 0xf801 : return 17; | 216 | case 0xf801 : return 17; |
217 | case 0x2500 : return 18; | 217 | case 0x2500 : return 18; |
218 | case 0xf803 : return 19; | 218 | case 0xf803 : return 19; |
219 | case 0xf804 : return 20; | 219 | case 0xf804 : return 20; |
220 | case 0x251c : return 21; | 220 | case 0x251c : return 21; |
221 | case 0x2524 : return 22; | 221 | case 0x2524 : return 22; |
222 | case 0x2534 : return 23; | 222 | case 0x2534 : return 23; |
223 | case 0x252c : return 24; | 223 | case 0x252c : return 24; |
224 | case 0x2502 : return 25; | 224 | case 0x2502 : return 25; |
225 | case 0x2264 : return 26; | 225 | case 0x2264 : return 26; |
226 | case 0x2265 : return 27; | 226 | case 0x2265 : return 27; |
227 | case 0x03c0 : return 28; | 227 | case 0x03c0 : return 28; |
228 | case 0x2260 : return 29; | 228 | case 0x2260 : return 29; |
229 | case 0x00a3 : return 30; | 229 | case 0x00a3 : return 30; |
230 | case 0x00b7 : return 31; | 230 | case 0x00b7 : return 31; |
231 | } | 231 | } |
232 | return c; | 232 | return c; |
233 | } | 233 | } |
234 | 234 | ||
235 | static QChar identicalMap(QChar c) | 235 | static QChar identicalMap(QChar c) |
236 | { | 236 | { |
237 | return c; | 237 | return c; |
238 | } | 238 | } |
239 | 239 | ||
240 | void TEWidget::fontChange(const QFont &) | 240 | void TEWidget::fontChange(const QFont &) |
241 | { | 241 | { |
242 | QFontMetrics fm(font()); | 242 | QFontMetrics fm(font()); |
243 | font_h = fm.height(); | 243 | font_h = fm.height(); |
244 | // font_w = fm.maxWidth(); | 244 | // font_w = fm.maxWidth(); |
245 | font_w = fm.width("m"); | 245 | font_w = fm.width("m"); |
246 | font_a = fm.ascent(); | 246 | font_a = fm.ascent(); |
247 | printf("font h=%d max_width=%d width_m=%d assent=%d\n", font_h, | 247 | printf("font h=%d max_width=%d width_m=%d assent=%d\n", font_h, |
248 | fm.maxWidth(), font_w, font_a); | 248 | fm.maxWidth(), font_w, font_a); |
249 | 249 | ||
250 | //printf("font_h: %d\n",font_h); | 250 | //printf("font_h: %d\n",font_h); |
251 | //printf("font_w: %d\n",font_w); | 251 | //printf("font_w: %d\n",font_w); |
252 | //printf("font_a: %d\n",font_a); | 252 | //printf("font_a: %d\n",font_a); |
253 | //printf("charset: %s\n",QFont::encodingName(font().charSet()).ascii()); | 253 | //printf("charset: %s\n",QFont::encodingName(font().charSet()).ascii()); |
254 | //printf("rawname: %s\n",font().rawName().ascii()); | 254 | //printf("rawname: %s\n",font().rawName().ascii()); |
255 | fontMap = | 255 | fontMap = |
256 | #if QT_VERSION < 300 | 256 | #if QT_VERSION < 0x030000 |
257 | strcmp(QFont::encodingName(font().charSet()).ascii(),"iso10646") | 257 | strcmp(QFont::encodingName(font().charSet()).ascii(),"iso10646") |
258 | ? vt100extended | 258 | ? vt100extended |
259 | : | 259 | : |
260 | #endif | 260 | #endif |
261 | identicalMap; | 261 | identicalMap; |
262 | propagateSize(); | 262 | propagateSize(); |
263 | update(); | 263 | update(); |
264 | } | 264 | } |
265 | 265 | ||
266 | void TEWidget::setVTFont(const QFont& f) | 266 | void TEWidget::setVTFont(const QFont& f) |
267 | { | 267 | { |
268 | QFrame::setFont(f); | 268 | QFrame::setFont(f); |
269 | } | 269 | } |
270 | 270 | ||
271 | QFont TEWidget::getVTFont() { | 271 | QFont TEWidget::getVTFont() { |
272 | return font(); | 272 | return font(); |
273 | } | 273 | } |
274 | 274 | ||
275 | void TEWidget::setFont(const QFont &) | 275 | void TEWidget::setFont(const QFont &) |
276 | { | 276 | { |
277 | // ignore font change request if not coming from konsole itself | 277 | // ignore font change request if not coming from konsole itself |
278 | } | 278 | } |
279 | 279 | ||
280 | /* ------------------------------------------------------------------------- */ | 280 | /* ------------------------------------------------------------------------- */ |
281 | /* */ | 281 | /* */ |
282 | /* Constructor / Destructor */ | 282 | /* Constructor / Destructor */ |
283 | /* */ | 283 | /* */ |
284 | /* ------------------------------------------------------------------------- */ | 284 | /* ------------------------------------------------------------------------- */ |
285 | 285 | ||
286 | TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) | 286 | TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) |
287 | { | 287 | { |
288 | #ifndef QT_NO_CLIPBOARD | 288 | #ifndef QT_NO_CLIPBOARD |
289 | cb = QApplication::clipboard(); | 289 | cb = QApplication::clipboard(); |
290 | QObject::connect( (QObject*)cb, SIGNAL(dataChanged()), | 290 | QObject::connect( (QObject*)cb, SIGNAL(dataChanged()), |
291 | this, SLOT(onClearSelection()) ); | 291 | this, SLOT(onClearSelection()) ); |
292 | #endif | 292 | #endif |
293 | 293 | ||
294 | scrollbar = new QScrollBar(this); | 294 | scrollbar = new QScrollBar(this); |
295 | scrollbar->setCursor( arrowCursor ); | 295 | scrollbar->setCursor( arrowCursor ); |
296 | connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); | 296 | connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); |
297 | 297 | ||
298 | hScrollbar = new QScrollBar(this); | 298 | hScrollbar = new QScrollBar(this); |
299 | hScrollbar->setCursor( arrowCursor ); | 299 | hScrollbar->setCursor( arrowCursor ); |
300 | hScrollbar->setOrientation(QScrollBar::Horizontal); | 300 | hScrollbar->setOrientation(QScrollBar::Horizontal); |
301 | // hScrollbar->setMaximumHeight(16); | 301 | // hScrollbar->setMaximumHeight(16); |
302 | 302 | ||
303 | connect( hScrollbar, SIGNAL(valueChanged(int)), this, SLOT( hScrollChanged(int))); | 303 | connect( hScrollbar, SIGNAL(valueChanged(int)), this, SLOT( hScrollChanged(int))); |
304 | 304 | ||