author | treke <treke> | 2002-09-05 04:42:25 (UTC) |
---|---|---|
committer | treke <treke> | 2002-09-05 04:42:25 (UTC) |
commit | e2186a49cb5cbdf01b56f57818a15a760ff25b2e (patch) (side-by-side diff) | |
tree | f22e7342c7a3adcccb6eed52a314fe8e301cc624 /noncore/comm/keypebble/krfbcanvas.cpp | |
parent | fd3239820e471044bf279a2964702573572859d6 (diff) | |
download | opie-e2186a49cb5cbdf01b56f57818a15a760ff25b2e.zip opie-e2186a49cb5cbdf01b56f57818a15a760ff25b2e.tar.gz opie-e2186a49cb5cbdf01b56f57818a15a760ff25b2e.tar.bz2 |
Added support for client side scaling of the screen. Slow, but sometimes usable.
Diffstat (limited to 'noncore/comm/keypebble/krfbcanvas.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/krfbcanvas.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/comm/keypebble/krfbcanvas.cpp b/noncore/comm/keypebble/krfbcanvas.cpp index 8b56795..896de7f 100644 --- a/noncore/comm/keypebble/krfbcanvas.cpp +++ b/noncore/comm/keypebble/krfbcanvas.cpp @@ -13,25 +13,26 @@ #include <qapplication.h> #include <qmainwindow.h> #include <qiconset.h> KRFBCanvas::KRFBCanvas( QWidget *parent, const char *name ) : QScrollView( parent, name ) { connection_ = new KRFBConnection(); connect( connection_, SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) ); loggedIn_ = false; - QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold); + + //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold); viewport()->setFocusPolicy( QWidget::StrongFocus ); viewport()->setFocus(); } KRFBCanvas::~KRFBCanvas() { } void KRFBCanvas::openConnection(KRFBServer server) { @@ -95,24 +96,26 @@ void KRFBCanvas::loggedIn() this, SLOT( viewportUpdate(int,int,int,int) ) ); connect( connection_->buffer(), SIGNAL( bell() ), this, SLOT( bell() ) ); connect( qApp->clipboard(), SIGNAL( dataChanged() ), this, SLOT( clipboardChanged() ) ); } void KRFBCanvas::viewportPaintEvent( QPaintEvent *e ) { QRect r = e->rect(); if ( loggedIn_ ) { + QPixmap p; + bitBlt( viewport(), r.x(), r.y(), connection_->buffer()->pixmap(), r.x() + contentsX(), r.y() + contentsY(), r.width(), r.height() ); } else { QScrollView::viewportPaintEvent( e ); } } void KRFBCanvas::viewportUpdate( int x, int y, int w, int h ) { |