summaryrefslogtreecommitdiff
path: root/noncore/comm/keypebble/kvnc.cpp
Side-by-side diff
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 @@
#include "krfbcanvas.h"
#include "krfbconnection.h"
#include "kvncconndlg.h"
#include "krfbserver.h"
static int u_id = 1;
-static int get_unique_id()
-{
+static int get_unique_id()
+{
return u_id++;
}
/* XPM */
static char * menu_xpm[] = {
@@ -53,23 +53,23 @@ static char * menu_xpm[] = {
" .+. ",
" .. ",
" "};
const int StatusTextId = 0;
-KVNC::KVNC( const char *name ) : QMainWindow( 0, name ,WStyle_ContextHelp)
+KVNC::KVNC( QWidget *parent, const char *name, WFlags f) : QMainWindow( 0, name ,WStyle_ContextHelp)
{
setCaption( tr("VNC Viewer") );
fullscreen = false;
stack = new QWidgetStack( this );
setCentralWidget( stack );
bookmarkSelector=new KVNCBookmarkDlg();
stack->addWidget(bookmarkSelector,get_unique_id());
- stack->raiseWidget( bookmarkSelector );
+ stack->raiseWidget( bookmarkSelector );
canvas = new KRFBCanvas( stack, "canvas" );
stack->addWidget(canvas,get_unique_id());
setCentralWidget( stack );
@@ -100,13 +100,13 @@ KVNC::KVNC( const char *name ) : QMainWindow( 0, name ,WStyle_ContextHelp)
QAction *n = new QAction( tr( "New Connection" ), Resource::loadPixmap( "new" ),
QString::null, 0, this, 0 );
connect( n, SIGNAL( activated() ),
this, SLOT( newConnection() ) );
n->addTo( bar );
-
+
QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "fileopen" ),
QString::null, 0, this, 0 );
connect( o, SIGNAL( activated() ),
this, SLOT( openConnection() ) );
o->addTo( bar );
@@ -217,17 +217,17 @@ void KVNC::toggleFullScreen()
QPoint(0,0),false);
canvas->resize(qApp->desktop()->width(), qApp->desktop()->height());
canvas->raise();
canvas->setFocus();
canvas->grabKeyboard();
canvas->show();
-
+
fullScreenAction->setText( tr("Stop Full Screen") );
}
-
-
+
+
fullscreen = !fullscreen;
}
void KVNC::closeConnection()
{
if ( fullscreen )
@@ -263,13 +263,13 @@ void KVNC::loggedIn()
statusMessage( msg );
}
void KVNC::disconnected()
{
- if ( fullscreen )
+ if ( fullscreen )
toggleFullScreen();
static QString msg = tr( "Connection closed" );
statusMessage( msg );
ctlAltDelAction->setEnabled(false);
disconnectAction->setEnabled( false );
fullScreenAction->setEnabled( false );