krfb
invitedialog.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "invitedialog.h"
00021
00022 #include <kiconloader.h>
00023 #include <klocale.h>
00024 #include <KStandardGuiItem>
00025
00026 #include <QtGui/QLabel>
00027 #include <QtGui/QPushButton>
00028 #include <QtGui/QToolTip>
00029 #include <QtGui/QCursor>
00030
00031 InviteDialog::InviteDialog( QWidget *parent )
00032 : KDialog( parent )
00033 {
00034 setCaption(i18n("Invitation"));
00035 setButtons(User1|Close|Help);
00036 setHelp(QString(), "krfb");
00037 setDefaultButton(NoDefault);
00038
00039 setMinimumSize(500, 300);
00040
00041 m_inviteWidget = new QWidget( this );
00042 setupUi(m_inviteWidget);
00043
00044 pixmapLabel->setPixmap(KIcon("krfb").pixmap(128));
00045 setMainWidget( m_inviteWidget );
00046
00047 setButtonGuiItem( User1, KStandardGuiItem::configure() );
00048
00049 connect( btnCreateInvite, SIGNAL( clicked() ),
00050 SIGNAL( createInviteClicked() ) );
00051 connect( btnEmailInvite, SIGNAL( clicked() ),
00052 SIGNAL( emailInviteClicked() ) );
00053 connect( btnManageInvite, SIGNAL( clicked() ),
00054 SIGNAL( manageInviteClicked() ) );
00055 connect( helpLabel, SIGNAL( linkActivated ( QString ) ),
00056 SLOT( showWhatsthis() ));
00057 }
00058
00059 void InviteDialog::slotUser1()
00060 {
00061 emit configureClicked();
00062 }
00063
00064 void InviteDialog::enableInviteButton( bool enable )
00065 {
00066 btnCreateInvite->setEnabled( enable );
00067 }
00068
00069 void InviteDialog::setInviteCount( int count )
00070 {
00071 btnManageInvite->setText(
00072 i18n( "&Manage Invitations (%1)...", count ) );
00073 }
00074
00075 void InviteDialog::showWhatsthis()
00076 {
00077 QToolTip::showText(QCursor::pos(),
00078 i18n("An invitation creates a one-time password that allows the receiver to connect to your desktop.\n"
00079 "It is valid for only one successful connection and will expire after an hour if it has not been used. \n"
00080 "When somebody connects to your computer a dialog will appear and ask you for permission.\n "
00081 "The connection will not be established before you accept it. In this dialog you can also\n restrict "
00082 "the other person to view your desktop only, without the ability to move your\n mouse pointer or press "
00083 "keys.\nIf you want to create a permanent password for Desktop Sharing, allow 'Uninvited Connections' \n"
00084 "in the configuration."));
00085 }
00086
00087 #include "invitedialog.moc"