|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "SGDocument.h" |
|
22 #include "SGAppUi.h" |
|
23 #include "SGModel.h" |
|
24 |
|
25 // ================= MEMBER FUNCTIONS ======================= |
|
26 |
|
27 // constructor |
|
28 CScreenGrabberDocument::CScreenGrabberDocument(CEikApplication& aApp) |
|
29 : CAknDocument(aApp) |
|
30 { |
|
31 } |
|
32 |
|
33 // destructor |
|
34 CScreenGrabberDocument::~CScreenGrabberDocument() |
|
35 { |
|
36 delete iModel; |
|
37 } |
|
38 |
|
39 // EPOC default constructor can leave. |
|
40 void CScreenGrabberDocument::ConstructL() |
|
41 { |
|
42 iModel = CScreenGrabberModel::NewL(); |
|
43 } |
|
44 |
|
45 // Two-phased constructor. |
|
46 CScreenGrabberDocument* CScreenGrabberDocument::NewL( |
|
47 CEikApplication& aApp) // CScreenGrabberApp reference |
|
48 { |
|
49 CScreenGrabberDocument* self = new (ELeave) CScreenGrabberDocument( aApp ); |
|
50 CleanupStack::PushL( self ); |
|
51 self->ConstructL(); |
|
52 CleanupStack::Pop(); |
|
53 |
|
54 return self; |
|
55 } |
|
56 |
|
57 // ---------------------------------------------------- |
|
58 // CScreenGrabberDocument::CreateAppUiL() |
|
59 // constructs CScreenGrabberAppUi |
|
60 // ---------------------------------------------------- |
|
61 // |
|
62 CEikAppUi* CScreenGrabberDocument::CreateAppUiL() |
|
63 { |
|
64 return new (ELeave) CScreenGrabberAppUi; |
|
65 } |
|
66 |
|
67 // ---------------------------------------------------- |
|
68 // CScreenGrabberDocument::OpenFileL |
|
69 // Overrides CAknDocument::OpenFileL to support document file |
|
70 // ---------------------------------------------------- |
|
71 // |
|
72 CFileStore* CScreenGrabberDocument::OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs) |
|
73 { |
|
74 return CEikDocument::OpenFileL(aDoOpen, aFilename, aFs); |
|
75 } |
|
76 |
|
77 |
|
78 // ---------------------------------------------------- |
|
79 |
|
80 CScreenGrabberModel* CScreenGrabberDocument::Model() |
|
81 { |
|
82 return iModel; |
|
83 } |
|
84 |
|
85 // ---------------------------------------------------- |
|
86 |
|
87 // End of File |