23 files changed, 45 insertions, 38 deletions
diff --git a/core/settings/button/button.pro b/core/settings/button/button.pro index 817eac4..aa47f54 100644 --- a/core/settings/button/button.pro +++ b/core/settings/button/button.pro @@ -1,19 +1,19 @@ CONFIG += qt warn_on release quick-app HEADERS = buttonsettings.h \ buttonutils.h \ remapdlg.h SOURCES = main.cpp \ buttonsettings.cpp \ buttonutils.cpp \ remapdlg.cpp INTERFACES = remapdlgbase.ui INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopie +LIBS += -lqpe -lopiecore2 TARGET = buttonsettings include ( $(OPIEDIR)/include.pro ) diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp index d80e496..326554b 100644 --- a/core/settings/button/buttonsettings.cpp +++ b/core/settings/button/buttonsettings.cpp @@ -1,87 +1,87 @@ /* =. This file is part of the OPIE Project .=l. Copyright (c) 2002 Robert Griebl <sandman@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 <qlayout.h> #include <qlabel.h> #include <qtimer.h> -#include <opie/odevice.h> +#include <opie2/odevice.h> #include "buttonsettings.h" #include "buttonutils.h" #include "remapdlg.h" -using namespace Opie; +using namespace Opie::Core; struct buttoninfo { const ODeviceButton *m_button; int m_index; OQCopMessage m_pmsg; QLabel *m_picon; QLabel *m_plabel; OQCopMessage m_hmsg; QLabel *m_hicon; QLabel *m_hlabel; bool m_pdirty : 1; bool m_hdirty : 1; }; ButtonSettings::ButtonSettings ( QWidget *parent , const char *name, bool modal, WFlags f ) : QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp ) { const QValueList <ODeviceButton> &buttons = ODevice::inst ( )-> buttons ( ); (void) ButtonUtils::inst ( ); // initialise setCaption ( tr( "Button Settings" )); QVBoxLayout *toplay = new QVBoxLayout ( this, 3, 3 ); QLabel *l = new QLabel ( tr( "<center>Press or hold the button you want to remap.</center>" ), this ); toplay-> addWidget ( l ); QGridLayout *lay = new QGridLayout ( toplay ); lay-> setMargin ( 0 ); lay-> setColStretch ( 0, 0 ); lay-> setColStretch ( 1, 0 ); lay-> setColStretch ( 2, 0 ); lay-> setColStretch ( 3, 10 ); m_infos. setAutoDelete ( true ); int i = 1; int index = 0; for ( QValueList<ODeviceButton>::ConstIterator it = buttons. begin ( ); it != buttons. end ( ); it++ ) { if ( it != buttons. begin ( )) { QFrame *f = new QFrame ( this ); f-> setFrameStyle ( QFrame::Sunken | QFrame::VLine ); lay-> addMultiCellWidget ( f, i, i, 0, 3 ); i++; diff --git a/core/settings/button/buttonsettings.h b/core/settings/button/buttonsettings.h index 67694d3..1127e7c 100644 --- a/core/settings/button/buttonsettings.h +++ b/core/settings/button/buttonsettings.h @@ -1,76 +1,75 @@ /* =. This file is part of the OPIE Project .=l. Copyright (c) 2002 Robert Griebl <sandman@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 __BUTTON_SETTINGS_H__ #define __BUTTON_SETTINGS_H__ #include <qdialog.h> #include <qlist.h> -#include <opie/odevice.h> +#include <opie2/odevice.h> class QTimer; -using namespace Opie; class buttoninfo; class ButtonSettings : public QDialog { Q_OBJECT public: ButtonSettings ( QWidget *parent = 0, const char *name = 0, bool modal = FALSE,WFlags f = 0 ); ~ButtonSettings ( ); static QString appName() { return QString::fromLatin1("buttonsettings"); } virtual void accept ( ); virtual void done ( int r ); private slots: void keyTimeout ( ); void updateLabels ( ); protected: virtual void keyPressEvent ( QKeyEvent *e ); virtual void keyReleaseEvent ( QKeyEvent *e ); private: buttoninfo *buttonInfoForKeycode ( ushort key ); void edit ( buttoninfo *bi, bool hold ); - QString qcopToString ( const OQCopMessage &c ); + QString qcopToString ( const Opie::Core::OQCopMessage &c ); private: QTimer *m_timer; buttoninfo *m_last_button; QList <buttoninfo> m_infos; bool m_lock; }; #endif diff --git a/core/settings/button/buttonutils.cpp b/core/settings/button/buttonutils.cpp index 27a2f38..9bf4b53 100644 --- a/core/settings/button/buttonutils.cpp +++ b/core/settings/button/buttonutils.cpp @@ -1,60 +1,61 @@ #include <stdlib.h> #include <qapplication.h> #include <qlistview.h> #include <qpe/applnk.h> #include <qpe/mimetype.h> #include <qpe/resource.h> #include "buttonutils.h" using namespace Opie; +using namespace Opie::Core; struct predef_qcop { const char *m_text; const char *m_pixmap; const char *m_channel; const char *m_function; }; static const predef_qcop predef [] = { { QT_TRANSLATE_NOOP( "ButtonSettings", "Beam VCard" ), "beam", "QPE/Application/addressbook", "beamBusinessCard()" }, { QT_TRANSLATE_NOOP( "ButtonSettings", "Send eMail" ), "buttonsettings/mail", "QPE/Application/mail", "newMail()" }, { QT_TRANSLATE_NOOP( "ButtonSettings", "Toggle Menu" ), "buttonsettings/menu", "QPE/TaskBar", "toggleMenu()" }, { QT_TRANSLATE_NOOP( "ButtonSettings", "Toggle O-Menu" ), "buttonsettings/omenu", "QPE/TaskBar", "toggleStartMenu()" }, { QT_TRANSLATE_NOOP( "ButtonSettings", "Show Desktop" ), "home", "QPE/Launcher", "home()" }, { QT_TRANSLATE_NOOP( "ButtonSettings", "Toggle Recording" ), "buttonsettings/record", "QPE/VMemo", "toggleRecord()" }, { 0, 0, 0, 0 } }; ButtonUtils *ButtonUtils::ButtonUtils::inst ( ) { static ButtonUtils *p = 0; if ( !p ) { p = new ButtonUtils ( ); ::atexit ( cleanup ); } return p; } void ButtonUtils::cleanup ( ) { delete inst ( ); } ButtonUtils::ButtonUtils ( ) { m_apps = new AppLnkSet( MimeType::appsFolderName ( )); } ButtonUtils::~ButtonUtils ( ) { delete m_apps; diff --git a/core/settings/button/buttonutils.h b/core/settings/button/buttonutils.h index 5ea59bb..79eb8e3 100644 --- a/core/settings/button/buttonutils.h +++ b/core/settings/button/buttonutils.h @@ -1,67 +1,67 @@ /* =. This file is part of the OPIE Project .=l. Copyright (c) 2002 Robert Griebl <sandman@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 __BUTTON_UTILS_H__ #define __BUTTON_UTILS_H__ -#include <opie/odevicebutton.h> +#include <opie2/odevicebutton.h> class AppLnkSet; class QListViewItem; class qCopInfo { public: qCopInfo ( const QString &str, const QPixmap &pix = QPixmap ( )) : m_name ( str ), m_icon ( pix ) { } QString m_name; QPixmap m_icon; }; class ButtonUtils { public: ~ButtonUtils ( ); static ButtonUtils *inst ( ); - qCopInfo messageToInfo ( const Opie::OQCopMessage & ); + qCopInfo messageToInfo ( const Opie::Core::OQCopMessage & ); void insertActions ( QListViewItem *here ); void insertAppLnks ( QListViewItem *here ); private: ButtonUtils ( ); static void cleanup ( ); private: AppLnkSet *m_apps; }; #endif diff --git a/core/settings/button/config.in b/core/settings/button/config.in index 3eb9155..834c375 100644 --- a/core/settings/button/config.in +++ b/core/settings/button/config.in @@ -1,4 +1,4 @@ config BUTTON-SETTINGS boolean "opie-button-settings (application buttons settings)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && !TARGET_RAMSES + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIECORE2 && !TARGET_RAMSES diff --git a/core/settings/button/main.cpp b/core/settings/button/main.cpp index e7c5bf9..6c2539f 100644 --- a/core/settings/button/main.cpp +++ b/core/settings/button/main.cpp @@ -1,32 +1,33 @@ /* =. This file is part of the OPIE Project .=l. Copyright (c) 2002 Robert Griebl <sandman@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 "buttonsettings.h" -#include <opie/oapplicationfactory.h> +#include <opie2/oapplicationfactory.h> +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<ButtonSettings> ) diff --git a/core/settings/button/remapdlg.cpp b/core/settings/button/remapdlg.cpp index 121173a..4effebc 100644 --- a/core/settings/button/remapdlg.cpp +++ b/core/settings/button/remapdlg.cpp @@ -1,93 +1,93 @@ #include <qlistview.h> #include <qcombobox.h> #include <qtimer.h> #include "remapdlg.h" #include "buttonutils.h" -using namespace Opie; +using namespace Opie::Core; class NoSortItem : public QListViewItem { public: NoSortItem ( QListView *lv, uint pos, const QString &str, const QCString &s1 = 0, const QCString &s2 = 0 ) : QListViewItem ( lv, str, s1, s2 ) { m_key = QString ( QChar ( 'a' + pos )); m_def = false; } void setDefault ( bool b ) { m_def = b; } virtual QString key ( int /*column*/, bool /*ascending*/ ) const { return m_key; } virtual void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ) { if ( m_def ) { QFont f ( listView ( )-> font ( )); f. setBold ( true ); p-> setFont ( f ); } QListViewItem::paintCell ( p, cg, column, width, align ); } private: QString m_key; bool m_def; }; -RemapDlg::RemapDlg ( const Opie::ODeviceButton *b, bool hold, QWidget *parent, const char *name ) +RemapDlg::RemapDlg ( const Opie::Core::ODeviceButton *b, bool hold, QWidget *parent, const char *name ) : RemapDlgBase ( parent, name, true, WStyle_ContextHelp ) { setCaption ( tr( "%1 %2", "(hold|press) buttoname" ). arg( hold ? tr( "Held" ) : tr( "Pressed" )). arg ( b-> userText ( ))); m_current = 0; static const char * const def_channels [] = { "QPE/Application/", "QPE/Launcher", "QPE/System", "QPE/TaskBar", "QPE/", 0 }; w_channel-> insertStrList ((const char **) def_channels ); m_msg = hold ? b-> heldAction ( ) : b-> pressedAction ( ); m_msg_preset = hold ? b-> factoryPresetHeldAction ( ) : b-> factoryPresetPressedAction ( ); m_map_none = new NoSortItem ( w_list, 0, tr( "No mapping" )); m_map_preset = new NoSortItem ( w_list, 1, tr( "Default" ), m_msg_preset. channel ( ), m_msg_preset. message ( )); ((NoSortItem *) m_map_preset )-> setDefault ( true ); if (m_msg. channel ( ) == "ignore") { m_map_custom = new NoSortItem ( w_list, 2, tr( "Custom" ), m_msg_preset. channel ( ), m_msg_preset. message ( )); m_current = m_map_none; } else { m_map_custom = new NoSortItem ( w_list, 2, tr( "Custom" ), m_msg. channel ( ), m_msg. message ( )); m_current = m_map_custom; } QListViewItem *it = new NoSortItem ( w_list, 3, tr( "Actions" )); ButtonUtils::inst ( )-> insertActions ( it ); it-> setOpen ( true ); m_map_show = new NoSortItem ( w_list, 4, tr( "Show" )); w_list-> setCurrentItem ( m_current ); QTimer::singleShot ( 0, this, SLOT( delayedInit())); } RemapDlg::~RemapDlg ( ) { } void RemapDlg::delayedInit ( ) { bool b = w_list-> viewport ( )-> isUpdatesEnabled ( ); w_list-> viewport ( )-> setUpdatesEnabled ( false ); diff --git a/core/settings/button/remapdlg.h b/core/settings/button/remapdlg.h index 046a22f..6cdd678 100644 --- a/core/settings/button/remapdlg.h +++ b/core/settings/button/remapdlg.h @@ -1,39 +1,39 @@ #ifndef __REMAPDLG_H__ #define __REMAPDLG_H__ -#include <opie/odevicebutton.h> +#include <opie2/odevicebutton.h> #include "remapdlgbase.h" class QListViewItem; class RemapDlg : public RemapDlgBase { Q_OBJECT public: - RemapDlg ( const Opie::ODeviceButton *b, bool hold, QWidget* parent = 0, const char* name = 0 ); + RemapDlg ( const Opie::Core::ODeviceButton *b, bool hold, QWidget* parent = 0, const char* name = 0 ); ~RemapDlg ( ); - Opie::OQCopMessage message ( ); + Opie::Core::OQCopMessage message ( ); public slots: virtual void itemChanged ( QListViewItem * ); virtual void textChanged ( const QString & ); private slots: void delayedInit ( ); private: - Opie::OQCopMessage m_msg; - Opie::OQCopMessage m_msg_preset; + Opie::Core::OQCopMessage m_msg; + Opie::Core::OQCopMessage m_msg_preset; QListViewItem *m_current; QListViewItem *m_map_none; QListViewItem *m_map_preset; QListViewItem *m_map_custom; QListViewItem *m_map_show; }; #endif diff --git a/core/settings/citytime/config.in b/core/settings/citytime/config.in index 295b8b8..be1bb71 100644 --- a/core/settings/citytime/config.in +++ b/core/settings/citytime/config.in @@ -1,4 +1,4 @@ config CITYTIME boolean "opie-citytime (Time-zone / world clock settings)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIECORE2 diff --git a/core/settings/citytime/main.cpp b/core/settings/citytime/main.cpp index 7fb76ec..3f22621 100644 --- a/core/settings/citytime/main.cpp +++ b/core/settings/citytime/main.cpp @@ -1,24 +1,25 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "citytime.h" #include <opie2/oapplicationfactory.h> +using namespace Opie::Core; OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<CityTime> ) diff --git a/core/settings/launcher/config.in b/core/settings/launcher/config.in index e167313..226da3c 100644 --- a/core/settings/launcher/config.in +++ b/core/settings/launcher/config.in @@ -1,4 +1,4 @@ config LAUNCHER-SETTINGS boolean "opie-launcher-settings (Opie taskbar settings)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIEUI2 && LIBQTAUX diff --git a/core/settings/launcher/launcher.pro b/core/settings/launcher/launcher.pro index 3261ee8..e3f1060 100644 --- a/core/settings/launcher/launcher.pro +++ b/core/settings/launcher/launcher.pro @@ -1,28 +1,28 @@ CONFIG += qt warn_on release quick-app HEADERS = launchersettings.h \ tabssettings.h \ taskbarsettings.h \ menusettings.h \ inputmethodsettings.h \ doctabsettings.h \ tabconfig.h \ tabdialog.h SOURCES = main.cpp \ launchersettings.cpp \ tabssettings.cpp \ taskbarsettings.cpp \ menusettings.cpp \ inputmethodsettings.cpp \ doctabsettings.cpp \ tabdialog.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopie +LIBS += -lqpe -lopiecore2 -lopieui2 -lqtaux2 TARGET = launchersettings include ( $(OPIEDIR)/include.pro ) diff --git a/core/settings/launcher/launchersettings.cpp b/core/settings/launcher/launchersettings.cpp index 5c11cc8..5efd297 100644 --- a/core/settings/launcher/launchersettings.cpp +++ b/core/settings/launcher/launchersettings.cpp @@ -1,79 +1,80 @@ /* =. This file is part of the OPIE Project .=l. Copyright (c) 2002 Robert Griebl <sandman@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 <qlayout.h> -#include <opie/otabwidget.h> +#include <opie2/otabwidget.h> #include "launchersettings.h" #include "tabssettings.h" #include "menusettings.h" #include "taskbarsettings.h" #include "inputmethodsettings.h" #include "doctabsettings.h" +using namespace Opie::Ui; LauncherSettings::LauncherSettings (QWidget*,const char*, WFlags) : QDialog ( 0, "LauncherSettings", false, WStyle_ContextHelp ) { setCaption ( tr( "Launcher Settings" )); QVBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); OTabWidget *tw = new OTabWidget ( this, "otab" ); lay-> addWidget ( tw ); m_tabs = new TabsSettings ( tw ); m_taskbar = new TaskbarSettings ( tw ); m_menu = new MenuSettings ( tw ); m_imethods = new InputMethodSettings ( tw ); m_doctab = new DocTabSettings ( tw ); tw-> addTab ( m_taskbar, "wait", tr( "Taskbar" )); tw-> addTab ( m_menu, "go", tr( "O-Menu" )); tw-> addTab ( m_tabs, "launchersettings/tabstab.png", tr( "Tabs" )); tw-> addTab ( m_imethods, "launchersettings/inputmethod.png", tr( "InputMethods" )); tw-> addTab ( m_doctab, "DocsIcon", tr( "DocTab" ) ); tw-> setCurrentTab ( m_taskbar ); } void LauncherSettings::accept ( ) { m_taskbar-> accept ( ); m_menu-> accept ( ); m_tabs-> accept ( ); m_imethods-> accept ( ); m_doctab-> accept ( ); QDialog::accept ( ); } void LauncherSettings::done ( int r ) { QDialog::done ( r ); close ( ); } diff --git a/core/settings/launcher/main.cpp b/core/settings/launcher/main.cpp index bcfdcf6..b27381a 100644 --- a/core/settings/launcher/main.cpp +++ b/core/settings/launcher/main.cpp @@ -1,34 +1,35 @@ /* =. This file is part of the OPIE Project .=l. Copyright (c) 2002 Robert Griebl <sandman@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 "launchersettings.h" -#include <opie/oapplicationfactory.h> +#include <opie2/oapplicationfactory.h> +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<LauncherSettings> ) diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp index c0d1cf2..763b360 100644 --- a/core/settings/launcher/tabdialog.cpp +++ b/core/settings/launcher/tabdialog.cpp @@ -1,96 +1,97 @@ /* =. This file is part of the OPIE Project .=l. Copyright (c) 2002 Robert Griebl <sandman@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 <qpe/resource.h> #include <qlayout.h> #include <qvbox.h> #include <qtabbar.h> #include <qiconview.h> #include <qapplication.h> #include <qlabel.h> #include <qradiobutton.h> #include <qbuttongroup.h> #include <qwhatsthis.h> #include <qcheckbox.h> -#include <opie/ofontselector.h> -#include <opie/otabwidget.h> -#include <opie/ocolorbutton.h> -#include <opie/ofiledialog.h> +#include <opie2/ofontselector.h> +#include <opie2/otabwidget.h> +#include <opie2/ocolorbutton.h> +#include <opie2/ofiledialog.h> #include "tabdialog.h" +using namespace Opie::Ui; class SampleItem : public QIconViewItem { public: SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text ) { m_large = pix; m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 )); } void sizeChange ( ) { calcRect ( ); repaint ( ); } QPixmap *pixmap ( ) const { if ( iconView ( )-> itemTextPos ( ) == QIconView::Right ) return (QPixmap *) &m_small; else return (QPixmap *) &m_large; } private: QPixmap m_large, m_small; }; class SampleView : public QIconView { public: SampleView ( QWidget *parent = 0, const char *name = 0 ) : QIconView ( parent, name ) { setItemsMovable ( false ); setAutoArrange ( true ); setSorting ( true ); setFrameStyle ( QFrame::NoFrame ); setSpacing ( 4 ); setMargin ( 0 ); setSelectionMode ( QIconView::NoSelection ); setBackgroundMode ( PaletteBase ); setViewMode ( TabConfig::Icon ); calculateGrid ( Bottom ); new SampleItem ( this, QObject::tr( "Sample 1" ), Resource::loadPixmap ( "datebook/DateBook" )); new SampleItem ( this, QObject::tr( "Sample 2" ), Resource::loadPixmap ( "Calibrate" )); new SampleItem ( this, QObject::tr( "Sample 3" ), Resource::loadPixmap ( "UnknownDocument" )); setBackgroundType ( TabConfig::Ruled, QString::null ); @@ -308,163 +309,163 @@ TabDialog::~TabDialog ( ) { } QWidget *TabDialog::createFontTab ( QWidget *parent ) { QWidget *tab = new QWidget ( parent, "FontTab" ); QVBoxLayout *vertLayout = new QVBoxLayout ( tab, 3, 3 ); m_fontuse = new QCheckBox ( tr( "Use a custom font" ), tab ); vertLayout-> addWidget ( m_fontuse ); m_fontselect = new OFontSelector ( false, tab, "fontsel" ); vertLayout-> addWidget ( m_fontselect ); connect ( m_fontuse, SIGNAL( toggled(bool)), m_fontselect, SLOT( setEnabled(bool))); connect( m_fontselect, SIGNAL( fontSelected(const QFont&)), this, SLOT( fontClicked(const QFont&))); return tab; } QWidget *TabDialog::createBgTab ( QWidget *parent ) { QWidget *tab = new QWidget( parent, "BgTab" ); QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); QGridLayout* gridLayout = new QGridLayout ( vertLayout ); gridLayout-> setColStretch ( 1, 10 ); QLabel* label = new QLabel( tr( "Type:" ), tab ); gridLayout-> addWidget ( label, 0, 0 ); m_bgtype = new QButtonGroup( tab, "buttongroup" ); m_bgtype-> hide ( ); m_bgtype-> setExclusive ( true ); QRadioButton *rb; rb = new QRadioButton( tr( "Ruled" ), tab, "ruled" ); m_bgtype-> insert ( rb, TabConfig::Ruled ); gridLayout-> addWidget( rb, 0, 1 ); QHBoxLayout *hb = new QHBoxLayout ( ); hb-> setSpacing ( 3 ); rb = new QRadioButton( tr( "Solid color" ), tab, "solid" ); m_bgtype-> insert ( rb, TabConfig::SolidColor ); hb-> addWidget ( rb ); hb-> addSpacing ( 10 ); - m_solidcolor = new OColorButton ( tab, QColor ( m_tc. m_bg_color ) ); + m_solidcolor = new Opie::OColorButton ( tab, QColor ( m_tc. m_bg_color ) ); connect ( m_solidcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( bgColorClicked(const QColor&))); hb-> addWidget ( m_solidcolor ); hb-> addStretch ( 10 ); gridLayout-> addLayout ( hb, 1, 1 ); hb = new QHBoxLayout ( ); hb-> setSpacing ( 3 ); rb = new QRadioButton( tr( "Image" ), tab, "image" ); m_bgtype-> insert ( rb, TabConfig::Image ); hb-> addWidget( rb ); hb-> addSpacing ( 10 ); m_imagebrowse = new QPushButton ( tr( "Select..." ), tab ); connect ( m_imagebrowse, SIGNAL( clicked()), this, SLOT( bgImageClicked())); hb-> addWidget ( m_imagebrowse ); hb-> addStretch ( 10 ); gridLayout-> addLayout ( hb, 2, 1 ); QPushButton *p = new QPushButton ( tr( "Default" ), tab ); connect ( p, SIGNAL( clicked()), this, SLOT( bgDefaultClicked())); gridLayout-> addWidget ( p, 3, 1 ); connect ( m_bgtype, SIGNAL( clicked(int)), this, SLOT( bgTypeClicked(int))); vertLayout-> addStretch ( 10 ); return tab; } QWidget *TabDialog::createIconTab ( QWidget *parent ) { QWidget *tab = new QWidget( parent, "IconTab" ); QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); QGridLayout* gridLayout = new QGridLayout ( vertLayout ); gridLayout-> setColStretch ( 1, 10 ); QLabel* label = new QLabel( tr( "Size:" ), tab ); gridLayout-> addWidget ( label, 0, 0 ); m_iconsize = new QButtonGroup( tab, "buttongroup" ); m_iconsize-> hide ( ); m_iconsize-> setExclusive ( true ); QRadioButton *rb; rb = new QRadioButton( tr( "Small" ), tab, "iconsmall" ); m_iconsize-> insert ( rb, TabConfig::List ); gridLayout-> addWidget( rb, 0, 1 ); rb = new QRadioButton( tr( "Large" ), tab, "iconlarge" ); m_iconsize-> insert ( rb, TabConfig::Icon ); gridLayout-> addWidget( rb, 1, 1 ); connect ( m_iconsize, SIGNAL( clicked(int)), this, SLOT( iconSizeClicked(int))); // vertLayout-> addSpacing ( 8 ); // gridLayout = new QGridLayout ( vertLayout ); gridLayout-> addRowSpacing ( 2, 8 ); label = new QLabel ( tr( "Color:" ), tab ); gridLayout-> addWidget ( label, 3, 0 ); - m_iconcolor = new OColorButton ( tab, QColor ( m_tc. m_text_color ) ); + m_iconcolor = new Opie::OColorButton ( tab, QColor ( m_tc. m_text_color ) ); connect ( m_iconcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( iconColorClicked(const QColor&))); gridLayout-> addWidget ( m_iconcolor, 3, 1, AlignLeft ); vertLayout-> addStretch ( 10 ); return tab; } void TabDialog::iconSizeClicked ( int s ) { m_sample-> setViewMode ((TabConfig::ViewMode) s ); } void TabDialog::fontClicked ( const QFont &f ) { m_sample-> setViewFont ( f ); } void TabDialog::bgTypeClicked ( int t ) { QString s; if ( m_bgtype-> id ( m_bgtype-> selected ( )) != t ) m_bgtype-> setButton ( t ); m_solidcolor-> setEnabled ( t == TabConfig::SolidColor ); m_imagebrowse-> setEnabled ( t == TabConfig::Image ); if ( t == TabConfig::SolidColor ) s = m_solidcolor-> color ( ). name ( ); else if ( t == TabConfig::Image ) s = Resource::findPixmap ( m_bgimage ); m_sample-> setBackgroundType ((TabConfig::BackgroundType) t, s ); } void TabDialog::bgColorClicked ( const QColor & ) { bgTypeClicked ( TabConfig::SolidColor ); } void TabDialog::iconColorClicked ( const QColor &col ) { m_sample-> setTextColor ( col ); } void TabDialog::bgImageClicked ( ) diff --git a/core/settings/launcher/tabdialog.h b/core/settings/launcher/tabdialog.h index 4f99d5d..46b7ae9 100644 --- a/core/settings/launcher/tabdialog.h +++ b/core/settings/launcher/tabdialog.h @@ -1,81 +1,81 @@ /* =. This file is part of the OPIE Project .=l. Copyright (c) 2002 Robert Griebl <sandman@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 __TABDIALOG_H__ #define __TABDIALOG_H__ #include <qdialog.h> #include "tabconfig.h" class QButtonGroup; -class OFontSelector; +namespace Opie {namespace Ui {class OFontSelector;}} class SampleView; -class OColorButton; +namespace Opie {class OColorButton;} class QPushButton; class QCheckBox; class TabDialog : public QDialog { Q_OBJECT public: TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &cfg, QWidget *parent = 0, const char *dname = 0, bool modal = false, WFlags = 0 ); virtual ~TabDialog ( ); public slots: virtual void accept ( ); protected slots: void iconSizeClicked ( int ); void fontClicked ( const QFont & ); void bgTypeClicked ( int ); void bgColorClicked ( const QColor & ); void iconColorClicked ( const QColor & ); void bgImageClicked ( ); void bgDefaultClicked ( ); private: QWidget *createBgTab ( QWidget *parent ); QWidget *createFontTab ( QWidget *parent ); QWidget *createIconTab ( QWidget *parent ); private: SampleView *m_sample; QButtonGroup *m_iconsize; - OFontSelector *m_fontselect; - OColorButton *m_solidcolor; - OColorButton *m_iconcolor; + Opie::Ui::OFontSelector *m_fontselect; + Opie::OColorButton *m_solidcolor; + Opie::OColorButton *m_iconcolor; QPushButton *m_imagebrowse; QString m_bgimage; QButtonGroup *m_bgtype; QCheckBox *m_fontuse; TabConfig &m_tc; }; #endif diff --git a/core/settings/light-and-power/config.in b/core/settings/light-and-power/config.in index 96346bb..ef2a42f 100644 --- a/core/settings/light-and-power/config.in +++ b/core/settings/light-and-power/config.in @@ -1,4 +1,4 @@ config LIGHT-AND-POWER boolean "opie-light-and-power (apm and energy saving settings)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIECORE2 diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index 09fb767..ebcc25c 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp @@ -3,97 +3,97 @@ =. Copyright (c) 2002 Maximilian Reiss <harlekin@handhelds.org> .=l. Copyright (c) 2002 Robert Griebl <sandman@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 "light.h" #include "sensor.h" #include <opie2/odevice.h> #include <qpe/config.h> #include <qpe/power.h> #if defined(Q_WS_QWS) && !defined(QT_NO_COP) #include <qpe/qcopenvelope_qws.h> #endif #include <qlabel.h> #include <qcheckbox.h> #include <qtabwidget.h> #include <qslider.h> #include <qspinbox.h> #include <qpushbutton.h> #include <qgroupbox.h> #include <qcombobox.h> -using namespace Opie; +using namespace Opie::Core; LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) : LightSettingsBase( parent, name, false, WStyle_ContextHelp ) { m_bres = ODevice::inst ( )-> displayBrightnessResolution ( ); m_cres = ODevice::inst ( )-> displayContrastResolution ( ); // check whether to show the light sensor stuff if ( !ODevice::inst ( )-> hasLightSensor ( )) { auto_brightness-> hide ( ); CalibrateLightSensor-> hide ( ); auto_brightness_ac-> hide ( ); CalibrateLightSensor_ac-> hide ( ); } // check whether to show the contrast stuff if (m_cres) { GroupLight->setTitle(tr("Backlight && Contrast")); GroupLight_ac->setTitle(GroupLight->title()); } else { contrast->hide(); contrast_ac->hide(); } // check whether to show the cpu frequency stuff QStrList freq = ODevice::inst()->allowedCpuFrequencies(); if ( freq.count() ) { frequency->insertStrList( freq ); frequency_ac->insertStrList( freq ); } else { frequencyLabel->hide(); frequency->hide(); frequencyLabel_ac->hide(); frequency_ac->hide(); } // check whether to show the hinge action stuff if ( !ODevice::inst()->hasHingeSensor() ) { closeHingeLabel->hide(); closeHingeAction->hide(); closeHingeLabel_ac->hide(); closeHingeAction_ac->hide(); } diff --git a/core/settings/light-and-power/main.cpp b/core/settings/light-and-power/main.cpp index 7a47b0b..1fc167d 100644 --- a/core/settings/light-and-power/main.cpp +++ b/core/settings/light-and-power/main.cpp @@ -1,26 +1,27 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "light.h" #include <opie2/oapplicationfactory.h> +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<LightSettings> ) diff --git a/core/settings/light-and-power/sensor.cpp b/core/settings/light-and-power/sensor.cpp index 53c3aed..a700a64 100644 --- a/core/settings/light-and-power/sensor.cpp +++ b/core/settings/light-and-power/sensor.cpp @@ -1,86 +1,86 @@ /* This file is part of the OPIE Project =. Copyright (c) 2002 Maximilian Reiss <harlekin@handhelds.org> .=l. Copyright (c) 2002 Robert Griebl <sandman@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 "calibration.h" #include "sensor.h" #include <opie2/odevice.h> #include <qlayout.h> #include <qslider.h> #include <qspinbox.h> -using namespace Opie; +using namespace Opie::Core; Sensor::Sensor ( QStringList ¶ms, QWidget *parent, const char *name ) : SensorBase ( parent, name, true, WStyle_ContextHelp ), m_params ( params ) { int steps = 12; int inter = 2; int smin = 40; int smax = 215; int lmin = 1; int lmax = 255; switch ( params. count ( )) { case 6: lmax = params [5]. toInt ( ); case 5: lmin = params [4]. toInt ( ); case 4: smax = params [3]. toInt ( ); case 3: smin = params [2]. toInt ( ); case 2: steps = params [1]. toInt ( ); case 1: inter = params [0]. toInt ( ) / 1000; } int xscale = ODevice::inst ( )-> lightSensorResolution ( ); int yscale = ODevice::inst ( )-> displayBrightnessResolution ( ); QVBoxLayout *lay = new QVBoxLayout ( frame ); lay-> setMargin ( 2 ); m_calib = new Calibration ( frame ); lay-> add ( m_calib ); m_calib-> setScale ( QSize ( xscale, yscale )); m_calib-> setLineSteps ( steps ); m_calib-> setInterval ( inter ); m_calib-> setStartPoint ( QPoint ( smin * xscale / 256, lmax * yscale / 256 )); m_calib-> setEndPoint ( QPoint ( smax * xscale / 256, lmin * yscale / 256 )); interval-> setValue ( inter ); linesteps-> setValue ( steps ); connect ( interval, SIGNAL( valueChanged(int)), m_calib, SLOT( setInterval(int))); connect ( linesteps, SIGNAL( valueChanged(int)), m_calib, SLOT( setLineSteps(int))); connect ( m_calib, SIGNAL( startPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&))); connect ( m_calib, SIGNAL( endPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&))); } void Sensor::accept ( ) { int xscale = ODevice::inst ( )-> lightSensorResolution ( ); diff --git a/core/settings/security/config.in b/core/settings/security/config.in index 0973349..14876da 100644 --- a/core/settings/security/config.in +++ b/core/settings/security/config.in @@ -1,4 +1,4 @@ config SECURITY boolean "opie-security (to set a pin for PDA usage protection)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/core/settings/security/main.cpp b/core/settings/security/main.cpp index aed8ab2..200a541 100644 --- a/core/settings/security/main.cpp +++ b/core/settings/security/main.cpp @@ -1,29 +1,30 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "security.h" -#include <opie/oapplicationfactory.h> +#include <opie2/oapplicationfactory.h> +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<Security> ) |