diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-06 12:36:58 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-06 12:36:58 -0600 |
commit | d08a0ede1d2cb15bb14b0ff75eacf5c682b1fa0a (patch) | |
tree | e5ce4701bac540038a279b4e208c86390a24ba11 /src/profileipsecoptions.cpp | |
download | kvpnc-d08a0ede1d2cb15bb14b0ff75eacf5c682b1fa0a.tar.gz kvpnc-d08a0ede1d2cb15bb14b0ff75eacf5c682b1fa0a.zip |
Initial import of year-and-a-half-old upstream version 0.9.6a
Diffstat (limited to 'src/profileipsecoptions.cpp')
-rw-r--r-- | src/profileipsecoptions.cpp | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/src/profileipsecoptions.cpp b/src/profileipsecoptions.cpp new file mode 100644 index 0000000..8eb3c82 --- /dev/null +++ b/src/profileipsecoptions.cpp @@ -0,0 +1,132 @@ +/*************************************************************************** + * Copyright (C) 2004 by Christoph Thielecke * + * crissi99@gmx.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "profileipsecoptions.h" +#include "profileipsecoptions.h" + +#include <klineedit.h> +#include <klocale.h> +#include <kcombobox.h> +#include <qcheckbox.h> +#include <qgroupbox.h> +#include <qlabel.h> +#include <qwhatsthis.h> +#include "widgetnotifyhelper.h" +#include <iostream> + +ProfileIpsecOptions::ProfileIpsecOptions(QWidget *parent) : ProfileIpsecOptionsBase(parent) +{ +} + + +ProfileIpsecOptions::~ProfileIpsecOptions() +{ +} +void ProfileIpsecOptions::useRightNextHopToggled(bool) +{ + if (UseRightNextHopCheckBox->isChecked()) + RightNextHopLineEdit->setEnabled(true); + else + RightNextHopLineEdit->setEnabled(false); +} + + +void ProfileIpsecOptions::useLeftNextHopToggled(bool) +{ + if (UseLeftNextHopCheckBox->isChecked()) + LeftNextHopLineEdit->setEnabled(true); + else + LeftNextHopLineEdit->setEnabled(false); +} + + +void ProfileIpsecOptions::dialogChanged() +{ +// std::cout << "ProfileIpsecOptions::dialogChanged()" << std::endl; + dialogModified=true; +} + +void ProfileIpsecOptions::useIkeToggled(bool) +{ + if (UseCustomIkeCheckBox->isChecked()) + IkeGroupBox->setEnabled(true); + else + IkeGroupBox->setEnabled(false); +} + + +void ProfileIpsecOptions::useEspToogled(bool) +{ + if (UseCustomEspCheckBox->isChecked()) + EspGroupBox->setEnabled(true); + else + EspGroupBox->setEnabled(false); +} + +void ProfileIpsecOptions::localIDTypeToggled(const QString& text) +{ + if (text == "asn1dn" || text == i18n("Certificate ID")) + { + LocalIDLineEdit->setDisabled(true); + LocalIDLabel->setDisabled(true); + } + else + { + LocalIDLineEdit->setDisabled(false); + LocalIDLabel->setDisabled(false); + } +} + +void ProfileIpsecOptions::remoteIDTypeToggled(const QString& text) +{ + if (text == "asn1dn" || text == "none") + { + RemoteIDLineEdit->setDisabled(true); + RemoteIDLabel->setDisabled(true); + } + else + { + RemoteIDLineEdit->setDisabled(false); + RemoteIDLabel->setDisabled(false); + } +} + + + +void ProfileIpsecOptions::ikeHelpClicked(int,int) +{ + QWhatsThis::display ( i18n("<h1>IPSec IKE algorithms</h1><p>You have to specify the IKE values in the following format:\n<nobr><encryption algorithm>-<authentication algorithm></nobr>\nor\n<nobr><encryption algorithm>-<authentication algorithm>-<diffie helman group></nobr></p>"), QCursor::pos ( ), (QWidget *)IkeHelpActiveLabel); +} + + + +void ProfileIpsecOptions::espHelpClicked(int,int) +{ + QWhatsThis::display ( i18n("<h1>IPSec ESP algorithms</h1><nobr>You have to specify the ESP values in the following format:\n<b><encryption algorithm>-<authentication algorithm></nobr>\nor\n<nobr><encryption algorithm>-<authentication algorithm></nobr></p>"), QCursor::pos ( ), (QWidget *)EspHelpActiveLabel); +} + + + +void ProfileIpsecOptions::usePfsToogled(bool) +{ + if (PerfectForwardSecurityCheckbox->isChecked()) + PerfectForwardSecrecyCombobox->setEnabled(true); + else + PerfectForwardSecrecyCombobox->setEnabled(false); +} |