1 /***************************************************************************
2 kremoteview.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 "kremoteview.h"
20 KRemoteView::KRemoteView(QWidget
*parent
,
23 m_status(REMOTE_VIEW_DISCONNECTED
)
27 enum RemoteViewStatus
KRemoteView::status() {
31 void KRemoteView::setStatus(RemoteViewStatus s
) {
35 if (((1+(int)m_status
) != (int)s
) &&
36 (s
!= REMOTE_VIEW_DISCONNECTED
)) {
37 // follow state transition rules
39 if (s
== REMOTE_VIEW_DISCONNECTING
) {
40 if (m_status
== REMOTE_VIEW_DISCONNECTED
)
44 Q_ASSERT(((int) s
) >= 0);
45 if (((int)m_status
) > ((int)s
) ) {
46 m_status
= REMOTE_VIEW_DISCONNECTED
;
47 emit
statusChanged(REMOTE_VIEW_DISCONNECTED
);
49 // smooth state transition
50 int origState
= (int)m_status
;
51 for (int i
= origState
; i
< (int)s
; i
++) {
52 m_status
= (RemoteViewStatus
) i
;
53 emit
statusChanged((RemoteViewStatus
) i
);
58 emit
statusChanged(m_status
);
61 KRemoteView::~KRemoteView() {
64 bool KRemoteView::supportsScaling() const {
68 bool KRemoteView::supportsLocalCursor() const {
72 void KRemoteView::showDotCursor(DotCursorState
) {
75 DotCursorState
KRemoteView::dotCursorState() const {
76 return DOT_CURSOR_OFF
;
79 bool KRemoteView::scaling() const {
83 void KRemoteView::enableScaling(bool) {
86 void KRemoteView::switchFullscreen(bool) {
89 #include "kremoteview.moc"