author | treke <treke> | 2002-09-04 17:53:12 (UTC) |
---|---|---|
committer | treke <treke> | 2002-09-04 17:53:12 (UTC) |
commit | 605d854057eb470a1d75210193b82eb0b1ad6b53 (patch) (unidiff) | |
tree | c411b661d5211fefbd83a7c8f63eef8c9cca72ee /noncore/comm/keypebble/krfbcanvas.cpp | |
parent | c35a5eabd8f5ed18e4216f6c88ee6794bacfb491 (diff) | |
download | opie-605d854057eb470a1d75210193b82eb0b1ad6b53.zip opie-605d854057eb470a1d75210193b82eb0b1ad6b53.tar.gz opie-605d854057eb470a1d75210193b82eb0b1ad6b53.tar.bz2 |
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
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,10 +1,10 @@ | |||
1 | #include "kvncconnectdlg.h" | ||
2 | #include "krfbconnection.h" | 1 | #include "krfbconnection.h" |
3 | #include "krfbcanvas.h" | 2 | #include "krfbcanvas.h" |
4 | #include "krfboptions.h" | 3 | #include "krfbserver.h" |
5 | #include "krfbbuffer.h" | 4 | #include "krfbbuffer.h" |
6 | 5 | ||
7 | #include <qpe/config.h> | 6 | #include <qpe/config.h> |
7 | #include <qpe/qpeapplication.h> | ||
8 | 8 | ||
9 | #include <qapplication.h> | 9 | #include <qapplication.h> |
10 | #include <qclipboard.h> | 10 | #include <qclipboard.h> |
@@ -18,12 +18,11 @@ KRFBCanvas::KRFBCanvas( QWidget *parent, const char *name ) | |||
18 | : QScrollView( parent, name ) | 18 | : QScrollView( parent, name ) |
19 | { | 19 | { |
20 | connection_ = new KRFBConnection(); | 20 | connection_ = new KRFBConnection(); |
21 | connect( connection_, SIGNAL( passwordRequired( KRFBConnection * ) ), | ||
22 | this, SLOT( passwordRequired( KRFBConnection * ) ) ); | ||
23 | connect( connection_, SIGNAL( loggedIn() ), | 21 | connect( connection_, SIGNAL( loggedIn() ), |
24 | this, SLOT( loggedIn() ) ); | 22 | this, SLOT( loggedIn() ) ); |
25 | 23 | ||
26 | loggedIn_ = false; | 24 | loggedIn_ = false; |
25 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold); | ||
27 | 26 | ||
28 | viewport()->setFocusPolicy( QWidget::StrongFocus ); | 27 | viewport()->setFocusPolicy( QWidget::StrongFocus ); |
29 | viewport()->setFocus(); | 28 | viewport()->setFocus(); |
@@ -33,16 +32,17 @@ KRFBCanvas::~KRFBCanvas() | |||
33 | { | 32 | { |
34 | } | 33 | } |
35 | 34 | ||
36 | void KRFBCanvas::openConnection() | 35 | |
36 | void KRFBCanvas::openConnection(KRFBServer server) | ||
37 | { | 37 | { |
38 | KVNCConnectDlg dlg( connection_, this, "connect dialog" ); | 38 | |
39 | if ( dlg.exec() ) { | 39 | |
40 | QCString host = dlg.hostname().latin1(); | 40 | QCString host = server.hostname.latin1(); |
41 | password = dlg.password(); | 41 | password=server.password; |
42 | connection_->connectTo( host, dlg.display() ); | 42 | connection_->connectTo( server); |
43 | } | ||
44 | } | 43 | } |
45 | 44 | ||
45 | |||
46 | void KRFBCanvas::openURL( const QUrl &url ) | 46 | void KRFBCanvas::openURL( const QUrl &url ) |
47 | { | 47 | { |
48 | if ( loggedIn_ ) { | 48 | if ( loggedIn_ ) { |
@@ -52,10 +52,8 @@ void KRFBCanvas::openURL( const QUrl &url ) | |||
52 | 52 | ||
53 | QCString host = url.host().latin1(); | 53 | QCString host = url.host().latin1(); |
54 | int display = url.port(); | 54 | int display = url.port(); |
55 | if ( url.hasPassword() ) | ||
56 | connection_->setPassword( url.password().latin1() ); | ||
57 | 55 | ||
58 | connection_->connectTo( host, display ); | 56 | // connection_->connectTo( host, display ); |
59 | } | 57 | } |
60 | 58 | ||
61 | void KRFBCanvas::closeConnection() | 59 | void KRFBCanvas::closeConnection() |
@@ -69,10 +67,6 @@ void KRFBCanvas::closeConnection() | |||
69 | update(); | 67 | update(); |
70 | } | 68 | } |
71 | 69 | ||
72 | void KRFBCanvas::passwordRequired( KRFBConnection *con ) | ||
73 | { | ||
74 | con->setPassword( password.latin1() ); | ||
75 | } | ||
76 | 70 | ||
77 | void KRFBCanvas::bell() | 71 | void KRFBCanvas::bell() |
78 | { | 72 | { |
@@ -167,3 +161,12 @@ void KRFBCanvas::clipboardChanged() | |||
167 | connection_->sendCutText( qApp->clipboard()->text() ); | 161 | connection_->sendCutText( qApp->clipboard()->text() ); |
168 | } | 162 | } |
169 | } | 163 | } |
164 | void KRFBCanvas::sendCtlAltDel( void) | ||
165 | { | ||
166 | |||
167 | qDebug("Here"); | ||
168 | if ( loggedIn_ ) { | ||
169 | connection_->buffer()->keyPressEvent( &QKeyEvent(QEvent::KeyPress,Qt::Key_Delete, 0x7f,ControlButton|AltButton)); | ||
170 | // connection_->buffer()->keyPressEvent( &QKeyEvent(QEvent::KeyRelease,Qt::Key_Delete, 0x7f,ControlButton|AltButton)); | ||
171 | } | ||
172 | } | ||