mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
FIXES:
fix account list singleton fix magic search list thread connection fix allow calling a connected account fix magic search flags fix crash on close settings destruction magic search thread meeeting fix time zone rename settingscore remove settings from notifier fix zrtp appearance received call remove deprecated function; TODO : send invitations when sdk updated
This commit is contained in:
parent
7970cd49f0
commit
3debdf4bb5
47 changed files with 458 additions and 376 deletions
|
|
@ -38,7 +38,6 @@
|
|||
#include "core/account/AccountCore.hpp"
|
||||
#include "core/account/AccountDeviceGui.hpp"
|
||||
#include "core/account/AccountDeviceProxy.hpp"
|
||||
#include "core/account/AccountProxy.hpp"
|
||||
#include "core/address-books/LdapGui.hpp"
|
||||
#include "core/address-books/LdapProxy.hpp"
|
||||
#include "core/call-history/CallHistoryProxy.hpp"
|
||||
|
|
@ -415,10 +414,11 @@ void App::initCore() {
|
|||
mLinphoneThread->getThreadId(),
|
||||
[this]() mutable {
|
||||
CoreModel::getInstance()->start();
|
||||
auto settings = Settings::create();
|
||||
QMetaObject::invokeMethod(App::getInstance()->thread(), [this, settings]() mutable {
|
||||
auto settings = SettingsCore::create();
|
||||
QMetaObject::invokeMethod(App::getInstance()->thread(), [this, settings] {
|
||||
// QML
|
||||
mEngine = new QQmlApplicationEngine(this);
|
||||
assert(mEngine);
|
||||
// Provide `+custom` folders for custom components and `5.9` for old components.
|
||||
QStringList selectors("custom");
|
||||
const QVersionNumber &version = QLibraryInfo::version();
|
||||
|
|
@ -460,9 +460,11 @@ void App::initCore() {
|
|||
mEngine->addImageProvider(WindowIconProvider::ProviderId, new WindowIconProvider());
|
||||
|
||||
// Enable notifications.
|
||||
mNotifier = new Notifier(mEngine, settings);
|
||||
mNotifier = new Notifier(mEngine);
|
||||
mSettings = settings;
|
||||
settings.reset();
|
||||
mEngine->setObjectOwnership(mSettings.get(), QQmlEngine::CppOwnership);
|
||||
mAccountList = AccountList::create();
|
||||
mCallList = CallList::create();
|
||||
|
||||
const QUrl url(u"qrc:/Linphone/view/App/Main.qml"_qs);
|
||||
QObject::connect(
|
||||
|
|
@ -479,7 +481,7 @@ void App::initCore() {
|
|||
}
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
QObject::connect(mSettings.get(), &Settings::autoStartChanged, [this]() {
|
||||
QObject::connect(mSettings.get(), &SettingsCore::autoStartChanged, [this]() {
|
||||
mustBeInMainThread(log().arg(Q_FUNC_INFO));
|
||||
setAutoStart(mSettings->getAutoStart());
|
||||
});
|
||||
|
|
@ -515,9 +517,15 @@ void App::initCppInterfaces() {
|
|||
"EnumsToStringCpp", 1, 0, "EnumsToStringCpp",
|
||||
[](QQmlEngine *engine, QJSEngine *) -> QObject * { return new EnumsToString(engine); });
|
||||
|
||||
qmlRegisterSingletonType<Settings>(
|
||||
qmlRegisterSingletonType<SettingsCore>(
|
||||
"SettingsCpp", 1, 0, "SettingsCpp",
|
||||
[this](QQmlEngine *engine, QJSEngine *) -> QObject * { return mSettings.get(); });
|
||||
qmlRegisterSingletonType<AccountList>(
|
||||
"LinphoneAccountsCpp", 1, 0, "LinphoneAccountsCpp",
|
||||
[this](QQmlEngine *engine, QJSEngine *) -> QObject * { return mAccountList.get(); });
|
||||
qmlRegisterSingletonType<CallList>(
|
||||
"LinphoneCallsCpp", 1, 0, "LinphoneCallsCpp",
|
||||
[this](QQmlEngine *engine, QJSEngine *) -> QObject * { return mCallList.get(); });
|
||||
|
||||
qmlRegisterType<PhoneNumberProxy>(Constants::MainQmlUri, 1, 0, "PhoneNumberProxy");
|
||||
qmlRegisterType<VariantObject>(Constants::MainQmlUri, 1, 0, "VariantObject");
|
||||
|
|
@ -530,15 +538,15 @@ void App::initCppInterfaces() {
|
|||
|
||||
qmlRegisterType<PhoneNumberProxy>(Constants::MainQmlUri, 1, 0, "PhoneNumberProxy");
|
||||
qmlRegisterUncreatableType<PhoneNumber>(Constants::MainQmlUri, 1, 0, "PhoneNumber", QLatin1String("Uncreatable"));
|
||||
qmlRegisterType<AccountProxy>(Constants::MainQmlUri, 1, 0, "AccountProxy");
|
||||
qmlRegisterType<AccountGui>(Constants::MainQmlUri, 1, 0, "AccountGui");
|
||||
qmlRegisterType<AccountProxy>(Constants::MainQmlUri, 1, 0, "AccountProxy");
|
||||
qmlRegisterType<AccountDeviceProxy>(Constants::MainQmlUri, 1, 0, "AccountDeviceProxy");
|
||||
qmlRegisterType<AccountDeviceGui>(Constants::MainQmlUri, 1, 0, "AccountDeviceGui");
|
||||
qmlRegisterUncreatableType<AccountCore>(Constants::MainQmlUri, 1, 0, "AccountCore", QLatin1String("Uncreatable"));
|
||||
qmlRegisterUncreatableType<CallCore>(Constants::MainQmlUri, 1, 0, "CallCore", QLatin1String("Uncreatable"));
|
||||
qmlRegisterType<CallProxy>(Constants::MainQmlUri, 1, 0, "CallProxy");
|
||||
qmlRegisterType<CallHistoryProxy>(Constants::MainQmlUri, 1, 0, "CallHistoryProxy");
|
||||
qmlRegisterType<CallGui>(Constants::MainQmlUri, 1, 0, "CallGui");
|
||||
qmlRegisterType<CallProxy>(Constants::MainQmlUri, 1, 0, "CallProxy");
|
||||
qmlRegisterUncreatableType<ConferenceCore>(Constants::MainQmlUri, 1, 0, "ConferenceCore",
|
||||
QLatin1String("Uncreatable"));
|
||||
qmlRegisterType<ConferenceGui>(Constants::MainQmlUri, 1, 0, "ConferenceGui");
|
||||
|
|
@ -573,14 +581,10 @@ void App::initCppInterfaces() {
|
|||
//------------------------------------------------------------
|
||||
|
||||
void App::clean() {
|
||||
if (mSettings) mSettings.reset();
|
||||
// Wait 500ms to let time for log te be stored.
|
||||
// mNotifier destroyed in mEngine deletion as it is its parent
|
||||
delete mEngine;
|
||||
mEngine = nullptr;
|
||||
// if (mSettings) {
|
||||
// mSettings.reset();
|
||||
// }
|
||||
// Wait 500ms to let time for log te be stored.
|
||||
// mNotifier destroyed in mEngine deletion as it is its parent
|
||||
qApp->processEvents(QEventLoop::AllEvents, 500);
|
||||
if (mLinphoneThread) {
|
||||
mLinphoneThread->exit();
|
||||
|
|
@ -725,6 +729,18 @@ void App::setMainWindow(QQuickWindow *data) {
|
|||
}
|
||||
}
|
||||
|
||||
QSharedPointer<AccountList> App::getAccountList() const {
|
||||
return mAccountList;
|
||||
}
|
||||
|
||||
QSharedPointer<CallList> App::getCallList() const {
|
||||
return mCallList;
|
||||
}
|
||||
|
||||
QSharedPointer<SettingsCore> App::getSettings() const {
|
||||
return mSettings;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
QString App::getApplicationPath() const {
|
||||
const QString binPath(QCoreApplication::applicationFilePath());
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
#include <QQmlApplicationEngine>
|
||||
#include <QSharedPointer>
|
||||
|
||||
#include "core/account/AccountProxy.hpp"
|
||||
#include "core/call/CallProxy.hpp"
|
||||
#include "core/setting/SettingsCore.hpp"
|
||||
#include "core/singleapplication/singleapplication.h"
|
||||
#include "model/cli/CliModel.hpp"
|
||||
|
|
@ -114,6 +116,9 @@ public:
|
|||
|
||||
QQuickWindow *getMainWindow() const;
|
||||
void setMainWindow(QQuickWindow *data);
|
||||
QSharedPointer<AccountList> getAccountList() const;
|
||||
QSharedPointer<CallList> getCallList() const;
|
||||
QSharedPointer<SettingsCore> getSettings() const;
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
Q_INVOKABLE void exportDesktopFile();
|
||||
|
|
@ -142,7 +147,9 @@ private:
|
|||
Notifier *mNotifier = nullptr;
|
||||
QQuickWindow *mMainWindow = nullptr;
|
||||
QQuickWindow *mCallsWindow = nullptr;
|
||||
QSharedPointer<Settings> mSettings;
|
||||
QSharedPointer<SettingsCore> mSettings;
|
||||
QSharedPointer<AccountList> mAccountList;
|
||||
QSharedPointer<CallList> mCallList;
|
||||
QSharedPointer<SafeConnection<App, CoreModel>> mCoreModelConnection;
|
||||
QSharedPointer<SafeConnection<App, CliModel>> mCliModelConnection;
|
||||
bool mAutoStart = false;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ QSharedPointer<AccountList> AccountList::create() {
|
|||
|
||||
AccountList::AccountList(QObject *parent) : ListProxy(parent) {
|
||||
mustBeInMainThread(getClassName());
|
||||
App::getInstance()->mEngine->setObjectOwnership(this, QQmlEngine::CppOwnership);
|
||||
}
|
||||
|
||||
AccountList::~AccountList() {
|
||||
|
|
@ -84,6 +85,7 @@ void AccountList::setSelf(QSharedPointer<AccountList> me) {
|
|||
mModelConnection->makeConnectToModel(&CoreModel::accountAdded, &AccountList::lUpdate);
|
||||
|
||||
lUpdate();
|
||||
emit initialized();
|
||||
}
|
||||
|
||||
QSharedPointer<AccountCore> AccountList::getDefaultAccountCore() const {
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ signals:
|
|||
void lUpdate();
|
||||
void haveAccountChanged();
|
||||
void defaultAccountChanged();
|
||||
void initialized();
|
||||
|
||||
private:
|
||||
bool mHaveAccount = false;
|
||||
|
|
|
|||
|
|
@ -21,13 +21,10 @@
|
|||
#include "AccountProxy.hpp"
|
||||
#include "AccountGui.hpp"
|
||||
#include "AccountList.hpp"
|
||||
#include "core/App.hpp"
|
||||
|
||||
AccountProxy::AccountProxy(QObject *parent) : SortFilterProxy(parent) {
|
||||
mAccountList = AccountList::create();
|
||||
connect(mAccountList.get(), &AccountList::countChanged, this, &AccountProxy::resetDefaultAccount);
|
||||
connect(mAccountList.get(), &AccountList::defaultAccountChanged, this, &AccountProxy::resetDefaultAccount);
|
||||
connect(mAccountList.get(), &AccountList::haveAccountChanged, this, &AccountProxy::haveAccountChanged);
|
||||
setSourceModel(mAccountList.get());
|
||||
setSourceModel(App::getInstance()->getAccountList().get());
|
||||
sort(0);
|
||||
}
|
||||
|
||||
|
|
@ -73,6 +70,20 @@ bool AccountProxy::getHaveAccount() const {
|
|||
return dynamic_cast<AccountList *>(sourceModel())->getHaveAccount();
|
||||
}
|
||||
|
||||
void AccountProxy::setSourceModel(QAbstractItemModel *model) {
|
||||
auto oldAccountList = dynamic_cast<AccountList *>(sourceModel());
|
||||
if (oldAccountList) {
|
||||
disconnect(oldAccountList);
|
||||
}
|
||||
auto newAccountList = dynamic_cast<AccountList *>(model);
|
||||
if (newAccountList) {
|
||||
connect(newAccountList, &AccountList::countChanged, this, &AccountProxy::resetDefaultAccount);
|
||||
connect(newAccountList, &AccountList::defaultAccountChanged, this, &AccountProxy::resetDefaultAccount);
|
||||
connect(newAccountList, &AccountList::haveAccountChanged, this, &AccountProxy::haveAccountChanged);
|
||||
}
|
||||
QSortFilterProxyModel::setSourceModel(model);
|
||||
}
|
||||
|
||||
bool AccountProxy::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const {
|
||||
bool show = (mFilterText.isEmpty() || mFilterText == "*");
|
||||
if (!show) {
|
||||
|
|
|
|||
|
|
@ -49,10 +49,13 @@ public:
|
|||
|
||||
bool getHaveAccount() const;
|
||||
|
||||
void setSourceModel(QAbstractItemModel *sourceModel) override;
|
||||
|
||||
signals:
|
||||
void filterTextChanged();
|
||||
void defaultAccountChanged();
|
||||
void haveAccountChanged();
|
||||
void initialized();
|
||||
|
||||
protected:
|
||||
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
|
|
@ -60,7 +63,6 @@ protected:
|
|||
|
||||
QString mFilterText;
|
||||
QSharedPointer<AccountCore> mDefaultAccount; // When null, a new UI object is build from List
|
||||
QSharedPointer<AccountList> mAccountList;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ QSharedPointer<CallCore> CallList::createCallCore(const std::shared_ptr<linphone
|
|||
|
||||
CallList::CallList(QObject *parent) : ListProxy(parent) {
|
||||
mustBeInMainThread(getClassName());
|
||||
App::getInstance()->mEngine->setObjectOwnership(this, QQmlEngine::CppOwnership);
|
||||
}
|
||||
|
||||
CallList::~CallList() {
|
||||
|
|
|
|||
|
|
@ -21,15 +21,12 @@
|
|||
#include "CallProxy.hpp"
|
||||
#include "CallGui.hpp"
|
||||
#include "CallList.hpp"
|
||||
#include "core/App.hpp"
|
||||
|
||||
DEFINE_ABSTRACT_OBJECT(CallProxy)
|
||||
|
||||
CallProxy::CallProxy(QObject *parent) : SortFilterProxy(parent) {
|
||||
mList = CallList::create();
|
||||
connect(mList.get(), &CallList::currentCallChanged, this, &CallProxy::resetCurrentCall);
|
||||
connect(mList.get(), &CallList::haveCallChanged, this, &CallProxy::haveCallChanged);
|
||||
connect(this, &CallProxy::lMergeAll, mList.get(), &CallList::lMergeAll);
|
||||
setSourceModel(mList.get());
|
||||
setSourceModel(App::getInstance()->getCallList().get());
|
||||
sort(0);
|
||||
}
|
||||
|
||||
|
|
@ -68,6 +65,20 @@ bool CallProxy::getHaveCall() const {
|
|||
return dynamic_cast<CallList *>(sourceModel())->getHaveCall();
|
||||
}
|
||||
|
||||
void CallProxy::setSourceModel(QAbstractItemModel *model) {
|
||||
auto oldCallList = dynamic_cast<CallList *>(sourceModel());
|
||||
if (oldCallList) {
|
||||
disconnect(oldCallList);
|
||||
}
|
||||
auto newCallList = dynamic_cast<CallList *>(model);
|
||||
if (newCallList) {
|
||||
connect(newCallList, &CallList::currentCallChanged, this, &CallProxy::resetCurrentCall);
|
||||
connect(newCallList, &CallList::haveCallChanged, this, &CallProxy::haveCallChanged);
|
||||
connect(this, &CallProxy::lMergeAll, newCallList, &CallList::lMergeAll);
|
||||
}
|
||||
QSortFilterProxyModel::setSourceModel(model);
|
||||
}
|
||||
|
||||
bool CallProxy::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const {
|
||||
bool show = (mFilterText.isEmpty() || mFilterText == "*");
|
||||
if (!show) {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ public:
|
|||
|
||||
bool getHaveCall() const;
|
||||
|
||||
void setSourceModel(QAbstractItemModel *sourceModel) override;
|
||||
|
||||
signals:
|
||||
void lMergeAll();
|
||||
void filterTextChanged();
|
||||
|
|
@ -62,7 +64,6 @@ protected:
|
|||
|
||||
QString mFilterText;
|
||||
CallGui *mCurrentCall = nullptr; // When null, a new UI object is build from List
|
||||
QSharedPointer<CallList> mList;
|
||||
|
||||
DECLARE_ABSTRACT_OBJECT
|
||||
};
|
||||
|
|
|
|||
|
|
@ -574,6 +574,7 @@ void ConferenceInfoCore::save() {
|
|||
if (CoreModel::getInstance()->getCore()->getDefaultAccount()->getState() !=
|
||||
linphone::RegistrationState::Ok) {
|
||||
Utils::showInformationPopup(tr("Erreur"), tr("Votre compte est déconnecté"), false);
|
||||
emit saveFailed();
|
||||
return;
|
||||
}
|
||||
auto linphoneConf =
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ signals:
|
|||
void conferenceInfoStateChanged();
|
||||
void conferenceSchedulerStateChanged();
|
||||
void timeZoneModelChanged();
|
||||
void saveFailed();
|
||||
|
||||
void invitationsSent();
|
||||
void removed();
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ const QHash<int, Notifier::Notification> Notifier::Notifications = {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Notifier::Notifier(QObject *parent, QSharedPointer<Settings> settings) : QObject(parent) {
|
||||
Notifier::Notifier(QObject *parent) : QObject(parent) {
|
||||
mustBeInMainThread(getClassName());
|
||||
const int nComponents = Notifications.size();
|
||||
mComponents = new QQmlComponent *[nComponents];
|
||||
|
|
@ -113,7 +113,6 @@ Notifier::Notifier(QObject *parent, QSharedPointer<Settings> settings) : QObject
|
|||
}
|
||||
|
||||
mMutex = new QMutex();
|
||||
mSettings = settings;
|
||||
}
|
||||
|
||||
Notifier::~Notifier() {
|
||||
|
|
@ -268,7 +267,8 @@ void Notifier::deleteNotification(QVariant notification) {
|
|||
// =============================================================================
|
||||
|
||||
#define CREATE_NOTIFICATION(TYPE, DATA) \
|
||||
if (mSettings->dndEnabled()) return; \
|
||||
auto settings = App::getInstance()->getSettings(); \
|
||||
if (settings && settings->dndEnabled()) return; \
|
||||
QObject *notification = createNotification(TYPE, DATA); \
|
||||
if (!notification) return; \
|
||||
const int timeout = Notifications[TYPE].getTimeout() * 1000; \
|
||||
|
|
@ -280,6 +280,8 @@ void Notifier::deleteNotification(QVariant notification) {
|
|||
|
||||
void Notifier::notifyReceivedCall(const shared_ptr<linphone::Call> &call) {
|
||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
auto remoteAddress = call->getRemoteAddress();
|
||||
auto accountSender = ToolModel::findAccount(remoteAddress);
|
||||
auto account = ToolModel::findAccount(call->getToAddress());
|
||||
if (account) {
|
||||
auto accountModel = Utils::makeQObject_ptr<AccountModel>(account);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class Notifier : public QObject, public AbstractObject {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Notifier(QObject *parent = Q_NULLPTR, QSharedPointer<Settings> settings = Q_NULLPTR);
|
||||
Notifier(QObject *parent = Q_NULLPTR);
|
||||
~Notifier();
|
||||
|
||||
enum NotificationType {
|
||||
|
|
@ -98,7 +98,6 @@ private:
|
|||
QQmlComponent **mComponents = nullptr;
|
||||
|
||||
static const QHash<int, Notification> Notifications;
|
||||
QSharedPointer<Settings> mSettings;
|
||||
|
||||
DECLARE_ABSTRACT_OBJECT
|
||||
};
|
||||
|
|
|
|||
|
|
@ -106,30 +106,6 @@ bool ParticipantProxy::getShowMe() const {
|
|||
// }
|
||||
// }
|
||||
|
||||
void ParticipantProxy::setConferenceModel(ConferenceModel *conferenceModel) {
|
||||
// if (!mConferenceModel || mConferenceModel != conferenceModel) {
|
||||
// mConferenceModel = conferenceModel;
|
||||
// if (mConferenceModel) {
|
||||
// auto participants = mConferenceModel->getParticipantList();
|
||||
// connect(participants, &ParticipantList::countChanged, this, &ParticipantProxy::countChanged);
|
||||
// setSourceModel(participants);
|
||||
// emit participantListChanged();
|
||||
// for (int i = 0; i < participants->getCount(); ++i) {
|
||||
// auto participant = participants->getAt<ParticipantCore>(i);
|
||||
// connect(participant.get(), &ParticipantCore::invitationTimeout, this, &ParticipantProxy::removeModel);
|
||||
// emit addressAdded(participant->getSipAddress());
|
||||
// }
|
||||
// } else if (!sourceModel()) {
|
||||
// auto model = new ParticipantList((ConferenceModel *)nullptr, this);
|
||||
// connect(model, &ParticipantList::countChanged, this, &ParticipantProxy::countChanged);
|
||||
// setSourceModel(model);
|
||||
// emit participantListChanged();
|
||||
// }
|
||||
// sort(0);
|
||||
// emit conferenceModelChanged();
|
||||
// }
|
||||
}
|
||||
|
||||
void ParticipantProxy::setShowMe(const bool &show) {
|
||||
if (mShowMe != show) {
|
||||
mShowMe = show;
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@ public:
|
|||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
|
||||
|
||||
bool getShowMe() const;
|
||||
|
||||
void setConferenceModel(ConferenceModel *conferenceModel);
|
||||
void setShowMe(const bool &show);
|
||||
|
||||
Q_INVOKABLE void addAddress(const QString &address);
|
||||
|
|
|
|||
|
|
@ -41,15 +41,7 @@ MagicSearchList::MagicSearchList(QObject *parent) : ListProxy(parent) {
|
|||
mustBeInMainThread(getClassName());
|
||||
mSourceFlags = (int)linphone::MagicSearch::Source::Friends | (int)linphone::MagicSearch::Source::LdapServers;
|
||||
mAggregationFlag = LinphoneEnums::MagicSearchAggregation::Friend;
|
||||
App::postModelSync([this]() {
|
||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
auto linphoneSearch = CoreModel::getInstance()->getCore()->createMagicSearch();
|
||||
linphoneSearch->setLimitedSearch(false);
|
||||
mMagicSearch = Utils::makeQObject_ptr<MagicSearchModel>(linphoneSearch);
|
||||
mMagicSearch->mSourceFlags = mSourceFlags;
|
||||
mMagicSearch->mAggregationFlag = mAggregationFlag;
|
||||
mMagicSearch->setSelf(mMagicSearch);
|
||||
});
|
||||
mSearchFilter = "*";
|
||||
}
|
||||
|
||||
MagicSearchList::~MagicSearchList() {
|
||||
|
|
@ -57,50 +49,6 @@ MagicSearchList::~MagicSearchList() {
|
|||
}
|
||||
|
||||
void MagicSearchList::setSelf(QSharedPointer<MagicSearchList> me) {
|
||||
mModelConnection = QSharedPointer<SafeConnection<MagicSearchList, MagicSearchModel>>(
|
||||
new SafeConnection<MagicSearchList, MagicSearchModel>(me, mMagicSearch), &QObject::deleteLater);
|
||||
mModelConnection->makeConnectToCore(&MagicSearchList::lSearch, [this](QString filter) {
|
||||
mModelConnection->invokeToModel([this, filter]() { mMagicSearch->search(filter); });
|
||||
});
|
||||
mModelConnection->makeConnectToCore(&MagicSearchList::lSetSourceFlags, [this](int flags) {
|
||||
mModelConnection->invokeToModel([this, flags]() { mMagicSearch->setSourceFlags(flags); });
|
||||
});
|
||||
mModelConnection->makeConnectToModel(&MagicSearchModel::sourceFlagsChanged, [this](int flags) {
|
||||
mModelConnection->invokeToCore([this, flags]() { setSourceFlags(flags); });
|
||||
});
|
||||
mModelConnection->makeConnectToModel(
|
||||
&MagicSearchModel::aggregationFlagChanged, [this](LinphoneEnums::MagicSearchAggregation flag) {
|
||||
mModelConnection->invokeToCore([this, flag]() { setAggregationFlag(flag); });
|
||||
});
|
||||
mModelConnection->makeConnectToModel(
|
||||
&MagicSearchModel::searchResultsReceived,
|
||||
[this](const std::list<std::shared_ptr<linphone::SearchResult>> &results) {
|
||||
auto *contacts = new QList<QSharedPointer<FriendCore>>();
|
||||
for (auto it : results) {
|
||||
QSharedPointer<FriendCore> contact;
|
||||
if (it->getFriend()) {
|
||||
contact = FriendCore::create(it->getFriend());
|
||||
contacts->append(contact);
|
||||
} else if (auto address = it->getAddress()) {
|
||||
auto linphoneFriend = CoreModel::getInstance()->getCore()->createFriend();
|
||||
contact = FriendCore::create(linphoneFriend);
|
||||
contact->setGivenName(Utils::coreStringToAppString(address->asStringUriOnly()));
|
||||
contact->appendAddress(Utils::coreStringToAppString(address->asStringUriOnly()));
|
||||
contacts->append(contact);
|
||||
} else if (!it->getPhoneNumber().empty()) {
|
||||
auto linphoneFriend = CoreModel::getInstance()->getCore()->createFriend();
|
||||
contact = FriendCore::create(linphoneFriend);
|
||||
contact->setGivenName(Utils::coreStringToAppString(it->getPhoneNumber()));
|
||||
contact->appendPhoneNumber(tr("Phone"), Utils::coreStringToAppString(it->getPhoneNumber()));
|
||||
contacts->append(contact);
|
||||
}
|
||||
}
|
||||
mModelConnection->invokeToCore([this, contacts]() {
|
||||
setResults(*contacts);
|
||||
delete contacts;
|
||||
});
|
||||
});
|
||||
|
||||
mCoreModelConnection = QSharedPointer<SafeConnection<MagicSearchList, CoreModel>>(
|
||||
new SafeConnection<MagicSearchList, CoreModel>(me, CoreModel::getInstance()), &QObject::deleteLater);
|
||||
mCoreModelConnection->makeConnectToModel(
|
||||
|
|
@ -113,13 +61,66 @@ void MagicSearchList::setSelf(QSharedPointer<MagicSearchList> me) {
|
|||
if (haveContact == mList.end()) {
|
||||
connect(friendCore.get(), &FriendCore::removed, this, qOverload<QObject *>(&MagicSearchList::remove));
|
||||
add(friendCore);
|
||||
int index = -1;
|
||||
get(friendCore.get(), &index);
|
||||
if (index != -1) {
|
||||
emit friendCreated(index);
|
||||
}
|
||||
emit friendCreated(getCount() - 1);
|
||||
}
|
||||
});
|
||||
mCoreModelConnection->invokeToModel([this] {
|
||||
auto linphoneSearch = CoreModel::getInstance()->getCore()->createMagicSearch();
|
||||
linphoneSearch->setLimitedSearch(false);
|
||||
auto magicSearch = Utils::makeQObject_ptr<MagicSearchModel>(linphoneSearch);
|
||||
mCoreModelConnection->invokeToCore([this, magicSearch] {
|
||||
mMagicSearch = magicSearch;
|
||||
mMagicSearch->mSourceFlags = mSourceFlags;
|
||||
mMagicSearch->mAggregationFlag = mAggregationFlag;
|
||||
mMagicSearch->setSelf(mMagicSearch);
|
||||
mModelConnection = QSharedPointer<SafeConnection<MagicSearchList, MagicSearchModel>>(
|
||||
new SafeConnection<MagicSearchList, MagicSearchModel>(mCoreModelConnection->mCore.mQData, mMagicSearch),
|
||||
&QObject::deleteLater);
|
||||
mModelConnection->makeConnectToCore(&MagicSearchList::lSearch, [this](QString filter) {
|
||||
mModelConnection->invokeToModel([this, filter]() { mMagicSearch->search(filter); });
|
||||
});
|
||||
mModelConnection->makeConnectToCore(&MagicSearchList::lSetSourceFlags, [this](int flags) {
|
||||
mModelConnection->invokeToModel([this, flags]() { mMagicSearch->setSourceFlags(flags); });
|
||||
});
|
||||
mModelConnection->makeConnectToModel(&MagicSearchModel::sourceFlagsChanged, [this](int flags) {
|
||||
mModelConnection->invokeToCore([this, flags]() { setSourceFlags(flags); });
|
||||
});
|
||||
mModelConnection->makeConnectToModel(
|
||||
&MagicSearchModel::aggregationFlagChanged, [this](LinphoneEnums::MagicSearchAggregation flag) {
|
||||
mModelConnection->invokeToCore([this, flag]() { setAggregationFlag(flag); });
|
||||
});
|
||||
mModelConnection->makeConnectToModel(
|
||||
&MagicSearchModel::searchResultsReceived,
|
||||
[this](const std::list<std::shared_ptr<linphone::SearchResult>> &results) {
|
||||
auto *contacts = new QList<QSharedPointer<FriendCore>>();
|
||||
for (auto it : results) {
|
||||
QSharedPointer<FriendCore> contact;
|
||||
if (it->getFriend()) {
|
||||
contact = FriendCore::create(it->getFriend());
|
||||
contacts->append(contact);
|
||||
} else if (auto address = it->getAddress()) {
|
||||
auto linphoneFriend = CoreModel::getInstance()->getCore()->createFriend();
|
||||
contact = FriendCore::create(linphoneFriend);
|
||||
contact->setGivenName(Utils::coreStringToAppString(address->asStringUriOnly()));
|
||||
contact->appendAddress(Utils::coreStringToAppString(address->asStringUriOnly()));
|
||||
contacts->append(contact);
|
||||
} else if (!it->getPhoneNumber().empty()) {
|
||||
auto linphoneFriend = CoreModel::getInstance()->getCore()->createFriend();
|
||||
contact = FriendCore::create(linphoneFriend);
|
||||
contact->setGivenName(Utils::coreStringToAppString(it->getPhoneNumber()));
|
||||
contact->appendPhoneNumber(tr("Phone"), Utils::coreStringToAppString(it->getPhoneNumber()));
|
||||
contacts->append(contact);
|
||||
}
|
||||
}
|
||||
mModelConnection->invokeToCore([this, contacts]() {
|
||||
setResults(*contacts);
|
||||
delete contacts;
|
||||
});
|
||||
});
|
||||
emit initialized();
|
||||
emit lSearch(mSearchFilter);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void MagicSearchList::setResults(const QList<QSharedPointer<FriendCore>> &contacts) {
|
||||
|
|
@ -134,6 +135,7 @@ void MagicSearchList::addResult(const QSharedPointer<FriendCore> &contact) {
|
|||
}
|
||||
|
||||
void MagicSearchList::setSearch(const QString &search) {
|
||||
mSearchFilter = search;
|
||||
if (!search.isEmpty()) {
|
||||
lSearch(search);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public:
|
|||
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
int findFriendIndexByAddress(const QString& address);
|
||||
int findFriendIndexByAddress(const QString &address);
|
||||
|
||||
signals:
|
||||
void lSearch(QString filter);
|
||||
|
|
@ -64,9 +64,12 @@ signals:
|
|||
|
||||
void friendCreated(int index);
|
||||
|
||||
void initialized();
|
||||
|
||||
private:
|
||||
int mSourceFlags;
|
||||
LinphoneEnums::MagicSearchAggregation mAggregationFlag;
|
||||
QString mSearchFilter;
|
||||
|
||||
std::shared_ptr<MagicSearchModel> mMagicSearch;
|
||||
QSharedPointer<SafeConnection<MagicSearchList, MagicSearchModel>> mModelConnection;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@
|
|||
|
||||
MagicSearchProxy::MagicSearchProxy(QObject *parent) : SortFilterProxy(parent) {
|
||||
mList = MagicSearchList::create();
|
||||
connect(mList.get(), &MagicSearchList::sourceFlagsChanged, this, &MagicSearchProxy::sourceFlagsChanged);
|
||||
mSourceFlags = (int)LinphoneEnums::MagicSearchSource::Friends | (int)LinphoneEnums::MagicSearchSource::LdapServers;
|
||||
mAggregationFlag = LinphoneEnums::MagicSearchAggregation::Friend;
|
||||
(mList.get(), &MagicSearchList::sourceFlagsChanged, this, &MagicSearchProxy::sourceFlagsChanged);
|
||||
connect(mList.get(), &MagicSearchList::aggregationFlagChanged, this, &MagicSearchProxy::aggregationFlagChanged);
|
||||
connect(mList.get(), &MagicSearchList::friendCreated, this, [this](int index) {
|
||||
auto proxyIndex = mapFromSource(sourceModel()->index(index, 0));
|
||||
|
|
@ -33,6 +35,10 @@ MagicSearchProxy::MagicSearchProxy(QObject *parent) : SortFilterProxy(parent) {
|
|||
setSourceModel(mList.get());
|
||||
connect(this, &MagicSearchProxy::forceUpdate, [this] { emit mList->lSearch(mSearchText); });
|
||||
sort(0);
|
||||
connect(mList.get(), &MagicSearchList::initialized, this, [this] {
|
||||
emit mList->lSetSourceFlags(mSourceFlags);
|
||||
emit mList->lSetAggregationFlag(mAggregationFlag);
|
||||
});
|
||||
}
|
||||
|
||||
MagicSearchProxy::~MagicSearchProxy() {
|
||||
|
|
@ -48,23 +54,29 @@ QString MagicSearchProxy::getSearchText() const {
|
|||
|
||||
void MagicSearchProxy::setSearchText(const QString &search) {
|
||||
mSearchText = search;
|
||||
qobject_cast<MagicSearchList *>(sourceModel())->setSearch(mSearchText);
|
||||
mList->setSearch(mSearchText);
|
||||
}
|
||||
|
||||
int MagicSearchProxy::getSourceFlags() const {
|
||||
return qobject_cast<MagicSearchList *>(sourceModel())->getSourceFlags();
|
||||
return mSourceFlags;
|
||||
}
|
||||
|
||||
void MagicSearchProxy::setSourceFlags(int flags) {
|
||||
qobject_cast<MagicSearchList *>(sourceModel())->lSetSourceFlags(flags);
|
||||
if (flags != mSourceFlags) {
|
||||
mSourceFlags = flags;
|
||||
emit mList->lSetSourceFlags(flags);
|
||||
}
|
||||
}
|
||||
|
||||
LinphoneEnums::MagicSearchAggregation MagicSearchProxy::getAggregationFlag() const {
|
||||
return qobject_cast<MagicSearchList *>(sourceModel())->getAggregationFlag();
|
||||
return mAggregationFlag;
|
||||
}
|
||||
|
||||
void MagicSearchProxy::setAggregationFlag(LinphoneEnums::MagicSearchAggregation flag) {
|
||||
qobject_cast<MagicSearchList *>(sourceModel())->lSetAggregationFlag(flag);
|
||||
if (flag != mAggregationFlag) {
|
||||
mAggregationFlag = flag;
|
||||
emit mList->lSetAggregationFlag(flag);
|
||||
}
|
||||
}
|
||||
|
||||
bool MagicSearchProxy::lessThan(const QModelIndex &left, const QModelIndex &right) const {
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ signals:
|
|||
|
||||
protected:
|
||||
QString mSearchText;
|
||||
int mSourceFlags;
|
||||
LinphoneEnums::MagicSearchAggregation mAggregationFlag;
|
||||
QSharedPointer<MagicSearchList> mList;
|
||||
virtual bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,18 +27,18 @@
|
|||
#include <QUrl>
|
||||
#include <QVariant>
|
||||
|
||||
DEFINE_ABSTRACT_OBJECT(Settings)
|
||||
DEFINE_ABSTRACT_OBJECT(SettingsCore)
|
||||
|
||||
// =============================================================================
|
||||
|
||||
QSharedPointer<Settings> Settings::create() {
|
||||
auto sharedPointer = QSharedPointer<Settings>(new Settings(), &QObject::deleteLater);
|
||||
QSharedPointer<SettingsCore> SettingsCore::create() {
|
||||
auto sharedPointer = QSharedPointer<SettingsCore>(new SettingsCore(), &QObject::deleteLater);
|
||||
sharedPointer->setSelf(sharedPointer);
|
||||
sharedPointer->moveToThread(App::getInstance()->thread());
|
||||
return sharedPointer;
|
||||
}
|
||||
|
||||
Settings::Settings(QObject *parent) : QObject(parent) {
|
||||
SettingsCore::SettingsCore(QObject *parent) : QObject(parent) {
|
||||
mustBeInLinphoneThread(getClassName());
|
||||
mSettingsModel = Utils::makeQObject_ptr<SettingsModel>();
|
||||
|
||||
|
|
@ -93,16 +93,16 @@ Settings::Settings(QObject *parent) : QObject(parent) {
|
|||
INIT_CORE_MEMBER(AutoStart, mSettingsModel)
|
||||
}
|
||||
|
||||
Settings::~Settings() {
|
||||
SettingsCore::~SettingsCore() {
|
||||
}
|
||||
|
||||
void Settings::setSelf(QSharedPointer<Settings> me) {
|
||||
void SettingsCore::setSelf(QSharedPointer<SettingsCore> me) {
|
||||
mustBeInLinphoneThread(getClassName());
|
||||
mSettingsModelConnection = QSharedPointer<SafeConnection<Settings, SettingsModel>>(
|
||||
new SafeConnection<Settings, SettingsModel>(me, mSettingsModel), &QObject::deleteLater);
|
||||
mSettingsModelConnection = QSharedPointer<SafeConnection<SettingsCore, SettingsModel>>(
|
||||
new SafeConnection<SettingsCore, SettingsModel>(me, mSettingsModel), &QObject::deleteLater);
|
||||
|
||||
// VFS
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::setVfsEnabled, [this](const bool enabled) {
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::setVfsEnabled, [this](const bool enabled) {
|
||||
mSettingsModelConnection->invokeToModel([this, enabled]() { mSettingsModel->setVfsEnabled(enabled); });
|
||||
});
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
|
||||
// Video Calls
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::setVideoEnabled, [this](const bool enabled) {
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::setVideoEnabled, [this](const bool enabled) {
|
||||
mSettingsModelConnection->invokeToModel([this, enabled]() { mSettingsModel->setVideoEnabled(enabled); });
|
||||
});
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
|
||||
// Echo cancelling
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::setEchoCancellationEnabled, [this](const bool enabled) {
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::setEchoCancellationEnabled, [this](const bool enabled) {
|
||||
mSettingsModelConnection->invokeToModel(
|
||||
[this, enabled]() { mSettingsModel->setEchoCancellationEnabled(enabled); });
|
||||
});
|
||||
|
|
@ -140,7 +140,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
|
||||
// Auto recording
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::setAutomaticallyRecordCallsEnabled,
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::setAutomaticallyRecordCallsEnabled,
|
||||
[this](const bool enabled) {
|
||||
mSettingsModelConnection->invokeToModel([this, enabled]() {
|
||||
mSettingsModel->setAutomaticallyRecordCallsEnabled(enabled);
|
||||
|
|
@ -155,7 +155,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
|
||||
// Audio device(s)
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::lSetCaptureDevice, [this](const QString id) {
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::lSetCaptureDevice, [this](const QString id) {
|
||||
mSettingsModelConnection->invokeToModel([this, id]() { mSettingsModel->setCaptureDevice(id); });
|
||||
});
|
||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::captureDeviceChanged, [this](const QString device) {
|
||||
|
|
@ -165,7 +165,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
});
|
||||
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::lSetPlaybackDevice, [this](const QString id) {
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::lSetPlaybackDevice, [this](const QString id) {
|
||||
mSettingsModelConnection->invokeToModel([this, id]() { mSettingsModel->setPlaybackDevice(id); });
|
||||
});
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
});
|
||||
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::lSetPlaybackGain, [this](const float value) {
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::lSetPlaybackGain, [this](const float value) {
|
||||
mSettingsModelConnection->invokeToModel([this, value]() { mSettingsModel->setPlaybackGain(value); });
|
||||
});
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
});
|
||||
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::lSetCaptureGain, [this](const float value) {
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::lSetCaptureGain, [this](const float value) {
|
||||
mSettingsModelConnection->invokeToModel([this, value]() { mSettingsModel->setCaptureGain(value); });
|
||||
});
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
|
||||
// Video device(s)
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::lSetVideoDevice, [this](const QString id) {
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::lSetVideoDevice, [this](const QString id) {
|
||||
mSettingsModelConnection->invokeToModel([this, id]() { mSettingsModel->setVideoDevice(id); });
|
||||
});
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
|
||||
// Logs
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::setLogsEnabled, [this](const bool status) {
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::setLogsEnabled, [this](const bool status) {
|
||||
mSettingsModelConnection->invokeToModel([this, status]() { mSettingsModel->setLogsEnabled(status); });
|
||||
});
|
||||
|
||||
|
|
@ -250,7 +250,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
});
|
||||
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::setFullLogsEnabled, [this](const bool status) {
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::setFullLogsEnabled, [this](const bool status) {
|
||||
mSettingsModelConnection->invokeToModel([this, status]() { mSettingsModel->setFullLogsEnabled(status); });
|
||||
});
|
||||
|
||||
|
|
@ -262,7 +262,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
|
||||
// DND
|
||||
mSettingsModelConnection->makeConnectToCore(&Settings::lEnableDnd, [this](const bool value) {
|
||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::lEnableDnd, [this](const bool value) {
|
||||
mSettingsModelConnection->invokeToModel([this, value]() { mSettingsModel->enableDnd(value); });
|
||||
});
|
||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::dndChanged, [this](const bool value) {
|
||||
|
|
@ -272,44 +272,44 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
});
|
||||
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
disableChatFeature, DisableChatFeature)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
disableMeetingsFeature, DisableMeetingsFeature)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
disableBroadcastFeature, DisableBroadcastFeature)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool, hideSettings,
|
||||
HideSettings)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
hideSettings, HideSettings)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
hideAccountSettings, HideAccountSettings)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
disableCallRecordings, DisableCallRecordings)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
assistantHideCreateAccount, AssistantHideCreateAccount)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
assistantHideCreateAccount, AssistantHideCreateAccount)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
assistantDisableQrCode, AssistantDisableQrCode)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
assistantHideThirdPartyAccount, AssistantHideThirdPartyAccount)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
onlyDisplaySipUriUsername, OnlyDisplaySipUriUsername)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool, darkModeAllowed,
|
||||
DarkModeAllowed)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, int, maxAccount,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
darkModeAllowed, DarkModeAllowed)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, int, maxAccount,
|
||||
MaxAccount)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool,
|
||||
assistantGoDirectlyToThirdPartySipAccountLogin,
|
||||
AssistantGoDirectlyToThirdPartySipAccountLogin)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, QString,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, QString,
|
||||
assistantThirdPartySipAccountDomain, AssistantThirdPartySipAccountDomain)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, QString,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, QString,
|
||||
assistantThirdPartySipAccountTransport, AssistantThirdPartySipAccountTransport)
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool, autoStart,
|
||||
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, SettingsCore, SettingsModel, mSettingsModel, bool, autoStart,
|
||||
AutoStart)
|
||||
|
||||
auto coreModelConnection = QSharedPointer<SafeConnection<Settings, CoreModel>>(
|
||||
new SafeConnection<Settings, CoreModel>(me, CoreModel::getInstance()), &QObject::deleteLater);
|
||||
auto coreModelConnection = QSharedPointer<SafeConnection<SettingsCore, CoreModel>>(
|
||||
new SafeConnection<SettingsCore, CoreModel>(me, CoreModel::getInstance()), &QObject::deleteLater);
|
||||
|
||||
coreModelConnection->makeConnectToModel(
|
||||
&CoreModel::logCollectionUploadStateChanged, [this](auto core, auto state, auto info) {
|
||||
|
|
@ -323,7 +323,7 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
|||
});
|
||||
}
|
||||
|
||||
QString Settings::getConfigPath(const QCommandLineParser &parser) {
|
||||
QString SettingsCore::getConfigPath(const QCommandLineParser &parser) {
|
||||
QString filePath = parser.isSet("config") ? parser.value("config") : "";
|
||||
QString configPath;
|
||||
if (!QUrl(filePath).isRelative()) {
|
||||
|
|
@ -335,52 +335,52 @@ QString Settings::getConfigPath(const QCommandLineParser &parser) {
|
|||
return configPath;
|
||||
}
|
||||
|
||||
QStringList Settings::getCaptureDevices() const {
|
||||
QStringList SettingsCore::getCaptureDevices() const {
|
||||
return mCaptureDevices;
|
||||
}
|
||||
|
||||
QStringList Settings::getPlaybackDevices() const {
|
||||
QStringList SettingsCore::getPlaybackDevices() const {
|
||||
return mPlaybackDevices;
|
||||
}
|
||||
|
||||
int Settings::getVideoDeviceIndex() const {
|
||||
int SettingsCore::getVideoDeviceIndex() const {
|
||||
return mVideoDevices.indexOf(mVideoDevice);
|
||||
}
|
||||
|
||||
QStringList Settings::getVideoDevices() const {
|
||||
QStringList SettingsCore::getVideoDevices() const {
|
||||
return mVideoDevices;
|
||||
}
|
||||
|
||||
bool Settings::getCaptureGraphRunning() {
|
||||
bool SettingsCore::getCaptureGraphRunning() {
|
||||
return mCaptureGraphRunning;
|
||||
}
|
||||
|
||||
float Settings::getCaptureGain() const {
|
||||
float SettingsCore::getCaptureGain() const {
|
||||
return mCaptureGain;
|
||||
}
|
||||
|
||||
float Settings::getPlaybackGain() const {
|
||||
float SettingsCore::getPlaybackGain() const {
|
||||
return mPlaybackGain;
|
||||
}
|
||||
|
||||
QString Settings::getCaptureDevice() const {
|
||||
QString SettingsCore::getCaptureDevice() const {
|
||||
return mCaptureDevice;
|
||||
}
|
||||
|
||||
QString Settings::getPlaybackDevice() const {
|
||||
QString SettingsCore::getPlaybackDevice() const {
|
||||
return mPlaybackDevice;
|
||||
}
|
||||
|
||||
int Settings::getEchoCancellationCalibration() const {
|
||||
int SettingsCore::getEchoCancellationCalibration() const {
|
||||
return mEchoCancellationCalibration;
|
||||
}
|
||||
|
||||
bool Settings::getFirstLaunch() const {
|
||||
bool SettingsCore::getFirstLaunch() const {
|
||||
auto val = mAppSettings.value("firstLaunch", 1).toInt();
|
||||
return val;
|
||||
}
|
||||
|
||||
void Settings::setFirstLaunch(bool first) {
|
||||
void SettingsCore::setFirstLaunch(bool first) {
|
||||
auto firstLaunch = getFirstLaunch();
|
||||
if (firstLaunch != first) {
|
||||
mAppSettings.setValue("firstLaunch", (int)first);
|
||||
|
|
@ -389,7 +389,7 @@ void Settings::setFirstLaunch(bool first) {
|
|||
}
|
||||
}
|
||||
|
||||
void Settings::setLastActiveTabIndex(int index) {
|
||||
void SettingsCore::setLastActiveTabIndex(int index) {
|
||||
auto lastActiveIndex = getLastActiveTabIndex();
|
||||
if (lastActiveIndex != index) {
|
||||
mAppSettings.setValue("lastActiveTabIndex", index);
|
||||
|
|
@ -398,11 +398,11 @@ void Settings::setLastActiveTabIndex(int index) {
|
|||
}
|
||||
}
|
||||
|
||||
int Settings::getLastActiveTabIndex() {
|
||||
int SettingsCore::getLastActiveTabIndex() {
|
||||
return mAppSettings.value("lastActiveTabIndex", 1).toInt();
|
||||
}
|
||||
|
||||
void Settings::setDisplayDeviceCheckConfirmation(bool display) {
|
||||
void SettingsCore::setDisplayDeviceCheckConfirmation(bool display) {
|
||||
if (getDisplayDeviceCheckConfirmation() != display) {
|
||||
mAppSettings.setValue("displayDeviceCheckConfirmation", display);
|
||||
mAppSettings.sync();
|
||||
|
|
@ -410,50 +410,50 @@ void Settings::setDisplayDeviceCheckConfirmation(bool display) {
|
|||
}
|
||||
}
|
||||
|
||||
bool Settings::getDisplayDeviceCheckConfirmation() const {
|
||||
bool SettingsCore::getDisplayDeviceCheckConfirmation() const {
|
||||
auto val = mAppSettings.value("displayDeviceCheckConfirmation", 1).toInt();
|
||||
return val;
|
||||
}
|
||||
|
||||
void Settings::startEchoCancellerCalibration() {
|
||||
void SettingsCore::startEchoCancellerCalibration() {
|
||||
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->startEchoCancellerCalibration(); });
|
||||
}
|
||||
|
||||
void Settings::accessCallSettings() {
|
||||
void SettingsCore::accessCallSettings() {
|
||||
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->accessCallSettings(); });
|
||||
}
|
||||
void Settings::closeCallSettings() {
|
||||
void SettingsCore::closeCallSettings() {
|
||||
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->closeCallSettings(); });
|
||||
}
|
||||
|
||||
void Settings::updateMicVolume() const {
|
||||
void SettingsCore::updateMicVolume() const {
|
||||
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->getMicVolume(); });
|
||||
}
|
||||
|
||||
bool Settings::getLogsEnabled() const {
|
||||
bool SettingsCore::getLogsEnabled() const {
|
||||
return mLogsEnabled;
|
||||
}
|
||||
|
||||
bool Settings::getFullLogsEnabled() const {
|
||||
bool SettingsCore::getFullLogsEnabled() const {
|
||||
return mFullLogsEnabled;
|
||||
}
|
||||
|
||||
void Settings::cleanLogs() const {
|
||||
void SettingsCore::cleanLogs() const {
|
||||
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->cleanLogs(); });
|
||||
}
|
||||
|
||||
void Settings::sendLogs() const {
|
||||
void SettingsCore::sendLogs() const {
|
||||
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->sendLogs(); });
|
||||
}
|
||||
|
||||
QString Settings::getLogsEmail() const {
|
||||
QString SettingsCore::getLogsEmail() const {
|
||||
return mLogsEmail;
|
||||
}
|
||||
|
||||
QString Settings::getLogsFolder() const {
|
||||
QString SettingsCore::getLogsFolder() const {
|
||||
return mLogsFolder;
|
||||
}
|
||||
|
||||
bool Settings::dndEnabled() const {
|
||||
bool SettingsCore::dndEnabled() const {
|
||||
return mDndEnabled;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SETTINGS_H_
|
||||
#define SETTINGS_H_
|
||||
#ifndef SETTINGS_CORE_H_
|
||||
#define SETTINGS_CORE_H_
|
||||
|
||||
#include "model/setting/SettingsModel.hpp"
|
||||
#include "tool/thread/SafeConnection.hpp"
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
#include <QSettings>
|
||||
#include <QVariantMap>
|
||||
|
||||
class Settings : public QObject, public AbstractObject {
|
||||
class SettingsCore : public QObject, public AbstractObject {
|
||||
Q_OBJECT
|
||||
|
||||
// Security
|
||||
|
|
@ -68,11 +68,11 @@ class Settings : public QObject, public AbstractObject {
|
|||
Q_PROPERTY(bool dnd READ dndEnabled WRITE lEnableDnd NOTIFY dndChanged)
|
||||
|
||||
public:
|
||||
static QSharedPointer<Settings> create();
|
||||
Settings(QObject *parent = Q_NULLPTR);
|
||||
virtual ~Settings();
|
||||
static QSharedPointer<SettingsCore> create();
|
||||
SettingsCore(QObject *parent = Q_NULLPTR);
|
||||
virtual ~SettingsCore();
|
||||
|
||||
void setSelf(QSharedPointer<Settings> me);
|
||||
void setSelf(QSharedPointer<SettingsCore> me);
|
||||
|
||||
QString getConfigPath(const QCommandLineParser &parser = QCommandLineParser());
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ private:
|
|||
bool mDndEnabled;
|
||||
|
||||
QSettings mAppSettings;
|
||||
QSharedPointer<SafeConnection<Settings, SettingsModel>> mSettingsModelConnection;
|
||||
QSharedPointer<SafeConnection<SettingsCore, SettingsModel>> mSettingsModelConnection;
|
||||
|
||||
DECLARE_ABSTRACT_OBJECT
|
||||
};
|
||||
|
|
|
|||
|
|
@ -58,6 +58,13 @@ void TimeZoneList::initTimeZones() {
|
|||
}
|
||||
}
|
||||
|
||||
QHash<int, QByteArray> TimeZoneList::roleNames() const {
|
||||
QHash<int, QByteArray> roles;
|
||||
roles[Qt::DisplayRole] = "$modelData";
|
||||
roles[Qt::DisplayRole + 1] = "$timeZoneModel";
|
||||
return roles;
|
||||
}
|
||||
|
||||
QVariant TimeZoneList::data(const QModelIndex &index, int role) const {
|
||||
int row = index.row();
|
||||
|
||||
|
|
@ -66,13 +73,17 @@ QVariant TimeZoneList::data(const QModelIndex &index, int role) const {
|
|||
if (!timeZoneModel) return QVariant();
|
||||
int offset = timeZoneModel->getStandardTimeOffset() / 3600;
|
||||
int absOffset = std::abs(offset);
|
||||
|
||||
return QStringLiteral("(GMT%1%2%3:00) %4 %5")
|
||||
.arg(offset >= 0 ? "+" : "-")
|
||||
.arg(absOffset < 10 ? "0" : "")
|
||||
.arg(absOffset)
|
||||
.arg(timeZoneModel->getCountryName())
|
||||
.arg(timeZoneModel->getTimeZone().comment().isEmpty() ? "" : (" - " + timeZoneModel->getTimeZone().comment()));
|
||||
if (role == Qt::DisplayRole + 1) {
|
||||
return QVariant::fromValue(new TimeZoneModel(timeZoneModel->getTimeZone()));
|
||||
} else {
|
||||
return QStringLiteral("(GMT%1%2%3:00) %4 %5")
|
||||
.arg(offset >= 0 ? "+" : "-")
|
||||
.arg(absOffset < 10 ? "0" : "")
|
||||
.arg(absOffset)
|
||||
.arg(timeZoneModel->getCountryName())
|
||||
.arg(timeZoneModel->getTimeZone().comment().isEmpty() ? ""
|
||||
: (" - " + timeZoneModel->getTimeZone().comment()));
|
||||
}
|
||||
}
|
||||
|
||||
int TimeZoneList::get(const QTimeZone &timeZone) const {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ public:
|
|||
void initTimeZones();
|
||||
int get(const QTimeZone &timeZone = QTimeZone::systemTimeZone()) const;
|
||||
|
||||
QHash<int, QByteArray> roleNames() const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ private:
|
|||
virtual void onAudioDeviceChanged(const std::shared_ptr<linphone::Call> &call,
|
||||
const std::shared_ptr<linphone::AudioDevice> &audioDevice) override;
|
||||
virtual void onRemoteRecording(const std::shared_ptr<linphone::Call> &call, bool recording) override;
|
||||
virtual void onAuthenticationTokenVerified(const std::shared_ptr<linphone::Call> &call, bool verified);
|
||||
virtual void onAuthenticationTokenVerified(const std::shared_ptr<linphone::Call> &call, bool verified) override;
|
||||
|
||||
signals:
|
||||
void dtmfReceived(const std::shared_ptr<linphone::Call> &call, int dtmf);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ void ConferenceInfoModel::setConferenceScheduler(const std::shared_ptr<Conferenc
|
|||
[this](linphone::ConferenceScheduler::State state) {
|
||||
if (state == linphone::ConferenceScheduler::State::Ready && mInviteEnabled) {
|
||||
auto params = CoreModel::getInstance()->getCore()->createDefaultChatRoomParams();
|
||||
mConferenceSchedulerModel->getMonitor()->sendInvitations(params);
|
||||
// TODO : wait for new sdk api to send the invitations again
|
||||
// mConferenceSchedulerModel->getMonitor()->sendInvitations(params);
|
||||
}
|
||||
emit schedulerStateChanged(state);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -128,13 +128,6 @@ bool ToolModel::createCall(const QString &sipAddress,
|
|||
}
|
||||
return false;
|
||||
}
|
||||
for (auto &account : core->getAccountList()) {
|
||||
if (account->getContactAddress() && account->getContactAddress()->weakEqual(address)) {
|
||||
if (errorMessage) *errorMessage = tr("The calling address is a connected account.");
|
||||
lDebug() << "[" + QString(gClassName) + "]" + *errorMessage;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (SettingsModel::dndEnabled(
|
||||
core->getConfig())) { // Force tones for outgoing calls when in DND mode (ringback, dtmf, etc ... ) disabled
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import EnumsToStringCpp 1.0
|
|||
import UtilsCpp 1.0
|
||||
import SettingsCpp 1.0
|
||||
import DesktopToolsCpp 1.0
|
||||
import LinphoneCallsCpp
|
||||
|
||||
AppWindow {
|
||||
id: mainWindow
|
||||
|
|
@ -24,7 +25,7 @@ AppWindow {
|
|||
property var transferState: call && call.core.transferState
|
||||
|
||||
onCallStateChanged: {
|
||||
if (callState === LinphoneEnums.CallState.Connected || callState === LinphoneEnums.CallState.StreamsRunning) {
|
||||
if (callState === LinphoneEnums.CallState.Connected) {
|
||||
if (middleItemStackView.currentItem.objectName != "inCallItem") {
|
||||
middleItemStackView.replace(inCallItem)
|
||||
bottomButtonsLayout.visible = true
|
||||
|
|
@ -613,6 +614,7 @@ AppWindow {
|
|||
closeButtonVisible: false
|
||||
roundedBottom: true
|
||||
visible: parent.visible
|
||||
currentCall: callsModel.currentCall
|
||||
leftPadding: 40 * DefaultStyle.dp
|
||||
rightPadding: 40 * DefaultStyle.dp
|
||||
topPadding: 41 * DefaultStyle.dp
|
||||
|
|
@ -743,7 +745,7 @@ AppWindow {
|
|||
Layout.maximumHeight: rightPanel.height
|
||||
visible: callList.contentHeight > 0
|
||||
leftPadding: 16 * DefaultStyle.dp
|
||||
rightPadding: 16 * DefaultStyle.dp
|
||||
rightPadding: 6 * DefaultStyle.dp
|
||||
topPadding: 15 * DefaultStyle.dp
|
||||
bottomPadding: 16 * DefaultStyle.dp
|
||||
|
||||
|
|
@ -754,7 +756,9 @@ AppWindow {
|
|||
|
||||
contentItem: ListView {
|
||||
id: callList
|
||||
model: callsModel
|
||||
model: CallProxy {
|
||||
id: callProxy
|
||||
}
|
||||
implicitHeight: contentHeight// Math.min(contentHeight, rightPanel.height)
|
||||
spacing: 15 * DefaultStyle.dp
|
||||
clip: true
|
||||
|
|
@ -800,6 +804,7 @@ AppWindow {
|
|||
id: listCallOptionsButton
|
||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||
Layout.rightMargin: 10 * DefaultStyle.dp
|
||||
|
||||
popup.contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import QtQuick.Effects
|
|||
import Linphone
|
||||
import UtilsCpp
|
||||
import SettingsCpp
|
||||
import LinphoneAccountsCpp
|
||||
|
||||
Item {
|
||||
id: mainItem
|
||||
|
|
@ -65,10 +66,11 @@ Item {
|
|||
openContextualMenuComponent(page)
|
||||
}
|
||||
|
||||
AccountProxy {
|
||||
AccountProxy {
|
||||
id: accountProxy
|
||||
onDefaultAccountChanged: if (tabbar.currentIndex === 0 && defaultAccount) defaultAccount.core.lResetMissedCalls()
|
||||
}
|
||||
|
||||
CallProxy {
|
||||
id: callsModel
|
||||
}
|
||||
|
|
@ -79,7 +81,7 @@ Item {
|
|||
id: currentCallNotif
|
||||
background: Item{}
|
||||
closePolicy: Control.Popup.NoAutoClose
|
||||
visible: currentCall
|
||||
visible: currentCall
|
||||
&& currentCall.core.state != LinphoneEnums.CallState.Idle
|
||||
&& currentCall.core.state != LinphoneEnums.CallState.IncomingReceived
|
||||
&& currentCall.core.state != LinphoneEnums.CallState.PushIncomingReceived
|
||||
|
|
@ -444,7 +446,6 @@ Item {
|
|||
popup.contentItem: ColumnLayout {
|
||||
Accounts {
|
||||
id: accounts
|
||||
accountProxy: accountProxy
|
||||
onAddAccountRequest: mainItem.addAccountRequest()
|
||||
onEditAccount: function(account) {
|
||||
avatarButton.popup.close()
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import QtQuick.Controls
|
|||
import Linphone
|
||||
import UtilsCpp 1.0
|
||||
import SettingsCpp 1.0
|
||||
import LinphoneAccountsCpp
|
||||
|
||||
AppWindow {
|
||||
id: mainWindow
|
||||
|
|
@ -62,9 +63,11 @@ AppWindow {
|
|||
}
|
||||
}
|
||||
|
||||
AccountProxy {
|
||||
AccountProxy {
|
||||
id: accountProxy
|
||||
onInitialized: initStackViewItem()
|
||||
}
|
||||
|
||||
StackView {
|
||||
id: mainWindowStackView
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import QtQuick.Dialogs
|
|||
import Linphone
|
||||
import UtilsCpp
|
||||
import SettingsCpp
|
||||
import LinphoneAccountsCpp
|
||||
|
||||
Item {
|
||||
id: mainItem
|
||||
|
|
@ -16,7 +17,7 @@ Item {
|
|||
readonly property int leftPadding: 32 * DefaultStyle.dp
|
||||
readonly property int rightPadding: 32 * DefaultStyle.dp
|
||||
readonly property int spacing: 16 * DefaultStyle.dp
|
||||
property AccountProxy accountProxy
|
||||
property AccountProxy accountProxy
|
||||
|
||||
signal addAccountRequest()
|
||||
signal editAccount(AccountGui account)
|
||||
|
|
@ -37,7 +38,7 @@ Item {
|
|||
Layout.preferredHeight: contentHeight
|
||||
Layout.fillWidth: true
|
||||
spacing: mainItem.spacing
|
||||
model: mainItem.accountProxy
|
||||
model: LinphoneAccountsCpp
|
||||
delegate: Contact{
|
||||
id: contactItem
|
||||
width: list.width
|
||||
|
|
|
|||
|
|
@ -62,8 +62,10 @@ FocusScope {
|
|||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
width: parent.width
|
||||
spacing: 32 * DefaultStyle.dp
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 39 * DefaultStyle.dp
|
||||
Button {
|
||||
id: grouCallButton
|
||||
visible: mainItem.groupCallVisible && !SettingsCpp.disableMeetingsFeature
|
||||
|
|
@ -111,7 +113,6 @@ FocusScope {
|
|||
}
|
||||
ColumnLayout {
|
||||
spacing: 18 * DefaultStyle.dp
|
||||
Layout.rightMargin: 39 * DefaultStyle.dp
|
||||
Text {
|
||||
text: qsTr("All contacts")
|
||||
font {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import QtQuick.Effects
|
|||
import QtQuick.Controls as Control
|
||||
import Linphone
|
||||
import UtilsCpp 1.0
|
||||
import LinphoneAccountsCpp
|
||||
|
||||
RowLayout {
|
||||
id: mainItem
|
||||
|
|
@ -29,7 +30,7 @@ RowLayout {
|
|||
displayAll: false
|
||||
displayPresence: false
|
||||
mutedStatus: microButton.checked
|
||||
AccountProxy{
|
||||
AccountProxy {
|
||||
id: accounts
|
||||
}
|
||||
account: accounts.findAccountByAddress(mainItem.localAddress)
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ Control.ComboBox {
|
|||
visible: source != ""
|
||||
width: visible ? 20 * DefaultStyle.dp : 0
|
||||
sourceSize.width: 20 * DefaultStyle.dp
|
||||
source: modelData && modelData.img ? modelData.img : ""
|
||||
source: typeof(modelData) != "undefined" && modelData.img ? modelData.img : ""
|
||||
fillMode: Image.PreserveAspectFit
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: visible ? 10 * DefaultStyle.dp : 0
|
||||
|
|
@ -181,11 +181,13 @@ Control.ComboBox {
|
|||
}
|
||||
|
||||
Text {
|
||||
text: modelData
|
||||
text: typeof(modelData) != "undefined"
|
||||
? modelData.text
|
||||
? modelData.text
|
||||
: modelData
|
||||
: ""
|
||||
: $modelData
|
||||
? $modelData
|
||||
: ""
|
||||
elide: Text.ElideRight
|
||||
maximumLineCount: 1
|
||||
wrapMode: Text.WrapAnywhere
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ RightPanelLayout {
|
|||
}
|
||||
TextField {
|
||||
id: addressTextField
|
||||
onTextEdited: {
|
||||
onEditingFinished: {
|
||||
if (text.length != 0) mainItem.contact.core.setAddressAt(index, qsTr("Adresse SIP"), text)
|
||||
}
|
||||
property string _initialText: modelData.address
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ ListView {
|
|||
RowLayout {
|
||||
id: contactDelegate
|
||||
anchors.left: initial.visible ? initial.right : parent.left
|
||||
anchors.right: actionsRow.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
z: 1
|
||||
|
|
@ -162,127 +162,128 @@ ListView {
|
|||
function onSelectedContactCountChanged(){ isSelectedCheck.visible = (mainItem.selectedContacts.indexOf(modelData.core.defaultAddress) != -1)}
|
||||
}
|
||||
}
|
||||
Item{Layout.fillWidth: true}
|
||||
RowLayout {
|
||||
id: actionsRow
|
||||
z: 1
|
||||
// anchors.right: parent.right
|
||||
Layout.rightMargin: 5 * DefaultStyle.dp
|
||||
// anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 10 * DefaultStyle.dp // TODO : change when mockup ready
|
||||
RowLayout{
|
||||
id: actionButtons
|
||||
visible: mainItem.actionLayoutVisible
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
Button {
|
||||
id: callButton
|
||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||
icon.width: 24 * DefaultStyle.dp
|
||||
icon.height: 24 * DefaultStyle.dp
|
||||
icon.source: AppIcons.phone
|
||||
focus: visible
|
||||
contentImageColor: DefaultStyle.main2_500main
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: 40 * DefaultStyle.dp
|
||||
color: DefaultStyle.main2_200
|
||||
}
|
||||
onClicked: UtilsCpp.createCall(modelData.core.defaultAddress)
|
||||
KeyNavigation.right: chatButton
|
||||
KeyNavigation.left: chatButton
|
||||
}
|
||||
Button {
|
||||
id: chatButton
|
||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||
icon.width: 24 * DefaultStyle.dp
|
||||
icon.height: 24 * DefaultStyle.dp
|
||||
icon.source: AppIcons.chatTeardropText
|
||||
focus: visible && !callButton.visible
|
||||
contentImageColor: DefaultStyle.main2_500main
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: 40 * DefaultStyle.dp
|
||||
color: DefaultStyle.main2_200
|
||||
}
|
||||
KeyNavigation.right: callButton
|
||||
KeyNavigation.left: callButton
|
||||
}
|
||||
}
|
||||
PopupButton {
|
||||
id: friendPopup
|
||||
z: 1
|
||||
// Layout.rightMargin: 13 * DefaultStyle.dp
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
popup.x: 0
|
||||
popup.padding: 10 * DefaultStyle.dp
|
||||
hoverEnabled: mainItem.hoverEnabled
|
||||
visible: mainItem.contactMenuVisible && (contactArea.containsMouse || hovered || popup.opened) && (!mainItem.delegateButtons || mainItem.delegateButtons.length === 0)
|
||||
|
||||
popup.contentItem: ColumnLayout {
|
||||
Button {
|
||||
text: modelData.core.starred ? qsTr("Enlever des favoris") : qsTr("Mettre en favori")
|
||||
background: Item{}
|
||||
icon.source: modelData.core.starred ? AppIcons.heartFill : AppIcons.heart
|
||||
icon.width: 24 * DefaultStyle.dp
|
||||
icon.height: 24 * DefaultStyle.dp
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
textSize: 14 * DefaultStyle.dp
|
||||
textWeight: 400 * DefaultStyle.dp
|
||||
textColor: DefaultStyle.main2_500main
|
||||
contentImageColor: modelData.core.starred ? DefaultStyle.danger_500main : DefaultStyle.main2_600
|
||||
onClicked: {
|
||||
modelData.core.lSetStarred(!modelData.core.starred)
|
||||
friendPopup.close()
|
||||
}
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Partager")
|
||||
background: Item{}
|
||||
icon.source: AppIcons.shareNetwork
|
||||
icon.width: 24 * DefaultStyle.dp
|
||||
icon.height: 24 * DefaultStyle.dp
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
textSize: 14 * DefaultStyle.dp
|
||||
textWeight: 400 * DefaultStyle.dp
|
||||
textColor: DefaultStyle.main2_500main
|
||||
onClicked: {
|
||||
var vcard = modelData.core.getVCard()
|
||||
var username = modelData.core.givenName + modelData.core.familyName
|
||||
var filepath = UtilsCpp.createVCardFile(username, vcard)
|
||||
if (filepath == "") UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La création du fichier vcard a échoué"), false)
|
||||
else mainWindow.showInformationPopup(qsTr("VCard créée"), qsTr("VCard du contact enregistrée dans %1").arg(filepath))
|
||||
UtilsCpp.shareByEmail(qsTr("Partage de contact"), vcard, filepath)
|
||||
}
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Supprimer")
|
||||
background: Item{}
|
||||
icon.source: AppIcons.trashCan
|
||||
icon.width: 24 * DefaultStyle.dp
|
||||
icon.height: 24 * DefaultStyle.dp
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
textSize: 14 * DefaultStyle.dp
|
||||
textWeight: 400 * DefaultStyle.dp
|
||||
textColor: DefaultStyle.danger_500main
|
||||
contentImageColor: DefaultStyle.danger_500main
|
||||
onClicked: {
|
||||
mainItem.contactDeletionRequested(modelData)
|
||||
friendPopup.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: actionsRow
|
||||
z: 1
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 5 * DefaultStyle.dp
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 10 * DefaultStyle.dp // TODO : change when mockup ready
|
||||
RowLayout{
|
||||
id: actionButtons
|
||||
visible: mainItem.actionLayoutVisible
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
Button {
|
||||
id: callButton
|
||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||
icon.width: 24 * DefaultStyle.dp
|
||||
icon.height: 24 * DefaultStyle.dp
|
||||
icon.source: AppIcons.phone
|
||||
focus: visible
|
||||
contentImageColor: DefaultStyle.main2_500main
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: 40 * DefaultStyle.dp
|
||||
color: DefaultStyle.main2_200
|
||||
}
|
||||
onClicked: UtilsCpp.createCall(modelData.core.defaultAddress)
|
||||
KeyNavigation.right: chatButton
|
||||
KeyNavigation.left: chatButton
|
||||
}
|
||||
Button {
|
||||
id: chatButton
|
||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||
icon.width: 24 * DefaultStyle.dp
|
||||
icon.height: 24 * DefaultStyle.dp
|
||||
icon.source: AppIcons.chatTeardropText
|
||||
focus: visible && !callButton.visible
|
||||
contentImageColor: DefaultStyle.main2_500main
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: 40 * DefaultStyle.dp
|
||||
color: DefaultStyle.main2_200
|
||||
}
|
||||
KeyNavigation.right: callButton
|
||||
KeyNavigation.left: callButton
|
||||
}
|
||||
}
|
||||
PopupButton {
|
||||
id: friendPopup
|
||||
z: 1
|
||||
// Layout.rightMargin: 13 * DefaultStyle.dp
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
popup.x: 0
|
||||
popup.padding: 10 * DefaultStyle.dp
|
||||
hoverEnabled: mainItem.hoverEnabled
|
||||
visible: mainItem.contactMenuVisible && (contactArea.containsMouse || hovered || popup.opened) && (!mainItem.delegateButtons || mainItem.delegateButtons.length === 0)
|
||||
|
||||
popup.contentItem: ColumnLayout {
|
||||
Button {
|
||||
text: modelData.core.starred ? qsTr("Enlever des favoris") : qsTr("Mettre en favori")
|
||||
background: Item{}
|
||||
icon.source: modelData.core.starred ? AppIcons.heartFill : AppIcons.heart
|
||||
icon.width: 24 * DefaultStyle.dp
|
||||
icon.height: 24 * DefaultStyle.dp
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
textSize: 14 * DefaultStyle.dp
|
||||
textWeight: 400 * DefaultStyle.dp
|
||||
textColor: DefaultStyle.main2_500main
|
||||
contentImageColor: modelData.core.starred ? DefaultStyle.danger_500main : DefaultStyle.main2_600
|
||||
onClicked: {
|
||||
modelData.core.lSetStarred(!modelData.core.starred)
|
||||
friendPopup.close()
|
||||
}
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Partager")
|
||||
background: Item{}
|
||||
icon.source: AppIcons.shareNetwork
|
||||
icon.width: 24 * DefaultStyle.dp
|
||||
icon.height: 24 * DefaultStyle.dp
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
textSize: 14 * DefaultStyle.dp
|
||||
textWeight: 400 * DefaultStyle.dp
|
||||
textColor: DefaultStyle.main2_500main
|
||||
onClicked: {
|
||||
var vcard = modelData.core.getVCard()
|
||||
var username = modelData.core.givenName + modelData.core.familyName
|
||||
var filepath = UtilsCpp.createVCardFile(username, vcard)
|
||||
if (filepath == "") UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La création du fichier vcard a échoué"), false)
|
||||
else mainWindow.showInformationPopup(qsTr("VCard créée"), qsTr("VCard du contact enregistrée dans %1").arg(filepath))
|
||||
UtilsCpp.shareByEmail(qsTr("Partage de contact"), vcard, filepath)
|
||||
}
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Supprimer")
|
||||
background: Item{}
|
||||
icon.source: AppIcons.trashCan
|
||||
icon.width: 24 * DefaultStyle.dp
|
||||
icon.height: 24 * DefaultStyle.dp
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
textSize: 14 * DefaultStyle.dp
|
||||
textWeight: 400 * DefaultStyle.dp
|
||||
textColor: DefaultStyle.danger_500main
|
||||
contentImageColor: DefaultStyle.danger_500main
|
||||
onClicked: {
|
||||
mainItem.contactDeletionRequested(modelData)
|
||||
friendPopup.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MouseArea {
|
||||
id: contactArea
|
||||
enabled: mainItem.selectionEnabled
|
||||
hoverEnabled: mainItem.hoverEnabled
|
||||
anchors.fill: itemDelegate
|
||||
anchors.fill: contactDelegate
|
||||
height: mainItem.height
|
||||
acceptedButtons: Qt.AllButtons
|
||||
z: -1
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ Item {
|
|||
}
|
||||
ColumnLayout {
|
||||
spacing: 0
|
||||
visible: mainItem.displayAll && !mainItem.remoteIsPaused
|
||||
visible: mainItem.displayAll && !mainItem.remoteIsPaused && !mainItem.conference
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: centerItem.bottom
|
||||
anchors.topMargin: 21 * DefaultStyle.dp
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ Popup {
|
|||
signal rejected()
|
||||
|
||||
contentItem: FocusScope {
|
||||
width: child.implicitWidth
|
||||
height: child.implicitHeight
|
||||
implicitWidth: child.implicitWidth
|
||||
implicitHeight: child.implicitHeight
|
||||
onVisibleChanged: {
|
||||
if(visible) forceActiveFocus()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ Notification {
|
|||
imageHeight: 32 * DefaultStyle.dp
|
||||
}
|
||||
onClicked: {
|
||||
mainItem.call.core.lAccept(false)
|
||||
UtilsCpp.openCallsWindow(mainItem.call)
|
||||
mainItem.call.core.lAccept(false)
|
||||
}
|
||||
}
|
||||
Button {
|
||||
|
|
|
|||
|
|
@ -4,27 +4,27 @@ import QtQuick.Layouts as Layout
|
|||
import QtQuick.Effects
|
||||
import Linphone
|
||||
import UtilsCpp
|
||||
|
||||
import LinphoneCallsCpp
|
||||
|
||||
Control.Popup {
|
||||
id: mainItem
|
||||
property bool closeButtonVisible: true
|
||||
property bool roundedBottom: false
|
||||
closePolicy: Control.Popup.CloseOnEscape
|
||||
leftPadding: 72 * DefaultStyle.dp
|
||||
rightPadding: 72 * DefaultStyle.dp
|
||||
topPadding: 41 * DefaultStyle.dp
|
||||
bottomPadding: 18 * DefaultStyle.dp
|
||||
onOpened: numPad.forceActiveFocus()
|
||||
signal buttonPressed(string text)
|
||||
property bool closeButtonVisible: true
|
||||
property bool roundedBottom: false
|
||||
property var currentCall
|
||||
onButtonPressed: (text) => {
|
||||
if (callsModel.currentCall) callsModel.currentCall.core.lSendDtmf(text)
|
||||
if (currentCall) currentCall.core.lSendDtmf(text)
|
||||
else UtilsCpp.playDtmf(text)
|
||||
}
|
||||
onOpened: numPad.forceActiveFocus()
|
||||
signal buttonPressed(string text)
|
||||
signal launchCall()
|
||||
signal wipe()
|
||||
CallProxy{
|
||||
id: callsModel
|
||||
}
|
||||
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
Rectangle {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import Linphone
|
|||
import EnumsToStringCpp 1.0
|
||||
import UtilsCpp 1.0
|
||||
import SettingsCpp 1.0
|
||||
import LinphoneAccountsCpp
|
||||
// =============================================================================
|
||||
|
||||
Item{
|
||||
|
|
@ -111,6 +112,7 @@ Item{
|
|||
call: mainItem.call
|
||||
width: mainStackView.width
|
||||
height: mainStackView.height
|
||||
displayAll: !mainItem.conference
|
||||
participantDevice: mainItem.conference && mainItem.conference.core.activeSpeaker
|
||||
property var address: participantDevice && participantDevice.core.address
|
||||
videoEnabled: (participantDevice && participantDevice.core.videoEnabled) || (!participantDevice && call && call.core.remoteVideoEnabled)
|
||||
|
|
@ -168,7 +170,8 @@ Item{
|
|||
anchors.bottomMargin: 10 * DefaultStyle.dp
|
||||
videoEnabled: preview.visible && mainItem.call && mainItem.call.core.localVideoEnabled
|
||||
onVideoEnabledChanged: console.log("P : " +videoEnabled + " / " +visible +" / " +mainItem.call)
|
||||
property AccountProxy accounts: AccountProxy{id: accountProxy}
|
||||
property AccountProxy accounts: AccountProxy {id: accountProxy
|
||||
}
|
||||
account: accountProxy.findAccountByAddress(mainItem.localAddress)
|
||||
call: mainItem.call
|
||||
displayAll: false
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import QtQuick.Layouts
|
|||
import QtQml.Models
|
||||
|
||||
import Linphone
|
||||
import LinphoneAccountsCpp
|
||||
|
||||
// =============================================================================
|
||||
|
||||
|
|
@ -22,7 +23,8 @@ Mosaic {
|
|||
qmlName: "G"
|
||||
Component.onCompleted: console.log("Loaded : " +allDevices + " = " +allDevices.count)
|
||||
}
|
||||
property AccountProxy accounts: AccountProxy{id: accountProxy}
|
||||
property AccountProxy accounts: AccountProxy {id: accountProxy
|
||||
}
|
||||
model: grid.call && grid.call.core.isConference ? participantDevices: [0,1]
|
||||
delegate: Item{
|
||||
id: avatarCell
|
||||
|
|
|
|||
|
|
@ -5,11 +5,12 @@ import QtQuick.Controls as Control
|
|||
import Linphone
|
||||
import UtilsCpp 1.0
|
||||
import SettingsCpp 1.0
|
||||
import LinphoneAccountsCpp
|
||||
|
||||
AbstractMasterDetailPage {
|
||||
layoutsPath: "qrc:/Linphone/view/App/Layout/Account"
|
||||
titleText: qsTr("Mon compte")
|
||||
property AccountProxy accounts: AccountProxy{id: accountProxy}
|
||||
property AccountProxy accounts: AccountProxy {id: accountProxy}
|
||||
property AccountGui account: accountProxy.defaultAccount
|
||||
signal accountRemoved()
|
||||
families: [
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import QtQuick.Controls as Control
|
|||
import Linphone
|
||||
import UtilsCpp
|
||||
import SettingsCpp
|
||||
import LinphoneAccountsCpp
|
||||
|
||||
AbstractMainPage {
|
||||
id: mainItem
|
||||
|
|
@ -17,7 +18,7 @@ AbstractMainPage {
|
|||
|
||||
//Group call properties
|
||||
property ConferenceInfoGui confInfoGui
|
||||
property AccountProxy accounts: AccountProxy{id: accountProxy}
|
||||
property AccountProxy accounts: AccountProxy {id: accountProxy}
|
||||
property AccountGui account: accountProxy.defaultAccount
|
||||
property var state: account && account.core.registrationState || 0
|
||||
property bool isRegistered: account ? account.core.registrationState == LinphoneEnums.RegistrationState.Ok : false
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ AbstractMainPage {
|
|||
spacing: 0
|
||||
RowLayout {
|
||||
enabled: mainItem.leftPanelEnabled
|
||||
Layout.rightMargin: 39 * DefaultStyle.dp
|
||||
Layout.rightMargin: 38 * DefaultStyle.dp
|
||||
spacing: 0
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -163,7 +163,7 @@ AbstractMainPage {
|
|||
id: searchBar
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 18 * DefaultStyle.dp
|
||||
Layout.rightMargin: 39 * DefaultStyle.dp
|
||||
Layout.rightMargin: 38 * DefaultStyle.dp
|
||||
placeholderText: qsTr("Rechercher une réunion")
|
||||
KeyNavigation.up: conferenceList
|
||||
KeyNavigation.down: conferenceList
|
||||
|
|
@ -231,9 +231,8 @@ AbstractMainPage {
|
|||
property bool isCreation
|
||||
ColumnLayout {
|
||||
spacing: 33 * DefaultStyle.dp
|
||||
|
||||
anchors.fill: parent
|
||||
RowLayout {
|
||||
width: 320 * DefaultStyle.dp
|
||||
Layout.rightMargin: 35 * DefaultStyle.dp
|
||||
spacing: 5 * DefaultStyle.dp
|
||||
Button {
|
||||
|
|
@ -263,6 +262,7 @@ AbstractMainPage {
|
|||
}
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Item {Layout.fillWidth: true}
|
||||
Button {
|
||||
id: createButton
|
||||
Layout.preferredWidth: 57 * DefaultStyle.dp
|
||||
|
|
@ -317,6 +317,10 @@ AbstractMainPage {
|
|||
}
|
||||
createConfLayout.enabled = meetingSetup.conferenceInfoGui.core.schedulerState != LinphoneEnums.ConferenceSchedulerState.AllocationPending
|
||||
}
|
||||
function onSaveFailed() {
|
||||
var mainWin = UtilsCpp.getMainWindow()
|
||||
mainWin.closeLoadingPopup()
|
||||
}
|
||||
}
|
||||
onSaveSucceed: {
|
||||
leftPanelStackView.pop()
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@ import QtQuick.Layouts 1.0
|
|||
import QtQuick.Controls as Control
|
||||
import Linphone
|
||||
import UtilsCpp 1.0
|
||||
import LinphoneAccountsCpp
|
||||
|
||||
// Snippet
|
||||
|
||||
ListView{
|
||||
id: mainItem
|
||||
model: AccountProxy{}
|
||||
model: AccountProxy {}
|
||||
function printObject(o) {
|
||||
var out = '';
|
||||
for (var p in o) {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import QtQuick.Layouts 1.0
|
|||
import QtQuick.Controls as Control
|
||||
import Linphone
|
||||
import UtilsCpp 1.0
|
||||
import LinphoneAccountsCpp
|
||||
import LinphoneCallsCpp
|
||||
|
||||
// Snippet
|
||||
Window {
|
||||
|
|
@ -21,7 +23,6 @@ Window {
|
|||
onCallChanged: console.log('New Call:' +call)
|
||||
onClosing: {
|
||||
accountStatus.defaultAccount = accountStatus
|
||||
accountLayout.accounts = null
|
||||
gc()
|
||||
}
|
||||
Component.onDestruction: gc()
|
||||
|
|
@ -39,8 +40,8 @@ Window {
|
|||
ListView{
|
||||
id: callList
|
||||
anchors.fill: parent
|
||||
model: CallProxy{
|
||||
id: callsModel
|
||||
model: CallProxy {
|
||||
id: callProxy
|
||||
onCountChanged: console.log("count:"+count)
|
||||
}
|
||||
delegate: RectangleTest{
|
||||
|
|
@ -57,7 +58,7 @@ Window {
|
|||
anchors.fill: parent
|
||||
onClicked: {
|
||||
//modelData.core.lSetPaused(false)
|
||||
callsModel.currentCall = modelData
|
||||
callProxy.currentCall = modelData
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -69,7 +70,7 @@ Window {
|
|||
RowLayout {
|
||||
id: accountLayout
|
||||
Layout.fillWidth: true
|
||||
property AccountProxy accounts: AccountProxy{id: accountProxy}
|
||||
property AccountProxy accounts: AccountProxy {id: accountProxy}
|
||||
property var haveAccountVar: UtilsCpp.haveAccount()
|
||||
property var haveAccount: haveAccountVar ? haveAccountVar.value : false
|
||||
onHaveAccountChanged: {
|
||||
|
|
@ -87,7 +88,7 @@ Window {
|
|||
ListView{
|
||||
id: accountList
|
||||
Layout.fillHeight: true
|
||||
model: AccountProxy{}
|
||||
model: AccountProxy {}
|
||||
delegate:Rectangle{
|
||||
color: "#11111111"
|
||||
height: 20
|
||||
|
|
|
|||
2
external/linphone-sdk
vendored
2
external/linphone-sdk
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 09ec61ae54e4f972ac00bf5b20dd48e4aad867b1
|
||||
Subproject commit 7f93384a7206b754c1f550751a633ab1e8fee076
|
||||
Loading…
Add table
Reference in a new issue