summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookday.cpp
authordrw <drw>2005-04-06 22:11:14 (UTC)
committer drw <drw>2005-04-06 22:11:14 (UTC)
commit678c792dd69e42a15d8ac5eaaa9228dfd413ed4c (patch) (unidiff)
treea7ab851cf76be078d145310d45663ffe4fbda4ec /core/pim/datebook/datebookday.cpp
parent9ea956870ddf74ddc70b83ed529ebb3b36e9231e (diff)
downloadopie-678c792dd69e42a15d8ac5eaaa9228dfd413ed4c.zip
opie-678c792dd69e42a15d8ac5eaaa9228dfd413ed4c.tar.gz
opie-678c792dd69e42a15d8ac5eaaa9228dfd413ed4c.tar.bz2
Use OResource for loading images, correct display of alarm and reoccurance icons for event and fix headers
Diffstat (limited to 'core/pim/datebook/datebookday.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.cpp64
1 files changed, 39 insertions, 25 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp
index 26f0303..b8385aa 100644
--- a/core/pim/datebook/datebookday.cpp
+++ b/core/pim/datebook/datebookday.cpp
@@ -1,35 +1,47 @@
1/********************************************************************** 1/*
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2                 This file is part of the Opie Project
3** 3
4** This file is part of Qtopia Environment. 4 Copyright (C) Opie Team <opie-devel@handhelds.org>
5** 5 =.
6** This file may be distributed and/or modified under the terms of the 6 .=l.
7** GNU General Public License version 2 as published by the Free Software 7           .>+-=
8** Foundation and appearing in the file LICENSE.GPL included in the 8 _;:,     .>    :=|. This program is free software; you can
9** packaging of this file. 9.> <`_,   >  .   <= redistribute it and/or modify it under
10** 10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11.="- .-=="i,     .._ License as published by the Free Software
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13** 13     ._= =}       : or (at your option) any later version.
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14    .%`+i>       _;_.
15** 15    .i_,=:_.      -<s. This program is distributed in the hope that
16** Contact info@trolltech.com if any conditions of this licensing are 16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17** not clear to you. 17 : ..    .:,     . . . without even the implied warranty of
18** 18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19**********************************************************************/ 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*/
20 30
21#include "datebookday.h" 31#include "datebookday.h"
22#include "datebooktypes.h" 32#include "datebooktypes.h"
23#include "datebookdayheaderimpl.h" 33#include "datebookdayheaderimpl.h"
24#include "datebookdayallday.h" 34#include "datebookdayallday.h"
25 35
26#include <opie2/oholidayplugin.h> 36#include <opie2/oholidayplugin.h>
27#include <qpe/resource.h> 37#include <opie2/oresource.h>
28#include <qpe/qpeapplication.h> 38
39#include <qpe/applnk.h>
29#include <qpe/ir.h> 40#include <qpe/ir.h>
41#include <qpe/qpeapplication.h>
30 42
31#include <qsimplerichtext.h> 43#include <qsimplerichtext.h>
32#include <qpopupmenu.h> 44#include <qpopupmenu.h>
33 45
34 46
35#include <qtimer.h> 47#include <qtimer.h>
@@ -754,21 +766,23 @@ void DateBookDayWidget::paintEvent( QPaintEvent *e )
754 // p.drawRect(0,0, 5, height()); 766 // p.drawRect(0,0, 5, height());
755 767
756 int y = 0; 768 int y = 0;
757 int d = 0; 769 int d = 0;
758 770
759 if ( ev.event().hasAlarm() ) { 771 if ( ev.event().hasAlarm() ) {
760 p.drawPixmap( width() - 16, 0, Resource::loadPixmap( "bell" ) ); 772 p.drawPixmap( width() - AppLnk::smallIconSize(), 0,
761 y = 20; 773 Opie::Core::OResource::loadPixmap( "bell", Opie::Core::OResource::SmallIcon ) );
774 y = AppLnk::smallIconSize() + 2;
762 d = 20; 775 d = 20;
763 } 776 }
764 777
765 if ( ev.event().hasRepeat() ) { 778 if ( ev.event().hasRepeat() ) {
766 p.drawPixmap( width() - 16, y, Resource::loadPixmap( "repeat" ) ); 779 p.drawPixmap( width() - AppLnk::smallIconSize(), y,
780 Opie::Core::OResource::loadPixmap( "repeat", Opie::Core::OResource::SmallIcon ) );
767 d = 20; 781 d = 20;
768 y += 20; 782 y += AppLnk::smallIconSize() + 2;
769 } 783 }
770 784
771 QSimpleRichText rt( text, font() ); 785 QSimpleRichText rt( text, font() );
772 rt.setWidth( geom.width() - d - 6 ); 786 rt.setWidth( geom.width() - d - 6 );
773 rt.draw( &p, 7, 0, e->region(), colorGroup() ); 787 rt.draw( &p, 7, 0, e->region(), colorGroup() );
774} 788}