author | llornkcor <llornkcor> | 2002-11-01 12:56:21 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-01 12:56:21 (UTC) |
commit | 287f8a39e757e87a840fbffce258ee03c6b62161 (patch) (unidiff) | |
tree | f62a4f36857aeb6f3f270ddadf92010639b6ce94 | |
parent | 14bd24ba233e370b44ec23cab2733289a3387ca7 (diff) | |
download | opie-287f8a39e757e87a840fbffce258ee03c6b62161.zip opie-287f8a39e757e87a840fbffce258ee03c6b62161.tar.gz opie-287f8a39e757e87a840fbffce258ee03c6b62161.tar.bz2 |
remove some commented code
-rw-r--r-- | core/apps/embeddedkonsole/TEScreen.cpp | 60 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 63 |
2 files changed, 3 insertions, 120 deletions
diff --git a/core/apps/embeddedkonsole/TEScreen.cpp b/core/apps/embeddedkonsole/TEScreen.cpp index 50807d3..a6cf6a1 100644 --- a/core/apps/embeddedkonsole/TEScreen.cpp +++ b/core/apps/embeddedkonsole/TEScreen.cpp | |||
@@ -544,75 +544,17 @@ ca* TEScreen::getCookedImage() | |||
544 | if (getMode(MODE_Screen)) | 544 | if (getMode(MODE_Screen)) |
545 | { int i,n = lines*columns; | 545 | { int i,n = lines*columns; |
546 | for (i = 0; i < n; i++) | 546 | for (i = 0; i < n; i++) |
547 | reverseRendition(&merged[i]); // for reverse display | 547 | reverseRendition(&merged[i]); // for reverse display |
548 | } | 548 | } |
549 | if (getMode(MODE_Cursor) && (cuY+(hist.getLines()-histCursor) < lines)) // cursor visible | 549 | if (getMode(MODE_Cursor) && (cuY+(hist.getLines()-histCursor) < lines)) // cursor visible |
550 | reverseRendition(&merged[loc(cuX,cuY+(hist.getLines()-histCursor))]); | 550 | reverseRendition(&merged[loc(cuX,cuY+(hist.getLines()-histCursor))]); |
551 | return merged; | 551 | return merged; |
552 | 552 | ||
553 | /* | ||
554 | int x, y, z; | ||
555 | |||
556 | ca* merged = (ca*)malloc( lines * columns * sizeof( ca)); | ||
557 | |||
558 | ca dft(' ',DEFAULT_FORE_COLOR,DEFAULT_BACK_COLOR,DEFAULT_RENDITION); | ||
559 | |||
560 | // qDebug("hist lines %d, historyCursor %d, minus %d ,lines %d, columns %d", | ||
561 | // hist.getLines(), histCursor, hist.getLines() - histCursor , lines, columns); | ||
562 | for (y = 0; (y < lines) && (y < ( hist.getLines() - histCursor )); y++) { | ||
563 | |||
564 | int len = QMIN( columns, hist.getLineLen( y + histCursor) ); | ||
565 | int yp = y * columns; | ||
566 | int yq = ( y + histCursor) * columns; | ||
567 | // qDebug("horzCursor %d, columns %d, len %d", horzCursor, columns, len); | ||
568 | // qDebug("lineno %d, colno %d, count %d\n", y + histCursor, (horzCursor / 2), len ); | ||
569 | qDebug("Y %d", y); | ||
570 | hist.getCells( y + histCursor, (horzCursor / 2), len, merged + yp); | ||
571 | |||
572 | for (x = len; x < columns; x++) | ||
573 | merged[yp + x] = dft; | ||
574 | for (x = 0; x < columns; x++) { | ||
575 | int p = x + yp; int q = x + yq; | ||
576 | if ( ( q >= sel_TL ) && ( q <= sel_BR ) ) | ||
577 | reverseRendition(&merged[p]); // for selection | ||
578 | } | ||
579 | } | ||
580 | |||
581 | if (lines >= hist.getLines() - histCursor) { | ||
582 | for (y = ( hist.getLines() - histCursor); y < lines ; y++) { | ||
583 | int z = horzCursor; | ||
584 | int yp = y * columns; | ||
585 | int yq = ( y + histCursor) * columns; | ||
586 | int yr = ( y - hist.getLines() + histCursor) * columns; | ||
587 | // qDebug("y %d, yp %d, yq %d, columns %d, z cursor %d", y, yp, yq, columns, z); | ||
588 | for (x = 0; x < columns; x++) { | ||
589 | int p = x + yp; int q = x + yq; int r = (x + (horzCursor/2) ) + yr; | ||
590 | merged[p] = image[r]; | ||
591 | if ( q >= sel_TL && q <= sel_BR ) | ||
592 | reverseRendition( &merged[p]); // for selection | ||
593 | } | ||
594 | } | ||
595 | } | ||
596 | |||
597 | |||
598 | // evtl. inverse display | ||
599 | if (getMode(MODE_Screen)) | ||
600 | { int i, n = lines * columns; | ||
601 | for (i = 0; i < n; i++) | ||
602 | reverseRendition( &merged[i]); // for reverse display | ||
603 | } | ||
604 | if (getMode(MODE_Cursor) && ( cuY + ( hist.getLines() - histCursor) < lines)) // cursor visible | ||
605 | |||
606 | reverseRendition( &merged[ loc( cuX, cuY + ( hist.getLines() - histCursor))] ); | ||
607 | |||
608 | return merged; | ||
609 | */ | ||
610 | |||
611 | } | 553 | } |
612 | 554 | ||
613 | 555 | ||
614 | /*! | 556 | /*! |
615 | */ | 557 | */ |
616 | 558 | ||
617 | void TEScreen::reset() | 559 | void TEScreen::reset() |
618 | { | 560 | { |
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index 60021f4..d6ee6e8 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp | |||
@@ -1050,22 +1050,22 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) | |||
1050 | } | 1050 | } |
1051 | #endif | 1051 | #endif |
1052 | 1052 | ||
1053 | if ( e->type() == QEvent::KeyPress ) { | 1053 | if ( e->type() == QEvent::KeyPress ) { |
1054 | QKeyEvent* ke = (QKeyEvent*)e; | 1054 | QKeyEvent* ke = (QKeyEvent*)e; |
1055 | actSel=0; // Key stroke implies a screen update, so TEWidget won't | 1055 | actSel=0; // Key stroke implies a screen update, so TEWidget won't |
1056 | // know where the current selection is. | 1056 | // know where the current selection is. |
1057 | 1057 | ||
1058 | // qDebug("key pressed is 0x%x, state %d",ke->key(), ke->state()); | 1058 | // qDebug("key pressed is 0x%x, ascii is 0x%x, state %d", ke->key(), ke->ascii(), ke->state()); |
1059 | 1059 | ||
1060 | if( ke->state() == ShiftButton && ke->key() == Key_Tab) { | 1060 | if( ke->state() == ShiftButton && ke->key() == Key_Tab) { |
1061 | //lets hardcode this sucker | 1061 | //lets hardcode this sucker |
1062 | 1062 | ||
1063 | // qDebug("key pressed 2 is 0x%x",ke->key()); | 1063 | // qDebug("key pressed 2 is 0x%x", ke->key()); |
1064 | emitText("\\"); // expose | 1064 | emitText("\\"); // expose |
1065 | } | 1065 | } |
1066 | else if( ke->state() == ControlButton && ke->key() == Key_V) { | 1066 | else if( ke->state() == ControlButton && ke->key() == Key_V) { |
1067 | pasteClipboard(); | 1067 | pasteClipboard(); |
1068 | } | 1068 | } |
1069 | else | 1069 | else |
1070 | emit keyPressedSignal(ke); // expose | 1070 | emit keyPressedSignal(ke); // expose |
1071 | ke->accept(); | 1071 | ke->accept(); |
@@ -1202,75 +1202,16 @@ void TEWidget::calcGeometry() | |||
1202 | hScrollbar->show(); | 1202 | hScrollbar->show(); |
1203 | } | 1203 | } |
1204 | else hScrollbar->hide(); | 1204 | else hScrollbar->hide(); |
1205 | 1205 | ||
1206 | if(showhscrollbar == 1) { | 1206 | if(showhscrollbar == 1) { |
1207 | lines = lines - (hwidth / font_h) - 1; | 1207 | lines = lines - (hwidth / font_h) - 1; |
1208 | if(lines < 1) lines = 1; | 1208 | if(lines < 1) lines = 1; |
1209 | } | 1209 | } |
1210 | |||
1211 | /*//FIXME: set rimX == rimY == 0 when running in full screen mode. | ||
1212 | Config cfg("Konsole"); | ||
1213 | cfg.setGroup("ScrollBar"); | ||
1214 | useHorzScroll=cfg.readBoolEntry("HorzScroll",0); | ||
1215 | |||
1216 | scrollbar->resize( QApplication::style().scrollBarExtent().width(), | ||
1217 | contentsRect().height()); | ||
1218 | qDebug("font_w %d", font_w); | ||
1219 | switch(scrollLoc) | ||
1220 | { | ||
1221 | case SCRNONE : | ||
1222 | columns = ( contentsRect().width() - 2 * rimX ) / font_w; | ||
1223 | blX = (contentsRect().width() - (columns*font_w) ) / 2; | ||
1224 | brX = blX; | ||
1225 | scrollbar->hide(); | ||
1226 | break; | ||
1227 | case SCRLEFT : | ||
1228 | columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w; | ||
1229 | if(useHorzScroll) columns = columns * (font_w/2); | ||
1230 | brX = (contentsRect().width() - (columns*font_w) - scrollbar->width() ) / 2; | ||
1231 | blX = brX + scrollbar->width(); | ||
1232 | scrollbar->move(contentsRect().topLeft()); | ||
1233 | scrollbar->show(); | ||
1234 | break; | ||
1235 | case SCRRIGHT: | ||
1236 | columns = ( contentsRect().width() - 2 * rimX - scrollbar->width() ) / font_w; | ||
1237 | if(useHorzScroll) columns = columns * (font_w/2); | ||
1238 | blX = (contentsRect().width() - (columns*font_w) - scrollbar->width() ) / 2; | ||
1239 | if(useHorzScroll) { | ||
1240 | brX = blX =2; | ||
1241 | } else { | ||
1242 | brX=blX; | ||
1243 | } | ||
1244 | scrollbar->move(contentsRect().topRight() - QPoint(scrollbar->width()-1,0) ); | ||
1245 | scrollbar->show(); | ||
1246 | break; | ||
1247 | } | ||
1248 | |||
1249 | if( !scrollbar->isHidden()) | ||
1250 | hScrollbar->resize( contentsRect().width()-SCRWIDTH, QApplication::style() | ||
1251 | .scrollBarExtent().height()); | ||
1252 | else | ||
1253 | hScrollbar->resize( contentsRect().width(), QApplication::style() | ||
1254 | .scrollBarExtent().height()); | ||
1255 | |||
1256 | hScrollbar->move( 0, contentsRect().height() - SCRWIDTH); | ||
1257 | |||
1258 | |||
1259 | if(useHorzScroll) { | ||
1260 | hScrollbar->show(); | ||
1261 | lines = ( (contentsRect().height() - SCRWIDTH) - 2 * rimY ) / font_h; | ||
1262 | bY = ((contentsRect().height() - SCRWIDTH) - (lines *font_h)) / 2; | ||
1263 | } else { | ||
1264 | hScrollbar->hide(); | ||
1265 | lines = (contentsRect().height() - 2 * rimY ) / font_h; | ||
1266 | bY = (contentsRect().height() - (lines *font_h)) / 2; | ||
1267 | } | ||
1268 | */ | ||
1269 | //FIXME: support 'rounding' styles | 1210 | //FIXME: support 'rounding' styles |
1270 | } | 1211 | } |
1271 | 1212 | ||
1272 | void TEWidget::makeImage() | 1213 | void TEWidget::makeImage() |
1273 | //FIXME: rename 'calcGeometry? | 1214 | //FIXME: rename 'calcGeometry? |
1274 | { | 1215 | { |
1275 | calcGeometry(); | 1216 | calcGeometry(); |
1276 | image = (ca*) malloc(lines*columns*sizeof(ca)); | 1217 | image = (ca*) malloc(lines*columns*sizeof(ca)); |