equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
|
18 #include "cnthistorymodel_p.h" |
18 #include "stub_classes.h" |
19 #include "stub_classes.h" |
19 |
20 |
20 Q_DECLARE_METATYPE(LogsEvent *) |
21 Q_DECLARE_METATYPE(LogsEvent *) |
21 |
|
22 namespace { |
|
23 void addModelData(HistoryItem &t, int i) |
|
24 { |
|
25 t.timeStamp = constDateTime.addSecs(5*i); |
|
26 t.message = QString(cc_msg).arg(i); |
|
27 t.direction = i%2 == 0 ? Incoming : Outgoing; |
|
28 t.seenStatus = i%2 == 0 ? Unseen : Seen; |
|
29 t.iconPath = QString(icon_path).arg(i); |
|
30 t.title = QString(cc_msg).arg(i); |
|
31 }; |
|
32 } |
|
33 |
22 |
34 QVariant LogsModel::data(const QModelIndex& index, int role) const |
23 QVariant LogsModel::data(const QModelIndex& index, int role) const |
35 { |
24 { |
36 if (index.row() < 0 && index.row() >= rowCount()) |
25 if (index.row() < 0 && index.row() >= rowCount()) |
37 return QVariant(); |
26 return QVariant(); |
102 m_events.append(p); |
91 m_events.append(p); |
103 } |
92 } |
104 beginInsertRows(QModelIndex(), 0, m_events.count()); |
93 beginInsertRows(QModelIndex(), 0, m_events.count()); |
105 endInsertRows(); |
94 endInsertRows(); |
106 } |
95 } |
|
96 |
|
97 bool MsgHistory::getMessages(int cntId){} |
|
98 |
|
99 bool MsgHistory::subscribe(int cntId){} |
|
100 |
|
101 bool MsgHistory::markRead(int cntId){ |
|
102 return true; |
|
103 } |
|
104 |