From 605d854057eb470a1d75210193b82eb0b1ad6b53 Mon Sep 17 00:00:00 2001 From: treke Date: Wed, 04 Sep 2002 17:53:12 +0000 Subject: Major modifications to the User Interface 1) Bookmark support added, all options are stored on a per bookmark basis 2) 16 Bit color is now a supported bit depth for the server --- (limited to 'noncore/comm/keypebble/krfbcanvas.cpp') 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,10 +1,10 @@ -#include "kvncconnectdlg.h" #include "krfbconnection.h" #include "krfbcanvas.h" -#include "krfboptions.h" +#include "krfbserver.h" #include "krfbbuffer.h" #include +#include #include #include @@ -18,12 +18,11 @@ KRFBCanvas::KRFBCanvas( QWidget *parent, const char *name ) : QScrollView( parent, name ) { connection_ = new KRFBConnection(); - connect( connection_, SIGNAL( passwordRequired( KRFBConnection * ) ), - this, SLOT( passwordRequired( KRFBConnection * ) ) ); connect( connection_, SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) ); loggedIn_ = false; + QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold); viewport()->setFocusPolicy( QWidget::StrongFocus ); viewport()->setFocus(); @@ -33,16 +32,17 @@ 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 ) { if ( loggedIn_ ) { @@ -52,10 +52,8 @@ void KRFBCanvas::openURL( const QUrl &url ) QCString host = url.host().latin1(); int display = url.port(); - if ( url.hasPassword() ) - connection_->setPassword( url.password().latin1() ); - connection_->connectTo( host, display ); +// connection_->connectTo( host, display ); } void KRFBCanvas::closeConnection() @@ -69,10 +67,6 @@ void KRFBCanvas::closeConnection() update(); } -void KRFBCanvas::passwordRequired( KRFBConnection *con ) -{ - con->setPassword( password.latin1() ); -} void KRFBCanvas::bell() { @@ -167,3 +161,12 @@ void KRFBCanvas::clipboardChanged() connection_->sendCutText( qApp->clipboard()->text() ); } } +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)); + } +} -- cgit v0.9.0.2