232 { |
234 { |
233 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_ADDVIEWCONNECTION, "GlxGridView::addViewConnection" ); |
235 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_ADDVIEWCONNECTION, "GlxGridView::addViewConnection" ); |
234 connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(loadGridView(Qt::Orientation))); |
236 connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(loadGridView(Qt::Orientation))); |
235 connect(mGridView, SIGNAL(activated(const QModelIndex &)), this, SLOT( itemSelected(const QModelIndex &))); |
237 connect(mGridView, SIGNAL(activated(const QModelIndex &)), this, SLOT( itemSelected(const QModelIndex &))); |
236 connect( mGridView, SIGNAL( scrollingEnded() ), this, SLOT( setVisvalWindowIndex() ) ); |
238 connect( mGridView, SIGNAL( scrollingEnded() ), this, SLOT( setVisvalWindowIndex() ) ); |
237 if(XQServiceUtil::isService()){ |
|
238 connect(mGridView, SIGNAL(activated(const QModelIndex &)), this, SIGNAL( gridItemSelected(const QModelIndex &))); |
|
239 } |
|
240 connect(mGridView, SIGNAL(longPressed( HbAbstractViewItem*, QPointF )),this, SLOT( indicateLongPress( HbAbstractViewItem*, QPointF ) ) ); |
239 connect(mGridView, SIGNAL(longPressed( HbAbstractViewItem*, QPointF )),this, SLOT( indicateLongPress( HbAbstractViewItem*, QPointF ) ) ); |
241 } |
240 } |
242 |
241 |
243 void GlxGridView::removeViewConnection () |
242 void GlxGridView::removeViewConnection () |
244 { |
243 { |
245 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_REMOVEVIEWCONNECTION, "GlxGridView::removeViewConnection" ); |
244 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_REMOVEVIEWCONNECTION, "GlxGridView::removeViewConnection" ); |
246 disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(loadGridView(Qt::Orientation))); |
245 disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(loadGridView(Qt::Orientation))); |
247 disconnect(mGridView, SIGNAL(activated(const QModelIndex &)), this, SLOT( itemSelected(const QModelIndex &))); |
246 disconnect(mGridView, SIGNAL(activated(const QModelIndex &)), this, SLOT( itemSelected(const QModelIndex &))); |
248 disconnect(mGridView, SIGNAL(activated(const QModelIndex &)), this, SIGNAL( gridItemSelected(const QModelIndex &))); |
|
249 disconnect( mGridView, SIGNAL( scrollingEnded() ), this, SLOT( setVisvalWindowIndex() ) ); |
247 disconnect( mGridView, SIGNAL( scrollingEnded() ), this, SLOT( setVisvalWindowIndex() ) ); |
250 disconnect(mGridView, SIGNAL(longPressed( HbAbstractViewItem*, QPointF )),this, SLOT( indicateLongPress( HbAbstractViewItem*, QPointF ) ) ); |
248 disconnect(mGridView, SIGNAL(longPressed( HbAbstractViewItem*, QPointF )),this, SLOT( indicateLongPress( HbAbstractViewItem*, QPointF ) ) ); |
251 } |
249 } |
252 |
250 |
253 void GlxGridView::resetItemTransform() |
251 void GlxGridView::resetItemTransform() |
263 |
261 |
264 void GlxGridView::itemSelected(const QModelIndex & index) |
262 void GlxGridView::itemSelected(const QModelIndex & index) |
265 { |
263 { |
266 OstTrace1( TRACE_NORMAL, GLXGRIDVIEW_ITEMSELECTED, "GlxGridView::itemSelected;index=%d", index.row() ); |
264 OstTrace1( TRACE_NORMAL, GLXGRIDVIEW_ITEMSELECTED, "GlxGridView::itemSelected;index=%d", index.row() ); |
267 |
265 |
268 if ( mGridView->selectionMode() == HbGridView::MultiSelection ){ //in multi selection mode no need to open the full screen |
266 if ( mGridView->selectionMode() == HbGridView::MultiSelection ) { //in multi selection mode no need to open the full screen |
269 return ; |
267 return ; |
270 } |
268 } |
|
269 if ( mIsLongPress ) { |
|
270 mIsLongPress = false; |
|
271 return ; |
|
272 } |
|
273 if(XQServiceUtil::isService()){ |
|
274 emit gridItemSelected(index); |
|
275 return; |
|
276 } |
|
277 |
271 OstTraceEventStart0( EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_START, "Fullscreen Launch Time" ); |
278 OstTraceEventStart0( EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_START, "Fullscreen Launch Time" ); |
272 |
279 |
273 if ( mModel ) |
280 if ( mModel ) { |
274 { |
|
275 mModel->setData( index, index.row(), GlxFocusIndexRole ); |
281 mModel->setData( index, index.row(), GlxFocusIndexRole ); |
276 } |
282 } |
277 emit actionTriggered( EGlxCmdFullScreenOpen ); |
283 emit actionTriggered( EGlxCmdFullScreenOpen ); |
278 OstTraceEventStop( EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_STOP, "Fullscreen Launch Time", EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_START ); |
284 OstTraceEventStop( EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_STOP, "Fullscreen Launch Time", EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_START ); |
279 } |
285 } |
280 |
286 |
281 void GlxGridView::setVisvalWindowIndex() |
287 void GlxGridView::setVisvalWindowIndex() |