Diffstat (limited to 'core/settings/launcher/doctabsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/launcher/doctabsettings.cpp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/core/settings/launcher/doctabsettings.cpp b/core/settings/launcher/doctabsettings.cpp new file mode 100644 index 0000000..8077b8c --- a/dev/null +++ b/core/settings/launcher/doctabsettings.cpp | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | This file is part of the OPIE Project | ||
3 | =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> | ||
4 | .=l. Copyright (c) 2003 Michael Lauer <mickeyl@handhelds.org> | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This file is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
11 | ._= =} : or (at your option) any later version. | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This file is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
18 | ..}^=.= = ; Public License for more details. | ||
19 | ++= -. .` .: | ||
20 | : = ...= . :.=- You should have received a copy of the GNU | ||
21 | -. .:....=;==+<; General Public License along with this file; | ||
22 | -_. . . )=. = see the file COPYING. If not, write to the | ||
23 | -- :-=` Free Software Foundation, Inc., | ||
24 | 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
28 | |||
29 | #include "doctabsettings.h" | ||
30 | |||
31 | #include <qpe/config.h> | ||
32 | #include <qpe/qlibrary.h> | ||
33 | #include <qpe/qpeapplication.h> | ||
34 | |||
35 | #include <qspinbox.h> | ||
36 | #include <qcheckbox.h> | ||
37 | #include <qlayout.h> | ||
38 | #include <qlabel.h> | ||
39 | #include <qwhatsthis.h> | ||
40 | |||
41 | DocTabSettings::DocTabSettings( QWidget *parent, const char *name ):QWidget( parent, name ) | ||
42 | { | ||
43 | QBoxLayout *lay = new QVBoxLayout( this, 4, 4 ); | ||
44 | |||
45 | _enable = new QCheckBox( tr( "Enable the Documents Tab" ), this ); | ||
46 | |||
47 | Config cfg( "Launcher" ); | ||
48 | cfg.setGroup( "DocTab" ); | ||
49 | _enable->setChecked( cfg.readBoolEntry( "Enable", true ) ); | ||
50 | |||
51 | lay->addWidget( _enable ); | ||
52 | lay->addWidget( new QLabel( tr( "<b>Note:</b> Changing these settings may need restarting Opie to become effective." ), this ) ); | ||
53 | |||
54 | lay->addStretch(); | ||
55 | |||
56 | QWhatsThis::add( _enable, tr( "Check, if you want the Documents Tab to be visible." ) ); | ||
57 | } | ||
58 | |||
59 | void DocTabSettings::appletChanged() | ||
60 | { | ||
61 | } | ||
62 | |||
63 | void DocTabSettings::accept() | ||
64 | { | ||
65 | qDebug( "DocTabSettings::accept()" ); | ||
66 | Config cfg( "Launcher" ); | ||
67 | cfg.setGroup( "DocTab" ); | ||
68 | cfg.writeEntry( "Enable", _enable->isChecked() ); | ||
69 | cfg.write(); | ||
70 | } | ||
71 | |||