equal
deleted
inserted
replaced
18 #include "glxtvoutwrapper.h" |
18 #include "glxtvoutwrapper.h" |
19 #include "glxtvoutwrapper_p.h" |
19 #include "glxtvoutwrapper_p.h" |
20 #include "glxtvconnectionobserver.h" |
20 #include "glxtvconnectionobserver.h" |
21 #include "glxhdmicontroller.h" |
21 #include "glxhdmicontroller.h" |
22 #include "glxmodelparm.h" |
22 #include "glxmodelparm.h" |
|
23 #include "glxviewids.h" |
23 |
24 |
24 // ----------------------------------------------------------------------------- |
25 // ----------------------------------------------------------------------------- |
25 // Static method to create the private wrapper instance |
26 // Static method to create the private wrapper instance |
26 // ----------------------------------------------------------------------------- |
27 // ----------------------------------------------------------------------------- |
27 GlxTvOutWrapperPrivate* GlxTvOutWrapperPrivate::Instance(GlxTvOutWrapper* aTvOutWrapper, |
28 GlxTvOutWrapperPrivate* GlxTvOutWrapperPrivate::Instance(GlxTvOutWrapper* aTvOutWrapper, |
87 void GlxTvOutWrapperPrivate::HandleConnectionChange(bool aConnected) |
88 void GlxTvOutWrapperPrivate::HandleConnectionChange(bool aConnected) |
88 { |
89 { |
89 iHdmiConnected = aConnected; |
90 iHdmiConnected = aConnected; |
90 // if Connection state positive and uri/bmp are not passed to HDMI already |
91 // if Connection state positive and uri/bmp are not passed to HDMI already |
91 // then it is a new image - Set it. |
92 // then it is a new image - Set it. |
92 if (!isImageSetToHdmi && iHdmiConnected) |
93 if (!isImageSetToHdmi && iHdmiConnected && getSubState() !=IMAGEVIEWER_S) |
93 { |
94 { |
94 SetNewImage(); |
95 SetNewImage(); |
95 } |
96 } |
96 } |
97 } |
97 |
98 |
121 // SetNewImage |
122 // SetNewImage |
122 // Private implementation of setting the image to HDMI |
123 // Private implementation of setting the image to HDMI |
123 // ----------------------------------------------------------------------------- |
124 // ----------------------------------------------------------------------------- |
124 void GlxTvOutWrapperPrivate::SetNewImage() |
125 void GlxTvOutWrapperPrivate::SetNewImage() |
125 { |
126 { |
126 int focusIndex = (iModel->data(iModel->index(0,0),GlxFocusIndexRole).value<int>()); |
127 QVariant focusVariant =(iModel->data(iModel->index(0,0),GlxFocusIndexRole)); |
|
128 int focusIndex; |
|
129 if (focusVariant.isValid() && focusVariant.canConvert<int>()) { |
|
130 focusIndex = (focusVariant.value<int>()); |
|
131 } |
|
132 else{ |
|
133 return ; |
|
134 } |
127 |
135 |
128 // Get the image uri |
136 // Get the image uri |
129 QString imagePath = (iModel->data(iModel->index(focusIndex,0),GlxUriRole)).value<QString>(); |
137 QString imagePath = (iModel->data(iModel->index(focusIndex,0),GlxUriRole)).value<QString>(); |
130 if(imagePath.isNull()) { |
138 if(imagePath.isNull()) { |
131 // Null path no need to proceed |
139 // Null path no need to proceed |
186 if(iHdmiController){ |
194 if(iHdmiController){ |
187 iHdmiController->DeactivateZoom(); |
195 iHdmiController->DeactivateZoom(); |
188 } |
196 } |
189 } |
197 } |
190 |
198 |
|
199 // ----------------------------------------------------------------------------- |
|
200 // getSubState |
|
201 // ----------------------------------------------------------------------------- |
|
202 int GlxTvOutWrapperPrivate::getSubState() |
|
203 { |
|
204 int substate = NO_FULLSCREEN_S; |
|
205 QVariant variant = iModel->data( iModel->index(0,0), GlxSubStateRole ); |
|
206 if ( variant.isValid() && variant.canConvert<int> () ) { |
|
207 substate = variant.value<int>(); |
|
208 } |
|
209 return substate; |
|
210 } |
|
211 |
191 // End of file |
212 // End of file |