Update versions of AIM dlls this allows AIM to send us whole directory.
[kdenetwork.git] / krdc / kremoteview.cpp
blob9b5a7a9b391d54a5bb5652f5e01620735a7e0a1c
1 /***************************************************************************
2 kremoteview.cpp - widget that shows the remote framebuffer
3 -------------------
4 begin : Wed Dec 26 00:21:14 CET 2002
5 copyright : (C) 2002-2003 by Tim Jansen
6 email : tim@tjansen.de
7 ***************************************************************************/
9 /***************************************************************************
10 * *
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. *
15 * *
16 ***************************************************************************/
18 #include "kremoteview.h"
20 KRemoteView::KRemoteView(QWidget *parent,
21 Qt::WFlags f) :
22 QWidget(parent, f),
23 m_status(REMOTE_VIEW_DISCONNECTED)
27 enum RemoteViewStatus KRemoteView::status() {
28 return m_status;
31 void KRemoteView::setStatus(RemoteViewStatus s) {
32 if (m_status == s)
33 return;
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)
41 return;
43 else {
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);
57 m_status = s;
58 emit statusChanged(m_status);
61 KRemoteView::~KRemoteView() {
64 bool KRemoteView::supportsScaling() const {
65 return false;
68 bool KRemoteView::supportsLocalCursor() const {
69 return false;
72 void KRemoteView::showDotCursor(DotCursorState) {
75 DotCursorState KRemoteView::dotCursorState() const {
76 return DOT_CURSOR_OFF;
79 bool KRemoteView::scaling() const {
80 return false;
83 void KRemoteView::enableScaling(bool) {
86 void KRemoteView::switchFullscreen(bool) {
89 #include "kremoteview.moc"