krfb
connectiondialog.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 "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"