Commit b97b823f authored by Ronan Abhamon's avatar Ronan Abhamon

unstable

parent bcee4d9d
...@@ -184,11 +184,11 @@ ...@@ -184,11 +184,11 @@
</message> </message>
<message> <message>
<source>lostIncomingCall</source> <source>lostIncomingCall</source>
<translation>Lost incoming call</translation> <translation type="vanished">Lost incoming call</translation>
</message> </message>
<message> <message>
<source>lostOutgoingCall</source> <source>lostOutgoingCall</source>
<translation>Lost outgoing call</translation> <translation type="vanished">Lost outgoing call</translation>
</message> </message>
<message> <message>
<source>endCall</source> <source>endCall</source>
......
...@@ -184,11 +184,11 @@ ...@@ -184,11 +184,11 @@
</message> </message>
<message> <message>
<source>lostIncomingCall</source> <source>lostIncomingCall</source>
<translation>Appel entrant manqué</translation> <translation type="vanished">Appel entrant manqué</translation>
</message> </message>
<message> <message>
<source>lostOutgoingCall</source> <source>lostOutgoingCall</source>
<translation>Appel sortant manqué</translation> <translation type="vanished">Appel sortant manqué</translation>
</message> </message>
<message> <message>
<source>endCall</source> <source>endCall</source>
......
...@@ -22,12 +22,15 @@ signals: ...@@ -22,12 +22,15 @@ signals:
void sipAddressChanged (const QString &sipAddress); void sipAddressChanged (const QString &sipAddress);
public: public:
typedef QPair<QVariantMap, std::shared_ptr<void> > ChatEntryData;
enum Roles { enum Roles {
ChatEntry = Qt::DisplayRole, ChatEntry = Qt::DisplayRole,
SectionDate SectionDate
}; };
enum EntryType { enum EntryType {
BaseEntry,
MessageEntry, MessageEntry,
CallEntry CallEntry
}; };
...@@ -57,8 +60,6 @@ public slots: ...@@ -57,8 +60,6 @@ public slots:
void removeAllEntries (); void removeAllEntries ();
private: private:
typedef QPair<QVariantMap, std::shared_ptr<void> > ChatEntryData;
void fillMessageEntry ( void fillMessageEntry (
QVariantMap &dest, QVariantMap &dest,
const std::shared_ptr<linphone::ChatMessage> &message const std::shared_ptr<linphone::ChatMessage> &message
......
#include "ChatProxyModel.hpp" #include "ChatProxyModel.hpp"
#include <QtDebug>
// =================================================================== // ===================================================================
ChatProxyModel::ChatProxyModel (QObject *parent) : QSortFilterProxyModel(parent) { ChatProxyModel::ChatProxyModel (QObject *parent) : QSortFilterProxyModel(parent) {
...@@ -9,5 +10,12 @@ ChatProxyModel::ChatProxyModel (QObject *parent) : QSortFilterProxyModel(parent) ...@@ -9,5 +10,12 @@ ChatProxyModel::ChatProxyModel (QObject *parent) : QSortFilterProxyModel(parent)
} }
bool ChatProxyModel::filterAcceptsRow (int source_row, const QModelIndex &source_parent) const { bool ChatProxyModel::filterAcceptsRow (int source_row, const QModelIndex &source_parent) const {
QModelIndex index = sourceModel()->index(source_row, 0, source_parent);
const QVariantMap &data = qvariant_cast<QVariantMap>(
index.data()
);
qDebug() << data["type"];
return true; // TODO. return true; // TODO.
} }
...@@ -26,6 +26,10 @@ public slots: ...@@ -26,6 +26,10 @@ public slots:
return &m_chat_model; return &m_chat_model;
} }
void setEntryTypeFilter (ChatModel::EntryType type) {
// TODO.
}
protected: protected:
bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const; bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const;
......
...@@ -151,7 +151,9 @@ float ContactsListProxyModel::computeContactWeight (const ContactModel &contact) ...@@ -151,7 +151,9 @@ float ContactsListProxyModel::computeContactWeight (const ContactModel &contact)
// ------------------------------------------------------------------- // -------------------------------------------------------------------
void ContactsListProxyModel::setConnectedFilter (bool useConnectedFilter) { void ContactsListProxyModel::setConnectedFilter (bool use_connected_filter) {
m_use_connected_filter = useConnectedFilter; if (use_connected_filter != m_use_connected_filter) {
m_use_connected_filter = use_connected_filter;
invalidate(); invalidate();
}
} }
...@@ -35,7 +35,7 @@ private: ...@@ -35,7 +35,7 @@ private:
bool isConnectedFilterUsed () const { bool isConnectedFilterUsed () const {
return m_use_connected_filter; return m_use_connected_filter;
} }
void setConnectedFilter (bool useConnectedFilter); void setConnectedFilter (bool use_connected_filter);
static const QRegExp m_search_separators; static const QRegExp m_search_separators;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment