• 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.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2002 Arend van Beelen jr. <arend@auton.nl>
4 ** Copyright (C) 2007 - 2012 Urs Wolfer <uwolfer @ kde.org>
5 ** Copyright (C) 2012 AceLan Kao <acelan @ acelan.idv.tw>
6 **
7 ** This file is part of KDE.
8 **
9 ** This program is free software; you can redistribute it and/or modify
10 ** it under the terms of the GNU General Public License as published by
11 ** the Free Software Foundation; either version 2 of the License, or
12 ** (at your option) any later version.
13 **
14 ** This program is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ** GNU General Public License for more details.
18 **
19 ** You should have received a copy of the GNU General Public License
20 ** along with this program; see the file COPYING. If not, write to
21 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 ** Boston, MA 02110-1301, USA.
23 **
24 ****************************************************************************/
25 
26 #include "rdpview.h"
27 
28 #include "settings.h"
29 
30 #include <KInputDialog>
31 #include <KMessageBox>
32 #include <KPasswordDialog>
33 #include <KShell>
34 
35 #include <QX11EmbedContainer>
36 #include <QEvent>
37 
38 RdpView::RdpView(QWidget *parent,
39  const KUrl &url,
40  KConfigGroup configGroup,
41  const QString &user, const QString &password)
42  : RemoteView(parent),
43  m_user(user),
44  m_password(password),
45  m_quitFlag(false),
46  m_process(NULL)
47 {
48  m_url = url;
49  m_host = url.host();
50  m_port = url.port();
51 
52  if (m_port <= 0) {
53  m_port = TCP_PORT_RDP;
54  }
55 
56  m_container = new QX11EmbedContainer(this);
57  m_container->installEventFilter(this);
58 
59  m_hostPreferences = new RdpHostPreferences(configGroup, this);
60 }
61 
62 RdpView::~RdpView()
63 {
64  startQuitting();
65 }
66 
67 // filter out key and mouse events to the container if we are view only
68 //FIXME: X11 events are passed to the app before getting caught in the Qt event processing
69 bool RdpView::eventFilter(QObject *obj, QEvent *event)
70 {
71  if (m_viewOnly) {
72  if (event->type() == QEvent::KeyPress ||
73  event->type() == QEvent::KeyRelease ||
74  event->type() == QEvent::MouseButtonDblClick ||
75  event->type() == QEvent::MouseButtonPress ||
76  event->type() == QEvent::MouseButtonRelease ||
77  event->type() == QEvent::MouseMove)
78  return true;
79  }
80  return RemoteView::eventFilter(obj, event);
81 }
82 
83 QSize RdpView::framebufferSize()
84 {
85  return m_container->minimumSizeHint();
86 }
87 
88 QSize RdpView::sizeHint() const
89 {
90  return maximumSize();
91 }
92 
93 void RdpView::startQuitting()
94 {
95  kDebug(5012) << "About to quit";
96  m_quitFlag = true;
97  if (m_process) {
98  m_process->terminate();
99  m_process->waitForFinished(1000);
100  m_container->discardClient();
101  }
102 }
103 
104 bool RdpView::isQuitting()
105 {
106  return m_quitFlag;
107 }
108 
109 bool RdpView::start()
110 {
111  m_container->show();
112 
113  if (m_url.userName().isEmpty()) {
114  QString userName;
115  bool ok = false;
116 
117  userName = KInputDialog::getText(i18n("Enter Username"),
118  i18n("Please enter the username you would like to use for login."),
119  Settings::defaultRdpUserName(), &ok, this);
120 
121  if (ok) {
122  m_url.setUserName(userName);
123  }
124  }
125 
126  if (!m_url.userName().isEmpty()) {
127  const bool useLdapLogin = Settings::recognizeLdapLogins() && m_url.userName().contains('\\');
128  kDebug(5012) << "Is LDAP login:" << useLdapLogin << m_url.userName();
129 
130  QString walletPassword = QString();
131  if (m_hostPreferences->walletSupport()) {
132  walletPassword = readWalletPassword(useLdapLogin);
133  }
134  if (!walletPassword.isNull()) {
135  m_url.setPassword(walletPassword);
136  } else {
137  KPasswordDialog dialog(this);
138  dialog.setPrompt(i18n("Access to the system requires a password."));
139  if (dialog.exec() == KPasswordDialog::Accepted) {
140  m_url.setPassword(dialog.password());
141 
142  if (m_hostPreferences->walletSupport()) {
143  saveWalletPassword(dialog.password(), useLdapLogin);
144  }
145  }
146  }
147  }
148 
149  m_process = new QProcess(m_container);
150 
151  QStringList arguments;
152 
153  int width, height;
154  if (m_hostPreferences->width() > 0) {
155  width = m_hostPreferences->width();
156  height = m_hostPreferences->height();
157  } else {
158  width = this->parentWidget()->size().width();
159  height = this->parentWidget()->size().height();
160  }
161  arguments << "-g" << QString::number(width) + 'x' + QString::number(height);
162 
163  arguments << "-k" << keymapToXfreerdp(m_hostPreferences->keyboardLayout());
164 
165  if (!m_url.userName().isEmpty()) {
166  // if username contains a domain, it needs to be set with another parameter
167  if (m_url.userName().contains('\\')) {
168  const QStringList splittedName = m_url.userName().split('\\');
169  arguments << "-d" << splittedName.at(0);
170  arguments << "-u" << splittedName.at(1);
171  } else {
172  arguments << "-u" << m_url.userName();
173  }
174  } else {
175  arguments << "-u" << "";
176  }
177 
178  if (!m_url.password().isNull())
179  arguments << "-p" << m_url.password();
180 
181  arguments << "-D"; // request the window has no decorations
182  arguments << "-X" << QString::number(m_container->winId());
183  arguments << "-a" << QString::number((m_hostPreferences->colorDepth() + 1) * 8);
184 
185  switch (m_hostPreferences->sound()) {
186  case 1:
187  arguments << "-o";
188  break;
189  case 0:
190  arguments << "--plugin" << "rdpsnd";
191  break;
192  case 2:
193  default:
194  break;
195  }
196 
197  if (!m_hostPreferences->shareMedia().isEmpty()) {
198  QStringList shareMedia;
199  shareMedia << "--plugin" << "rdpdr" << "--data" << "disk:media:" + m_hostPreferences->shareMedia() << "--";
200  arguments += shareMedia;
201  }
202 
203  QString performance;
204  switch (m_hostPreferences->performance()) {
205  case 0:
206  performance = 'm';
207  break;
208  case 1:
209  performance = 'b';
210  break;
211  case 2:
212  performance = 'l';
213  break;
214  default:
215  break;
216  }
217 
218  arguments << "-x" << performance;
219 
220  if (m_hostPreferences->console()) {
221  arguments << "-0";
222  }
223 
224  if (m_hostPreferences->remoteFX()) {
225  arguments << "--rfx";
226  }
227 
228  if (!m_hostPreferences->extraOptions().isEmpty()) {
229  const QStringList additionalArguments = KShell::splitArgs(m_hostPreferences->extraOptions());
230  arguments += additionalArguments;
231  }
232 
233  // krdc has no support for certificate management yet; it would not be possbile to connect to any host:
234  // "The host key for example.com has changed" ...
235  // "Add correct host key in ~/.freerdp/known_hosts to get rid of this message."
236  arguments << "--ignore-certificate";
237 
238  // clipboard sharing is activated in KRDC; user can disable it at runtime
239  arguments << "--plugin" << "cliprdr";
240 
241  arguments << "-t" << QString::number(m_port);
242  arguments << m_host;
243 
244  kDebug(5012) << "Starting xfreerdp with arguments:" << arguments;
245 
246  setStatus(Connecting);
247 
248  connect(m_process, SIGNAL(error(QProcess::ProcessError)), SLOT(processError(QProcess::ProcessError)));
249  connect(m_process, SIGNAL(readyReadStandardError()), SLOT(receivedStandardError()));
250  connect(m_process, SIGNAL(readyReadStandardOutput()), SLOT(receivedStandardOutput()));
251  connect(m_container, SIGNAL(clientClosed()), SLOT(connectionClosed()));
252  connect(m_container, SIGNAL(clientIsEmbedded()), SLOT(connectionOpened()));
253 
254  m_process->start("xfreerdp", arguments);
255 
256  return true;
257 }
258 
259 HostPreferences* RdpView::hostPreferences()
260 {
261  return m_hostPreferences;
262 }
263 
264 void RdpView::switchFullscreen(bool on)
265 {
266  if (on == true) {
267  m_container->grabKeyboard();
268  }
269 }
270 
271 void RdpView::connectionOpened()
272 {
273  kDebug(5012) << "Connection opened";
274  const QSize size = m_container->minimumSizeHint();
275  kDebug(5012) << "Size hint: " << size.width() << " " << size.height();
276  setStatus(Connected);
277  setFixedSize(size);
278  resize(size);
279  m_container->setFixedSize(size);
280  emit framebufferSizeChanged(size.width(), size.height());
281  emit connected();
282  setFocus();
283 }
284 
285 QPixmap RdpView::takeScreenshot()
286 {
287  return QPixmap::grabWindow(m_container->clientWinId());
288 }
289 
290 void RdpView::connectionClosed()
291 {
292  emit disconnected();
293  setStatus(Disconnected);
294  m_quitFlag = true;
295 }
296 
297 void RdpView::connectionError()
298 {
299  emit disconnectedError();
300  connectionClosed();
301 }
302 
303 void RdpView::processError(QProcess::ProcessError error)
304 {
305  kDebug(5012) << "processError:" << error;
306  if (m_quitFlag) // do not try to show error messages while quitting (prevent crashes)
307  return;
308 
309  if (m_status == Connecting) {
310  if (error == QProcess::FailedToStart) {
311  KMessageBox::error(0, i18n("Could not start \"xfreerdp\"; make sure xfreerdp is properly installed."),
312  i18n("RDP Failure"));
313  connectionError();
314  return;
315  }
316  }
317 }
318 
319 void RdpView::receivedStandardError()
320 {
321  const QString output(m_process->readAllStandardError());
322  kDebug(5012) << "receivedStandardError:" << output;
323  QString line;
324  int i = 0;
325  while (!(line = output.section('\n', i, i)).isEmpty()) {
326 
327  // the following error is issued by freerdp because of a bug in freerdp 1.0.1 and below;
328  // see: https://github.com/FreeRDP/FreeRDP/pull/576
329  //"X Error of failed request: BadWindow (invalid Window parameter)
330  // Major opcode of failed request: 7 (X_ReparentWindow)
331  // Resource id in failed request: 0x71303348
332  // Serial number of failed request: 36
333  // Current serial number in output stream: 36"
334  if (line.contains(QLatin1String("X_ReparentWindow"))) {
335  KMessageBox::error(0, i18n("The version of \"xfreerdp\" you are using is too old.\n"
336  "xfreerdp 1.0.2 or greater is required."),
337  i18n("RDP Failure"));
338  connectionError();
339  return;
340  }
341  i++;
342  }
343 }
344 
345 void RdpView::receivedStandardOutput()
346 {
347  const QString output(m_process->readAllStandardOutput());
348  kDebug(5012) << "receivedStandardOutput:" << output;
349  QString line;
350  int i = 0;
351  while (!(line = output.section('\n', i, i)).isEmpty()) {
352 
353  // full xfreerdp message: "transport_connect: getaddrinfo (Name or service not known)"
354  if (line.contains(QLatin1String("Name or service not known"))) {
355  KMessageBox::error(0, i18n("Name or service not known."),
356  i18n("Connection Failure"));
357  connectionError();
358  return;
359 
360  // full xfreerdp message: "unable to connect to example.com:3389"
361  } else if (line.contains(QLatin1String("unable to connect to"))) {
362  KMessageBox::error(0, i18n("Connection attempt to host failed."),
363  i18n("Connection Failure"));
364  connectionError();
365  return;
366 
367  // looks like some generic xfreerdp error message, handle it if nothing was handled:
368  // "Error: protocol security negotiation failure"
369  } else if (line.contains(QLatin1String("Error: protocol security negotiation failure"))) {
370  KMessageBox::error(0, i18n("Connection attempt to host failed."),
371  i18n("Connection Failure"));
372  connectionError();
373  return;
374  }
375 
376  i++;
377  }
378 }
379 
380 void RdpView::setGrabAllKeys(bool grabAllKeys)
381 {
382  Q_UNUSED(grabAllKeys);
383  // do nothing.. grabKeyboard seems not to be supported in QX11EmbedContainer
384 }
385 
386 QString RdpView::keymapToXfreerdp(const QString &keyboadLayout)
387 {
388  if (keymapToXfreerdpHash.isEmpty()) {
389  keymapToXfreerdpHash = initKeymapToXfreerdp();
390  }
391  return keymapToXfreerdpHash[keyboadLayout];
392 }
393 
394 // list of xfreerdp --kbd-list
395 // this is a mapping for rdesktop comptibilty (old settings will still work)
396 // needs to be completed (when not in message freeze; needs new localization)
397 QHash<QString, QString> RdpView::initKeymapToXfreerdp()
398 {
399  QHash<QString, QString> keymapToXfreerdpHash;
400 
401  // Keyboard Layouts
402  keymapToXfreerdpHash["ar"] = "0x00000401"; // Arabic (101)
403  // keymapToXfreerdpHash[""] = "0x00000402"; // Bulgarian
404  // keymapToXfreerdpHash[""] = "0x00000404"; // Chinese (Traditional) - US Keyboard
405  keymapToXfreerdpHash["cs"] = "0x00000405"; // Czech
406  keymapToXfreerdpHash["da"] = "0x00000406"; // Danish
407  keymapToXfreerdpHash["fo"] = "0x00000406"; // Danish, Faroese; legacy for rdesktop
408  keymapToXfreerdpHash["de"] = "0x00000407"; // German
409  // keymapToXfreerdpHash[""] = "0x00000408"; // Greek
410  keymapToXfreerdpHash["en-us"] = "0x00000409"; // US
411  keymapToXfreerdpHash["es"] = "0x0000040A"; // Spanish
412  keymapToXfreerdpHash["fi"] = "0x0000040B"; // Finnish
413  keymapToXfreerdpHash["fr"] = "0x0000040C"; // French
414  keymapToXfreerdpHash["he"] = "0x0000040D"; // Hebrew
415  keymapToXfreerdpHash["hu"] = "0x0000040E"; // Hungarian
416  keymapToXfreerdpHash["is"] = "0x0000040F"; // Icelandic
417  keymapToXfreerdpHash["it"] = "0x00000410"; // Italian
418  keymapToXfreerdpHash["ja"] = "0x00000411"; // Japanese
419  keymapToXfreerdpHash["ko"] = "0x00000412"; // Korean
420  keymapToXfreerdpHash["nl"] = "0x00000413"; // Dutch
421  keymapToXfreerdpHash["no"] = "0x00000414"; // Norwegian
422  keymapToXfreerdpHash["pl"] = "0x00000415"; // Polish (Programmers)
423  keymapToXfreerdpHash["pt-br"] = "0x00000416"; // Portuguese (Brazilian ABNT)
424  // keymapToXfreerdpHash[""] = "0x00000418"; // Romanian
425  keymapToXfreerdpHash["ru"] = "0x00000419"; // Russian
426  keymapToXfreerdpHash["hr"] = "0x0000041A"; // Croatian
427  // keymapToXfreerdpHash[""] = "0x0000041B"; // Slovak
428  // keymapToXfreerdpHash[""] = "0x0000041C"; // Albanian
429  keymapToXfreerdpHash["sv"] = "0x0000041D"; // Swedish
430  keymapToXfreerdpHash["th"] = "0x0000041E"; // Thai Kedmanee
431  keymapToXfreerdpHash["tr"] = "0x0000041F"; // Turkish Q
432  // keymapToXfreerdpHash[""] = "0x00000420"; // Urdu
433  // keymapToXfreerdpHash[""] = "0x00000422"; // Ukrainian
434  // keymapToXfreerdpHash[""] = "0x00000423"; // Belarusian
435  keymapToXfreerdpHash["sl"] = "0x00000424"; // Slovenian
436  keymapToXfreerdpHash["et"] = "0x00000425"; // Estonian
437  keymapToXfreerdpHash["lv"] = "0x00000426"; // Latvian
438  keymapToXfreerdpHash["lt"] = "0x00000427"; // Lithuanian IBM
439  // keymapToXfreerdpHash[""] = "0x00000429"; // Farsi
440  // keymapToXfreerdpHash[""] = "0x0000042A"; // Vietnamese
441  // keymapToXfreerdpHash[""] = "0x0000042B"; // Armenian Eastern
442  // keymapToXfreerdpHash[""] = "0x0000042C"; // Azeri Latin
443  keymapToXfreerdpHash["mk"] = "0x0000042F"; // FYRO Macedonian
444  // keymapToXfreerdpHash[""] = "0x00000437"; // Georgian
445  // keymapToXfreerdpHash[""] = "0x00000438"; // Faeroese
446  // keymapToXfreerdpHash[""] = "0x00000439"; // Devanagari - INSCRIPT
447  // keymapToXfreerdpHash[""] = "0x0000043A"; // Maltese 47-key
448  // keymapToXfreerdpHash[""] = "0x0000043B"; // Norwegian with Sami
449  // keymapToXfreerdpHash[""] = "0x0000043F"; // Kazakh
450  // keymapToXfreerdpHash[""] = "0x00000440"; // Kyrgyz Cyrillic
451  // keymapToXfreerdpHash[""] = "0x00000444"; // Tatar
452  // keymapToXfreerdpHash[""] = "0x00000445"; // Bengali
453  // keymapToXfreerdpHash[""] = "0x00000446"; // Punjabi
454  // keymapToXfreerdpHash[""] = "0x00000447"; // Gujarati
455  // keymapToXfreerdpHash[""] = "0x00000449"; // Tamil
456  // keymapToXfreerdpHash[""] = "0x0000044A"; // Telugu
457  // keymapToXfreerdpHash[""] = "0x0000044B"; // Kannada
458  // keymapToXfreerdpHash[""] = "0x0000044C"; // Malayalam
459  // keymapToXfreerdpHash[""] = "0x0000044E"; // Marathi
460  // keymapToXfreerdpHash[""] = "0x00000450"; // Mongolian Cyrillic
461  // keymapToXfreerdpHash[""] = "0x00000452"; // United Kingdom Extended
462  // keymapToXfreerdpHash[""] = "0x0000045A"; // Syriac
463  // keymapToXfreerdpHash[""] = "0x00000461"; // Nepali
464  // keymapToXfreerdpHash[""] = "0x00000463"; // Pashto
465  // keymapToXfreerdpHash[""] = "0x00000465"; // Divehi Phonetic
466  // keymapToXfreerdpHash[""] = "0x0000046E"; // Luxembourgish
467  // keymapToXfreerdpHash[""] = "0x00000481"; // Maori
468  // keymapToXfreerdpHash[""] = "0x00000804"; // Chinese (Simplified) - US Keyboard
469  keymapToXfreerdpHash["de-ch"] = "0x00000807"; // Swiss German
470  keymapToXfreerdpHash["en-gb"] = "0x00000809"; // United Kingdom
471  // keymapToXfreerdpHash[""] = "0x0000080A"; // Latin American
472  keymapToXfreerdpHash["fr-be"] = "0x0000080C"; // Belgian French
473  keymapToXfreerdpHash["nl-be"] = "0x00000813"; // Belgian (Period)
474  keymapToXfreerdpHash["pt"] = "0x00000816"; // Portuguese
475  // keymapToXfreerdpHash[""] = "0x0000081A"; // Serbian (Latin)
476  // keymapToXfreerdpHash[""] = "0x0000082C"; // Azeri Cyrillic
477  // keymapToXfreerdpHash[""] = "0x0000083B"; // Swedish with Sami
478  // keymapToXfreerdpHash[""] = "0x00000843"; // Uzbek Cyrillic
479  // keymapToXfreerdpHash[""] = "0x0000085D"; // Inuktitut Latin
480  // keymapToXfreerdpHash[""] = "0x00000C0C"; // Canadian French (legacy)
481  // keymapToXfreerdpHash[""] = "0x00000C1A"; // Serbian (Cyrillic)
482  keymapToXfreerdpHash["fr-ca"] = "0x00001009"; // Canadian French
483  keymapToXfreerdpHash["fr-ch"] = "0x0000100C"; // Swiss French
484  // keymapToXfreerdpHash[""] = "0x0000141A"; // Bosnian
485  // keymapToXfreerdpHash[""] = "0x00001809"; // Irish
486  // keymapToXfreerdpHash[""] = "0x0000201A"; // Bosnian Cyrillic
487 
488  // Keyboard Layout Variants
489  // keymapToXfreerdpHash[""] = "0x00010401"; // Arabic (102)
490  // keymapToXfreerdpHash[""] = "0x00010402"; // Bulgarian (Latin)
491  // keymapToXfreerdpHash[""] = "0x00010405"; // Czech (QWERTY)
492  // keymapToXfreerdpHash[""] = "0x00010407"; // German (IBM)
493  // keymapToXfreerdpHash[""] = "0x00010408"; // Greek (220)
494  keymapToXfreerdpHash["en-dv"] = "0x00010409"; // United States-Dvorak
495  // keymapToXfreerdpHash[""] = "0x0001040A"; // Spanish Variation
496  // keymapToXfreerdpHash[""] = "0x0001040E"; // Hungarian 101-key
497  // keymapToXfreerdpHash[""] = "0x00010410"; // Italian (142)
498  // keymapToXfreerdpHash[""] = "0x00010415"; // Polish (214)
499  // keymapToXfreerdpHash[""] = "0x00010416"; // Portuguese (Brazilian ABNT2)
500  // keymapToXfreerdpHash[""] = "0x00010419"; // Russian (Typewriter)
501  // keymapToXfreerdpHash[""] = "0x0001041B"; // Slovak (QWERTY)
502  // keymapToXfreerdpHash[""] = "0x0001041E"; // Thai Pattachote
503  // keymapToXfreerdpHash[""] = "0x0001041F"; // Turkish F
504  // keymapToXfreerdpHash[""] = "0x00010426"; // Latvian (QWERTY)
505  // keymapToXfreerdpHash[""] = "0x00010427"; // Lithuanian
506  // keymapToXfreerdpHash[""] = "0x0001042B"; // Armenian Western
507  // keymapToXfreerdpHash[""] = "0x00010439"; // Hindi Traditional
508  // keymapToXfreerdpHash[""] = "0x0001043A"; // Maltese 48-key
509  // keymapToXfreerdpHash[""] = "0x0001043B"; // Sami Extended Norway
510  // keymapToXfreerdpHash[""] = "0x00010445"; // Bengali (Inscript)
511  // keymapToXfreerdpHash[""] = "0x0001045A"; // Syriac Phonetic
512  // keymapToXfreerdpHash[""] = "0x00010465"; // Divehi Typewriter
513  // keymapToXfreerdpHash[""] = "0x0001080C"; // Belgian (Comma)
514  // keymapToXfreerdpHash[""] = "0x0001083B"; // Finnish with Sami
515  // keymapToXfreerdpHash[""] = "0x00011009"; // Canadian Multilingual Standard
516  // keymapToXfreerdpHash[""] = "0x00011809"; // Gaelic
517  // keymapToXfreerdpHash[""] = "0x00020401"; // Arabic (102) AZERTY
518  // keymapToXfreerdpHash[""] = "0x00020405"; // Czech Programmers
519  // keymapToXfreerdpHash[""] = "0x00020408"; // Greek (319)
520  // keymapToXfreerdpHash[""] = "0x00020409"; // United States-International
521  // keymapToXfreerdpHash[""] = "0x0002041E"; // Thai Kedmanee (non-ShiftLock)
522  // keymapToXfreerdpHash[""] = "0x0002083B"; // Sami Extended Finland-Sweden
523  // keymapToXfreerdpHash[""] = "0x00030408"; // Greek (220) Latin
524  // keymapToXfreerdpHash[""] = "0x00030409"; // United States-Dvorak for left hand
525  // keymapToXfreerdpHash[""] = "0x0003041E"; // Thai Pattachote (non-ShiftLock)
526  // keymapToXfreerdpHash[""] = "0x00040408"; // Greek (319) Latin
527  // keymapToXfreerdpHash[""] = "0x00040409"; // United States-Dvorak for right hand
528  // keymapToXfreerdpHash[""] = "0x00050408"; // Greek Latin
529  // keymapToXfreerdpHash[""] = "0x00050409"; // US English Table for IBM Arabic 238_L
530  // keymapToXfreerdpHash[""] = "0x00060408"; // Greek Polytonic
531  // keymapToXfreerdpHash[""] = "0xB0000407"; // German Neo
532 
533  // Keyboard Input Method Editors (IMEs)
534  // keymapToXfreerdpHash[""] = "0xE0010404"; // Chinese (Traditional) - Phonetic
535  // keymapToXfreerdpHash[""] = "0xE0010411"; // Japanese Input System (MS-IME2002)
536  // keymapToXfreerdpHash[""] = "0xE0010412"; // Korean Input System (IME 2000)
537  // keymapToXfreerdpHash[""] = "0xE0010804"; // Chinese (Simplified) - QuanPin
538  // keymapToXfreerdpHash[""] = "0xE0020404"; // Chinese (Traditional) - ChangJie
539  // keymapToXfreerdpHash[""] = "0xE0020804"; // Chinese (Simplified) - ShuangPin
540  // keymapToXfreerdpHash[""] = "0xE0030404"; // Chinese (Traditional) - Quick
541  // keymapToXfreerdpHash[""] = "0xE0030804"; // Chinese (Simplified) - ZhengMa
542  // keymapToXfreerdpHash[""] = "0xE0040404"; // Chinese (Traditional) - Big5 Code
543  // keymapToXfreerdpHash[""] = "0xE0050404"; // Chinese (Traditional) - Array
544  // keymapToXfreerdpHash[""] = "0xE0050804"; // Chinese (Simplified) - NeiMa
545  // keymapToXfreerdpHash[""] = "0xE0060404"; // Chinese (Traditional) - DaYi
546  // keymapToXfreerdpHash[""] = "0xE0070404"; // Chinese (Traditional) - Unicode
547  // keymapToXfreerdpHash[""] = "0xE0080404"; // Chinese (Traditional) - New Phonetic
548  // keymapToXfreerdpHash[""] = "0xE0090404"; // Chinese (Traditional) - New ChangJie
549  // keymapToXfreerdpHash[""] = "0xE00E0804"; // Chinese (Traditional) - Microsoft Pinyin IME 3.0
550  // keymapToXfreerdpHash[""] = "0xE00F0404"; // Chinese (Traditional) - Alphanumeric
551 
552  return keymapToXfreerdpHash;
553 }
554 
555 #include "rdpview.moc"
RdpHostPreferences
Definition: rdphostpreferences.h:31
rdpview.h
RdpView::hostPreferences
HostPreferences * hostPreferences()
Returns the current host preferences of this view.
Definition: rdpview.cpp:259
RdpHostPreferences::colorDepth
int colorDepth() const
Definition: rdphostpreferences.cpp:194
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
RdpHostPreferences::keyboardLayout
QString keyboardLayout() const
Definition: rdphostpreferences.cpp:205
QWidget
RemoteView::readWalletPassword
QString readWalletPassword(bool fromUserNameOnly=false)
Definition: remoteview.cpp:199
QObject
RemoteView::connected
void connected()
Emitted when the view connected successfully.
RemoteView::m_port
int m_port
Definition: remoteview.h:399
RemoteView::disconnectedError
void disconnectedError()
Emitted when the view disconnected with error.
RemoteView::m_host
QString m_host
Definition: remoteview.h:398
RemoteView
Generic widget that displays a remote framebuffer.
Definition: remoteview.h:59
RemoteView::disconnected
void disconnected()
Emitted when the view disconnected without error.
RdpHostPreferences::console
bool console() const
Definition: rdphostpreferences.cpp:226
RemoteView::framebufferSizeChanged
void framebufferSizeChanged(int w, int h)
Emitted when the size of the remote screen changes.
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
HostPreferences::height
int height()
Saved height.
Definition: hostpreferences.cpp:93
Settings::defaultRdpUserName
static QString defaultRdpUserName()
Get DefaultRdpUserName.
Definition: settings.h:581
Settings::recognizeLdapLogins
static bool recognizeLdapLogins()
Get RecognizeLdapLogins.
Definition: settings.h:600
RemoteView::Connecting
Definition: remoteview.h:109
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
RemoteView::saveWalletPassword
void saveWalletPassword(const QString &password, bool fromUserNameOnly=false)
Definition: remoteview.cpp:235
RemoteView::m_status
RemoteStatus m_status
The status of the remote view.
Definition: remoteview.h:380
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
HostPreferences
Definition: hostpreferences.h:42
settings.h
TCP_PORT_RDP
#define TCP_PORT_RDP
Definition: rdpview.h:34
RdpHostPreferences::shareMedia
QString shareMedia() const
Definition: rdphostpreferences.cpp:269
RdpView::startQuitting
virtual void startQuitting()
Initiate the disconnection.
Definition: rdpview.cpp:93
RemoteView::m_viewOnly
bool m_viewOnly
Definition: remoteview.h:400
RemoteView::setStatus
virtual void setStatus(RemoteStatus s)
Set the status of the connection.
Definition: remoteview.cpp:62
RdpView::setGrabAllKeys
void setGrabAllKeys(bool grabAllKeys)
Enables/disables grabbing all possible keys.
Definition: rdpview.cpp:380
HostPreferences::width
int width()
Saved width.
Definition: hostpreferences.cpp:104
RdpView::~RdpView
virtual ~RdpView()
Definition: rdpview.cpp:62
RemoteView::m_url
KUrl m_url
Definition: remoteview.h:404
RdpHostPreferences::performance
int performance() const
Definition: rdphostpreferences.cpp:258
RdpHostPreferences::extraOptions
QString extraOptions() const
Definition: rdphostpreferences.cpp:237
RemoteView::Disconnected
Definition: remoteview.h:114
HostPreferences::walletSupport
bool walletSupport()
Definition: hostpreferences.cpp:82
RdpHostPreferences::remoteFX
bool remoteFX() const
Definition: rdphostpreferences.cpp:247
RdpHostPreferences::sound
int sound() const
Definition: rdphostpreferences.cpp:216
RemoteView::Connected
Definition: remoteview.h:112
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