|
1 /* |
|
2 * Copyright (c) 2008-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: Implementation of Wrapper class exposed to Views for HDMI |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <glxtvoutwrapper.h> |
|
19 #include <glxtvoutwrapper_p.h> |
|
20 |
|
21 // ----------------------------------------------------------------------------- |
|
22 // Constructor |
|
23 // ----------------------------------------------------------------------------- |
|
24 GlxTvOutWrapper::GlxTvOutWrapper(): |
|
25 mTvOutWrapperPrivate(NULL) |
|
26 { |
|
27 // Do Nothing |
|
28 } |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // Destructor |
|
32 // ----------------------------------------------------------------------------- |
|
33 GlxTvOutWrapper::~GlxTvOutWrapper() |
|
34 { |
|
35 if (mTvOutWrapperPrivate) |
|
36 { |
|
37 delete mTvOutWrapperPrivate; |
|
38 mTvOutWrapperPrivate = NULL; |
|
39 } |
|
40 } |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // setModel |
|
44 // and Create the private instance to pass the model |
|
45 // ----------------------------------------------------------------------------- |
|
46 void GlxTvOutWrapper::setModel(QAbstractItemModel* aModel) |
|
47 { |
|
48 if (!mTvOutWrapperPrivate) |
|
49 { |
|
50 mTvOutWrapperPrivate = GlxTvOutWrapperPrivate::Instance(this,aModel); |
|
51 } |
|
52 else |
|
53 { |
|
54 return; |
|
55 } |
|
56 } |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // setImagetoHDMI |
|
60 // ----------------------------------------------------------------------------- |
|
61 void GlxTvOutWrapper::setImagetoHDMI() |
|
62 { |
|
63 if(mTvOutWrapperPrivate){ |
|
64 mTvOutWrapperPrivate->SetImagetoHDMI(); |
|
65 } |
|
66 } |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // setToCloningMode |
|
70 // ----------------------------------------------------------------------------- |
|
71 void GlxTvOutWrapper::setToCloningMode() |
|
72 { |
|
73 if(mTvOutWrapperPrivate){ |
|
74 mTvOutWrapperPrivate->SetToCloningMode(); |
|
75 } |
|
76 } |
|
77 |
|
78 // ----------------------------------------------------------------------------- |
|
79 // setToNativeMode |
|
80 // ----------------------------------------------------------------------------- |
|
81 void GlxTvOutWrapper::setToNativeMode() |
|
82 { |
|
83 if(mTvOutWrapperPrivate){ |
|
84 mTvOutWrapperPrivate->SetToNativeMode(); |
|
85 } |
|
86 } |
|
87 |
|
88 // ----------------------------------------------------------------------------- |
|
89 // itemNotSupported |
|
90 // ----------------------------------------------------------------------------- |
|
91 void GlxTvOutWrapper::itemNotSupported() |
|
92 { |
|
93 if(mTvOutWrapperPrivate){ |
|
94 mTvOutWrapperPrivate->ItemNotSupported(); |
|
95 } |
|
96 } |
|
97 |
|
98 // ----------------------------------------------------------------------------- |
|
99 // activateZoom |
|
100 // ----------------------------------------------------------------------------- |
|
101 void GlxTvOutWrapper::activateZoom(bool autoZoomOut) |
|
102 { |
|
103 if(mTvOutWrapperPrivate){ |
|
104 mTvOutWrapperPrivate->ActivateZoom(autoZoomOut); |
|
105 } |
|
106 } |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // deactivateZoom |
|
110 // ----------------------------------------------------------------------------- |
|
111 void GlxTvOutWrapper::deactivateZoom() |
|
112 { |
|
113 if(mTvOutWrapperPrivate){ |
|
114 mTvOutWrapperPrivate->DeactivateZoom(); |
|
115 } |
|
116 } |
|
117 |
|
118 // End of file |