58 LogsComponentRepository& repository, LogsAbstractViewManager& viewManager ) |
60 LogsComponentRepository& repository, LogsAbstractViewManager& viewManager ) |
59 : LogsBaseView(LogsRecentViewId, repository, viewManager), |
61 : LogsBaseView(LogsRecentViewId, repository, viewManager), |
60 mViewName(0), |
62 mViewName(0), |
61 mListView(0), |
63 mListView(0), |
62 mFilter(0), |
64 mFilter(0), |
63 mCurrentView(LogsServices::ViewAll), |
65 mCurrentView(XQService::LogsViewAll), |
64 mAppearingView(LogsServices::ViewAll), |
66 mAppearingView(XQService::LogsViewAll), |
65 mMoveLeftInList(false), |
67 mMoveLeftInList(false), |
66 mEffectHandler(0), |
68 mEffectHandler(0), |
67 mListViewX(0), |
69 mListViewX(0), |
68 mEmptyListLabelX(0), |
70 mEmptyListLabelX(0), |
69 mMatchesModel(0), |
71 mMatchesModel(0), |
70 mMarkingMissedAsSeen(false), |
72 mMarkingMissedAsSeen(false), |
71 mPageIndicator(0), |
73 mPageIndicator(0), |
72 mFirstActivation(true), |
74 mListScrollBarPolicy(HbScrollArea::ScrollBarAutoHide), |
73 mListScrollBarPolicy(HbScrollArea::ScrollBarAutoHide) |
75 mEffectInDissappearedPhase(false) |
74 { |
76 { |
75 LOGS_QDEBUG( "logs [UI] <-> LogsRecentCallsView::LogsRecentCallsView()" ); |
77 LOGS_QDEBUG( "logs [UI] <-> LogsRecentCallsView::LogsRecentCallsView()" ); |
76 mModel = mRepository.model(); |
78 mModel = mRepository.model(); |
77 |
79 |
78 //TODO: taking away due to toolbar bug. If toolbar visibility changes on view |
80 //TODO: taking away due to toolbar bug. If toolbar visibility changes on view |
102 delete mFilter; |
104 delete mFilter; |
103 |
105 |
104 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::~LogsRecentCallsView()" ); |
106 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::~LogsRecentCallsView()" ); |
105 } |
107 } |
106 |
108 |
107 |
|
108 // ----------------------------------------------------------------------------- |
109 // ----------------------------------------------------------------------------- |
109 // LogsRecentCallsView::activated |
110 // LogsRecentCallsView::activated |
110 // ----------------------------------------------------------------------------- |
111 // ----------------------------------------------------------------------------- |
111 // |
112 // |
112 void LogsRecentCallsView::activated(bool showDialer, QVariant args) |
113 void LogsRecentCallsView::activated(bool showDialer, QVariant args) |
113 { |
114 { |
114 LOGS_QDEBUG( "logs [UI] -> LogsRecentCallsView::activated()" ); |
115 LOGS_QDEBUG( "logs [UI] -> LogsRecentCallsView::activated()" ); |
|
116 HbStyleLoader::registerFilePath(":/hbgroupboxheadingwidget.css"); |
|
117 |
115 // base class handling first |
118 // base class handling first |
116 LogsBaseView::activated(showDialer, args); |
119 LogsBaseView::activated(showDialer, args); |
117 |
120 |
118 int internalViewId = args.toInt(); |
121 int internalViewId = args.toInt(); |
119 if ( internalViewId < 0 || internalViewId > LogsServices::ViewMissed ){ |
122 if ( internalViewId < 0 || internalViewId > XQService::LogsViewMissed ){ |
120 internalViewId = LogsServices::ViewAll; |
123 internalViewId = XQService::LogsViewAll; |
121 } |
124 } |
122 LogsServices::LogsView view = static_cast<LogsServices::LogsView>( internalViewId ); |
125 XQService::LogsViewIndex view = static_cast<XQService::LogsViewIndex>( internalViewId ); |
123 |
126 |
124 // View update is needed when we activate view for the first time (!mFilter) |
127 // View update is needed when we activate view for the first time (!mFilter) |
125 // or if view has to be changed |
128 // or if view has to be changed |
126 if ( !mFilter || ( !args.isNull() && (mCurrentView != view) ) ) { |
129 if ( !mFilter || ( !args.isNull() && (mCurrentView != view) ) ) { |
127 updateView( view ); |
130 updateView( view ); |
128 } |
131 } |
129 activateEmptyListIndicator(mFilter); |
132 activateEmptyListIndicator(mFilter); |
130 |
133 |
131 mPageIndicator->setActiveItemIndex(mConversionMap.value(mCurrentView)); |
134 mPageIndicator->setActiveItemIndex(mConversionMap.value(mCurrentView)); |
132 |
135 |
133 mFirstActivation = false; |
|
134 |
|
135 if (mEmptyListLabel) { |
136 if (mEmptyListLabel) { |
136 mEmptyListLabelX = mEmptyListLabel->pos().x(); |
137 mEmptyListLabelX = mEmptyListLabel->pos().x(); |
137 } |
138 } |
138 |
139 |
|
140 qApp->installEventFilter(this); |
|
141 |
|
142 LogsBaseView::activationCompleted(); |
|
143 |
139 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::activated()" ); |
144 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::activated()" ); |
140 } |
145 } |
141 |
146 |
142 // ----------------------------------------------------------------------------- |
147 // ----------------------------------------------------------------------------- |
143 // LogsRecentCallsView::deactivated |
148 // LogsRecentCallsView::deactivated |
144 // ----------------------------------------------------------------------------- |
149 // ----------------------------------------------------------------------------- |
145 // |
150 // |
146 void LogsRecentCallsView::deactivated() |
151 void LogsRecentCallsView::deactivated() |
147 { |
152 { |
|
153 HbStyleLoader::unregisterFilePath(":/hbgroupboxheadingwidget.css"); |
|
154 |
148 //base class handling first |
155 //base class handling first |
149 LogsBaseView::deactivated(); |
156 LogsBaseView::deactivated(); |
150 |
157 |
151 deactivateEmptyListIndicator(mFilter); |
158 deactivateEmptyListIndicator(mFilter); |
|
159 qApp->removeEventFilter(this); |
152 } |
160 } |
153 |
161 |
154 // ----------------------------------------------------------------------------- |
162 // ----------------------------------------------------------------------------- |
155 // |
163 // |
156 // ----------------------------------------------------------------------------- |
164 // ----------------------------------------------------------------------------- |
219 this, SLOT(dissappearByMovingComplete())); |
227 this, SLOT(dissappearByMovingComplete())); |
220 connect(mEffectHandler, SIGNAL(dissappearByFadingComplete()), |
228 connect(mEffectHandler, SIGNAL(dissappearByFadingComplete()), |
221 this, SLOT(dissappearByFadingComplete())); |
229 this, SLOT(dissappearByFadingComplete())); |
222 connect(mEffectHandler, SIGNAL(appearByMovingComplete()), |
230 connect(mEffectHandler, SIGNAL(appearByMovingComplete()), |
223 this, SLOT(appearByMovingComplete())); |
231 this, SLOT(appearByMovingComplete())); |
|
232 connect(mEffectHandler, SIGNAL(appearStarting()), this, SLOT(appearStarting())); |
224 mPageIndicator = qobject_cast<LogsPageIndicator*> |
233 mPageIndicator = qobject_cast<LogsPageIndicator*> |
225 (mRepository.findWidget(logsPageIndicatorId)); |
234 (mRepository.findWidget(logsPageIndicatorId)); |
226 |
235 |
227 mPageIndicator->initialize(mTitleMap.count(), mConversionMap.value(mCurrentView)); |
236 mPageIndicator->initialize(mTitleMap.count(), mConversionMap.value(mCurrentView)); |
228 |
237 |
413 mTitleMap.insert(LogsBaseView::ViewAll, hbTrId("txt_dialer_subhead_recent_calls")); |
422 mTitleMap.insert(LogsBaseView::ViewAll, hbTrId("txt_dialer_subhead_recent_calls")); |
414 mTitleMap.insert(LogsBaseView::ViewCalled, hbTrId("txt_dialer_subhead_dialled_calls")); |
423 mTitleMap.insert(LogsBaseView::ViewCalled, hbTrId("txt_dialer_subhead_dialled_calls")); |
415 mTitleMap.insert(LogsBaseView::ViewReceived, hbTrId("txt_dial_subhead_received_calls")); |
424 mTitleMap.insert(LogsBaseView::ViewReceived, hbTrId("txt_dial_subhead_received_calls")); |
416 mTitleMap.insert(LogsBaseView::ViewMissed, hbTrId("txt_dialer_subhead_missed_calls")); |
425 mTitleMap.insert(LogsBaseView::ViewMissed, hbTrId("txt_dialer_subhead_missed_calls")); |
417 |
426 |
418 mConversionMap.insert(LogsServices::ViewAll, LogsBaseView::ViewAll); |
427 mConversionMap.insert(XQService::LogsViewAll, LogsBaseView::ViewAll); |
419 mConversionMap.insert(LogsServices::ViewCalled, LogsBaseView::ViewCalled); |
428 mConversionMap.insert(XQService::LogsViewCalled, LogsBaseView::ViewCalled); |
420 mConversionMap.insert(LogsServices::ViewReceived, LogsBaseView::ViewReceived); |
429 mConversionMap.insert(XQService::LogsViewReceived, LogsBaseView::ViewReceived); |
421 mConversionMap.insert(LogsServices::ViewMissed, LogsBaseView::ViewMissed); |
430 mConversionMap.insert(XQService::LogsViewMissed, LogsBaseView::ViewMissed); |
422 } |
431 } |
423 |
432 |
424 // ----------------------------------------------------------------------------- |
433 // ----------------------------------------------------------------------------- |
425 // LogsRecentCallsView::initListWidget |
434 // LogsRecentCallsView::initListWidget |
426 // ----------------------------------------------------------------------------- |
435 // ----------------------------------------------------------------------------- |
433 Q_ASSERT_X(mListView != 0, "logs [UI] ", "couldn't find list widget !!"); |
442 Q_ASSERT_X(mListView != 0, "logs [UI] ", "couldn't find list widget !!"); |
434 |
443 |
435 |
444 |
436 // Optimize memory usage, list reserves only memory for visible items |
445 // Optimize memory usage, list reserves only memory for visible items |
437 mListView->setItemRecycling(true); |
446 mListView->setItemRecycling(true); |
438 |
|
439 connect(mListView, SIGNAL(activated(const QModelIndex)), |
447 connect(mListView, SIGNAL(activated(const QModelIndex)), |
440 this, SLOT(initiateCallback(const QModelIndex))); |
448 this, SLOT(initiateCallback(const QModelIndex)), |
|
449 Qt::UniqueConnection); |
441 connect(mListView, |
450 connect(mListView, |
442 SIGNAL(longPressed(HbAbstractViewItem*, const QPointF&)), |
451 SIGNAL(longPressed(HbAbstractViewItem*, const QPointF&)), |
443 this, |
452 this, |
444 SLOT(showListItemMenu(HbAbstractViewItem*, const QPointF&))); |
453 SLOT(showListItemMenu(HbAbstractViewItem*, const QPointF&)), |
|
454 Qt::UniqueConnection); |
445 |
455 |
446 mListView->setFrictionEnabled(true); |
456 mListView->setFrictionEnabled(true); |
447 |
457 |
448 mListViewX = mListView->pos().x(); |
458 mListViewX = mListView->pos().x(); |
449 |
459 |
514 |
524 |
515 // ----------------------------------------------------------------------------- |
525 // ----------------------------------------------------------------------------- |
516 // LogsRecentCallsView::getFilter |
526 // LogsRecentCallsView::getFilter |
517 // ----------------------------------------------------------------------------- |
527 // ----------------------------------------------------------------------------- |
518 // |
528 // |
519 LogsFilter::FilterType LogsRecentCallsView::getFilter(LogsServices::LogsView view) |
529 LogsFilter::FilterType LogsRecentCallsView::getFilter(XQService::LogsViewIndex view) |
520 { |
530 { |
521 LogsFilter::FilterType filter = LogsFilter::All; |
531 LogsFilter::FilterType filter = LogsFilter::All; |
522 switch (view){ |
532 switch (view){ |
523 case LogsServices::ViewAll: |
533 case XQService::LogsViewAll: |
524 filter = LogsFilter::All; |
534 filter = LogsFilter::All; |
525 break; |
535 break; |
526 case LogsServices::ViewReceived: |
536 case XQService::LogsViewReceived: |
527 filter = LogsFilter::Received; |
537 filter = LogsFilter::Received; |
528 break; |
538 break; |
529 case LogsServices::ViewCalled: |
539 case XQService::LogsViewCalled: |
530 filter = LogsFilter::Called; |
540 filter = LogsFilter::Called; |
531 break; |
541 break; |
532 case LogsServices::ViewMissed: |
542 case XQService::LogsViewMissed: |
533 filter = LogsFilter::Missed; |
543 filter = LogsFilter::Missed; |
534 break; |
544 break; |
535 default: |
545 default: |
536 break; |
546 break; |
537 } |
547 } |
538 return filter; |
548 return filter; |
|
549 } |
|
550 |
|
551 |
|
552 // ----------------------------------------------------------------------------- |
|
553 // LogsRecentCallsView::eventFilter |
|
554 // ----------------------------------------------------------------------------- |
|
555 // |
|
556 bool LogsRecentCallsView::eventFilter(QObject *obj, QEvent *event) |
|
557 { |
|
558 //This is a hack to fix ou1cimx1#481152(horizontal swiping initiates call) |
|
559 //Since w26 HbAbstractViewItemPrivate is setting threshold for Tap gesture |
|
560 //to be the bounding rect (i.e. if swiping is happening inside one list item |
|
561 //it will also be considered as a tap => item activated => call) |
|
562 //We are trying to prevent usage of the list item rect threshold by |
|
563 //setting "horizontallyRestricted" property. |
|
564 //See HbAbstractViewItemPrivate::tapTriggered() and |
|
565 //HbTapGestureLogic::handleMouseMove() for more info |
|
566 if (event->type() == QEvent::Gesture) { |
|
567 QGestureEvent* gesture = static_cast<QGestureEvent*> (event); |
|
568 QTapGesture* tap = qobject_cast<QTapGesture*>(gesture->gesture(Qt::TapGesture)); |
|
569 //only change property if swiping on our list, since for the menu it is |
|
570 //fine to generate tap gesture event during swiping on one item |
|
571 bool tapOnListView = (mListView && mListView->currentViewItem() == obj); |
|
572 if (tap && tapOnListView && tap->state() == Qt::GestureStarted) { |
|
573 tap->setProperty("horizontallyRestricted", true); |
|
574 LOGS_QDEBUG( "logs [UI] TapGesture on list, setting horizontallyRestricted" ); |
|
575 } |
|
576 } |
|
577 return LogsBaseView::eventFilter(obj,event); |
539 } |
578 } |
540 |
579 |
541 // ----------------------------------------------------------------------------- |
580 // ----------------------------------------------------------------------------- |
542 // LogsRecentCallsView::gestureEvent |
581 // LogsRecentCallsView::gestureEvent |
543 // ----------------------------------------------------------------------------- |
582 // ----------------------------------------------------------------------------- |
551 if (swipe && swipe->state() == Qt::GestureFinished) { |
590 if (swipe && swipe->state() == Qt::GestureFinished) { |
552 LOGS_QDEBUG_2( "logs [UI] sceneSwipeAngle: ", swipe->sceneSwipeAngle() ); |
591 LOGS_QDEBUG_2( "logs [UI] sceneSwipeAngle: ", swipe->sceneSwipeAngle() ); |
553 LOGS_QDEBUG_2( "logs [UI] swipeAngle: ", swipe->swipeAngle() ); |
592 LOGS_QDEBUG_2( "logs [UI] swipeAngle: ", swipe->swipeAngle() ); |
554 |
593 |
555 QSwipeGesture::SwipeDirection direction = swipe->sceneHorizontalDirection(); |
594 QSwipeGesture::SwipeDirection direction = swipe->sceneHorizontalDirection(); |
556 if (direction == QSwipeGesture::Left) { |
595 if ( decideListMoveDirection(direction) ) |
557 leftFlick(); |
|
558 event->accept(Qt::SwipeGesture); |
|
559 } else if (direction == QSwipeGesture::Right) { |
|
560 rightFlick(); |
|
561 event->accept(Qt::SwipeGesture); |
596 event->accept(Qt::SwipeGesture); |
562 } |
597 } |
563 } |
598 } |
564 } |
599 } |
565 } |
600 |
566 |
601 // ----------------------------------------------------------------------------- |
567 // ----------------------------------------------------------------------------- |
602 // LogsRecentCallsView::decideListMoveDirection |
568 // LogsRecentCallsView::leftFlick |
603 // ----------------------------------------------------------------------------- |
569 // ----------------------------------------------------------------------------- |
604 // |
570 // |
605 bool LogsRecentCallsView::decideListMoveDirection( |
571 void LogsRecentCallsView::leftFlick() |
606 QSwipeGesture::SwipeDirection direction) |
572 { |
607 { |
573 LOGS_QDEBUG( "logs [UI] -> LogsRecentCallsView::leftFlick()" ); |
608 bool moved( false ); |
|
609 if ( direction == QSwipeGesture::Left || direction == QSwipeGesture::Right ) { |
|
610 bool moveForward( direction == QSwipeGesture::Left ); |
|
611 if ( layoutDirection() == Qt::RightToLeft ){ |
|
612 moveForward = !moveForward; |
|
613 } |
|
614 if ( moveForward ){ |
|
615 moveForwardInLists(); |
|
616 } else { |
|
617 moveBackwardInLists(); |
|
618 } |
|
619 moved = true; |
|
620 } |
|
621 return moved; |
|
622 } |
|
623 |
|
624 // ----------------------------------------------------------------------------- |
|
625 // LogsRecentCallsView::moveForwardInLists |
|
626 // ----------------------------------------------------------------------------- |
|
627 // |
|
628 void LogsRecentCallsView::moveForwardInLists() |
|
629 { |
|
630 LOGS_QDEBUG( "logs [UI] -> LogsRecentCallsView::moveForwardInLists()" ); |
574 if ( mConversionMap.value(mCurrentView) + 1 < mTitleMap.count() ){ |
631 if ( mConversionMap.value(mCurrentView) + 1 < mTitleMap.count() ){ |
575 LogsBaseView::LogsViewMap viewmap = |
632 LogsBaseView::LogsViewMap viewmap = |
576 static_cast<LogsBaseView::LogsViewMap>(mConversionMap.value(mCurrentView) +1); |
633 static_cast<LogsBaseView::LogsViewMap>(mConversionMap.value(mCurrentView) +1); |
577 changeView( mConversionMap.key(viewmap) ); |
634 changeView( mConversionMap.key(viewmap) ); |
578 } else { |
635 } else { |
579 if (model() && model()->rowCount() > 0) { |
636 if (model() && model()->rowCount() > 0) { |
580 mEffectHandler->startMoveNotPossibleEffect(*mListView, false, mListViewX); |
637 mEffectHandler->startMoveNotPossibleEffect( |
|
638 *mListView, moveToLeft(false), mListViewX); |
581 } else { |
639 } else { |
582 mEffectHandler->startMoveNotPossibleEffect(*mEmptyListLabel, |
640 mEffectHandler->startMoveNotPossibleEffect( |
583 false, mEmptyListLabelX); |
641 *mEmptyListLabel, moveToLeft(false), mEmptyListLabelX); |
584 } |
642 } |
585 } |
643 } |
586 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::leftFlick()" ); |
644 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::moveForwardInLists()" ); |
587 } |
645 } |
588 |
646 |
589 // ----------------------------------------------------------------------------- |
647 // ----------------------------------------------------------------------------- |
590 // LogsRecentCallsView::rightFlick |
648 // LogsRecentCallsView::moveBackwardInLists |
591 // ----------------------------------------------------------------------------- |
649 // ----------------------------------------------------------------------------- |
592 // |
650 // |
593 void LogsRecentCallsView::rightFlick() |
651 void LogsRecentCallsView::moveBackwardInLists() |
594 { |
652 { |
595 LOGS_QDEBUG( "logs [UI] -> LogsRecentCallsView::rightFlick()" ); |
653 LOGS_QDEBUG( "logs [UI] -> LogsRecentCallsView::moveBackwardInLists()" ); |
596 if ( mConversionMap.value(mCurrentView) > 0 ){ |
654 if ( mConversionMap.value(mCurrentView) > 0 ){ |
597 LogsBaseView::LogsViewMap viewmap = |
655 LogsBaseView::LogsViewMap viewmap = |
598 static_cast<LogsBaseView::LogsViewMap>(mConversionMap.value(mCurrentView) - 1); |
656 static_cast<LogsBaseView::LogsViewMap>(mConversionMap.value(mCurrentView) - 1); |
599 changeView( mConversionMap.key(viewmap) ); |
657 changeView( mConversionMap.key(viewmap) ); |
600 } else { |
658 } else { |
601 if (model() && model()->rowCount() > 0) { |
659 if (model() && model()->rowCount() > 0) { |
602 mEffectHandler->startMoveNotPossibleEffect(*mListView, true, mListViewX); |
660 mEffectHandler->startMoveNotPossibleEffect( |
|
661 *mListView, moveToLeft(true), mListViewX); |
603 } else { |
662 } else { |
604 mEffectHandler->startMoveNotPossibleEffect(*mEmptyListLabel, |
663 mEffectHandler->startMoveNotPossibleEffect( |
605 true, mEmptyListLabelX); |
664 *mEmptyListLabel, moveToLeft(true), mEmptyListLabelX); |
606 } |
665 } |
607 } |
666 } |
608 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::rightFlick()" ); |
667 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::moveBackwardInLists()" ); |
609 } |
668 } |
610 |
669 |
611 // ----------------------------------------------------------------------------- |
670 // ----------------------------------------------------------------------------- |
612 // LogsRecentCallsView::changeView |
671 // LogsRecentCallsView::changeView |
613 // ----------------------------------------------------------------------------- |
672 // ----------------------------------------------------------------------------- |
614 // |
673 // |
615 void LogsRecentCallsView::changeView(LogsServices::LogsView view) |
674 void LogsRecentCallsView::changeView(XQService::LogsViewIndex view) |
616 { |
675 { |
617 LOGS_QDEBUG_2( "logs [UI] -> LogsRecentCallsView::changeView(), view:", view ); |
676 LOGS_QDEBUG_2( "logs [UI] -> LogsRecentCallsView::changeView(), view:", view ); |
618 |
677 |
619 if ( view == mCurrentView ){ |
678 if ( view == mCurrentView ){ |
620 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::changeView(), view already correct" ); |
679 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::changeView(), view already correct" ); |
659 // |
719 // |
660 void LogsRecentCallsView::dissappearByMovingComplete() |
720 void LogsRecentCallsView::dissappearByMovingComplete() |
661 { |
721 { |
662 LOGS_QDEBUG( "logs [UI] -> LogsRecentCallsView::dissappearByMovingComplete()" ) |
722 LOGS_QDEBUG( "logs [UI] -> LogsRecentCallsView::dissappearByMovingComplete()" ) |
663 |
723 |
|
724 mEffectInDissappearedPhase = true; |
|
725 mListView->setVisible(false); |
664 updateView( mAppearingView ); |
726 updateView( mAppearingView ); |
665 |
727 |
666 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::dissappearByMovingComplete()" ) |
728 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::dissappearByMovingComplete()" ) |
667 } |
729 } |
668 |
730 |
|
731 // ----------------------------------------------------------------------------- |
|
732 // |
|
733 // ----------------------------------------------------------------------------- |
|
734 // |
|
735 void LogsRecentCallsView::appearStarting() |
|
736 { |
|
737 LOGS_QDEBUG( "logs [UI] -> LogsRecentCallsView::appearStarting()" ) |
|
738 |
|
739 mEffectInDissappearedPhase = false; |
|
740 mListView->setVisible(true); |
|
741 updateEmptyListLabelVisibility(); |
|
742 |
|
743 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::appearStarting()" ) |
|
744 } |
669 |
745 |
670 // ----------------------------------------------------------------------------- |
746 // ----------------------------------------------------------------------------- |
671 // |
747 // |
672 // ----------------------------------------------------------------------------- |
748 // ----------------------------------------------------------------------------- |
673 // |
749 // |
674 void LogsRecentCallsView::appearByMovingComplete() |
750 void LogsRecentCallsView::appearByMovingComplete() |
675 { |
751 { |
676 LOGS_QDEBUG( "logs [UI] -> LogsRecentCallsView::appearByMovingComplete()" ) |
752 LOGS_QDEBUG( "logs [UI] -> LogsRecentCallsView::appearByMovingComplete()" ) |
677 |
753 |
678 // Restore scrollbar which was hidden when animation started |
754 // Restore scrollbar which was hidden when animation started |
679 mListView->setVerticalScrollBarPolicy(mListScrollBarPolicy); |
755 mListView->setVerticalScrollBarPolicy(mListScrollBarPolicy); |
680 |
756 |
681 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::appearByMovingComplete()" ) |
757 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::appearByMovingComplete()" ) |
682 } |
758 } |
683 |
759 |
684 // ----------------------------------------------------------------------------- |
760 // ----------------------------------------------------------------------------- |
685 // LogsRecentCallsView::updateMenu |
761 // LogsRecentCallsView::updateMenu |
732 LogsConfigurationParams param; |
808 LogsConfigurationParams param; |
733 param.setListItemTextWidth( getListItemTextWidth() ); |
809 param.setListItemTextWidth( getListItemTextWidth() ); |
734 mModel->updateConfiguration(param); |
810 mModel->updateConfiguration(param); |
735 } |
811 } |
736 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::updateWidgetsSizeAndLayout()" ); |
812 LOGS_QDEBUG( "logs [UI] <- LogsRecentCallsView::updateWidgetsSizeAndLayout()" ); |
|
813 } |
|
814 |
|
815 // ----------------------------------------------------------------------------- |
|
816 // |
|
817 // ----------------------------------------------------------------------------- |
|
818 // |
|
819 void LogsRecentCallsView::updateEmptyListLabelVisibility() |
|
820 { |
|
821 if ( mEmptyListLabel && model() ){ |
|
822 LOGS_QDEBUG( "logs [UI] <-> LogsRecentCallsView::updateEmptyListLabelVisibility()" ); |
|
823 bool visible(model()->rowCount() == 0 && !mEffectInDissappearedPhase ); |
|
824 mEmptyListLabel->setVisible(visible); |
|
825 } |
737 } |
826 } |
738 |
827 |
739 // ----------------------------------------------------------------------------- |
828 // ----------------------------------------------------------------------------- |
740 // LogsRecentCallsView::getListItemTextWidth |
829 // LogsRecentCallsView::getListItemTextWidth |
741 // ----------------------------------------------------------------------------- |
830 // ----------------------------------------------------------------------------- |