summaryrefslogtreecommitdiff
path: root/noncore/comm/keypebble/kvnc.cpp
Unidiff
Diffstat (limited to 'noncore/comm/keypebble/kvnc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/comm/keypebble/kvnc.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp
index 48a442c..c89dec5 100644
--- a/noncore/comm/keypebble/kvnc.cpp
+++ b/noncore/comm/keypebble/kvnc.cpp
@@ -24,14 +24,14 @@
24#include "krfbcanvas.h" 24#include "krfbcanvas.h"
25#include "krfbconnection.h" 25#include "krfbconnection.h"
26#include "kvncconndlg.h" 26#include "kvncconndlg.h"
27#include "krfbserver.h" 27#include "krfbserver.h"
28 28
29static int u_id = 1; 29static int u_id = 1;
30static int get_unique_id() 30static int get_unique_id()
31{ 31{
32 return u_id++; 32 return u_id++;
33} 33}
34 34
35 35
36/* XPM */ 36/* XPM */
37static char * menu_xpm[] = { 37static char * menu_xpm[] = {
@@ -53,23 +53,23 @@ static char * menu_xpm[] = {
53" .+. ", 53" .+. ",
54" .. ", 54" .. ",
55" "}; 55" "};
56 56
57const int StatusTextId = 0; 57const int StatusTextId = 0;
58 58
59KVNC::KVNC( const char *name ) : QMainWindow( 0, name ,WStyle_ContextHelp) 59KVNC::KVNC( QWidget *parent, const char *name, WFlags f) : QMainWindow( 0, name ,WStyle_ContextHelp)
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
@@ -100,13 +100,13 @@ KVNC::KVNC( const char *name ) : QMainWindow( 0, name ,WStyle_ContextHelp)
100 100
101 QAction *n = new QAction( tr( "New Connection" ), Resource::loadPixmap( "new" ), 101 QAction *n = new QAction( tr( "New Connection" ), Resource::loadPixmap( "new" ),
102 QString::null, 0, this, 0 ); 102 QString::null, 0, this, 0 );
103 connect( n, SIGNAL( activated() ), 103 connect( n, SIGNAL( activated() ),
104 this, SLOT( newConnection() ) ); 104 this, SLOT( newConnection() ) );
105 n->addTo( bar ); 105 n->addTo( bar );
106 106
107 QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "fileopen" ), 107 QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "fileopen" ),
108 QString::null, 0, this, 0 ); 108 QString::null, 0, this, 0 );
109 connect( o, SIGNAL( activated() ), 109 connect( o, SIGNAL( activated() ),
110 this, SLOT( openConnection() ) ); 110 this, SLOT( openConnection() ) );
111 o->addTo( bar ); 111 o->addTo( bar );
112 112
@@ -217,17 +217,17 @@ void KVNC::toggleFullScreen()
217 QPoint(0,0),false); 217 QPoint(0,0),false);
218 canvas->resize(qApp->desktop()->width(), qApp->desktop()->height()); 218 canvas->resize(qApp->desktop()->width(), qApp->desktop()->height());
219 canvas->raise(); 219 canvas->raise();
220 canvas->setFocus(); 220 canvas->setFocus();
221 canvas->grabKeyboard(); 221 canvas->grabKeyboard();
222 canvas->show(); 222 canvas->show();
223 223
224 fullScreenAction->setText( tr("Stop Full Screen") ); 224 fullScreenAction->setText( tr("Stop Full Screen") );
225 } 225 }
226 226
227 227
228 fullscreen = !fullscreen; 228 fullscreen = !fullscreen;
229} 229}
230 230
231void KVNC::closeConnection() 231void KVNC::closeConnection()
232{ 232{
233 if ( fullscreen ) 233 if ( fullscreen )
@@ -263,13 +263,13 @@ void KVNC::loggedIn()
263 statusMessage( msg ); 263 statusMessage( msg );
264} 264}
265 265
266void KVNC::disconnected() 266void KVNC::disconnected()
267{ 267{
268 268
269 if ( fullscreen ) 269 if ( fullscreen )
270 toggleFullScreen(); 270 toggleFullScreen();
271 static QString msg = tr( "Connection closed" ); 271 static QString msg = tr( "Connection closed" );
272 statusMessage( msg ); 272 statusMessage( msg );
273 ctlAltDelAction->setEnabled(false); 273 ctlAltDelAction->setEnabled(false);
274 disconnectAction->setEnabled( false ); 274 disconnectAction->setEnabled( false );
275 fullScreenAction->setEnabled( false ); 275 fullScreenAction->setEnabled( false );