author | drw <drw> | 2005-04-06 22:25:21 (UTC) |
---|---|---|
committer | drw <drw> | 2005-04-06 22:25:21 (UTC) |
commit | cd1b15147d372d8786c855764d397553651c358d (patch) (unidiff) | |
tree | 643479f1a84698f79227d7c8243921eacc3fe818 /core/pim/today/todaybase.cpp | |
parent | 678c792dd69e42a15d8ac5eaaa9228dfd413ed4c (diff) | |
download | opie-cd1b15147d372d8786c855764d397553651c358d.zip opie-cd1b15147d372d8786c855764d397553651c358d.tar.gz opie-cd1b15147d372d8786c855764d397553651c358d.tar.bz2 |
Use OResource for loading images and fix headers
-rw-r--r-- | core/pim/today/todaybase.cpp | 52 |
1 files changed, 33 insertions, 19 deletions
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,41 +1,55 @@ | |||
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 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
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. | ||
7 | */ | 29 | */ |
8 | /*************************************************************************** | ||
9 | * * | ||
10 | * This program is free software; you can redistribute it and/or modify * | ||
11 | * it under the terms of the GNU General Public License as published by * | ||
12 | * the Free Software Foundation; either version 2 of the License, or * | ||
13 | * (at your option) any later version. * | ||
14 | * * | ||
15 | ***************************************************************************/ | ||
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 | ||
25 | using namespace Opie::Ui; | 40 | using namespace Opie::Ui; |
26 | TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) | 41 | TodayBase::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 ); |
@@ -78,13 +92,13 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) | |||
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 ) ); |