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

krfb

  • sources
  • kde-4.14
  • kdenetwork
  • krfb
  • krfb
connectiondialog.cpp
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2010 Collabora Ltd <info@collabora.co.uk>
3  @author George Kiagiadakis <george.kiagiadakis@collabora.co.uk>
4  Copyright (C) 2004 Nadeem Hasan <nhasan@kde.org>
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; see the file COPYING. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #include "connectiondialog.h"
23 
24 #include <KIconLoader>
25 #include <KLocale>
26 #include <KStandardGuiItem>
27 
28 #include <QtGui/QCheckBox>
29 #include <QtGui/QLabel>
30 
31 template <typename UI>
32 ConnectionDialog<UI>::ConnectionDialog(QWidget *parent)
33  : KDialog(parent)
34 {
35  setCaption(i18n("New Connection"));
36  setButtons(Ok | Cancel);
37  setDefaultButton(Cancel);
38  setModal(true);
39 
40  setMinimumSize(500, 200);
41 
42  m_connectWidget = new QWidget(this);
43  m_ui.setupUi(m_connectWidget);
44 
45  m_ui.pixmapLabel->setPixmap(KIcon("krfb").pixmap(128));
46 
47  KGuiItem accept = KStandardGuiItem::ok();
48  accept.setText(i18n("Accept Connection"));
49  setButtonGuiItem(Ok, accept);
50 
51  KGuiItem refuse = KStandardGuiItem::cancel();
52  refuse.setText(i18n("Refuse Connection"));
53  setButtonGuiItem(Cancel, refuse);
54 
55  setMainWidget(m_connectWidget);
56 }
57 
58 //**********
59 
60 InvitationsConnectionDialog::InvitationsConnectionDialog(QWidget *parent)
61  : ConnectionDialog<Ui::ConnectionWidget>(parent)
62 {
63 }
64 
65 void InvitationsConnectionDialog::setRemoteHost(const QString &host)
66 {
67  m_ui.remoteHost->setText(host);
68 }
69 
70 //**********
71 
72 #ifdef KRFB_WITH_TELEPATHY_TUBES
73 
74 TubesConnectionDialog::TubesConnectionDialog(QWidget *parent)
75  : ConnectionDialog<Ui::TubesConnectionWidget>(parent)
76 {
77 }
78 
79 void TubesConnectionDialog::setContactName(const QString & name)
80 {
81  QString txt = i18n("You have requested to share your desktop with %1. If you proceed, "
82  "you will allow the remote user to watch your desktop.", name);
83  m_ui.mainTextLabel->setText(txt);
84 }
85 
86 #endif // KRFB_WITH_TELEPATHY_TUBES
87 
88 #include "connectiondialog.moc"
ConnectionWidget
QWidget
ConnectionDialog::ConnectionDialog
ConnectionDialog(QWidget *parent)
Definition: connectiondialog.cpp:32
InvitationsConnectionDialog::InvitationsConnectionDialog
InvitationsConnectionDialog(QWidget *parent)
Definition: connectiondialog.cpp:60
connectiondialog.h
InvitationsConnectionDialog::setRemoteHost
void setRemoteHost(const QString &host)
Definition: connectiondialog.cpp:65
ConnectionDialog
Definition: connectiondialog.h:29
ConnectionDialog::m_connectWidget
QWidget * m_connectWidget
Definition: connectiondialog.h:39
QString
ConnectionDialog::m_ui
UI m_ui
Definition: connectiondialog.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

krfb

Skip menu "krfb"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

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