1
/***************************************************************************
2
qremoteview.cpp - widget that shows the remote framebuffer
4
begin : Wed Dec 26 00:21:14 CET 2002
5
copyright : (C) 2002-2003 by Tim Jansen
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
18
#include "qremoteview.h"
20
#include "qremoteview.moc"
23
QRemoteView::QRemoteView(QWidget *parent,
26
QWidget(parent, name, f),
27
m_status(REMOTE_VIEW_DISCONNECTED) {
30
enum RemoteViewStatus QRemoteView::status() {
34
void QRemoteView::setStatus(RemoteViewStatus s) {
38
if (((1+(int)m_status) != (int)s) &&
39
(s != REMOTE_VIEW_DISCONNECTED)) {
40
// follow state transition rules
42
if (s == REMOTE_VIEW_DISCONNECTING) {
43
if (m_status == REMOTE_VIEW_DISCONNECTED)
47
Q_ASSERT(((int) s) >= 0);
48
if (((int)m_status) > ((int)s) ) {
49
m_status = REMOTE_VIEW_DISCONNECTED;
50
emit statusChanged(REMOTE_VIEW_DISCONNECTED);
52
// smooth state transition
53
int origState = (int)m_status;
54
for (int i = origState; i < (int)s; i++) {
55
m_status = (RemoteViewStatus) i;
56
emit statusChanged((RemoteViewStatus) i);
61
emit statusChanged(m_status);
64
QRemoteView::~QRemoteView() {
67
bool QRemoteView::supportsScaling() const {
71
bool QRemoteView::supportsLocalCursor() const {
75
void QRemoteView::showDotCursor(DotCursorState) {
78
DotCursorState QRemoteView::dotCursorState() const {
79
return DOT_CURSOR_OFF;
82
bool QRemoteView::scaling() const {
86
void QRemoteView::enableScaling(bool) {
89
void QRemoteView::switchFullscreen(bool) {