|
1 /* |
|
2 * Copyright (c) 2002 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: LandmarksUi Content File - Empty Dialog..... |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 // Class include |
|
25 #include "CLmkEmptyDialog.h" |
|
26 #include <eikspane.h> |
|
27 #include <avkon.hrh> |
|
28 #include <akntitle.h> |
|
29 #include <aknViewAppUi.h> |
|
30 |
|
31 // ================= MEMBER FUNCTIONS ======================= |
|
32 |
|
33 // ----------------------------------------------------------------------------- |
|
34 // CLmkEmptyDialog::CLmkEmptyDialog |
|
35 // C++ default constructor can NOT contain any code, that |
|
36 // might leave. |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 CLmkEmptyDialog::CLmkEmptyDialog() |
|
40 { |
|
41 } |
|
42 |
|
43 // ---------------------------------------------------------------------------- |
|
44 // CLmkEmptyDialog::~CLmkEmptyDialog() |
|
45 // ---------------------------------------------------------------------------- |
|
46 // |
|
47 CLmkEmptyDialog::~CLmkEmptyDialog() |
|
48 { |
|
49 } |
|
50 |
|
51 // ---------------------------------------------------------------------------- |
|
52 // CLmkEmptyDialog::PostLayoutDynInitL() |
|
53 // ---------------------------------------------------------------------------- |
|
54 // |
|
55 void CLmkEmptyDialog::PostLayoutDynInitL() |
|
56 { |
|
57 CAknDialog::PostLayoutDynInitL(); |
|
58 } |
|
59 |
|
60 |
|
61 // ---------------------------------------------------------------------------- |
|
62 // CLmkEmptyDialog::PreLayoutDynInitL() |
|
63 // ---------------------------------------------------------------------------- |
|
64 // |
|
65 void CLmkEmptyDialog::PreLayoutDynInitL() |
|
66 { |
|
67 CAknDialog::PreLayoutDynInitL(); |
|
68 } |
|
69 |
|
70 // ---------------------------------------------------------------------------- |
|
71 // CLmkEmptyDialog::SetSizeAndPosition() |
|
72 // ---------------------------------------------------------------------------- |
|
73 // |
|
74 void CLmkEmptyDialog::SetSizeAndPositionL(const TSize& /*aSize*/) |
|
75 { |
|
76 CEikStatusPane * statusPane=iEikonEnv->AppUiFactory()->StatusPane(); |
|
77 TRect lStatusRect = statusPane->PaneRectL(TUid::Uid(EEikStatusPaneUidNavi)); |
|
78 |
|
79 TRect lTitleRect = statusPane->PaneRectL(TUid::Uid(EEikStatusPaneUidTitle)); |
|
80 |
|
81 CWindowGc& gc=SystemGc(); |
|
82 CGraphicsDevice* device = gc.Device(); |
|
83 TSize lScreenHight = device->SizeInPixels(); |
|
84 |
|
85 TInt lHeight = lScreenHight.iHeight - lTitleRect.Height() - lStatusRect.Height(); |
|
86 TInt lStartY = lTitleRect.Height() + lStatusRect.Height(); |
|
87 |
|
88 TSize size(lScreenHight.iWidth,lHeight); |
|
89 TPoint point(0,lStartY); |
|
90 |
|
91 CEikDialog::SetSizeAndPosition(size); |
|
92 SetPosition(point); |
|
93 } |
|
94 // ---------------------------------------------------------------------------- |
|
95 // CLmkEmptyDialog::OkToExitL() |
|
96 // ---------------------------------------------------------------------------- |
|
97 // |
|
98 TBool CLmkEmptyDialog::OkToExitL( TInt /*aButtonId*/) |
|
99 { |
|
100 return (ETrue); |
|
101 } |
|
102 |
|
103 // ---------------------------------------------------------------------------- |
|
104 // CLmkEmptyDialog::EmptyDialogExitL() |
|
105 // ---------------------------------------------------------------------------- |
|
106 // |
|
107 void CLmkEmptyDialog::EmptyDialogExitL() |
|
108 { |
|
109 TryExitL(-1); |
|
110 } |
|
111 |