From bcb704366cb5e333a626c18c308c7e0448a8e69f Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- krdc/kremoteview.cpp | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 krdc/kremoteview.cpp (limited to 'krdc/kremoteview.cpp') diff --git a/krdc/kremoteview.cpp b/krdc/kremoteview.cpp new file mode 100644 index 00000000..fab9ed29 --- /dev/null +++ b/krdc/kremoteview.cpp @@ -0,0 +1,89 @@ +/*************************************************************************** + kremoteview.cpp - widget that shows the remote framebuffer + ------------------- + begin : Wed Dec 26 00:21:14 CET 2002 + copyright : (C) 2002-2003 by Tim Jansen + email : tim@tjansen.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "kremoteview.h" + +KRemoteView::KRemoteView(QWidget *parent, + const char *name, + WFlags f) : + QWidget(parent, name, f), + m_status(REMOTE_VIEW_DISCONNECTED) { +} + +enum RemoteViewStatus KRemoteView::status() { + return m_status; +} + +void KRemoteView::setStatus(RemoteViewStatus s) { + if (m_status == s) + return; + + if (((1+(int)m_status) != (int)s) && + (s != REMOTE_VIEW_DISCONNECTED)) { + // follow state transition rules + + if (s == REMOTE_VIEW_DISCONNECTING) { + if (m_status == REMOTE_VIEW_DISCONNECTED) + return; + } + else { + Q_ASSERT(((int) s) >= 0); + if (((int)m_status) > ((int)s) ) { + m_status = REMOTE_VIEW_DISCONNECTED; + emit statusChanged(REMOTE_VIEW_DISCONNECTED); + } + // smooth state transition + int origState = (int)m_status; + for (int i = origState; i < (int)s; i++) { + m_status = (RemoteViewStatus) i; + emit statusChanged((RemoteViewStatus) i); + } + } + } + m_status = s; + emit statusChanged(m_status); +} + +KRemoteView::~KRemoteView() { +} + +bool KRemoteView::supportsScaling() const { + return false; +} + +bool KRemoteView::supportsLocalCursor() const { + return false; +} + +void KRemoteView::showDotCursor(DotCursorState) { +} + +DotCursorState KRemoteView::dotCursorState() const { + return DOT_CURSOR_OFF; +} + +bool KRemoteView::scaling() const { + return false; +} + +void KRemoteView::enableScaling(bool) { +} + +void KRemoteView::switchFullscreen(bool) { +} + +#include "kremoteview.moc" -- cgit v1.2.1