fix #LINQT-1282 autocomplete contact address
fix #LINQT-1285 fix call notif deletion fix #LINQT-1283 : reset views when switching tab or creating new call fix #LINQT-1287 pause logo on pause fix #LINQT-1281 clear vertical tabbar index if in settings
This commit is contained in:
parent
a66528326f
commit
498777869e
18 changed files with 113 additions and 81 deletions
|
|
@ -298,6 +298,8 @@ void App::setSelf(QSharedPointer<App>(me)) {
|
||||||
auto callGui = new CallGui(callCore);
|
auto callGui = new CallGui(callCore);
|
||||||
auto win = getCallsWindow(QVariant::fromValue(callGui));
|
auto win = getCallsWindow(QVariant::fromValue(callGui));
|
||||||
Utils::smartShowWindow(win);
|
Utils::smartShowWindow(win);
|
||||||
|
auto mainwin = getMainWindow();
|
||||||
|
QMetaObject::invokeMethod(mainwin, "callCreated");
|
||||||
lDebug() << "App : call created" << callGui;
|
lDebug() << "App : call created" << callGui;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
#include "CallHistoryCore.hpp"
|
#include "CallHistoryCore.hpp"
|
||||||
#include "core/App.hpp"
|
#include "core/App.hpp"
|
||||||
#include "core/conference/ConferenceInfoCore.hpp"
|
#include "core/conference/ConferenceInfoCore.hpp"
|
||||||
|
#include "core/friend/FriendGui.hpp"
|
||||||
#include "model/call-history/CallHistoryModel.hpp"
|
#include "model/call-history/CallHistoryModel.hpp"
|
||||||
#include "model/object/VariantObject.hpp"
|
#include "model/object/VariantObject.hpp"
|
||||||
#include "model/tool/ToolModel.hpp"
|
#include "model/tool/ToolModel.hpp"
|
||||||
|
|
@ -61,6 +62,11 @@ CallHistoryCore::CallHistoryCore(const std::shared_ptr<linphone::CallLog> &callL
|
||||||
} else {
|
} else {
|
||||||
mRemoteAddress = Utils::coreStringToAppString(addr->asStringUriOnly());
|
mRemoteAddress = Utils::coreStringToAppString(addr->asStringUriOnly());
|
||||||
mDisplayName = ToolModel::getDisplayName(Utils::coreStringToAppString(addr->asStringUriOnly()));
|
mDisplayName = ToolModel::getDisplayName(Utils::coreStringToAppString(addr->asStringUriOnly()));
|
||||||
|
auto inFriend = Utils::findFriendByAddress(mRemoteAddress);
|
||||||
|
if (inFriend) {
|
||||||
|
auto friendGui = inFriend->getValue().value<FriendGui *>();
|
||||||
|
if (friendGui) mDisplayName = friendGui->getCore()->getDisplayName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -373,11 +373,12 @@ void FriendCore::removeAddress(int index) {
|
||||||
|
|
||||||
void FriendCore::appendAddress(const QString &addr) {
|
void FriendCore::appendAddress(const QString &addr) {
|
||||||
if (addr.isEmpty()) return;
|
if (addr.isEmpty()) return;
|
||||||
auto linAddr = linphone::Factory::get()->createAddress(Utils::appStringToCoreString(addr));
|
QString interpretedAddress = Utils::interpretUrl(addr);
|
||||||
|
auto linAddr = linphone::Factory::get()->createAddress(Utils::appStringToCoreString(interpretedAddress));
|
||||||
if (!linAddr) Utils::showInformationPopup(tr("Erreur"), tr("Adresse invalide"), false);
|
if (!linAddr) Utils::showInformationPopup(tr("Erreur"), tr("Adresse invalide"), false);
|
||||||
else {
|
else {
|
||||||
mAddressList.append(createFriendAddressVariant(addressLabel, addr));
|
mAddressList.append(createFriendAddressVariant(addressLabel, interpretedAddress));
|
||||||
if (mDefaultAddress.isEmpty()) mDefaultAddress = addr;
|
if (mDefaultAddress.isEmpty()) mDefaultAddress = interpretedAddress;
|
||||||
emit addressChanged();
|
emit addressChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,19 +125,17 @@ Notifier::~Notifier() {
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
QObject *Notifier::createNotification(Notifier::NotificationType type, QVariantMap data) {
|
bool Notifier::createNotification(Notifier::NotificationType type, QVariantMap data) {
|
||||||
QQuickItem *wrapperItem = nullptr;
|
|
||||||
mMutex->lock();
|
mMutex->lock();
|
||||||
Q_ASSERT(mInstancesNumber <= MaxNotificationsNumber);
|
Q_ASSERT(mInstancesNumber <= MaxNotificationsNumber);
|
||||||
if (mInstancesNumber == MaxNotificationsNumber) { // Check existing instances.
|
if (mInstancesNumber == MaxNotificationsNumber) { // Check existing instances.
|
||||||
qWarning() << QStringLiteral("Unable to create another notification.");
|
qWarning() << QStringLiteral("Unable to create another notification.");
|
||||||
mMutex->unlock();
|
mMutex->unlock();
|
||||||
return nullptr;
|
return false;
|
||||||
}
|
}
|
||||||
QList<QScreen *> allScreens = QGuiApplication::screens();
|
QList<QScreen *> allScreens = QGuiApplication::screens();
|
||||||
if (allScreens.size() > 0) { // Ensure to have a screen to avoid errors
|
if (allScreens.size() > 0) { // Ensure to have a screen to avoid errors
|
||||||
QQuickItem *previousWrapper = nullptr;
|
QQuickItem *previousWrapper = nullptr;
|
||||||
++mInstancesNumber;
|
|
||||||
bool showAsTool = false;
|
bool showAsTool = false;
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
for (auto w : QGuiApplication::topLevelWindows()) {
|
for (auto w : QGuiApplication::topLevelWindows()) {
|
||||||
|
|
@ -151,6 +149,7 @@ QObject *Notifier::createNotification(Notifier::NotificationType type, QVariantM
|
||||||
#endif
|
#endif
|
||||||
for (int i = 0; i < allScreens.size(); ++i) {
|
for (int i = 0; i < allScreens.size(); ++i) {
|
||||||
|
|
||||||
|
++mInstancesNumber;
|
||||||
// Use QQuickView to create a visual root object that is
|
// Use QQuickView to create a visual root object that is
|
||||||
// independant from current application Window
|
// independant from current application Window
|
||||||
QScreen *screen = allScreens[i];
|
QScreen *screen = allScreens[i];
|
||||||
|
|
@ -167,7 +166,7 @@ QObject *Notifier::createNotification(Notifier::NotificationType type, QVariantM
|
||||||
const QUrl url(QString(NotificationsPath) + Notifier::Notifications[type].filename);
|
const QUrl url(QString(NotificationsPath) + Notifier::Notifications[type].filename);
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
engine, &QQmlApplicationEngine::objectCreated, this,
|
engine, &QQmlApplicationEngine::objectCreated, this,
|
||||||
[this, url, screen, engine](QObject *obj, const QUrl &objUrl) {
|
[this, url, screen, engine, type](QObject *obj, const QUrl &objUrl) {
|
||||||
if (!obj && url == objUrl) {
|
if (!obj && url == objUrl) {
|
||||||
lCritical() << "[App] Notifier.qml couldn't be load.";
|
lCritical() << "[App] Notifier.qml couldn't be load.";
|
||||||
engine->deleteLater();
|
engine->deleteLater();
|
||||||
|
|
@ -188,18 +187,21 @@ QObject *Notifier::createNotification(Notifier::NotificationType type, QVariantM
|
||||||
window->property("width")
|
window->property("width")
|
||||||
.toInt())); //*screen->devicePixelRatio()); when using manual scaler
|
.toInt())); //*screen->devicePixelRatio()); when using manual scaler
|
||||||
window->setY(heightOffset - (*screenHeightOffset % heightOffset));
|
window->setY(heightOffset - (*screenHeightOffset % heightOffset));
|
||||||
lDebug() << window->geometry();
|
const int timeout = Notifications[type].getTimeout() * 1000;
|
||||||
|
QObject::connect(window, &QQuickWindow::closing, window,
|
||||||
|
[this, window] { deleteNotification(QVariant::fromValue(window)); });
|
||||||
|
showNotification(window, timeout);
|
||||||
|
lInfo() << QStringLiteral("Create notification:") << QVariant::fromValue(window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
engine->load(url);
|
engine->load(url);
|
||||||
}
|
}
|
||||||
lInfo() << QStringLiteral("Create notifications:") << wrapperItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mMutex->unlock();
|
mMutex->unlock();
|
||||||
return wrapperItem;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
@ -246,12 +248,12 @@ void Notifier::deleteNotification(QVariant notification) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lInfo() << QStringLiteral("Delete notification:") << instance;
|
lInfo() << QStringLiteral("Delete notification:") << instance << --mInstancesNumber;
|
||||||
|
|
||||||
instance->setProperty("__valid", true);
|
instance->setProperty("__valid", true);
|
||||||
instance->property(NotificationPropertyTimer).value<QTimer *>()->stop();
|
auto timerProperty = instance->property(NotificationPropertyTimer).value<QTimer *>();
|
||||||
|
if (timerProperty) timerProperty->stop();
|
||||||
|
|
||||||
mInstancesNumber--;
|
|
||||||
Q_ASSERT(mInstancesNumber >= 0);
|
Q_ASSERT(mInstancesNumber >= 0);
|
||||||
|
|
||||||
if (mInstancesNumber == 0) mScreenHeightOffset.clear();
|
if (mInstancesNumber == 0) mScreenHeightOffset.clear();
|
||||||
|
|
@ -266,10 +268,7 @@ void Notifier::deleteNotification(QVariant notification) {
|
||||||
#define CREATE_NOTIFICATION(TYPE, DATA) \
|
#define CREATE_NOTIFICATION(TYPE, DATA) \
|
||||||
auto settings = App::getInstance()->getSettings(); \
|
auto settings = App::getInstance()->getSettings(); \
|
||||||
if (settings && settings->dndEnabled()) return; \
|
if (settings && settings->dndEnabled()) return; \
|
||||||
QObject *notification = createNotification(TYPE, DATA); \
|
createNotification(TYPE, DATA);
|
||||||
if (!notification) return; \
|
|
||||||
const int timeout = Notifications[TYPE].getTimeout() * 1000; \
|
|
||||||
showNotification(notification, timeout);
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Notification functions.
|
// Notification functions.
|
||||||
|
|
@ -299,15 +298,6 @@ void Notifier::notifyReceivedCall(const shared_ptr<linphone::Call> &call) {
|
||||||
|
|
||||||
map["call"].setValue(gui);
|
map["call"].setValue(gui);
|
||||||
CREATE_NOTIFICATION(Notifier::ReceivedCall, map)
|
CREATE_NOTIFICATION(Notifier::ReceivedCall, map)
|
||||||
|
|
||||||
QObject::connect(
|
|
||||||
gui->getCore(), &CallCore::statusChanged, notification,
|
|
||||||
[this, notification](LinphoneEnums::CallStatus status) {
|
|
||||||
lInfo() << log().arg("Delete notification on call status : %1").arg(LinphoneEnums::toString(status));
|
|
||||||
deleteNotification(QVariant::fromValue(notification));
|
|
||||||
});
|
|
||||||
QObject::connect(gui->getCore(), &CallCore::destroyed, notification,
|
|
||||||
[this, notification]() { deleteNotification(QVariant::fromValue(notification)); });
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,12 +41,12 @@ public:
|
||||||
~Notifier();
|
~Notifier();
|
||||||
|
|
||||||
enum NotificationType {
|
enum NotificationType {
|
||||||
//ReceivedMessage,
|
// ReceivedMessage,
|
||||||
//ReceivedFileMessage,
|
// ReceivedFileMessage,
|
||||||
ReceivedCall,
|
ReceivedCall,
|
||||||
//NewVersionAvailable,
|
// NewVersionAvailable,
|
||||||
//SnapshotWasTaken,
|
// SnapshotWasTaken,
|
||||||
//RecordingCompleted
|
// RecordingCompleted
|
||||||
};
|
};
|
||||||
|
|
||||||
// void notifyReceivedCall(Call *call);
|
// void notifyReceivedCall(Call *call);
|
||||||
|
|
@ -88,14 +88,14 @@ private:
|
||||||
int type;
|
int type;
|
||||||
};
|
};
|
||||||
|
|
||||||
QObject *createNotification(NotificationType type, QVariantMap data);
|
bool createNotification(NotificationType type, QVariantMap data);
|
||||||
void showNotification(QObject *notification, int timeout);
|
void showNotification(QObject *notification, int timeout);
|
||||||
|
|
||||||
QHash<QString, int> mScreenHeightOffset;
|
QHash<QString, int> mScreenHeightOffset;
|
||||||
int mInstancesNumber = 0;
|
int mInstancesNumber = 0;
|
||||||
|
|
||||||
QMutex *mMutex = nullptr;
|
QMutex *mMutex = nullptr;
|
||||||
//QQmlComponent **mComponents = nullptr;
|
// QQmlComponent **mComponents = nullptr;
|
||||||
QVector<QQmlComponent *> mComponents;
|
QVector<QQmlComponent *> mComponents;
|
||||||
|
|
||||||
static const QHash<int, Notification> Notifications;
|
static const QHash<int, Notification> Notifications;
|
||||||
|
|
|
||||||
|
|
@ -89,14 +89,14 @@ void MagicSearchProxy::setSourceFlags(int flags) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MagicSearchProxy::showFavouritesOnly() const {
|
bool MagicSearchProxy::showFavoritesOnly() const {
|
||||||
return mShowFavouritesOnly;
|
return mShowFavoritesOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MagicSearchProxy::setShowFavouritesOnly(bool show) {
|
void MagicSearchProxy::setShowFavoritesOnly(bool show) {
|
||||||
if (mShowFavouritesOnly != show) {
|
if (mShowFavoritesOnly != show) {
|
||||||
mShowFavouritesOnly = show;
|
mShowFavoritesOnly = show;
|
||||||
emit showFavouriteOnlyChanged();
|
emit showFavoriteOnlyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -117,7 +117,7 @@ bool MagicSearchProxy::filterAcceptsRow(int sourceRow, const QModelIndex &source
|
||||||
auto friendGui = model.value<FriendGui *>();
|
auto friendGui = model.value<FriendGui *>();
|
||||||
auto friendCore = friendGui->getCore();
|
auto friendCore = friendGui->getCore();
|
||||||
if (friendCore) {
|
if (friendCore) {
|
||||||
return !mShowFavouritesOnly || friendCore->getStarred();
|
return !mShowFavoritesOnly || friendCore->getStarred();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,7 @@ class MagicSearchProxy : public SortFilterProxy {
|
||||||
Q_PROPERTY(int sourceFlags READ getSourceFlags WRITE setSourceFlags NOTIFY sourceFlagsChanged)
|
Q_PROPERTY(int sourceFlags READ getSourceFlags WRITE setSourceFlags NOTIFY sourceFlagsChanged)
|
||||||
Q_PROPERTY(LinphoneEnums::MagicSearchAggregation aggregationFlag READ getAggregationFlag WRITE setAggregationFlag
|
Q_PROPERTY(LinphoneEnums::MagicSearchAggregation aggregationFlag READ getAggregationFlag WRITE setAggregationFlag
|
||||||
NOTIFY aggregationFlagChanged)
|
NOTIFY aggregationFlagChanged)
|
||||||
Q_PROPERTY(
|
Q_PROPERTY(bool showFavoritesOnly READ showFavoritesOnly WRITE setShowFavoritesOnly NOTIFY showFavoriteOnlyChanged)
|
||||||
bool showFavouritesOnly READ showFavouritesOnly WRITE setShowFavouritesOnly NOTIFY showFavouriteOnlyChanged)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MagicSearchProxy(QObject *parent = Q_NULLPTR);
|
MagicSearchProxy(QObject *parent = Q_NULLPTR);
|
||||||
|
|
@ -50,8 +49,8 @@ public:
|
||||||
LinphoneEnums::MagicSearchAggregation getAggregationFlag() const;
|
LinphoneEnums::MagicSearchAggregation getAggregationFlag() const;
|
||||||
void setAggregationFlag(LinphoneEnums::MagicSearchAggregation flag);
|
void setAggregationFlag(LinphoneEnums::MagicSearchAggregation flag);
|
||||||
|
|
||||||
bool showFavouritesOnly() const;
|
bool showFavoritesOnly() const;
|
||||||
void setShowFavouritesOnly(bool show);
|
void setShowFavoritesOnly(bool show);
|
||||||
|
|
||||||
void setSourceModel(QAbstractItemModel *sourceModel) override;
|
void setSourceModel(QAbstractItemModel *sourceModel) override;
|
||||||
|
|
||||||
|
|
@ -64,12 +63,12 @@ signals:
|
||||||
void aggregationFlagChanged(LinphoneEnums::MagicSearchAggregation aggregationFlag);
|
void aggregationFlagChanged(LinphoneEnums::MagicSearchAggregation aggregationFlag);
|
||||||
void forceUpdate();
|
void forceUpdate();
|
||||||
void friendCreated(int index);
|
void friendCreated(int index);
|
||||||
void showFavouriteOnlyChanged();
|
void showFavoriteOnlyChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString mSearchText;
|
QString mSearchText;
|
||||||
int mSourceFlags;
|
int mSourceFlags;
|
||||||
bool mShowFavouritesOnly = false;
|
bool mShowFavoritesOnly = false;
|
||||||
LinphoneEnums::MagicSearchAggregation mAggregationFlag;
|
LinphoneEnums::MagicSearchAggregation mAggregationFlag;
|
||||||
QSharedPointer<MagicSearchList> mList;
|
QSharedPointer<MagicSearchList> mList;
|
||||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ ListView {
|
||||||
property bool actionLayoutVisible: false
|
property bool actionLayoutVisible: false
|
||||||
property bool initialHeadersVisible: true
|
property bool initialHeadersVisible: true
|
||||||
property bool displayNameCapitalization: true
|
property bool displayNameCapitalization: true
|
||||||
property bool showFavouritesOnly: false
|
property bool showFavoritesOnly: false
|
||||||
property bool showDefaultAddress: false
|
property bool showDefaultAddress: false
|
||||||
|
|
||||||
property var sourceModel: MagicSearchList{}
|
property var sourceModel: MagicSearchList{}
|
||||||
|
|
@ -83,8 +83,6 @@ ListView {
|
||||||
}
|
}
|
||||||
onActiveFocusChanged: if(activeFocus && (!footerItem || !footerItem.activeFocus)) {
|
onActiveFocusChanged: if(activeFocus && (!footerItem || !footerItem.activeFocus)) {
|
||||||
currentIndex = 0
|
currentIndex = 0
|
||||||
}else {
|
|
||||||
currentIndex = -1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
model: MagicSearchProxy {
|
model: MagicSearchProxy {
|
||||||
|
|
@ -93,7 +91,7 @@ ListView {
|
||||||
// This property is needed instead of playing on the delegate visibility
|
// This property is needed instead of playing on the delegate visibility
|
||||||
// considering its starred status. Otherwise, the row in the list still
|
// considering its starred status. Otherwise, the row in the list still
|
||||||
// exists even if its delegate is not visible, and creates navigation issues
|
// exists even if its delegate is not visible, and creates navigation issues
|
||||||
showFavouritesOnly: mainItem.showFavouritesOnly
|
showFavoritesOnly: mainItem.showFavoritesOnly
|
||||||
onFriendCreated: (index) => {
|
onFriendCreated: (index) => {
|
||||||
mainItem.currentIndex = index
|
mainItem.currentIndex = index
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,11 @@ Item {
|
||||||
property alias displayPresence: avatar.displayPresence
|
property alias displayPresence: avatar.displayPresence
|
||||||
property color color: DefaultStyle.grey_600
|
property color color: DefaultStyle.grey_600
|
||||||
property int radius: 15 * DefaultStyle.dp
|
property int radius: 15 * DefaultStyle.dp
|
||||||
property bool remoteIsPaused: participantDevice ? participantDevice.core.isPaused : false
|
property bool remoteIsPaused: participantDevice
|
||||||
|
? participantDevice.core.isPaused
|
||||||
|
: previewEnabled
|
||||||
|
? callState === LinphoneEnums.CallState.Paused
|
||||||
|
: callState === LinphoneEnums.CallState.PausedByRemote
|
||||||
property var peerAddressObj: previewEnabled && (call || account)
|
property var peerAddressObj: previewEnabled && (call || account)
|
||||||
? UtilsCpp.getDisplayName(account ? account.core.identityAddress : call.core.localAddress)
|
? UtilsCpp.getDisplayName(account ? account.core.identityAddress : call.core.localAddress)
|
||||||
: participantDevice && participantDevice.core
|
: participantDevice && participantDevice.core
|
||||||
|
|
@ -202,7 +206,12 @@ Item {
|
||||||
triggeredOnStart: true
|
triggeredOnStart: true
|
||||||
onTriggered: {cameraLoader.reset = !cameraLoader.reset}
|
onTriggered: {cameraLoader.reset = !cameraLoader.reset}
|
||||||
}
|
}
|
||||||
active: mainItem.visible && mainItem.callState != LinphoneEnums.CallState.End && mainItem.callState != LinphoneEnums.CallState.Released && mainItem.videoEnabled && !cameraLoader.reset
|
active: mainItem.visible && !mainItem.remoteIsPaused
|
||||||
|
&& mainItem.callState != LinphoneEnums.CallState.End
|
||||||
|
&& mainItem.callState != LinphoneEnums.CallState.Released
|
||||||
|
&& mainItem.callState != LinphoneEnums.CallState.Paused
|
||||||
|
&& mainItem.callState != LinphoneEnums.CallState.PausedByRemote
|
||||||
|
&& mainItem.videoEnabled && !cameraLoader.reset
|
||||||
onActiveChanged: console.log("("+mainItem.qmlName+") Camera active " + active +", visible="+mainItem.visible +", videoEnabled="+mainItem.videoEnabled +", reset="+cameraLoader.reset)
|
onActiveChanged: console.log("("+mainItem.qmlName+") Camera active " + active +", visible="+mainItem.visible +", videoEnabled="+mainItem.videoEnabled +", reset="+cameraLoader.reset)
|
||||||
sourceComponent: cameraComponent
|
sourceComponent: cameraComponent
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ DesktopPopup {
|
||||||
|
|
||||||
// Use as an intermediate between signal/slot without propagate the notification var : last signal parameter will be the last notification instance
|
// Use as an intermediate between signal/slot without propagate the notification var : last signal parameter will be the last notification instance
|
||||||
function deleteNotificationSlot(){
|
function deleteNotificationSlot(){
|
||||||
deleteNotification(notification)
|
deleteNotification(mainItem)
|
||||||
}
|
}
|
||||||
|
|
||||||
function _close (cb) {
|
function _close (cb) {
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,15 @@ Notification {
|
||||||
overriddenHeight: content.implicitHeight//422 * DefaultStyle.dp
|
overriddenHeight: content.implicitHeight//422 * DefaultStyle.dp
|
||||||
readonly property var call: notificationData && notificationData.call
|
readonly property var call: notificationData && notificationData.call
|
||||||
property var state: call.core.state
|
property var state: call.core.state
|
||||||
|
property var status: call.core.status
|
||||||
onStateChanged:{
|
onStateChanged:{
|
||||||
if (state != LinphoneEnums.CallState.IncomingReceived){
|
if (state != LinphoneEnums.CallState.IncomingReceived){
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onStatusChanged:{
|
||||||
|
console.log("status", status)
|
||||||
|
}
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
id: content
|
id: content
|
||||||
|
|
|
||||||
|
|
@ -319,10 +319,9 @@ MainRightPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
if (text != "sip:") mainItem.contact.core.appendAddress(text)
|
mainItem.contact.core.appendAddress(text)
|
||||||
text = "sip:"
|
newAddressTextField.clear()
|
||||||
}
|
}
|
||||||
Component.onCompleted: text = "sip:"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
|
|
||||||
|
|
@ -20,12 +20,14 @@ Item {
|
||||||
|
|
||||||
signal addAccountRequest()
|
signal addAccountRequest()
|
||||||
signal openNewCallRequest()
|
signal openNewCallRequest()
|
||||||
|
signal callCreated()
|
||||||
signal openCallHistory()
|
signal openCallHistory()
|
||||||
signal openNumPadRequest()
|
signal openNumPadRequest()
|
||||||
signal displayContactRequested(string contactAddress)
|
signal displayContactRequested(string contactAddress)
|
||||||
signal createContactRequested(string name, string address)
|
signal createContactRequested(string name, string address)
|
||||||
signal accountRemoved()
|
signal accountRemoved()
|
||||||
|
|
||||||
|
|
||||||
function goToNewCall() {
|
function goToNewCall() {
|
||||||
tabbar.currentIndex = 0
|
tabbar.currentIndex = 0
|
||||||
mainItem.openNewCallRequest()
|
mainItem.openNewCallRequest()
|
||||||
|
|
@ -138,6 +140,11 @@ Item {
|
||||||
Layout.preferredWidth: 82 * DefaultStyle.dp
|
Layout.preferredWidth: 82 * DefaultStyle.dp
|
||||||
defaultAccount: accountProxy.defaultAccount
|
defaultAccount: accountProxy.defaultAccount
|
||||||
currentIndex: SettingsCpp.getLastActiveTabIndex()
|
currentIndex: SettingsCpp.getLastActiveTabIndex()
|
||||||
|
Binding on currentIndex {
|
||||||
|
when: mainItem.contextualMenuOpenedComponent != undefined
|
||||||
|
value: -1
|
||||||
|
restoreMode: Binding.RestoreBindingOrValue
|
||||||
|
}
|
||||||
model: [
|
model: [
|
||||||
{icon: AppIcons.phone, selectedIcon: AppIcons.phoneSelected, label: qsTr("Appels")},
|
{icon: AppIcons.phone, selectedIcon: AppIcons.phoneSelected, label: qsTr("Appels")},
|
||||||
{icon: AppIcons.adressBook, selectedIcon: AppIcons.adressBookSelected, label: qsTr("Contacts")},
|
{icon: AppIcons.adressBook, selectedIcon: AppIcons.adressBookSelected, label: qsTr("Contacts")},
|
||||||
|
|
@ -145,6 +152,7 @@ Item {
|
||||||
{icon: AppIcons.videoconference, selectedIcon: AppIcons.videoconferenceSelected, label: qsTr("Réunions"), visible: !SettingsCpp.disableMeetingsFeature}
|
{icon: AppIcons.videoconference, selectedIcon: AppIcons.videoconferenceSelected, label: qsTr("Réunions"), visible: !SettingsCpp.disableMeetingsFeature}
|
||||||
]
|
]
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
|
if (currentIndex == -1) return
|
||||||
SettingsCpp.setLastActiveTabIndex(currentIndex)
|
SettingsCpp.setLastActiveTabIndex(currentIndex)
|
||||||
if (currentIndex === 0 && accountProxy.defaultAccount) accountProxy.defaultAccount.core?.lResetMissedCalls()
|
if (currentIndex === 0 && accountProxy.defaultAccount) accountProxy.defaultAccount.core?.lResetMissedCalls()
|
||||||
if (mainItem.contextualMenuOpenedComponent) {
|
if (mainItem.contextualMenuOpenedComponent) {
|
||||||
|
|
@ -580,12 +588,13 @@ Item {
|
||||||
StackLayout {
|
StackLayout {
|
||||||
id: mainStackLayout
|
id: mainStackLayout
|
||||||
currentIndex: tabbar.currentIndex
|
currentIndex: tabbar.currentIndex
|
||||||
onActiveFocusChanged: if(activeFocus) children[currentIndex].forceActiveFocus()
|
onActiveFocusChanged: if(activeFocus && currentIndex >= 0) children[currentIndex].forceActiveFocus()
|
||||||
CallPage {
|
CallPage {
|
||||||
id: callPage
|
id: callPage
|
||||||
Connections {
|
Connections {
|
||||||
target: mainItem
|
target: mainItem
|
||||||
function onOpenNewCallRequest(){ callPage.goToNewCall()}
|
function onOpenNewCallRequest(){ callPage.goToNewCall()}
|
||||||
|
function onCallCreated(){ callPage.resetLeftPanel()}
|
||||||
function onOpenCallHistory(){ callPage.goToCallHistory()}
|
function onOpenCallHistory(){ callPage.goToCallHistory()}
|
||||||
function onOpenNumPadRequest(){ callPage.openNumPadRequest()}
|
function onOpenNumPadRequest(){ callPage.openNumPadRequest()}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,19 +11,17 @@ AbstractSettingsLayout {
|
||||||
Component {
|
Component {
|
||||||
id: content
|
id: content
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
width: parent.width
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredWidth: 341 * DefaultStyle.dp
|
Layout.preferredWidth: 341 * DefaultStyle.dp
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.rightMargin: 25 * DefaultStyle.dp
|
Layout.rightMargin: 25 * DefaultStyle.dp
|
||||||
Layout.topMargin: 36 * DefaultStyle.dp
|
Layout.topMargin: 36 * DefaultStyle.dp
|
||||||
Layout.leftMargin: 64 * DefaultStyle.dp
|
Layout.leftMargin: 64 * DefaultStyle.dp
|
||||||
Layout.fillWidth: true
|
|
||||||
spacing: 40 * DefaultStyle.dp
|
spacing: 40 * DefaultStyle.dp
|
||||||
SwitchSetting {
|
SwitchSetting {
|
||||||
titleText: qsTr("Annulateur d'écho")
|
titleText: qsTr("Annulateur d'écho")
|
||||||
|
|
@ -49,7 +47,6 @@ AbstractSettingsLayout {
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.preferredWidth: 341 * DefaultStyle.dp
|
Layout.preferredWidth: 341 * DefaultStyle.dp
|
||||||
Text {
|
Text {
|
||||||
|
|
@ -72,17 +69,14 @@ AbstractSettingsLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
|
||||||
spacing: 20 * DefaultStyle.dp
|
spacing: 20 * DefaultStyle.dp
|
||||||
Layout.rightMargin: 44 * DefaultStyle.dp
|
Layout.rightMargin: 44 * DefaultStyle.dp
|
||||||
Layout.topMargin: 20 * DefaultStyle.dp
|
Layout.topMargin: 20 * DefaultStyle.dp
|
||||||
Layout.leftMargin: 64 * DefaultStyle.dp
|
Layout.leftMargin: 64 * DefaultStyle.dp
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
|
||||||
EffectImage {
|
EffectImage {
|
||||||
imageSource: AppIcons.speaker
|
imageSource: AppIcons.speaker
|
||||||
colorizationColor: DefaultStyle.main1_500_main
|
colorizationColor: DefaultStyle.main1_500_main
|
||||||
|
|
@ -123,10 +117,8 @@ AbstractSettingsLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
|
||||||
EffectImage {
|
EffectImage {
|
||||||
imageSource: AppIcons.microphone
|
imageSource: AppIcons.microphone
|
||||||
colorizationColor: DefaultStyle.main1_500_main
|
colorizationColor: DefaultStyle.main1_500_main
|
||||||
|
|
@ -205,7 +197,6 @@ AbstractSettingsLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
RowLayout {
|
RowLayout {
|
||||||
EffectImage {
|
EffectImage {
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,10 @@ AbstractMainPage {
|
||||||
property var selectedRowHistoryGui
|
property var selectedRowHistoryGui
|
||||||
signal listViewUpdated()
|
signal listViewUpdated()
|
||||||
|
|
||||||
|
onVisibleChanged: if (!visible) {
|
||||||
|
resetLeftPanel()
|
||||||
|
}
|
||||||
|
|
||||||
//Group call properties
|
//Group call properties
|
||||||
property ConferenceInfoGui confInfoGui
|
property ConferenceInfoGui confInfoGui
|
||||||
property AccountProxy accounts: AccountProxy {id: accountProxy}
|
property AccountProxy accounts: AccountProxy {id: accountProxy}
|
||||||
|
|
@ -47,13 +51,17 @@ AbstractMainPage {
|
||||||
|
|
||||||
onNoItemButtonPressed: goToNewCall()
|
onNoItemButtonPressed: goToNewCall()
|
||||||
|
|
||||||
showDefaultItem: listStackView.currentItem.listView && listStackView.currentItem.listView.count === 0 && listStackView.currentItem.listView.model.sourceModel.count === 0 || false
|
showDefaultItem: listStackView.currentItem && listStackView.currentItem.listView && listStackView.currentItem.listView.count === 0 && listStackView.currentItem.listView.model.sourceModel.count === 0 || false
|
||||||
|
|
||||||
|
function resetLeftPanel() {
|
||||||
|
listStackView.clear()
|
||||||
|
listStackView.push(listStackView.initialItem)
|
||||||
|
}
|
||||||
function goToNewCall() {
|
function goToNewCall() {
|
||||||
if (listStackView.currentItem.objectName != "newCallItem") listStackView.push(newCallItem)
|
if (listStackView.currentItem && listStackView.currentItem.objectName != "newCallItem") listStackView.push(newCallItem)
|
||||||
}
|
}
|
||||||
function goToCallHistory() {
|
function goToCallHistory() {
|
||||||
if (listStackView.currentItem.objectName != "historyListItem") listStackView.replace(historyListItem)
|
if (listStackView.currentItem && listStackView.currentItem.objectName != "historyListItem") listStackView.replace(historyListItem)
|
||||||
}
|
}
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
|
|
@ -202,8 +210,6 @@ AbstractMainPage {
|
||||||
Component {
|
Component {
|
||||||
id: historyListItem
|
id: historyListItem
|
||||||
FocusScope{
|
FocusScope{
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
Control.StackView.onActivated: titleLoader.sourceComponent = historyListTitle
|
Control.StackView.onActivated: titleLoader.sourceComponent = historyListTitle
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -315,6 +321,7 @@ AbstractMainPage {
|
||||||
font {
|
font {
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
weight: 400 * DefaultStyle.dp
|
weight: 400 * DefaultStyle.dp
|
||||||
|
capitalization: Font.Capitalize
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -500,14 +507,13 @@ AbstractMainPage {
|
||||||
searchBarColor: DefaultStyle.grey_100
|
searchBarColor: DefaultStyle.grey_100
|
||||||
//onSelectedContactChanged: mainWindow.startCallWithContact(selectedContact, false, callContactsList)
|
//onSelectedContactChanged: mainWindow.startCallWithContact(selectedContact, false, callContactsList)
|
||||||
onCallSelectedContact: mainWindow.startCallWithContact(selectedContact, false, callContactsList)
|
onCallSelectedContact: mainWindow.startCallWithContact(selectedContact, false, callContactsList)
|
||||||
onCallButtonPressed: mainItem.createCallFromSearchBarRequested()
|
|
||||||
onGroupCallCreationRequested: {
|
onGroupCallCreationRequested: {
|
||||||
console.log("groupe call requetsed")
|
console.log("groupe call requetsed")
|
||||||
listStackView.push(groupCallItem)
|
listStackView.push(groupCallItem)
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: mainItem
|
target: mainItem
|
||||||
function onCreateCallFromSearchBarRequested(){ UtilsCpp.createCall(callContactsList.searchBar.text)}
|
function onCreateCallFromSearchBarRequested(){ UtilsCpp.createCall(UtilsCpp.interpretUrl(callContactsList.searchBar.text))}
|
||||||
function onOpenNumPadRequest(){ if (!callContactsList.searchBar.numericPadButton.checked) callContactsList.searchBar.numericPadButton.checked = true}
|
function onOpenNumPadRequest(){ if (!callContactsList.searchBar.numericPadButton.checked) callContactsList.searchBar.numericPadButton.checked = true}
|
||||||
}
|
}
|
||||||
Binding {
|
Binding {
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,12 @@ AbstractMainPage {
|
||||||
property FriendGui selectedContact
|
property FriendGui selectedContact
|
||||||
property string initialFriendToDisplay
|
property string initialFriendToDisplay
|
||||||
|
|
||||||
|
onVisibleChanged: if (!visible) {
|
||||||
|
rightPanelStackView.clear()
|
||||||
|
contactList.currentIndex = -1
|
||||||
|
favoriteList.currentIndex = -1
|
||||||
|
}
|
||||||
|
|
||||||
onSelectedContactChanged: {
|
onSelectedContactChanged: {
|
||||||
if (selectedContact) {
|
if (selectedContact) {
|
||||||
if (!rightPanelStackView.currentItem || rightPanelStackView.currentItem.objectName != "contactDetail") rightPanelStackView.push(contactDetail)
|
if (!rightPanelStackView.currentItem || rightPanelStackView.currentItem.objectName != "contactDetail") rightPanelStackView.push(contactDetail)
|
||||||
|
|
@ -272,7 +278,7 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: contentHeight
|
Layout.preferredHeight: contentHeight
|
||||||
Control.ScrollBar.vertical.visible: false
|
Control.ScrollBar.vertical.visible: false
|
||||||
showFavouritesOnly: true
|
showFavoritesOnly: true
|
||||||
contactMenuVisible: true
|
contactMenuVisible: true
|
||||||
searchBarText: searchBar.text
|
searchBarText: searchBar.text
|
||||||
sourceModel: allFriends
|
sourceModel: allFriends
|
||||||
|
|
@ -703,7 +709,7 @@ AbstractMainPage {
|
||||||
Layout.preferredHeight: 50 * DefaultStyle.dp
|
Layout.preferredHeight: 50 * DefaultStyle.dp
|
||||||
iconSize: 24 * DefaultStyle.dp
|
iconSize: 24 * DefaultStyle.dp
|
||||||
iconSource: mainItem.selectedContact && mainItem.selectedContact.core.starred ? AppIcons.heartFill : AppIcons.heart
|
iconSource: mainItem.selectedContact && mainItem.selectedContact.core.starred ? AppIcons.heartFill : AppIcons.heart
|
||||||
text: mainItem.selectedContact && mainItem.selectedContact.core.starred ? qsTr("Remove from favourites") : qsTr("Add to favourites")
|
text: mainItem.selectedContact && mainItem.selectedContact.core.starred ? qsTr("Remove from favorites") : qsTr("Add to favorites")
|
||||||
onClicked: if (mainItem.selectedContact) mainItem.selectedContact.core.lSetStarred(!mainItem.selectedContact.core.starred)
|
onClicked: if (mainItem.selectedContact) mainItem.selectedContact.core.lSetStarred(!mainItem.selectedContact.core.starred)
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,11 @@ AbstractMainPage {
|
||||||
Component.onCompleted: rightPanelStackView.push(overridenRightPanel, Control.StackView.Immediate)
|
Component.onCompleted: rightPanelStackView.push(overridenRightPanel, Control.StackView.Immediate)
|
||||||
showDefaultItem: false//leftPanelStackView.currentItem.objectName === "listLayout"
|
showDefaultItem: false//leftPanelStackView.currentItem.objectName === "listLayout"
|
||||||
|
|
||||||
|
onVisibleChanged: if (!visible) {
|
||||||
|
leftPanelStackView.clear()
|
||||||
|
leftPanelStackView.push(leftPanelStackView.initialItem)
|
||||||
|
}
|
||||||
|
|
||||||
onSelectedConferenceChanged: {
|
onSelectedConferenceChanged: {
|
||||||
overridenRightPanelStackView.clear()
|
overridenRightPanelStackView.clear()
|
||||||
if (selectedConference && selectedConference.core.haveModel) {
|
if (selectedConference && selectedConference.core.haveModel) {
|
||||||
|
|
@ -125,7 +130,7 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
Binding {
|
Binding {
|
||||||
target: mainItem
|
target: mainItem
|
||||||
when: leftPanelStackView.currentItem.objectName === "listLayout"
|
when: leftPanelStackView.currentItem && leftPanelStackView.currentItem.objectName === "listLayout"
|
||||||
property: "showDefaultItem"
|
property: "showDefaultItem"
|
||||||
value: conferenceList.count === 0
|
value: conferenceList.count === 0
|
||||||
restoreMode: Binding.RestoreBindingOrValue
|
restoreMode: Binding.RestoreBindingOrValue
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ AbstractWindow {
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
|
signal callCreated()
|
||||||
|
|
||||||
// TODO : use this to make the border transparent
|
// TODO : use this to make the border transparent
|
||||||
// flags: Qt.Window | Qt.FramelessWindowHint | Qt.WindowTitleHint
|
// flags: Qt.Window | Qt.FramelessWindowHint | Qt.WindowTitleHint
|
||||||
// menuBar: Rectangle {
|
// menuBar: Rectangle {
|
||||||
|
|
@ -193,11 +195,16 @@ AbstractWindow {
|
||||||
Component {
|
Component {
|
||||||
id: mainPage
|
id: mainPage
|
||||||
MainLayout {
|
MainLayout {
|
||||||
|
id: mainLayout
|
||||||
objectName: "mainPage"
|
objectName: "mainPage"
|
||||||
onAddAccountRequest: goToLogin()
|
onAddAccountRequest: goToLogin()
|
||||||
onAccountRemoved: {
|
onAccountRemoved: {
|
||||||
initStackViewItem()
|
initStackViewItem()
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: mainWindow
|
||||||
|
function onCallCreated(){ mainLayout.callCreated() }
|
||||||
|
}
|
||||||
// StackView.onActivated: connectionSecured(0) // TODO : connect to cpp part when ready
|
// StackView.onActivated: connectionSecured(0) // TODO : connect to cpp part when ready
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue