• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

krdc

  • sources
  • kde-4.12
  • kdenetwork
  • krdc
  • vnc
vncview.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2007 - 2013 Urs Wolfer <uwolfer @ kde.org>
4 **
5 ** This file is part of KDE.
6 **
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.
11 **
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.
16 **
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.
21 **
22 ****************************************************************************/
23 
24 #ifndef VNCVIEW_H
25 #define VNCVIEW_H
26 
27 #include "remoteview.h"
28 #include "vncclientthread.h"
29 
30 #ifdef QTONLY
31  class KConfigGroup{};
32 #else
33  #include "vnchostpreferences.h"
34 #endif
35 
36 #include <QClipboard>
37 
38 extern "C" {
39 #include <rfb/rfbclient.h>
40 }
41 
42 class VncView: public RemoteView
43 {
44  Q_OBJECT
45 
46 public:
47  explicit VncView(QWidget *parent = 0, const KUrl &url = KUrl(), KConfigGroup configGroup = KConfigGroup());
48  ~VncView();
49 
50  QSize framebufferSize();
51  QSize sizeHint() const;
52  QSize minimumSizeHint() const;
53  void startQuitting();
54  bool isQuitting();
55  bool start();
56  bool supportsScaling() const;
57  bool supportsLocalCursor() const;
58 
59 #ifndef QTONLY
60  HostPreferences* hostPreferences();
61 #endif
62 
63  void setViewOnly(bool viewOnly);
64  void showDotCursor(DotCursorState state);
65  void enableScaling(bool scale);
66 
67  virtual void updateConfiguration();
68 
69 public slots:
70  void scaleResize(int w, int h);
71 
72 protected:
73  void paintEvent(QPaintEvent *event);
74  bool event(QEvent *event);
75  void resizeEvent(QResizeEvent *event);
76  bool eventFilter(QObject *obj, QEvent *event);
77 
78 private:
79  VncClientThread vncThread;
80  QClipboard *m_clipboard;
81  bool m_initDone;
82  int m_buttonMask;
83  QMap<unsigned int, bool> m_mods;
84  int m_x, m_y, m_w, m_h;
85  bool m_repaint;
86  bool m_quitFlag;
87  bool m_firstPasswordTry;
88  bool m_dontSendClipboard;
89  qreal m_horizontalFactor;
90  qreal m_verticalFactor;
91 #ifndef QTONLY
92  VncHostPreferences *m_hostPreferences;
93 #endif
94  QImage m_frame;
95  bool m_forceLocalCursor;
96 
97  void keyEventHandler(QKeyEvent *e);
98  void unpressModifiers();
99  void wheelEventHandler(QWheelEvent *event);
100  void mouseEventHandler(QMouseEvent *event);
101 
102 private slots:
103  void updateImage(int x, int y, int w, int h);
104  void setCut(const QString &text);
105  void requestPassword(bool includingUsername);
106  void outputErrorMessage(const QString &message);
107  void clipboardDataChanged();
108 };
109 
110 #endif
VncView::sizeHint
QSize sizeHint() const
Definition: vncview.cpp:111
VncView::paintEvent
void paintEvent(QPaintEvent *event)
Definition: vncview.cpp:442
vnchostpreferences.h
VncView::scaleResize
void scaleResize(int w, int h)
Definition: vncview.cpp:121
VncView::startQuitting
void startQuitting()
Initiate the disconnection.
Definition: vncview.cpp:153
QWidget
VncView::minimumSizeHint
QSize minimumSizeHint() const
Definition: vncview.cpp:116
VncView::hostPreferences
HostPreferences * hostPreferences()
Returns the current host preferences of this view.
Definition: vncview.cpp:317
QObject
VncView::setViewOnly
void setViewOnly(bool viewOnly)
Enables/disables the view-only mode.
Definition: vncview.cpp:397
VncHostPreferences
Definition: vnchostpreferences.h:30
RemoteView
Generic widget that displays a remote framebuffer.
Definition: remoteview.h:59
VncView::VncView
VncView(QWidget *parent=0, const KUrl &url=KUrl(), KConfigGroup configGroup=KConfigGroup())
Definition: vncview.cpp:53
VncView::resizeEvent
void resizeEvent(QResizeEvent *event)
Definition: vncview.cpp:485
vncclientthread.h
VncView::event
bool event(QEvent *event)
Definition: vncview.cpp:491
VncView::framebufferSize
QSize framebufferSize()
Returns the resolution of the remote framebuffer.
Definition: vncview.cpp:106
VncView::supportsLocalCursor
bool supportsLocalCursor() const
Checks whether the backend supports the concept of local cursors.
Definition: vncview.cpp:227
RemoteView::url
KUrl url()
Definition: remoteview.cpp:193
VncView::showDotCursor
void showDotCursor(DotCursorState state)
Sets the state of the dot cursor, if supported by the backend.
Definition: vncview.cpp:409
RemoteView::viewOnly
virtual bool viewOnly()
Checks whether the view is in view-only mode.
Definition: remoteview.cpp:133
HostPreferences
Definition: hostpreferences.h:42
VncView::isQuitting
bool isQuitting()
Checks whether the view is currently quitting.
Definition: vncview.cpp:186
VncView::eventFilter
bool eventFilter(QObject *obj, QEvent *event)
Definition: vncview.cpp:90
VncView::supportsScaling
bool supportsScaling() const
Checks whether the backend supports scaling.
Definition: vncview.cpp:222
VncView::updateConfiguration
virtual void updateConfiguration()
Called when the configuration is changed.
Definition: vncview.cpp:145
VncView::enableScaling
void enableScaling(bool scale)
Called to enable or disable scaling.
Definition: vncview.cpp:416
remoteview.h
RemoteView::DotCursorState
DotCursorState
Describes the state of a local cursor, if there is such a concept in the backend. ...
Definition: remoteview.h:84
VncView::start
bool start()
Initialize the view (for example by showing configuration dialogs to the user) and start connecting...
Definition: vncview.cpp:191
VncClientThread
Definition: vncclientthread.h:96
VncView
Definition: vncview.h:42
VncView::~VncView
~VncView()
Definition: vncview.cpp:85
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:54:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

krdc

Skip menu "krdc"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal