summaryrefslogtreecommitdiff
authordrw <drw>2005-04-06 22:25:21 (UTC)
committer drw <drw>2005-04-06 22:25:21 (UTC)
commitcd1b15147d372d8786c855764d397553651c358d (patch) (side-by-side diff)
tree643479f1a84698f79227d7c8243921eacc3fe818
parent678c792dd69e42a15d8ac5eaaa9228dfd413ed4c (diff)
downloadopie-cd1b15147d372d8786c855764d397553651c358d.zip
opie-cd1b15147d372d8786c855764d397553651c358d.tar.gz
opie-cd1b15147d372d8786c855764d397553651c358d.tar.bz2
Use OResource for loading images and fix headers
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/main.cpp45
-rw-r--r--core/pim/today/today.cpp46
-rw-r--r--core/pim/today/today.h43
-rw-r--r--core/pim/today/todaybase.cpp54
-rw-r--r--core/pim/today/todaybase.h42
-rw-r--r--core/pim/today/todayconfig.cpp49
-rw-r--r--core/pim/today/todayconfig.h42
7 files changed, 209 insertions, 112 deletions
diff --git a/core/pim/today/main.cpp b/core/pim/today/main.cpp
index d63bc30..44b845c 100644
--- a/core/pim/today/main.cpp
+++ b/core/pim/today/main.cpp
@@ -1,22 +1,33 @@
/*
- * main.cpp
- *
- * ---------------------
- *
- * begin : Sun 10 17:20:00 CEST 2002
- * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß
- * email : max.reiss@gmx.de
- *
- */
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
+                 This file is part of the Opie Project
+
+ Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library 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 program 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
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include "today.h"
#include <opie2/oapplicationfactory.h>
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 3e895a4..67b23e1 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -1,28 +1,42 @@
/*
- * today.cpp
- *
- * copyright : (c) 2002,2003,2004 by Maximilian Reiß
- * email : harlekin@handhelds.org
- *
- */
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
+                 This file is part of the Opie Project
+
+ Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library 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 program 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
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include "today.h"
#include <opie2/odebug.h>
#include <opie2/opluginloader.h>
#include <opie2/oconfig.h>
+#include <opie2/oresource.h>
#include <qpe/qcopenvelope_qws.h>
-#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
#include <qpe/contact.h>
#include <qdir.h>
@@ -217,9 +231,9 @@ void Today::loadPluginWidgets() {
// package the whole thing into a qwidget so it can be shown and hidden
plugin.guiBox = new QWidget( m_big_box );
QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox );
QPixmap plugPix;
- plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 );
+ plugPix.convertFromImage( Opie::Core::OResource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 );
OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox );
plugIcon->setPixmap( plugPix );
QWhatsThis::add
( plugIcon, tr("Click here to launch the associated app") );
diff --git a/core/pim/today/today.h b/core/pim/today/today.h
index 8dbe9aa..dd828ac 100644
--- a/core/pim/today/today.h
+++ b/core/pim/today/today.h
@@ -1,19 +1,34 @@
/*
- * today.h
- *
- * copyright : (c) 2002,2003,2004 by Maximilian Reiß
- * email : harlekin@handhelds.org
- *
- */
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
+                 This file is part of the Opie Project
+
+ Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library 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 program 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
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
#ifndef TODAY_H
#define TODAY_H
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index a89f454..931f45a 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -1,39 +1,53 @@
/*
- * todaybase.cpp
- *
- * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß
- * email : harlekin@handhelds.org
- *
- */
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
+                 This file is part of the Opie Project
+
+ Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library 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 program 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
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include "todaybase.h"
+#include <opie2/oresource.h>
+
#include <qpe/applnk.h>
-#include <qpe/resource.h>
#include <qvbox.h>
#include <qwhatsthis.h>
using namespace Opie::Ui;
TodayBase::TodayBase( QWidget* parent, const char* name, WFlags )
: QWidget( parent, name, WStyle_ContextHelp ) {
- QPixmap logo = Resource::loadPixmap( "today/today_logo"); // logo
- QImage opiezillaimage = QImage( Resource::loadImage("logo/opielogo" ) );
+ QPixmap logo = Opie::Core::OResource::loadPixmap( "today/today_logo" ); // logo
+ QImage opiezillaimage = QImage( Opie::Core::OResource::loadImage( "logo/opielogo" ) );
opiezillaimage = opiezillaimage.smoothScale( 45, 45 );
QPixmap opiezilla; //the opiezilla
opiezilla.convertFromImage( opiezillaimage );
- QPixmap config;
- config.convertFromImage( Resource::loadImage( "SettingsIcon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
+ QPixmap config = Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon );
layout = 0L;
QPalette pal = this->palette();
@@ -80,9 +94,9 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags )
// Opiezilla
Opiezilla = new QLabel( Frame, "OpieZilla" );
Opiezilla->setPixmap( opiezilla );
- QWhatsThis::add( Opiezilla , tr( "Today by Maximilian Reiß" ) );
+ QWhatsThis::add( Opiezilla , tr( "Today by Maximilian Rei�" ) );
Opiezilla->setBackgroundOrigin( QLabel::ParentOrigin );
// Ownerfield
diff --git a/core/pim/today/todaybase.h b/core/pim/today/todaybase.h
index 6ee9bb2..5b34234 100644
--- a/core/pim/today/todaybase.h
+++ b/core/pim/today/todaybase.h
@@ -1,19 +1,33 @@
/*
- * todaybase.h
- *
- * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß
- * email : harlekin@handhelds.org
- *
- */
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
+                 This file is part of the Opie Project
+
+ Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library 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 program 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
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef TODAYBASE_H
#define TODAYBASE_H
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index 864c708..04a16e1 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -1,27 +1,41 @@
/*
- * todayconfig.cpp
- *
- * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß
- * email : harlekin@handhelds.org
- *
- */
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
+                 This file is part of the Opie Project
+
+ Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library 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 program 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
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include "todayconfig.h"
#include <opie2/oconfig.h>
#include <opie2/opluginloader.h>
+#include <opie2/oresource.h>
#include <opie2/todayplugininterface.h>
-#include <qpe/resource.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
#include <qcheckbox.h>
@@ -43,9 +57,10 @@ class ToolButton : public QToolButton {
public:
ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
: QToolButton( parent, name ) {
- setPixmap( Resource::loadPixmap( icon ) );
+ setUsesBigPixmap( true );
+ setPixmap( Opie::Core::OResource::loadPixmap( icon, Opie::Core::OResource::SmallIcon ) );
setAutoRaise( TRUE );
setFocusPolicy( QWidget::NoFocus );
setToggleButton( t );
connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
@@ -241,9 +256,9 @@ void TodayConfig::pluginManagement( OPluginItem plugItem ) {
QCheckListItem *item = new QCheckListItem( m_appletListView, plugItem.name(), QCheckListItem::CheckBox );
TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( plugItem, IID_TodayPluginInterface );
- QPixmap icon = Resource::loadPixmap( iface->guiPart()->pixmapNameWidget() );
+ QPixmap icon = Opie::Core::OResource::loadPixmap( iface->guiPart()->pixmapNameWidget(), Opie::Core::OResource::SmallIcon );
if ( !icon.isNull() ) {
item->setPixmap( 0, icon );
}
item->setOn( plugItem.isEnabled() );
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h
index 81120d3..d467996 100644
--- a/core/pim/today/todayconfig.h
+++ b/core/pim/today/todayconfig.h
@@ -1,19 +1,33 @@
/*
- * todayconfig.h
- *
- * copyright : (c) 2002,2003, 2004 by Maximilian Reiß
- * email : harlekin@handhelds.org
- *
- */
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
+                 This file is part of the Opie Project
+
+ Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library 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 program 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
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef TODAYCONFIG_H
#define TODAYCONFIG_H