author | alwin <alwin> | 2004-11-11 21:08:16 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-11-11 21:08:16 (UTC) |
commit | e85cf7184c3444e26c1858d0564fa5d3614dd7b5 (patch) (side-by-side diff) | |
tree | 19b28857c856bfb2d5c399892e059c30f992aaf4 | |
parent | 364f1787cd32a132614791b04c886dee174e2aa4 (diff) | |
download | opie-e85cf7184c3444e26c1858d0564fa5d3614dd7b5.zip opie-e85cf7184c3444e26c1858d0564fa5d3614dd7b5.tar.gz opie-e85cf7184c3444e26c1858d0564fa5d3614dd7b5.tar.bz2 |
send qcop signal when enable/disable doctab
-rw-r--r-- | core/settings/launcher/doctabsettings.cpp | 53 | ||||
-rw-r--r-- | core/settings/launcher/doctabsettings.h | 42 |
2 files changed, 53 insertions, 42 deletions
diff --git a/core/settings/launcher/doctabsettings.cpp b/core/settings/launcher/doctabsettings.cpp index dfdc9be..9a001a6 100644 --- a/core/settings/launcher/doctabsettings.cpp +++ b/core/settings/launcher/doctabsettings.cpp @@ -1,72 +1,83 @@ /* - This file is part of the OPIE Project + This file is part of the OPIE Project =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> - .=l. Copyright (c) 2003 Michael Lauer <mickeyl@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This file 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 file; - -_. . . )=. = see the file COPYING. If not, write to the - -- :-=` Free Software Foundation, Inc., + .=l. Copyright (c) 2003 Michael Lauer <mickeyl@handhelds.org> + .>+-= +_;:, .> :=|. This file is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This file 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 file; + -_. . . )=. = see the file COPYING. If not, write to the + -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "doctabsettings.h" /* OPIE */ #include <qpe/config.h> #include <opie2/odebug.h> /* QT */ #include <qcheckbox.h> #include <qlayout.h> #include <qlabel.h> #include <qwhatsthis.h> +#ifdef Q_WS_QWS +#include <qtopia/qcopenvelope_qws.h> +#endif + DocTabSettings::DocTabSettings( QWidget *parent, const char *name ):QWidget( parent, name ) { QBoxLayout *lay = new QVBoxLayout( this, 4, 4 ); _enable = new QCheckBox( tr( "Enable the Documents Tab" ), this ); Config cfg( "Launcher" ); cfg.setGroup( "DocTab" ); _enable->setChecked( cfg.readBoolEntry( "Enable", true ) ); lay->addWidget( _enable ); lay->addWidget( new QLabel( tr( "<b>Note:</b> Changing these settings may need restarting Opie to become effective." ), this ) ); lay->addStretch(); QWhatsThis::add( _enable, tr( "Check, if you want the Documents Tab to be visible." ) ); } void DocTabSettings::appletChanged() { } void DocTabSettings::accept() { odebug << "DocTabSettings::accept()" << oendl; Config cfg( "Launcher" ); cfg.setGroup( "DocTab" ); cfg.writeEntry( "Enable", _enable->isChecked() ); cfg.write(); +#if defined(Q_WS_QWS) + { + QCopEnvelope cop("QPE/Launcher","doctabEnabled(int)"); + cop << _enable->isChecked(); + odebug << "Sending envelope" << oendl; + } +#endif } diff --git a/core/settings/launcher/doctabsettings.h b/core/settings/launcher/doctabsettings.h index ad6447c..777c32c 100644 --- a/core/settings/launcher/doctabsettings.h +++ b/core/settings/launcher/doctabsettings.h @@ -1,55 +1,55 @@ /* - =. This file is part of the OPIE Project - .=l. Copyright (c) 2003 Michael Lauer <mickeyl@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This file 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 file; - -_. . . )=. = see the file COPYING. If not, write to the - -- :-=` Free Software Foundation, Inc., + =. This file is part of the OPIE Project + .=l. Copyright (c) 2003 Michael Lauer <mickeyl@handhelds.org> + .>+-= +_;:, .> :=|. This file is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This file 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 file; + -_. . . )=. = see the file COPYING. If not, write to the + -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __DOCTAB_SETTINGS_H__ #define __DOCTAB_SETTINGS_H__ #include <qwidget.h> class QCheckBox; class QSpinBox; class DocTabSettings : public QWidget { Q_OBJECT public: DocTabSettings ( QWidget *parent = 0, const char *name = 0 ); void accept ( ); protected slots: void appletChanged ( ); protected: void init ( ); private: QCheckBox* _enable; }; #endif |