• 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
  • core
remoteview.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2002-2003 Tim Jansen <tim@tjansen.de>
4 ** Copyright (C) 2007-2008 Urs Wolfer <uwolfer @ kde.org>
5 **
6 ** This file is part of KDE.
7 **
8 ** This program is free software; you can redistribute it and/or modify
9 ** it under the terms of the GNU General Public License as published by
10 ** the Free Software Foundation; either version 2 of the License, or
11 ** (at your option) any later version.
12 **
13 ** This program is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ** GNU General Public License for more details.
17 **
18 ** You should have received a copy of the GNU General Public License
19 ** along with this program; see the file COPYING. If not, write to
20 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 ** Boston, MA 02110-1301, USA.
22 **
23 ****************************************************************************/
24 
25 #ifndef REMOTEVIEW_H
26 #define REMOTEVIEW_H
27 
28 #ifdef QTONLY
29  #include <QUrl>
30  #define KUrl QUrl
31  #define KRDCCORE_EXPORT
32 #else
33  #include <KDE/KUrl>
34  #include <KDE/KWallet/Wallet>
35  #include <krdc_export.h>
36 #endif
37 
38 #include <QWidget>
39 
40 class HostPreferences;
41 
59 class KRDCCORE_EXPORT RemoteView : public QWidget
60 {
61  Q_OBJECT
62 
63 public:
64 
65  Q_ENUMS(Quality)
66 
67  enum Quality {
68  Unknown,
69  High,
70  Medium,
71  Low
72  };
73 
82  Q_ENUMS(DotCursorState)
83 
84  enum DotCursorState {
85  CursorOn,
86  CursorOff,
87  CursorAuto
89  };
90 
106  Q_ENUMS(RemoteStatus)
107 
108  enum RemoteStatus {
109  Connecting = 0,
110  Authenticating = 1,
111  Preparing = 2,
112  Connected = 3,
113  Disconnecting = -1,
114  Disconnected = -2
115  };
116 
117  Q_ENUMS(ErrorCode)
118 
119  enum ErrorCode {
120  None = 0,
121  Internal,
122  Connection,
123  Protocol,
124  IO,
125  Name,
126  NoServer,
127  ServerBlocked,
128  Authentication
129  };
130 
131  virtual ~RemoteView();
132 
139  virtual bool supportsScaling() const;
140 
148  virtual bool scaling() const;
149 
158  virtual bool supportsLocalCursor() const;
159 
168  virtual void showDotCursor(DotCursorState state);
169 
177  virtual DotCursorState dotCursorState() const;
178 
183  virtual bool viewOnly();
184 
188  virtual bool grabAllKeys();
189 
200  virtual QSize framebufferSize();
201 
207  virtual void startQuitting();
208 
215  virtual bool isQuitting();
216 
220  virtual QString host();
221 
225  virtual int port();
226 
240  virtual bool start() = 0;
241 
246  virtual void updateConfiguration();
247 
251  virtual QPixmap takeScreenshot();
252 
253 #ifndef QTONLY
254 
257  virtual HostPreferences* hostPreferences() = 0;
258 #endif
259 
265  RemoteStatus status();
266 
270  KUrl url();
271 
272 public slots:
281  virtual void enableScaling(bool scale);
282 
291  virtual void setViewOnly(bool viewOnly);
292 
299  virtual void setGrabAllKeys(bool grabAllKeys);
300 
307  virtual void switchFullscreen(bool on);
308 
313  virtual void keyEvent(QKeyEvent *event);
314 
319  virtual void scaleResize(int w, int h);
320 
321 Q_SIGNALS:
328  void framebufferSizeChanged(int w, int h);
329 
333  void connected();
334 
338  void disconnected();
339 
343  void disconnectedError();
344 
348  void errorMessage(const QString &title, const QString &message);
349 
354  void statusChanged(RemoteView::RemoteStatus s);
355 
360  void showingPasswordDialog(bool b);
361 
369  void mouseStateChanged(int x, int y, int buttonMask);
370 
371 protected:
372  RemoteView(QWidget *parent = 0);
373 
374  void focusInEvent(QFocusEvent *event);
375  void focusOutEvent(QFocusEvent *event);
376 
380  RemoteStatus m_status;
381 
394  virtual void setStatus(RemoteStatus s);
395 
396  QCursor localDotCursor() const;
397 
398  QString m_host;
399  int m_port;
400  bool m_viewOnly;
401  bool m_grabAllKeys;
402  bool m_scale;
403  bool m_keyboardIsGrabbed;
404  KUrl m_url;
405 
406 #ifndef QTONLY
407  QString readWalletPassword(bool fromUserNameOnly = false);
408  void saveWalletPassword(const QString &password, bool fromUserNameOnly = false);
409  KWallet::Wallet *m_wallet;
410 #endif
411 
412  DotCursorState m_dotCursorState;
413 };
414 
415 #endif
RemoteView::m_grabAllKeys
bool m_grabAllKeys
Definition: remoteview.h:401
RemoteView::CursorOff
Never show local cursor, only the remote one.
Definition: remoteview.h:86
RemoteView::ServerBlocked
Definition: remoteview.h:127
RemoteView::Quality
Quality
Definition: remoteview.h:67
RemoteView::RemoteStatus
RemoteStatus
State of the connection.
Definition: remoteview.h:108
RemoteView::Unknown
Definition: remoteview.h:68
RemoteView::Connection
Definition: remoteview.h:122
RemoteView::Name
Definition: remoteview.h:125
QWidget
RemoteView::CursorOn
Always show local cursor (and the remote one).
Definition: remoteview.h:85
RemoteView::Medium
Definition: remoteview.h:70
RemoteView::m_port
int m_port
Definition: remoteview.h:399
RemoteView::m_host
QString m_host
Definition: remoteview.h:398
RemoteView
Generic widget that displays a remote framebuffer.
Definition: remoteview.h:59
RemoteView::IO
Definition: remoteview.h:124
KRDCCORE_EXPORT
#define KRDCCORE_EXPORT
Definition: krdc_export.h:35
RemoteView::Protocol
Definition: remoteview.h:123
RemoteView::m_scale
bool m_scale
Definition: remoteview.h:402
RemoteView::m_keyboardIsGrabbed
bool m_keyboardIsGrabbed
Definition: remoteview.h:403
RemoteView::NoServer
Definition: remoteview.h:126
krdc_export.h
RemoteView::High
Definition: remoteview.h:69
RemoteView::m_status
RemoteStatus m_status
The status of the remote view.
Definition: remoteview.h:380
HostPreferences
Definition: hostpreferences.h:42
RemoteView::ErrorCode
ErrorCode
Definition: remoteview.h:119
RemoteView::m_viewOnly
bool m_viewOnly
Definition: remoteview.h:400
RemoteView::m_url
KUrl m_url
Definition: remoteview.h:404
RemoteView::m_dotCursorState
DotCursorState m_dotCursorState
Definition: remoteview.h:412
RemoteView::m_wallet
KWallet::Wallet * m_wallet
Definition: remoteview.h:409
RemoteView::DotCursorState
DotCursorState
Describes the state of a local cursor, if there is such a concept in the backend. ...
Definition: remoteview.h:84
RemoteView::Internal
Definition: remoteview.h:121
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