Diffstat (limited to 'noncore/comm/keypebble/krfbcanvas.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/krfbcanvas.cpp | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/noncore/comm/keypebble/krfbcanvas.cpp b/noncore/comm/keypebble/krfbcanvas.cpp index f74ab7b..8b56795 100644 --- a/noncore/comm/keypebble/krfbcanvas.cpp +++ b/noncore/comm/keypebble/krfbcanvas.cpp @@ -1,5 +1,4 @@ -#include "kvncconnectdlg.h" #include "krfbconnection.h" #include "krfbcanvas.h" -#include "krfboptions.h" +#include "krfbserver.h" #include "krfbbuffer.h" @@ -7,2 +6,3 @@ #include <qpe/config.h> +#include <qpe/qpeapplication.h> @@ -20,4 +20,2 @@ KRFBCanvas::KRFBCanvas( QWidget *parent, const char *name ) connection_ = new KRFBConnection(); - connect( connection_, SIGNAL( passwordRequired( KRFBConnection * ) ), - this, SLOT( passwordRequired( KRFBConnection * ) ) ); connect( connection_, SIGNAL( loggedIn() ), @@ -26,2 +24,3 @@ KRFBCanvas::KRFBCanvas( QWidget *parent, const char *name ) loggedIn_ = false; + QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold); @@ -35,12 +34,13 @@ KRFBCanvas::~KRFBCanvas() -void KRFBCanvas::openConnection() + +void KRFBCanvas::openConnection(KRFBServer server) { - KVNCConnectDlg dlg( connection_, this, "connect dialog" ); - if ( dlg.exec() ) { - QCString host = dlg.hostname().latin1(); - password = dlg.password(); - connection_->connectTo( host, dlg.display() ); - } + + + QCString host = server.hostname.latin1(); + password=server.password; + connection_->connectTo( server); } + void KRFBCanvas::openURL( const QUrl &url ) @@ -54,6 +54,4 @@ void KRFBCanvas::openURL( const QUrl &url ) int display = url.port(); - if ( url.hasPassword() ) - connection_->setPassword( url.password().latin1() ); - connection_->connectTo( host, display ); +// connection_->connectTo( host, display ); } @@ -71,6 +69,2 @@ void KRFBCanvas::closeConnection() -void KRFBCanvas::passwordRequired( KRFBConnection *con ) -{ - con->setPassword( password.latin1() ); -} @@ -169 +163,10 @@ void KRFBCanvas::clipboardChanged() } +void KRFBCanvas::sendCtlAltDel( void) +{ + + qDebug("Here"); + if ( loggedIn_ ) { + connection_->buffer()->keyPressEvent( &QKeyEvent(QEvent::KeyPress,Qt::Key_Delete, 0x7f,ControlButton|AltButton)); + // connection_->buffer()->keyPressEvent( &QKeyEvent(QEvent::KeyRelease,Qt::Key_Delete, 0x7f,ControlButton|AltButton)); + } +} |