• 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
  • rdp
rdpview.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2002 Arend van Beelen jr. <arend@auton.nl>
4 ** Copyright (C) 2007 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 RDPVIEW_H
26 #define RDPVIEW_H
27 
28 #include "remoteview.h"
29 
30 #include "rdphostpreferences.h"
31 
32 #include <QProcess>
33 
34 #define TCP_PORT_RDP 3389
35 
36 class RdpView;
37 
38 class QX11EmbedContainer;
39 
40 class RdpView : public RemoteView
41 {
42  Q_OBJECT
43 
44 public:
45  explicit RdpView(QWidget *parent = 0,
46  const KUrl &url = KUrl(),
47  KConfigGroup configGroup = KConfigGroup(),
48  const QString &user = QString(),
49  const QString &password = QString());
50 
51  virtual ~RdpView();
52 
53  // functions regarding the window
54  virtual QSize framebufferSize(); // returns the size of the remote view
55  QSize sizeHint() const; // returns the suggested size
56 
57  // functions regarding the connection
58  virtual void startQuitting(); // start closing the connection
59  virtual bool isQuitting(); // are we currently closing the connection?
60  virtual bool start(); // open a connection
61  void setGrabAllKeys(bool grabAllKeys);
62 
63  HostPreferences* hostPreferences();
64 
65  virtual QPixmap takeScreenshot();
66 
67 public slots:
68  virtual void switchFullscreen(bool on);
69 
70 protected:
71  bool eventFilter(QObject *obj, QEvent *event);
72 
73 private:
74  QString keymapToXfreerdp(const QString &keyboadLayout);
75  QHash<QString, QString> initKeymapToXfreerdp();
76 
77  QString m_name;
78  QString m_user;
79  QString m_password;
80 
81  bool m_quitFlag;
82  QX11EmbedContainer *m_container; // container for the xfreerdp window
83  QProcess *m_process; // xfreerdp process
84 
85  RdpHostPreferences *m_hostPreferences;
86 
87 private slots:
88  void connectionOpened(); // called if xfreerdp started
89  void connectionClosed(); // called if xfreerdp quits
90  void connectionError(); // called if xfreerdp quits with error
91  void processError(QProcess::ProcessError error); // called if xfreerdp dies
92  void receivedStandardError(); // catches xfreerdp debug output
93  void receivedStandardOutput(); // catches xfreerdp output
94 };
95 
96 static QHash<QString, QString> keymapToXfreerdpHash;
97 
98 #endif
RdpHostPreferences
Definition: rdphostpreferences.h:31
RdpView::hostPreferences
HostPreferences * hostPreferences()
Returns the current host preferences of this view.
Definition: rdpview.cpp:259
RdpView::start
virtual bool start()
Initialize the view (for example by showing configuration dialogs to the user) and start connecting...
Definition: rdpview.cpp:109
RdpView::eventFilter
bool eventFilter(QObject *obj, QEvent *event)
Definition: rdpview.cpp:69
QWidget
QObject
RemoteView::grabAllKeys
virtual bool grabAllKeys()
Checks whether grabbing all possible keys is enabled.
Definition: remoteview.cpp:143
RemoteView
Generic widget that displays a remote framebuffer.
Definition: remoteview.h:59
RdpView
Definition: rdpview.h:40
RdpView::framebufferSize
virtual QSize framebufferSize()
Returns the resolution of the remote framebuffer.
Definition: rdpview.cpp:83
RdpView::isQuitting
virtual bool isQuitting()
Checks whether the view is currently quitting.
Definition: rdpview.cpp:104
RdpView::takeScreenshot
virtual QPixmap takeScreenshot()
Definition: rdpview.cpp:285
RdpView::switchFullscreen
virtual void switchFullscreen(bool on)
Definition: rdpview.cpp:264
RemoteView::url
KUrl url()
Definition: remoteview.cpp:193
keymapToXfreerdpHash
static QHash< QString, QString > keymapToXfreerdpHash
Definition: rdpview.h:96
RdpView::RdpView
RdpView(QWidget *parent=0, const KUrl &url=KUrl(), KConfigGroup configGroup=KConfigGroup(), const QString &user=QString(), const QString &password=QString())
Definition: rdpview.cpp:38
rdphostpreferences.h
HostPreferences
Definition: hostpreferences.h:42
RdpView::startQuitting
virtual void startQuitting()
Initiate the disconnection.
Definition: rdpview.cpp:93
RdpView::setGrabAllKeys
void setGrabAllKeys(bool grabAllKeys)
Enables/disables grabbing all possible keys.
Definition: rdpview.cpp:380
RdpView::~RdpView
virtual ~RdpView()
Definition: rdpview.cpp:62
remoteview.h
RdpView::sizeHint
QSize sizeHint() const
Definition: rdpview.cpp:88
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