logsui/logsapp/src/logsdetailsview.cpp
changeset 6 41c0a814d878
parent 2 7119b73b84d6
child 8 6c9acdc6adc0
equal deleted inserted replaced
4:e52d42f9500c 6:41c0a814d878
    21 #include "logslogger.h"
    21 #include "logslogger.h"
    22 #include "logscomponentrepository.h"
    22 #include "logscomponentrepository.h"
    23 #include "logsabstractviewmanager.h"
    23 #include "logsabstractviewmanager.h"
    24 #include "logsdefs.h"
    24 #include "logsdefs.h"
    25 #include "logscontact.h"
    25 #include "logscontact.h"
       
    26 #include "logsmodel.h"
    26 
    27 
    27 //SYSTEM
    28 //SYSTEM
    28 #include <hblistview.h>
    29 #include <hblistview.h>
    29 #include <hbaction.h>
    30 #include <hbaction.h>
    30 #include <hbgroupbox.h>
    31 #include <hbgroupbox.h>
    48     LOGS_QDEBUG( "logs [UI] <-> LogsDetailsView::LogsDetailsView()" );
    49     LOGS_QDEBUG( "logs [UI] <-> LogsDetailsView::LogsDetailsView()" );
    49     
    50     
    50     //TODO: taking away due to toolbar bug. If toolbar visibility changes on view
    51     //TODO: taking away due to toolbar bug. If toolbar visibility changes on view
    51     //activation, there will be a crash due to previous view effect is playing
    52     //activation, there will be a crash due to previous view effect is playing
    52     //addViewSwitchingEffects();
    53     //addViewSwitchingEffects();
       
    54     
       
    55     mActivities.append( logsActivityIdViewDetails );
    53 }
    56 }
    54     
    57     
    55 // -----------------------------------------------------------------------------
    58 // -----------------------------------------------------------------------------
    56 // 
    59 // 
    57 // -----------------------------------------------------------------------------
    60 // -----------------------------------------------------------------------------
   111     delete mDetailsModel;
   114     delete mDetailsModel;
   112     mDetailsModel = 0;
   115     mDetailsModel = 0;
   113 }
   116 }
   114 
   117 
   115 // -----------------------------------------------------------------------------
   118 // -----------------------------------------------------------------------------
       
   119 //
       
   120 // -----------------------------------------------------------------------------
       
   121 //
       
   122 QString LogsDetailsView::saveActivity(
       
   123     QDataStream& serializedActivity, QVariantHash& metaData)
       
   124 {
       
   125     if ( mDetailsModel ){
       
   126         mDetailsModel->getLogsEvent().serialize(serializedActivity);
       
   127     }
       
   128     return LogsBaseView::saveActivity(serializedActivity, metaData);
       
   129 }
       
   130 
       
   131 // -----------------------------------------------------------------------------
       
   132 //
       
   133 // -----------------------------------------------------------------------------
       
   134 //
       
   135 QVariant LogsDetailsView::loadActivity(
       
   136     const QString& activityId, QDataStream& serializedActivity, QVariantHash& metaData)
       
   137 {
       
   138     Q_UNUSED( activityId );
       
   139     Q_UNUSED( metaData );
       
   140     LogsEvent event(serializedActivity);
       
   141     LogsDetailsModel* details = mRepository.model()->logsDetailsModel(event);
       
   142     return qVariantFromValue( details );
       
   143 }
       
   144 
       
   145 // -----------------------------------------------------------------------------
   116 // 
   146 // 
   117 // -----------------------------------------------------------------------------
   147 // -----------------------------------------------------------------------------
   118 //
   148 //
   119 void LogsDetailsView::callKeyPressed()
   149 void LogsDetailsView::callKeyPressed()
   120 {
   150 {
   121     LOGS_QDEBUG( "logs [UI] -> LogsDetailsView::callKeyPressed()" );
   151     LOGS_QDEBUG( "logs [UI] -> LogsDetailsView::callKeyPressed()" );
       
   152     
   122     if ( !tryCallToDialpadNumber() && mCall ){
   153     if ( !tryCallToDialpadNumber() && mCall ){
   123         mCall->initiateCallback();
   154         mCall->initiateCallback();
   124     }
   155     }
       
   156 
   125     LOGS_QDEBUG( "logs [UI] <- LogsDetailsView::callKeyPressed()" );
   157     LOGS_QDEBUG( "logs [UI] <- LogsDetailsView::callKeyPressed()" );
   126 }
   158 }
   127 
   159 
   128 // -----------------------------------------------------------------------------
   160 // -----------------------------------------------------------------------------
   129 // LogsDetailsView::initiateVoiceCall
   161 // LogsDetailsView::initiateVoiceCall