66
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description : Implemrntation class for calenlistdialog .
|
|
15 |
*/
|
|
16 |
|
|
17 |
//System include
|
|
18 |
#include <calsession.h>
|
|
19 |
#include <calentryview.h>
|
|
20 |
#include <calcalendarinfo.h>
|
|
21 |
#include <StringLoader.h>
|
|
22 |
#include <AknsBasicBackgroundControlContext.h>
|
|
23 |
#include <aknconsts.h>
|
|
24 |
#include <AknIconArray.h>
|
|
25 |
#include <aknlists.h>
|
|
26 |
#include <akntitle.h>
|
|
27 |
#include <eikclbd.h>
|
|
28 |
#include <aknnavi.h>
|
|
29 |
#include <aknlayoutscalable_apps.cdl.h>
|
|
30 |
#include <layoutmetadata.cdl.h>
|
|
31 |
#include <data_caging_path_literals.hrh>
|
|
32 |
#include <pathinfo.h>
|
|
33 |
#include <bautils.h>
|
|
34 |
#include <aknenv.h>
|
|
35 |
#include <eikapp.h>
|
|
36 |
#include <eikenv.h>
|
|
37 |
#include <gulicon.h>
|
|
38 |
#include <multicaluidialog.rsg>
|
|
39 |
#include <multicaluidialog.mbg>
|
|
40 |
|
|
41 |
//User include
|
|
42 |
#include "multicaluidialogimpl.h"
|
|
43 |
#include "multicaluidialogmodel.h"
|
|
44 |
#include "calendarui_debug.h"
|
|
45 |
#include "caldblistboxitemdrawer.h"
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
// ----------------------------------------------------------------------------
|
|
50 |
// CCalenMultipleDbListboxItemDrawer::CCalenMultipleDbListboxItemDrawer
|
|
51 |
// (other items were commented in a header).
|
|
52 |
// ----------------------------------------------------------------------------
|
|
53 |
//
|
|
54 |
CCalenDbListboxItemDrawer::CCalenDbListboxItemDrawer(MTextListBoxModel* aTextListBoxModel,
|
|
55 |
const CFont* aFont,
|
|
56 |
CFormattedCellListBoxData* aFormattedCellData,
|
|
57 |
CEikListBox* aListBox ,
|
|
58 |
const RArray<TInt32>& aColorUidArray)
|
|
59 |
: CFormattedCellListBoxItemDrawer(aTextListBoxModel,aFont,aFormattedCellData),
|
|
60 |
iListBox(aListBox),
|
|
61 |
iColorUidArray(aColorUidArray)
|
|
62 |
|
|
63 |
{
|
|
64 |
TRACE_ENTRY_POINT
|
|
65 |
|
|
66 |
TRACE_EXIT_POINT
|
|
67 |
}
|
|
68 |
|
|
69 |
// ----------------------------------------------------------------------------
|
|
70 |
// CCalenMultipleDbListboxItemDrawer::CCalenMultipleDbListboxItemDrawer
|
|
71 |
// (other items were commented in a header).
|
|
72 |
// ----------------------------------------------------------------------------
|
|
73 |
//
|
|
74 |
CCalenDbListboxItemDrawer::~CCalenDbListboxItemDrawer()
|
|
75 |
{
|
|
76 |
TRACE_ENTRY_POINT
|
|
77 |
|
|
78 |
TRACE_EXIT_POINT
|
|
79 |
}
|
|
80 |
|
|
81 |
// ----------------------------------------------------------------------------
|
|
82 |
// CCalenMultipleDbListboxItemDrawer::DrawItem
|
|
83 |
// (other items were commented in a header).
|
|
84 |
// ----------------------------------------------------------------------------
|
|
85 |
//
|
|
86 |
void CCalenDbListboxItemDrawer::DrawItem(TInt aItemIndex,
|
|
87 |
TPoint aItemRectPos,
|
|
88 |
TBool aItemIsSelected,
|
|
89 |
TBool aItemIsCurrent,
|
|
90 |
TBool aViewIsEmphasized,
|
|
91 |
TBool aViewIsDimmed) const
|
|
92 |
{
|
|
93 |
TRACE_ENTRY_POINT
|
|
94 |
TRect actualItemRect(aItemRectPos, iItemCellSize);
|
|
95 |
SetupGc(aItemIndex);
|
|
96 |
|
|
97 |
CFormattedCellListBoxItemDrawer::DrawItem(aItemIndex,
|
|
98 |
aItemRectPos,
|
|
99 |
aItemIsSelected,
|
|
100 |
aItemIsCurrent,
|
|
101 |
aViewIsEmphasized,
|
|
102 |
aViewIsDimmed);
|
|
103 |
|
|
104 |
iGc->Reset();
|
|
105 |
|
|
106 |
// Ggetting the layout for clolourstrips for list dialog
|
|
107 |
TAknWindowComponentLayout tempLayout = AknLayoutScalable_Apps::list_cale_time_pane_g6(0);
|
|
108 |
|
|
109 |
TAknLayoutRect colourstrips;
|
|
110 |
colourstrips.LayoutRect( actualItemRect, tempLayout.LayoutLine() );
|
|
111 |
|
|
112 |
iGc->SetPenColor( CGraphicsContext::ENullPen );
|
|
113 |
iGc->DrawRect( colourstrips.Rect() );
|
|
114 |
iGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
|
|
115 |
iGc->SetBrushColor( TRgb(iColorUidArray[aItemIndex] ));
|
|
116 |
iGc->DrawRect( colourstrips.Rect() );
|
|
117 |
|
|
118 |
|
|
119 |
iGc->Reset();
|
|
120 |
|
|
121 |
TRACE_EXIT_POINT
|
|
122 |
}
|
|
123 |
|
|
124 |
|
|
125 |
|
|
126 |
// End of file.
|