summaryrefslogtreecommitdiff
path: root/noncore/applets/wirelessapplet/advancedconfig.cpp
Unidiff
Diffstat (limited to 'noncore/applets/wirelessapplet/advancedconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/wirelessapplet/advancedconfig.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/noncore/applets/wirelessapplet/advancedconfig.cpp b/noncore/applets/wirelessapplet/advancedconfig.cpp
new file mode 100644
index 0000000..97b008d
--- a/dev/null
+++ b/noncore/applets/wirelessapplet/advancedconfig.cpp
@@ -0,0 +1,55 @@
1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer
3** <mickey@tm.informatik.uni-frankfurt.de>
4** http://www.Vanille.de
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14**********************************************************************/
15
16#include "advancedconfig.h"
17
18#include <qpe/config.h>
19#include <qwidget.h>
20#include <qcheckbox.h>
21
22AdvancedConfig::AdvancedConfig( QWidget* parent, const char* name, bool modal, WFlags fl )
23 : AdvancedConfigBase( parent, name, modal, fl )
24{
25 Config cfg( "qpe" );
26 cfg.setGroup( "Wireless" );
27
28 bool rocESSID = cfg.readBoolEntry( "renew_dhcp_on_essid_change", false );
29 bool rocFREQ = cfg.readBoolEntry( "renew_dhcp_on_freq_change", false );
30 bool rocAP = cfg.readBoolEntry( "renew_dhcp_on_ap_change", false );
31 bool rocMODE = cfg.readBoolEntry( "renew_dhcp_on_mode_change", false );
32
33 cbESSID->setChecked( rocESSID );
34 cbFrequency->setChecked( rocFREQ );
35 cbAccessPoint->setChecked( rocAP );
36 cbMODE->setChecked( rocMODE );
37}
38
39AdvancedConfig::~AdvancedConfig()
40{
41}
42
43void AdvancedConfig::accept()
44{
45
46 Config cfg( "qpe" );
47 cfg.setGroup( "Wireless" );
48 cfg.writeEntry( "renew_dhcp_on_essid_change", cbESSID->isChecked() );
49 cfg.writeEntry( "renew_dhcp_on_freq_change", cbFrequency->isChecked() );
50 cfg.writeEntry( "renew_dhcp_on_ap_change", cbAccessPoint->isChecked() );
51 cfg.writeEntry( "renew_dhcp_on_mode_change", cbMODE->isChecked() );
52
53 AdvancedConfigBase::accept();
54}
55