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

krdc

  • sources
  • kde-4.14
  • kdenetwork
  • krdc
  • nx
nxview.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2008 David Gross <gdavid.devel@gmail.com>
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 NXVIEW_H
25 #define NXVIEW_H
26 
27 #include "remoteview.h"
28 #include "nxcallbacks.h"
29 #include "nxclientthread.h"
30 #include "nxhostpreferences.h"
31 #include "nxresumesessions.h"
32 
33 #include <QX11EmbedContainer>
34 
35 #define TCP_PORT_NX 22
36 
37 class NxView : public RemoteView
38 {
39  Q_OBJECT
40 
41 public:
42  explicit NxView(QWidget *parent = 0, const KUrl &url = KUrl(), KConfigGroup configGroup = KConfigGroup());
43  virtual ~NxView();
44 
45  // Start closing the connection
46  virtual void startQuitting();
47  // If we are currently closing the connection
48  virtual bool isQuitting();
49  // Open a connection
50  virtual bool start();
51 
52  // Returns the size of the remote view
53  virtual QSize framebufferSize();
54  // Returns the suggested size of the remote view
55  QSize sizeHint() const;
56  virtual void setGrabAllKeys(bool grabAllKeys);
57 
58  HostPreferences* hostPreferences();
59 
60 public slots:
61  void switchFullscreen(bool on);
62  void hasXid(int xid);
63  void handleProgress(int id, QString msg);
64  void handleSuspendedSessions(QList<nxcl::NXResumeData> sessions);
65  void handleNoSessions();
66  void handleAtCapacity();
67  void handleNewSession();
68  void handleResumeSession(QString id);
69  void connectionOpened();
70  void connectionClosed();
71 
72 protected:
73  bool eventFilter(QObject *obj, QEvent *event);
74 
75 private:
76  // Thread that manage NX connection
77  NxClientThread m_clientThread;
78  // NX Callbacks
79  NxCallbacks m_callbacks;
80  // If we are currently closing the connection
81  bool m_quitFlag;
82  // Widget which contains the NX Window
83  QX11EmbedContainer *m_container;
84  // Dialog which allows user to choose NX preferences.
85  NxHostPreferences *m_hostPreferences;
86  // Dialog which allows user to resume NX sessions.
87  NxResumeSessions m_resumeSessions;
88 };
89 
90 #endif
NxClientThread
Definition: nxclientthread.h:44
NxHostPreferences
Definition: nxhostpreferences.h:30
NxResumeSessions
Definition: nxresumesessions.h:34
NxView::start
virtual bool start()
Initialize the view (for example by showing configuration dialogs to the user) and start connecting...
Definition: nxview.cpp:111
NxView::sizeHint
QSize sizeHint() const
Definition: nxview.cpp:176
QEvent
QWidget
NxView::handleSuspendedSessions
void handleSuspendedSessions(QList< nxcl::NXResumeData > sessions)
Definition: nxview.cpp:224
NxView::isQuitting
virtual bool isQuitting()
Checks whether the view is currently quitting.
Definition: nxview.cpp:106
NxView::handleNewSession
void handleNewSession()
Definition: nxview.cpp:244
NxView::handleResumeSession
void handleResumeSession(QString id)
Definition: nxview.cpp:250
NxView::setGrabAllKeys
virtual void setGrabAllKeys(bool grabAllKeys)
Enables/disables grabbing all possible keys.
Definition: nxview.cpp:187
NxView::eventFilter
bool eventFilter(QObject *obj, QEvent *event)
Definition: nxview.cpp:73
NxView::startQuitting
virtual void startQuitting()
Initiate the disconnection.
Definition: nxview.cpp:88
NxView::hostPreferences
HostPreferences * hostPreferences()
Returns the current host preferences of this view.
Definition: nxview.cpp:166
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
nxclientthread.h
NxView::handleNoSessions
void handleNoSessions()
Definition: nxview.cpp:233
NxView::hasXid
void hasXid(int xid)
Definition: nxview.cpp:198
NxView::switchFullscreen
void switchFullscreen(bool on)
Definition: nxview.cpp:182
QObject
NxView::connectionClosed
void connectionClosed()
Definition: nxview.cpp:271
nxresumesessions.h
NxView::connectionOpened
void connectionOpened()
Definition: nxview.cpp:257
QX11EmbedContainer
QString
QList
RemoteView::url
KUrl url()
Definition: remoteview.cpp:193
NxView::handleProgress
void handleProgress(int id, QString msg)
Definition: nxview.cpp:203
QSize
HostPreferences
Definition: hostpreferences.h:42
NxView::NxView
NxView(QWidget *parent=0, const KUrl &url=KUrl(), KConfigGroup configGroup=KConfigGroup())
Definition: nxview.cpp:36
NxView::handleAtCapacity
void handleAtCapacity()
Definition: nxview.cpp:239
remoteview.h
NxCallbacks
Definition: nxcallbacks.h:35
NxView::~NxView
virtual ~NxView()
Definition: nxview.cpp:67
NxView::framebufferSize
virtual QSize framebufferSize()
Returns the resolution of the remote framebuffer.
Definition: nxview.cpp:171
QObject::parent
QObject * parent() const
NxView
Definition: nxview.h:37
QWidget::event
virtual bool event(QEvent *event)
nxhostpreferences.h
nxcallbacks.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:34 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