author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/apps/opie-console/emulation_widget.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/apps/opie-console/emulation_widget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/emulation_widget.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp index ad8ecba..4688551 100644 --- a/noncore/apps/opie-console/emulation_widget.cpp +++ b/noncore/apps/opie-console/emulation_widget.cpp | |||
@@ -211,81 +211,81 @@ void EmulationWidget::paintEvent( QPaintEvent* pe ) | |||
211 | len += 1; | 211 | len += 1; |
212 | } | 212 | } |
213 | QString unistr(disstrU,len); | 213 | QString unistr(disstrU,len); |
214 | 214 | ||
215 | drawAttrString( unistr, painter, QRect( m_blX+tLx+f_width*x,m_bY+tLy+f_height*y,f_width*len,f_height ), m_image[loc(x ,y )], pm != 0l, false ); | 215 | drawAttrString( unistr, painter, QRect( m_blX+tLx+f_width*x,m_bY+tLy+f_height*y,f_width*len,f_height ), m_image[loc(x ,y )], pm != 0l, false ); |
216 | x +=len -1; | 216 | x +=len -1; |
217 | } | 217 | } |
218 | delete [] disstrU; | 218 | delete [] disstrU; |
219 | drawFrame( &painter ); | 219 | drawFrame( &painter ); |
220 | painter.end(); | 220 | painter.end(); |
221 | } | 221 | } |
222 | 222 | ||
223 | void EmulationWidget::calcGeometry() | 223 | void EmulationWidget::calcGeometry() |
224 | { | 224 | { |
225 | m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() ); | 225 | m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() ); |
226 | 226 | ||
227 | qDebug( QString(" TEST").arg( contentsRect().width() ) ); | 227 | odebug << QString(" TEST").arg( contentsRect().width() ) << oendl; |
228 | qDebug( QString(" TEST").arg( contentsRect().height() ) ); | 228 | odebug << QString(" TEST").arg( contentsRect().height() ) << oendl; |
229 | qDebug("NEUER TESTT!!!!!!!!"); | 229 | odebug << "NEUER TESTT!!!!!!!!" << oendl; |
230 | 230 | ||
231 | switch( scrollLoc ) | 231 | switch( scrollLoc ) |
232 | { | 232 | { |
233 | case SCRNONE : | 233 | case SCRNONE : |
234 | m_columns = ( contentsRect().width() -2 * rimX ) / f_width; | 234 | m_columns = ( contentsRect().width() -2 * rimX ) / f_width; |
235 | m_blX = ( contentsRect().width() - ( m_columns*f_width ) ) / 2; | 235 | m_blX = ( contentsRect().width() - ( m_columns*f_width ) ) / 2; |
236 | m_brX = m_blX; | 236 | m_brX = m_blX; |
237 | m_scrollbar->hide(); | 237 | m_scrollbar->hide(); |
238 | break; | 238 | break; |
239 | case SCRLEFT : | 239 | case SCRLEFT : |
240 | m_columns = ( contentsRect().width() - 2 * rimX - m_scrollbar->width() ) / f_width; | 240 | m_columns = ( contentsRect().width() - 2 * rimX - m_scrollbar->width() ) / f_width; |
241 | m_brX = ( contentsRect().width() - ( m_columns*f_width ) - m_scrollbar->width() ) / 2; | 241 | m_brX = ( contentsRect().width() - ( m_columns*f_width ) - m_scrollbar->width() ) / 2; |
242 | m_blX = m_brX + m_scrollbar->width(); | 242 | m_blX = m_brX + m_scrollbar->width(); |
243 | m_scrollbar->move( contentsRect().topLeft() ); | 243 | m_scrollbar->move( contentsRect().topLeft() ); |
244 | m_scrollbar->show(); | 244 | m_scrollbar->show(); |
245 | break; | 245 | break; |
246 | case SCRIGHT: | 246 | case SCRIGHT: |
247 | m_columns = ( contentsRect().width() - 2 * rimX - m_scrollbar->width() ) / f_width; | 247 | m_columns = ( contentsRect().width() - 2 * rimX - m_scrollbar->width() ) / f_width; |
248 | m_blX = ( contentsRect().width() - ( m_columns*f_width ) - m_scrollbar->width() ) / 2; | 248 | m_blX = ( contentsRect().width() - ( m_columns*f_width ) - m_scrollbar->width() ) / 2; |
249 | m_brX = m_blX; | 249 | m_brX = m_blX; |
250 | m_scrollbar->move( contentsRect().topRight() - QPoint (m_scrollbar->width()-1,0 ) ); | 250 | m_scrollbar->move( contentsRect().topRight() - QPoint (m_scrollbar->width()-1,0 ) ); |
251 | m_scrollbar->show(); | 251 | m_scrollbar->show(); |
252 | break; | 252 | break; |
253 | } | 253 | } |
254 | 254 | ||
255 | m_lines = ( contentsRect().height() - 2 * rimY ) / f_height; | 255 | m_lines = ( contentsRect().height() - 2 * rimY ) / f_height; |
256 | m_bY = ( contentsRect().height() - (m_lines * f_height ) ) / 2; | 256 | m_bY = ( contentsRect().height() - (m_lines * f_height ) ) / 2; |
257 | } | 257 | } |
258 | 258 | ||
259 | void EmulationWidget::drawAttrString( QString& string, QPainter &painter, QRect rect, Character attr, bool usePixmap, bool clear ) | 259 | void EmulationWidget::drawAttrString( QString& string, QPainter &painter, QRect rect, Character attr, bool usePixmap, bool clear ) |
260 | { | 260 | { |
261 | qWarning("Color1 %s", color_table[attr.b].color.name().latin1() ); | 261 | owarn << "Color1 " << color_table[attr.b].color.name().latin1() << "" << oendl; |
262 | if ( usePixmap && color_table[attr.b].transparent ) | 262 | if ( usePixmap && color_table[attr.b].transparent ) |
263 | { | 263 | { |
264 | painter.setBackgroundMode( TransparentMode ); | 264 | painter.setBackgroundMode( TransparentMode ); |
265 | if ( clear ) | 265 | if ( clear ) |
266 | erase( rect ); | 266 | erase( rect ); |
267 | } | 267 | } |
268 | else | 268 | else |
269 | { | 269 | { |
270 | if ( blinking ) | 270 | if ( blinking ) |
271 | painter.fillRect( rect, color_table[attr.b].color ); | 271 | painter.fillRect( rect, color_table[attr.b].color ); |
272 | else | 272 | else |
273 | { | 273 | { |
274 | painter.setBackgroundMode( OpaqueMode ); | 274 | painter.setBackgroundMode( OpaqueMode ); |
275 | qWarning("Color %s", color_table[attr.b].color.name().latin1() ); | 275 | owarn << "Color " << color_table[attr.b].color.name().latin1() << "" << oendl; |
276 | painter.setBackgroundColor( color_table[attr.b].color ); | 276 | painter.setBackgroundColor( color_table[attr.b].color ); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | if ( color_table[attr.f].bold ) | 279 | if ( color_table[attr.f].bold ) |
280 | painter.setPen( QColor( 0x8F, 0x00, 0x00 ) ); | 280 | painter.setPen( QColor( 0x8F, 0x00, 0x00 ) ); |
281 | else | 281 | else |
282 | painter.setPen( color_table[attr.f].color ); | 282 | painter.setPen( color_table[attr.f].color ); |
283 | painter.drawText( rect.x(), rect.y() + f_ascent, string ); | 283 | painter.drawText( rect.x(), rect.y() + f_ascent, string ); |
284 | 284 | ||
285 | } | 285 | } |
286 | 286 | ||
287 | 287 | ||
288 | /////////////////////// | 288 | /////////////////////// |
289 | // scrollbar | 289 | // scrollbar |
290 | // //////////////////// | 290 | // //////////////////// |
291 | 291 | ||