recents_plat/logs_engine_api/inc/logsabstractmodel.h
changeset 15 76d2cf7a585e
parent 13 52d644758b05
equal deleted inserted replaced
13:52d644758b05 15:76d2cf7a585e
    18 #ifndef LOGSABSTRACTMODEL_H
    18 #ifndef LOGSABSTRACTMODEL_H
    19 #define LOGSABSTRACTMODEL_H
    19 #define LOGSABSTRACTMODEL_H
    20 
    20 
    21 #include <QAbstractListModel>
    21 #include <QAbstractListModel>
    22 #include <logsexport.h>
    22 #include <logsexport.h>
       
    23 #include <hbextendedlocale.h>
    23 
    24 
    24 class LogsEvent;
    25 class LogsEvent;
    25 class LogsDbConnector;
    26 class LogsDbConnector;
    26 class LogsModelItemContainer;
    27 class LogsModelItemContainer;
    27 class HbIcon;
    28 class HbIcon;
    28 class LogsContact;
    29 class LogsContact;
    29 class LogsSystemTimeObserver;
    30 class LogsConfigurationParams;
       
    31 
    30 
    32 
    31 /**
    33 /**
    32  * Abstract logs model.
    34  * Abstract logs model.
    33  *
    35  *
    34  */
    36  */
    74      * (see predictiveSearchStatus())
    76      * (see predictiveSearchStatus())
    75      * @param enabled, specify whether cenrep key will be set to 1 or 2
    77      * @param enabled, specify whether cenrep key will be set to 1 or 2
    76      * @ return 0 if cenrep key value modified succesfully,
    78      * @ return 0 if cenrep key value modified succesfully,
    77      *          -1 in case of some error
    79      *          -1 in case of some error
    78      */
    80      */
    79     LOGSENGINE_EXPORT int setPredictiveSearch(bool enabled);   
    81     LOGSENGINE_EXPORT int setPredictiveSearch(bool enabled);
    80     
    82     
    81     LOGSENGINE_EXPORT bool isCommunicationPossible(const LogsEvent& event) const;
    83     /**
       
    84      * Configuration.
       
    85      * @param configuration parameters
       
    86      * @return 0 if configured succesfully
       
    87      */
       
    88     LOGSENGINE_EXPORT virtual int updateConfiguration(LogsConfigurationParams& params);
       
    89 
    82 public:
    90 public:
    83     
    91     
    84     static QString directionIconName(const LogsEvent& event);
    92     static QString directionIconName(const LogsEvent& event);
    85     static QString typeIconName(const LogsEvent& event);
    93     static QString typeIconName(const LogsEvent& event);
    86         
    94         
    99     QString dateAndTimeString(const QDateTime& dateTime) const;
   107     QString dateAndTimeString(const QDateTime& dateTime) const;
   100     /**
   108     /**
   101      * Construct a duration string using separator from system locale
   109      * Construct a duration string using separator from system locale
   102      */
   110      */
   103     QString durationString(const QTime& time) const;
   111     QString durationString(const QTime& time) const;
       
   112     
       
   113     QString phoneNumString(const QString& number) const;
   104 
   114 
   105 
   115 
   106 protected slots:
   116 protected slots:
   107 
   117 
   108     virtual void contactSavingCompleted(bool modified);
   118     virtual void contactSavingCompleted(bool modified);
   121     
   131     
   122 protected: //data 
   132 protected: //data 
   123     
   133     
   124     LogsDbConnector* mDbConnector;
   134     LogsDbConnector* mDbConnector;
   125     QMap<QString, HbIcon*> mIcons;
   135     QMap<QString, HbIcon*> mIcons;
   126     LogsSystemTimeObserver* mSystemTimeObserver;
   136     HbExtendedLocale* mExtendedLocale;
   127     
   137     
   128 private:  // Testing related friend definitions
   138 private:  // Testing related friend definitions
   129     
   139     
   130     friend class UT_LogsModel;
   140     friend class UT_LogsModel;
   131     friend class UT_LogsDetailsModel;
   141     friend class UT_LogsDetailsModel;