Diffstat (limited to 'core/pim/today/todaybase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/todaybase.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index 7f1915c..cb809d3 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp | |||
@@ -1,71 +1,72 @@ | |||
1 | /* | 1 | /* |
2 | * todaybase.cpp | 2 | * todaybase.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß | 4 | * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 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 * | 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 * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "todaybase.h" | 17 | #include "todaybase.h" |
18 | 18 | ||
19 | #include <qpe/resource.h> | 19 | #include <qpe/resource.h> |
20 | 20 | ||
21 | #include <qvbox.h> | 21 | #include <qvbox.h> |
22 | #include <qwhatsthis.h> | 22 | #include <qwhatsthis.h> |
23 | 23 | ||
24 | using namespace Opie::Ui; | ||
24 | TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) | 25 | TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) |
25 | : QWidget( parent, name, WStyle_ContextHelp ) { | 26 | : QWidget( parent, name, WStyle_ContextHelp ) { |
26 | 27 | ||
27 | QPixmap logo = Resource::loadPixmap( "today/today_logo"); // logo | 28 | QPixmap logo = Resource::loadPixmap( "today/today_logo"); // logo |
28 | QImage opiezillaimage = QImage( Resource::loadImage("logo/opielogo" ) ); | 29 | QImage opiezillaimage = QImage( Resource::loadImage("logo/opielogo" ) ); |
29 | opiezillaimage = opiezillaimage.smoothScale( 45, 45 ); | 30 | opiezillaimage = opiezillaimage.smoothScale( 45, 45 ); |
30 | QPixmap opiezilla; //the opiezilla | 31 | QPixmap opiezilla; //the opiezilla |
31 | opiezilla.convertFromImage( opiezillaimage ); | 32 | opiezilla.convertFromImage( opiezillaimage ); |
32 | QPixmap config = Resource::loadPixmap( "SettingsIcon" ); // config icon | 33 | QPixmap config = Resource::loadPixmap( "SettingsIcon" ); // config icon |
33 | 34 | ||
34 | layout = 0L; | 35 | layout = 0L; |
35 | 36 | ||
36 | QPalette pal = this->palette(); | 37 | QPalette pal = this->palette(); |
37 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); | 38 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); |
38 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); | 39 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); |
39 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); | 40 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); |
40 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); | 41 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); |
41 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); | 42 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); |
42 | this->setPalette( pal ); | 43 | this->setPalette( pal ); |
43 | 44 | ||
44 | // --- logo Section --- | 45 | // --- logo Section --- |
45 | QPalette pal2; | 46 | QPalette pal2; |
46 | QColorGroup cg; | 47 | QColorGroup cg; |
47 | cg.setColor( QColorGroup::Text, white ); | 48 | cg.setColor( QColorGroup::Text, white ); |
48 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230 ), logo ) ); | 49 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230 ), logo ) ); |
49 | pal2.setActive( cg ); | 50 | pal2.setActive( cg ); |
50 | 51 | ||
51 | // today logo | 52 | // today logo |
52 | Frame = new QLabel( this, "Frame" ); | 53 | Frame = new QLabel( this, "Frame" ); |
53 | Frame->setPalette( pal2 ); | 54 | Frame->setPalette( pal2 ); |
54 | Frame->setFrameShape( QFrame::StyledPanel ); | 55 | Frame->setFrameShape( QFrame::StyledPanel ); |
55 | Frame->setFrameShadow( QFrame::Raised ); | 56 | Frame->setFrameShadow( QFrame::Raised ); |
56 | Frame->setLineWidth( 0 ); | 57 | Frame->setLineWidth( 0 ); |
57 | 58 | ||
58 | QHBoxLayout *frameLayout = new QHBoxLayout( Frame ); | 59 | QHBoxLayout *frameLayout = new QHBoxLayout( Frame ); |
59 | QVBox *box1 = new QVBox( Frame ); | 60 | QVBox *box1 = new QVBox( Frame ); |
60 | 61 | ||
61 | // Today text | 62 | // Today text |
62 | TodayLabel = new QLabel( box1, "TodayText" ); | 63 | TodayLabel = new QLabel( box1, "TodayText" ); |
63 | QFont TodayLabel_font( TodayLabel->font() ); | 64 | QFont TodayLabel_font( TodayLabel->font() ); |
64 | TodayLabel_font.setBold( TRUE ); | 65 | TodayLabel_font.setBold( TRUE ); |
65 | TodayLabel_font.setPointSize( 40 ); | 66 | TodayLabel_font.setPointSize( 40 ); |
66 | TodayLabel->setFont( TodayLabel_font ); | 67 | TodayLabel->setFont( TodayLabel_font ); |
67 | TodayLabel->setBackgroundOrigin( QLabel::ParentOrigin ); | 68 | TodayLabel->setBackgroundOrigin( QLabel::ParentOrigin ); |
68 | TodayLabel->setText( "<font color=#FFFFFF>" + tr("Today") +"</font>" ); | 69 | TodayLabel->setText( "<font color=#FFFFFF>" + tr("Today") +"</font>" ); |
69 | 70 | ||
70 | // date | 71 | // date |
71 | DateLabel = new QLabel( box1, "TextLabel1" ); | 72 | DateLabel = new QLabel( box1, "TextLabel1" ); |