blob: cd887299af9f7953ee3151872ffa868711ed930e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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(TQWidget *tqparent,
const char *name,
WFlags f) :
TQWidget(tqparent, name, f),
m_status(REMOTE_VIEW_DISCONNECTED) {
}
enum RemoteViewtqStatus KRemoteView::status() {
return m_status;
}
void KRemoteView::settqStatus(RemoteViewtqStatus 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 = (RemoteViewtqStatus) i;
emit statusChanged((RemoteViewtqStatus) 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"
|