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
) :
22 m_status(Disconnected
)
26 KRemoteView::RemoteStatus
KRemoteView::status() {
30 void KRemoteView::setStatus(KRemoteView::RemoteStatus s
) {
34 if (((1+(int)m_status
) != (int)s
) &&
35 (s
!= Disconnected
)) {
36 // follow state transition rules
38 if (s
== Disconnecting
) {
39 if (m_status
== Disconnected
)
43 Q_ASSERT(((int) s
) >= 0);
44 if (((int)m_status
) > ((int)s
) ) {
45 m_status
= Disconnected
;
46 emit
statusChanged(Disconnected
);
48 // smooth state transition
49 int origState
= (int)m_status
;
50 for (int i
= origState
; i
< (int)s
; i
++) {
51 m_status
= (RemoteStatus
) i
;
52 emit
statusChanged((RemoteStatus
) i
);
57 emit
statusChanged(m_status
);
60 KRemoteView::~KRemoteView() {
63 bool KRemoteView::supportsScaling() const {
67 bool KRemoteView::supportsLocalCursor() const {
71 void KRemoteView::showDotCursor(DotCursorState
) {
74 KRemoteView::DotCursorState
KRemoteView::dotCursorState() const {
78 bool KRemoteView::scaling() const {
82 void KRemoteView::enableScaling(bool) {
85 void KRemoteView::switchFullscreen(bool) {
88 #include "kremoteview.moc"