1
/***************************************************************************
2
* Copyright (C) 2007 by Christoph Thielecke *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
20
#include "profilesshoptions.h"
22
#include <klineedit.h>
23
#include <kcombobox.h>
24
#include <kmessagebox.h>
25
#include <kurlrequester.h>
27
#include <qcheckbox.h>
28
#include <qradiobutton.h>
29
#include <qbuttongroup.h>
32
#include "widgetnotifyhelper.h"
35
ProfileSshOptions::ProfileSshOptions(QWidget *parent)
39
h.setupChangedAction(this);
44
ProfileSshOptions::~ProfileSshOptions()
47
void ProfileSshOptions::usePortToggled(bool)
49
if (UseUserdefinedRemotePortCheckBox->isChecked())
50
UserdefinedRemotePortSpinBox->setEnabled(true);
52
UserdefinedRemotePortSpinBox->setEnabled(false);
55
void ProfileSshOptions::dialogChanged()
57
// std::cout << "ProfileSshOptions::dialogChanged()" << std::endl;
61
void ProfileSshOptions::sshKeyToggled(bool)
63
if (AutoKeyRadioButton->isChecked())
65
SshKeyComboBox->setEnabled(true);
66
CostumkeyURLRequester->setEnabled(false);
70
SshKeyComboBox->setEnabled(false);
71
CostumkeyURLRequester->setEnabled(true);
75
void ProfileSshOptions::sshAuthToggled(bool)
77
if (AuthKeyRadioButton->isChecked() && !AuthPassRadioButton->isChecked())
79
// KMessageBox::information ( this, "auth key is set", "a" );
80
SshkeyButtonGroup->setEnabled(true);
82
if (!AuthKeyRadioButton->isChecked() && AuthPassRadioButton->isChecked())
84
// KMessageBox::information ( this, "auth pass is set", "a" );
85
SshkeyButtonGroup->setEnabled(false);
92
void ProfileSshOptions::useSshConfigRemoteScriptToggled(bool)
94
if (UseSshConfigRemoteScriptCheckBox->isChecked())
95
SshConfigRemoteScriptLineEdit->setEnabled(true);
97
SshConfigRemoteScriptLineEdit->setEnabled(false);