Diffstat (limited to 'core/apps/embeddedkonsole/TEWidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index 98c3cdf..2e3e0f5 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp | |||
@@ -285,49 +285,49 @@ void TEWidget::setFont(const QFont &) | |||
285 | /* */ | 285 | /* */ |
286 | /* Constructor / Destructor */ | 286 | /* Constructor / Destructor */ |
287 | /* */ | 287 | /* */ |
288 | /* ------------------------------------------------------------------------- */ | 288 | /* ------------------------------------------------------------------------- */ |
289 | 289 | ||
290 | TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) | 290 | TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) |
291 | { | 291 | { |
292 | #ifndef QT_NO_CLIPBOARD | 292 | #ifndef QT_NO_CLIPBOARD |
293 | cb = QApplication::clipboard(); | 293 | cb = QApplication::clipboard(); |
294 | QObject::connect( (QObject*)cb, SIGNAL(dataChanged()), | 294 | QObject::connect( (QObject*)cb, SIGNAL(dataChanged()), |
295 | this, SLOT(onClearSelection()) ); | 295 | this, SLOT(onClearSelection()) ); |
296 | #endif | 296 | #endif |
297 | 297 | ||
298 | scrollbar = new QScrollBar(this); | 298 | scrollbar = new QScrollBar(this); |
299 | scrollbar->setCursor( arrowCursor ); | 299 | scrollbar->setCursor( arrowCursor ); |
300 | connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); | 300 | connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); |
301 | 301 | ||
302 | hScrollbar = new QScrollBar(this); | 302 | hScrollbar = new QScrollBar(this); |
303 | hScrollbar->setCursor( arrowCursor ); | 303 | hScrollbar->setCursor( arrowCursor ); |
304 | hScrollbar->setOrientation(QScrollBar::Horizontal); | 304 | hScrollbar->setOrientation(QScrollBar::Horizontal); |
305 | // hScrollbar->setMaximumHeight(16); | 305 | // hScrollbar->setMaximumHeight(16); |
306 | 306 | ||
307 | connect( hScrollbar, SIGNAL(valueChanged(int)), this, SLOT( hScrollChanged(int))); | 307 | connect( hScrollbar, SIGNAL(valueChanged(int)), this, SLOT( hScrollChanged(int))); |
308 | 308 | ||
309 | Config cfg("Qkonsole"); | 309 | Config cfg( "Konsole" ); |
310 | cfg.setGroup("ScrollBar"); | 310 | cfg.setGroup("ScrollBar"); |
311 | switch( cfg.readNumEntry("Position",2)){ | 311 | switch( cfg.readNumEntry("Position",2)){ |
312 | case 0: | 312 | case 0: |
313 | scrollLoc = SCRNONE; | 313 | scrollLoc = SCRNONE; |
314 | break; | 314 | break; |
315 | case 1: | 315 | case 1: |
316 | scrollLoc = SCRLEFT; | 316 | scrollLoc = SCRLEFT; |
317 | break; | 317 | break; |
318 | case 2: | 318 | case 2: |
319 | scrollLoc = SCRRIGHT; | 319 | scrollLoc = SCRRIGHT; |
320 | break; | 320 | break; |
321 | }; | 321 | }; |
322 | 322 | ||
323 | useHorzScroll=cfg.readBoolEntry("HorzScroll",0); | 323 | useHorzScroll=cfg.readBoolEntry("HorzScroll",0); |
324 | 324 | ||
325 | blinkT = new QTimer(this); | 325 | blinkT = new QTimer(this); |
326 | connect(blinkT, SIGNAL(timeout()), this, SLOT(blinkEvent())); | 326 | connect(blinkT, SIGNAL(timeout()), this, SLOT(blinkEvent())); |
327 | // blinking = FALSE; | 327 | // blinking = FALSE; |
328 | blinking = TRUE; | 328 | blinking = TRUE; |
329 | 329 | ||
330 | resizing = FALSE; | 330 | resizing = FALSE; |
331 | actSel = 0; | 331 | actSel = 0; |
332 | image = 0; | 332 | image = 0; |
333 | lines = 1; | 333 | lines = 1; |
@@ -1206,49 +1206,49 @@ void TEWidget::Bell() | |||
1206 | /* */ | 1206 | /* */ |
1207 | /* ------------------------------------------------------------------------- */ | 1207 | /* ------------------------------------------------------------------------- */ |
1208 | 1208 | ||
1209 | void TEWidget::clearImage() | 1209 | void TEWidget::clearImage() |
1210 | // initialize the image | 1210 | // initialize the image |
1211 | // for internal use only | 1211 | // for internal use only |
1212 | { | 1212 | { |
1213 | for (int y = 0; y < lines; y++) | 1213 | for (int y = 0; y < lines; y++) |
1214 | for (int x = 0; x < columns; x++) | 1214 | for (int x = 0; x < columns; x++) |
1215 | { | 1215 | { |
1216 | image[loc(x,y)].c = 0xff; //' '; | 1216 | image[loc(x,y)].c = 0xff; //' '; |
1217 | image[loc(x,y)].f = 0xff; //DEFAULT_FORE_COLOR; | 1217 | image[loc(x,y)].f = 0xff; //DEFAULT_FORE_COLOR; |
1218 | image[loc(x,y)].b = 0xff; //DEFAULT_BACK_COLOR; | 1218 | image[loc(x,y)].b = 0xff; //DEFAULT_BACK_COLOR; |
1219 | image[loc(x,y)].r = 0xff; //DEFAULT_RENDITION; | 1219 | image[loc(x,y)].r = 0xff; //DEFAULT_RENDITION; |
1220 | } | 1220 | } |
1221 | } | 1221 | } |
1222 | 1222 | ||
1223 | // Create Image /////////////////////////////////////////////////////// | 1223 | // Create Image /////////////////////////////////////////////////////// |
1224 | 1224 | ||
1225 | void TEWidget::calcGeometry() | 1225 | void TEWidget::calcGeometry() |
1226 | { | 1226 | { |
1227 | int showhscrollbar = 1; | 1227 | int showhscrollbar = 1; |
1228 | int hwidth = 0; | 1228 | int hwidth = 0; |
1229 | int dcolumns; | 1229 | int dcolumns; |
1230 | Config cfg("Qkonsole"); | 1230 | Config cfg( "Konsole" ); |
1231 | cfg.setGroup("ScrollBar"); | 1231 | cfg.setGroup("ScrollBar"); |
1232 | useHorzScroll=cfg.readBoolEntry("HorzScroll",0); | 1232 | useHorzScroll=cfg.readBoolEntry("HorzScroll",0); |
1233 | 1233 | ||
1234 | if(vcolumns == 0) showhscrollbar = 0; | 1234 | if(vcolumns == 0) showhscrollbar = 0; |
1235 | if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width(); | 1235 | if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width(); |
1236 | 1236 | ||
1237 | scrollbar->resize(QApplication::style().scrollBarExtent().width(), | 1237 | scrollbar->resize(QApplication::style().scrollBarExtent().width(), |
1238 | contentsRect().height() - hwidth); | 1238 | contentsRect().height() - hwidth); |
1239 | 1239 | ||
1240 | switch(scrollLoc) { | 1240 | switch(scrollLoc) { |
1241 | case SCRNONE : | 1241 | case SCRNONE : |
1242 | columns = ( contentsRect().width() - 2 * rimX ) / font_w; | 1242 | columns = ( contentsRect().width() - 2 * rimX ) / font_w; |
1243 | dcolumns = columns; | 1243 | dcolumns = columns; |
1244 | if(vcolumns) columns = vcolumns; | 1244 | if(vcolumns) columns = vcolumns; |
1245 | blX = (contentsRect().width() - (columns*font_w) ) / 2; | 1245 | blX = (contentsRect().width() - (columns*font_w) ) / 2; |
1246 | if(showhscrollbar) | 1246 | if(showhscrollbar) |
1247 | blX = -hposition * font_w; | 1247 | blX = -hposition * font_w; |
1248 | brX = blX; | 1248 | brX = blX; |
1249 | scrollbar->hide(); | 1249 | scrollbar->hide(); |
1250 | break; | 1250 | break; |
1251 | case SCRLEFT : | 1251 | case SCRLEFT : |
1252 | columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w; | 1252 | columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w; |
1253 | dcolumns = columns; | 1253 | dcolumns = columns; |
1254 | if(vcolumns) columns = vcolumns; | 1254 | if(vcolumns) columns = vcolumns; |