summaryrefslogtreecommitdiff
Unidiff
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,25 +1,36 @@
1/* 1/*
2 * main.cpp 2                 This file is part of the Opie Project
3 * 3
4 * --------------------- 4 Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
5 * 5 =.
6 * begin : Sun 10 17:20:00 CEST 2002 6 .=l.
7 * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß 7           .>+-=
8 * email : max.reiss@gmx.de 8 _;:,     .>    :=|. This program is free software; you can
9 * 9.> <`_,   >  .   <= redistribute it and/or modify it under
10 */ 10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11/*************************************************************************** 11.="- .-=="i,     .._ License as published by the Free Software
12 * * 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13 * This program is free software; you can redistribute it and/or modify * 13     ._= =}       : or (at your option) any later version.
14 * it under the terms of the GNU General Public License as published by * 14    .%`+i>       _;_.
15 * the Free Software Foundation; either version 2 of the License, or * 15    .i_,=:_.      -<s. This program is distributed in the hope that
16 * (at your option) any later version. * 16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17 * * 17    : ..    .:,     . . . without even the implied warranty of
18 ***************************************************************************/ 18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details.
22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA.
29*/
19 30
20#include "today.h" 31#include "today.h"
21 32
22#include <opie2/oapplicationfactory.h> 33#include <opie2/oapplicationfactory.h>
23 34
24using namespace Opie::Core; 35using namespace Opie::Core;
25OPIE_EXPORT_APP( OApplicationFactory<Today> ) 36OPIE_EXPORT_APP( OApplicationFactory<Today> )
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,40 +1,54 @@
1/* 1/*
2 * today.cpp 2                 This file is part of the Opie Project
3 * 3
4 * copyright : (c) 2002,2003,2004 by Maximilian Reiß 4 Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
5 * email : harlekin@handhelds.org 5 =.
6 * 6 .=l.
7 */ 7           .>+-=
8/*************************************************************************** 8 _;:,     .>    :=|. This program is free software; you can
9 * * 9.> <`_,   >  .   <= redistribute it and/or modify it under
10 * This program is free software; you can redistribute it and/or modify * 10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11 * it under the terms of the GNU General Public License as published by * 11.="- .-=="i,     .._ License as published by the Free Software
12 * the Free Software Foundation; either version 2 of the License, or * 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13 * (at your option) any later version. * 13     ._= =}       : or (at your option) any later version.
14 * * 14    .%`+i>       _;_.
15 ***************************************************************************/ 15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details.
22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA.
29*/
16 30
17#include "today.h" 31#include "today.h"
18 32
19#include <opie2/odebug.h> 33#include <opie2/odebug.h>
20#include <opie2/opluginloader.h> 34#include <opie2/opluginloader.h>
21#include <opie2/oconfig.h> 35#include <opie2/oconfig.h>
36#include <opie2/oresource.h>
22 37
23#include <qpe/qcopenvelope_qws.h> 38#include <qpe/qcopenvelope_qws.h>
24#include <qpe/resource.h>
25#include <qpe/qpeapplication.h> 39#include <qpe/qpeapplication.h>
26#include <qpe/contact.h> 40#include <qpe/contact.h>
27 41
28#include <qdir.h> 42#include <qdir.h>
29#include <qtimer.h> 43#include <qtimer.h>
30#include <qwhatsthis.h> 44#include <qwhatsthis.h>
31#include <qmessagebox.h> 45#include <qmessagebox.h>
32 46
33using namespace Opie::Ui; 47using namespace Opie::Ui;
34using Opie::Core::OPluginItem; 48using Opie::Core::OPluginItem;
35using Opie::Core::OPluginLoader; 49using Opie::Core::OPluginLoader;
36using Opie::Core::OPluginManager; 50using Opie::Core::OPluginManager;
37using Opie::Core::OConfig; 51using Opie::Core::OConfig;
38 52
39 53
40struct TodayPlugin { 54struct TodayPlugin {
@@ -205,33 +219,33 @@ void Today::loadPluginWidgets() {
205 219
206 for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) { 220 for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) {
207 TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( *it, IID_TodayPluginInterface ); 221 TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( *it, IID_TodayPluginInterface );
208 222
209 TodayPlugin plugin; 223 TodayPlugin plugin;
210 plugin.iface = iface; 224 plugin.iface = iface;
211 plugin.name = (*it).name(); 225 plugin.name = (*it).name();
212 plugin.oplugin = (*it); 226 plugin.oplugin = (*it);
213 227
214 plugin.guiPart = plugin.iface->guiPart(); 228 plugin.guiPart = plugin.iface->guiPart();
215 plugin.excludeRefresh = plugin.guiPart->excludeFromRefresh(); 229 plugin.excludeRefresh = plugin.guiPart->excludeFromRefresh();
216 230
217 // package the whole thing into a qwidget so it can be shown and hidden 231 // package the whole thing into a qwidget so it can be shown and hidden
218 plugin.guiBox = new QWidget( m_big_box ); 232 plugin.guiBox = new QWidget( m_big_box );
219 QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); 233 QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox );
220 QPixmap plugPix; 234 QPixmap plugPix;
221 plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 ); 235 plugPix.convertFromImage( Opie::Core::OResource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 );
222 OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); 236 OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox );
223 plugIcon->setPixmap( plugPix ); 237 plugIcon->setPixmap( plugPix );
224 QWhatsThis::add 238 QWhatsThis::add
225 ( plugIcon, tr("Click here to launch the associated app") ); 239 ( plugIcon, tr("Click here to launch the associated app") );
226 plugIcon->setName( plugin.guiPart->appName() ); 240 plugIcon->setName( plugin.guiPart->appName() );
227 connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) ); 241 connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) );
228 242
229 QWidget *plugWidget = plugin.guiPart->widget( plugin.guiBox ); 243 QWidget *plugWidget = plugin.guiPart->widget( plugin.guiBox );
230 boxLayout->addWidget( plugIcon, 0, AlignTop ); 244 boxLayout->addWidget( plugIcon, 0, AlignTop );
231 boxLayout->addWidget( plugWidget, 0, AlignTop ); 245 boxLayout->addWidget( plugWidget, 0, AlignTop );
232 boxLayout->setStretchFactor( plugIcon, 1 ); 246 boxLayout->setStretchFactor( plugIcon, 1 );
233 boxLayout->setStretchFactor( plugWidget, 9 ); 247 boxLayout->setStretchFactor( plugWidget, 9 );
234 248
235 pluginList.insert( plugin.name, plugin ); 249 pluginList.insert( plugin.name, plugin );
236 m_bblayout->addWidget(plugin.guiBox); 250 m_bblayout->addWidget(plugin.guiBox);
237 } 251 }
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,31 +1,46 @@
1/* 1/*
2 * today.h 2                 This file is part of the Opie Project
3 * 3
4 * copyright : (c) 2002,2003,2004 by Maximilian Reiß 4 Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
5 * email : harlekin@handhelds.org 5 =.
6 * 6 .=l.
7 */ 7           .>+-=
8/*************************************************************************** 8 _;:,     .>    :=|. This program is free software; you can
9 * * 9.> <`_,   >  .   <= redistribute it and/or modify it under
10 * This program is free software; you can redistribute it and/or modify * 10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11 * it under the terms of the GNU General Public License as published by * 11.="- .-=="i,     .._ License as published by the Free Software
12 * the Free Software Foundation; either version 2 of the License, or * 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13 * (at your option) any later version. * 13     ._= =}       : or (at your option) any later version.
14 * * 14    .%`+i>       _;_.
15 ***************************************************************************/ 15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details.
22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA.
29*/
30
16#ifndef TODAY_H 31#ifndef TODAY_H
17#define TODAY_H 32#define TODAY_H
18 33
19 34
20#include "todayconfig.h" 35#include "todayconfig.h"
21#include "todaybase.h" 36#include "todaybase.h"
22 37
23#include <opie2/todayplugininterface.h> 38#include <opie2/todayplugininterface.h>
24#include <opie2/oclickablelabel.h> 39#include <opie2/oclickablelabel.h>
25#include <opie2/opluginloader.h> 40#include <opie2/opluginloader.h>
26 41
27#include <qpe/qlibrary.h> 42#include <qpe/qlibrary.h>
28 43
29#include <qscrollview.h> 44#include <qscrollview.h>
30#include <qvbox.h> 45#include <qvbox.h>
31 46
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,51 +1,65 @@
1/* 1/*
2 * todaybase.cpp 2                 This file is part of the Opie Project
3 * 3
4 * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß 4 Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
5 * email : harlekin@handhelds.org 5 =.
6 * 6 .=l.
7 */ 7           .>+-=
8/*************************************************************************** 8 _;:,     .>    :=|. This program is free software; you can
9 * * 9.> <`_,   >  .   <= redistribute it and/or modify it under
10 * This program is free software; you can redistribute it and/or modify * 10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11 * it under the terms of the GNU General Public License as published by * 11.="- .-=="i,     .._ License as published by the Free Software
12 * the Free Software Foundation; either version 2 of the License, or * 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13 * (at your option) any later version. * 13     ._= =}       : or (at your option) any later version.
14 * * 14    .%`+i>       _;_.
15 ***************************************************************************/ 15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details.
22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA.
29*/
16 30
17#include "todaybase.h" 31#include "todaybase.h"
18 32
33#include <opie2/oresource.h>
34
19#include <qpe/applnk.h> 35#include <qpe/applnk.h>
20#include <qpe/resource.h>
21 36
22#include <qvbox.h> 37#include <qvbox.h>
23#include <qwhatsthis.h> 38#include <qwhatsthis.h>
24 39
25using namespace Opie::Ui; 40using namespace Opie::Ui;
26TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) 41TodayBase::TodayBase( QWidget* parent, const char* name, WFlags )
27 : QWidget( parent, name, WStyle_ContextHelp ) { 42 : QWidget( parent, name, WStyle_ContextHelp ) {
28 43
29 QPixmap logo = Resource::loadPixmap( "today/today_logo"); // logo 44 QPixmap logo = Opie::Core::OResource::loadPixmap( "today/today_logo" ); // logo
30 QImage opiezillaimage = QImage( Resource::loadImage("logo/opielogo" ) ); 45 QImage opiezillaimage = QImage( Opie::Core::OResource::loadImage( "logo/opielogo" ) );
31 opiezillaimage = opiezillaimage.smoothScale( 45, 45 ); 46 opiezillaimage = opiezillaimage.smoothScale( 45, 45 );
32 QPixmap opiezilla; //the opiezilla 47 QPixmap opiezilla; //the opiezilla
33 opiezilla.convertFromImage( opiezillaimage ); 48 opiezilla.convertFromImage( opiezillaimage );
34 QPixmap config; 49 QPixmap config = Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon );
35 config.convertFromImage( Resource::loadImage( "SettingsIcon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
36 50
37 layout = 0L; 51 layout = 0L;
38 52
39 QPalette pal = this->palette(); 53 QPalette pal = this->palette();
40 QColor col = pal.color( QPalette::Active, QColorGroup::Background ); 54 QColor col = pal.color( QPalette::Active, QColorGroup::Background );
41 pal.setColor( QPalette::Active, QColorGroup::Button, col ); 55 pal.setColor( QPalette::Active, QColorGroup::Button, col );
42 pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); 56 pal.setColor( QPalette::Inactive, QColorGroup::Button, col );
43 pal.setColor( QPalette::Normal, QColorGroup::Button, col ); 57 pal.setColor( QPalette::Normal, QColorGroup::Button, col );
44 pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); 58 pal.setColor( QPalette::Disabled, QColorGroup::Button, col );
45 this->setPalette( pal ); 59 this->setPalette( pal );
46 60
47 // --- logo Section --- 61 // --- logo Section ---
48 QPalette pal2; 62 QPalette pal2;
49 QColorGroup cg; 63 QColorGroup cg;
50 cg.setColor( QColorGroup::Text, white ); 64 cg.setColor( QColorGroup::Text, white );
51 cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230 ), logo ) ); 65 cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230 ), logo ) );
@@ -68,33 +82,33 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags )
68 TodayLabel_font.setPointSize( 40 ); 82 TodayLabel_font.setPointSize( 40 );
69 TodayLabel->setFont( TodayLabel_font ); 83 TodayLabel->setFont( TodayLabel_font );
70 TodayLabel->setBackgroundOrigin( QLabel::ParentOrigin ); 84 TodayLabel->setBackgroundOrigin( QLabel::ParentOrigin );
71 TodayLabel->setText( "<font color=#FFFFFF>" + tr("Today") +"</font>" ); 85 TodayLabel->setText( "<font color=#FFFFFF>" + tr("Today") +"</font>" );
72 86
73 // date 87 // date
74 DateLabel = new QLabel( box1, "TextLabel1" ); 88 DateLabel = new QLabel( box1, "TextLabel1" );
75 QFont DateLabel_font( DateLabel->font() ); 89 QFont DateLabel_font( DateLabel->font() );
76 DateLabel_font.setBold( TRUE ); 90 DateLabel_font.setBold( TRUE );
77 DateLabel->setFont( DateLabel_font ); 91 DateLabel->setFont( DateLabel_font );
78 DateLabel->setBackgroundOrigin( QLabel::ParentOrigin ); 92 DateLabel->setBackgroundOrigin( QLabel::ParentOrigin );
79 DateLabel->setTextFormat( RichText ); 93 DateLabel->setTextFormat( RichText );
80 94
81 // Opiezilla 95 // Opiezilla
82 Opiezilla = new QLabel( Frame, "OpieZilla" ); 96 Opiezilla = new QLabel( Frame, "OpieZilla" );
83 Opiezilla->setPixmap( opiezilla ); 97 Opiezilla->setPixmap( opiezilla );
84 QWhatsThis::add( Opiezilla , tr( "Today by Maximilian Reiß" ) ); 98 QWhatsThis::add( Opiezilla , tr( "Today by Maximilian Rei�" ) );
85 Opiezilla->setBackgroundOrigin( QLabel::ParentOrigin ); 99 Opiezilla->setBackgroundOrigin( QLabel::ParentOrigin );
86 100
87 101
88 // Ownerfield 102 // Ownerfield
89 OwnerField = new OClickableLabel( this , "Owner" ); 103 OwnerField = new OClickableLabel( this , "Owner" );
90 OwnerField->setAlignment( int (QLabel::AlignTop | QLabel::AlignLeft ) ); 104 OwnerField->setAlignment( int (QLabel::AlignTop | QLabel::AlignLeft ) );
91 105
92 // config 106 // config
93 ConfigButton = new OClickableLabel ( Frame, "PushButton1" ); 107 ConfigButton = new OClickableLabel ( Frame, "PushButton1" );
94 ConfigButton->setPixmap( config ); 108 ConfigButton->setPixmap( config );
95 QWhatsThis::add( ConfigButton, tr( "Click here to get to the config dialog" ) ); 109 QWhatsThis::add( ConfigButton, tr( "Click here to get to the config dialog" ) );
96 ConfigButton->setBackgroundOrigin( QLabel::ParentOrigin ); 110 ConfigButton->setBackgroundOrigin( QLabel::ParentOrigin );
97 111
98 frameLayout->addWidget( box1, 1 ); 112 frameLayout->addWidget( box1, 1 );
99 frameLayout->addStretch( 1 ); 113 frameLayout->addStretch( 1 );
100 frameLayout->addWidget( ConfigButton, 0, AlignBottom ); 114 frameLayout->addWidget( ConfigButton, 0, AlignBottom );
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,31 +1,45 @@
1/* 1/*
2 * todaybase.h 2                 This file is part of the Opie Project
3 * 3
4 * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß 4 Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
5 * email : harlekin@handhelds.org 5 =.
6 * 6 .=l.
7 */ 7           .>+-=
8/*************************************************************************** 8 _;:,     .>    :=|. This program is free software; you can
9 * * 9.> <`_,   >  .   <= redistribute it and/or modify it under
10 * This program is free software; you can redistribute it and/or modify * 10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11 * it under the terms of the GNU General Public License as published by * 11.="- .-=="i,     .._ License as published by the Free Software
12 * the Free Software Foundation; either version 2 of the License, or * 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13 * (at your option) any later version. * 13     ._= =}       : or (at your option) any later version.
14 * * 14    .%`+i>       _;_.
15 ***************************************************************************/ 15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details.
22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA.
29*/
16 30
17#ifndef TODAYBASE_H 31#ifndef TODAYBASE_H
18#define TODAYBASE_H 32#define TODAYBASE_H
19 33
20#include <opie2/oclickablelabel.h> 34#include <opie2/oclickablelabel.h>
21 35
22#include <qlayout.h> 36#include <qlayout.h>
23 37
24class QVBox; 38class QVBox;
25class QGridLayout; 39class QGridLayout;
26class QFrame; 40class QFrame;
27class QLabel; 41class QLabel;
28class QPushButton; 42class QPushButton;
29class QBoxLayout; 43class QBoxLayout;
30 44
31 45
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,63 +1,78 @@
1/* 1/*
2 * todayconfig.cpp 2                 This file is part of the Opie Project
3 * 3
4 * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß 4 Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
5 * email : harlekin@handhelds.org 5 =.
6 * 6 .=l.
7 */ 7           .>+-=
8/*************************************************************************** 8 _;:,     .>    :=|. This program is free software; you can
9 * * 9.> <`_,   >  .   <= redistribute it and/or modify it under
10 * This program is free software; you can redistribute it and/or modify * 10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11 * it under the terms of the GNU General Public License as published by * 11.="- .-=="i,     .._ License as published by the Free Software
12 * the Free Software Foundation; either version 2 of the License, or * 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13 * (at your option) any later version. * 13     ._= =}       : or (at your option) any later version.
14 * * 14    .%`+i>       _;_.
15 ***************************************************************************/ 15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details.
22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA.
29*/
16 30
17#include "todayconfig.h" 31#include "todayconfig.h"
18 32
19#include <opie2/oconfig.h> 33#include <opie2/oconfig.h>
20#include <opie2/opluginloader.h> 34#include <opie2/opluginloader.h>
35#include <opie2/oresource.h>
21#include <opie2/todayplugininterface.h> 36#include <opie2/todayplugininterface.h>
22 37
23#include <qpe/resource.h>
24#include <qpe/qcopenvelope_qws.h> 38#include <qpe/qcopenvelope_qws.h>
25#include <qpe/qpeapplication.h> 39#include <qpe/qpeapplication.h>
26 40
27#include <qcheckbox.h> 41#include <qcheckbox.h>
28#include <qlabel.h> 42#include <qlabel.h>
29#include <qspinbox.h> 43#include <qspinbox.h>
30#include <qlayout.h> 44#include <qlayout.h>
31#include <qheader.h> 45#include <qheader.h>
32#include <qvbox.h> 46#include <qvbox.h>
33#include <qtoolbutton.h> 47#include <qtoolbutton.h>
34#include <qwhatsthis.h> 48#include <qwhatsthis.h>
35 49
36using namespace Opie::Ui; 50using namespace Opie::Ui;
37using Opie::Core::OConfig; 51using Opie::Core::OConfig;
38using Opie::Core::OPluginManager; 52using Opie::Core::OPluginManager;
39using Opie::Core::OPluginLoader; 53using Opie::Core::OPluginLoader;
40using Opie::Core::OPluginItem; 54using Opie::Core::OPluginItem;
41 55
42class ToolButton : public QToolButton { 56class ToolButton : public QToolButton {
43 57
44public: 58public:
45 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) 59 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
46: QToolButton( parent, name ) { 60: QToolButton( parent, name ) {
47 setPixmap( Resource::loadPixmap( icon ) ); 61 setUsesBigPixmap( true );
62 setPixmap( Opie::Core::OResource::loadPixmap( icon, Opie::Core::OResource::SmallIcon ) );
48 setAutoRaise( TRUE ); 63 setAutoRaise( TRUE );
49 setFocusPolicy( QWidget::NoFocus ); 64 setFocusPolicy( QWidget::NoFocus );
50 setToggleButton( t ); 65 setToggleButton( t );
51 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); 66 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
52 } 67 }
53}; 68};
54 69
55 70
56/** 71/**
57 * The class has currently quite some duplicate code. 72 * The class has currently quite some duplicate code.
58 * By that way it would be real easy to have it as seperate app in settings tab 73 * By that way it would be real easy to have it as seperate app in settings tab
59 * 74 *
60 */ 75 */
61TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) 76TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
62: QDialog( parent, name, modal, WStyle_ContextHelp ) { 77: QDialog( parent, name, modal, WStyle_ContextHelp ) {
63 78
@@ -229,27 +244,27 @@ void TodayConfig::moveSelectedUp() {
229void TodayConfig::moveSelectedDown() { 244void TodayConfig::moveSelectedDown() {
230 QListViewItem *item = m_appletListView->selectedItem(); 245 QListViewItem *item = m_appletListView->selectedItem();
231 if ( item && item->itemBelow() ) { 246 if ( item && item->itemBelow() ) {
232 item->moveItem( item->itemBelow() ); 247 item->moveItem( item->itemBelow() );
233 } 248 }
234} 249}
235 250
236 251
237/** 252/**
238 * Set up the icons in the order/active tab 253 * Set up the icons in the order/active tab
239 */ 254 */
240void TodayConfig::pluginManagement( OPluginItem plugItem ) { 255void TodayConfig::pluginManagement( OPluginItem plugItem ) {
241 256
242 QCheckListItem *item = new QCheckListItem( m_appletListView, plugItem.name(), QCheckListItem::CheckBox ); 257 QCheckListItem *item = new QCheckListItem( m_appletListView, plugItem.name(), QCheckListItem::CheckBox );
243 258
244 TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( plugItem, IID_TodayPluginInterface ); 259 TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( plugItem, IID_TodayPluginInterface );
245 QPixmap icon = Resource::loadPixmap( iface->guiPart()->pixmapNameWidget() ); 260 QPixmap icon = Opie::Core::OResource::loadPixmap( iface->guiPart()->pixmapNameWidget(), Opie::Core::OResource::SmallIcon );
246 if ( !icon.isNull() ) { 261 if ( !icon.isNull() ) {
247 item->setPixmap( 0, icon ); 262 item->setPixmap( 0, icon );
248 } 263 }
249 item->setOn( plugItem.isEnabled() ); 264 item->setOn( plugItem.isEnabled() );
250 previousItem = item; 265 previousItem = item;
251} 266}
252 267
253 268
254 269
255TodayConfig::~TodayConfig() {} 270TodayConfig::~TodayConfig() {}
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,31 +1,45 @@
1/* 1/*
2 * todayconfig.h 2                 This file is part of the Opie Project
3 * 3
4 * copyright : (c) 2002,2003, 2004 by Maximilian Reiß 4 Copyright (C) Maximilian Reiss <harlekin@handhelds.org>
5 * email : harlekin@handhelds.org 5 =.
6 * 6 .=l.
7 */ 7           .>+-=
8/*************************************************************************** 8 _;:,     .>    :=|. This program is free software; you can
9 * * 9.> <`_,   >  .   <= redistribute it and/or modify it under
10 * This program is free software; you can redistribute it and/or modify * 10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11 * it under the terms of the GNU General Public License as published by * 11.="- .-=="i,     .._ License as published by the Free Software
12 * the Free Software Foundation; either version 2 of the License, or * 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13 * (at your option) any later version. * 13     ._= =}       : or (at your option) any later version.
14 * * 14    .%`+i>       _;_.
15 ***************************************************************************/ 15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details.
22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA.
29*/
16 30
17#ifndef TODAYCONFIG_H 31#ifndef TODAYCONFIG_H
18#define TODAYCONFIG_H 32#define TODAYCONFIG_H
19 33
20#include "todayconfigmiscbase.h" 34#include "todayconfigmiscbase.h"
21 35
22#include <opie2/otabwidget.h> 36#include <opie2/otabwidget.h>
23#include <opie2/opluginloader.h> 37#include <opie2/opluginloader.h>
24 38
25#include <qvariant.h> 39#include <qvariant.h>
26#include <qdialog.h> 40#include <qdialog.h>
27#include <qlistview.h> 41#include <qlistview.h>
28 42
29class QCheckBox; 43class QCheckBox;
30class QLabel; 44class QLabel;
31class QSpinBox; 45class QSpinBox;