59 |
71 |
60 void GlxGridView::activate() |
72 void GlxGridView::activate() |
61 { |
73 { |
62 OstTraceFunctionEntry0( GLXGRIDVIEW_ACTIVATE_ENTRY ); |
74 OstTraceFunctionEntry0( GLXGRIDVIEW_ACTIVATE_ENTRY ); |
63 if(mUiOnButton == NULL) { |
75 if(mUiOnButton == NULL) { |
64 mUiOnButton = new HbPushButton("UI",this); |
76 mUiOnButton = new HbPushButton(this); |
65 connect(mUiOnButton, SIGNAL(clicked(bool)), this, SLOT(uiButtonClicked(bool))); |
77 connect(mUiOnButton, SIGNAL(clicked(bool)), this, SLOT(uiButtonClicked(bool))); |
66 mUiOnButton->setGeometry(QRectF(610,0,15,15)); |
78 mUiOnButton->setGeometry(QRectF(590,0,40,40)); |
67 mUiOnButton->setZValue(1); |
79 mUiOnButton->setZValue(1); |
|
80 mUiOnButton->setIcon(HbIcon(GLXICON_WALL_UI_ON)); |
68 mUiOnButton->hide(); |
81 mUiOnButton->hide(); |
69 } |
82 } |
70 loadGridView(); |
83 loadGridView(); |
|
84 connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationchanged(Qt::Orientation)),Qt::UniqueConnection); |
|
85 if(mCountItem == NULL) { |
|
86 mCountItem = new HbLabel(this); |
|
87 HbFrameItem *frame = new HbFrameItem(this); //graphics for mCountItem |
|
88 frame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); |
|
89 frame->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans"); |
|
90 frame->graphicsItem()->setOpacity(1); |
|
91 mCountItem->setBackgroundItem(frame->graphicsItem(),-1); |
|
92 } |
71 OstTraceFunctionExit0( GLXGRIDVIEW_ACTIVATE_EXIT ); |
93 OstTraceFunctionExit0( GLXGRIDVIEW_ACTIVATE_EXIT ); |
72 } |
94 } |
73 |
95 |
74 void GlxGridView::deActivate() |
96 void GlxGridView::deActivate() |
75 { |
97 { |
76 OstTraceFunctionEntry0( GLXGRIDVIEW_DEACTIVATE_ENTRY ); |
98 OstTraceFunctionEntry0( GLXGRIDVIEW_DEACTIVATE_ENTRY ); |
77 if (mUiOnButton && mUiOnButton->isVisible()) |
99 mScrolling = FALSE; |
|
100 if (mUiOnButton) |
78 { |
101 { |
79 mUiOnButton->hide(); |
102 mUiOnButton->hide(); |
80 } |
103 } |
81 if(mIconItem) |
104 if(mIconItem) |
82 { |
105 { |
83 mIconItem->hide(); |
106 mIconItem->hide(); |
84 mIconItem->resetTransform(); |
107 mIconItem->resetTransform(); |
85 mIconItem->setOpacity(0); |
108 mIconItem->setOpacity(0); |
86 mIconItem->setZValue(mIconItem->zValue()-20); |
109 mIconItem->setZValue(mIconItem->zValue()-20); |
87 } |
110 } |
|
111 if (mCountItem) |
|
112 { |
|
113 mCountItem->hide(); |
|
114 } |
|
115 if (mAlbumName) |
|
116 { |
|
117 mAlbumName->hide(); |
|
118 } |
|
119 if(mZeroItemLabel) |
|
120 { |
|
121 mZeroItemLabel->hide(); |
|
122 } |
|
123 if(mCameraButton) |
|
124 { |
|
125 mCameraButton->hide(); |
|
126 } |
|
127 disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationchanged(Qt::Orientation))); |
88 OstTraceFunctionExit0( GLXGRIDVIEW_DEACTIVATE_EXIT ); |
128 OstTraceFunctionExit0( GLXGRIDVIEW_DEACTIVATE_EXIT ); |
89 } |
129 } |
90 |
130 |
91 void GlxGridView::initializeView(QAbstractItemModel *model) |
131 void GlxGridView::initializeView(QAbstractItemModel *model) |
92 { |
132 { |
93 activate(); |
133 activate(); |
94 setModel(model); |
134 setModel(model); |
95 } |
135 } |
96 |
136 |
97 void GlxGridView::setModel(QAbstractItemModel *model) |
137 void GlxGridView::clearCurrentModel() |
|
138 { |
|
139 if ( mModel ) { |
|
140 disconnect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(showItemCount())); |
|
141 disconnect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(showItemCount())); |
|
142 disconnect(mModel, SIGNAL(destroyed()), this, SLOT( clearCurrentModel())); |
|
143 disconnect(mModel, SIGNAL(albumTitleAvailable(QString)), this, SLOT(showAlbumTitle(QString))); |
|
144 disconnect(mModel, SIGNAL(populated()), this, SLOT( populated())); |
|
145 mModel = NULL ; |
|
146 } |
|
147 } |
|
148 |
|
149 void GlxGridView::initializeNewModel() |
|
150 { |
|
151 if ( mModel ) { |
|
152 connect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(showItemCount())); |
|
153 connect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(showItemCount())); |
|
154 connect(mModel, SIGNAL(destroyed()), this, SLOT( clearCurrentModel())); |
|
155 connect(mModel, SIGNAL(albumTitleAvailable(QString)), this, SLOT(showAlbumTitle(QString))); |
|
156 connect(mModel, SIGNAL(populated()), this, SLOT( populated())); |
|
157 } |
|
158 } |
|
159 |
|
160 void GlxGridView::setModel(QAbstractItemModel *model) |
98 { |
161 { |
99 OstTraceFunctionEntry0( GLXGRIDVIEW_SETMODEL_ENTRY ); |
162 OstTraceFunctionEntry0( GLXGRIDVIEW_SETMODEL_ENTRY ); |
100 if(model) |
163 if(model) |
101 { |
164 { |
102 mModel = model; |
165 clearCurrentModel(); |
|
166 mModel = model; |
|
167 initializeNewModel(); |
103 QVariant variantimage = mModel->data(mModel->index(0,0),GlxDefaultImage); |
168 QVariant variantimage = mModel->data(mModel->index(0,0),GlxDefaultImage); |
104 if (mWidget && variantimage.isValid() && variantimage.canConvert<QImage> () ) |
169 if (mWidget && variantimage.isValid() && variantimage.canConvert<QImage> () ) |
105 { |
170 { |
106 mWidget->setDefaultImage(variantimage.value<QImage>()); |
171 mWidget->setDefaultImage(variantimage.value<QImage>()); |
107 } |
172 } |
140 |
206 |
141 void GlxGridView::enableMarking() |
207 void GlxGridView::enableMarking() |
142 { |
208 { |
143 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_ENABLEMARKING, "GlxGridView::enableMarking" ); |
209 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_ENABLEMARKING, "GlxGridView::enableMarking" ); |
144 mWidget->setSelectionMode(HgWidget::MultiSelection); |
210 mWidget->setSelectionMode(HgWidget::MultiSelection); |
|
211 if (mMainLabel == NULL) { |
|
212 mMainLabel = new HbLabel("Select Photos", this); |
|
213 HbFrameItem *frame1 = new HbFrameItem(this); //graphics for mMainLabel |
|
214 frame1->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); |
|
215 frame1->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans"); |
|
216 frame1->graphicsItem()->setOpacity(1); |
|
217 mMainLabel->setBackgroundItem(frame1->graphicsItem(),-1); |
|
218 } |
|
219 if (mMarkCheckBox == NULL) { |
|
220 mMarkCheckBox = new HbCheckBox(GLX_OPTION_MARK_ALL, this); |
|
221 HbFrameItem *frame2 = new HbFrameItem(this); //graphics for mMarkCheckBox |
|
222 frame2->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); |
|
223 frame2->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans"); |
|
224 frame2->graphicsItem()->setOpacity(1); |
|
225 mMarkCheckBox->setBackgroundItem(frame2->graphicsItem(),-1); |
|
226 } |
|
227 if (mCountLabel == NULL) { |
|
228 mCountLabel = new HbLabel(this); |
|
229 HbFrameItem *frame3 = new HbFrameItem(this); //graphics for mCountLabel |
|
230 frame3->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); |
|
231 frame3->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans"); |
|
232 frame3->graphicsItem()->setOpacity(1); |
|
233 mCountLabel->setBackgroundItem(frame3->graphicsItem(),-1); |
|
234 } |
|
235 |
|
236 hideorshowitems(mWindow->orientation()); |
|
237 |
|
238 connect( mWidget->selectionModel() , SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection& ) ), this, SLOT( showMarkedItemCount() ) ); |
|
239 connect(mMarkCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( stateChanged(int))); |
|
240 |
145 } |
241 } |
146 |
242 |
147 void GlxGridView::disableMarking() |
243 void GlxGridView::disableMarking() |
148 { |
244 { |
149 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_DISABLEMARKING, "GlxGridView::disableMarking" ); |
245 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_DISABLEMARKING, "GlxGridView::disableMarking" ); |
150 mWidget->setSelectionMode(HgWidget::NoSelection); |
246 mWidget->setSelectionMode(HgWidget::NoSelection); |
|
247 disconnect( mWidget->selectionModel() , SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection& ) ), this, SLOT( showMarkedItemCount() ) ); |
|
248 disconnect(mMarkCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( stateChanged(int))); |
|
249 if (mMainLabel) { |
|
250 mMainLabel->hide(); |
|
251 } |
|
252 if (mMarkCheckBox) { |
|
253 mMarkCheckBox->setCheckState(Qt::Unchecked); |
|
254 mMarkCheckBox->hide(); |
|
255 } |
|
256 if (mCountLabel) { |
|
257 mCountLabel->hide(); |
|
258 } |
|
259 |
|
260 hideorshowitems(mWindow->orientation()); |
|
261 } |
|
262 |
|
263 void GlxGridView::stateChanged(int state) |
|
264 { |
|
265 if(state) |
|
266 handleUserAction(EGlxCmdMarkAll); |
|
267 else |
|
268 handleUserAction(EGlxCmdUnMarkAll); |
|
269 } |
|
270 |
|
271 void GlxGridView::showMarkedItemCount() |
|
272 { |
|
273 int count = mModel->rowCount(); |
|
274 QModelIndexList indexList = mWidget->selectionModel()->selectedIndexes(); |
|
275 int markItemCount = indexList.count(); |
|
276 |
|
277 QString text= QString("%1 / %2").arg( markItemCount ).arg( count ); |
|
278 mCountLabel->setPlainText( text ); |
|
279 } |
|
280 |
|
281 void GlxGridView::showItemCount() |
|
282 { |
|
283 int count = 0; |
|
284 if(mModel) { |
|
285 count = mModel->rowCount(); |
|
286 QSize deviceSize = HbDeviceProfile::current().logicalSize(); |
|
287 QSize screenSize = ( mWindow->orientation() == Qt::Vertical ) ? QSize( deviceSize.width(), deviceSize.height() ) |
|
288 : QSize( deviceSize.height(), deviceSize.width() ) ; |
|
289 if(count) { |
|
290 if(mZeroItemLabel) { |
|
291 mZeroItemLabel->hide(); |
|
292 } |
|
293 if(mCameraButton) { |
|
294 mCameraButton->hide(); |
|
295 } |
|
296 if(isItemVisible(Hb::TitleBarItem)) { |
|
297 QString text; |
|
298 if (getSubState() == ALL_ITEM_S) { |
|
299 if (mAlbumName) { |
|
300 mAlbumName->hide(); |
|
301 } |
|
302 mCountItem->setGeometry(QRectF(0,0,screenSize.width(),deviceSize.height()/24)); |
|
303 text = QString("%1 Items").arg( count ); |
|
304 mCountItem->setPlainText( text ); |
|
305 mCountItem->setAlignment(Qt::AlignLeft); |
|
306 mCountItem->show(); |
|
307 } |
|
308 else if (getSubState() == ALBUM_ITEM_S) { |
|
309 mCountItem->hide(); |
|
310 QVariant variant = mModel->data(mModel->index(0,0),GlxViewTitle); |
|
311 if (variant.toString() != NULL) { |
|
312 showAlbumTitle(variant.toString()); |
|
313 } |
|
314 } |
|
315 } |
|
316 else { |
|
317 if (mCountItem) { |
|
318 mCountItem->hide(); |
|
319 } |
|
320 if (mAlbumName) { |
|
321 mAlbumName->hide(); |
|
322 } |
|
323 } |
|
324 |
|
325 } |
|
326 else { |
|
327 bool populated = FALSE; |
|
328 QVariant variant = mModel->data(mModel->index(0,0),GlxPopulated); |
|
329 if (variant.isValid() && variant.canConvert<bool>() ) |
|
330 { |
|
331 populated = variant.value<bool>(); |
|
332 } |
|
333 if(populated) { |
|
334 if (mCountItem) { |
|
335 mCountItem->hide(); |
|
336 } |
|
337 if (mAlbumName) { |
|
338 mAlbumName->hide(); |
|
339 } |
|
340 |
|
341 showNoImageString(); |
|
342 |
|
343 if (getSubState() == ALBUM_ITEM_S) { |
|
344 QVariant variant = mModel->data(mModel->index(0,0),GlxViewTitle); |
|
345 if (variant.toString() != NULL) { |
|
346 showAlbumTitle(variant.toString()); |
|
347 } |
|
348 } |
|
349 } |
|
350 } |
|
351 } |
|
352 } |
|
353 |
|
354 void GlxGridView::showAlbumTitle(QString aTitle) |
|
355 { |
|
356 int count = mModel->rowCount(); |
|
357 QSize deviceSize = HbDeviceProfile::current().logicalSize(); |
|
358 QSize screenSize = ( mWindow->orientation() == Qt::Vertical ) ? QSize( deviceSize.width(), deviceSize.height() ) |
|
359 : QSize( deviceSize.height(), deviceSize.width() ) ; |
|
360 if(mAlbumName == NULL) { |
|
361 mAlbumName = new HbLabel(this); |
|
362 HbFrameItem *frame = new HbFrameItem(this); //graphics for mAlbumName |
|
363 frame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); |
|
364 frame->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans"); |
|
365 frame->graphicsItem()->setOpacity(1); |
|
366 mAlbumName->setBackgroundItem(frame->graphicsItem(),-1); |
|
367 } |
|
368 |
|
369 if(count && isItemVisible(Hb::TitleBarItem)) { |
|
370 mAlbumName->setGeometry(QRectF(0,0,screenSize.width()/2,deviceSize.height()/24)); |
|
371 QString text = QString(aTitle); |
|
372 mAlbumName->setPlainText( text ); |
|
373 mAlbumName->show(); |
|
374 mCountItem->setGeometry(QRectF(screenSize.width()/2,0,screenSize.width()/2,deviceSize.height()/24)); |
|
375 text = QString("(%1)").arg(count); |
|
376 mCountItem->setPlainText( text ); |
|
377 mCountItem->setAlignment(Qt::AlignRight); |
|
378 mCountItem->show(); |
|
379 } |
|
380 else if((!count) && isItemVisible(Hb::TitleBarItem)) { |
|
381 mAlbumName->setGeometry(QRectF(0,0,screenSize.width(),deviceSize.height()/24)); |
|
382 QString text = QString(aTitle); |
|
383 mAlbumName->setPlainText( text ); |
|
384 mAlbumName->show(); |
|
385 } |
|
386 } |
|
387 |
|
388 void GlxGridView::showNoImageString() |
|
389 { |
|
390 qreal chromeHeight = 0.0; |
|
391 QSize deviceSize = HbDeviceProfile::current().logicalSize(); |
|
392 QSize screenSize = ( mWindow->orientation() == Qt::Vertical ) ? QSize( deviceSize.width(), deviceSize.height() ) |
|
393 : QSize( deviceSize.height(), deviceSize.width() ) ; |
|
394 qreal midHeight = screenSize.height()/2; |
|
395 if (isItemVisible(Hb::TitleBarItem)) { |
|
396 style()->parameter("hb-param-widget-chrome-height", chromeHeight); |
|
397 midHeight -= chromeHeight; |
|
398 } |
|
399 if (mZeroItemLabel == NULL) { |
|
400 mZeroItemLabel = new HbLabel("(No Images)\n To capture images Open", this); |
|
401 } |
|
402 mZeroItemLabel->setGeometry(QRectF(0, midHeight - deviceSize.height()/16, screenSize.width(), 3*deviceSize.height()/32)); |
|
403 mZeroItemLabel->setAlignment(Qt::AlignHCenter); |
|
404 mZeroItemLabel->show(); |
|
405 if (mCameraButton == NULL) { |
|
406 mCameraButton = new HbPushButton(this); |
|
407 mCameraButton->setIcon(HbIcon(GLXICON_CAMERA)); |
|
408 connect(mCameraButton, SIGNAL(clicked(bool)), this, SLOT(cameraButtonClicked(bool))); |
|
409 } |
|
410 mCameraButton->setGeometry(QRectF(screenSize.width()/2 - 3*deviceSize.height()/64, midHeight + deviceSize.height()/32, deviceSize.height()/32, deviceSize.height()/32)); |
|
411 mCameraButton->show(); |
|
412 } |
|
413 |
|
414 void GlxGridView::populated() |
|
415 { |
|
416 showItemCount(); |
151 } |
417 } |
152 |
418 |
153 void GlxGridView::handleUserAction(qint32 commandId) |
419 void GlxGridView::handleUserAction(qint32 commandId) |
154 { |
420 { |
155 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_HANDLEUSERACTION, "GlxGridView::handleUserAction" ); |
421 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_HANDLEUSERACTION, "GlxGridView::handleUserAction" ); |
237 mWindow->viewport()->grabGesture(Qt::TapGesture); |
503 mWindow->viewport()->grabGesture(Qt::TapGesture); |
238 mWindow->viewport()->grabGesture(Qt::TapAndHoldGesture); |
504 mWindow->viewport()->grabGesture(Qt::TapAndHoldGesture); |
239 mWidget = new HgGrid(orient); |
505 mWidget = new HgGrid(orient); |
240 mWidget->setLongPressEnabled(true); |
506 mWidget->setLongPressEnabled(true); |
241 mWidget->setScrollBarPolicy(HgWidget::ScrollBarAutoHide); |
507 mWidget->setScrollBarPolicy(HgWidget::ScrollBarAutoHide); |
242 //mWidget->setItemSize(QSizeF(120,120)); |
|
243 setWidget( mWidget ); |
508 setWidget( mWidget ); |
244 addViewConnection(); |
509 addViewConnection(); |
245 //hideorshowitems(orient); |
510 hideorshowitems(orient); |
246 } |
511 } |
247 OstTraceFunctionExit0( GLXGRIDVIEW_LOADGRIDVIEW_EXIT ); |
512 OstTraceFunctionExit0( GLXGRIDVIEW_LOADGRIDVIEW_EXIT ); |
248 } |
513 } |
249 |
514 |
250 void GlxGridView::orientationchanged(Qt::Orientation orient) |
515 void GlxGridView::orientationchanged(Qt::Orientation orient) |
251 { |
516 { |
252 hideorshowitems(orient); |
517 hideorshowitems(orient); |
253 } |
518 } |
254 void GlxGridView::hideorshowitems(Qt::Orientation orient) |
519 void GlxGridView::hideorshowitems(Qt::Orientation orient) |
255 { |
520 { |
256 if(orient == Qt::Horizontal) |
521 if (mWidget->selectionMode() == HgWidget::NoSelection) { |
257 { |
522 if(orient == Qt::Horizontal) |
258 if (mUiOnButton) |
523 { |
259 { |
524 setItemVisible(Hb::AllItems, FALSE) ; |
260 mUiOnButton->show(); |
525 setViewFlags(viewFlags() | HbView::ViewTitleBarHidden | HbView::ViewStatusBarHidden); |
261 } |
526 showItemCount(); |
262 setItemVisible(Hb::AllItems, FALSE) ; |
527 if (mUiOnButton) |
263 } |
528 { |
264 else |
529 mUiOnButton->show(); |
265 { |
530 } |
266 if (mUiOnButton) |
531 } |
267 { |
532 else |
|
533 { |
|
534 showHbItems(); |
|
535 } |
|
536 } |
|
537 |
|
538 if (mWidget->selectionMode() == HgWidget::MultiSelection) { |
|
539 setItemVisible(Hb::TitleBarItem, FALSE) ; |
|
540 if (mUiOnButton) { |
268 mUiOnButton->hide(); |
541 mUiOnButton->hide(); |
269 } |
542 } |
270 setItemVisible(Hb::AllItems, TRUE) ; |
543 if (mCountItem) { |
271 } |
544 mCountItem->hide(); |
|
545 } |
|
546 if (mAlbumName) { |
|
547 mAlbumName->hide(); |
|
548 } |
|
549 QSize deviceSize = HbDeviceProfile::current().logicalSize(); |
|
550 QSize screenSize = ( mWindow->orientation() == Qt::Vertical ) ? QSize( deviceSize.width(), deviceSize.height() ) |
|
551 : QSize( deviceSize.height(), deviceSize.width() ) ; |
|
552 mMainLabel->setGeometry(QRectF(0,0,screenSize.width(),deviceSize.height()/24)); |
|
553 mMarkCheckBox->setGeometry(QRectF(0,deviceSize.height()/24,screenSize.width()/2,deviceSize.height()/72)); |
|
554 mCountLabel->setGeometry(QRectF(screenSize.width()/2,deviceSize.height()/24,screenSize.width()/2,deviceSize.height()/12 - 3)); |
|
555 mCountLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); |
|
556 mMainLabel->show(); |
|
557 mMarkCheckBox->show(); |
|
558 mCountLabel->show(); |
|
559 showMarkedItemCount(); |
|
560 } |
272 } |
561 } |
273 |
562 |
274 void GlxGridView::scrolltofocus() |
563 void GlxGridView::scrolltofocus() |
275 { |
564 { |
276 if(mModelWrapper && mWidget) |
565 if(mModelWrapper && mWidget) |
296 } |
585 } |
297 |
586 |
298 void GlxGridView::addViewConnection() |
587 void GlxGridView::addViewConnection() |
299 { |
588 { |
300 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_ADDVIEWCONNECTION, "GlxGridView::addViewConnection" ); |
589 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_ADDVIEWCONNECTION, "GlxGridView::addViewConnection" ); |
301 connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationchanged(Qt::Orientation))); |
|
302 //connect(mWindow, SIGNAL(aboutToChangeOrientation()), mWidget, SLOT(aboutToChangeOrientation())); |
590 //connect(mWindow, SIGNAL(aboutToChangeOrientation()), mWidget, SLOT(aboutToChangeOrientation())); |
303 connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), mWidget, SLOT(orientationChanged(Qt::Orientation))); |
591 connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), mWidget, SLOT(orientationChanged(Qt::Orientation))); |
304 connect(mWidget, SIGNAL(activated(const QModelIndex &)), SLOT( itemSelected(const QModelIndex &))); |
592 connect(mWidget, SIGNAL(activated(const QModelIndex &)), SLOT( itemSelected(const QModelIndex &))); |
305 connect(mWidget, SIGNAL( scrollingStarted() ), this, SLOT( scrollingStarted() ) ); |
593 connect(mWidget, SIGNAL( scrollingStarted() ), this, SLOT( scrollingStarted() ) ); |
306 connect(mWidget, SIGNAL( scrollingEnded() ), this, SLOT( scrollingEnded() ) ); |
594 connect(mWidget, SIGNAL( scrollingEnded() ), this, SLOT( scrollingEnded() ) ); |
310 void GlxGridView::removeViewConnection () |
598 void GlxGridView::removeViewConnection () |
311 { |
599 { |
312 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_REMOVEVIEWCONNECTION, "GlxGridView::removeViewConnection" ); |
600 OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_REMOVEVIEWCONNECTION, "GlxGridView::removeViewConnection" ); |
313 if(mWidget) |
601 if(mWidget) |
314 { |
602 { |
315 disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationchanged(Qt::Orientation))); |
|
316 //disconnect(mWindow, SIGNAL(aboutToChangeOrientation()), mWidget, SLOT(aboutToChangeOrientation())); |
603 //disconnect(mWindow, SIGNAL(aboutToChangeOrientation()), mWidget, SLOT(aboutToChangeOrientation())); |
317 disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), mWidget, SLOT(orientationChanged(Qt::Orientation))); |
604 disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), mWidget, SLOT(orientationChanged(Qt::Orientation))); |
318 disconnect(mWidget, SIGNAL(activated(const QModelIndex &)),this, SLOT( itemSelected(const QModelIndex &))); |
605 disconnect(mWidget, SIGNAL(activated(const QModelIndex &)),this, SLOT( itemSelected(const QModelIndex &))); |
319 disconnect(mWidget, SIGNAL( scrollingStarted() ), this, SLOT( scrollingStarted() ) ); |
606 disconnect(mWidget, SIGNAL( scrollingStarted() ), this, SLOT( scrollingStarted() ) ); |
320 disconnect(mWidget, SIGNAL( scrollingEnded() ), this, SLOT( scrollingEnded() ) ); |
607 disconnect(mWidget, SIGNAL( scrollingEnded() ), this, SLOT( scrollingEnded() ) ); |