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