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

krfb

  • sources
  • kde-4.12
  • kdenetwork
  • krfb
  • krfb
invitedialog.cpp
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2004 Nadeem Hasan <nhasan@kde.org>
3 
4  This program is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; see the file COPYING. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #include "invitedialog.h"
21 
22 #include <KIconLoader>
23 #include <KLocale>
24 #include <KStandardGuiItem>
25 
26 #include <QtGui/QCursor>
27 #include <QtGui/QLabel>
28 #include <QtGui/QPushButton>
29 #include <QtGui/QToolTip>
30 
31 InviteDialog::InviteDialog(QWidget *parent)
32  : KDialog(parent)
33 {
34  setCaption(i18n("Invitation"));
35  setButtons(User1 | Close | Help);
36  setHelp(QString(), "krfb");
37  setDefaultButton(NoDefault);
38 
39  setMinimumSize(500, 300);
40 
41  m_inviteWidget = new QWidget(this);
42  setupUi(m_inviteWidget);
43 
44  pixmapLabel->setPixmap(KIcon("krfb").pixmap(128));
45  setMainWidget(m_inviteWidget);
46 
47  setButtonGuiItem(User1, KStandardGuiItem::configure());
48 
49  connect(btnCreateInvite, SIGNAL(clicked()),
50  SIGNAL(createInviteClicked()));
51  connect(btnEmailInvite, SIGNAL(clicked()),
52  SIGNAL(emailInviteClicked()));
53  connect(btnManageInvite, SIGNAL(clicked()),
54  SIGNAL(manageInviteClicked()));
55  connect(helpLabel, SIGNAL(linkActivated(QString)),
56  SLOT(showWhatsthis()));
57 }
58 
59 void InviteDialog::slotUser1()
60 {
61  emit configureClicked();
62 }
63 
64 void InviteDialog::enableInviteButton(bool enable)
65 {
66  btnCreateInvite->setEnabled(enable);
67 }
68 
69 void InviteDialog::setInviteCount(int count)
70 {
71  btnManageInvite->setText(
72  i18n("&Manage Invitations (%1)...", count));
73 }
74 
75 void InviteDialog::showWhatsthis()
76 {
77  QToolTip::showText(QCursor::pos(),
78  i18n("An invitation creates a one-time password that allows the receiver to connect to your desktop.\n"
79  "It is valid for only one successful connection and will expire after an hour if it has not been used. \n"
80  "When somebody connects to your computer a dialog will appear and ask you for permission.\n "
81  "The connection will not be established before you accept it. In this dialog you can also\n restrict "
82  "the other person to view your desktop only, without the ability to move your\n mouse pointer or press "
83  "keys.\nIf you want to create a permanent password for Desktop Sharing, allow 'Uninvited Connections' \n"
84  "in the configuration."));
85 }
86 
87 #include "invitedialog.moc"
InviteDialog::emailInviteClicked
void emailInviteClicked()
QWidget
invitedialog.h
InviteDialog::InviteDialog
InviteDialog(QWidget *parent)
Definition: invitedialog.cpp:31
InviteDialog::setInviteCount
void setInviteCount(int count)
Definition: invitedialog.cpp:69
InviteDialog::configureClicked
void configureClicked()
InviteDialog::enableInviteButton
void enableInviteButton(bool enable)
Definition: invitedialog.cpp:64
InviteDialog::manageInviteClicked
void manageInviteClicked()
InviteDialog::showWhatsthis
void showWhatsthis()
Definition: invitedialog.cpp:75
InviteDialog::slotUser1
void slotUser1()
Definition: invitedialog.cpp:59
InviteDialog::m_inviteWidget
QWidget * m_inviteWidget
Definition: invitedialog.h:53
InviteDialog::createInviteClicked
void createInviteClicked()
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:54:10 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
  • 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