summaryrefslogtreecommitdiff
path: root/noncore/comm/keypebble/kvnc.cpp
authortreke <treke>2002-11-17 18:30:27 (UTC)
committer treke <treke>2002-11-17 18:30:27 (UTC)
commitbdecd392488dee486d302f683b91acf89708d4a6 (patch) (side-by-side diff)
tree987ed4ddd7c5d0df0ef03f7a949f74837edc9ec7 /noncore/comm/keypebble/kvnc.cpp
parent44ffc30c0317e47f91ee20b3dc0b719a74d7991c (diff)
downloadopie-bdecd392488dee486d302f683b91acf89708d4a6.zip
opie-bdecd392488dee486d302f683b91acf89708d4a6.tar.gz
opie-bdecd392488dee486d302f683b91acf89708d4a6.tar.bz2
Resized a couple dialogs to fit better. Now can synthesize right click
events from the corner menu. Still having problems with double click though
Diffstat (limited to 'noncore/comm/keypebble/kvnc.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/comm/keypebble/kvnc.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp
index ef57366..abdb1e0 100644
--- a/noncore/comm/keypebble/kvnc.cpp
+++ b/noncore/comm/keypebble/kvnc.cpp
@@ -174,24 +174,36 @@ void KVNC::setupActions()
ctlAltDelAction = new QAction( tr("Send Contrl-Alt-Delete"), QString::null, 0, 0 );
connect( ctlAltDelAction, SIGNAL(activated()),
canvas, SLOT( sendCtlAltDel() ) );
ctlAltDelAction->addTo( cornerMenu );
ctlAltDelAction->setEnabled( false );
disconnectAction = new QAction( tr("Disconnect"), QString::null, 0, 0 );
connect( disconnectAction, SIGNAL(activated()),
this, SLOT( closeConnection() ) );
disconnectAction->addTo( cornerMenu );
disconnectAction->setEnabled( false );
+
+ doubleClickAction = new QAction( tr("Next Click is Double Click"), QString::null, 0, 0 );
+ connect( doubleClickAction, SIGNAL(activated()),
+ canvas, SLOT( markDoubleClick() ) );
+ doubleClickAction->addTo( cornerMenu );
+ doubleClickAction->setEnabled( false );
+
+ rightClickAction = new QAction( tr("Next Click is Right Click"), QString::null, 0, 0 );
+ connect( rightClickAction, SIGNAL(activated()),
+ canvas, SLOT( markRightClick() ) );
+ rightClickAction->addTo( cornerMenu );
+ rightClickAction->setEnabled( false );
}
void KVNC::toggleFullScreen()
{
if ( fullscreen ) {
canvas->releaseKeyboard();
canvas->reparent( stack, 0, QPoint(0,0), false );
canvas->setFrameStyle( QFrame::Panel | QFrame::Sunken );
setCentralWidget( stack );
stack->addWidget(canvas,get_unique_id());
stack->raiseWidget(canvas);
canvas->show();
@@ -229,44 +241,48 @@ void KVNC::showMenu()
pt.ry() -= s.height();
pt.rx() -= s.width();
cornerMenu->popup( pt );
}
void KVNC::connected()
{
static QString msg = tr( "Connected to remote host" );
statusMessage( msg );
ctlAltDelAction->setEnabled(true);
disconnectAction->setEnabled( true );
fullScreenAction->setEnabled( true );
+ doubleClickAction->setEnabled( false );
+ rightClickAction->setEnabled( true );
stack->raiseWidget(canvas);
bar->hide();
}
void KVNC::loggedIn()
{
static QString msg = tr( "Logged in to remote host" );
statusMessage( msg );
}
void KVNC::disconnected()
{
if ( fullscreen )
toggleFullScreen();
static QString msg = tr( "Connection closed" );
statusMessage( msg );
ctlAltDelAction->setEnabled(false);
disconnectAction->setEnabled( false );
fullScreenAction->setEnabled( false );
+ doubleClickAction->setEnabled( false );
+ rightClickAction->setEnabled( false );
stack->raiseWidget(bookmarkSelector);
bar->show();
}
void KVNC::statusMessage( const QString &m )
{
Global::statusMessage( m );
}
void KVNC::error( const QString &msg )
{
statusMessage( msg );