86 void sortAndRefresh(Qt::SortOrder order = Qt::AscendingOrder); |
86 void sortAndRefresh(Qt::SortOrder order = Qt::AscendingOrder); |
87 |
87 |
88 private: |
88 private: |
89 void initializeModel(); |
89 void initializeModel(); |
90 QVariant displayRoleData(const HistoryItem& item) const; |
90 QVariant displayRoleData(const HistoryItem& item) const; |
|
91 QVariant decorationRoleData(const HistoryItem& item) const; |
|
92 QVariant backgroundRoleData(const HistoryItem& item) const; |
91 |
93 |
92 // Utility finctions |
94 // Utility finctions |
93 void readLogEvent(LogsEvent* event, HistoryItem& item); |
95 void readLogEvent(LogsEvent* event, HistoryItem& item); |
94 void readMsgEvent(MsgItem& event, HistoryItem& item); |
96 void readMsgEvent(MsgItem& event, HistoryItem& item); |
95 void initializeLogsModel(); |
97 void initializeLogsModel(); |
100 private slots: |
102 private slots: |
101 // Logs model slots |
103 // Logs model slots |
102 void logsRowsInserted(const QModelIndex& parent, int first, int last); |
104 void logsRowsInserted(const QModelIndex& parent, int first, int last); |
103 void logsRowsRemoved(const QModelIndex& parent, int first, int last); |
105 void logsRowsRemoved(const QModelIndex& parent, int first, int last); |
104 void logsDataChanged(const QModelIndex& first, const QModelIndex& last); |
106 void logsDataChanged(const QModelIndex& first, const QModelIndex& last); |
105 void clearedCallLogs(int err); |
107 |
106 void markingCompleted(int err); |
|
107 // Messaging model slots |
108 // Messaging model slots |
108 void messagesReady(QList<MsgItem>& msgs); |
109 void messagesReady(QList<MsgItem>& msgs); |
109 void messageAdded(MsgItem& msg); |
110 void messageAdded(MsgItem& msg); |
110 void messageChanged(MsgItem& msg); |
111 void messageChanged(MsgItem& msg); |
111 void messageDeleted(MsgItem& msg); |
112 void messageDeleted(MsgItem& msg); |
112 |
113 |
113 private: |
114 private: |
114 QSharedDataPointer<CntHistoryModelData> d; |
115 QSharedDataPointer<CntHistoryModelData> d; |
|
116 |
|
117 // Testing related friend definitions |
|
118 friend class TestCntHistoryModel; |
115 }; |
119 }; |
116 #endif |
120 #endif |