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

Konsole

RemoteConnectionDialog.cpp

Go to the documentation of this file.
00001 /*
00002     Copyright 2007 by Robert Knight <robertknight@gmail.com>
00003 
00004     This program is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU General Public License as published by
00006     the Free Software Foundation; either version 2 of the License, or
00007     (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
00012     GNU 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; if not, write to the Free Software
00016     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017     02110-1301  USA.
00018 */
00019 
00020 // Own
00021 #include "RemoteConnectionDialog.h"
00022 
00023 // Qt
00024 #include <KDebug>
00025 
00026 // KDE
00027 #include <KLocale>
00028 
00029 // Konsole
00030 #include "SessionManager.h"
00031 
00032 #include "ui_RemoteConnectionDialog.h"
00033 
00034 using namespace Konsole;
00035 
00036 RemoteConnectionDialog::RemoteConnectionDialog(QWidget* parent)
00037     : KDialog(parent)
00038 {
00039     setCaption(i18n("New Remote Connection"));
00040     setButtons( KDialog::Ok | KDialog::Cancel );
00041     setButtonText( KDialog::Ok , i18n("Connect") );
00042 
00043     _ui = new Ui::RemoteConnectionDialog();
00044     _ui->setupUi(mainWidget());
00045 
00046     // set initial UI state
00047     _ui->userEdit->setFocus(Qt::OtherFocusReason);
00048 }
00049 RemoteConnectionDialog::~RemoteConnectionDialog()
00050 {
00051     delete _ui;
00052 }
00053 QString RemoteConnectionDialog::user() const
00054 {
00055     return _ui->userEdit->text();
00056 }
00057 QString RemoteConnectionDialog::host() const
00058 {
00059     return _ui->hostEdit->text();
00060 }
00061 QString RemoteConnectionDialog::service() const
00062 {
00063     return "ssh";
00064 }
00065 
00066 QString RemoteConnectionDialog::sessionKey() const
00067 {
00068  //   SessionManager* manager = SessionManager::instance();
00069 
00070     /*MutableSessionInfo* customSession = 
00071         new MutableSessionInfo(manager->defaultSessionType()->path());
00072     customSession->setCommand( service() );
00073     customSession->setName( i18n("%1 at %2",user(),host()) );
00074     customSession->setArguments( QStringList() << customSession->command(true,true) << 
00075             user() + '@' + host() );
00076 */
00077    //QString key = manager->addSessionType( customSession ); 
00078 
00079     //kDebug() << "session key = " << key;
00080 
00081     return QString();
00082     //return key;
00083 }
00084 

Konsole

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

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.7
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