mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-27 19:06:22 +00:00
unstable
This commit is contained in:
parent
4ce00a71f4
commit
ed17343d16
5 changed files with 53 additions and 1 deletions
|
|
@ -66,6 +66,7 @@ set(SOURCES
|
|||
src/components/notifier/Notifier.cpp
|
||||
src/components/settings/AccountSettingsModel.cpp
|
||||
src/components/settings/SettingsModel.cpp
|
||||
src/components/sip-address/SipAddressModel.cpp
|
||||
src/components/sip-addresses/SipAddressesModel.cpp
|
||||
src/components/smart-search-bar/SmartSearchBarModel.cpp
|
||||
src/components/timeline/TimelineModel.cpp
|
||||
|
|
@ -90,6 +91,7 @@ set(HEADERS
|
|||
src/components/presence/Presence.hpp
|
||||
src/components/settings/AccountSettingsModel.hpp
|
||||
src/components/settings/SettingsModel.hpp
|
||||
src/components/sip-address/SipAddressModel.hpp
|
||||
src/components/sip-addresses/SipAddressesModel.hpp
|
||||
src/components/smart-search-bar/SmartSearchBarModel.hpp
|
||||
src/components/timeline/TimelineModel.hpp
|
||||
|
|
|
|||
|
|
@ -89,6 +89,9 @@ void App::registerTypes () {
|
|||
qmlRegisterUncreatableType<ContactModel>(
|
||||
"Linphone", 1, 0, "ContactModel", "ContactModel is uncreatable"
|
||||
);
|
||||
qmlRegisterUncreatableType<SipAddressModel>(
|
||||
"Linphone", 1, 0, "SipAddressModel", "SipAddressModel is uncreatable"
|
||||
);
|
||||
qmlRegisterUncreatableType<VcardModel>(
|
||||
"Linphone", 1, 0, "VcardModel", "VcardModel is uncreatable"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public slots:
|
|||
void removeAllEntries ();
|
||||
|
||||
signals:
|
||||
void sipAddressChanged (const QString &sipAddress);
|
||||
void sipAddressChanged (const QString &sip_address);
|
||||
void allEntriesRemoved ();
|
||||
|
||||
private:
|
||||
|
|
|
|||
9
tests/src/components/sip-address/SipAddressModel.cpp
Normal file
9
tests/src/components/sip-address/SipAddressModel.cpp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#include "../contact/ContactModel.hpp"
|
||||
|
||||
#include "SipAddressModel.hpp"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
SipAddressModel::SipAddressModel () {
|
||||
// TODO
|
||||
}
|
||||
38
tests/src/components/sip-address/SipAddressModel.hpp
Normal file
38
tests/src/components/sip-address/SipAddressModel.hpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef SIP_ADDRESS_MODEL_H_
|
||||
#define SIP_ADDRESS_MODEL_H_
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class ContactModel;
|
||||
|
||||
class SipAddressModel : public QObject {
|
||||
Q_OBJECT;
|
||||
|
||||
Q_PROPERTY(QString sipAddress READ getSipAddress CONSTANT);
|
||||
Q_PROPERTY(ContactModel * contact READ getContact NOTIFY contactChanged);
|
||||
|
||||
public:
|
||||
SipAddressModel ();
|
||||
~SipAddressModel () = default;
|
||||
|
||||
ContactModel *getContact () const {
|
||||
return m_contact;
|
||||
}
|
||||
|
||||
signals:
|
||||
void contactChanged (ContactModel *contact);
|
||||
|
||||
private:
|
||||
QString getSipAddress () const {
|
||||
return m_sip_address;
|
||||
}
|
||||
|
||||
QString m_sip_address;
|
||||
ContactModel *m_contact = nullptr;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(SipAddressModel *);
|
||||
|
||||
#endif // SIP_ADDRESS_MODEL_H_
|
||||
Loading…
Add table
Reference in a new issue