1 /****************************************************************************
3 ** Copyright (C) 2007 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 "vnchostpreferences.h"
29 #include "vncclientthread.h"
34 #include <rfb/rfbclient.h>
37 class VncView
: public RemoteView
42 explicit VncView(QWidget
*parent
= 0, const KUrl
&url
= KUrl());
45 QSize
framebufferSize();
46 QSize
sizeHint() const;
47 QSize
minimumSizeHint() const;
51 bool supportsLocalCursor() const;
52 void keyEvent(QKeyEvent
*e
);
55 void paintEvent(QPaintEvent
*event
);
56 void focusOutEvent(QFocusEvent
*event
);
57 void mouseMoveEvent(QMouseEvent
*event
);
58 void mousePressEvent(QMouseEvent
*event
);
59 void mouseDoubleClickEvent(QMouseEvent
*event
);
60 void mouseReleaseEvent(QMouseEvent
*event
);
61 void wheelEvent(QWheelEvent
*event
);
62 void keyPressEvent(QKeyEvent
*event
);
63 void keyReleaseEvent(QKeyEvent
*event
);
64 bool eventFilter(QObject
*obj
, QEvent
*event
);
67 VncClientThread vncThread
;
68 QClipboard
*m_clipboard
;
71 int m_x
, m_y
, m_w
, m_h
;
74 bool m_firstPasswordTry
;
75 bool m_dontSendClipboard
;
76 VncHostPreferences
*m_hostPreferences
;
80 void updateImage(int x
, int y
, int w
, int h
);
81 void setCut(const QString
&text
);
82 void requestPassword();
83 void outputErrorMessage(const QString
&message
);
84 void mouseEvent(QMouseEvent
*event
);
85 void clipboardSelectionChanged();
86 void clipboardDataChanged();