summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/TEWidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp
index d1ff85e..1c83710 100644
--- a/noncore/apps/opie-console/TEWidget.cpp
+++ b/noncore/apps/opie-console/TEWidget.cpp
@@ -310,96 +310,97 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name)
310 cb = QApplication::clipboard(); 310 cb = QApplication::clipboard();
311 QObject::connect( (QObject*)cb, SIGNAL(dataChanged()), 311 QObject::connect( (QObject*)cb, SIGNAL(dataChanged()),
312 this, SLOT(onClearSelection()) ); 312 this, SLOT(onClearSelection()) );
313#endif 313#endif
314 314
315 315
316 scrollbar = new QScrollBar( this ); 316 scrollbar = new QScrollBar( this );
317 scrollbar->setCursor( arrowCursor ); 317 scrollbar->setCursor( arrowCursor );
318 connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); 318 connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int)));
319 319
320 hscrollbar = new QScrollBar( Qt::Horizontal, this ); 320 hscrollbar = new QScrollBar( Qt::Horizontal, this );
321 hscrollbar->setCursor( arrowCursor ); 321 hscrollbar->setCursor( arrowCursor );
322 connect(hscrollbar, SIGNAL(valueChanged(int)), this, SLOT(hscrollChanged(int))); 322 connect(hscrollbar, SIGNAL(valueChanged(int)), this, SLOT(hscrollChanged(int)));
323 323
324 m_cornerButton = new QPushButton( this ); 324 m_cornerButton = new QPushButton( this );
325 m_cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); 325 m_cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) );
326 m_cornerButton->setMaximumSize( 14, 14 ); 326 m_cornerButton->setMaximumSize( 14, 14 );
327 m_cornerButton->hide(); 327 m_cornerButton->hide();
328 328
329 Config cfg("Konsole"); 329 Config cfg("Konsole");
330 cfg.setGroup("ScrollBar"); 330 cfg.setGroup("ScrollBar");
331 switch( cfg.readNumEntry("Position",2)){ 331 switch( cfg.readNumEntry("Position",2)){
332 case 0: 332 case 0:
333 scrollLoc = SCRNONE; 333 scrollLoc = SCRNONE;
334 break; 334 break;
335 case 1: 335 case 1:
336 scrollLoc = SCRLEFT; 336 scrollLoc = SCRLEFT;
337 break; 337 break;
338 case 2: 338 case 2:
339 scrollLoc = SCRRIGHT; 339 scrollLoc = SCRRIGHT;
340 break; 340 break;
341 }; 341 };
342 342
343 blinkT = new QTimer(this); 343 blinkT = new QTimer(this);
344 connect(blinkT, SIGNAL(timeout()), this, SLOT(blinkEvent())); 344 connect(blinkT, SIGNAL(timeout()), this, SLOT(blinkEvent()));
345 // blinking = FALSE; 345 // blinking = FALSE;
346 blinking = TRUE; 346 blinking = TRUE;
347 347
348 resizing = FALSE; 348 resizing = FALSE;
349 actSel = 0; 349 actSel = 0;
350 image = 0; 350 image = 0;
351 lines = 1; 351 lines = 1;
352 columns = 1; 352 columns = 1;
353 font_w = 1; 353 font_w = 1;
354 font_h = 1; 354 font_h = 1;
355 font_a = 1; 355 font_a = 1;
356 word_selection_mode = FALSE; 356 word_selection_mode = FALSE;
357 vcolumns = 0; 357 vcolumns = 0;
358 hposition = 0;
358 359
359 setMouseMarks(TRUE); 360 setMouseMarks(TRUE);
360 setVTFont( QFont("fixed") ); 361 setVTFont( QFont("fixed") );
361 setColorTable(base_color_table); // init color table 362 setColorTable(base_color_table); // init color table
362 363
363 qApp->installEventFilter( this ); //FIXME: see below 364 qApp->installEventFilter( this ); //FIXME: see below
364// KCursor::setAutoHideCursor( this, true ); 365// KCursor::setAutoHideCursor( this, true );
365 366
366 // Init DnD //////////////////////////////////////////////////////////////// 367 // Init DnD ////////////////////////////////////////////////////////////////
367 currentSession = NULL; 368 currentSession = NULL;
368// setAcceptDrops(true); // attempt 369// setAcceptDrops(true); // attempt
369// m_drop = new QPopupMenu(this); 370// m_drop = new QPopupMenu(this);
370// m_drop->insertItem( QString("Paste"), 0); 371// m_drop->insertItem( QString("Paste"), 0);
371// m_drop->insertItem( QString("cd"), 1); 372// m_drop->insertItem( QString("cd"), 1);
372// connect(m_drop, SIGNAL(activated(int)), SLOT(drop_menu_activated(int))); 373// connect(m_drop, SIGNAL(activated(int)), SLOT(drop_menu_activated(int)));
373 374
374 // we need focus so that the auto-hide cursor feature works 375 // we need focus so that the auto-hide cursor feature works
375 setFocus(); 376 setFocus();
376 setFocusPolicy( WheelFocus ); 377 setFocusPolicy( WheelFocus );
377} 378}
378 379
379//FIXME: make proper destructor 380//FIXME: make proper destructor
380// Here's a start (David) 381// Here's a start (David)
381TEWidget::~TEWidget() 382TEWidget::~TEWidget()
382{ 383{
383 qApp->removeEventFilter( this ); 384 qApp->removeEventFilter( this );
384 if (image) free(image); 385 if (image) free(image);
385} 386}
386 387
387/* ------------------------------------------------------------------------- */ 388/* ------------------------------------------------------------------------- */
388/* */ 389/* */
389/* Display Operations */ 390/* Display Operations */
390/* */ 391/* */
391/* ------------------------------------------------------------------------- */ 392/* ------------------------------------------------------------------------- */
392 393
393/*! 394/*!
394 attributed string draw primitive 395 attributed string draw primitive
395*/ 396*/
396 397
397void TEWidget::drawAttrStr(QPainter &paint, QRect rect, 398void TEWidget::drawAttrStr(QPainter &paint, QRect rect,
398 QString& str, ca attr, BOOL pm, BOOL clear) 399 QString& str, ca attr, BOOL pm, BOOL clear)
399{ 400{
400 if (pm && color_table[attr.b].transparent) 401 if (pm && color_table[attr.b].transparent)
401 { 402 {
402 paint.setBackgroundMode( TransparentMode ); 403 paint.setBackgroundMode( TransparentMode );
403 if (clear) erase(rect); 404 if (clear) erase(rect);
404 } 405 }
405 else 406 else