summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/emulation_widget.cpp
Side-by-side diff
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.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp
index e11c5e4..40199fa 100644
--- a/noncore/apps/opie-console/emulation_widget.cpp
+++ b/noncore/apps/opie-console/emulation_widget.cpp
@@ -81,24 +81,31 @@ static QChar vt100extended(QChar c)
case 0x2502 : return 25;
case 0x2264 : return 26;
case 0x2265 : return 27;
case 0x03c0 : return 28;
case 0x2260 : return 29;
case 0x00a3 : return 30;
case 0x00b7 : return 31;
}
return c;
}
+QSize EmulationWidget::calcSize( int cols, int lins ) const
+{
+ int frw = width() - contentsRect().width();
+ int frh = height() - contentsRect().height();
+ int scw = (scrollLoc == SCRNONE? 0 : m_scrollbar->width() );
+ return QSize( f_width * cols + 2 * rimX + frw + scw, f_height * lins + 2 * rimY + frh );
+}
void EmulationWidget::setImage( QArray<Character> const newimg, int lines, int columns )
{
const QPixmap* pm = backgroundPixmap();
QPainter paint;
// dont allow updates, while drawing
setUpdatesEnabled( false );
paint.begin( this );
QPoint tL = contentsRect().topLeft();
@@ -108,25 +115,25 @@ void EmulationWidget::setImage( QArray<Character> const newimg, int lines, int c
int cf = -1;
int cb = -1;
int cr = -1;
int lins = QMIN( m_lines, QMAX( 0, lines ) );
int cols = QMIN( m_columns, QMAX( 0, columns ) );
QArray<QChar> disstrU = QArray<QChar>( cols );
for ( int y = 0; y < lins; ++y )
{ int len;
const Character* lcl = &m_image[y * m_columns];
- const Character* ext = &newimg[y * columns];
+ const Character* ext = &newimg[y * m_columns];
if ( ! m_resizing )
for ( int x = 0; x < cols; ++x )
{
// disable, till widget works, WITHOUT blinking
//hasBlinker |= ( ext[x].r & RE_BLINK );
if ( ext[x] != lcl[x] )
{
cr = ext[x].r;
cb = ext[x].b;
if ( ext[x].f != cf ) cf = ext[x].f;
int lln = cols - x;