email_plat/contact_history_model_api/inc/nmcontacthistorymodel.h
changeset 74 6c59112cfd31
parent 68 83cc6bae1de8
child 76 38bf5461e270
equal deleted inserted replaced
69:4e54af54a4a1 74:6c59112cfd31
    15 *
    15 *
    16 */
    16 */
    17 #ifndef NMCONTACTHISTORYMODEL_H
    17 #ifndef NMCONTACTHISTORYMODEL_H
    18 #define NMCONTACTHISTORYMODEL_H
    18 #define NMCONTACTHISTORYMODEL_H
    19 
    19 
       
    20 #include <QMetaType>
    20 #include <QAbstractListModel>
    21 #include <QAbstractListModel>
    21 #include <QSharedDataPointer>
    22 #include <QSharedDataPointer>
    22 
    23 
    23 #include "nmcontacthistorymodelcommon.h"
    24 #include "nmcontacthistorymodelcommon.h"
    24 
    25 
    48 class NMCHMAPI_EXPORT NmContactHistoryModelItem
    49 class NMCHMAPI_EXPORT NmContactHistoryModelItem
    49 {
    50 {
    50 public:
    51 public:
    51     NmContactHistoryModelItem();
    52     NmContactHistoryModelItem();
    52     NmContactHistoryModelItem(const NmContactHistoryModelItem &other);
    53     NmContactHistoryModelItem(const NmContactHistoryModelItem &other);
    53     ~NmContactHistoryModelItem();
    54     virtual ~NmContactHistoryModelItem();
    54 
    55 
    55 public:
    56 public:
    56     // contact id is 0xDEAD if not associated with a contact item
    57     // contact id is 0xDEAD if not associated with a contact item
    57     unsigned int contactId() const;
    58     unsigned int contactId() const;
    58 
    59 
    91         const NmContactHistoryModelType modelType);
    92         const NmContactHistoryModelType modelType);
    92 
    93 
    93     /**
    94     /**
    94      * Destructor
    95      * Destructor
    95      */
    96      */
    96     ~NmContactHistoryModel();
    97     virtual ~NmContactHistoryModel();
    97 
    98 
    98 public: // From QAbstractItemModel
    99 public: // From QAbstractItemModel
    99 
   100 
   100     /**
   101     /**
   101      * Get number of rows currently in the model.
   102      * Get number of rows currently in the model.
   102      * @return number of rows
   103      * @return number of rows
   103      */
   104      */
   104     virtual int rowCount(const QModelIndex &parent) const;
   105     int rowCount(const QModelIndex &parent) const;
   105 
   106 
   106     /**
   107     /**
   107      * Get various data from the model. Fetched data type is defined
   108      * Get various data from the model. Fetched data type is defined
   108      * by role input parameter. Only Qt::DisplayRole is supported.
   109      * by role input parameter. Only Qt::DisplayRole is supported.
   109      */
   110      */
   110     virtual QVariant data(const QModelIndex &index, int role) const;
   111     QVariant data(const QModelIndex &index, int role) const;
   111 
   112 
   112 signals:
   113 signals:
   113 
   114 
   114     /**
   115     /**
   115      * Signaled once model is ready.
   116      * Signaled once model is ready.
   135      * Private Implementation
   136      * Private Implementation
   136      * Own
   137      * Own
   137      */
   138      */
   138     NmContactHistoryModelPrivate *d_ptr;
   139     NmContactHistoryModelPrivate *d_ptr;
   139 
   140 
       
   141 private:
       
   142 
       
   143     friend class TestNmContactHistoryModel;
   140 };
   144 };
   141 
   145 
   142 #endif //NMCONTACTHISTORYMODEL_H
   146 #endif //NMCONTACTHISTORYMODEL_H