2 Copyright 2007 by Robert Knight <robertknight@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
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
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 #include "RemoteConnectionDialog.h"
30 #include "SessionManager.h"
32 #include "ui_RemoteConnectionDialog.h"
34 using namespace Konsole
;
36 RemoteConnectionDialog::RemoteConnectionDialog(QWidget
* parent
)
39 setCaption(i18n("New Remote Connection"));
40 setButtons( KDialog::Ok
| KDialog::Cancel
);
41 setButtonText( KDialog::Ok
, i18n("Connect") );
43 _ui
= new Ui::RemoteConnectionDialog();
44 _ui
->setupUi(mainWidget());
46 // set initial UI state
47 _ui
->userEdit
->setFocus(Qt::OtherFocusReason
);
49 RemoteConnectionDialog::~RemoteConnectionDialog()
53 QString
RemoteConnectionDialog::user() const
55 return _ui
->userEdit
->text();
57 QString
RemoteConnectionDialog::host() const
59 return _ui
->hostEdit
->text();
61 QString
RemoteConnectionDialog::service() const
66 QString
RemoteConnectionDialog::sessionKey() const
68 // SessionManager* manager = SessionManager::instance();
70 /*MutableSessionInfo* customSession =
71 new MutableSessionInfo(manager->defaultSessionType()->path());
72 customSession->setCommand( service() );
73 customSession->setName( i18n("%1 at %2",user(),host()) );
74 customSession->setArguments( QStringList() << customSession->command(true,true) <<
75 user() + '@' + host() );
77 //QString key = manager->addSessionType( customSession );
79 //kDebug() << "session key = " << key;