Commit e69d7fcd authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): add `sip-addresses`/* components

parent 4a7dd0b8
...@@ -66,6 +66,8 @@ set(SOURCES ...@@ -66,6 +66,8 @@ set(SOURCES
src/components/notifier/Notifier.cpp src/components/notifier/Notifier.cpp
src/components/settings/AccountSettingsModel.cpp src/components/settings/AccountSettingsModel.cpp
src/components/settings/SettingsModel.cpp src/components/settings/SettingsModel.cpp
src/components/sip-addresses/SipAddressesModel.cpp
src/components/sip-addresses/SipAddressModel.cpp
src/components/smart-search-bar/SmartSearchBarModel.cpp src/components/smart-search-bar/SmartSearchBarModel.cpp
src/components/smart-search-bar/SmartSearchBarProxyModel.cpp src/components/smart-search-bar/SmartSearchBarProxyModel.cpp
src/components/timeline/TimelineModel.cpp src/components/timeline/TimelineModel.cpp
...@@ -90,6 +92,8 @@ set(HEADERS ...@@ -90,6 +92,8 @@ set(HEADERS
src/components/presence/Presence.hpp src/components/presence/Presence.hpp
src/components/settings/AccountSettingsModel.hpp src/components/settings/AccountSettingsModel.hpp
src/components/settings/SettingsModel.hpp src/components/settings/SettingsModel.hpp
src/components/sip-addresses/SipAddressesModel.hpp
src/components/sip-addresses/SipAddressModel.hpp
src/components/smart-search-bar/SmartSearchBarModel.hpp src/components/smart-search-bar/SmartSearchBarModel.hpp
src/components/smart-search-bar/SmartSearchBarProxyModel.hpp src/components/smart-search-bar/SmartSearchBarProxyModel.hpp
src/components/timeline/TimelineModel.hpp src/components/timeline/TimelineModel.hpp
......
#include "SipAddressModel.hpp"
// =============================================================================
#ifndef SIP_ADDRESS_MODEL_H_
#define SIP_ADDRESS_MODEL_H_
#include <QObject>
// =============================================================================
class SipAddressModel : public QObject {
Q_OBJECT;
public:
};
#endif // SIP_ADDRESS_H_
#include "SipAddressesModel.hpp"
// =============================================================================
#ifndef SIP_ADDRESSES_MODEL_H_
#define SIP_ADDRESSES_MODEL_H_
#include <QAbstractListModel>
// =============================================================================
class SipAddresses : public QAbstractListModel {
Q_OBJECT;
public:
};
#endif // SIP_ADDRESSES_MODEL_H_
#include <algorithm> #include <algorithm>
#include <linphone++/linphone.hh>
#include <QDateTime> #include <QDateTime>
#include <QSet> #include <QSet>
#include <linphone++/linphone.hh>
#include "../../utils.hpp" #include "../../utils.hpp"
#include "../contacts/ContactsListModel.hpp" #include "../contacts/ContactsListModel.hpp"
...@@ -84,7 +84,7 @@ void TimelineModel::init_entries () { ...@@ -84,7 +84,7 @@ void TimelineModel::init_entries () {
map["timestamp"] = QDateTime::fromMSecsSinceEpoch( map["timestamp"] = QDateTime::fromMSecsSinceEpoch(
static_cast<qint64>(message->getTime()) * 1000 static_cast<qint64>(message->getTime()) * 1000
); );
map["sipAddresses"] = Utils::linphoneStringToQString( map["sipAddresses"] = ::Utils::linphoneStringToQString(
chat_room->getPeerAddress()->asString() chat_room->getPeerAddress()->asString()
); );
...@@ -95,7 +95,7 @@ void TimelineModel::init_entries () { ...@@ -95,7 +95,7 @@ void TimelineModel::init_entries () {
QSet<QString> address_done; QSet<QString> address_done;
for (const auto &call_log : core->getCallLogs()) { for (const auto &call_log : core->getCallLogs()) {
// Get a sip uri to check. // Get a sip uri to check.
QString address = Utils::linphoneStringToQString( QString address = ::Utils::linphoneStringToQString(
call_log->getRemoteAddress()->asString() call_log->getRemoteAddress()->asString()
); );
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
class ContactsListModel; class ContactsListModel;
// =================================================================== // =============================================================================
class TimelineModel : public QAbstractListModel { class TimelineModel : public QAbstractListModel {
Q_OBJECT; Q_OBJECT;
......
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