diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /krdc/kremoteview.cpp | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
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
Diffstat (limited to 'krdc/kremoteview.cpp')
-rw-r--r-- | krdc/kremoteview.cpp | 89 |
1 files changed, 89 insertions, 0 deletions
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 : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * 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" |