Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

doctabsettings.cpp

Go to the documentation of this file.
00001 /*
00002                      This file is part of the OPIE Project
00003                =.            Copyright (c)  2002 Trolltech AS <info@trolltech.com>
00004       .=l.            Copyright (c)  2003 Michael Lauer <mickeyl@handhelds.org>
00005      .>+-=
00006 _;:,   .>  :=|.         This file is free software; you can
00007 .> <`_,  > .  <=          redistribute it and/or modify it under
00008 :`=1 )Y*s>-.--  :           the terms of the GNU General Public
00009 .="- .-=="i,   .._         License as published by the Free Software
00010 - .  .-<_>   .<>         Foundation; either version 2 of the License,
00011   ._= =}    :          or (at your option) any later version.
00012   .%`+i>    _;_.
00013   .i_,=:_.   -<s.       This file is distributed in the hope that
00014   + . -:.    =       it will be useful, but WITHOUT ANY WARRANTY;
00015   : ..  .:,   . . .    without even the implied warranty of
00016   =_    +   =;=|`    MERCHANTABILITY or FITNESS FOR A
00017  _.=:.    :  :=>`:     PARTICULAR PURPOSE. See the GNU General
00018 ..}^=.=    =    ;      Public License for more details.
00019 ++=  -.   .`   .:
00020 :   = ...= . :.=-        You should have received a copy of the GNU
00021 -.  .:....=;==+<;          General Public License along with this file;
00022  -_. . .  )=. =           see the file COPYING. If not, write to the
00023   --    :-=`           Free Software Foundation, Inc.,
00024                              59 Temple Place - Suite 330,
00025                              Boston, MA 02111-1307, USA.
00026 
00027 */
00028 
00029 #include "doctabsettings.h"
00030 
00031 /* OPIE */
00032 #include <qpe/config.h>
00033 #include <opie2/odebug.h>
00034 
00035 /* QT */
00036 #include <qcheckbox.h>
00037 #include <qlayout.h>
00038 #include <qlabel.h>
00039 #include <qwhatsthis.h>
00040 
00041 #ifdef Q_WS_QWS
00042 #include <qtopia/qcopenvelope_qws.h>
00043 #endif
00044 
00045 
00046 DocTabSettings::DocTabSettings( QWidget *parent, const char *name ):QWidget( parent, name )
00047 {
00048     QBoxLayout *lay = new QVBoxLayout( this, 4, 4 );
00049 
00050     _enable = new QCheckBox( tr( "Enable the Documents Tab" ), this );
00051 
00052     Config cfg( "Launcher" );
00053     cfg.setGroup( "DocTab" );
00054     _enable->setChecked( cfg.readBoolEntry( "Enable", true ) );
00055 
00056     lay->addWidget( _enable );
00057     lay->addWidget( new QLabel( tr( "<b>Note:</b> Changing these settings may need restarting Opie to become effective." ), this ) );
00058 
00059     lay->addStretch();
00060 
00061     QWhatsThis::add( _enable, tr( "Check, if you want the Documents Tab to be visible." ) );
00062 }
00063 
00064 void DocTabSettings::appletChanged()
00065 {
00066 }
00067 
00068 void DocTabSettings::accept()
00069 {
00070     odebug << "DocTabSettings::accept()" << oendl;
00071     Config cfg( "Launcher" );
00072     cfg.setGroup( "DocTab" );
00073     cfg.writeEntry( "Enable", _enable->isChecked() );
00074     cfg.write();
00075 #if defined(Q_WS_QWS)
00076     {
00077         QCopEnvelope cop("QPE/Launcher","doctabEnabled(int)");
00078         cop << _enable->isChecked();
00079         odebug << "Sending envelope" << oendl;
00080     }
00081 #endif
00082 }
00083 

Generated on Sat Nov 5 16:15:57 2005 for OPIE by  doxygen 1.4.2