Ui fixes, add participants panel, admin status, conf edition
This commit is contained in:
parent
576bd0892c
commit
3b64a8c4ae
25 changed files with 654 additions and 612 deletions
|
|
@ -38,6 +38,11 @@ ConferenceCore::ConferenceCore(const std::shared_ptr<linphone::Conference> &conf
|
||||||
mustBeInLinphoneThread(getClassName());
|
mustBeInLinphoneThread(getClassName());
|
||||||
mConferenceModel = ConferenceModel::create(conference);
|
mConferenceModel = ConferenceModel::create(conference);
|
||||||
mSubject = Utils::coreStringToAppString(conference->getSubject());
|
mSubject = Utils::coreStringToAppString(conference->getSubject());
|
||||||
|
mParticipantDeviceCount = conference->getParticipantDeviceList().size();
|
||||||
|
auto me = conference->getMe();
|
||||||
|
if (me) {
|
||||||
|
mMe = ParticipantCore::create(me);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ConferenceCore::~ConferenceCore() {
|
ConferenceCore::~ConferenceCore() {
|
||||||
mustBeInMainThread("~" + getClassName());
|
mustBeInMainThread("~" + getClassName());
|
||||||
|
|
@ -77,7 +82,7 @@ Q_INVOKABLE qint64 ConferenceCore::getElapsedSeconds() const {
|
||||||
// std::list<std::shared_ptr<linphone::Participant>>
|
// std::list<std::shared_ptr<linphone::Participant>>
|
||||||
// getParticipantList() const; // SDK exclude me. We want to get ALL participants.
|
// getParticipantList() const; // SDK exclude me. We want to get ALL participants.
|
||||||
int ConferenceCore::getParticipantDeviceCount() const {
|
int ConferenceCore::getParticipantDeviceCount() const {
|
||||||
return 0;
|
return mParticipantDeviceCount + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConferenceCore::setIsReady(bool state) {
|
void ConferenceCore::setIsReady(bool state) {
|
||||||
|
|
@ -100,6 +105,10 @@ ParticipantDeviceGui *ConferenceCore::getActiveSpeakerGui() const {
|
||||||
return new ParticipantDeviceGui(mActiveSpeaker);
|
return new ParticipantDeviceGui(mActiveSpeaker);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ParticipantGui *ConferenceCore::getMeGui() const {
|
||||||
|
return new ParticipantGui(mMe);
|
||||||
|
}
|
||||||
|
|
||||||
void ConferenceCore::setActiveSpeaker(const QSharedPointer<ParticipantDeviceCore> &device) {
|
void ConferenceCore::setActiveSpeaker(const QSharedPointer<ParticipantDeviceCore> &device) {
|
||||||
if (mActiveSpeaker != device) {
|
if (mActiveSpeaker != device) {
|
||||||
mActiveSpeaker = device;
|
mActiveSpeaker = device;
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,10 @@
|
||||||
#ifndef CONFERENCE_CORE_H_
|
#ifndef CONFERENCE_CORE_H_
|
||||||
#define CONFERENCE_CORE_H_
|
#define CONFERENCE_CORE_H_
|
||||||
|
|
||||||
|
#include "core/participant/ParticipantCore.hpp"
|
||||||
#include "core/participant/ParticipantDeviceCore.hpp"
|
#include "core/participant/ParticipantDeviceCore.hpp"
|
||||||
#include "core/participant/ParticipantDeviceGui.hpp"
|
#include "core/participant/ParticipantDeviceGui.hpp"
|
||||||
|
#include "core/participant/ParticipantGui.hpp"
|
||||||
#include "model/conference/ConferenceModel.hpp"
|
#include "model/conference/ConferenceModel.hpp"
|
||||||
#include "tool/LinphoneEnums.hpp"
|
#include "tool/LinphoneEnums.hpp"
|
||||||
#include "tool/thread/SafeConnection.hpp"
|
#include "tool/thread/SafeConnection.hpp"
|
||||||
|
|
@ -36,11 +38,12 @@ class ConferenceCore : public QObject, public AbstractObject {
|
||||||
public:
|
public:
|
||||||
Q_PROPERTY(QString subject READ getSubject NOTIFY subjectChanged)
|
Q_PROPERTY(QString subject READ getSubject NOTIFY subjectChanged)
|
||||||
Q_PROPERTY(QDateTime startDate READ getStartDate CONSTANT)
|
Q_PROPERTY(QDateTime startDate READ getStartDate CONSTANT)
|
||||||
// Q_PROPERTY(ParticipantListModel* participants READ getParticipantListModel CONSTANT)
|
// Q_PROPERTY(ParticipantDeviceList *participantDevices READ getParticipantDeviceList CONSTANT)
|
||||||
// Q_PROPERTY(ParticipantModel* localParticipant READ getLocalParticipant NOTIFY localParticipantChanged)
|
// Q_PROPERTY(ParticipantModel* localParticipant READ getLocalParticipant NOTIFY localParticipantChanged)
|
||||||
Q_PROPERTY(bool isReady MEMBER mIsReady WRITE setIsReady NOTIFY isReadyChanged)
|
Q_PROPERTY(bool isReady MEMBER mIsReady WRITE setIsReady NOTIFY isReadyChanged)
|
||||||
Q_PROPERTY(int participantDeviceCount READ getParticipantDeviceCount NOTIFY participantDeviceCountChanged)
|
Q_PROPERTY(int participantDeviceCount READ getParticipantDeviceCount NOTIFY participantDeviceCountChanged)
|
||||||
Q_PROPERTY(ParticipantDeviceGui *activeSpeaker READ getActiveSpeakerGui NOTIFY activeSpeakerChanged)
|
Q_PROPERTY(ParticipantDeviceGui *activeSpeaker READ getActiveSpeakerGui NOTIFY activeSpeakerChanged)
|
||||||
|
Q_PROPERTY(ParticipantGui *me READ getMeGui)
|
||||||
|
|
||||||
// Should be call from model Thread. Will be automatically in App thread after initialization
|
// Should be call from model Thread. Will be automatically in App thread after initialization
|
||||||
static QSharedPointer<ConferenceCore> create(const std::shared_ptr<linphone::Conference> &conference);
|
static QSharedPointer<ConferenceCore> create(const std::shared_ptr<linphone::Conference> &conference);
|
||||||
|
|
@ -57,9 +60,11 @@ public:
|
||||||
// ParticipantListModel *getParticipantListModel() const;
|
// ParticipantListModel *getParticipantListModel() const;
|
||||||
// std::list<std::shared_ptr<linphone::Participant>>
|
// std::list<std::shared_ptr<linphone::Participant>>
|
||||||
// getParticipantList() const; // SDK exclude me. We want to get ALL participants.
|
// getParticipantList() const; // SDK exclude me. We want to get ALL participants.
|
||||||
|
// void getParticipantDeviceList() const;
|
||||||
int getParticipantDeviceCount() const;
|
int getParticipantDeviceCount() const;
|
||||||
ParticipantDeviceCore *getActiveSpeaker() const;
|
ParticipantDeviceCore *getActiveSpeaker() const;
|
||||||
ParticipantDeviceGui *getActiveSpeakerGui() const;
|
ParticipantDeviceGui *getActiveSpeakerGui() const;
|
||||||
|
ParticipantGui *getMeGui() const;
|
||||||
void setActiveSpeaker(const QSharedPointer<ParticipantDeviceCore> &device);
|
void setActiveSpeaker(const QSharedPointer<ParticipantDeviceCore> &device);
|
||||||
|
|
||||||
void setIsReady(bool state);
|
void setIsReady(bool state);
|
||||||
|
|
@ -78,6 +83,8 @@ private:
|
||||||
QSharedPointer<SafeConnection<ConferenceCore, ConferenceModel>> mConferenceModelConnection;
|
QSharedPointer<SafeConnection<ConferenceCore, ConferenceModel>> mConferenceModelConnection;
|
||||||
std::shared_ptr<ConferenceModel> mConferenceModel;
|
std::shared_ptr<ConferenceModel> mConferenceModel;
|
||||||
QSharedPointer<ParticipantDeviceCore> mActiveSpeaker;
|
QSharedPointer<ParticipantDeviceCore> mActiveSpeaker;
|
||||||
|
QSharedPointer<ParticipantCore> mMe;
|
||||||
|
int mParticipantDeviceCount = 0;
|
||||||
|
|
||||||
bool mIsReady = false;
|
bool mIsReady = false;
|
||||||
QString mSubject;
|
QString mSubject;
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ ConferenceInfoList::get(std::shared_ptr<linphone::ConferenceInfo> conferenceInfo
|
||||||
QSharedPointer<ConferenceInfoCore>
|
QSharedPointer<ConferenceInfoCore>
|
||||||
ConferenceInfoList::build(const std::shared_ptr<linphone::ConferenceInfo> &conferenceInfo) const {
|
ConferenceInfoList::build(const std::shared_ptr<linphone::ConferenceInfo> &conferenceInfo) const {
|
||||||
auto me = CoreModel::getInstance()->getCore()->getDefaultAccount()->getParams()->getIdentityAddress();
|
auto me = CoreModel::getInstance()->getCore()->getDefaultAccount()->getParams()->getIdentityAddress();
|
||||||
qDebug() << "[CONFERENCEINFOLIST] looking for me " << me->asStringUriOnly();
|
// qDebug() << "[CONFERENCEINFOLIST] looking for me " << me->asStringUriOnly();
|
||||||
std::list<std::shared_ptr<linphone::ParticipantInfo>> participants = conferenceInfo->getParticipantInfos();
|
std::list<std::shared_ptr<linphone::ParticipantInfo>> participants = conferenceInfo->getParticipantInfos();
|
||||||
bool haveMe = conferenceInfo->getOrganizer()->weakEqual(me);
|
bool haveMe = conferenceInfo->getOrganizer()->weakEqual(me);
|
||||||
if (!haveMe)
|
if (!haveMe)
|
||||||
|
|
|
||||||
|
|
@ -41,18 +41,21 @@ QSharedPointer<ParticipantCore> ParticipantCore::create(const std::shared_ptr<li
|
||||||
ParticipantCore::ParticipantCore(const std::shared_ptr<linphone::Participant> &participant) : QObject(nullptr) {
|
ParticipantCore::ParticipantCore(const std::shared_ptr<linphone::Participant> &participant) : QObject(nullptr) {
|
||||||
App::getInstance()->mEngine->setObjectOwnership(this, QQmlEngine::CppOwnership);
|
App::getInstance()->mEngine->setObjectOwnership(this, QQmlEngine::CppOwnership);
|
||||||
mParticipantModel = Utils::makeQObject_ptr<ParticipantModel>(participant);
|
mParticipantModel = Utils::makeQObject_ptr<ParticipantModel>(participant);
|
||||||
mAdminStatus = participant->isAdmin();
|
if (participant) {
|
||||||
mSipAddress = Utils::coreStringToAppString(participant->getAddress()->asStringUriOnly());
|
mAdminStatus = participant->isAdmin();
|
||||||
mCreationTime = QDateTime::fromSecsSinceEpoch(participant->getCreationTime());
|
mSipAddress = Utils::coreStringToAppString(participant->getAddress()->asStringUriOnly());
|
||||||
mDisplayName = Utils::coreStringToAppString(participant->getAddress()->getDisplayName());
|
mCreationTime = QDateTime::fromSecsSinceEpoch(participant->getCreationTime());
|
||||||
if (mDisplayName.isEmpty()) mDisplayName = Utils::coreStringToAppString(participant->getAddress()->getUsername());
|
mDisplayName = Utils::coreStringToAppString(participant->getAddress()->getDisplayName());
|
||||||
for (auto &device : participant->getDevices()) {
|
if (mDisplayName.isEmpty())
|
||||||
auto name = Utils::coreStringToAppString(device->getName());
|
mDisplayName = Utils::coreStringToAppString(participant->getAddress()->getUsername());
|
||||||
auto address = Utils::coreStringToAppString(device->getAddress()->asStringUriOnly());
|
for (auto &device : participant->getDevices()) {
|
||||||
QVariantMap map;
|
auto name = Utils::coreStringToAppString(device->getName());
|
||||||
map.insert("name", name);
|
auto address = Utils::coreStringToAppString(device->getAddress()->asStringUriOnly());
|
||||||
map.insert("address", address);
|
QVariantMap map;
|
||||||
mParticipantDevices.append(map);
|
map.insert("name", name);
|
||||||
|
map.insert("address", address);
|
||||||
|
mParticipantDevices.append(map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// App::getInstance()->mEngine->setObjectOwnership(mParticipantDevices.get(),
|
// App::getInstance()->mEngine->setObjectOwnership(mParticipantDevices.get(),
|
||||||
// QQmlEngine::CppOwnership); // Managed by QSharedPointer
|
// QQmlEngine::CppOwnership); // Managed by QSharedPointer
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ signals:
|
||||||
void creationTimeChanged();
|
void creationTimeChanged();
|
||||||
void displayNameChanged();
|
void displayNameChanged();
|
||||||
|
|
||||||
void lStartInvitation(const int &secs);
|
void lStartInvitation(const int &secs = 30);
|
||||||
void lSetIsAdmin(bool status);
|
void lSetIsAdmin(bool status);
|
||||||
|
|
||||||
void invitationTimeout(ParticipantCore *model);
|
void invitationTimeout(ParticipantCore *model);
|
||||||
|
|
|
||||||
|
|
@ -245,6 +245,45 @@ void ParticipantList::remove(ParticipantCore *participant) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ParticipantList::addAddress(const QString &address) {
|
||||||
|
|
||||||
|
if (!contains(address)) {
|
||||||
|
QSharedPointer<ParticipantCore> participant = QSharedPointer<ParticipantCore>::create(nullptr);
|
||||||
|
connect(participant.get(), &ParticipantCore::invitationTimeout, this, &ParticipantList::remove);
|
||||||
|
participant->setSipAddress(address);
|
||||||
|
add(participant);
|
||||||
|
// if (mChatRoomModel && mChatRoomModel->getChatRoom()) { // Invite and wait for its creation
|
||||||
|
// participant->startInvitation();
|
||||||
|
// mChatRoomModel->getChatRoom()->addParticipant(Utils::interpretUrl(address));
|
||||||
|
// }
|
||||||
|
if (mConferenceModel) {
|
||||||
|
std::list<std::shared_ptr<linphone::Call>> runningCallsToAdd;
|
||||||
|
mConferenceModelConnection->invokeToModel([this, address] {
|
||||||
|
auto addressToInvite = ToolModel::interpretUrl(address);
|
||||||
|
auto currentCalls = CoreModel::getInstance()->getCore()->getCalls();
|
||||||
|
auto haveCall = std::find_if(currentCalls.begin(), currentCalls.end(),
|
||||||
|
[addressToInvite](const std::shared_ptr<linphone::Call> &call) {
|
||||||
|
return call->getRemoteAddress()->weakEqual(addressToInvite);
|
||||||
|
});
|
||||||
|
if (haveCall == currentCalls.end()) mConferenceModel->addParticipant(addressToInvite);
|
||||||
|
});
|
||||||
|
// else {
|
||||||
|
// runningCallsToAdd.push_back(*haveCall);
|
||||||
|
// mConferenceModel->addParticipants(runningCallsToAdd);
|
||||||
|
// }
|
||||||
|
/*
|
||||||
|
std::list<std::shared_ptr<linphone::Address>> addressesToInvite;
|
||||||
|
addressesToInvite.push_back(addressToInvite);
|
||||||
|
auto callParameters =
|
||||||
|
CoreManager::getInstance()->getCore()->createCallParams(mConferenceModel->getConference()->getCall());
|
||||||
|
mConferenceModel->getConference()->inviteParticipants(addressesToInvite, callParameters);*/
|
||||||
|
}
|
||||||
|
emit participant->lStartInvitation();
|
||||||
|
emit countChanged();
|
||||||
|
// emit addressAdded(address);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// const QSharedPointer<ParticipantCore>
|
// const QSharedPointer<ParticipantCore>
|
||||||
// ParticipantList::getParticipant(const std::shared_ptr<const linphone::Address> &address) const {
|
// ParticipantList::getParticipant(const std::shared_ptr<const linphone::Address> &address) const {
|
||||||
// if (address) {
|
// if (address) {
|
||||||
|
|
@ -271,7 +310,8 @@ void ParticipantList::remove(ParticipantCore *participant) {
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
|
||||||
// void ParticipantList::setAdminStatus(const std::shared_ptr<linphone::Participant> participant, const bool &isAdmin) {
|
// void ParticipantList::setAdminStatus(const std::shared_ptr<linphone::Participant> participant, const bool
|
||||||
|
// &isAdmin) {
|
||||||
// // if (mChatRoomModel) mChatRoomModel->getChatRoom()->setParticipantAdminStatus(participant, isAdmin);
|
// // if (mChatRoomModel) mChatRoomModel->getChatRoom()->setParticipantAdminStatus(participant, isAdmin);
|
||||||
// // if (mConferenceModel) mConferenceModel->getConference()->setParticipantAdminStatus(participant, isAdmin);
|
// // if (mConferenceModel) mConferenceModel->getConference()->setParticipantAdminStatus(participant, isAdmin);
|
||||||
// }
|
// }
|
||||||
|
|
@ -324,8 +364,8 @@ void ParticipantList::remove(ParticipantCore *participant) {
|
||||||
// // if (participant) remove(participant.get());
|
// // if (participant) remove(participant.get());
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// void ParticipantList::onParticipantAdminStatusChanged(const std::shared_ptr<const linphone::EventLog> &eventLog) {
|
// void ParticipantList::onParticipantAdminStatusChanged(const std::shared_ptr<const linphone::EventLog> &eventLog)
|
||||||
// onParticipantAdminStatusChanged(eventLog->getParticipantAddress());
|
// { onParticipantAdminStatusChanged(eventLog->getParticipantAddress());
|
||||||
// }
|
// }
|
||||||
// void ParticipantList::onParticipantAdminStatusChanged(const std::shared_ptr<const linphone::Participant>
|
// void ParticipantList::onParticipantAdminStatusChanged(const std::shared_ptr<const linphone::Participant>
|
||||||
// &participant) {
|
// &participant) {
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,8 @@ public:
|
||||||
// getParticipant(const std::shared_ptr<const linphone::Participant> &participant) const;
|
// getParticipant(const std::shared_ptr<const linphone::Participant> &participant) const;
|
||||||
|
|
||||||
Q_INVOKABLE void remove(ParticipantCore *participant);
|
Q_INVOKABLE void remove(ParticipantCore *participant);
|
||||||
|
void addAddress(const QString &address);
|
||||||
|
|
||||||
std::list<std::shared_ptr<linphone::Address>> getParticipants() const;
|
std::list<std::shared_ptr<linphone::Address>> getParticipants() const;
|
||||||
|
|
||||||
bool contains(const QString &address) const;
|
bool contains(const QString &address) const;
|
||||||
|
|
@ -77,8 +79,8 @@ public:
|
||||||
// void onParticipantDeviceRemoved(const std::shared_ptr<const linphone::EventLog> &eventLog);
|
// void onParticipantDeviceRemoved(const std::shared_ptr<const linphone::EventLog> &eventLog);
|
||||||
// void
|
// void
|
||||||
// onParticipantRegistrationSubscriptionRequested(const std::shared_ptr<const linphone::Address>
|
// onParticipantRegistrationSubscriptionRequested(const std::shared_ptr<const linphone::Address>
|
||||||
// &participantAddress); void onParticipantRegistrationUnsubscriptionRequested( const std::shared_ptr<const
|
// &participantAddress); void onParticipantRegistrationUnsubscriptionRequested( const
|
||||||
// linphone::Address> &participantAddress); void onStateChanged();
|
// std::shared_ptr<const linphone::Address> &participantAddress); void onStateChanged();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void securityLevelChanged();
|
void securityLevelChanged();
|
||||||
|
|
|
||||||
|
|
@ -152,41 +152,14 @@ void ParticipantProxy::setShowMe(const bool &show) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// void ParticipantProxy::addAddress(const QString &address) {
|
void ParticipantProxy::addAddress(const QString &address) {
|
||||||
// if (!participantsModel->contains(address)) {
|
mParticipants->addAddress(address);
|
||||||
// QSharedPointer<ParticipantCore> participant = QSharedPointer<ParticipantCore>::create(nullptr);
|
}
|
||||||
// connect(participant.get(), &ParticipantCore::invitationTimeout, this, &ParticipantProxy::removeModel);
|
|
||||||
// participant->setSipAddress(address);
|
void ParticipantProxy::addAddresses(const QStringList &addresses) {
|
||||||
// participantsModel->add(participant);
|
for (auto &address : addresses)
|
||||||
// if (mChatRoomModel && mChatRoomModel->getChatRoom()) { // Invite and wait for its creation
|
mParticipants->addAddress(address);
|
||||||
// participant->startInvitation();
|
}
|
||||||
// mChatRoomModel->getChatRoom()->addParticipant(Utils::interpretUrl(address));
|
|
||||||
// }
|
|
||||||
// if (mConferenceModel && mConferenceModel->getConference()) {
|
|
||||||
// auto addressToInvite = Utils::interpretUrl(address);
|
|
||||||
// std::list<std::shared_ptr<linphone::Call>> runningCallsToAdd;
|
|
||||||
// auto currentCalls = CoreManager::getInstance()->getCore()->getCalls();
|
|
||||||
// auto haveCall = std::find_if(currentCalls.begin(), currentCalls.end(),
|
|
||||||
// [addressToInvite](const std::shared_ptr<linphone::Call> &call) {
|
|
||||||
// return call->getRemoteAddress()->weakEqual(addressToInvite);
|
|
||||||
// });
|
|
||||||
// participant->startInvitation();
|
|
||||||
// if (haveCall == currentCalls.end()) mConferenceModel->getConference()->addParticipant(addressToInvite);
|
|
||||||
// else {
|
|
||||||
// runningCallsToAdd.push_back(*haveCall);
|
|
||||||
// mConferenceModel->getConference()->addParticipants(runningCallsToAdd);
|
|
||||||
// }
|
|
||||||
// /*
|
|
||||||
// std::list<std::shared_ptr<linphone::Address>> addressesToInvite;
|
|
||||||
// addressesToInvite.push_back(addressToInvite);
|
|
||||||
// auto callParameters =
|
|
||||||
// CoreManager::getInstance()->getCore()->createCallParams(mConferenceModel->getConference()->getCall());
|
|
||||||
// mConferenceModel->getConference()->inviteParticipants(addressesToInvite, callParameters);*/
|
|
||||||
// }
|
|
||||||
// emit countChanged();
|
|
||||||
// emit addressAdded(address);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
void ParticipantProxy::removeParticipant(ParticipantCore *participant) {
|
void ParticipantProxy::removeParticipant(ParticipantCore *participant) {
|
||||||
if (participant) {
|
if (participant) {
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,8 @@ public:
|
||||||
void setConferenceModel(ConferenceModel *conferenceModel);
|
void setConferenceModel(ConferenceModel *conferenceModel);
|
||||||
void setShowMe(const bool &show);
|
void setShowMe(const bool &show);
|
||||||
|
|
||||||
// Q_INVOKABLE void addAddress(const QString &address);
|
Q_INVOKABLE void addAddress(const QString &address);
|
||||||
|
Q_INVOKABLE void addAddresses(const QStringList &addresses);
|
||||||
Q_INVOKABLE void removeParticipant(ParticipantCore *participant);
|
Q_INVOKABLE void removeParticipant(ParticipantCore *participant);
|
||||||
Q_INVOKABLE void setParticipantAdminStatus(ParticipantCore *participant, bool status);
|
Q_INVOKABLE void setParticipantAdminStatus(ParticipantCore *participant, bool status);
|
||||||
Q_INVOKABLE void setAddresses(ConferenceInfoModel *conferenceInfoModel);
|
Q_INVOKABLE void setAddresses(ConferenceInfoModel *conferenceInfoModel);
|
||||||
|
|
|
||||||
|
|
@ -52,11 +52,11 @@ void ConferenceModel::setPaused(bool paused) {
|
||||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConferenceModel::removeParticipant(std::shared_ptr<linphone::Participant> p) {
|
void ConferenceModel::removeParticipant(const std::shared_ptr<linphone::Participant> &p) {
|
||||||
mMonitor->removeParticipant(p);
|
mMonitor->removeParticipant(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConferenceModel::removeParticipant(std::shared_ptr<linphone::Address> address) {
|
void ConferenceModel::removeParticipant(const std::shared_ptr<linphone::Address> &address) {
|
||||||
for (auto &p : mMonitor->getParticipantList()) {
|
for (auto &p : mMonitor->getParticipantList()) {
|
||||||
if (address->asStringUriOnly() == p->getAddress()->asStringUriOnly()) {
|
if (address->asStringUriOnly() == p->getAddress()->asStringUriOnly()) {
|
||||||
mMonitor->removeParticipant(p);
|
mMonitor->removeParticipant(p);
|
||||||
|
|
@ -64,6 +64,10 @@ void ConferenceModel::removeParticipant(std::shared_ptr<linphone::Address> addre
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConferenceModel::addParticipant(const std::shared_ptr<linphone::Address> &address) {
|
||||||
|
mMonitor->addParticipant(address);
|
||||||
|
}
|
||||||
|
|
||||||
void ConferenceModel::setMicrophoneMuted(bool isMuted) {
|
void ConferenceModel::setMicrophoneMuted(bool isMuted) {
|
||||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||||
mMonitor->setMicrophoneMuted(isMuted);
|
mMonitor->setMicrophoneMuted(isMuted);
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,9 @@ public:
|
||||||
|
|
||||||
void setPaused(bool paused);
|
void setPaused(bool paused);
|
||||||
|
|
||||||
void removeParticipant(std::shared_ptr<linphone::Participant> p);
|
void removeParticipant(const std::shared_ptr<linphone::Participant> &p);
|
||||||
void removeParticipant(std::shared_ptr<linphone::Address> address);
|
void removeParticipant(const std::shared_ptr<linphone::Address> &address);
|
||||||
|
void addParticipant(const std::shared_ptr<linphone::Address> &address);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void microphoneMutedChanged(bool isMuted);
|
void microphoneMutedChanged(bool isMuted);
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ DEFINE_ABSTRACT_OBJECT(ParticipantModel)
|
||||||
ParticipantModel::ParticipantModel(std::shared_ptr<linphone::Participant> linphoneParticipant, QObject *parent)
|
ParticipantModel::ParticipantModel(std::shared_ptr<linphone::Participant> linphoneParticipant, QObject *parent)
|
||||||
: QObject(parent) {
|
: QObject(parent) {
|
||||||
mParticipant = linphoneParticipant;
|
mParticipant = linphoneParticipant;
|
||||||
assert(mParticipant);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ParticipantModel::~ParticipantModel() {
|
ParticipantModel::~ParticipantModel() {
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,17 @@ Window {
|
||||||
property var callObj
|
property var callObj
|
||||||
|
|
||||||
function joinConference(withVideo) {
|
function joinConference(withVideo) {
|
||||||
if (!conferenceInfo || conferenceInfo.core.uri.length === 0) UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence n'a pas pu démarrer en raison d'une erreur d'uri."))
|
if (!conferenceInfo || conferenceInfo.core.uri.length === 0) UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence n'a pas pu démarrer en raison d'une erreur d'uri."), mainWindow)
|
||||||
else {
|
else {
|
||||||
callObj = UtilsCpp.createCall(conferenceInfo.core.uri, withVideo)
|
callObj = UtilsCpp.createCall(conferenceInfo.core.uri, withVideo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function showInformationPopup(title, description, isSuccess) {
|
||||||
|
var infoPopup = popupComp.createObject(popupLayout, {"title": title, "description": description, "isSuccess": isSuccess})
|
||||||
|
infoPopup.index = popupLayout.popupList.length
|
||||||
|
popupLayout.popupList.push(infoPopup)
|
||||||
|
infoPopup.open()
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
enabled: call != undefined && call != null
|
enabled: call != undefined && call != null
|
||||||
|
|
@ -372,238 +378,271 @@ Window {
|
||||||
Layout.rightMargin: 10 * DefaultStyle.dp
|
Layout.rightMargin: 10 * DefaultStyle.dp
|
||||||
visible: false
|
visible: false
|
||||||
function replace(id) {
|
function replace(id) {
|
||||||
rightPanelStack.replace(id, Control.StackView.Immediate)
|
contentStackView.replace(id, Control.StackView.Immediate)
|
||||||
}
|
}
|
||||||
headerContent: Text {
|
headerStack.currentIndex: 0
|
||||||
id: rightPanelTitle
|
contentStackView.initialItem: callsListPanel
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
headerValidateButtonText: qsTr("Ajouter")
|
||||||
width: rightPanel.width
|
}
|
||||||
color: mainWindow.conference ? DefaultStyle.main1_500_main : DefaultStyle.main2_700
|
Component {
|
||||||
// text: qsTr("Transfert d'appel")
|
id: contactsListPanel
|
||||||
font {
|
CallContactsLists {
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Transfert d'appel")
|
||||||
weight: 800 * DefaultStyle.dp
|
sideMargin: 10 * DefaultStyle.dp
|
||||||
|
topMargin: 15 * DefaultStyle.dp
|
||||||
|
groupCallVisible: false
|
||||||
|
searchBarColor: DefaultStyle.grey_0
|
||||||
|
searchBarBorderColor: DefaultStyle.grey_200
|
||||||
|
onCallButtonPressed: (address) => {
|
||||||
|
mainWindow.call.core.lTransferCall(address)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Control.StackView {
|
}
|
||||||
id: rightPanelStack
|
Component {
|
||||||
width: parent.width
|
id: dialerPanel
|
||||||
height: parent.height
|
ColumnLayout {
|
||||||
initialItem: callsListPanel
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Dialer")
|
||||||
Component {
|
Item {
|
||||||
id: contactsListPanel
|
Layout.fillWidth: true
|
||||||
CallContactsLists {
|
Layout.fillHeight: true
|
||||||
Control.StackView.onActivated: rightPanelTitle.text = qsTr("Transfert d'appel")
|
|
||||||
sideMargin: 10 * DefaultStyle.dp
|
|
||||||
topMargin: 15 * DefaultStyle.dp
|
|
||||||
groupCallVisible: false
|
|
||||||
searchBarColor: DefaultStyle.grey_0
|
|
||||||
searchBarBorderColor: DefaultStyle.grey_200
|
|
||||||
onCallButtonPressed: (address) => {
|
|
||||||
mainWindow.call.core.lTransferCall(address)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Component {
|
SearchBar {
|
||||||
id: dialerPanel
|
id: dialerTextInput
|
||||||
ColumnLayout {
|
Layout.fillWidth: true
|
||||||
Control.StackView.onActivated: rightPanelTitle.text = qsTr("Dialer")
|
Layout.leftMargin: 10 * DefaultStyle.dp
|
||||||
Item {
|
Layout.rightMargin: 10 * DefaultStyle.dp
|
||||||
Layout.fillWidth: true
|
magnifierVisible: false
|
||||||
Layout.fillHeight: true
|
color: DefaultStyle.grey_0
|
||||||
}
|
borderColor: DefaultStyle.grey_200
|
||||||
SearchBar {
|
placeholderText: ""
|
||||||
id: dialerTextInput
|
numericPad: numPad
|
||||||
Layout.fillWidth: true
|
numericPadButton.visible: false
|
||||||
Layout.leftMargin: 10 * DefaultStyle.dp
|
|
||||||
Layout.rightMargin: 10 * DefaultStyle.dp
|
|
||||||
magnifierVisible: false
|
|
||||||
color: DefaultStyle.grey_0
|
|
||||||
borderColor: DefaultStyle.grey_200
|
|
||||||
placeholderText: ""
|
|
||||||
numericPad: numPad
|
|
||||||
numericPadButton.visible: false
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: numPad.height
|
|
||||||
Layout.topMargin: 10 * DefaultStyle.dp
|
|
||||||
property var callObj
|
|
||||||
NumericPad {
|
|
||||||
id: numPad
|
|
||||||
width: parent.width
|
|
||||||
visible: parent.visible
|
|
||||||
closeButtonVisible: false
|
|
||||||
onLaunchCall: {
|
|
||||||
callObj = UtilsCpp.createCall(dialerTextInput.text + "@sip.linphone.org")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Component {
|
Item {
|
||||||
id: callsListPanel
|
Layout.fillWidth: true
|
||||||
ColumnLayout {
|
Layout.preferredHeight: numPad.height
|
||||||
Control.StackView.onActivated: rightPanelTitle.text = qsTr("Liste d'appel")
|
Layout.topMargin: 10 * DefaultStyle.dp
|
||||||
RoundedBackgroundControl {
|
property var callObj
|
||||||
Layout.fillWidth: true
|
NumericPad {
|
||||||
// height: Math.min(callList.height + topPadding + bottomPadding, rightPanelStack.height)
|
id: numPad
|
||||||
Layout.preferredHeight: Math.min(callList.height + topPadding + bottomPadding, rightPanelStack.height)
|
width: parent.width
|
||||||
|
visible: parent.visible
|
||||||
topPadding: 15 * DefaultStyle.dp
|
closeButtonVisible: false
|
||||||
bottomPadding: 15 * DefaultStyle.dp
|
onLaunchCall: {
|
||||||
leftPadding: 15 * DefaultStyle.dp
|
callObj = UtilsCpp.createCall(dialerTextInput.text + "@sip.linphone.org")
|
||||||
rightPadding: 15 * DefaultStyle.dp
|
|
||||||
backgroundColor: DefaultStyle.main2_0
|
|
||||||
|
|
||||||
contentItem: ListView {
|
|
||||||
id: callList
|
|
||||||
model: callsModel
|
|
||||||
height: Math.min(contentHeight, rightPanelStack.height)
|
|
||||||
spacing: 15 * DefaultStyle.dp
|
|
||||||
|
|
||||||
onCountChanged: forceLayout()
|
|
||||||
|
|
||||||
delegate: Item {
|
|
||||||
id: callDelegate
|
|
||||||
width: callList.width
|
|
||||||
height: 45 * DefaultStyle.dp
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: delegateContent
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.leftMargin: 10 * DefaultStyle.dp
|
|
||||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
|
||||||
Avatar {
|
|
||||||
id: delegateAvatar
|
|
||||||
address: modelData.core.peerAddress
|
|
||||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 45 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
id: delegateName
|
|
||||||
property var remoteAddress: UtilsCpp.getDisplayName(modelData.core.peerAddress)
|
|
||||||
text: remoteAddress ? remoteAddress.value : ""
|
|
||||||
Connections {
|
|
||||||
target: modelData.core
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
id: callStateText
|
|
||||||
text: modelData.core.state === LinphoneEnums.CallState.Paused
|
|
||||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
|
||||||
? qsTr("Appel en pause") : qsTr("Appel en cours")
|
|
||||||
}
|
|
||||||
PopupButton {
|
|
||||||
id: listCallOptionsButton
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
|
|
||||||
popup.contentItem: ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
Control.Button {
|
|
||||||
background: Item {}
|
|
||||||
contentItem: RowLayout {
|
|
||||||
Image {
|
|
||||||
source: modelData.core.state === LinphoneEnums.CallState.Paused
|
|
||||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
|
||||||
? AppIcons.phone : AppIcons.pause
|
|
||||||
sourceSize.width: 32 * DefaultStyle.dp
|
|
||||||
sourceSize.height: 32 * DefaultStyle.dp
|
|
||||||
Layout.preferredWidth: 32 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 32 * DefaultStyle.dp
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
text: modelData.core.state === LinphoneEnums.CallState.Paused
|
|
||||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
|
||||||
? qsTr("Reprendre l'appel") : qsTr("Mettre en pause")
|
|
||||||
color: DefaultStyle.main2_500main
|
|
||||||
Layout.preferredWidth: metrics.width
|
|
||||||
}
|
|
||||||
TextMetrics {
|
|
||||||
id: metrics
|
|
||||||
text: qsTr("Reprendre l'appel")
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
|
|
||||||
}
|
|
||||||
Control.Button {
|
|
||||||
background: Item {}
|
|
||||||
contentItem: RowLayout {
|
|
||||||
EffectImage {
|
|
||||||
imageSource: AppIcons.endCall
|
|
||||||
colorizationColor: DefaultStyle.danger_500main
|
|
||||||
width: 32 * DefaultStyle.dp
|
|
||||||
height: 32 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
color: DefaultStyle.danger_500main
|
|
||||||
text: qsTr("Terminer l'appel")
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onClicked: mainWindow.endCall(modelData)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MouseArea{
|
|
||||||
// anchors.fill: delegateLayout
|
|
||||||
// onClicked: {
|
|
||||||
// callsModel.currentCall = modelData
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillHeight: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Component {
|
|
||||||
id: settingsPanel
|
|
||||||
InCallSettingsPanel {
|
|
||||||
Control.StackView.onActivated: rightPanelTitle.text = qsTr("Paramètres")
|
|
||||||
call: mainWindow.call
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Component {
|
|
||||||
id: participantListPanel
|
|
||||||
StackLayout {
|
|
||||||
id: participantsStack
|
|
||||||
currentIndex: 0
|
|
||||||
Control.StackView.onActivated: rightPanelTitle.text = qsTr("Participants (%1)").arg(count)
|
|
||||||
onCurrentIndexChanged: {
|
|
||||||
if (index === 0) rightPanelTitle.text = qsTr("Participants (%1)").arg(count)
|
|
||||||
else rightPanelTitle.text = qsTr("Ajouter des participants")
|
|
||||||
}
|
|
||||||
ParticipantList {
|
|
||||||
call: mainWindow.call
|
|
||||||
onCountChanged: if (Control.StackView.status === Control.StackView.Active) {
|
|
||||||
rightPanelTitle.text = qsTr("Participants (%1)").arg(count)
|
|
||||||
}
|
|
||||||
onAddParticipantRequested: participantsStack.currentIndex = 1
|
|
||||||
}
|
|
||||||
AddParticipantsLayout {
|
|
||||||
conferenceInfoGui: mainWindow.conferenceInfo
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Component {
|
||||||
|
id: callsListPanel
|
||||||
|
ColumnLayout {
|
||||||
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Liste d'appel")
|
||||||
|
RoundedBackgroundControl {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: Math.min(callList.implicitHeight + topPadding + bottomPadding, rightPanel.height)
|
||||||
|
|
||||||
|
topPadding: 15 * DefaultStyle.dp
|
||||||
|
bottomPadding: 15 * DefaultStyle.dp
|
||||||
|
leftPadding: 15 * DefaultStyle.dp
|
||||||
|
rightPadding: 15 * DefaultStyle.dp
|
||||||
|
backgroundColor: mainWindow.conference ? DefaultStyle.grey_0 : DefaultStyle.main2_0
|
||||||
|
|
||||||
|
contentItem: ListView {
|
||||||
|
id: callList
|
||||||
|
model: callsModel
|
||||||
|
implicitHeight: contentHeight// Math.min(contentHeight, rightPanel.height)
|
||||||
|
spacing: 15 * DefaultStyle.dp
|
||||||
|
clip: true
|
||||||
|
onCountChanged: forceLayout()
|
||||||
|
|
||||||
|
delegate: Item {
|
||||||
|
id: callDelegate
|
||||||
|
width: callList.width
|
||||||
|
height: 45 * DefaultStyle.dp
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: delegateContent
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.leftMargin: 10 * DefaultStyle.dp
|
||||||
|
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||||
|
Avatar {
|
||||||
|
id: delegateAvatar
|
||||||
|
address: modelData.core.peerAddress
|
||||||
|
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
id: delegateName
|
||||||
|
property var remoteAddress: UtilsCpp.getDisplayName(modelData.core.peerAddress)
|
||||||
|
text: remoteAddress ? remoteAddress.value : ""
|
||||||
|
Connections {
|
||||||
|
target: modelData.core
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
id: callStateText
|
||||||
|
text: modelData.core.state === LinphoneEnums.CallState.Paused
|
||||||
|
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||||
|
? qsTr("Appel en pause") : qsTr("Appel en cours")
|
||||||
|
}
|
||||||
|
PopupButton {
|
||||||
|
id: listCallOptionsButton
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
|
||||||
|
popup.contentItem: ColumnLayout {
|
||||||
|
spacing: 0
|
||||||
|
Control.Button {
|
||||||
|
background: Item {}
|
||||||
|
contentItem: RowLayout {
|
||||||
|
Image {
|
||||||
|
source: modelData.core.state === LinphoneEnums.CallState.Paused
|
||||||
|
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||||
|
? AppIcons.phone : AppIcons.pause
|
||||||
|
sourceSize.width: 32 * DefaultStyle.dp
|
||||||
|
sourceSize.height: 32 * DefaultStyle.dp
|
||||||
|
Layout.preferredWidth: 32 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 32 * DefaultStyle.dp
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: modelData.core.state === LinphoneEnums.CallState.Paused
|
||||||
|
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||||
|
? qsTr("Reprendre l'appel") : qsTr("Mettre en pause")
|
||||||
|
color: DefaultStyle.main2_500main
|
||||||
|
Layout.preferredWidth: metrics.width
|
||||||
|
}
|
||||||
|
TextMetrics {
|
||||||
|
id: metrics
|
||||||
|
text: qsTr("Reprendre l'appel")
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
|
||||||
|
}
|
||||||
|
Control.Button {
|
||||||
|
background: Item {}
|
||||||
|
contentItem: RowLayout {
|
||||||
|
EffectImage {
|
||||||
|
imageSource: AppIcons.endCall
|
||||||
|
colorizationColor: DefaultStyle.danger_500main
|
||||||
|
width: 32 * DefaultStyle.dp
|
||||||
|
height: 32 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
color: DefaultStyle.danger_500main
|
||||||
|
text: qsTr("Terminer l'appel")
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onClicked: mainWindow.endCall(modelData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// MouseArea{
|
||||||
|
// anchors.fill: delegateLayout
|
||||||
|
// onClicked: {
|
||||||
|
// callsModel.currentCall = modelData
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
id: settingsPanel
|
||||||
|
InCallSettingsPanel {
|
||||||
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Paramètres")
|
||||||
|
call: mainWindow.call
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
id: participantListPanel
|
||||||
|
Control.StackView {
|
||||||
|
id: participantsStack
|
||||||
|
initialItem: participantListComp
|
||||||
|
// Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Participants (%1)").arg(participantList.count)
|
||||||
|
onCurrentItemChanged: rightPanel.headerStack.currentIndex = currentItem.Control.StackView.index
|
||||||
|
property list<string> selectedParticipants
|
||||||
|
signal participantAdded()
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: rightPanel
|
||||||
|
onReturnRequested: participantsStack.pop()
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: participantListComp
|
||||||
|
ParticipantList {
|
||||||
|
id: participantList
|
||||||
|
call: mainWindow.call
|
||||||
|
onAddParticipantRequested: participantsStack.push(addParticipantComp)
|
||||||
|
onCountChanged: if (participantsStack.Control.StackView.status === Control.StackView.Active && participantsStack.currentItem == participantList) {
|
||||||
|
rightPanel.headerTitleText = qsTr("Participants (%1)").arg(count)
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: participantsStack
|
||||||
|
onCurrentItemChanged: {
|
||||||
|
console.log("changing title", participantsStack.currentItem == participantList)
|
||||||
|
if (participantsStack.currentItem == participantList) rightPanel.headerTitleText = qsTr("Participants (%1)").arg(participantList.count)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: rightPanel
|
||||||
|
// TODO : chercher comment relier ces infos pour faire le add des participants
|
||||||
|
onValidateRequested: {
|
||||||
|
participantList.model.addAddresses(participantsStack.selectedParticipants)
|
||||||
|
participantsStack.pop()
|
||||||
|
participantsStack.participantAdded()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
id: addParticipantComp
|
||||||
|
AddParticipantsLayout {
|
||||||
|
id: addParticipantLayout
|
||||||
|
titleLayout.visible: false
|
||||||
|
onSelectedParticipantsCountChanged: {
|
||||||
|
if (participantsStack.Control.StackView.status === Control.StackView.Active && Control.StackView.visible) {
|
||||||
|
rightPanel.headerSubtitleText = qsTr("%1 participant%2 sélectionné").arg(selectedParticipants.length).arg(selectedParticipants.length > 1 ? "s" : "")
|
||||||
|
}
|
||||||
|
participantsStack.selectedParticipants = selectedParticipants
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: participantsStack
|
||||||
|
onCurrentItemChanged: {
|
||||||
|
if (participantsStack.currentItem == addParticipantLayout) {
|
||||||
|
rightPanel.headerTitleText = qsTr("Ajouter des participants")
|
||||||
|
rightPanel.headerSubtitleText = qsTr("%1 participant%2 sélectionné").arg(addParticipantLayout.selectedParticipants.length).arg(addParticipantLayout.selectedParticipants.length > 1 ? "s" : "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onParticipantAdded: {
|
||||||
|
addParticipantLayout.clearSelectedParticipants()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
id: waitingRoom
|
id: waitingRoom
|
||||||
|
|
@ -805,6 +844,7 @@ Window {
|
||||||
onCheckedChanged: mainWindow.call.core.lSetMicrophoneMuted(!mainWindow.call.core.microphoneMuted)
|
onCheckedChanged: mainWindow.call.core.lSetMicrophoneMuted(!mainWindow.call.core.microphoneMuted)
|
||||||
}
|
}
|
||||||
CheckableButton {
|
CheckableButton {
|
||||||
|
visible: mainWindow.conference
|
||||||
iconUrl: AppIcons.usersTwo
|
iconUrl: AppIcons.usersTwo
|
||||||
checked: mainWindow.call && mainWindow.call.core.microphoneMuted
|
checked: mainWindow.call && mainWindow.call.core.microphoneMuted
|
||||||
checkedColor: DefaultStyle.main2_400
|
checkedColor: DefaultStyle.main2_400
|
||||||
|
|
@ -830,7 +870,7 @@ Window {
|
||||||
icon.source: AppIcons.more
|
icon.source: AppIcons.more
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: moreOptionsButton
|
anchors.fill: moreOptionsButton
|
||||||
color: moreOptionsButton.enabled
|
color: moreOptionsButton.enabled
|
||||||
? moreOptionsButton.checked
|
? moreOptionsButton.checked
|
||||||
? DefaultStyle.grey_0
|
? DefaultStyle.grey_0
|
||||||
: DefaultStyle.grey_500
|
: DefaultStyle.grey_500
|
||||||
|
|
@ -838,7 +878,13 @@ Window {
|
||||||
radius: 40 * DefaultStyle.dp
|
radius: 40 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
popup.x: width/2
|
popup.x: width/2
|
||||||
popup.y: y - popup.height + height/4
|
Connections {
|
||||||
|
target: moreOptionsButton.popup
|
||||||
|
onOpened: {
|
||||||
|
console.log("y", moreOptionsButton.y, moreOptionsButton.popup.y, moreOptionsButton.popup.height)
|
||||||
|
moreOptionsButton.popup.y = - moreOptionsButton.popup.height + moreOptionsButton.height/4
|
||||||
|
}
|
||||||
|
}
|
||||||
popup.contentItem: ColumnLayout {
|
popup.contentItem: ColumnLayout {
|
||||||
id: optionsList
|
id: optionsList
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ Item {
|
||||||
rightMargin: 15 * DefaultStyle.dp
|
rightMargin: 15 * DefaultStyle.dp
|
||||||
initialHeadersVisible: false
|
initialHeadersVisible: false
|
||||||
contactMenuVisible: false
|
contactMenuVisible: false
|
||||||
actionMenuVisible: true
|
actionLayoutVisible: true
|
||||||
model: MagicSearchProxy {
|
model: MagicSearchProxy {
|
||||||
searchText: magicSearchBar.text.length === 0 ? "*" : magicSearchBar.text
|
searchText: magicSearchBar.text.length === 0 ? "*" : magicSearchBar.text
|
||||||
aggregationFlag: LinphoneEnums.MagicSearchAggregation.Friend
|
aggregationFlag: LinphoneEnums.MagicSearchAggregation.Friend
|
||||||
|
|
|
||||||
|
|
@ -65,14 +65,13 @@ Control.Button {
|
||||||
}
|
}
|
||||||
|
|
||||||
component ButtonText: Text {
|
component ButtonText: Text {
|
||||||
visible: mainItem.text != undefined
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
width: mainItem.text != undefined ? implicitWidth : 0
|
width: mainItem.text != undefined ? implicitWidth : 0
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
Layout.fillWidth: true
|
// Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
// Layout.fillHeight: true
|
||||||
text: mainItem.text
|
text: mainItem.text
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
color: inversedColors ? mainItem.color : mainItem.textColor
|
color: inversedColors ? mainItem.color : mainItem.textColor
|
||||||
|
|
@ -86,9 +85,8 @@ Control.Button {
|
||||||
}
|
}
|
||||||
|
|
||||||
component ButtonImage: EffectImage {
|
component ButtonImage: EffectImage {
|
||||||
visible: mainItem.icon.source != undefined
|
// Layout.fillWidth: true
|
||||||
Layout.fillWidth: true
|
// Layout.fillHeight: true
|
||||||
Layout.fillHeight: true
|
|
||||||
imageSource: mainItem.icon.source
|
imageSource: mainItem.icon.source
|
||||||
imageWidth: mainItem.icon.width
|
imageWidth: mainItem.icon.width
|
||||||
imageHeight: mainItem.icon.height
|
imageHeight: mainItem.icon.height
|
||||||
|
|
@ -96,11 +94,12 @@ Control.Button {
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: StackLayout {
|
contentItem: StackLayout {
|
||||||
currentIndex: mainItem.text.length != 0 && mainItem.icon.source != undefined
|
id: stacklayout
|
||||||
|
currentIndex: mainItem.text.length != 0 && mainItem.icon.source.toString().length != 0
|
||||||
? 0
|
? 0
|
||||||
: mainItem.text.length != 0
|
: mainItem.text.length != 0
|
||||||
? 1
|
? 1
|
||||||
: mainItem.icon.source != undefined
|
: mainItem.icon.source.toString().length != 0
|
||||||
? 2
|
? 2
|
||||||
: 3
|
: 3
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import QtQuick 2.7
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Controls 2.2 as Control
|
import QtQuick.Controls 2.2 as Control
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
|
|
@ -160,21 +160,28 @@ Item {
|
||||||
spacing: 25 * DefaultStyle.dp
|
spacing: 25 * DefaultStyle.dp
|
||||||
Button {
|
Button {
|
||||||
visible: mainItem.groupCallVisible
|
visible: mainItem.groupCallVisible
|
||||||
Layout.fillWidth: true
|
Layout.preferredWidth: 320 * DefaultStyle.dp
|
||||||
|
padding: 0
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: DefaultStyle.groupCallButtonColor
|
gradient: Gradient {
|
||||||
|
orientation: Gradient.Horizontal
|
||||||
|
GradientStop { position: 0.0; color: DefaultStyle.main2_100}
|
||||||
|
GradientStop { position: 1.0; color: DefaultStyle.grey_0}
|
||||||
|
}
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 50 * DefaultStyle.dp
|
radius: 50 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Image {
|
Image {
|
||||||
source: AppIcons.groupCall
|
source: AppIcons.groupCall
|
||||||
Layout.preferredWidth: 35 * DefaultStyle.dp
|
Layout.preferredWidth: 44 * DefaultStyle.dp
|
||||||
sourceSize.width: 35 * DefaultStyle.dp
|
sourceSize.width: 44 * DefaultStyle.dp
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
text: "Appel de groupe"
|
text: "Appel de groupe"
|
||||||
|
color: DefaultStyle.grey_1000
|
||||||
font {
|
font {
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
|
|
@ -185,36 +192,38 @@ Item {
|
||||||
}
|
}
|
||||||
Image {
|
Image {
|
||||||
source: AppIcons.rightArrow
|
source: AppIcons.rightArrow
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RowLayout {
|
// RowLayout {
|
||||||
// //DEBUG
|
// //DEBUG
|
||||||
// visible: searchBar.text.length > 0
|
// visible: searchBar.text.length > 0
|
||||||
// Layout.maximumWidth: parent.width
|
// Layout.maximumWidth: parent.width
|
||||||
// Layout.fillWidth: true
|
// Layout.fillWidth: true
|
||||||
// Text {
|
// Text {
|
||||||
// text: searchBar.text
|
// text: searchBar.text
|
||||||
// maximumLineCount: 1
|
// maximumLineCount: 1
|
||||||
// elide: Text.ElideRight
|
// elide: Text.ElideRight
|
||||||
// }
|
// }
|
||||||
// Item {
|
// Item {
|
||||||
// Layout.fillWidth: true
|
// Layout.fillWidth: true
|
||||||
// }
|
// }
|
||||||
// Button {
|
// Button {
|
||||||
// implicitWidth: 30 * DefaultStyle.dp
|
// implicitWidth: 30 * DefaultStyle.dp
|
||||||
// implicitHeight: 30 * DefaultStyle.dp
|
// implicitHeight: 30 * DefaultStyle.dp
|
||||||
// background: Item {
|
// background: Item {
|
||||||
// visible: false
|
// visible: false
|
||||||
// }
|
// }
|
||||||
// icon.source: AppIcons.phone
|
// icon.source: AppIcons.phone
|
||||||
// width: 20 * DefaultStyle.dp
|
// width: 20 * DefaultStyle.dp
|
||||||
// height: 20 * DefaultStyle.dp
|
// height: 20 * DefaultStyle.dp
|
||||||
// onClicked: {
|
// onClicked: {
|
||||||
// mainItem.callButtonPressed(searchBar.text)
|
// mainItem.callButtonPressed(searchBar.text)
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Text {
|
Text {
|
||||||
|
|
@ -227,10 +236,10 @@ Item {
|
||||||
ContactsList{
|
ContactsList{
|
||||||
id: contactList
|
id: contactList
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: contentHeight
|
||||||
contactMenuVisible: false
|
contactMenuVisible: false
|
||||||
searchBarText: searchBar.text
|
|
||||||
model: MagicSearchProxy {
|
model: MagicSearchProxy {
|
||||||
searchText: searchBarText.length === 0 ? "*" : searchBarText
|
searchText: searchBar.text.length === 0 ? "*" : searchBar.text
|
||||||
}
|
}
|
||||||
onSelectedContactChanged: {
|
onSelectedContactChanged: {
|
||||||
if (selectedContact) {
|
if (selectedContact) {
|
||||||
|
|
@ -266,10 +275,9 @@ Item {
|
||||||
contactMenuVisible: false
|
contactMenuVisible: false
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.preferredHeight: contentHeight
|
||||||
initialHeadersVisible: false
|
initialHeadersVisible: false
|
||||||
displayNameCapitalization: false
|
displayNameCapitalization: false
|
||||||
// Align the suggestions list to the friends ones (which contains intial column)
|
|
||||||
delegateLeftMargin: 20 * DefaultStyle.dp
|
|
||||||
model: MagicSearchProxy {
|
model: MagicSearchProxy {
|
||||||
searchText: searchBar.text.length === 0 ? "*" : searchBar.text
|
searchText: searchBar.text.length === 0 ? "*" : searchBar.text
|
||||||
sourceFlags: LinphoneEnums.MagicSearchSource.All
|
sourceFlags: LinphoneEnums.MagicSearchSource.All
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,19 @@ import Linphone
|
||||||
|
|
||||||
Control.Page {
|
Control.Page {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property alias headerContent: header.children
|
property alias headerStack: headerStack
|
||||||
|
property alias contentStackView: contentStackView
|
||||||
|
property bool closeButtonVisible: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
property string headerTitleText
|
||||||
|
property string headerSubtitleText
|
||||||
|
property string headerValidateButtonText
|
||||||
|
signal returnRequested()
|
||||||
|
signal validateRequested()
|
||||||
|
|
||||||
|
topPadding: 16 * DefaultStyle.dp
|
||||||
|
leftPadding: 16 * DefaultStyle.dp
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
width: mainItem.width
|
width: mainItem.width
|
||||||
|
|
@ -32,24 +44,93 @@ Control.Page {
|
||||||
width: pageHeader.width
|
width: pageHeader.width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
contentItem: RowLayout {
|
contentItem: StackLayout {
|
||||||
Item {
|
id: headerStack
|
||||||
id: header
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.fillHeight: true
|
Text {
|
||||||
}
|
text: mainItem.headerTitleText
|
||||||
Button {
|
Layout.fillWidth: true
|
||||||
id: closeButton
|
Layout.fillHeight: true
|
||||||
background: Item {
|
Layout.alignment: Qt.AlignVCenter
|
||||||
visible: false
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
color: mainWindow.conference ? DefaultStyle.main1_500_main : DefaultStyle.main2_700
|
||||||
|
font {
|
||||||
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
|
weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
id: closeButton
|
||||||
|
visible: mainItem.closeButtonVisible
|
||||||
|
background: Item {
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
icon.source: AppIcons.closeX
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
icon.width: 24 * DefaultStyle.dp
|
||||||
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
onClicked: mainItem.visible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RowLayout {
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
spacing: 5 * DefaultStyle.dp
|
||||||
|
Button {
|
||||||
|
background: Item{}
|
||||||
|
icon.source: AppIcons.leftArrow
|
||||||
|
icon.width: 24 * DefaultStyle.dp
|
||||||
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
contentImageColor: DefaultStyle.main1_500_main
|
||||||
|
onClicked: mainItem.returnRequested()
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Text {
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
text: mainItem.headerTitleText
|
||||||
|
color: DefaultStyle.main1_500_main
|
||||||
|
font {
|
||||||
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
|
weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
text: mainItem.headerSubtitleText
|
||||||
|
color: DefaultStyle.main2_500main
|
||||||
|
font {
|
||||||
|
pixelSize: 12 * DefaultStyle.dp
|
||||||
|
weight: 300 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
text: mainItem.headerValidateButtonText
|
||||||
|
textSize: 13 * DefaultStyle.dp
|
||||||
|
textWeight: 600 * DefaultStyle.dp
|
||||||
|
onClicked: mainItem.validateRequested()
|
||||||
|
topPadding: 6 * DefaultStyle.dp
|
||||||
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
|
leftPadding: 12 * DefaultStyle.dp
|
||||||
|
rightPadding: 12 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
icon.source: AppIcons.closeX
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
icon.width: 24 * DefaultStyle.dp
|
|
||||||
icon.height: 24 * DefaultStyle.dp
|
|
||||||
onClicked: mainItem.visible = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
contentItem: Control.StackView {
|
||||||
|
id: contentStackView
|
||||||
|
// width: parent.width
|
||||||
|
// height: parent.height
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import UtilsCpp 1.0
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
Layout.preferredHeight: contentHeight
|
|
||||||
height: contentHeight
|
height: contentHeight
|
||||||
visible: contentHeight > 0
|
visible: contentHeight > 0
|
||||||
clip: true
|
clip: true
|
||||||
|
|
@ -18,7 +17,7 @@ ListView {
|
||||||
// dots popup menu
|
// dots popup menu
|
||||||
property bool contactMenuVisible: true
|
property bool contactMenuVisible: true
|
||||||
// call, video call etc menu
|
// call, video call etc menu
|
||||||
property bool actionMenuVisible: true
|
property bool actionLayoutVisible: false
|
||||||
property bool initialHeadersVisible: true
|
property bool initialHeadersVisible: true
|
||||||
property bool displayNameCapitalization: true
|
property bool displayNameCapitalization: true
|
||||||
property bool showOnlyFavourites: false
|
property bool showOnlyFavourites: false
|
||||||
|
|
@ -35,7 +34,6 @@ ListView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
property int delegateLeftMargin: 0
|
|
||||||
currentIndex: -1
|
currentIndex: -1
|
||||||
|
|
||||||
property FriendGui selectedContact: model.getAt(currentIndex) || null
|
property FriendGui selectedContact: model.getAt(currentIndex) || null
|
||||||
|
|
@ -88,7 +86,7 @@ ListView {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: contactDelegate
|
id: contactDelegate
|
||||||
anchors.left: initial.visible ? initial.right : parent.left
|
anchors.left: initial.visible ? initial.right : parent.left
|
||||||
anchors.leftMargin: 10 * DefaultStyle.dp + mainItem.delegateLeftMargin
|
anchors.leftMargin: 10 * DefaultStyle.dp
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
@ -125,14 +123,14 @@ ListView {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: actionsRow
|
id: actionsRow
|
||||||
z: 1
|
z: 1
|
||||||
visible: mainItem.actionMenuVisible || friendPopup.visible
|
// visible: mainItem.actionLayoutVisible || friendPopup.visible
|
||||||
// anchors.fill: parent
|
// anchors.fill: parent
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
RowLayout{
|
RowLayout{
|
||||||
property var callObj
|
property var callObj
|
||||||
visible: mainItem.actionMenuVisible
|
visible: mainItem.actionLayoutVisible
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
Button {
|
Button {
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ ListView {
|
||||||
|
|
||||||
property bool hoverEnabled: true
|
property bool hoverEnabled: true
|
||||||
|
|
||||||
property int delegateLeftMargin: 0
|
|
||||||
currentIndex: -1
|
currentIndex: -1
|
||||||
|
|
||||||
property var delegateButtons
|
property var delegateButtons
|
||||||
|
|
@ -99,8 +98,8 @@ ListView {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: conferenceInfoDelegate
|
id: conferenceInfoDelegate
|
||||||
anchors.left: dateDay.visible ? dateDay.right : parent.left
|
anchors.left: dateDay.visible ? dateDay.right : parent.left
|
||||||
anchors.leftMargin: 10 * DefaultStyle.dp + mainItem.delegateLeftMargin
|
anchors.leftMargin: 10 * DefaultStyle.dp
|
||||||
anchors.rightMargin: 25 * DefaultStyle.dp + mainItem.delegateLeftMargin
|
anchors.rightMargin: 5 * DefaultStyle.dp
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
radius: 10 * DefaultStyle.dp
|
radius: 10 * DefaultStyle.dp
|
||||||
|
|
@ -142,8 +141,8 @@ ListView {
|
||||||
source: conferenceInfoDelegate
|
source: conferenceInfoDelegate
|
||||||
anchors.fill: conferenceInfoDelegate
|
anchors.fill: conferenceInfoDelegate
|
||||||
shadowEnabled: true
|
shadowEnabled: true
|
||||||
shadowBlur: 1.0
|
shadowBlur: 0.8
|
||||||
shadowOpacity: 0.1
|
shadowOpacity: 0.2
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,6 @@ ListView {
|
||||||
property CallGui call
|
property CallGui call
|
||||||
|
|
||||||
property bool hoverEnabled: true
|
property bool hoverEnabled: true
|
||||||
// dots popup menu
|
|
||||||
property bool contactMenuVisible: true
|
|
||||||
// call, video call etc menu
|
|
||||||
property bool actionMenuVisible: true
|
|
||||||
property bool initialHeadersVisible: true
|
property bool initialHeadersVisible: true
|
||||||
property bool displayNameCapitalization: true
|
property bool displayNameCapitalization: true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,6 @@ ListView {
|
||||||
property bool isMeAdmin: me ? me.core.isAdmin : false
|
property bool isMeAdmin: me ? me.core.isAdmin : false
|
||||||
|
|
||||||
property bool hoverEnabled: true
|
property bool hoverEnabled: true
|
||||||
// dots popup menu
|
|
||||||
property bool contactMenuVisible: true
|
|
||||||
// call, video call etc menu
|
|
||||||
property bool actionMenuVisible: true
|
|
||||||
property bool initialHeadersVisible: true
|
property bool initialHeadersVisible: true
|
||||||
property bool displayNameCapitalization: true
|
property bool displayNameCapitalization: true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,20 @@ ColumnLayout {
|
||||||
property string validateButtonText
|
property string validateButtonText
|
||||||
property string placeHolderText: qsTr("Rechercher des contacts")
|
property string placeHolderText: qsTr("Rechercher des contacts")
|
||||||
property color titleColor: DefaultStyle.main2_700
|
property color titleColor: DefaultStyle.main2_700
|
||||||
|
property list<string> selectedParticipants: contactList.selectedContacts
|
||||||
|
property int selectedParticipantsCount: selectedParticipants.length
|
||||||
|
property alias titleLayout: titleLayout
|
||||||
property ConferenceInfoGui conferenceInfoGui
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
signal returnRequested()
|
signal returnRequested()
|
||||||
Layout.preferredWidth: 362 * DefaultStyle.dp
|
// Layout.preferredWidth: 362 * DefaultStyle.dp
|
||||||
|
|
||||||
|
function clearSelectedParticipants() {
|
||||||
|
contactList.selectedContacts.clear()
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.preferredWidth: 362 * DefaultStyle.dp
|
id: titleLayout
|
||||||
|
Layout.fillWidth: true
|
||||||
Button {
|
Button {
|
||||||
background: Item{}
|
background: Item{}
|
||||||
icon.source: AppIcons.leftArrow
|
icon.source: AppIcons.leftArrow
|
||||||
|
|
@ -39,6 +47,7 @@ ColumnLayout {
|
||||||
Layout.preferredWidth: 70 * DefaultStyle.dp
|
Layout.preferredWidth: 70 * DefaultStyle.dp
|
||||||
topPadding: 6 * DefaultStyle.dp
|
topPadding: 6 * DefaultStyle.dp
|
||||||
bottomPadding: 6 * DefaultStyle.dp
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
|
enabled: contactList.selectedContacts.length != 0
|
||||||
// leftPadding: 12 * DefaultStyle.dp
|
// leftPadding: 12 * DefaultStyle.dp
|
||||||
// rightPadding: 12 * DefaultStyle.dp
|
// rightPadding: 12 * DefaultStyle.dp
|
||||||
text: mainItem.validateButtonText
|
text: mainItem.validateButtonText
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,12 @@ Item {
|
||||||
property string noItemButtonText
|
property string noItemButtonText
|
||||||
property string newItemIconSource
|
property string newItemIconSource
|
||||||
property string emptyListText
|
property string emptyListText
|
||||||
|
property bool showDefaultItem: true
|
||||||
|
property color rightPanelColor: DefaultStyle.grey_100
|
||||||
property alias leftPanelContent: leftPanel.children
|
property alias leftPanelContent: leftPanel.children
|
||||||
property alias rightPanelStackView: rightPanelStackView
|
property alias rightPanelStackView: rightPanelStackView
|
||||||
property alias contactEditionComp: contactEditionComp
|
property alias contactEditionComp: contactEditionComp
|
||||||
property alias rightPanel: rightPanel
|
property alias rightPanel: rightPanel
|
||||||
property bool showDefaultItem: true
|
|
||||||
signal noItemButtonPressed()
|
signal noItemButtonPressed()
|
||||||
signal contactEditionClosed()
|
signal contactEditionClosed()
|
||||||
|
|
||||||
|
|
@ -151,7 +152,7 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rightPanel
|
id: rightPanel
|
||||||
clip: true
|
clip: true
|
||||||
color: DefaultStyle.grey_100
|
color: mainItem.rightPanelColor
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
StackLayout {
|
StackLayout {
|
||||||
|
|
@ -227,11 +228,13 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Control.StackView {
|
Item {
|
||||||
id: rightPanelStackView
|
Control.StackView {
|
||||||
Layout.fillWidth: true
|
id: rightPanelStackView
|
||||||
Layout.fillHeight: true
|
anchors.fill: parent
|
||||||
Layout.leftMargin: 39 * DefaultStyle.dp
|
anchors.topMargin: 39 * DefaultStyle.dp
|
||||||
|
anchors.leftMargin: 39 * DefaultStyle.dp
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// We need this component here as it is used in multiple subPages (Call and Contact pages)
|
// We need this component here as it is used in multiple subPages (Call and Contact pages)
|
||||||
Component {
|
Component {
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,9 @@ AbstractMainPage {
|
||||||
id: favoriteList
|
id: favoriteList
|
||||||
hoverEnabled: mainItem.leftPanelEnabled
|
hoverEnabled: mainItem.leftPanelEnabled
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: contentHeight
|
||||||
showOnlyFavourites: true
|
showOnlyFavourites: true
|
||||||
|
contactMenuVisible: true
|
||||||
model: allFriends
|
model: allFriends
|
||||||
onSelectedContactChanged: {
|
onSelectedContactChanged: {
|
||||||
if (selectedContact) {
|
if (selectedContact) {
|
||||||
|
|
@ -207,7 +209,9 @@ AbstractMainPage {
|
||||||
ContactsList{
|
ContactsList{
|
||||||
id: contactList
|
id: contactList
|
||||||
hoverEnabled: mainItem.leftPanelEnabled
|
hoverEnabled: mainItem.leftPanelEnabled
|
||||||
|
contactMenuVisible: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: contentHeight
|
||||||
searchBarText: searchBar.text
|
searchBarText: searchBar.text
|
||||||
model: allFriends
|
model: allFriends
|
||||||
onSelectedContactChanged: {
|
onSelectedContactChanged: {
|
||||||
|
|
|
||||||
|
|
@ -10,19 +10,19 @@ AbstractMainPage {
|
||||||
noItemButtonText: qsTr("Créer une réunion")
|
noItemButtonText: qsTr("Créer une réunion")
|
||||||
emptyListText: qsTr("Aucune réunion")
|
emptyListText: qsTr("Aucune réunion")
|
||||||
newItemIconSource: AppIcons.plusCircle
|
newItemIconSource: AppIcons.plusCircle
|
||||||
// rightPanel.color: DefaultStyle.grey_0
|
rightPanelColor: selectedConference ? DefaultStyle.grey_0 : DefaultStyle.grey_100
|
||||||
|
|
||||||
// disable left panel contact list interaction while a contact is being edited
|
// disable left panel contact list interaction while a contact is being edited
|
||||||
property bool leftPanelEnabled: true
|
property bool leftPanelEnabled: true
|
||||||
property ConferenceInfoGui selectedConference
|
property ConferenceInfoGui selectedConference
|
||||||
property int meetingListCount
|
property int meetingListCount
|
||||||
signal newConfCreated()
|
signal newConfCreated()
|
||||||
|
onVisibleChanged: if (visible) rightPanelStackView.push(overridenRightPanel, Control.StackView.Immediate)
|
||||||
|
|
||||||
onSelectedConferenceChanged: {
|
onSelectedConferenceChanged: {
|
||||||
if (selectedConference) {
|
if (selectedConference) {
|
||||||
if (!rightPanelStackView.currentItem || rightPanelStackView.currentItem.objectName != "meetingDetail") rightPanelStackView.replace(meetingDetail, Control.StackView.Immediate)
|
/*if (!overridenRightPanelStackView.currentItem || overridenRightPanelStackView.currentItem.objectName != "meetingDetail") */overridenRightPanelStackView.replace(meetingDetail, Control.StackView.Immediate)
|
||||||
} else {
|
} else {
|
||||||
if (rightPanelStackView.currentItem && rightPanelStackView.currentItem.objectName === "meetingDetail") rightPanelStackView.clear()
|
/*if (overridenRightPanelStackView.currentItem && overridenRightPanelStackView.currentItem.objectName === "meetingDetail")*/ overridenRightPanelStackView.clear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -42,7 +42,7 @@ AbstractMainPage {
|
||||||
}', mainItem)
|
}', mainItem)
|
||||||
leftPanelStackView.push(createConf, {"conferenceInfoGui": confInfoGui, "isCreation": isCreation})
|
leftPanelStackView.push(createConf, {"conferenceInfoGui": confInfoGui, "isCreation": isCreation})
|
||||||
} else {
|
} else {
|
||||||
rightPanelStackView.push(editConf, {"conferenceInfoGui": confInfoGui, "isCreation": isCreation})
|
overridenRightPanelStackView.push(editConf, {"conferenceInfoGui": confInfoGui, "isCreation": isCreation})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -92,23 +92,25 @@ AbstractMainPage {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
leftPanelContent: ColumnLayout {
|
leftPanelContent: RowLayout {
|
||||||
id: leftPanel
|
id: leftPanel
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
property int sideMargin: 25 * DefaultStyle.dp
|
property int sideMargin: 20 * DefaultStyle.dp
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
// Layout.topMargin: 30 * DefaultStyle.dp
|
// Layout.topMargin: 30 * DefaultStyle.dp
|
||||||
Layout.leftMargin: leftPanel.sideMargin
|
// Layout.leftMargin: leftPanel.sideMargin
|
||||||
spacing: 30 * DefaultStyle.dp
|
|
||||||
|
|
||||||
enabled: mainItem.leftPanelEnabled
|
enabled: mainItem.leftPanelEnabled
|
||||||
|
spacing: 30 * DefaultStyle.dp
|
||||||
|
Layout.leftMargin: leftPanel.sideMargin
|
||||||
|
Layout.rightMargin: leftPanel.sideMargin
|
||||||
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: leftPanelStackView.currentItem.objectName == "listLayout"
|
visible: leftPanelStackView.currentItem.objectName == "listLayout"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.rightMargin: leftPanel.sideMargin
|
// Layout.rightMargin: leftPanel.sideMargin
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("Réunions")
|
text: qsTr("Réunions")
|
||||||
|
|
@ -142,75 +144,87 @@ AbstractMainPage {
|
||||||
initialItem: listLayout
|
initialItem: listLayout
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
Component {
|
}
|
||||||
id: listLayout
|
}
|
||||||
ColumnLayout {
|
|
||||||
property string objectName: "listLayout"
|
|
||||||
spacing: 19 * DefaultStyle.dp
|
|
||||||
|
|
||||||
SearchBar {
|
Control.ScrollBar {
|
||||||
id: searchBar
|
id: meetingsScrollbar
|
||||||
Layout.fillWidth: true
|
visible: leftPanelStackView.currentItem.objectName == "listLayout"
|
||||||
Layout.rightMargin: leftPanel.sideMargin
|
active: true
|
||||||
placeholderText: qsTr("Rechercher une réunion")
|
interactive: true
|
||||||
}
|
policy: Control.ScrollBar.AsNeeded
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Text {
|
Item {
|
||||||
Layout.fillHeight: true
|
id: overridenRightPanel
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Control.StackView {
|
||||||
text: mainItem.emptyListText
|
id: overridenRightPanelStackView
|
||||||
font {
|
RectangleTest{anchors.fill: parent}
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
width: 393 * DefaultStyle.dp
|
||||||
weight: 800 * DefaultStyle.dp
|
anchors.top: parent.top
|
||||||
}
|
// Layout.fillWidth: false
|
||||||
visible: mainItem.showDefaultItem
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
Component {
|
||||||
MeetingList {
|
id: listLayout
|
||||||
id: conferenceList
|
ColumnLayout {
|
||||||
visible: count != 0
|
property string objectName: "listLayout"
|
||||||
hoverEnabled: mainItem.leftPanelEnabled
|
spacing: 19 * DefaultStyle.dp
|
||||||
Layout.fillWidth: true
|
Control.StackView.onDeactivated: {
|
||||||
Layout.fillHeight: true
|
mainItem.selectedConference = null
|
||||||
Layout.topMargin: 20 * DefaultStyle.dp
|
// mainItem.righPanelStackView.clear()
|
||||||
searchBarText: searchBar.text
|
}
|
||||||
onSelectedConferenceChanged: {
|
Control.StackView.onActivated: mainItem.selectedConference = conferenceList.selectedConference
|
||||||
mainItem.selectedConference = selectedConference
|
SearchBar {
|
||||||
}
|
id: searchBar
|
||||||
onCountChanged: {
|
Layout.fillWidth: true
|
||||||
mainItem.meetingListCount = count
|
placeholderText: qsTr("Rechercher une réunion")
|
||||||
}
|
}
|
||||||
Connections {
|
|
||||||
target: mainItem
|
Text {
|
||||||
onNewConfCreated: {
|
Layout.fillHeight: true
|
||||||
conferenceList.forceUpdate()
|
Layout.alignment: Qt.AlignHCenter
|
||||||
}
|
text: mainItem.emptyListText
|
||||||
}
|
font {
|
||||||
Control.ScrollBar.vertical: meetingsScrollbar
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
}
|
weight: 800 * DefaultStyle.dp
|
||||||
Control.ScrollBar {
|
}
|
||||||
id: meetingsScrollbar
|
visible: mainItem.showDefaultItem
|
||||||
visible: leftPanelStackView.currentItem.objectName == "listLayout"
|
}
|
||||||
active: true
|
|
||||||
interactive: true
|
RowLayout {
|
||||||
policy: Control.ScrollBar.AsNeeded
|
MeetingList {
|
||||||
Layout.fillHeight: true
|
id: conferenceList
|
||||||
// anchors.top: parent.top
|
visible: count != 0
|
||||||
// anchors.bottom: parent.bottom
|
hoverEnabled: mainItem.leftPanelEnabled
|
||||||
// anchors.right: parent.right
|
Layout.fillWidth: true
|
||||||
}
|
Layout.fillHeight: true
|
||||||
|
Layout.topMargin: 20 * DefaultStyle.dp
|
||||||
|
searchBarText: searchBar.text
|
||||||
|
onSelectedConferenceChanged: {
|
||||||
|
mainItem.selectedConference = selectedConference
|
||||||
|
}
|
||||||
|
onCountChanged: {
|
||||||
|
mainItem.meetingListCount = count
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: mainItem
|
||||||
|
onNewConfCreated: {
|
||||||
|
conferenceList.forceUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Control.ScrollBar.vertical: meetingsScrollbar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: createConf
|
id: createConf
|
||||||
MeetingSetUp {
|
MeetingSetUp {
|
||||||
Layout.rightMargin: leftPanel.sideMargin
|
id: meetingSetup
|
||||||
onSaveSucceed: {
|
onSaveSucceed: {
|
||||||
mainItem.newConfCreated()
|
mainItem.newConfCreated()
|
||||||
leftPanelStackView.pop()
|
leftPanelStackView.pop()
|
||||||
|
|
@ -220,7 +234,7 @@ AbstractMainPage {
|
||||||
leftPanelStackView.pop()
|
leftPanelStackView.pop()
|
||||||
}
|
}
|
||||||
onAddParticipantsRequested: {
|
onAddParticipantsRequested: {
|
||||||
leftPanelStackView.push(addParticipants, {"conferenceInfoGui": conferenceInfoGui, "container": leftPanelStackView})
|
leftPanelStackView.push(addParticipants, {"conferenceInfoGui": meetingSetup.conferenceInfoGui, "container": leftPanelStackView})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -230,49 +244,43 @@ AbstractMainPage {
|
||||||
property bool isCreation
|
property bool isCreation
|
||||||
property ConferenceInfoGui conferenceInfoGui
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
MeetingSetUp {
|
MeetingSetUp {
|
||||||
Layout.alignment: Qt.AlignTop
|
|
||||||
Layout.preferredWidth: 393 * DefaultStyle.dp
|
|
||||||
Layout.fillWidth: false
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.leftMargin: 39 * DefaultStyle.dp
|
|
||||||
Layout.topMargin: 39 * DefaultStyle.dp
|
|
||||||
isCreation: parent.isCreation
|
isCreation: parent.isCreation
|
||||||
conferenceInfoGui: parent.conferenceInfoGui
|
conferenceInfoGui: parent.conferenceInfoGui
|
||||||
onReturnRequested: {
|
onReturnRequested: {
|
||||||
mainItem.rightPanelStackView.pop()
|
overridenRightPanelStackView.pop()
|
||||||
}
|
}
|
||||||
onSaveSucceed: {
|
onSaveSucceed: {
|
||||||
mainItem.rightPanelStackView.pop()
|
overridenRightPanelStackView.pop()
|
||||||
UtilsCpp.showInformationPopup(qsTr("Enregistré"), qsTr("Réunion modifiée avec succès"), true)
|
UtilsCpp.showInformationPopup(qsTr("Enregistré"), qsTr("Réunion modifiée avec succès"), true)
|
||||||
}
|
}
|
||||||
onAddParticipantsRequested: {
|
onAddParticipantsRequested: {
|
||||||
mainItem.rightPanelStackView.push(addParticipants, {"conferenceInfoGui": conferenceInfoGui, "container": mainItem.rightPanelStackView})
|
overridenRightPanelStackView.push(addParticipants, {"conferenceInfoGui": conferenceInfoGui, "container": overridenRightPanelStackView})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
id: addParticipants
|
id: addParticipants
|
||||||
AddParticipantsLayout {
|
RowLayout {
|
||||||
title: qsTr("Ajouter des participants")
|
id: addParticipantLayout
|
||||||
validateButtonText: qsTr("Ajouter")
|
|
||||||
titleColor: DefaultStyle.main1_500_main
|
|
||||||
property Control.StackView container
|
property Control.StackView container
|
||||||
onReturnRequested: {
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
container.pop()
|
AddParticipantsLayout {
|
||||||
|
conferenceInfoGui: parent.conferenceInfoGui
|
||||||
|
title: qsTr("Ajouter des participants")
|
||||||
|
validateButtonText: qsTr("Ajouter")
|
||||||
|
titleColor: DefaultStyle.main1_500_main
|
||||||
|
onReturnRequested: {
|
||||||
|
addParticipantLayout.container.pop()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
id: meetingDetail
|
id: meetingDetail
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
visible: mainItem.selectedConference
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.preferredWidth: 393 * DefaultStyle.dp
|
|
||||||
Layout.alignment: Qt.AlignTop
|
|
||||||
Layout.fillWidth: false
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.leftMargin: 39 * DefaultStyle.dp
|
|
||||||
Layout.topMargin: 39 * DefaultStyle.dp
|
|
||||||
spacing: 25 * DefaultStyle.dp
|
spacing: 25 * DefaultStyle.dp
|
||||||
Section {
|
Section {
|
||||||
content: RowLayout {
|
content: RowLayout {
|
||||||
|
|
@ -293,12 +301,13 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
visible: UtilsCpp.isMe(mainItem.selectedConference.core.organizerAddress)
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.pencil
|
icon.source: AppIcons.pencil
|
||||||
contentImageColor: DefaultStyle.main1_500_main
|
contentImageColor: DefaultStyle.main1_500_main
|
||||||
background: Item{}
|
background: Item{}
|
||||||
onClicked: mainItem.setUpConference(mainItem.selectedConference) //mainItem.rightPanelStackView.push(meetingEdition)
|
onClicked: mainItem.setUpConference(mainItem.selectedConference)
|
||||||
}
|
}
|
||||||
PopupButton {
|
PopupButton {
|
||||||
id: deletePopup
|
id: deletePopup
|
||||||
|
|
@ -524,149 +533,4 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Component {
|
|
||||||
// id: meetingEdition
|
|
||||||
// RowLayout {
|
|
||||||
// ColumnLayout {
|
|
||||||
// Layout.alignment: Qt.AlignTop
|
|
||||||
// Layout.preferredWidth: 393 * DefaultStyle.dp
|
|
||||||
// Layout.fillWidth: false
|
|
||||||
// Layout.fillHeight: true
|
|
||||||
// Layout.leftMargin: 39 * DefaultStyle.dp
|
|
||||||
// Layout.topMargin: 39 * DefaultStyle.dp
|
|
||||||
// spacing: 25 * DefaultStyle.dp
|
|
||||||
// Section {
|
|
||||||
// content: RowLayout {
|
|
||||||
// spacing: 8 * DefaultStyle.dp
|
|
||||||
// Button {
|
|
||||||
// Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
// Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
// icon.source: AppIcons.leftArrow
|
|
||||||
// contentImageColor: DefaultStyle.main1_500_main
|
|
||||||
// background: Item{}
|
|
||||||
// onClicked: mainItem.rightPanelStackView.pop()
|
|
||||||
// }
|
|
||||||
// EffectImage {
|
|
||||||
// imageSource: AppIcons.usersThree
|
|
||||||
// Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
// Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
// colorizationColor: DefaultStyle.main2_600
|
|
||||||
// }
|
|
||||||
// TextInput {
|
|
||||||
// Component.onCompleted: text = mainItem.selectedConference.core.subject
|
|
||||||
// color: DefaultStyle.main2_600
|
|
||||||
// font {
|
|
||||||
// pixelSize: 20 * DefaultStyle.dp
|
|
||||||
// weight: 800 * DefaultStyle.dp
|
|
||||||
// }
|
|
||||||
// onEditingFinished: mainItem.selectedConference.core.subject = text
|
|
||||||
// }
|
|
||||||
// Item {
|
|
||||||
// Layout.fillWidth: true
|
|
||||||
// }
|
|
||||||
// Button {
|
|
||||||
// text: qsTr("Save")
|
|
||||||
// topPadding: 6 * DefaultStyle.dp
|
|
||||||
// bottomPadding: 6 * DefaultStyle.dp
|
|
||||||
// leftPadding: 12 * DefaultStyle.dp
|
|
||||||
// rightPadding: 12 * DefaultStyle.dp
|
|
||||||
// onClicked: {
|
|
||||||
// console.log("TODO : save meeting infos")
|
|
||||||
// mainItem.selectedConference.core.save()
|
|
||||||
// mainItem.rightPanelStackView.pop(meetingDetail, Control.StackView.Immediate)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// Section {
|
|
||||||
// content: [
|
|
||||||
// RowLayout {
|
|
||||||
// EffectImage {
|
|
||||||
// imageSource: AppIcons.clock
|
|
||||||
// Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
// Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
// colorizationColor: DefaultStyle.main2_600
|
|
||||||
// }
|
|
||||||
// Text {
|
|
||||||
// text: "All the day"
|
|
||||||
// font {
|
|
||||||
// pixelSize: 14 * DefaultStyle.dp
|
|
||||||
// weighgt: 700 * DefaultStyle.dp
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// Item{Layout.fillWidth: true}
|
|
||||||
// Switch {
|
|
||||||
// id: isAllDaySwitch
|
|
||||||
// Component.onCompleted: if (mainItem.selectedConference.core.isAllDayConf()) toggle
|
|
||||||
// onPositionChanged: if (position === 1) {
|
|
||||||
// mainItem.selectedConference.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, 0, 0)
|
|
||||||
// mainItem.selectedConference.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, 23, 59)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// RowLayout {
|
|
||||||
// CalendarComboBox {
|
|
||||||
// id: startDate
|
|
||||||
// background: Item{}
|
|
||||||
// contentText.font.weight: 400 * DefaultStyle.dp
|
|
||||||
// Component.onCompleted: calendar.selectedDate = mainItem.selectedConference.core.dateTime
|
|
||||||
// onSelectedDateChanged: mainItem.selectedConference.core.dateTime = UtilsCpp.createDateTime(selectedDate, startHour.selectedHour, startHour.selectedMin)
|
|
||||||
// }
|
|
||||||
// Item{Layout.fillWidth: true}
|
|
||||||
// TimeComboBox {
|
|
||||||
// id: startHour
|
|
||||||
// visible: isAllDaySwitch.position === 0
|
|
||||||
// background: Item{}
|
|
||||||
// contentText.font.weight: 400 * DefaultStyle.dp
|
|
||||||
// onSelectedHourChanged: mainItem.selectedConference.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
// onSelectedMinChanged: mainItem.selectedConference.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// RowLayout {
|
|
||||||
// CalendarComboBox {
|
|
||||||
// id: endDate
|
|
||||||
// background: Item{}
|
|
||||||
// contentText.font.weight: 400 * DefaultStyle.dp
|
|
||||||
// Component.onCompleted: calendar.selectedDate = mainItem.selectedConference.core.endDateTime
|
|
||||||
// onSelectedDateChanged: mainItem.selectedConference.core.endDateTime = UtilsCpp.createDateTime(selectedDate, endHour.selectedHour, endHour.selectedMin)
|
|
||||||
// }
|
|
||||||
// Item{Layout.fillWidth: true}
|
|
||||||
// TimeComboBox {
|
|
||||||
// id: endHour
|
|
||||||
// visible: isAllDaySwitch.position === 0
|
|
||||||
// background: Item{}
|
|
||||||
// contentText.font.weight: 400 * DefaultStyle.dp
|
|
||||||
// onSelectedHourChanged: mainItem.selectedConference.core.endDateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
// onSelectedMinChanged: mainItem.selectedConference.core.endDateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// ComboBox {
|
|
||||||
// id: timeZoneCbox
|
|
||||||
// Layout.fillWidth: true
|
|
||||||
// Layout.preferredHeight: 30 * DefaultStyle.dp
|
|
||||||
// hoverEnabled: true
|
|
||||||
// listView.implicitHeight: 152 * DefaultStyle.dp
|
|
||||||
// constantImageSource: AppIcons.globe
|
|
||||||
// weight: 700 * DefaultStyle.dp
|
|
||||||
// leftMargin: 0
|
|
||||||
// currentIndex: mainItem.conferenceInfoGui ? model.getIndex(mainItem.conferenceInfoGui.core.timeZoneModel) : -1
|
|
||||||
// background: Rectangle {
|
|
||||||
// visible: parent.hovered || parent.down
|
|
||||||
// anchors.fill: parent
|
|
||||||
// color: DefaultStyle.grey_100
|
|
||||||
// }
|
|
||||||
// model: TimeZoneProxy{
|
|
||||||
// }
|
|
||||||
// onCurrentIndexChanged: {
|
|
||||||
// var modelIndex = timeZoneCbox.model.index(currentIndex, 0)
|
|
||||||
// mainItem.conferenceInfoGui.core.timeZoneModel = timeZoneCbox.model.data(modelIndex, Qt.DisplayRole + 1)
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
// // Item{Layout.fillHeight: true}
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue