recents_plat/logs_engine_api/inc/logsabstractmodel.h
changeset 13 52d644758b05
parent 2 7119b73b84d6
child 15 76d2cf7a585e
equal deleted inserted replaced
9:68f3171a5819 13:52d644758b05
    24 class LogsEvent;
    24 class LogsEvent;
    25 class LogsDbConnector;
    25 class LogsDbConnector;
    26 class LogsModelItemContainer;
    26 class LogsModelItemContainer;
    27 class HbIcon;
    27 class HbIcon;
    28 class LogsContact;
    28 class LogsContact;
       
    29 class LogsSystemTimeObserver;
    29 
    30 
    30 /**
    31 /**
    31  * Abstract logs model.
    32  * Abstract logs model.
    32  *
    33  *
    33  */
    34  */
    89      * @param iconList, on return contains list of icons 
    90      * @param iconList, on return contains list of icons 
    90      */
    91      */
    91     void getDecorationData(const LogsEvent& event, QList<QVariant>& iconList) const;
    92     void getDecorationData(const LogsEvent& event, QList<QVariant>& iconList) const;
    92     
    93     
    93     LogsDbConnector* dbConnector();
    94     LogsDbConnector* dbConnector();
       
    95     
       
    96     /**
       
    97      * Construct a date and time string based on system locale
       
    98      */
       
    99     QString dateAndTimeString(const QDateTime& dateTime) const;
       
   100     /**
       
   101      * Construct a duration string using separator from system locale
       
   102      */
       
   103     QString durationString(const QTime& time) const;
       
   104 
    94 
   105 
    95 protected slots:
   106 protected slots:
    96 
   107 
    97     virtual void contactSavingCompleted(bool modified);
   108     virtual void contactSavingCompleted(bool modified);
       
   109     virtual void updateModel();
    98 
   110 
    99 protected:
   111 protected:
   100 
   112 
   101     QVariant doGetData(int role, const LogsModelItemContainer& item) const;
   113     QVariant doGetData(int role, const LogsModelItemContainer& item) const;
   102     
   114     
   109     
   121     
   110 protected: //data 
   122 protected: //data 
   111     
   123     
   112     LogsDbConnector* mDbConnector;
   124     LogsDbConnector* mDbConnector;
   113     QMap<QString, HbIcon*> mIcons;
   125     QMap<QString, HbIcon*> mIcons;
       
   126     LogsSystemTimeObserver* mSystemTimeObserver;
   114     
   127     
   115 private:  // Testing related friend definitions
   128 private:  // Testing related friend definitions
   116     
   129     
   117     friend class UT_LogsModel;
   130     friend class UT_LogsModel;
   118     friend class UT_LogsDetailsModel;
   131     friend class UT_LogsDetailsModel;