-rw-r--r-- | noncore/comm/keypebble/krfbbuffer.cpp | 17 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbcanvas.cpp | 5 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbdecoder.cpp | 7 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbdecoder.h | 5 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbserver.cpp | 2 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbserver.h | 1 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvnc.cpp | 8 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvnc.h | 3 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvncbookmarkdlg.cpp | 3 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvncconndlg.cpp | 21 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvncconndlg.h | 1 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvncconndlgbase.ui | 752 |
12 files changed, 461 insertions, 364 deletions
diff --git a/noncore/comm/keypebble/krfbbuffer.cpp b/noncore/comm/keypebble/krfbbuffer.cpp index 5a52f31..f1cb929 100644 --- a/noncore/comm/keypebble/krfbbuffer.cpp +++ b/noncore/comm/keypebble/krfbbuffer.cpp | |||
@@ -1,32 +1,34 @@ | |||
1 | #include <assert.h> | 1 | #include <assert.h> |
2 | #include <qpixmap.h> | 2 | #include <qpixmap.h> |
3 | #include <qbrush.h> | 3 | #include <qbrush.h> |
4 | #include <qimage.h> | 4 | #include <qimage.h> |
5 | #include <qpainter.h> | 5 | #include <qpainter.h> |
6 | #include <qapplication.h> | 6 | #include <qapplication.h> |
7 | #include "krfbdecoder.h" | 7 | #include "krfbdecoder.h" |
8 | #include "krfbbuffer.h" | 8 | #include "krfbbuffer.h" |
9 | #include "krfbconnection.h" | ||
10 | #include "krfbserver.h" | ||
9 | #include "krfbserverinfo.h" | 11 | #include "krfbserverinfo.h" |
10 | 12 | ||
11 | // | 13 | // |
12 | // Endian stuff | 14 | // Endian stuff |
13 | // | 15 | // |
14 | #ifndef KDE_USE_FINAL | 16 | #ifndef KDE_USE_FINAL |
15 | const int endianTest = 1; | 17 | const int endianTest = 1; |
16 | #endif | 18 | #endif |
17 | 19 | ||
18 | #define Swap16IfLE(s) \ | 20 | #define Swap16IfLE(s) \ |
19 | (*(char *)&endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s)) | 21 | (*(char *)&endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s)) |
20 | 22 | ||
21 | #define Swap32IfLE(l) \ | 23 | #define Swap32IfLE(l) \ |
22 | (*(char *)&endianTest ? ((((l) & 0xff000000) >> 24) | \ | 24 | (*(char *)&endianTest ? ((((l) & 0xff000000) >> 24) | \ |
23 | (((l) & 0x00ff0000) >> 8) | \ | 25 | (((l) & 0x00ff0000) >> 8) | \ |
24 | (((l) & 0x0000ff00) << 8) | \ | 26 | (((l) & 0x0000ff00) << 8) | \ |
25 | (((l) & 0x000000ff) << 24)) : (l)) | 27 | (((l) & 0x000000ff) << 24)) : (l)) |
26 | 28 | ||
27 | KRFBBuffer::KRFBBuffer( KRFBDecoder *decoder, | 29 | KRFBBuffer::KRFBBuffer( KRFBDecoder *decoder, |
28 | QObject *parent, const char *name ) | 30 | QObject *parent, const char *name ) |
29 | : QObject( parent, name ) | 31 | : QObject( parent, name ) |
30 | { | 32 | { |
31 | assert( decoder ); | 33 | assert( decoder ); |
32 | this->decoder = decoder; | 34 | this->decoder = decoder; |
@@ -65,60 +67,62 @@ void KRFBBuffer::keyPressEvent( QKeyEvent *e ) | |||
65 | qWarning( "Buffer got a key" ); | 67 | qWarning( "Buffer got a key" ); |
66 | 68 | ||
67 | decoder->sendKeyPressEvent( e ); | 69 | decoder->sendKeyPressEvent( e ); |
68 | } | 70 | } |
69 | 71 | ||
70 | void KRFBBuffer::keyReleaseEvent( QKeyEvent *e ) | 72 | void KRFBBuffer::keyReleaseEvent( QKeyEvent *e ) |
71 | { | 73 | { |
72 | decoder->sendKeyReleaseEvent( e ); | 74 | decoder->sendKeyReleaseEvent( e ); |
73 | } | 75 | } |
74 | 76 | ||
75 | void KRFBBuffer::copyRect( int srcX, int srcY, | 77 | void KRFBBuffer::copyRect( int srcX, int srcY, |
76 | int destX, int destY, int w, int h ) | 78 | int destX, int destY, int w, int h ) |
77 | { | 79 | { |
78 | // qWarning( "Got copy rect" ); | 80 | // qWarning( "Got copy rect" ); |
79 | bitBlt( pix, destX, destY, pix, srcX, srcY, w, h, CopyROP ); | 81 | bitBlt( pix, destX, destY, pix, srcX, srcY, w, h, CopyROP ); |
80 | 82 | ||
81 | emit updated( destX, destY, w, h ); | 83 | emit updated( destX, destY, w, h ); |
82 | } | 84 | } |
83 | 85 | ||
84 | void KRFBBuffer::drawRawRectChunk( void *data, | 86 | void KRFBBuffer::drawRawRectChunk( void *data, |
85 | int x, int y, int w, int h ) | 87 | int x, int y, int w, int h ) |
86 | { | 88 | { |
87 | QImage img( w, h, 32 ); | 89 | QImage img( w, h, 32 ); |
88 | 90 | ||
91 | int scaleFactor=decoder->con->options()->scaleFactor; | ||
89 | int redMax = Swap16IfLE( decoder->format->redMax ); | 92 | int redMax = Swap16IfLE( decoder->format->redMax ); |
90 | int greenMax = Swap16IfLE( decoder->format->greenMax ); | 93 | int greenMax = Swap16IfLE( decoder->format->greenMax ); |
91 | int blueMax = Swap16IfLE( decoder->format->blueMax ); | 94 | int blueMax = Swap16IfLE( decoder->format->blueMax ); |
92 | 95 | ||
93 | QPainter p( pix ); | 96 | QPainter p( pix ); |
94 | 97 | ||
95 | if ( decoder->format->bpp == 8 ) { | 98 | if ( decoder->format->bpp == 8 ) { |
96 | uchar *d = (unsigned char *) data; | 99 | uchar *d = (unsigned char *) data; |
97 | 100 | ||
98 | uint r,g,b; | 101 | uint r,g,b; |
99 | 102 | ||
100 | for ( int j = 0; j < h; j++ ) { | 103 | |
104 | for ( int j = 0; j < h; j++) { | ||
101 | for ( int i = 0; i < w ; i++ ) { | 105 | for ( int i = 0; i < w ; i++ ) { |
102 | r = d[ j * w + i ]; | 106 | r = d[ j * w + i ]; |
103 | r = r >> decoder->format->redShift; | 107 | r = r >> decoder->format->redShift; |
104 | r = r & redMax; | 108 | r = r & redMax; |
105 | 109 | ||
106 | g = d[ j * w + i ]; | 110 | g = d[ j * w + i ]; |
107 | g = g >> decoder->format->greenShift; | 111 | g = g >> decoder->format->greenShift; |
108 | g = g & greenMax; | 112 | g = g & greenMax; |
109 | 113 | ||
110 | b = d[ j * w + i ]; | 114 | b = d[ j * w + i ]; |
111 | b = b >> decoder->format->blueShift; | 115 | b = b >> decoder->format->blueShift; |
112 | b = b & blueMax; | 116 | b = b & blueMax; |
113 | 117 | ||
114 | r = ( r * 255 ) / redMax; | 118 | r = ( r * 255 ) / redMax; |
115 | g = ( g * 255 ) / greenMax; | 119 | g = ( g * 255 ) / greenMax; |
116 | b = ( b * 255 ) / blueMax; | 120 | b = ( b * 255 ) / blueMax; |
117 | 121 | ||
118 | uint *p = ( uint * ) img.scanLine( j ) + i; | 122 | uint *p = ( uint * ) img.scanLine( j ) + i; |
119 | *p = qRgb( r,g,b ); | 123 | *p = qRgb( r,g,b ); |
120 | } | 124 | } |
121 | } | 125 | } |
122 | } | 126 | } |
123 | else if ( decoder->format->bpp == 32 ) { | 127 | else if ( decoder->format->bpp == 32 ) { |
124 | ulong *d = (ulong *) data; | 128 | ulong *d = (ulong *) data; |
@@ -166,29 +170,34 @@ void KRFBBuffer::drawRawRectChunk( void *data, | |||
166 | r = r & redMax; | 170 | r = r & redMax; |
167 | 171 | ||
168 | g = pixel; | 172 | g = pixel; |
169 | g = g >> decoder->format->greenShift; | 173 | g = g >> decoder->format->greenShift; |
170 | g = g & greenMax; | 174 | g = g & greenMax; |
171 | 175 | ||
172 | b = pixel; | 176 | b = pixel; |
173 | b = b >> decoder->format->blueShift; | 177 | b = b >> decoder->format->blueShift; |
174 | b = b & blueMax; | 178 | b = b & blueMax; |
175 | 179 | ||
176 | r = ( r * 255 ) / redMax; | 180 | r = ( r * 255 ) / redMax; |
177 | g = ( g * 255 ) / greenMax; | 181 | g = ( g * 255 ) / greenMax; |
178 | b = ( b * 255 ) / blueMax; | 182 | b = ( b * 255 ) / blueMax; |
179 | 183 | ||
180 | ulong *p = ( ulong * ) img.scanLine( j ) + i; | 184 | ulong *p = ( ulong * ) img.scanLine( j ) + i; |
181 | *p = qRgb( r,g,b ); | 185 | *p = qRgb( r,g,b ); |
182 | } | 186 | } |
183 | } | 187 | } |
184 | } | 188 | } |
185 | else { | 189 | else { |
186 | p.setBrush( QBrush( Qt::black ) ); | 190 | p.setBrush( QBrush( Qt::black ) ); |
187 | p.drawRect( x, y, w, h ); | 191 | p.drawRect( x, y, w, h ); |
188 | } | 192 | } |
189 | 193 | ||
190 | p.drawImage( x, y, img ); | 194 | if (scaleFactor > 1) { |
191 | 195 | p.drawImage( x/scaleFactor, y/scaleFactor, img.smoothScale(w/scaleFactor,h/scaleFactor) ); | |
192 | emit updated( x, y, w, h ); | 196 | emit updated( x/scaleFactor, y/scaleFactor, w/scaleFactor, h/scaleFactor ); |
197 | } | ||
198 | else { | ||
199 | p.drawImage( x, y, img); | ||
200 | emit updated( x, y, w, h ); | ||
201 | } | ||
193 | } | 202 | } |
194 | 203 | ||
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 | |||
@@ -1,49 +1,50 @@ | |||
1 | #include "krfbconnection.h" | 1 | #include "krfbconnection.h" |
2 | #include "krfbcanvas.h" | 2 | #include "krfbcanvas.h" |
3 | #include "krfbserver.h" | 3 | #include "krfbserver.h" |
4 | #include "krfbbuffer.h" | 4 | #include "krfbbuffer.h" |
5 | 5 | ||
6 | #include <qpe/config.h> | 6 | #include <qpe/config.h> |
7 | #include <qpe/qpeapplication.h> | 7 | #include <qpe/qpeapplication.h> |
8 | 8 | ||
9 | #include <qapplication.h> | 9 | #include <qapplication.h> |
10 | #include <qclipboard.h> | 10 | #include <qclipboard.h> |
11 | #include <qaction.h> | 11 | #include <qaction.h> |
12 | #include <qpixmap.h> | 12 | #include <qpixmap.h> |
13 | #include <qapplication.h> | 13 | #include <qapplication.h> |
14 | #include <qmainwindow.h> | 14 | #include <qmainwindow.h> |
15 | #include <qiconset.h> | 15 | #include <qiconset.h> |
16 | 16 | ||
17 | KRFBCanvas::KRFBCanvas( QWidget *parent, const char *name ) | 17 | 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( loggedIn() ), | 21 | connect( connection_, SIGNAL( loggedIn() ), |
22 | this, SLOT( loggedIn() ) ); | 22 | this, SLOT( loggedIn() ) ); |
23 | 23 | ||
24 | loggedIn_ = false; | 24 | loggedIn_ = false; |
25 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold); | 25 | |
26 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold); | ||
26 | 27 | ||
27 | viewport()->setFocusPolicy( QWidget::StrongFocus ); | 28 | viewport()->setFocusPolicy( QWidget::StrongFocus ); |
28 | viewport()->setFocus(); | 29 | viewport()->setFocus(); |
29 | } | 30 | } |
30 | 31 | ||
31 | KRFBCanvas::~KRFBCanvas() | 32 | KRFBCanvas::~KRFBCanvas() |
32 | { | 33 | { |
33 | } | 34 | } |
34 | 35 | ||
35 | 36 | ||
36 | void KRFBCanvas::openConnection(KRFBServer server) | 37 | void KRFBCanvas::openConnection(KRFBServer server) |
37 | { | 38 | { |
38 | 39 | ||
39 | 40 | ||
40 | QCString host = server.hostname.latin1(); | 41 | QCString host = server.hostname.latin1(); |
41 | password=server.password; | 42 | password=server.password; |
42 | connection_->connectTo( server); | 43 | connection_->connectTo( server); |
43 | } | 44 | } |
44 | 45 | ||
45 | 46 | ||
46 | void KRFBCanvas::openURL( const QUrl &url ) | 47 | void KRFBCanvas::openURL( const QUrl &url ) |
47 | { | 48 | { |
48 | if ( loggedIn_ ) { | 49 | if ( loggedIn_ ) { |
49 | qWarning( "openURL invoked when logged in\n" ); | 50 | qWarning( "openURL invoked when logged in\n" ); |
@@ -83,48 +84,50 @@ void KRFBCanvas::loggedIn() | |||
83 | // | 84 | // |
84 | // Get ready for action | 85 | // Get ready for action |
85 | // | 86 | // |
86 | loggedIn_ = true; | 87 | loggedIn_ = true; |
87 | viewport()->setMouseTracking( true ); | 88 | viewport()->setMouseTracking( true ); |
88 | viewport()->setBackgroundMode( NoBackground ); | 89 | viewport()->setBackgroundMode( NoBackground ); |
89 | setBackgroundMode( NoBackground ); | 90 | setBackgroundMode( NoBackground ); |
90 | 91 | ||
91 | // Start using the buffer | 92 | // Start using the buffer |
92 | connect( connection_->buffer(), SIGNAL( sizeChanged( int, int ) ), | 93 | connect( connection_->buffer(), SIGNAL( sizeChanged( int, int ) ), |
93 | this, SLOT( resizeContents(int,int) ) ); | 94 | this, SLOT( resizeContents(int,int) ) ); |
94 | connect( connection_->buffer(), SIGNAL( updated( int, int, int, int ) ), | 95 | connect( connection_->buffer(), SIGNAL( updated( int, int, int, int ) ), |
95 | this, SLOT( viewportUpdate(int,int,int,int) ) ); | 96 | this, SLOT( viewportUpdate(int,int,int,int) ) ); |
96 | connect( connection_->buffer(), SIGNAL( bell() ), | 97 | connect( connection_->buffer(), SIGNAL( bell() ), |
97 | this, SLOT( bell() ) ); | 98 | this, SLOT( bell() ) ); |
98 | connect( qApp->clipboard(), SIGNAL( dataChanged() ), | 99 | connect( qApp->clipboard(), SIGNAL( dataChanged() ), |
99 | this, SLOT( clipboardChanged() ) ); | 100 | this, SLOT( clipboardChanged() ) ); |
100 | } | 101 | } |
101 | 102 | ||
102 | void KRFBCanvas::viewportPaintEvent( QPaintEvent *e ) | 103 | void KRFBCanvas::viewportPaintEvent( QPaintEvent *e ) |
103 | { | 104 | { |
104 | QRect r = e->rect(); | 105 | QRect r = e->rect(); |
105 | 106 | ||
106 | if ( loggedIn_ ) { | 107 | if ( loggedIn_ ) { |
108 | QPixmap p; | ||
109 | |||
107 | bitBlt( viewport(), r.x(), r.y(), | 110 | bitBlt( viewport(), r.x(), r.y(), |
108 | connection_->buffer()->pixmap(), | 111 | connection_->buffer()->pixmap(), |
109 | r.x() + contentsX(), r.y() + contentsY(), | 112 | r.x() + contentsX(), r.y() + contentsY(), |
110 | r.width(), r.height() ); | 113 | r.width(), r.height() ); |
111 | } | 114 | } |
112 | else { | 115 | else { |
113 | QScrollView::viewportPaintEvent( e ); | 116 | QScrollView::viewportPaintEvent( e ); |
114 | } | 117 | } |
115 | } | 118 | } |
116 | 119 | ||
117 | void KRFBCanvas::viewportUpdate( int x, int y, int w, int h ) | 120 | void KRFBCanvas::viewportUpdate( int x, int y, int w, int h ) |
118 | { | 121 | { |
119 | updateContents( x, y, w, h ); | 122 | updateContents( x, y, w, h ); |
120 | } | 123 | } |
121 | 124 | ||
122 | void KRFBCanvas::contentsMousePressEvent( QMouseEvent *e ) | 125 | void KRFBCanvas::contentsMousePressEvent( QMouseEvent *e ) |
123 | { | 126 | { |
124 | if ( loggedIn_ ) | 127 | if ( loggedIn_ ) |
125 | connection_->buffer()->mouseEvent( e ); | 128 | connection_->buffer()->mouseEvent( e ); |
126 | } | 129 | } |
127 | 130 | ||
128 | void KRFBCanvas::contentsMouseReleaseEvent( QMouseEvent *e ) | 131 | void KRFBCanvas::contentsMouseReleaseEvent( QMouseEvent *e ) |
129 | { | 132 | { |
130 | if ( loggedIn_ ) | 133 | if ( loggedIn_ ) |
diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp index a964c09..94e3b79 100644 --- a/noncore/comm/keypebble/krfbdecoder.cpp +++ b/noncore/comm/keypebble/krfbdecoder.cpp | |||
@@ -174,49 +174,49 @@ void KRFBDecoder::gotServerInit() | |||
174 | con->read( &(info->redMax), 2 ); | 174 | con->read( &(info->redMax), 2 ); |
175 | info->redMax = Swap16IfLE( info->redMax ); | 175 | info->redMax = Swap16IfLE( info->redMax ); |
176 | con->read( &(info->greenMax), 2 ); | 176 | con->read( &(info->greenMax), 2 ); |
177 | info->greenMax = Swap16IfLE( info->greenMax ); | 177 | info->greenMax = Swap16IfLE( info->greenMax ); |
178 | con->read( &(info->blueMax), 2 ); | 178 | con->read( &(info->blueMax), 2 ); |
179 | info->blueMax = Swap16IfLE( info->blueMax ); | 179 | info->blueMax = Swap16IfLE( info->blueMax ); |
180 | 180 | ||
181 | con->read( &(info->redShift), 1 ); | 181 | con->read( &(info->redShift), 1 ); |
182 | con->read( &(info->greenShift), 1 ); | 182 | con->read( &(info->greenShift), 1 ); |
183 | con->read( &(info->blueShift), 1 ); | 183 | con->read( &(info->blueShift), 1 ); |
184 | 184 | ||
185 | con->read( info->padding, 3 ); | 185 | con->read( info->padding, 3 ); |
186 | 186 | ||
187 | con->read( &(info->nameLength), 4 ); | 187 | con->read( &(info->nameLength), 4 ); |
188 | info->nameLength = Swap32IfLE( info->nameLength ); | 188 | info->nameLength = Swap32IfLE( info->nameLength ); |
189 | 189 | ||
190 | qWarning( "Width = %d, Height = %d", info->width, info->height ); | 190 | qWarning( "Width = %d, Height = %d", info->width, info->height ); |
191 | qWarning( "Bpp = %d, Depth = %d, Big = %d, True = %d", | 191 | qWarning( "Bpp = %d, Depth = %d, Big = %d, True = %d", |
192 | info->bpp, info->depth, info->bigEndian, info->trueColor ); | 192 | info->bpp, info->depth, info->bigEndian, info->trueColor ); |
193 | qWarning( "RedMax = %d, GreenMax = %d, BlueMax = %d", | 193 | qWarning( "RedMax = %d, GreenMax = %d, BlueMax = %d", |
194 | info->redMax, info->greenMax, info->blueMax ); | 194 | info->redMax, info->greenMax, info->blueMax ); |
195 | qWarning( "RedShift = %d, GreenShift = %d, BlueShift = %d", | 195 | qWarning( "RedShift = %d, GreenShift = %d, BlueShift = %d", |
196 | info->redShift, info->greenShift,info-> blueShift ); | 196 | info->redShift, info->greenShift,info-> blueShift ); |
197 | 197 | ||
198 | buf->resize( info->width, info->height ); | 198 | buf->resize( info->width/con->options()->scaleFactor, info->height /con->options()->scaleFactor); |
199 | 199 | ||
200 | // Wait for desktop name | 200 | // Wait for desktop name |
201 | qWarning( "Waiting for desktop name" ); | 201 | qWarning( "Waiting for desktop name" ); |
202 | 202 | ||
203 | static QString statusMsg = tr( "Waiting for desktop name..." ); | 203 | static QString statusMsg = tr( "Waiting for desktop name..." ); |
204 | emit status( statusMsg ); | 204 | emit status( statusMsg ); |
205 | 205 | ||
206 | currentState = AwaitingDesktopName; | 206 | currentState = AwaitingDesktopName; |
207 | connect( con, SIGNAL( gotEnoughData() ), SLOT( gotDesktopName() ) ); | 207 | connect( con, SIGNAL( gotEnoughData() ), SLOT( gotDesktopName() ) ); |
208 | con->waitForData( info->nameLength ); | 208 | con->waitForData( info->nameLength ); |
209 | } | 209 | } |
210 | 210 | ||
211 | void KRFBDecoder::gotDesktopName() | 211 | void KRFBDecoder::gotDesktopName() |
212 | { | 212 | { |
213 | assert( info ); | 213 | assert( info ); |
214 | assert( currentState == AwaitingDesktopName ); | 214 | assert( currentState == AwaitingDesktopName ); |
215 | 215 | ||
216 | qWarning( "Got desktop name" ); | 216 | qWarning( "Got desktop name" ); |
217 | 217 | ||
218 | disconnect( con, SIGNAL( gotEnoughData() ), | 218 | disconnect( con, SIGNAL( gotEnoughData() ), |
219 | this, SLOT( gotDesktopName() ) ); | 219 | this, SLOT( gotDesktopName() ) ); |
220 | 220 | ||
221 | char *buf = new char[ info->nameLength + 1 ]; | 221 | char *buf = new char[ info->nameLength + 1 ]; |
222 | CHECK_PTR( buf ); | 222 | CHECK_PTR( buf ); |
@@ -621,50 +621,51 @@ void KRFBDecoder::handleHexTileRect() | |||
621 | 621 | ||
622 | void KRFBDecoder::sendMouseEvent( QMouseEvent *e ) | 622 | void KRFBDecoder::sendMouseEvent( QMouseEvent *e ) |
623 | { | 623 | { |
624 | // Deal with the buttons | 624 | // Deal with the buttons |
625 | if ( e->type() != QEvent::MouseMove ) { | 625 | if ( e->type() != QEvent::MouseMove ) { |
626 | buttonMask = 0; | 626 | buttonMask = 0; |
627 | if ( e->type() == QEvent::MouseButtonPress ) { | 627 | if ( e->type() == QEvent::MouseButtonPress ) { |
628 | if ( e->button() & LeftButton ) | 628 | if ( e->button() & LeftButton ) |
629 | buttonMask |= 0x01; | 629 | buttonMask |= 0x01; |
630 | if ( e->button() & MidButton ) | 630 | if ( e->button() & MidButton ) |
631 | buttonMask |= 0x04; | 631 | buttonMask |= 0x04; |
632 | if ( e->button() & RightButton ) | 632 | if ( e->button() & RightButton ) |
633 | buttonMask |= 0x02; | 633 | buttonMask |= 0x02; |
634 | } | 634 | } |
635 | else if ( e->type() == QEvent::MouseButtonRelease ) { | 635 | else if ( e->type() == QEvent::MouseButtonRelease ) { |
636 | if ( e->button() & LeftButton ) | 636 | if ( e->button() & LeftButton ) |
637 | buttonMask &= 0x06; | 637 | buttonMask &= 0x06; |
638 | if ( e->button() & MidButton ) | 638 | if ( e->button() & MidButton ) |
639 | buttonMask |= 0x03; | 639 | buttonMask |= 0x03; |
640 | if ( e->button() & RightButton ) | 640 | if ( e->button() & RightButton ) |
641 | buttonMask |= 0x05; | 641 | buttonMask |= 0x05; |
642 | } | 642 | } |
643 | } | 643 | } |
644 | 644 | ||
645 | CARD16 x = Swap16IfLE( e->x() ); | 645 | // HACK: Scaling |
646 | CARD16 y = Swap16IfLE( e->y() ); | 646 | CARD16 x = Swap16IfLE( e->x() * con->options()->scaleFactor ); |
647 | CARD16 y = Swap16IfLE( e->y() *con->options()->scaleFactor ); | ||
647 | 648 | ||
648 | con->write( &PointerEventId, 1 ); | 649 | con->write( &PointerEventId, 1 ); |
649 | con->write( &buttonMask, 1 ); | 650 | con->write( &buttonMask, 1 ); |
650 | con->write( &x, 2 ); | 651 | con->write( &x, 2 ); |
651 | con->write( &y, 2 ); | 652 | con->write( &y, 2 ); |
652 | } | 653 | } |
653 | 654 | ||
654 | 655 | ||
655 | void KRFBDecoder::sendCutEvent( const QString &unicode ) | 656 | void KRFBDecoder::sendCutEvent( const QString &unicode ) |
656 | { | 657 | { |
657 | // | 658 | // |
658 | // Warning: There is a bug in the RFB protocol because there is no way to find | 659 | // Warning: There is a bug in the RFB protocol because there is no way to find |
659 | // out the codepage in use on the remote machine. This could be fixed by requiring | 660 | // out the codepage in use on the remote machine. This could be fixed by requiring |
660 | // the remote server to use utf8 etc. but for now we have to assume they're the | 661 | // the remote server to use utf8 etc. but for now we have to assume they're the |
661 | // same. I've reported this problem to the ORL guys, but they apparantly have no | 662 | // same. I've reported this problem to the ORL guys, but they apparantly have no |
662 | // immediate plans to fix the issue. :-( (rich) | 663 | // immediate plans to fix the issue. :-( (rich) |
663 | // | 664 | // |
664 | 665 | ||
665 | CARD8 padding[3]; | 666 | CARD8 padding[3]; |
666 | QCString text = unicode.local8Bit(); | 667 | QCString text = unicode.local8Bit(); |
667 | CARD32 length = text.length(); | 668 | CARD32 length = text.length(); |
668 | length = Swap32IfLE( length ); | 669 | length = Swap32IfLE( length ); |
669 | 670 | ||
670 | con->write( &ClientCutTextId, 1 ); | 671 | con->write( &ClientCutTextId, 1 ); |
diff --git a/noncore/comm/keypebble/krfbdecoder.h b/noncore/comm/keypebble/krfbdecoder.h index 4ba0185..db6271d 100644 --- a/noncore/comm/keypebble/krfbdecoder.h +++ b/noncore/comm/keypebble/krfbdecoder.h | |||
@@ -77,58 +77,59 @@ protected: | |||
77 | void handleRawRect(); | 77 | void handleRawRect(); |
78 | void handleCopyRect(); | 78 | void handleCopyRect(); |
79 | void handleRRERect(); | 79 | void handleRRERect(); |
80 | void handleCoRRERect(); | 80 | void handleCoRRERect(); |
81 | void handleHexTileRect(); | 81 | void handleHexTileRect(); |
82 | 82 | ||
83 | void getRawRectChunk( int lines ); | 83 | void getRawRectChunk( int lines ); |
84 | 84 | ||
85 | protected slots: | 85 | protected slots: |
86 | void gotServerInit(); | 86 | void gotServerInit(); |
87 | void gotDesktopName(); | 87 | void gotDesktopName(); |
88 | void gotUpdateHeader(); | 88 | void gotUpdateHeader(); |
89 | void gotRectHeader(); | 89 | void gotRectHeader(); |
90 | void gotRawRectChunk(); | 90 | void gotRawRectChunk(); |
91 | void gotCopyRectPos(); | 91 | void gotCopyRectPos(); |
92 | void gotServerCut(); | 92 | void gotServerCut(); |
93 | void gotServerCutLength(); | 93 | void gotServerCutLength(); |
94 | void gotServerCutText(); | 94 | void gotServerCutText(); |
95 | void gotBell(); | 95 | void gotBell(); |
96 | 96 | ||
97 | signals: | 97 | signals: |
98 | void error( const QString & ); | 98 | void error( const QString & ); |
99 | void status( const QString & ); | 99 | void status( const QString & ); |
100 | 100 | ||
101 | protected: | ||
102 | /** The connection to the server. */ | ||
103 | KRFBConnection *con; | ||
101 | private: | 104 | private: |
102 | State currentState; | 105 | State currentState; |
103 | 106 | ||
104 | // Used to store the state we were in before a cut or bell msg | 107 | // Used to store the state we were in before a cut or bell msg |
105 | State oldState; | 108 | State oldState; |
106 | 109 | ||
107 | // The number of rects we're expecting | 110 | // The number of rects we're expecting |
108 | CARD16 noRects; | 111 | CARD16 noRects; |
109 | 112 | ||
110 | // | 113 | // |
111 | // Info about the current rect. | 114 | // Info about the current rect. |
112 | // | 115 | // |
113 | CARD16 x, y, w, h; | 116 | CARD16 x, y, w, h; |
114 | int lines; | 117 | int lines; |
115 | CARD32 encoding; | 118 | CARD32 encoding; |
116 | 119 | ||
117 | CARD32 serverCutTextLen; | 120 | CARD32 serverCutTextLen; |
118 | 121 | ||
119 | /** Where we draw the data (and the source of our events). */ | 122 | /** Where we draw the data (and the source of our events). */ |
120 | KRFBBuffer *buf; | 123 | KRFBBuffer *buf; |
121 | /** The connection to the server. */ | ||
122 | KRFBConnection *con; | ||
123 | 124 | ||
124 | /** Info about the RFB server. */ | 125 | /** Info about the RFB server. */ |
125 | KRFBServerInfo *info; | 126 | KRFBServerInfo *info; |
126 | /** The pixel format we want. */ | 127 | /** The pixel format we want. */ |
127 | KRFBPixelFormat *format; | 128 | KRFBPixelFormat *format; |
128 | 129 | ||
129 | CARD8 buttonMask; | 130 | CARD8 buttonMask; |
130 | }; | 131 | }; |
131 | 132 | ||
132 | #endif // KRFBDECODER_H | 133 | #endif // KRFBDECODER_H |
133 | 134 | ||
134 | 135 | ||
diff --git a/noncore/comm/keypebble/krfbserver.cpp b/noncore/comm/keypebble/krfbserver.cpp index 5775f09..b47534e 100644 --- a/noncore/comm/keypebble/krfbserver.cpp +++ b/noncore/comm/keypebble/krfbserver.cpp | |||
@@ -1,35 +1,37 @@ | |||
1 | #include <qpe/config.h> | 1 | #include <qpe/config.h> |
2 | #include <qpe/qpeapplication.h> | 2 | #include <qpe/qpeapplication.h> |
3 | #include "krfbserver.h" | 3 | #include "krfbserver.h" |
4 | 4 | ||
5 | KRFBServer::KRFBServer() | 5 | KRFBServer::KRFBServer() |
6 | { | 6 | { |
7 | QString name; | 7 | QString name; |
8 | QString hostname; | 8 | QString hostname; |
9 | QString password; | 9 | QString password; |
10 | display=0; | 10 | display=0; |
11 | 11 | ||
12 | scaleFactor=1; | ||
13 | |||
12 | hexTile=0; | 14 | hexTile=0; |
13 | corre=0; | 15 | corre=0; |
14 | rre=0; | 16 | rre=0; |
15 | copyrect=1; | 17 | copyrect=1; |
16 | 18 | ||
17 | colors256=1; | 19 | colors256=1; |
18 | shared=0; | 20 | shared=0; |
19 | readOnly=0; | 21 | readOnly=0; |
20 | deIconify=0; | 22 | deIconify=0; |
21 | 23 | ||
22 | updateRate=0; | 24 | updateRate=0; |
23 | } | 25 | } |
24 | KRFBServer::~KRFBServer() | 26 | KRFBServer::~KRFBServer() |
25 | { | 27 | { |
26 | } | 28 | } |
27 | 29 | ||
28 | int KRFBServer::encodings() | 30 | int KRFBServer::encodings() |
29 | { | 31 | { |
30 | // Initially one because we always support raw encoding | 32 | // Initially one because we always support raw encoding |
31 | int count = 1; | 33 | int count = 1; |
32 | 34 | ||
33 | count += hexTile ? 1 : 0; | 35 | count += hexTile ? 1 : 0; |
34 | count += corre ? 1 : 0; | 36 | count += corre ? 1 : 0; |
35 | count += rre ? 1 : 0; | 37 | count += rre ? 1 : 0; |
diff --git a/noncore/comm/keypebble/krfbserver.h b/noncore/comm/keypebble/krfbserver.h index f87eecc..e38e2d2 100644 --- a/noncore/comm/keypebble/krfbserver.h +++ b/noncore/comm/keypebble/krfbserver.h | |||
@@ -8,27 +8,28 @@ class Config; | |||
8 | class KRFBServer | 8 | class KRFBServer |
9 | { | 9 | { |
10 | public: | 10 | public: |
11 | KRFBServer(); | 11 | KRFBServer(); |
12 | ~KRFBServer(); | 12 | ~KRFBServer(); |
13 | 13 | ||
14 | int encodings(); | 14 | int encodings(); |
15 | 15 | ||
16 | QString name; | 16 | QString name; |
17 | QString hostname; | 17 | QString hostname; |
18 | QString password; | 18 | QString password; |
19 | int display; | 19 | int display; |
20 | 20 | ||
21 | bool hexTile; | 21 | bool hexTile; |
22 | bool corre; | 22 | bool corre; |
23 | bool rre; | 23 | bool rre; |
24 | bool copyrect; | 24 | bool copyrect; |
25 | 25 | ||
26 | bool colors256; | 26 | bool colors256; |
27 | bool shared; | 27 | bool shared; |
28 | bool readOnly; | 28 | bool readOnly; |
29 | bool deIconify; | 29 | bool deIconify; |
30 | 30 | ||
31 | int updateRate; | 31 | int updateRate; |
32 | int scaleFactor; | ||
32 | }; | 33 | }; |
33 | 34 | ||
34 | #endif // KRFBOPTIONS_H | 35 | #endif // KRFBOPTIONS_H |
diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp index aa46e2f..b173004 100644 --- a/noncore/comm/keypebble/kvnc.cpp +++ b/noncore/comm/keypebble/kvnc.cpp | |||
@@ -51,69 +51,73 @@ static char * menu_xpm[] = { | |||
51 | " .+@#. ", | 51 | " .+@#. ", |
52 | " .+#. ", | 52 | " .+#. ", |
53 | " .+. ", | 53 | " .+. ", |
54 | " .. ", | 54 | " .. ", |
55 | " "}; | 55 | " "}; |
56 | 56 | ||
57 | const int StatusTextId = 0; | 57 | const int StatusTextId = 0; |
58 | 58 | ||
59 | KVNC::KVNC( const char *name ) : QMainWindow( 0, name ) | 59 | KVNC::KVNC( const char *name ) : QMainWindow( 0, name ) |
60 | { | 60 | { |
61 | setCaption( tr("VNC Viewer") ); | 61 | setCaption( tr("VNC Viewer") ); |
62 | fullscreen = false; | 62 | fullscreen = false; |
63 | 63 | ||
64 | stack = new QWidgetStack( this ); | 64 | stack = new QWidgetStack( this ); |
65 | setCentralWidget( stack ); | 65 | setCentralWidget( stack ); |
66 | 66 | ||
67 | bookmarkSelector=new KVNCBookmarkDlg(); | 67 | bookmarkSelector=new KVNCBookmarkDlg(); |
68 | stack->addWidget(bookmarkSelector,get_unique_id()); | 68 | stack->addWidget(bookmarkSelector,get_unique_id()); |
69 | stack->raiseWidget( bookmarkSelector ); | 69 | stack->raiseWidget( bookmarkSelector ); |
70 | 70 | ||
71 | canvas = new KRFBCanvas( stack, "canvas" ); | 71 | canvas = new KRFBCanvas( stack, "canvas" ); |
72 | stack->addWidget(canvas,get_unique_id()); | 72 | stack->addWidget(canvas,get_unique_id()); |
73 | setCentralWidget( stack ); | 73 | setCentralWidget( stack ); |
74 | 74 | ||
75 | |||
75 | connect( bookmarkSelector->bookmarkList, SIGNAL(doubleClicked(QListBoxItem *)), | 76 | connect( bookmarkSelector->bookmarkList, SIGNAL(doubleClicked(QListBoxItem *)), |
76 | this, SLOT(openConnection(QListBoxItem *)) ); | 77 | this, SLOT(openConnection(QListBoxItem *)) ); |
77 | connect( canvas->connection(), SIGNAL(statusChanged(const QString &)), | 78 | connect( canvas->connection(), SIGNAL(statusChanged(const QString &)), |
78 | this, SLOT(statusMessage(const QString &)) ); | 79 | this, SLOT(statusMessage(const QString &)) ); |
79 | connect( canvas->connection(), SIGNAL(error(const QString &)), | 80 | connect( canvas->connection(), SIGNAL(error(const QString &)), |
80 | this, SLOT(error(const QString &)) ); | 81 | this, SLOT(error(const QString &)) ); |
81 | connect( canvas->connection(), SIGNAL(connected()), this, SLOT(connected()) ); | 82 | connect( canvas->connection(), SIGNAL(connected()), this, SLOT(connected()) ); |
82 | connect( canvas->connection(), SIGNAL(loggedIn()), this, SLOT(loggedIn()) ); | 83 | connect( canvas->connection(), SIGNAL(loggedIn()), this, SLOT(loggedIn()) ); |
83 | connect( canvas->connection(), SIGNAL(disconnected()), this, SLOT(disconnected()) ); | 84 | connect( canvas->connection(), SIGNAL(disconnected()), this, SLOT(disconnected()) ); |
84 | 85 | ||
85 | setupActions(); | 86 | setupActions(); |
86 | 87 | ||
87 | cornerButton = new QPushButton( this ); | 88 | cornerButton = new QPushButton( this ); |
88 | cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); | 89 | cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); |
89 | connect( cornerButton, SIGNAL(pressed()), this, SLOT(showMenu()) ); | 90 | connect( cornerButton, SIGNAL(pressed()), this, SLOT(showMenu()) ); |
90 | canvas->setCornerWidget( cornerButton ); | 91 | canvas->setCornerWidget( cornerButton ); |
91 | 92 | ||
92 | stack->raiseWidget( bookmarkSelector ); | 93 | stack->raiseWidget( bookmarkSelector ); |
93 | 94 | ||
94 | 95 | ||
95 | QPEToolBar *bar = new QPEToolBar( this ); | 96 | bar= new QToolBar( this ); |
97 | setToolBarsMovable( false ); | ||
98 | setRightJustification(false); | ||
99 | |||
96 | 100 | ||
97 | QAction *n = new QAction( tr( "New Connection" ), Resource::loadPixmap( "new" ), | 101 | QAction *n = new QAction( tr( "New Connection" ), Resource::loadPixmap( "new" ), |
98 | QString::null, 0, this, 0 ); | 102 | QString::null, 0, this, 0 ); |
99 | connect( n, SIGNAL( activated() ), | 103 | connect( n, SIGNAL( activated() ), |
100 | this, SLOT( newConnection() ) ); | 104 | this, SLOT( newConnection() ) ); |
101 | n->addTo( bar ); | 105 | n->addTo( bar ); |
102 | 106 | ||
103 | QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "edit" ), | 107 | QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "edit" ), |
104 | QString::null, 0, this, 0 ); | 108 | QString::null, 0, this, 0 ); |
105 | connect( o, SIGNAL( activated() ), | 109 | connect( o, SIGNAL( activated() ), |
106 | this, SLOT( openConnection() ) ); | 110 | this, SLOT( openConnection() ) ); |
107 | o->addTo( bar ); | 111 | o->addTo( bar ); |
108 | 112 | ||
109 | QAction *d = new QAction( tr( "Delete Bookmark" ), Resource::loadPixmap( "trash" ), | 113 | QAction *d = new QAction( tr( "Delete Bookmark" ), Resource::loadPixmap( "trash" ), |
110 | QString::null, 0, this, 0 ); | 114 | QString::null, 0, this, 0 ); |
111 | connect( d, SIGNAL( activated() ), | 115 | connect( d, SIGNAL( activated() ), |
112 | this, SLOT( deleteBookmark() ) ); | 116 | this, SLOT( deleteBookmark() ) ); |
113 | d->addTo( bar ); | 117 | d->addTo( bar ); |
114 | } | 118 | } |
115 | 119 | ||
116 | KVNC::~KVNC() | 120 | KVNC::~KVNC() |
117 | { | 121 | { |
118 | 122 | ||
119 | } | 123 | } |
@@ -214,59 +218,61 @@ void KVNC::toggleFullScreen() | |||
214 | void KVNC::closeConnection() | 218 | void KVNC::closeConnection() |
215 | { | 219 | { |
216 | if ( fullscreen ) | 220 | if ( fullscreen ) |
217 | toggleFullScreen(); | 221 | toggleFullScreen(); |
218 | canvas->closeConnection(); | 222 | canvas->closeConnection(); |
219 | } | 223 | } |
220 | 224 | ||
221 | void KVNC::showMenu() | 225 | void KVNC::showMenu() |
222 | { | 226 | { |
223 | QPoint pt = mapToGlobal(cornerButton->pos()); | 227 | QPoint pt = mapToGlobal(cornerButton->pos()); |
224 | QSize s = cornerMenu->sizeHint(); | 228 | QSize s = cornerMenu->sizeHint(); |
225 | pt.ry() -= s.height(); | 229 | pt.ry() -= s.height(); |
226 | pt.rx() -= s.width(); | 230 | pt.rx() -= s.width(); |
227 | cornerMenu->popup( pt ); | 231 | cornerMenu->popup( pt ); |
228 | } | 232 | } |
229 | 233 | ||
230 | void KVNC::connected() | 234 | void KVNC::connected() |
231 | { | 235 | { |
232 | static QString msg = tr( "Connected to remote host" ); | 236 | static QString msg = tr( "Connected to remote host" ); |
233 | statusMessage( msg ); | 237 | statusMessage( msg ); |
234 | ctlAltDelAction->setEnabled(true); | 238 | ctlAltDelAction->setEnabled(true); |
235 | disconnectAction->setEnabled( true ); | 239 | disconnectAction->setEnabled( true ); |
236 | fullScreenAction->setEnabled( true ); | 240 | fullScreenAction->setEnabled( true ); |
237 | stack->raiseWidget(canvas); | 241 | stack->raiseWidget(canvas); |
242 | bar->hide(); | ||
238 | } | 243 | } |
239 | 244 | ||
240 | void KVNC::loggedIn() | 245 | void KVNC::loggedIn() |
241 | { | 246 | { |
242 | static QString msg = tr( "Logged in to remote host" ); | 247 | static QString msg = tr( "Logged in to remote host" ); |
243 | statusMessage( msg ); | 248 | statusMessage( msg ); |
244 | } | 249 | } |
245 | 250 | ||
246 | void KVNC::disconnected() | 251 | void KVNC::disconnected() |
247 | { | 252 | { |
248 | 253 | ||
249 | if ( fullscreen ) | 254 | if ( fullscreen ) |
250 | toggleFullScreen(); | 255 | toggleFullScreen(); |
251 | static QString msg = tr( "Connection closed" ); | 256 | static QString msg = tr( "Connection closed" ); |
252 | statusMessage( msg ); | 257 | statusMessage( msg ); |
253 | ctlAltDelAction->setEnabled(false); | 258 | ctlAltDelAction->setEnabled(false); |
254 | disconnectAction->setEnabled( false ); | 259 | disconnectAction->setEnabled( false ); |
255 | fullScreenAction->setEnabled( false ); | 260 | fullScreenAction->setEnabled( false ); |
256 | stack->raiseWidget(bookmarkSelector); | 261 | stack->raiseWidget(bookmarkSelector); |
262 | bar->show(); | ||
257 | } | 263 | } |
258 | 264 | ||
259 | void KVNC::statusMessage( const QString &m ) | 265 | void KVNC::statusMessage( const QString &m ) |
260 | { | 266 | { |
261 | Global::statusMessage( m ); | 267 | Global::statusMessage( m ); |
262 | } | 268 | } |
263 | 269 | ||
264 | void KVNC::error( const QString &msg ) | 270 | void KVNC::error( const QString &msg ) |
265 | { | 271 | { |
266 | statusMessage( msg ); | 272 | statusMessage( msg ); |
267 | QMessageBox::warning( this, tr("VNC Viewer"), msg ); | 273 | QMessageBox::warning( this, tr("VNC Viewer"), msg ); |
268 | } | 274 | } |
269 | void KVNC::deleteBookmark(void) | 275 | void KVNC::deleteBookmark(void) |
270 | { | 276 | { |
271 | bookmarkSelector->deleteBookmark(bookmarkSelector->selectedBookmark()); | 277 | bookmarkSelector->deleteBookmark(bookmarkSelector->selectedBookmark()); |
272 | } | 278 | } |
diff --git a/noncore/comm/keypebble/kvnc.h b/noncore/comm/keypebble/kvnc.h index 6e0a385..82a24fc 100644 --- a/noncore/comm/keypebble/kvnc.h +++ b/noncore/comm/keypebble/kvnc.h | |||
@@ -1,31 +1,31 @@ | |||
1 | // -*- c++ -*- | 1 | // -*- c++ -*- |
2 | 2 | ||
3 | #ifndef KVNC_H | 3 | #ifndef KVNC_H |
4 | #define KVNC_H | 4 | #define KVNC_H |
5 | 5 | ||
6 | #include <qmainwindow.h> | 6 | #include <qmainwindow.h> |
7 | #include <qurl.h> | 7 | #include <qtoolbar.h> |
8 | #include <qwidgetstack.h> | 8 | #include <qwidgetstack.h> |
9 | #include "kvncbookmarkdlg.h" | 9 | #include "kvncbookmarkdlg.h" |
10 | 10 | ||
11 | class QAction; | 11 | class QAction; |
12 | class KRFBCanvas; | 12 | class KRFBCanvas; |
13 | class QPushButton; | 13 | class QPushButton; |
14 | class QToolBar; | 14 | class QToolBar; |
15 | 15 | ||
16 | /** | 16 | /** |
17 | * Top level window for Keystone. | 17 | * Top level window for Keystone. |
18 | * | 18 | * |
19 | * @author Richard Moore, rich@kde.org | 19 | * @author Richard Moore, rich@kde.org |
20 | * @version $Id$ | 20 | * @version $Id$ |
21 | */ | 21 | */ |
22 | class KVNC : public QMainWindow | 22 | class KVNC : public QMainWindow |
23 | { | 23 | { |
24 | Q_OBJECT | 24 | Q_OBJECT |
25 | public: | 25 | public: |
26 | KVNC( const char *name = 0 ); | 26 | KVNC( const char *name = 0 ); |
27 | ~KVNC(); | 27 | ~KVNC(); |
28 | 28 | ||
29 | public slots: | 29 | public slots: |
30 | void newConnection(); | 30 | void newConnection(); |
31 | void deleteBookmark(); | 31 | void deleteBookmark(); |
@@ -36,31 +36,32 @@ public slots: | |||
36 | void closeConnection(); | 36 | void closeConnection(); |
37 | 37 | ||
38 | protected: | 38 | protected: |
39 | void setupActions(); | 39 | void setupActions(); |
40 | 40 | ||
41 | protected slots: | 41 | protected slots: |
42 | void showMenu(); | 42 | void showMenu(); |
43 | 43 | ||
44 | void connected(); | 44 | void connected(); |
45 | void loggedIn(); | 45 | void loggedIn(); |
46 | void disconnected(); | 46 | void disconnected(); |
47 | void statusMessage( const QString & ); | 47 | void statusMessage( const QString & ); |
48 | void error( const QString & ); | 48 | void error( const QString & ); |
49 | 49 | ||
50 | private: | 50 | private: |
51 | bool fullscreen; | 51 | bool fullscreen; |
52 | KRFBCanvas *canvas; | 52 | KRFBCanvas *canvas; |
53 | QPopupMenu *cornerMenu; | 53 | QPopupMenu *cornerMenu; |
54 | QPushButton *cornerButton; | 54 | QPushButton *cornerButton; |
55 | QAction *fullScreenAction; | 55 | QAction *fullScreenAction; |
56 | QAction *optionsAction; | 56 | QAction *optionsAction; |
57 | QAction *disconnectAction; | 57 | QAction *disconnectAction; |
58 | QAction *ctlAltDelAction;; | 58 | QAction *ctlAltDelAction;; |
59 | QAction *connectAction; | 59 | QAction *connectAction; |
60 | QToolBar * bar; | ||
60 | 61 | ||
61 | KVNCBookmarkDlg * bookmarkSelector; | 62 | KVNCBookmarkDlg * bookmarkSelector; |
62 | QWidgetStack * stack; | 63 | QWidgetStack * stack; |
63 | KRFBServer * curServer; | 64 | KRFBServer * curServer; |
64 | }; | 65 | }; |
65 | 66 | ||
66 | #endif // KVNC_H | 67 | #endif // KVNC_H |
diff --git a/noncore/comm/keypebble/kvncbookmarkdlg.cpp b/noncore/comm/keypebble/kvncbookmarkdlg.cpp index 1f97d13..1e2f3c3 100644 --- a/noncore/comm/keypebble/kvncbookmarkdlg.cpp +++ b/noncore/comm/keypebble/kvncbookmarkdlg.cpp | |||
@@ -140,81 +140,84 @@ void KVNCBookmarkDlg::readBookmarks(void) | |||
140 | else if (key=="hostname") | 140 | else if (key=="hostname") |
141 | server->hostname=val; | 141 | server->hostname=val; |
142 | else if (key=="password") | 142 | else if (key=="password") |
143 | server->password=decipher(val); | 143 | server->password=decipher(val); |
144 | else if (key=="display") | 144 | else if (key=="display") |
145 | server->display=val.toInt(); | 145 | server->display=val.toInt(); |
146 | else if (key=="hextile") | 146 | else if (key=="hextile") |
147 | server->hexTile=val.toInt(); | 147 | server->hexTile=val.toInt(); |
148 | else if (key=="corre") | 148 | else if (key=="corre") |
149 | server->corre=val.toInt(); | 149 | server->corre=val.toInt(); |
150 | else if (key=="rre") | 150 | else if (key=="rre") |
151 | server->rre=val.toInt(); | 151 | server->rre=val.toInt(); |
152 | else if (key=="copyrect") | 152 | else if (key=="copyrect") |
153 | server->copyrect=val.toInt(); | 153 | server->copyrect=val.toInt(); |
154 | else if (key=="colors256") | 154 | else if (key=="colors256") |
155 | server->colors256=val.toInt(); | 155 | server->colors256=val.toInt(); |
156 | else if (key=="shared") | 156 | else if (key=="shared") |
157 | server->shared=val.toInt(); | 157 | server->shared=val.toInt(); |
158 | else if (key=="readonly") | 158 | else if (key=="readonly") |
159 | server->readOnly=val.toInt(); | 159 | server->readOnly=val.toInt(); |
160 | else if (key=="deiconify") | 160 | else if (key=="deiconify") |
161 | server->deIconify=val.toInt(); | 161 | server->deIconify=val.toInt(); |
162 | else if (key=="updaterate") | 162 | else if (key=="updaterate") |
163 | server->updateRate=val.toInt(); | 163 | server->updateRate=val.toInt(); |
164 | else if (key=="scalefactor") | ||
165 | server->scaleFactor=val.toInt(); | ||
164 | 166 | ||
165 | } | 167 | } |
166 | if (server){ | 168 | if (server){ |
167 | servers.append(server); | 169 | servers.append(server); |
168 | server=0; | 170 | server=0; |
169 | } | 171 | } |
170 | f.close(); | 172 | f.close(); |
171 | } | 173 | } |
172 | } | 174 | } |
173 | 175 | ||
174 | void KVNCBookmarkDlg::writeBookmarks(void) | 176 | void KVNCBookmarkDlg::writeBookmarks(void) |
175 | { | 177 | { |
176 | QString filename=Global::applicationFileName("keypebble","bookmarks"); | 178 | QString filename=Global::applicationFileName("keypebble","bookmarks"); |
177 | 179 | ||
178 | QFile f(filename); | 180 | QFile f(filename); |
179 | 181 | ||
180 | QString key, val; | 182 | QString key, val; |
181 | KRFBServer * server=0; | 183 | KRFBServer * server=0; |
182 | 184 | ||
183 | if ( f.open(IO_ReadWrite) ) { | 185 | if ( f.open(IO_ReadWrite) ) { |
184 | QTextStream t( &f ); | 186 | QTextStream t( &f ); |
185 | QString s; | 187 | QString s; |
186 | int n = 1; | 188 | int n = 1; |
187 | KRFBServer *server; | 189 | KRFBServer *server; |
188 | 190 | ||
189 | for ( server=servers.first(); server != 0; server=servers.next() ) { | 191 | for ( server=servers.first(); server != 0; server=servers.next() ) { |
190 | qDebug(server->name); | 192 | qDebug(server->name); |
191 | t << "server=" << server->name << '\n'; | 193 | t << "server=" << server->name << '\n'; |
192 | t << "\thostname=" << server->hostname << '\n'; | 194 | t << "\thostname=" << server->hostname << '\n'; |
193 | t << "\tpassword=" << encipher(server->password )<< '\n'; | 195 | t << "\tpassword=" << encipher(server->password )<< '\n'; |
194 | t << "\tdisplay=" << server->display << '\n'; | 196 | t << "\tdisplay=" << server->display << '\n'; |
195 | t << "\thextile=" << server->hexTile << '\n'; | 197 | t << "\thextile=" << server->hexTile << '\n'; |
196 | t << "\tcorre=" << server->corre << '\n'; | 198 | t << "\tcorre=" << server->corre << '\n'; |
197 | t << "\trre=" << server->rre << '\n'; | 199 | t << "\trre=" << server->rre << '\n'; |
198 | t << "\tcopyrect=" << server->copyrect << '\n'; | 200 | t << "\tcopyrect=" << server->copyrect << '\n'; |
199 | t << "\tshared=" << server->shared << '\n'; | 201 | t << "\tshared=" << server->shared << '\n'; |
200 | t << "\treadonly=" << server->readOnly << '\n'; | 202 | t << "\treadonly=" << server->readOnly << '\n'; |
201 | t << "\tdeiconify=" << server->deIconify << '\n'; | 203 | t << "\tdeiconify=" << server->deIconify << '\n'; |
202 | t << "\tupdaterate=" << server->updateRate << '\n'; | 204 | t << "\tupdaterate=" << server->updateRate << '\n'; |
205 | t << "\tscalefactor=" << server->scaleFactor << '\n'; | ||
203 | 206 | ||
204 | } | 207 | } |
205 | f.close(); | 208 | f.close(); |
206 | } | 209 | } |
207 | } | 210 | } |
208 | void KVNCBookmarkDlg::refresh(void) | 211 | void KVNCBookmarkDlg::refresh(void) |
209 | { | 212 | { |
210 | bookmarkList->clear(); | 213 | bookmarkList->clear(); |
211 | KRFBServer * server=0; | 214 | KRFBServer * server=0; |
212 | for ( server=servers.first(); server != 0; server=servers.next() ) { | 215 | for ( server=servers.first(); server != 0; server=servers.next() ) { |
213 | bookmarkList->insertItem(server->name); | 216 | bookmarkList->insertItem(server->name); |
214 | } | 217 | } |
215 | } | 218 | } |
216 | 219 | ||
217 | QString KVNCBookmarkDlg::selectedBookmark() | 220 | QString KVNCBookmarkDlg::selectedBookmark() |
218 | { | 221 | { |
219 | return bookmarkList->currentText(); | 222 | return bookmarkList->currentText(); |
220 | } | 223 | } |
diff --git a/noncore/comm/keypebble/kvncconndlg.cpp b/noncore/comm/keypebble/kvncconndlg.cpp index 6873feb..2f073f8 100644 --- a/noncore/comm/keypebble/kvncconndlg.cpp +++ b/noncore/comm/keypebble/kvncconndlg.cpp | |||
@@ -1,75 +1,94 @@ | |||
1 | #include <qframe.h> | 1 | #include <qframe.h> |
2 | #include <qvbox.h> | 2 | #include <qvbox.h> |
3 | #include <qcheckbox.h> | 3 | #include <qcheckbox.h> |
4 | #include <qcombobox.h> | ||
4 | #include <qspinbox.h> | 5 | #include <qspinbox.h> |
5 | #include <qlabel.h> | 6 | #include <qlabel.h> |
6 | #include <qlayout.h> | 7 | #include <qlayout.h> |
7 | #include <qwhatsthis.h> | 8 | #include <qwhatsthis.h> |
8 | #include <qapplication.h> | 9 | #include <qapplication.h> |
9 | #include <qlineedit.h> | 10 | #include <qlineedit.h> |
10 | #include <qpushbutton.h> | 11 | #include <qpushbutton.h> |
11 | #include "krfbserver.h" | 12 | #include "krfbserver.h" |
12 | 13 | ||
13 | #include "kvncconndlg.h" | 14 | #include "kvncconndlg.h" |
14 | 15 | ||
15 | KVNCConnDlg::KVNCConnDlg( KRFBServer *options, | 16 | KVNCConnDlg::KVNCConnDlg( KRFBServer *options, |
16 | QWidget *parent, char *name, bool modal ) | 17 | QWidget *parent, char *name, bool modal ) |
17 | : KVNCConnDlgBase( parent, name, modal ) | 18 | : KVNCConnDlgBase( parent, name, modal ) |
18 | { | 19 | { |
19 | this->options=options; | 20 | this->options=options; |
20 | tmpOptions=*options; | 21 | tmpOptions=*options; |
21 | 22 | ||
22 | serverHostname->setText(options->hostname); | 23 | serverHostname->setText(options->hostname); |
23 | serverDisplay->setValue(options->display); | 24 | serverDisplay->setValue(options->display); |
24 | serverPassword->setText(options->password); | 25 | serverPassword->setText(options->password); |
25 | serverBookmark->setText(options->name); | 26 | serverBookmark->setText(options->name); |
26 | 27 | ||
27 | hex->setChecked( options->hexTile ); | 28 | hex->setChecked( options->hexTile ); |
28 | corre->setChecked( options->corre ); | 29 | corre->setChecked( options->corre ); |
29 | rre->setChecked( options->rre ); | 30 | rre->setChecked( options->rre ); |
30 | copyRect->setChecked( options->copyrect ); | 31 | copyRect->setChecked( options->copyrect ); |
31 | 32 | ||
33 | for (int i=0; i < scaleFactor->count(); ++i) { | ||
34 | if (scaleFactor->text(i).toInt()==tmpOptions.scaleFactor) { | ||
35 | scaleFactor->setCurrentItem(i); | ||
36 | } | ||
37 | } | ||
38 | |||
32 | // TODO | 39 | // TODO |
33 | hex->setEnabled( false ); | 40 | hex->setEnabled( false ); |
34 | corre->setEnabled( false ); | 41 | corre->setEnabled( false ); |
35 | rre->setEnabled( false ); | 42 | rre->setEnabled( false ); |
36 | // /TODO | 43 | // /TODO |
37 | 44 | ||
38 | deIconify->setChecked( options->deIconify ); | 45 | deIconify->setChecked( options->deIconify ); |
39 | bit->setChecked( options->colors256 ); | 46 | bit->setChecked( options->colors256 ); |
40 | shared->setChecked( options->shared ); | 47 | shared->setChecked( options->shared ); |
41 | timeBox->setValue( options->updateRate ); | 48 | timeBox->setValue( options->updateRate ); |
42 | 49 | ||
50 | serverPassword->setEchoMode(QLineEdit::Password); | ||
43 | 51 | ||
44 | } | 52 | connect(togglePassword, SIGNAL( stateChanged(int) ), this, SLOT( showPassword(int) ) ); |
45 | 53 | ||
54 | |||
55 | } | ||
46 | KVNCConnDlg::~KVNCConnDlg() | 56 | KVNCConnDlg::~KVNCConnDlg() |
47 | { | 57 | { |
48 | } | 58 | } |
49 | 59 | ||
50 | void KVNCConnDlg::accept() | 60 | void KVNCConnDlg::accept() |
51 | { | 61 | { |
52 | save(); | 62 | save(); |
53 | QDialog::accept(); | 63 | QDialog::accept(); |
54 | } | 64 | } |
55 | 65 | ||
56 | void KVNCConnDlg::save() | 66 | void KVNCConnDlg::save() |
57 | { | 67 | { |
58 | tmpOptions.hexTile = hex->isChecked(); | 68 | tmpOptions.hexTile = hex->isChecked(); |
59 | tmpOptions.corre = corre->isChecked(); | 69 | tmpOptions.corre = corre->isChecked(); |
60 | tmpOptions.rre = rre->isChecked(); | 70 | tmpOptions.rre = rre->isChecked(); |
61 | tmpOptions.copyrect = copyRect->isChecked(); | 71 | tmpOptions.copyrect = copyRect->isChecked(); |
62 | tmpOptions.deIconify = deIconify->isChecked(); | 72 | tmpOptions.deIconify = deIconify->isChecked(); |
63 | tmpOptions.colors256 = bit->isChecked(); | 73 | tmpOptions.colors256 = bit->isChecked(); |
64 | tmpOptions.shared = shared->isChecked(); | 74 | tmpOptions.shared = shared->isChecked(); |
65 | tmpOptions.hostname = serverHostname->text(); | 75 | tmpOptions.hostname = serverHostname->text(); |
66 | tmpOptions.password = serverPassword->text(); | 76 | tmpOptions.password = serverPassword->text(); |
67 | tmpOptions.display = serverDisplay->value(); | 77 | tmpOptions.display = serverDisplay->value(); |
68 | tmpOptions.name = serverBookmark->text(); | 78 | tmpOptions.name = serverBookmark->text(); |
79 | tmpOptions.scaleFactor = scaleFactor->currentText().toInt(); | ||
69 | 80 | ||
70 | if (!serverBookmark->text().isEmpty()) { | 81 | if (!serverBookmark->text().isEmpty()) { |
71 | if ( options) { | 82 | if ( options) { |
72 | *options=tmpOptions; | 83 | *options=tmpOptions; |
73 | } | 84 | } |
74 | } | 85 | } |
75 | } | 86 | } |
87 | |||
88 | void KVNCConnDlg::showPassword(int show) | ||
89 | { | ||
90 | if (show) | ||
91 | serverPassword->setEchoMode(QLineEdit::Normal); | ||
92 | else | ||
93 | serverPassword->setEchoMode(QLineEdit::Password); | ||
94 | } | ||
diff --git a/noncore/comm/keypebble/kvncconndlg.h b/noncore/comm/keypebble/kvncconndlg.h index fae7d62..5e84750 100644 --- a/noncore/comm/keypebble/kvncconndlg.h +++ b/noncore/comm/keypebble/kvncconndlg.h | |||
@@ -1,33 +1,34 @@ | |||
1 | // -*- c++ -*- | 1 | // -*- c++ -*- |
2 | 2 | ||
3 | #ifndef KVNCCONNECTION_H | 3 | #ifndef KVNCCONNECTION_H |
4 | #define KVNCCONNECTION_H | 4 | #define KVNCCONNECTION_H |
5 | 5 | ||
6 | #include "kvncconndlgbase.h" | 6 | #include "kvncconndlgbase.h" |
7 | #include "krfbserver.h" | 7 | #include "krfbserver.h" |
8 | 8 | ||
9 | 9 | ||
10 | class KVNCConnDlg : public KVNCConnDlgBase | 10 | class KVNCConnDlg : public KVNCConnDlgBase |
11 | { | 11 | { |
12 | Q_OBJECT | 12 | Q_OBJECT |
13 | 13 | ||
14 | public: | 14 | public: |
15 | KVNCConnDlg( KRFBServer *options, | 15 | KVNCConnDlg( KRFBServer *options, |
16 | QWidget *parent = 0, char *name = 0, bool modal = true ); | 16 | QWidget *parent = 0, char *name = 0, bool modal = true ); |
17 | ~KVNCConnDlg(); | 17 | ~KVNCConnDlg(); |
18 | 18 | ||
19 | protected: | 19 | protected: |
20 | void accept(); | 20 | void accept(); |
21 | private slots: | 21 | private slots: |
22 | void save(); | 22 | void save(); |
23 | void showPassword(int); | ||
23 | 24 | ||
24 | private: | 25 | private: |
25 | KRFBServer tmpOptions; | 26 | KRFBServer tmpOptions; |
26 | KRFBServer * options; | 27 | KRFBServer * options; |
27 | }; | 28 | }; |
28 | 29 | ||
29 | #endif // KVNCCONNECTION_H | 30 | #endif // KVNCCONNECTION_H |
30 | 31 | ||
31 | 32 | ||
32 | 33 | ||
33 | 34 | ||
diff --git a/noncore/comm/keypebble/kvncconndlgbase.ui b/noncore/comm/keypebble/kvncconndlgbase.ui index df0d375..42765c1 100644 --- a/noncore/comm/keypebble/kvncconndlgbase.ui +++ b/noncore/comm/keypebble/kvncconndlgbase.ui | |||
@@ -1,432 +1,482 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>KVNCConnDlgBase</class> | 2 | <class>KVNCConnDlgBase</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QDialog</class> | 4 | <class>QDialog</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>KVNCConnDlgBase</cstring> | 7 | <cstring>KVNCConnDlgBase</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>984</width> | 14 | <width>260</width> |
15 | <height>676</height> | 15 | <height>242</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>VNC Viewer Connection</string> | 20 | <string>VNC Viewer Connection</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
24 | </property> | 24 | </property> |
25 | <vbox> | 25 | <widget> |
26 | <class>QTabWidget</class> | ||
26 | <property stdset="1"> | 27 | <property stdset="1"> |
27 | <name>margin</name> | 28 | <name>name</name> |
28 | <number>0</number> | 29 | <cstring>TabWidget3</cstring> |
29 | </property> | 30 | </property> |
30 | <property stdset="1"> | 31 | <property stdset="1"> |
31 | <name>spacing</name> | 32 | <name>geometry</name> |
32 | <number>6</number> | 33 | <rect> |
34 | <x>0</x> | ||
35 | <y>0</y> | ||
36 | <width>266</width> | ||
37 | <height>233</height> | ||
38 | </rect> | ||
33 | </property> | 39 | </property> |
34 | <widget> | 40 | <widget> |
35 | <class>QTabWidget</class> | 41 | <class>QWidget</class> |
36 | <property stdset="1"> | 42 | <property stdset="1"> |
37 | <name>name</name> | 43 | <name>name</name> |
38 | <cstring>TabWidget3</cstring> | 44 | <cstring>tab</cstring> |
39 | </property> | 45 | </property> |
40 | <widget> | 46 | <attribute> |
41 | <class>QWidget</class> | 47 | <name>title</name> |
48 | <string>Server</string> | ||
49 | </attribute> | ||
50 | <grid> | ||
42 | <property stdset="1"> | 51 | <property stdset="1"> |
43 | <name>name</name> | 52 | <name>margin</name> |
44 | <cstring>tab</cstring> | 53 | <number>11</number> |
45 | </property> | 54 | </property> |
46 | <attribute> | 55 | <property stdset="1"> |
47 | <name>title</name> | 56 | <name>spacing</name> |
48 | <string>Server</string> | 57 | <number>6</number> |
49 | </attribute> | 58 | </property> |
50 | <grid> | 59 | <widget row="2" column="1" rowspan="1" colspan="2" > |
60 | <class>QLineEdit</class> | ||
51 | <property stdset="1"> | 61 | <property stdset="1"> |
52 | <name>margin</name> | 62 | <name>name</name> |
53 | <number>11</number> | 63 | <cstring>serverPassword</cstring> |
54 | </property> | 64 | </property> |
55 | <property stdset="1"> | 65 | <property stdset="1"> |
56 | <name>spacing</name> | 66 | <name>autoMask</name> |
57 | <number>6</number> | 67 | <bool>true</bool> |
58 | </property> | 68 | </property> |
59 | <widget row="0" column="0" > | 69 | <property stdset="1"> |
60 | <class>QLabel</class> | 70 | <name>echoMode</name> |
61 | <property stdset="1"> | 71 | <enum>Password</enum> |
62 | <name>name</name> | 72 | </property> |
63 | <cstring>hostname</cstring> | 73 | </widget> |
64 | </property> | 74 | <widget row="3" column="1" > |
65 | <property stdset="1"> | 75 | <class>QCheckBox</class> |
66 | <name>text</name> | 76 | <property stdset="1"> |
67 | <string>Host Name:</string> | 77 | <name>name</name> |
68 | </property> | 78 | <cstring>togglePassword</cstring> |
69 | </widget> | 79 | </property> |
70 | <widget row="1" column="0" > | 80 | <property stdset="1"> |
71 | <class>QLabel</class> | 81 | <name>text</name> |
72 | <property stdset="1"> | 82 | <string>Show Password</string> |
73 | <name>name</name> | 83 | </property> |
74 | <cstring>TextLabel2_2</cstring> | 84 | </widget> |
75 | </property> | 85 | <widget row="2" column="0" > |
76 | <property stdset="1"> | 86 | <class>QLabel</class> |
77 | <name>text</name> | 87 | <property stdset="1"> |
78 | <string>Display Number:</string> | 88 | <name>name</name> |
79 | </property> | 89 | <cstring>TextLabel3</cstring> |
80 | </widget> | 90 | </property> |
81 | <widget row="2" column="1" rowspan="1" colspan="2" > | 91 | <property stdset="1"> |
82 | <class>QLineEdit</class> | 92 | <name>text</name> |
83 | <property stdset="1"> | 93 | <string>Password:</string> |
84 | <name>name</name> | 94 | </property> |
85 | <cstring>serverPassword</cstring> | 95 | </widget> |
86 | </property> | 96 | <widget row="4" column="1" rowspan="1" colspan="2" > |
87 | <property stdset="1"> | 97 | <class>QLineEdit</class> |
88 | <name>autoMask</name> | 98 | <property stdset="1"> |
89 | <bool>true</bool> | 99 | <name>name</name> |
90 | </property> | 100 | <cstring>serverBookmark</cstring> |
91 | </widget> | 101 | </property> |
92 | <widget row="1" column="1" rowspan="1" colspan="2" > | 102 | </widget> |
93 | <class>QSpinBox</class> | 103 | <widget row="4" column="0" > |
94 | <property stdset="1"> | 104 | <class>QLabel</class> |
95 | <name>name</name> | 105 | <property stdset="1"> |
96 | <cstring>serverDisplay</cstring> | 106 | <name>name</name> |
97 | </property> | 107 | <cstring>TextLabel1_2</cstring> |
98 | <property stdset="1"> | 108 | </property> |
99 | <name>maxValue</name> | 109 | <property stdset="1"> |
100 | <number>500</number> | 110 | <name>text</name> |
101 | </property> | 111 | <string>Bookmark Name:</string> |
102 | <property stdset="1"> | 112 | </property> |
103 | <name>minValue</name> | 113 | </widget> |
104 | <number>0</number> | 114 | <widget row="0" column="1" rowspan="1" colspan="2" > |
105 | </property> | 115 | <class>QLineEdit</class> |
116 | <property stdset="1"> | ||
117 | <name>name</name> | ||
118 | <cstring>serverHostname</cstring> | ||
119 | </property> | ||
120 | </widget> | ||
121 | <widget row="0" column="0" > | ||
122 | <class>QLabel</class> | ||
123 | <property stdset="1"> | ||
124 | <name>name</name> | ||
125 | <cstring>hostname</cstring> | ||
126 | </property> | ||
127 | <property stdset="1"> | ||
128 | <name>text</name> | ||
129 | <string>Host Name:</string> | ||
130 | </property> | ||
131 | </widget> | ||
132 | <widget row="1" column="0" > | ||
133 | <class>QLabel</class> | ||
134 | <property stdset="1"> | ||
135 | <name>name</name> | ||
136 | <cstring>TextLabel2_2</cstring> | ||
137 | </property> | ||
138 | <property stdset="1"> | ||
139 | <name>text</name> | ||
140 | <string>Display Number:</string> | ||
141 | </property> | ||
142 | </widget> | ||
143 | <widget row="1" column="1" rowspan="1" colspan="2" > | ||
144 | <class>QSpinBox</class> | ||
145 | <property stdset="1"> | ||
146 | <name>name</name> | ||
147 | <cstring>serverDisplay</cstring> | ||
148 | </property> | ||
149 | <property stdset="1"> | ||
150 | <name>maxValue</name> | ||
151 | <number>500</number> | ||
152 | </property> | ||
153 | <property stdset="1"> | ||
154 | <name>minValue</name> | ||
155 | <number>0</number> | ||
156 | </property> | ||
157 | <property stdset="1"> | ||
158 | <name>value</name> | ||
159 | <number>0</number> | ||
160 | </property> | ||
161 | </widget> | ||
162 | <spacer row="5" column="2" > | ||
163 | <property> | ||
164 | <name>name</name> | ||
165 | <cstring>Spacer2</cstring> | ||
166 | </property> | ||
167 | <property stdset="1"> | ||
168 | <name>orientation</name> | ||
169 | <enum>Vertical</enum> | ||
170 | </property> | ||
171 | <property stdset="1"> | ||
172 | <name>sizeType</name> | ||
173 | <enum>Expanding</enum> | ||
174 | </property> | ||
175 | <property> | ||
176 | <name>sizeHint</name> | ||
177 | <size> | ||
178 | <width>20</width> | ||
179 | <height>20</height> | ||
180 | </size> | ||
181 | </property> | ||
182 | </spacer> | ||
183 | </grid> | ||
184 | </widget> | ||
185 | <widget> | ||
186 | <class>QWidget</class> | ||
187 | <property stdset="1"> | ||
188 | <name>name</name> | ||
189 | <cstring>tab</cstring> | ||
190 | </property> | ||
191 | <attribute> | ||
192 | <name>title</name> | ||
193 | <string>Options</string> | ||
194 | </attribute> | ||
195 | <vbox> | ||
196 | <property stdset="1"> | ||
197 | <name>margin</name> | ||
198 | <number>11</number> | ||
199 | </property> | ||
200 | <property stdset="1"> | ||
201 | <name>spacing</name> | ||
202 | <number>6</number> | ||
203 | </property> | ||
204 | <widget> | ||
205 | <class>QLabel</class> | ||
206 | <property stdset="1"> | ||
207 | <name>name</name> | ||
208 | <cstring>TextLabel1</cstring> | ||
209 | </property> | ||
210 | <property stdset="1"> | ||
211 | <name>text</name> | ||
212 | <string>Check for screen updates every:</string> | ||
213 | </property> | ||
214 | </widget> | ||
215 | <widget> | ||
216 | <class>QLayoutWidget</class> | ||
217 | <property stdset="1"> | ||
218 | <name>name</name> | ||
219 | <cstring>Layout2</cstring> | ||
220 | </property> | ||
221 | <hbox> | ||
106 | <property stdset="1"> | 222 | <property stdset="1"> |
107 | <name>value</name> | 223 | <name>margin</name> |
108 | <number>0</number> | 224 | <number>0</number> |
109 | </property> | 225 | </property> |
110 | </widget> | ||
111 | <widget row="0" column="1" rowspan="1" colspan="2" > | ||
112 | <class>QLineEdit</class> | ||
113 | <property stdset="1"> | ||
114 | <name>name</name> | ||
115 | <cstring>serverHostname</cstring> | ||
116 | </property> | ||
117 | </widget> | ||
118 | <widget row="2" column="0" > | ||
119 | <class>QLabel</class> | ||
120 | <property stdset="1"> | ||
121 | <name>name</name> | ||
122 | <cstring>TextLabel3</cstring> | ||
123 | </property> | ||
124 | <property stdset="1"> | 226 | <property stdset="1"> |
125 | <name>text</name> | 227 | <name>spacing</name> |
126 | <string>Password:</string> | 228 | <number>6</number> |
127 | </property> | 229 | </property> |
128 | </widget> | 230 | <widget> |
129 | <widget row="3" column="1" rowspan="1" colspan="2" > | 231 | <class>QSpinBox</class> |
130 | <class>QLineEdit</class> | ||
131 | <property stdset="1"> | ||
132 | <name>name</name> | ||
133 | <cstring>serverBookmark</cstring> | ||
134 | </property> | ||
135 | </widget> | ||
136 | <widget row="3" column="0" > | ||
137 | <class>QLabel</class> | ||
138 | <property stdset="1"> | ||
139 | <name>name</name> | ||
140 | <cstring>TextLabel1_2</cstring> | ||
141 | </property> | ||
142 | <property stdset="1"> | ||
143 | <name>text</name> | ||
144 | <string>Bookmark Name:</string> | ||
145 | </property> | ||
146 | </widget> | ||
147 | <spacer row="5" column="2" > | ||
148 | <property> | ||
149 | <name>name</name> | ||
150 | <cstring>Spacer2</cstring> | ||
151 | </property> | ||
152 | <property stdset="1"> | ||
153 | <name>orientation</name> | ||
154 | <enum>Vertical</enum> | ||
155 | </property> | ||
156 | <property stdset="1"> | ||
157 | <name>sizeType</name> | ||
158 | <enum>Expanding</enum> | ||
159 | </property> | ||
160 | <property> | ||
161 | <name>sizeHint</name> | ||
162 | <size> | ||
163 | <width>20</width> | ||
164 | <height>20</height> | ||
165 | </size> | ||
166 | </property> | ||
167 | </spacer> | ||
168 | <widget row="4" column="1" > | ||
169 | <class>QLayoutWidget</class> | ||
170 | <property stdset="1"> | ||
171 | <name>name</name> | ||
172 | <cstring>Layout3</cstring> | ||
173 | </property> | ||
174 | <hbox> | ||
175 | <property stdset="1"> | 232 | <property stdset="1"> |
176 | <name>margin</name> | 233 | <name>name</name> |
177 | <number>0</number> | 234 | <cstring>timeBox</cstring> |
178 | </property> | 235 | </property> |
179 | <property stdset="1"> | 236 | <property stdset="1"> |
180 | <name>spacing</name> | 237 | <name>maxValue</name> |
181 | <number>6</number> | 238 | <number>500</number> |
182 | </property> | 239 | </property> |
183 | </hbox> | 240 | <property stdset="1"> |
184 | </widget> | 241 | <name>minValue</name> |
185 | </grid> | 242 | <number>1</number> |
186 | </widget> | 243 | </property> |
187 | <widget> | 244 | </widget> |
188 | <class>QWidget</class> | 245 | <widget> |
189 | <property stdset="1"> | 246 | <class>QLabel</class> |
190 | <name>name</name> | 247 | <property stdset="1"> |
191 | <cstring>tab</cstring> | 248 | <name>name</name> |
192 | </property> | 249 | <cstring>TextLabel2</cstring> |
193 | <attribute> | 250 | </property> |
194 | <name>title</name> | 251 | <property stdset="1"> |
195 | <string>Options</string> | 252 | <name>text</name> |
196 | </attribute> | 253 | <string>Milliseconds</string> |
197 | <vbox> | 254 | </property> |
255 | </widget> | ||
256 | </hbox> | ||
257 | </widget> | ||
258 | <widget> | ||
259 | <class>QCheckBox</class> | ||
198 | <property stdset="1"> | 260 | <property stdset="1"> |
199 | <name>margin</name> | 261 | <name>name</name> |
200 | <number>11</number> | 262 | <cstring>bit</cstring> |
201 | </property> | 263 | </property> |
202 | <property stdset="1"> | 264 | <property stdset="1"> |
203 | <name>spacing</name> | 265 | <name>text</name> |
204 | <number>6</number> | 266 | <string>Request 8-bit session</string> |
205 | </property> | 267 | </property> |
206 | <widget> | 268 | </widget> |
207 | <class>QLabel</class> | 269 | <widget> |
208 | <property stdset="1"> | 270 | <class>QCheckBox</class> |
209 | <name>name</name> | 271 | <property stdset="1"> |
210 | <cstring>TextLabel1</cstring> | 272 | <name>name</name> |
211 | </property> | 273 | <cstring>deIconify</cstring> |
274 | </property> | ||
275 | <property stdset="1"> | ||
276 | <name>text</name> | ||
277 | <string>Raise on bell</string> | ||
278 | </property> | ||
279 | </widget> | ||
280 | <widget> | ||
281 | <class>QCheckBox</class> | ||
282 | <property stdset="1"> | ||
283 | <name>name</name> | ||
284 | <cstring>shared</cstring> | ||
285 | </property> | ||
286 | <property stdset="1"> | ||
287 | <name>text</name> | ||
288 | <string>Request shared session</string> | ||
289 | </property> | ||
290 | </widget> | ||
291 | <widget> | ||
292 | <class>QLayoutWidget</class> | ||
293 | <property stdset="1"> | ||
294 | <name>name</name> | ||
295 | <cstring>Layout3</cstring> | ||
296 | </property> | ||
297 | <hbox> | ||
212 | <property stdset="1"> | 298 | <property stdset="1"> |
213 | <name>text</name> | 299 | <name>margin</name> |
214 | <string>Check for screen updates every:</string> | 300 | <number>0</number> |
215 | </property> | 301 | </property> |
216 | </widget> | ||
217 | <widget> | ||
218 | <class>QLayoutWidget</class> | ||
219 | <property stdset="1"> | 302 | <property stdset="1"> |
220 | <name>name</name> | 303 | <name>spacing</name> |
221 | <cstring>Layout2</cstring> | 304 | <number>6</number> |
222 | </property> | 305 | </property> |
223 | <hbox> | 306 | <widget> |
224 | <property stdset="1"> | 307 | <class>QComboBox</class> |
225 | <name>margin</name> | 308 | <item> |
226 | <number>0</number> | 309 | <property> |
227 | </property> | 310 | <name>text</name> |
228 | <property stdset="1"> | 311 | <string>1</string> |
229 | <name>spacing</name> | ||
230 | <number>6</number> | ||
231 | </property> | ||
232 | <widget> | ||
233 | <class>QSpinBox</class> | ||
234 | <property stdset="1"> | ||
235 | <name>name</name> | ||
236 | <cstring>timeBox</cstring> | ||
237 | </property> | ||
238 | <property stdset="1"> | ||
239 | <name>maxValue</name> | ||
240 | <number>500</number> | ||
241 | </property> | ||
242 | <property stdset="1"> | ||
243 | <name>minValue</name> | ||
244 | <number>1</number> | ||
245 | </property> | 312 | </property> |
246 | </widget> | 313 | </item> |
247 | <widget> | 314 | <item> |
248 | <class>QLabel</class> | 315 | <property> |
249 | <property stdset="1"> | 316 | <name>text</name> |
250 | <name>name</name> | 317 | <string>2</string> |
251 | <cstring>TextLabel2</cstring> | ||
252 | </property> | 318 | </property> |
253 | <property stdset="1"> | 319 | </item> |
320 | <item> | ||
321 | <property> | ||
254 | <name>text</name> | 322 | <name>text</name> |
255 | <string>Milliseconds</string> | 323 | <string>4</string> |
256 | </property> | 324 | </property> |
257 | </widget> | 325 | </item> |
258 | </hbox> | 326 | <property stdset="1"> |
259 | </widget> | 327 | <name>name</name> |
260 | <widget> | 328 | <cstring>scaleFactor</cstring> |
261 | <class>QCheckBox</class> | 329 | </property> |
262 | <property stdset="1"> | 330 | </widget> |
263 | <name>name</name> | 331 | <widget> |
264 | <cstring>bit</cstring> | 332 | <class>QLabel</class> |
265 | </property> | 333 | <property stdset="1"> |
266 | <property stdset="1"> | 334 | <name>name</name> |
267 | <name>text</name> | 335 | <cstring>TextLabel2_3</cstring> |
268 | <string>Request 8-bit session</string> | 336 | </property> |
269 | </property> | 337 | <property stdset="1"> |
270 | </widget> | 338 | <name>text</name> |
271 | <widget> | 339 | <string>Scale Factor</string> |
272 | <class>QCheckBox</class> | 340 | </property> |
273 | <property stdset="1"> | 341 | </widget> |
274 | <name>name</name> | 342 | </hbox> |
275 | <cstring>deIconify</cstring> | 343 | </widget> |
276 | </property> | 344 | <spacer> |
277 | <property stdset="1"> | 345 | <property> |
278 | <name>text</name> | 346 | <name>name</name> |
279 | <string>Raise on bell</string> | 347 | <cstring>Spacer2</cstring> |
280 | </property> | 348 | </property> |
281 | </widget> | 349 | <property stdset="1"> |
282 | <widget> | 350 | <name>orientation</name> |
283 | <class>QCheckBox</class> | 351 | <enum>Vertical</enum> |
284 | <property stdset="1"> | 352 | </property> |
285 | <name>name</name> | 353 | <property stdset="1"> |
286 | <cstring>shared</cstring> | 354 | <name>sizeType</name> |
287 | </property> | 355 | <enum>Expanding</enum> |
288 | <property stdset="1"> | 356 | </property> |
289 | <name>text</name> | 357 | <property> |
290 | <string>Request shared session</string> | 358 | <name>sizeHint</name> |
291 | </property> | 359 | <size> |
292 | </widget> | 360 | <width>20</width> |
293 | <spacer> | 361 | <height>20</height> |
294 | <property> | 362 | </size> |
295 | <name>name</name> | 363 | </property> |
296 | <cstring>Spacer2</cstring> | 364 | </spacer> |
297 | </property> | 365 | </vbox> |
298 | <property stdset="1"> | 366 | </widget> |
299 | <name>orientation</name> | 367 | <widget> |
300 | <enum>Vertical</enum> | 368 | <class>QWidget</class> |
301 | </property> | 369 | <property stdset="1"> |
302 | <property stdset="1"> | 370 | <name>name</name> |
303 | <name>sizeType</name> | 371 | <cstring>tab</cstring> |
304 | <enum>Expanding</enum> | 372 | </property> |
305 | </property> | 373 | <attribute> |
306 | <property> | 374 | <name>title</name> |
307 | <name>sizeHint</name> | 375 | <string>Encodings</string> |
308 | <size> | 376 | </attribute> |
309 | <width>20</width> | 377 | <vbox> |
310 | <height>20</height> | 378 | <property stdset="1"> |
311 | </size> | 379 | <name>margin</name> |
312 | </property> | 380 | <number>11</number> |
313 | </spacer> | 381 | </property> |
314 | </vbox> | ||
315 | </widget> | ||
316 | <widget> | ||
317 | <class>QWidget</class> | ||
318 | <property stdset="1"> | 382 | <property stdset="1"> |
319 | <name>name</name> | 383 | <name>spacing</name> |
320 | <cstring>tab</cstring> | 384 | <number>6</number> |
321 | </property> | 385 | </property> |
322 | <attribute> | 386 | <widget> |
323 | <name>title</name> | 387 | <class>QCheckBox</class> |
324 | <string>Encodings</string> | ||
325 | </attribute> | ||
326 | <vbox> | ||
327 | <property stdset="1"> | 388 | <property stdset="1"> |
328 | <name>margin</name> | 389 | <name>name</name> |
329 | <number>11</number> | 390 | <cstring>hex</cstring> |
330 | </property> | 391 | </property> |
331 | <property stdset="1"> | 392 | <property stdset="1"> |
332 | <name>spacing</name> | 393 | <name>enabled</name> |
333 | <number>6</number> | 394 | <bool>false</bool> |
334 | </property> | 395 | </property> |
335 | <widget> | 396 | <property stdset="1"> |
336 | <class>QCheckBox</class> | 397 | <name>text</name> |
337 | <property stdset="1"> | 398 | <string>Hextile encoding</string> |
338 | <name>name</name> | 399 | </property> |
339 | <cstring>hex</cstring> | 400 | </widget> |
340 | </property> | 401 | <widget> |
341 | <property stdset="1"> | 402 | <class>QCheckBox</class> |
342 | <name>enabled</name> | 403 | <property stdset="1"> |
343 | <bool>false</bool> | 404 | <name>name</name> |
344 | </property> | 405 | <cstring>corre</cstring> |
345 | <property stdset="1"> | 406 | </property> |
346 | <name>text</name> | 407 | <property stdset="1"> |
347 | <string>Hextile encoding</string> | 408 | <name>enabled</name> |
348 | </property> | 409 | <bool>false</bool> |
349 | </widget> | 410 | </property> |
350 | <widget> | 411 | <property stdset="1"> |
351 | <class>QCheckBox</class> | 412 | <name>text</name> |
352 | <property stdset="1"> | 413 | <string>CoRRE encoding</string> |
353 | <name>name</name> | 414 | </property> |
354 | <cstring>corre</cstring> | 415 | </widget> |
355 | </property> | 416 | <widget> |
356 | <property stdset="1"> | 417 | <class>QCheckBox</class> |
357 | <name>enabled</name> | 418 | <property stdset="1"> |
358 | <bool>false</bool> | 419 | <name>name</name> |
359 | </property> | 420 | <cstring>rre</cstring> |
360 | <property stdset="1"> | 421 | </property> |
361 | <name>text</name> | 422 | <property stdset="1"> |
362 | <string>CoRRE encoding</string> | 423 | <name>enabled</name> |
363 | </property> | 424 | <bool>false</bool> |
364 | </widget> | 425 | </property> |
365 | <widget> | 426 | <property stdset="1"> |
366 | <class>QCheckBox</class> | 427 | <name>text</name> |
367 | <property stdset="1"> | 428 | <string>RRE encoding</string> |
368 | <name>name</name> | 429 | </property> |
369 | <cstring>rre</cstring> | 430 | </widget> |
370 | </property> | 431 | <widget> |
371 | <property stdset="1"> | 432 | <class>QCheckBox</class> |
372 | <name>enabled</name> | 433 | <property stdset="1"> |
373 | <bool>false</bool> | 434 | <name>name</name> |
374 | </property> | 435 | <cstring>copyRect</cstring> |
375 | <property stdset="1"> | 436 | </property> |
376 | <name>text</name> | 437 | <property stdset="1"> |
377 | <string>RRE encoding</string> | 438 | <name>text</name> |
378 | </property> | 439 | <string>Copy rectangle encoding</string> |
379 | </widget> | 440 | </property> |
380 | <widget> | 441 | </widget> |
381 | <class>QCheckBox</class> | 442 | <spacer> |
382 | <property stdset="1"> | 443 | <property> |
383 | <name>name</name> | 444 | <name>name</name> |
384 | <cstring>copyRect</cstring> | 445 | <cstring>Spacer3</cstring> |
385 | </property> | 446 | </property> |
386 | <property stdset="1"> | 447 | <property stdset="1"> |
387 | <name>text</name> | 448 | <name>orientation</name> |
388 | <string>Copy rectangle encoding</string> | 449 | <enum>Vertical</enum> |
389 | </property> | 450 | </property> |
390 | </widget> | 451 | <property stdset="1"> |
391 | <spacer> | 452 | <name>sizeType</name> |
392 | <property> | 453 | <enum>Expanding</enum> |
393 | <name>name</name> | 454 | </property> |
394 | <cstring>Spacer3</cstring> | 455 | <property> |
395 | </property> | 456 | <name>sizeHint</name> |
396 | <property stdset="1"> | 457 | <size> |
397 | <name>orientation</name> | 458 | <width>20</width> |
398 | <enum>Vertical</enum> | 459 | <height>20</height> |
399 | </property> | 460 | </size> |
400 | <property stdset="1"> | 461 | </property> |
401 | <name>sizeType</name> | 462 | </spacer> |
402 | <enum>Expanding</enum> | 463 | </vbox> |
403 | </property> | ||
404 | <property> | ||
405 | <name>sizeHint</name> | ||
406 | <size> | ||
407 | <width>20</width> | ||
408 | <height>20</height> | ||
409 | </size> | ||
410 | </property> | ||
411 | </spacer> | ||
412 | </vbox> | ||
413 | </widget> | ||
414 | </widget> | 464 | </widget> |
415 | </vbox> | 465 | </widget> |
416 | </widget> | 466 | </widget> |
417 | <tabstops> | 467 | <tabstops> |
418 | <tabstop>TabWidget3</tabstop> | 468 | <tabstop>TabWidget3</tabstop> |
419 | <tabstop>serverHostname</tabstop> | 469 | <tabstop>serverHostname</tabstop> |
420 | <tabstop>serverDisplay</tabstop> | 470 | <tabstop>serverDisplay</tabstop> |
421 | <tabstop>serverPassword</tabstop> | 471 | <tabstop>serverPassword</tabstop> |
422 | <tabstop>serverBookmark</tabstop> | 472 | <tabstop>serverBookmark</tabstop> |
423 | <tabstop>timeBox</tabstop> | 473 | <tabstop>timeBox</tabstop> |
424 | <tabstop>bit</tabstop> | 474 | <tabstop>bit</tabstop> |
425 | <tabstop>deIconify</tabstop> | 475 | <tabstop>deIconify</tabstop> |
426 | <tabstop>shared</tabstop> | 476 | <tabstop>shared</tabstop> |
427 | <tabstop>hex</tabstop> | 477 | <tabstop>hex</tabstop> |
428 | <tabstop>corre</tabstop> | 478 | <tabstop>corre</tabstop> |
429 | <tabstop>rre</tabstop> | 479 | <tabstop>rre</tabstop> |
430 | <tabstop>copyRect</tabstop> | 480 | <tabstop>copyRect</tabstop> |
431 | </tabstops> | 481 | </tabstops> |
432 | </UI> | 482 | </UI> |