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

krfb

connectiondialog.cpp

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 Nadeem Hasan <nhasan@kde.org>
00003 
00004    This program is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program; see the file COPYING.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #include "connectiondialog.h"
00021 
00022 #include <QCheckBox>
00023 #include <QLabel>
00024 
00025 #include <KIconLoader>
00026 #include <KLocale>
00027 #include <KStandardGuiItem>
00028 
00029 ConnectionDialog::ConnectionDialog( QWidget *parent )
00030     : KDialog( parent )
00031 {
00032   setCaption(i18n("New Connection"));
00033   setButtons(Ok|Cancel);
00034   setDefaultButton(Cancel);
00035   setModal(true);
00036 
00037   setMinimumSize(500, 200);
00038 
00039   m_connectWidget = new QWidget( this );
00040   setupUi(m_connectWidget);
00041 
00042   pixmapLabel->setPixmap(KIcon("krfb").pixmap(128));
00043 
00044   KGuiItem accept = KStandardGuiItem::ok();
00045   accept.setText( i18n( "Accept Connection" ) );
00046   setButtonGuiItem(Ok, accept);
00047 
00048   KGuiItem refuse = KStandardGuiItem::cancel();
00049   refuse.setText( i18n( "Refuse Connection" ) );
00050   setButtonGuiItem(Cancel, refuse);
00051 
00052   setMainWidget( m_connectWidget );
00053 }
00054 
00055 void ConnectionDialog::setRemoteHost( const QString &host )
00056 {
00057   remoteHost->setText( host );
00058 }
00059 
00060 void ConnectionDialog::setAllowRemoteControl( bool b )
00061 {
00062   cbAllowRemoteControl->setChecked( b );
00063 }
00064 
00065 bool ConnectionDialog::allowRemoteControl()
00066 {
00067   return cbAllowRemoteControl->isChecked();
00068 }
00069 
00070 #include "connectiondialog.moc"

krfb

Skip menu "krfb"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal