-rw-r--r-- | noncore/comm/keypebble/krfbbuffer.cpp | 11 | ||||
-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 | 180 |
12 files changed, 172 insertions, 75 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 | |||
@@ -8,2 +8,4 @@ | |||
8 | #include "krfbbuffer.h" | 8 | #include "krfbbuffer.h" |
9 | #include "krfbconnection.h" | ||
10 | #include "krfbserver.h" | ||
9 | #include "krfbserverinfo.h" | 11 | #include "krfbserverinfo.h" |
@@ -88,2 +90,3 @@ void KRFBBuffer::drawRawRectChunk( void *data, | |||
88 | 90 | ||
91 | int scaleFactor=decoder->con->options()->scaleFactor; | ||
89 | int redMax = Swap16IfLE( decoder->format->redMax ); | 92 | int redMax = Swap16IfLE( decoder->format->redMax ); |
@@ -99,2 +102,3 @@ void KRFBBuffer::drawRawRectChunk( void *data, | |||
99 | 102 | ||
103 | |||
100 | for ( int j = 0; j < h; j++ ) { | 104 | for ( int j = 0; j < h; j++ ) { |
@@ -189,6 +193,11 @@ void KRFBBuffer::drawRawRectChunk( void *data, | |||
189 | 193 | ||
194 | if (scaleFactor > 1) { | ||
195 | p.drawImage( x/scaleFactor, y/scaleFactor, img.smoothScale(w/scaleFactor,h/scaleFactor) ); | ||
196 | emit updated( x/scaleFactor, y/scaleFactor, w/scaleFactor, h/scaleFactor ); | ||
197 | } | ||
198 | else { | ||
190 | p.drawImage( x, y, img ); | 199 | p.drawImage( x, y, img ); |
191 | |||
192 | emit updated( x, y, w, h ); | 200 | emit updated( x, y, w, h ); |
193 | } | 201 | } |
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 | |||
@@ -24,3 +24,4 @@ KRFBCanvas::KRFBCanvas( QWidget *parent, const char *name ) | |||
24 | loggedIn_ = false; | 24 | loggedIn_ = false; |
25 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold); | 25 | |
26 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold); | ||
26 | 27 | ||
@@ -106,2 +107,4 @@ void KRFBCanvas::viewportPaintEvent( QPaintEvent *e ) | |||
106 | if ( loggedIn_ ) { | 107 | if ( loggedIn_ ) { |
108 | QPixmap p; | ||
109 | |||
107 | bitBlt( viewport(), r.x(), r.y(), | 110 | bitBlt( viewport(), r.x(), r.y(), |
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 | |||
@@ -197,3 +197,3 @@ void KRFBDecoder::gotServerInit() | |||
197 | 197 | ||
198 | buf->resize( info->width, info->height ); | 198 | buf->resize( info->width/con->options()->scaleFactor, info->height /con->options()->scaleFactor); |
199 | 199 | ||
@@ -644,4 +644,5 @@ void KRFBDecoder::sendMouseEvent( QMouseEvent *e ) | |||
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 | ||
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 | |||
@@ -100,2 +100,5 @@ signals: | |||
100 | 100 | ||
101 | protected: | ||
102 | /** The connection to the server. */ | ||
103 | KRFBConnection *con; | ||
101 | private: | 104 | private: |
@@ -120,4 +123,2 @@ private: | |||
120 | KRFBBuffer *buf; | 123 | KRFBBuffer *buf; |
121 | /** The connection to the server. */ | ||
122 | KRFBConnection *con; | ||
123 | 124 | ||
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 | |||
@@ -11,2 +11,4 @@ KRFBServer::KRFBServer() | |||
11 | 11 | ||
12 | scaleFactor=1; | ||
13 | |||
12 | hexTile=0; | 14 | hexTile=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 | |||
@@ -31,2 +31,3 @@ public: | |||
31 | int updateRate; | 31 | int updateRate; |
32 | int scaleFactor; | ||
32 | }; | 33 | }; |
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 | |||
@@ -74,2 +74,3 @@ KVNC::KVNC( const char *name ) : QMainWindow( 0, name ) | |||
74 | 74 | ||
75 | |||
75 | connect( bookmarkSelector->bookmarkList, SIGNAL(doubleClicked(QListBoxItem *)), | 76 | connect( bookmarkSelector->bookmarkList, SIGNAL(doubleClicked(QListBoxItem *)), |
@@ -94,3 +95,6 @@ KVNC::KVNC( const char *name ) : QMainWindow( 0, name ) | |||
94 | 95 | ||
95 | QPEToolBar *bar = new QPEToolBar( this ); | 96 | bar= new QToolBar( this ); |
97 | setToolBarsMovable( false ); | ||
98 | setRightJustification(false); | ||
99 | |||
96 | 100 | ||
@@ -237,2 +241,3 @@ void KVNC::connected() | |||
237 | stack->raiseWidget(canvas); | 241 | stack->raiseWidget(canvas); |
242 | bar->hide(); | ||
238 | } | 243 | } |
@@ -256,2 +261,3 @@ void KVNC::disconnected() | |||
256 | stack->raiseWidget(bookmarkSelector); | 261 | stack->raiseWidget(bookmarkSelector); |
262 | bar->show(); | ||
257 | } | 263 | } |
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 | |||
@@ -6,3 +6,3 @@ | |||
6 | #include <qmainwindow.h> | 6 | #include <qmainwindow.h> |
7 | #include <qurl.h> | 7 | #include <qtoolbar.h> |
8 | #include <qwidgetstack.h> | 8 | #include <qwidgetstack.h> |
@@ -59,2 +59,3 @@ private: | |||
59 | QAction *connectAction; | 59 | QAction *connectAction; |
60 | QToolBar * bar; | ||
60 | 61 | ||
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 | |||
@@ -163,2 +163,4 @@ void KVNCBookmarkDlg::readBookmarks(void) | |||
163 | server->updateRate=val.toInt(); | 163 | server->updateRate=val.toInt(); |
164 | else if (key=="scalefactor") | ||
165 | server->scaleFactor=val.toInt(); | ||
164 | 166 | ||
@@ -202,2 +204,3 @@ void KVNCBookmarkDlg::writeBookmarks(void) | |||
202 | t << "\tupdaterate=" << server->updateRate << '\n'; | 204 | t << "\tupdaterate=" << server->updateRate << '\n'; |
205 | t << "\tscalefactor=" << server->scaleFactor << '\n'; | ||
203 | 206 | ||
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 | |||
@@ -3,2 +3,3 @@ | |||
3 | #include <qcheckbox.h> | 3 | #include <qcheckbox.h> |
4 | #include <qcombobox.h> | ||
4 | #include <qspinbox.h> | 5 | #include <qspinbox.h> |
@@ -31,2 +32,8 @@ KVNCConnDlg::KVNCConnDlg( KRFBServer *options, | |||
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 |
@@ -42,5 +49,8 @@ KVNCConnDlg::KVNCConnDlg( KRFBServer *options, | |||
42 | 49 | ||
50 | serverPassword->setEchoMode(QLineEdit::Password); | ||
51 | |||
52 | connect(togglePassword, SIGNAL( stateChanged(int) ), this, SLOT( showPassword(int) ) ); | ||
43 | 53 | ||
44 | } | ||
45 | 54 | ||
55 | } | ||
46 | KVNCConnDlg::~KVNCConnDlg() | 56 | KVNCConnDlg::~KVNCConnDlg() |
@@ -68,2 +78,3 @@ void KVNCConnDlg::save() | |||
68 | tmpOptions.name = serverBookmark->text(); | 78 | tmpOptions.name = serverBookmark->text(); |
79 | tmpOptions.scaleFactor = scaleFactor->currentText().toInt(); | ||
69 | 80 | ||
@@ -75 +86,9 @@ void KVNCConnDlg::save() | |||
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 | |||
@@ -22,2 +22,3 @@ class KVNCConnDlg : public KVNCConnDlgBase | |||
22 | void save(); | 22 | void save(); |
23 | void showPassword(int); | ||
23 | 24 | ||
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 | |||
@@ -13,4 +13,4 @@ | |||
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> |
@@ -24,11 +24,2 @@ | |||
24 | </property> | 24 | </property> |
25 | <vbox> | ||
26 | <property stdset="1"> | ||
27 | <name>margin</name> | ||
28 | <number>0</number> | ||
29 | </property> | ||
30 | <property stdset="1"> | ||
31 | <name>spacing</name> | ||
32 | <number>6</number> | ||
33 | </property> | ||
34 | <widget> | 25 | <widget> |
@@ -39,2 +30,11 @@ | |||
39 | </property> | 30 | </property> |
31 | <property stdset="1"> | ||
32 | <name>geometry</name> | ||
33 | <rect> | ||
34 | <x>0</x> | ||
35 | <y>0</y> | ||
36 | <width>266</width> | ||
37 | <height>233</height> | ||
38 | </rect> | ||
39 | </property> | ||
40 | <widget> | 40 | <widget> |
@@ -58,18 +58,22 @@ | |||
58 | </property> | 58 | </property> |
59 | <widget row="0" column="0" > | 59 | <widget row="2" column="1" rowspan="1" colspan="2" > |
60 | <class>QLabel</class> | 60 | <class>QLineEdit</class> |
61 | <property stdset="1"> | 61 | <property stdset="1"> |
62 | <name>name</name> | 62 | <name>name</name> |
63 | <cstring>hostname</cstring> | 63 | <cstring>serverPassword</cstring> |
64 | </property> | 64 | </property> |
65 | <property stdset="1"> | 65 | <property stdset="1"> |
66 | <name>text</name> | 66 | <name>autoMask</name> |
67 | <string>Host Name:</string> | 67 | <bool>true</bool> |
68 | </property> | ||
69 | <property stdset="1"> | ||
70 | <name>echoMode</name> | ||
71 | <enum>Password</enum> | ||
68 | </property> | 72 | </property> |
69 | </widget> | 73 | </widget> |
70 | <widget row="1" column="0" > | 74 | <widget row="3" column="1" > |
71 | <class>QLabel</class> | 75 | <class>QCheckBox</class> |
72 | <property stdset="1"> | 76 | <property stdset="1"> |
73 | <name>name</name> | 77 | <name>name</name> |
74 | <cstring>TextLabel2_2</cstring> | 78 | <cstring>togglePassword</cstring> |
75 | </property> | 79 | </property> |
@@ -77,33 +81,32 @@ | |||
77 | <name>text</name> | 81 | <name>text</name> |
78 | <string>Display Number:</string> | 82 | <string>Show Password</string> |
79 | </property> | 83 | </property> |
80 | </widget> | 84 | </widget> |
81 | <widget row="2" column="1" rowspan="1" colspan="2" > | 85 | <widget row="2" column="0" > |
82 | <class>QLineEdit</class> | 86 | <class>QLabel</class> |
83 | <property stdset="1"> | 87 | <property stdset="1"> |
84 | <name>name</name> | 88 | <name>name</name> |
85 | <cstring>serverPassword</cstring> | 89 | <cstring>TextLabel3</cstring> |
86 | </property> | 90 | </property> |
87 | <property stdset="1"> | 91 | <property stdset="1"> |
88 | <name>autoMask</name> | 92 | <name>text</name> |
89 | <bool>true</bool> | 93 | <string>Password:</string> |
90 | </property> | 94 | </property> |
91 | </widget> | 95 | </widget> |
92 | <widget row="1" column="1" rowspan="1" colspan="2" > | 96 | <widget row="4" column="1" rowspan="1" colspan="2" > |
93 | <class>QSpinBox</class> | 97 | <class>QLineEdit</class> |
94 | <property stdset="1"> | 98 | <property stdset="1"> |
95 | <name>name</name> | 99 | <name>name</name> |
96 | <cstring>serverDisplay</cstring> | 100 | <cstring>serverBookmark</cstring> |
97 | </property> | ||
98 | <property stdset="1"> | ||
99 | <name>maxValue</name> | ||
100 | <number>500</number> | ||
101 | </property> | 101 | </property> |
102 | </widget> | ||
103 | <widget row="4" column="0" > | ||
104 | <class>QLabel</class> | ||
102 | <property stdset="1"> | 105 | <property stdset="1"> |
103 | <name>minValue</name> | 106 | <name>name</name> |
104 | <number>0</number> | 107 | <cstring>TextLabel1_2</cstring> |
105 | </property> | 108 | </property> |
106 | <property stdset="1"> | 109 | <property stdset="1"> |
107 | <name>value</name> | 110 | <name>text</name> |
108 | <number>0</number> | 111 | <string>Bookmark Name:</string> |
109 | </property> | 112 | </property> |
@@ -117,3 +120,3 @@ | |||
117 | </widget> | 120 | </widget> |
118 | <widget row="2" column="0" > | 121 | <widget row="0" column="0" > |
119 | <class>QLabel</class> | 122 | <class>QLabel</class> |
@@ -121,3 +124,3 @@ | |||
121 | <name>name</name> | 124 | <name>name</name> |
122 | <cstring>TextLabel3</cstring> | 125 | <cstring>hostname</cstring> |
123 | </property> | 126 | </property> |
@@ -125,21 +128,33 @@ | |||
125 | <name>text</name> | 128 | <name>text</name> |
126 | <string>Password:</string> | 129 | <string>Host Name:</string> |
127 | </property> | 130 | </property> |
128 | </widget> | 131 | </widget> |
129 | <widget row="3" column="1" rowspan="1" colspan="2" > | 132 | <widget row="1" column="0" > |
130 | <class>QLineEdit</class> | 133 | <class>QLabel</class> |
131 | <property stdset="1"> | 134 | <property stdset="1"> |
132 | <name>name</name> | 135 | <name>name</name> |
133 | <cstring>serverBookmark</cstring> | 136 | <cstring>TextLabel2_2</cstring> |
137 | </property> | ||
138 | <property stdset="1"> | ||
139 | <name>text</name> | ||
140 | <string>Display Number:</string> | ||
134 | </property> | 141 | </property> |
135 | </widget> | 142 | </widget> |
136 | <widget row="3" column="0" > | 143 | <widget row="1" column="1" rowspan="1" colspan="2" > |
137 | <class>QLabel</class> | 144 | <class>QSpinBox</class> |
138 | <property stdset="1"> | 145 | <property stdset="1"> |
139 | <name>name</name> | 146 | <name>name</name> |
140 | <cstring>TextLabel1_2</cstring> | 147 | <cstring>serverDisplay</cstring> |
141 | </property> | 148 | </property> |
142 | <property stdset="1"> | 149 | <property stdset="1"> |
143 | <name>text</name> | 150 | <name>maxValue</name> |
144 | <string>Bookmark Name:</string> | 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> | ||
145 | </property> | 160 | </property> |
@@ -167,19 +182,2 @@ | |||
167 | </spacer> | 182 | </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"> | ||
176 | <name>margin</name> | ||
177 | <number>0</number> | ||
178 | </property> | ||
179 | <property stdset="1"> | ||
180 | <name>spacing</name> | ||
181 | <number>6</number> | ||
182 | </property> | ||
183 | </hbox> | ||
184 | </widget> | ||
185 | </grid> | 183 | </grid> |
@@ -292,2 +290,55 @@ | |||
292 | </widget> | 290 | </widget> |
291 | <widget> | ||
292 | <class>QLayoutWidget</class> | ||
293 | <property stdset="1"> | ||
294 | <name>name</name> | ||
295 | <cstring>Layout3</cstring> | ||
296 | </property> | ||
297 | <hbox> | ||
298 | <property stdset="1"> | ||
299 | <name>margin</name> | ||
300 | <number>0</number> | ||
301 | </property> | ||
302 | <property stdset="1"> | ||
303 | <name>spacing</name> | ||
304 | <number>6</number> | ||
305 | </property> | ||
306 | <widget> | ||
307 | <class>QComboBox</class> | ||
308 | <item> | ||
309 | <property> | ||
310 | <name>text</name> | ||
311 | <string>1</string> | ||
312 | </property> | ||
313 | </item> | ||
314 | <item> | ||
315 | <property> | ||
316 | <name>text</name> | ||
317 | <string>2</string> | ||
318 | </property> | ||
319 | </item> | ||
320 | <item> | ||
321 | <property> | ||
322 | <name>text</name> | ||
323 | <string>4</string> | ||
324 | </property> | ||
325 | </item> | ||
326 | <property stdset="1"> | ||
327 | <name>name</name> | ||
328 | <cstring>scaleFactor</cstring> | ||
329 | </property> | ||
330 | </widget> | ||
331 | <widget> | ||
332 | <class>QLabel</class> | ||
333 | <property stdset="1"> | ||
334 | <name>name</name> | ||
335 | <cstring>TextLabel2_3</cstring> | ||
336 | </property> | ||
337 | <property stdset="1"> | ||
338 | <name>text</name> | ||
339 | <string>Scale Factor</string> | ||
340 | </property> | ||
341 | </widget> | ||
342 | </hbox> | ||
343 | </widget> | ||
293 | <spacer> | 344 | <spacer> |
@@ -414,3 +465,2 @@ | |||
414 | </widget> | 465 | </widget> |
415 | </vbox> | ||
416 | </widget> | 466 | </widget> |