1 /****************************************************************************
3 ** Copyright (C) 2007-2008 Urs Wolfer <uwolfer @ kde.org>
5 ** This file is part of KDE.
7 ** This program is free software; you can redistribute it and/or modify
8 ** it under the terms of the GNU General Public License as published by
9 ** the Free Software Foundation; either version 2 of the License, or
10 ** (at your option) any later version.
12 ** This program is distributed in the hope that it will be useful,
13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ** GNU General Public License for more details.
17 ** You should have received a copy of the GNU General Public License
18 ** along with this program; see the file COPYING. If not, write to
19 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 ** Boston, MA 02110-1301, USA.
22 ****************************************************************************/
27 #include "remoteview.h"
28 #include "vncclientthread.h"
31 #include "vnchostpreferences.h"
37 #include <rfb/rfbclient.h>
40 class VncView
: public RemoteView
45 explicit VncView(QWidget
*parent
= 0, const KUrl
&url
= KUrl());
48 QSize
framebufferSize();
49 QSize
sizeHint() const;
50 QSize
minimumSizeHint() const;
54 bool supportsLocalCursor() const;
55 void keyEvent(QKeyEvent
*e
);
58 void paintEvent(QPaintEvent
*event
);
59 void focusOutEvent(QFocusEvent
*event
);
60 void mouseMoveEvent(QMouseEvent
*event
);
61 void mousePressEvent(QMouseEvent
*event
);
62 void mouseDoubleClickEvent(QMouseEvent
*event
);
63 void mouseReleaseEvent(QMouseEvent
*event
);
64 void wheelEvent(QWheelEvent
*event
);
65 void keyPressEvent(QKeyEvent
*event
);
66 void keyReleaseEvent(QKeyEvent
*event
);
67 bool eventFilter(QObject
*obj
, QEvent
*event
);
70 VncClientThread vncThread
;
71 QClipboard
*m_clipboard
;
74 int m_x
, m_y
, m_w
, m_h
;
77 bool m_firstPasswordTry
;
78 bool m_dontSendClipboard
;
80 VncHostPreferences
*m_hostPreferences
;
85 void updateImage(int x
, int y
, int w
, int h
);
86 void setCut(const QString
&text
);
87 void requestPassword();
88 void outputErrorMessage(const QString
&message
);
89 void mouseEvent(QMouseEvent
*event
);
90 void clipboardSelectionChanged();
91 void clipboardDataChanged();