summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/TEWidget.cpp
Unidiff
Diffstat (limited to 'core/apps/embeddedkonsole/TEWidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEWidget.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp
index 4c6ea2a..c220e11 100644
--- a/core/apps/embeddedkonsole/TEWidget.cpp
+++ b/core/apps/embeddedkonsole/TEWidget.cpp
@@ -311,49 +311,50 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name)
311 scrollLoc = SCRLEFT; 311 scrollLoc = SCRLEFT;
312 break; 312 break;
313 case 2: 313 case 2:
314 scrollLoc = SCRRIGHT; 314 scrollLoc = SCRRIGHT;
315 break; 315 break;
316 }; 316 };
317 317
318 useHorzScroll=cfg.readBoolEntry("HorzScroll",0); 318 useHorzScroll=cfg.readBoolEntry("HorzScroll",0);
319 319
320 blinkT = new QTimer(this); 320 blinkT = new QTimer(this);
321 connect(blinkT, SIGNAL(timeout()), this, SLOT(blinkEvent())); 321 connect(blinkT, SIGNAL(timeout()), this, SLOT(blinkEvent()));
322 // blinking = FALSE; 322 // blinking = FALSE;
323 blinking = TRUE; 323 blinking = TRUE;
324 324
325 resizing = FALSE; 325 resizing = FALSE;
326 actSel = 0; 326 actSel = 0;
327 image = 0; 327 image = 0;
328 lines = 1; 328 lines = 1;
329 columns = 1; 329 columns = 1;
330 font_w = 1; 330 font_w = 1;
331 font_h = 1; 331 font_h = 1;
332 font_a = 1; 332 font_a = 1;
333 word_selection_mode = FALSE; 333 word_selection_mode = FALSE;
334 hposition = 0; 334 hposition = 0;
335vcolumns = 0; 335 vcolumns = 0;
336 useBeep = true;
336 337
337 setMouseMarks(TRUE); 338 setMouseMarks(TRUE);
338 setVTFont( QFont("fixed") ); 339 setVTFont( QFont("fixed") );
339 setColorTable(base_color_table); // init color table 340 setColorTable(base_color_table); // init color table
340 341
341 qApp->installEventFilter( this ); //FIXME: see below 342 qApp->installEventFilter( this ); //FIXME: see below
342// KCursor::setAutoHideCursor( this, true ); 343// KCursor::setAutoHideCursor( this, true );
343 344
344 // Init DnD //////////////////////////////////////////////////////////////// 345 // Init DnD ////////////////////////////////////////////////////////////////
345 currentSession = NULL; 346 currentSession = NULL;
346// setAcceptDrops(true); // attempt 347// setAcceptDrops(true); // attempt
347// m_drop = new QPopupMenu(this); 348// m_drop = new QPopupMenu(this);
348// m_drop->insertItem( QString("Paste"), 0); 349// m_drop->insertItem( QString("Paste"), 0);
349// m_drop->insertItem( QString("cd"), 1); 350// m_drop->insertItem( QString("cd"), 1);
350// connect(m_drop, SIGNAL(activated(int)), SLOT(drop_menu_activated(int))); 351// connect(m_drop, SIGNAL(activated(int)), SLOT(drop_menu_activated(int)));
351 352
352 // we need focus so that the auto-hide cursor feature works 353 // we need focus so that the auto-hide cursor feature works
353 setFocus(); 354 setFocus();
354 setFocusPolicy( WheelFocus ); 355 setFocusPolicy( WheelFocus );
355} 356}
356 357
357//FIXME: make proper destructor 358//FIXME: make proper destructor
358// Here's a start (David) 359// Here's a start (David)
359TEWidget::~TEWidget() 360TEWidget::~TEWidget()
@@ -1086,49 +1087,51 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e )
1086} 1087}
1087 1088
1088/* ------------------------------------------------------------------------- */ 1089/* ------------------------------------------------------------------------- */
1089/* */ 1090/* */
1090/* Frame */ 1091/* Frame */
1091/* */ 1092/* */
1092/* ------------------------------------------------------------------------- */ 1093/* ------------------------------------------------------------------------- */
1093 1094
1094void TEWidget::frameChanged() 1095void TEWidget::frameChanged()
1095{ 1096{
1096 propagateSize(); 1097 propagateSize();
1097 update(); 1098 update();
1098} 1099}
1099 1100
1100/* ------------------------------------------------------------------------- */ 1101/* ------------------------------------------------------------------------- */
1101/* */ 1102/* */
1102/* Sound */ 1103/* Sound */
1103/* */ 1104/* */
1104/* ------------------------------------------------------------------------- */ 1105/* ------------------------------------------------------------------------- */
1105 1106
1106void TEWidget::Bell() 1107void TEWidget::Bell()
1107{ 1108{
1108//#ifdef QT_QWS_SHARP 1109//#ifdef QT_QWS_SHARP
1109//# ifndef QT_NO_COP 1110//# ifndef QT_NO_COP
1110 QCopEnvelope( "QPE/TaskBar", "soundAlarm()" ); 1111 if(useBeep)
1112 QCopEnvelope( "QPE/TaskBar", "soundAlarm()" );
1113
1111//# endif 1114//# endif
1112//#else 1115//#else
1113//# ifndef QT_NO_SOUND 1116//# ifndef QT_NO_SOUND
1114// QSound::play(Resource::findSound("alarm")); 1117// QSound::play(Resource::findSound("alarm"));
1115//# endif 1118//# endif
1116//#endif 1119//#endif
1117 1120
1118// QApplication::beep(); 1121// QApplication::beep();
1119} 1122}
1120 1123
1121/* ------------------------------------------------------------------------- */ 1124/* ------------------------------------------------------------------------- */
1122/* */ 1125/* */
1123/* Auxiluary */ 1126/* Auxiluary */
1124/* */ 1127/* */
1125/* ------------------------------------------------------------------------- */ 1128/* ------------------------------------------------------------------------- */
1126 1129
1127void TEWidget::clearImage() 1130void TEWidget::clearImage()
1128// initialize the image 1131// initialize the image
1129// for internal use only 1132// for internal use only
1130{ 1133{
1131 for (int y = 0; y < lines; y++) 1134 for (int y = 0; y < lines; y++)
1132 for (int x = 0; x < columns; x++) 1135 for (int x = 0; x < columns; x++)
1133 { 1136 {
1134 image[loc(x,y)].c = 0xff; //' '; 1137 image[loc(x,y)].c = 0xff; //' ';