1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
/***************************************************************************
* Copyright (C) 2004 by Christoph Thielecke *
* [email protected] *
* *
* 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 <tqcheckbox.h>
#include <tqgroupbox.h>
#include <tqlabel.h>
#include <tqwhatsthis.h>
#include "widgetnotifyhelper.h"
#include <iostream>
ProfileIpsecOptions::ProfileIpsecOptions(TQWidget *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 TQString& 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 TQString& text)
{
if (text == "asn1dn" || text == "none")
{
RemoteIDLineEdit->setDisabled(true);
RemoteIDLabel->setDisabled(true);
}
else
{
RemoteIDLineEdit->setDisabled(false);
RemoteIDLabel->setDisabled(false);
}
}
void ProfileIpsecOptions::ikeHelpClicked(int,int)
{
TQWhatsThis::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>"), TQCursor::pos ( ), (TQWidget *)IkeHelpActiveLabel);
}
void ProfileIpsecOptions::espHelpClicked(int,int)
{
TQWhatsThis::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>"), TQCursor::pos ( ), (TQWidget *)EspHelpActiveLabel);
}
void ProfileIpsecOptions::usePfsToogled(bool)
{
if (PerfectForwardSecurityCheckbox->isChecked())
PerfectForwardSecrecyCombobox->setEnabled(true);
else
PerfectForwardSecrecyCombobox->setEnabled(false);
}
|