Meeting UI
Change meeting time set so a it can spread over two days without being an all day conf
This commit is contained in:
parent
6176f1971c
commit
e415033943
15 changed files with 776 additions and 480 deletions
|
|
@ -85,6 +85,8 @@ ConferenceInfoCore::ConferenceInfoCore(std::shared_ptr<linphone::ConferenceInfo>
|
||||||
}
|
}
|
||||||
mConferenceInfoState = LinphoneEnums::fromLinphone(conferenceInfo->getState());
|
mConferenceInfoState = LinphoneEnums::fromLinphone(conferenceInfo->getState());
|
||||||
} else {
|
} else {
|
||||||
|
mDateTime = QDateTime::currentDateTime();
|
||||||
|
mEndDateTime = QDateTime::currentDateTime().addSecs(3600);
|
||||||
App::postModelSync([this]() {
|
App::postModelSync([this]() {
|
||||||
auto defaultAccount = CoreModel::getInstance()->getCore()->getDefaultAccount();
|
auto defaultAccount = CoreModel::getInstance()->getCore()->getDefaultAccount();
|
||||||
if (defaultAccount) {
|
if (defaultAccount) {
|
||||||
|
|
@ -166,21 +168,16 @@ void ConferenceInfoCore::setSelf(QSharedPointer<ConferenceInfoCore> me) {
|
||||||
setIsEnded(computeIsEnded());
|
setIsEnded(computeIsEnded());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
mConfInfoModelConnection->makeConnectToModel(
|
|
||||||
&ConferenceInfoModel::stateChanged, [this](linphone::ConferenceScheduler::State state) {
|
|
||||||
qDebug() << "conf state changed" << LinphoneEnums::fromLinphone(state);
|
|
||||||
mConfInfoModelConnection->invokeToCore([this] {});
|
|
||||||
});
|
|
||||||
|
|
||||||
mConfInfoModelConnection->makeConnectToCore(&ConferenceInfoCore::lDeleteConferenceInfo,
|
mConfInfoModelConnection->makeConnectToCore(&ConferenceInfoCore::lDeleteConferenceInfo,
|
||||||
[this]() { mConferenceInfoModel->deleteConferenceInfo(); });
|
[this]() { mConferenceInfoModel->deleteConferenceInfo(); });
|
||||||
mConfInfoModelConnection->makeConnectToModel(&ConferenceInfoModel::conferenceInfoDeleted,
|
mConfInfoModelConnection->makeConnectToModel(&ConferenceInfoModel::conferenceInfoDeleted,
|
||||||
&ConferenceInfoCore::removed);
|
&ConferenceInfoCore::removed);
|
||||||
|
|
||||||
mConfInfoModelConnection->makeConnectToModel(&ConferenceInfoModel::stateChanged,
|
mConfInfoModelConnection->makeConnectToModel(
|
||||||
[this](linphone::ConferenceScheduler::State state) {
|
&ConferenceInfoModel::schedulerStateChanged, [this](linphone::ConferenceScheduler::State state) {
|
||||||
qDebug() << "conf state changed:" << (int)state;
|
mConfInfoModelConnection->invokeToCore(
|
||||||
});
|
[this, state = LinphoneEnums::fromLinphone(state)] { setConferenceSchedulerState(state); });
|
||||||
|
});
|
||||||
mConfInfoModelConnection->makeConnectToModel(
|
mConfInfoModelConnection->makeConnectToModel(
|
||||||
&ConferenceInfoModel::invitationsSent,
|
&ConferenceInfoModel::invitationsSent,
|
||||||
[this](const std::list<std::shared_ptr<linphone::Address>> &failedInvitations) {
|
[this](const std::list<std::shared_ptr<linphone::Address>> &failedInvitations) {
|
||||||
|
|
@ -410,9 +407,9 @@ LinphoneEnums::ConferenceInfoState ConferenceInfoCore::getConferenceInfoState()
|
||||||
return mConferenceInfoState;
|
return mConferenceInfoState;
|
||||||
}
|
}
|
||||||
|
|
||||||
// LinphoneEnums::ConferenceSchedulerState ConferenceInfoCore::getConferenceSchedulerState() const {
|
LinphoneEnums::ConferenceSchedulerState ConferenceInfoCore::getConferenceSchedulerState() const {
|
||||||
// return LinphoneEnums::fromLinphone(mLastConferenceSchedulerState);
|
return mConferenceSchedulerState;
|
||||||
// }
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------
|
||||||
// Datetime is in Custom (Locale/UTC/System). Convert into UTC for conference info
|
// Datetime is in Custom (Locale/UTC/System). Convert into UTC for conference info
|
||||||
|
|
@ -447,6 +444,13 @@ void ConferenceInfoCore::setConferenceInfoState(LinphoneEnums::ConferenceInfoSta
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConferenceInfoCore::setConferenceSchedulerState(LinphoneEnums::ConferenceSchedulerState state) {
|
||||||
|
if (state != mConferenceSchedulerState) {
|
||||||
|
mConferenceSchedulerState = state;
|
||||||
|
emit conferenceSchedulerStateChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ConferenceInfoCore::writeFromModel(const std::shared_ptr<ConferenceInfoModel> &model) {
|
void ConferenceInfoCore::writeFromModel(const std::shared_ptr<ConferenceInfoModel> &model) {
|
||||||
mustBeInLinphoneThread(getClassName() + "::writeFromModel()");
|
mustBeInLinphoneThread(getClassName() + "::writeFromModel()");
|
||||||
setDateTime(model->getDateTime());
|
setDateTime(model->getDateTime());
|
||||||
|
|
@ -580,3 +584,8 @@ void ConferenceInfoCore::onInvitationsSent(const std::list<std::shared_ptr<linph
|
||||||
qDebug() << "ConferenceInfoCore::onInvitationsSent";
|
qDebug() << "ConferenceInfoCore::onInvitationsSent";
|
||||||
emit invitationsSent();
|
emit invitationsSent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ConferenceInfoCore::isAllDayConf() const {
|
||||||
|
return mDateTime.time().hour() == 0 && mDateTime.time().minute() == 0 && mEndDateTime.time().hour() == 23 &&
|
||||||
|
mEndDateTime.time().minute() == 59;
|
||||||
|
}
|
||||||
|
|
@ -57,6 +57,8 @@ public:
|
||||||
Q_PROPERTY(int participantCount READ getParticipantCount NOTIFY participantsChanged)
|
Q_PROPERTY(int participantCount READ getParticipantCount NOTIFY participantsChanged)
|
||||||
Q_PROPERTY(QVariantList participants READ getParticipants NOTIFY participantsChanged)
|
Q_PROPERTY(QVariantList participants READ getParticipants NOTIFY participantsChanged)
|
||||||
Q_PROPERTY(LinphoneEnums::ConferenceInfoState state READ getConferenceInfoState NOTIFY conferenceInfoStateChanged)
|
Q_PROPERTY(LinphoneEnums::ConferenceInfoState state READ getConferenceInfoState NOTIFY conferenceInfoStateChanged)
|
||||||
|
Q_PROPERTY(LinphoneEnums::ConferenceSchedulerState schedulerState READ getConferenceSchedulerState NOTIFY
|
||||||
|
conferenceSchedulerStateChanged)
|
||||||
// Q_PROPERTY(LinphoneEnums::ConferenceSchedulerState conferenceSchedulerState READ getConferenceSchedulerState
|
// Q_PROPERTY(LinphoneEnums::ConferenceSchedulerState conferenceSchedulerState READ getConferenceSchedulerState
|
||||||
// NOTIFY
|
// NOTIFY
|
||||||
// conferenceSchedulerStateChanged)
|
// conferenceSchedulerStateChanged)
|
||||||
|
|
@ -92,6 +94,7 @@ public:
|
||||||
TimeZoneModel *getTimeZoneModel() const;
|
TimeZoneModel *getTimeZoneModel() const;
|
||||||
// QString getIcalendarString() const;
|
// QString getIcalendarString() const;
|
||||||
LinphoneEnums::ConferenceInfoState getConferenceInfoState() const;
|
LinphoneEnums::ConferenceInfoState getConferenceInfoState() const;
|
||||||
|
LinphoneEnums::ConferenceSchedulerState getConferenceSchedulerState() const;
|
||||||
// LinphoneEnums::ConferenceSchedulerState getConferenceSchedulerState() const;
|
// LinphoneEnums::ConferenceSchedulerState getConferenceSchedulerState() const;
|
||||||
|
|
||||||
void setDateTime(const QDateTime &date);
|
void setDateTime(const QDateTime &date);
|
||||||
|
|
@ -105,6 +108,7 @@ public:
|
||||||
void setDescription(const QString &description);
|
void setDescription(const QString &description);
|
||||||
void setInviteMode(const int &mode);
|
void setInviteMode(const int &mode);
|
||||||
void setConferenceInfoState(LinphoneEnums::ConferenceInfoState state);
|
void setConferenceInfoState(LinphoneEnums::ConferenceInfoState state);
|
||||||
|
void setConferenceSchedulerState(LinphoneEnums::ConferenceSchedulerState state);
|
||||||
|
|
||||||
Q_INVOKABLE void addParticipant(const QString &address);
|
Q_INVOKABLE void addParticipant(const QString &address);
|
||||||
Q_INVOKABLE void removeParticipant(const QString &address);
|
Q_INVOKABLE void removeParticipant(const QString &address);
|
||||||
|
|
@ -130,6 +134,8 @@ public:
|
||||||
// virtual void onConferenceSchedulerStateChanged(linphone::ConferenceScheduler::State state);
|
// virtual void onConferenceSchedulerStateChanged(linphone::ConferenceScheduler::State state);
|
||||||
virtual void onInvitationsSent(const std::list<std::shared_ptr<linphone::Address>> &failedInvitations);
|
virtual void onInvitationsSent(const std::list<std::shared_ptr<linphone::Address>> &failedInvitations);
|
||||||
|
|
||||||
|
Q_INVOKABLE bool isAllDayConf() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void dateTimeChanged();
|
void dateTimeChanged();
|
||||||
void endDateTimeChanged();
|
void endDateTimeChanged();
|
||||||
|
|
@ -144,6 +150,7 @@ signals:
|
||||||
void isEndedChanged();
|
void isEndedChanged();
|
||||||
void inviteModeChanged();
|
void inviteModeChanged();
|
||||||
void conferenceInfoStateChanged();
|
void conferenceInfoStateChanged();
|
||||||
|
void conferenceSchedulerStateChanged();
|
||||||
void timeZoneModelChanged();
|
void timeZoneModelChanged();
|
||||||
// void conferenceSchedulerStateChanged();
|
// void conferenceSchedulerStateChanged();
|
||||||
|
|
||||||
|
|
@ -170,6 +177,7 @@ private:
|
||||||
QString mUri;
|
QString mUri;
|
||||||
QVariantList mParticipants;
|
QVariantList mParticipants;
|
||||||
QSharedPointer<TimeZoneModel> mTimeZoneModel;
|
QSharedPointer<TimeZoneModel> mTimeZoneModel;
|
||||||
|
LinphoneEnums::ConferenceSchedulerState mConferenceSchedulerState;
|
||||||
LinphoneEnums::ConferenceInfoState mConferenceInfoState =
|
LinphoneEnums::ConferenceInfoState mConferenceInfoState =
|
||||||
LinphoneEnums::ConferenceInfoState::ConferenceInfoStateNew;
|
LinphoneEnums::ConferenceInfoState::ConferenceInfoStateNew;
|
||||||
bool mIsScheduled = true;
|
bool mIsScheduled = true;
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,7 @@ void CallModel::setSpeakerVolumeGain(float gain) {
|
||||||
}
|
}
|
||||||
|
|
||||||
float CallModel::getSpeakerVolumeGain() const {
|
float CallModel::getSpeakerVolumeGain() const {
|
||||||
|
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||||
auto gain = mMonitor->getSpeakerVolumeGain();
|
auto gain = mMonitor->getSpeakerVolumeGain();
|
||||||
if (gain < 0) gain = CoreModel::getInstance()->getCore()->getPlaybackGainDb();
|
if (gain < 0) gain = CoreModel::getInstance()->getCore()->getPlaybackGainDb();
|
||||||
return gain;
|
return gain;
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ void ConferenceInfoModel::setConferenceScheduler(const std::shared_ptr<Conferenc
|
||||||
}
|
}
|
||||||
mConferenceSchedulerModel = model;
|
mConferenceSchedulerModel = model;
|
||||||
connect(mConferenceSchedulerModel.get(), &ConferenceSchedulerModel::stateChanged, this,
|
connect(mConferenceSchedulerModel.get(), &ConferenceSchedulerModel::stateChanged, this,
|
||||||
&ConferenceInfoModel::stateChanged);
|
&ConferenceInfoModel::schedulerStateChanged);
|
||||||
connect(mConferenceSchedulerModel.get(), &ConferenceSchedulerModel::invitationsSent, this,
|
connect(mConferenceSchedulerModel.get(), &ConferenceSchedulerModel::invitationsSent, this,
|
||||||
&ConferenceInfoModel::invitationsSent);
|
&ConferenceInfoModel::invitationsSent);
|
||||||
mConferenceSchedulerModel->setSelf(mConferenceSchedulerModel);
|
mConferenceSchedulerModel->setSelf(mConferenceSchedulerModel);
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,8 @@ signals:
|
||||||
void descriptionChanged(const QString &description);
|
void descriptionChanged(const QString &description);
|
||||||
void participantsChanged();
|
void participantsChanged();
|
||||||
void conferenceInfoDeleted();
|
void conferenceInfoDeleted();
|
||||||
void stateChanged(linphone::ConferenceScheduler::State state);
|
void schedulerStateChanged(linphone::ConferenceScheduler::State state);
|
||||||
|
void infoStateChanged(linphone::ConferenceInfo::State state);
|
||||||
void invitationsSent(const std::list<std::shared_ptr<linphone::Address>> &failedInvitations);
|
void invitationsSent(const std::list<std::shared_ptr<linphone::Address>> &failedInvitations);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
||||||
view/Item/Contact/Sticker.qml
|
view/Item/Contact/Sticker.qml
|
||||||
|
|
||||||
view/Item/Meeting/MeetingList.qml
|
view/Item/Meeting/MeetingList.qml
|
||||||
view/Item/Meeting/NewMeeting.qml
|
view/Item/Meeting/MeetingSetUp.qml
|
||||||
|
|
||||||
view/Item/BusyIndicator.qml
|
view/Item/BusyIndicator.qml
|
||||||
view/Item/Button.qml
|
view/Item/Button.qml
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ ListView {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
highlightMoveDuration: 100
|
highlightMoveDuration: 100
|
||||||
|
|
||||||
property var selectedDate: new Date()
|
property var selectedDate
|
||||||
|
|
||||||
model: Control.CalendarModel {
|
model: Control.CalendarModel {
|
||||||
id: calendarModel
|
id: calendarModel
|
||||||
|
|
@ -84,7 +84,7 @@ ListView {
|
||||||
month: model.month
|
month: model.month
|
||||||
// locale: Qt.locale("en_US")
|
// locale: Qt.locale("en_US")
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
property bool isSelectedDay: UtilsCpp.datesAreEqual(mainItem.selectedDate, model.date)
|
property bool isSelectedDay: mainItem.selectedDate ? UtilsCpp.datesAreEqual(mainItem.selectedDate, model.date) : false
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: 30 * DefaultStyle.dp
|
width: 30 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,11 @@ import Linphone
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property var selectedDate: calendar.selectedDate
|
readonly property var selectedDate: calendar.selectedDate
|
||||||
property alias calendar: calendar
|
property alias calendar: calendar
|
||||||
|
property alias contentText: contentText
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
id: contentText
|
||||||
text: Qt.formatDate(calendar.selectedDate, "ddd d, MMMM")
|
text: Qt.formatDate(calendar.selectedDate, "ddd d, MMMM")
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: 15 * DefaultStyle.dp
|
anchors.leftMargin: 15 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ Control.ComboBox {
|
||||||
: item.img
|
: item.img
|
||||||
? item.img
|
? item.img
|
||||||
: ""
|
: ""
|
||||||
console.log("const", constantImageSource, item.img)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|
@ -41,6 +40,9 @@ Control.ComboBox {
|
||||||
border.color: mainItem.enabled ? DefaultStyle.grey_200 : DefaultStyle.grey_400
|
border.color: mainItem.enabled ? DefaultStyle.grey_200 : DefaultStyle.grey_400
|
||||||
}
|
}
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.leftMargin: 10 * DefaultStyle.dp
|
||||||
|
anchors.rightMargin: indicImage.width + 10 * DefaultStyle.dp
|
||||||
Image {
|
Image {
|
||||||
id: selectedItemImg
|
id: selectedItemImg
|
||||||
source: mainItem.constantImageSource ? mainItem.constantImageSource : ""
|
source: mainItem.constantImageSource ? mainItem.constantImageSource : ""
|
||||||
|
|
@ -92,6 +94,8 @@ Control.ComboBox {
|
||||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
source: AppIcons.downArrow
|
source: AppIcons.downArrow
|
||||||
|
width: 14 * DefaultStyle.dp
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
|
|
||||||
popup: Control.Popup {
|
popup: Control.Popup {
|
||||||
|
|
|
||||||
496
Linphone/view/Item/Meeting/MeetingSetUp.qml
Normal file
496
Linphone/view/Item/Meeting/MeetingSetUp.qml
Normal file
|
|
@ -0,0 +1,496 @@
|
||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Effects
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls as Control
|
||||||
|
import Linphone
|
||||||
|
import UtilsCpp 1.0
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: mainItem
|
||||||
|
spacing: 8 * DefaultStyle.dp
|
||||||
|
property bool isCreation
|
||||||
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
|
signal addParticipantsRequested()
|
||||||
|
signal returnRequested()
|
||||||
|
signal creationSucceed()
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: mainItem.conferenceInfoGui.core
|
||||||
|
onSchedulerStateChanged: {
|
||||||
|
if (isCreation && mainItem.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Ready) mainItem.creationSucceed()
|
||||||
|
console.log("scheduler state changed", mainItem.conferenceInfoGui.core.schedulerState)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
endHour.selectedDateTime = mainItem.conferenceInfoGui.core.endDateTime
|
||||||
|
startHour.selectedDateTime = mainItem.conferenceInfoGui.core.dateTime
|
||||||
|
endDate.calendar.selectedDate = mainItem.conferenceInfoGui.core.endDateTime
|
||||||
|
startDate.calendar.selectedDate = mainItem.conferenceInfoGui.core.dateTime
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Button {
|
||||||
|
background: Item{}
|
||||||
|
icon.source: AppIcons.leftArrow
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
onClicked: mainItem.returnRequested()
|
||||||
|
}
|
||||||
|
TextInput {
|
||||||
|
visible: !mainItem.isCreation
|
||||||
|
Component.onCompleted: text = conferenceInfoGui.core.subject
|
||||||
|
color: DefaultStyle.main2_600
|
||||||
|
font {
|
||||||
|
pixelSize: 20 * DefaultStyle.dp
|
||||||
|
weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onActiveFocusChanged: if(activeFocus==true) selectAll()
|
||||||
|
onEditingFinished: mainItem.conferenceInfoGui.core.subject = text
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
visible: mainItem.isCreation
|
||||||
|
text: qsTr("Nouvelle réunion")
|
||||||
|
color: DefaultStyle.main2_700
|
||||||
|
font {
|
||||||
|
pixelSize: 22 * DefaultStyle.dp
|
||||||
|
weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
topPadding: 6 * DefaultStyle.dp
|
||||||
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
|
leftPadding: 12 * DefaultStyle.dp
|
||||||
|
rightPadding: 12 * DefaultStyle.dp
|
||||||
|
text: mainItem.isCreation ? qsTr("Créer") : qsTr("Save")
|
||||||
|
textSize: 13 * DefaultStyle.dp
|
||||||
|
onClicked: {
|
||||||
|
if (mainItem.conferenceInfoGui.core.subject.length === 0) {
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir un sujet"), false)
|
||||||
|
} else if (mainItem.conferenceInfoGui.core.duration <= 0) {
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La fin de la conférence doit être plus récente que son début"), false)
|
||||||
|
} else if (mainItem.conferenceInfoGui.core.participantCount === 0) {
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir au moins un participant"), false)
|
||||||
|
} else {
|
||||||
|
mainItem.conferenceInfoGui.core.save()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
component CheckableButton: Button {
|
||||||
|
id: checkableButton
|
||||||
|
checkable: true
|
||||||
|
autoExclusive: true
|
||||||
|
contentImageColor: checked ? DefaultStyle.grey_0 : DefaultStyle.main1_500_main
|
||||||
|
inversedColors: !checked
|
||||||
|
topPadding: 10 * DefaultStyle.dp
|
||||||
|
bottomPadding: 10 * DefaultStyle.dp
|
||||||
|
leftPadding: 16 * DefaultStyle.dp
|
||||||
|
rightPadding: 16 * DefaultStyle.dp
|
||||||
|
contentItem: RowLayout {
|
||||||
|
EffectImage {
|
||||||
|
imageSource: checkableButton.icon.source
|
||||||
|
colorizationColor: checkableButton.checked ? DefaultStyle.grey_0 : DefaultStyle.main1_500_main
|
||||||
|
width: 24 * DefaultStyle.dp
|
||||||
|
height: 24 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: checkableButton.text
|
||||||
|
color: checkableButton.checked ? DefaultStyle.grey_0 : DefaultStyle.main1_500_main
|
||||||
|
font {
|
||||||
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
|
weight: 400 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RowLayout {
|
||||||
|
visible: mainItem.isCreation
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20 * DefaultStyle.dp
|
||||||
|
Layout.bottomMargin: 20 * DefaultStyle.dp
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
spacing: 20 * DefaultStyle.dp
|
||||||
|
CheckableButton {
|
||||||
|
Layout.preferredWidth: 151 * DefaultStyle.dp
|
||||||
|
icon.source: AppIcons.usersThree
|
||||||
|
enabled: false
|
||||||
|
text: qsTr("Réunion")
|
||||||
|
checked: true
|
||||||
|
}
|
||||||
|
CheckableButton {
|
||||||
|
Layout.preferredWidth: 151 * DefaultStyle.dp
|
||||||
|
enabled: false
|
||||||
|
icon.source: AppIcons.slide
|
||||||
|
text: qsTr("Broadcast")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Section {
|
||||||
|
visible: mainItem.isCreation
|
||||||
|
content: RowLayout {
|
||||||
|
EffectImage {
|
||||||
|
imageSource: AppIcons.usersThree
|
||||||
|
colorizationColor: DefaultStyle.main2_600
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
TextInput {
|
||||||
|
id: confTitle
|
||||||
|
text: qsTr("Ajouter un titre")
|
||||||
|
color: DefaultStyle.main2_600
|
||||||
|
font {
|
||||||
|
pixelSize: 20 * DefaultStyle.dp
|
||||||
|
weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
onActiveFocusChanged: if(activeFocus==true) selectAll()
|
||||||
|
onEditingFinished: mainItem.conferenceInfoGui.core.subject = text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Section {
|
||||||
|
Layout.topMargin: 10 * DefaultStyle.dp
|
||||||
|
content: [
|
||||||
|
RowLayout {
|
||||||
|
EffectImage {
|
||||||
|
imageSource: AppIcons.clock
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
colorizationColor: DefaultStyle.main2_600
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: qsTr("Toute la journée")
|
||||||
|
font {
|
||||||
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
|
weight: 700 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item{Layout.fillWidth: true}
|
||||||
|
Switch {
|
||||||
|
id: allDaySwitch
|
||||||
|
readonly property bool isAllDay: position === 1
|
||||||
|
Component.onCompleted: if (mainItem.conferenceInfoGui.core.isAllDayConf()) toggle
|
||||||
|
onPositionChanged: if (position === 1) {
|
||||||
|
mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, 0, 0)
|
||||||
|
mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, 23, 59)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
RowLayout {
|
||||||
|
CalendarComboBox {
|
||||||
|
id: startDate
|
||||||
|
background.visible: mainItem.isCreation
|
||||||
|
contentText.font.weight: (isCreation ? 700 : 400) * DefaultStyle.dp
|
||||||
|
Layout.preferredWidth: 200 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
|
onSelectedDateChanged: {
|
||||||
|
if (!selectedDate || selectedDate == mainItem.conferenceInfoGui.core.dateTime) return
|
||||||
|
mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(selectedDate, allDaySwitch.isAllDay ? 0 : startHour.selectedHour, allDaySwitch.isAllDay ? 0 : startHour.selectedMin)
|
||||||
|
if (isCreation) {
|
||||||
|
if (allDaySwitch.position === 0) endDate.calendar.selectedDate = UtilsCpp.addSecs(selectedDate, 3600)
|
||||||
|
else endDate.calendar.selectedDate = UtilsCpp.createDateTime(selectedDate, 23, 59)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item{Layout.fillWidth: true}
|
||||||
|
TimeComboBox {
|
||||||
|
id: startHour
|
||||||
|
visible: allDaySwitch.position === 0
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
Layout.preferredWidth: 94 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
|
background.visible: mainItem.isCreation
|
||||||
|
contentText.font.weight: (isCreation ? 700 : 400) * DefaultStyle.dp
|
||||||
|
onSelectedHourChanged: {
|
||||||
|
mainItem.conferenceInfoGui.core.dateTime = selectedDateTime//UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
||||||
|
endHour.selectedDateTime = UtilsCpp.addSecs(selectedDateTime, 3600)//Qt.formatDateTime(UtilsCpp.createDateTime(new Date(), selectedHour == 23 ? 23 : selectedHour + 1, selectedHour == 23 ? 59 : selectedMin), "hh:mm")
|
||||||
|
}
|
||||||
|
onSelectedMinChanged: {
|
||||||
|
mainItem.conferenceInfoGui.core.dateTime = selectedDateTime//UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
||||||
|
endHour.selectedDateTime = UtilsCpp.addSecs(selectedDateTime, 3600)//UtilsCpp.createDateTime(selectedDateTime, selectedHour == 23 ? 23 : selectedHour + 1, selectedHour == 23 ? 59 : selectedMin)
|
||||||
|
}
|
||||||
|
// onSelectedHourChanged: mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
||||||
|
// onSelectedMinChanged: mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
RowLayout {
|
||||||
|
CalendarComboBox {
|
||||||
|
id: endDate
|
||||||
|
background.visible: mainItem.isCreation
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
Layout.preferredWidth: 200 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
|
contentText.font.weight: (isCreation ? 700 : 400) * DefaultStyle.dp
|
||||||
|
onSelectedDateChanged: if (selectedDate) mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(selectedDate, endHour.selectedHour, endHour.selectedMin)
|
||||||
|
}
|
||||||
|
Item{Layout.fillWidth: true}
|
||||||
|
TimeComboBox {
|
||||||
|
id: endHour
|
||||||
|
visible: allDaySwitch.position === 0
|
||||||
|
Layout.preferredWidth: 94 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
|
background.visible: mainItem.isCreation
|
||||||
|
contentText.font.weight: (isCreation ? 700 : 400) * DefaultStyle.dp
|
||||||
|
onSelectedHourChanged: mainItem.conferenceInfoGui.core.endDateTime = selectedDateTime//UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
||||||
|
onSelectedMinChanged: mainItem.conferenceInfoGui.core.endDateTime = selectedDateTime//UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// RowLayout {
|
||||||
|
// EffectImage {
|
||||||
|
// imageSource: AppIcons.clock
|
||||||
|
// colorizationColor: DefaultStyle.main2_600
|
||||||
|
// Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
// Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
// }
|
||||||
|
// CalendarComboBox {
|
||||||
|
// id: startDate
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
// Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
|
// background.visible: mainItem.isCreation
|
||||||
|
// contentText.font.weight: (mainItem.isCreation ? 700 : 400) * DefaultStyle.dp
|
||||||
|
// onSelectedDateChanged: {
|
||||||
|
// mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(selectedDate, allDaySwitch.position === 1 ? 0 : startHour.selectedHour, allDaySwitch.position === 1 ? 0 : startHour.selectedMin)
|
||||||
|
// if (allDaySwitch.position === 0) endDate.calendar.selectedDate = UtilsCpp.addSecs(selectedDate, 3600)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// RowLayout {
|
||||||
|
// Item {
|
||||||
|
// Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
// Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
// }
|
||||||
|
// RowLayout {
|
||||||
|
// visible: allDaySwitch.position === 0
|
||||||
|
// TimeComboBox {
|
||||||
|
// id: startHour
|
||||||
|
// onSelectedHourChanged: {
|
||||||
|
// mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
||||||
|
// endHour.selectedTimeString = Qt.formatDateTime(UtilsCpp.createDateTime(new Date(), selectedHour == 23 ? 23 : selectedHour + 1, selectedHour == 23 ? 59 : selectedMin), "hh:mm")
|
||||||
|
// }
|
||||||
|
// onSelectedMinChanged: {
|
||||||
|
// mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
||||||
|
// endHour.selectedTimeString = Qt.formatDateTime(UtilsCpp.createDateTime(new Date(), selectedHour == 23 ? 23 : selectedHour + 1, selectedHour == 23 ? 59 : selectedMin), "hh:mm")
|
||||||
|
// }
|
||||||
|
// Layout.preferredWidth: 94 * DefaultStyle.dp
|
||||||
|
// Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
|
// }
|
||||||
|
// TimeComboBox {
|
||||||
|
// id: endHour
|
||||||
|
// // property date startTime: new Date()
|
||||||
|
// onSelectedHourChanged: mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, selectedHour, selectedMin)
|
||||||
|
// onSelectedMinChanged: mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, selectedHour, selectedMin)
|
||||||
|
// Layout.preferredWidth: 94 * DefaultStyle.dp
|
||||||
|
// Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
|
// }
|
||||||
|
// Item {
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
// }
|
||||||
|
// Text {
|
||||||
|
// property int durationSec: UtilsCpp.secsTo(startHour.selectedTime, endHour.selectedTime)
|
||||||
|
// property int hour: durationSec/3600
|
||||||
|
// property int min: (durationSec - hour*3600)/60
|
||||||
|
// text: (hour > 0 ? hour + "h" : "") + (min > 0 ? min + "mn" : "")
|
||||||
|
// font {
|
||||||
|
// pixelSize: 14 * DefaultStyle.dp
|
||||||
|
// weight: 700 * DefaultStyle.dp
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// CalendarComboBox {
|
||||||
|
// id: endDate
|
||||||
|
// visible: allDaySwitch.position === 1
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
// // Layout.fillHeight: false
|
||||||
|
// contentText.font.weight: (mainItem.isCreation ? 700 : 400) * DefaultStyle.dp
|
||||||
|
// Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
|
// onSelectedDateChanged: mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(selectedDate, allDaySwitch.position === 1 ? 23 : endHour.selectedHour, allDaySwitch.position === 1 ? 59 : endHour.selectedMin)
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// RowLayout {
|
||||||
|
// Item {
|
||||||
|
// Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
// Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
// }
|
||||||
|
// RowLayout {
|
||||||
|
// Switch {
|
||||||
|
// id: allDaySwitch
|
||||||
|
// text: qsTr("Toute la journée")
|
||||||
|
// onPositionChanged: {
|
||||||
|
// if (position == 1) {
|
||||||
|
// mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, 0, 0)
|
||||||
|
// mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, 23, 59)
|
||||||
|
// } else {
|
||||||
|
// mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, startHour.selectedHour, startHour.selectedMin)
|
||||||
|
// mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, endHour.selectedHour, endHour.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)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
ComboBox {
|
||||||
|
id: repeaterCbox
|
||||||
|
enabled: false
|
||||||
|
Component.onCompleted: console.log("TODO : handle conf repetition")
|
||||||
|
constantImageSource: AppIcons.reloadArrow
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: height
|
||||||
|
height: 30 * DefaultStyle.dp
|
||||||
|
width: 307 * DefaultStyle.dp
|
||||||
|
weight: 700 * DefaultStyle.dp
|
||||||
|
leftMargin: 0
|
||||||
|
currentIndex: 0
|
||||||
|
background: Rectangle {
|
||||||
|
visible: parent.hovered || parent.down
|
||||||
|
anchors.fill: parent
|
||||||
|
color: DefaultStyle.grey_100
|
||||||
|
}
|
||||||
|
model: [
|
||||||
|
{text: qsTr("Une fois")},
|
||||||
|
{text: qsTr("Tous les jours")},
|
||||||
|
{text: qsTr("Tous les jours de la semaine (Lun-Ven)")},
|
||||||
|
{text: qsTr("Toutes les semaines")},
|
||||||
|
{text: qsTr("Tous les mois")}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
Section {
|
||||||
|
content: RowLayout {
|
||||||
|
EffectImage {
|
||||||
|
imageSource: AppIcons.note
|
||||||
|
colorizationColor: DefaultStyle.main2_600
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
TextArea {
|
||||||
|
id: descriptionEdit
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredWidth: 275 * DefaultStyle.dp
|
||||||
|
leftPadding: 8 * DefaultStyle.dp
|
||||||
|
rightPadding: 8 * DefaultStyle.dp
|
||||||
|
hoverEnabled: true
|
||||||
|
placeholderText: qsTr("Ajouter une description")
|
||||||
|
placeholderTextColor: DefaultStyle.main2_600
|
||||||
|
placeholderWeight: 700 * DefaultStyle.dp
|
||||||
|
color: DefaultStyle.main2_600
|
||||||
|
font {
|
||||||
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
|
weight: 400 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
background: Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: descriptionEdit.hovered || descriptionEdit.activeFocus ? DefaultStyle.grey_100 : "transparent"
|
||||||
|
radius: 4 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
onEditingFinished: mainItem.conferenceInfoGui.core.description = text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Section {
|
||||||
|
content: [
|
||||||
|
Button {
|
||||||
|
id: addParticipantsButton
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
|
background: Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: addParticipantsButton.hovered ? DefaultStyle.grey_100 : "transparent"
|
||||||
|
radius: 4 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
contentItem: RowLayout {
|
||||||
|
EffectImage {
|
||||||
|
imageSource: AppIcons.usersThree
|
||||||
|
colorizationColor: DefaultStyle.main2_600
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Ajouter des participants")
|
||||||
|
font {
|
||||||
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
|
weight: 700 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onClicked: mainItem.addParticipantsRequested()
|
||||||
|
},
|
||||||
|
ListView {
|
||||||
|
id: participantList
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: contentHeight
|
||||||
|
Layout.maximumHeight: 250 * DefaultStyle.dp
|
||||||
|
clip: true
|
||||||
|
model: mainItem.conferenceInfoGui.core.participants
|
||||||
|
delegate: Item {
|
||||||
|
height: 56 * DefaultStyle.dp
|
||||||
|
width: participantList.width
|
||||||
|
RowLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
Avatar {
|
||||||
|
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||||
|
address: modelData.address
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: modelData.displayName
|
||||||
|
font.pixelSize: 14 * DefaultStyle.dp
|
||||||
|
font.capitalization: Font.Capitalize
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
Layout.rightMargin: 10 * DefaultStyle.dp
|
||||||
|
background: Item{}
|
||||||
|
icon.source: AppIcons.closeX
|
||||||
|
contentImageColor: DefaultStyle.main1_500_main
|
||||||
|
onClicked: mainItem.conferenceInfoGui.core.removeParticipant(index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Switch {
|
||||||
|
text: qsTr("Send invitation to participants")
|
||||||
|
Component.onCompleted: {
|
||||||
|
console.log("TODO : handle send invitation to participants")
|
||||||
|
toggle()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.minimumHeight: 1 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,377 +0,0 @@
|
||||||
import QtQuick 2.15
|
|
||||||
import QtQuick.Effects
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import QtQuick.Controls as Control
|
|
||||||
import Linphone
|
|
||||||
import UtilsCpp 1.0
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: mainItem
|
|
||||||
spacing: 8 * DefaultStyle.dp
|
|
||||||
property ConferenceInfoGui conferenceInfoGui
|
|
||||||
signal addParticipantsRequested()
|
|
||||||
signal returnRequested()
|
|
||||||
RowLayout {
|
|
||||||
Button {
|
|
||||||
background: Item{}
|
|
||||||
icon.source: AppIcons.leftArrow
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
onClicked: mainItem.returnRequested()
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
text: qsTr("Nouvelle réunion")
|
|
||||||
color: DefaultStyle.main2_700
|
|
||||||
font {
|
|
||||||
pixelSize: 22 * DefaultStyle.dp
|
|
||||||
weight: 800 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
Button {
|
|
||||||
topPadding: 6 * DefaultStyle.dp
|
|
||||||
bottomPadding: 6 * DefaultStyle.dp
|
|
||||||
leftPadding: 12 * DefaultStyle.dp
|
|
||||||
rightPadding: 12 * DefaultStyle.dp
|
|
||||||
text: qsTr("Créer")
|
|
||||||
textSize: 13 * DefaultStyle.dp
|
|
||||||
onClicked: {
|
|
||||||
if (mainItem.conferenceInfoGui.core.subject.length === 0) {
|
|
||||||
UtilsCpp.showInformationPopup(qsTr("Erreur lors de la création"), qsTr("La conférence doit contenir un sujet"), false)
|
|
||||||
} else if (mainItem.conferenceInfoGui.core.duration <= 0) {
|
|
||||||
UtilsCpp.showInformationPopup(qsTr("Erreur lors de la création"), qsTr("La fin de la conférence doit être plus récente que son début"), false)
|
|
||||||
} else if (mainItem.conferenceInfoGui.core.participantCount === 0) {
|
|
||||||
UtilsCpp.showInformationPopup(qsTr("Erreur lors de la création"), qsTr("La conférence doit contenir au moins un participant"), false)
|
|
||||||
} else {
|
|
||||||
mainItem.conferenceInfoGui.core.save()
|
|
||||||
mainItem.returnRequested()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
component CheckableButton: Button {
|
|
||||||
id: checkableButton
|
|
||||||
checkable: true
|
|
||||||
autoExclusive: true
|
|
||||||
contentImageColor: checked ? DefaultStyle.grey_0 : DefaultStyle.main1_500_main
|
|
||||||
inversedColors: !checked
|
|
||||||
topPadding: 10 * DefaultStyle.dp
|
|
||||||
bottomPadding: 10 * DefaultStyle.dp
|
|
||||||
leftPadding: 16 * DefaultStyle.dp
|
|
||||||
rightPadding: 16 * DefaultStyle.dp
|
|
||||||
contentItem: RowLayout {
|
|
||||||
EffectImage {
|
|
||||||
imageSource: checkableButton.icon.source
|
|
||||||
colorizationColor: checkableButton.checked ? DefaultStyle.grey_0 : DefaultStyle.main1_500_main
|
|
||||||
width: 24 * DefaultStyle.dp
|
|
||||||
height: 24 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
text: checkableButton.text
|
|
||||||
color: checkableButton.checked ? DefaultStyle.grey_0 : DefaultStyle.main1_500_main
|
|
||||||
font {
|
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
|
||||||
weight: 400 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 20 * DefaultStyle.dp
|
|
||||||
Layout.bottomMargin: 20 * DefaultStyle.dp
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
spacing: 20 * DefaultStyle.dp
|
|
||||||
CheckableButton {
|
|
||||||
Layout.preferredWidth: 151 * DefaultStyle.dp
|
|
||||||
icon.source: AppIcons.usersThree
|
|
||||||
text: qsTr("Réunion")
|
|
||||||
checked: true
|
|
||||||
}
|
|
||||||
CheckableButton {
|
|
||||||
Layout.preferredWidth: 151 * DefaultStyle.dp
|
|
||||||
icon.source: AppIcons.slide
|
|
||||||
text: qsTr("Broadcast")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Section {
|
|
||||||
content: RowLayout {
|
|
||||||
EffectImage {
|
|
||||||
imageSource: AppIcons.usersThree
|
|
||||||
colorizationColor: DefaultStyle.main2_600
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
TextInput {
|
|
||||||
id: confTitle
|
|
||||||
text: qsTr("Ajouter un titre")
|
|
||||||
color: DefaultStyle.main2_600
|
|
||||||
font {
|
|
||||||
pixelSize: 20 * DefaultStyle.dp
|
|
||||||
weight: 800 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
onActiveFocusChanged: if(activeFocus==true) selectAll()
|
|
||||||
onEditingFinished: mainItem.conferenceInfoGui.core.subject = text
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Section {
|
|
||||||
Layout.topMargin: 10 * DefaultStyle.dp
|
|
||||||
content: ColumnLayout {
|
|
||||||
spacing: 15 * DefaultStyle.dp
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
EffectImage {
|
|
||||||
imageSource: AppIcons.clock
|
|
||||||
colorizationColor: DefaultStyle.main2_600
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
CalendarComboBox {
|
|
||||||
id: startDate
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: 30 * DefaultStyle.dp
|
|
||||||
onSelectedDateChanged: {
|
|
||||||
mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(selectedDate, startHour.selectedHour, startHour.selectedMin)
|
|
||||||
endDate.calendar.selectedDate = selectedDate
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
Item {
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
StackLayout {
|
|
||||||
currentIndex: allDaySwitch.position
|
|
||||||
RowLayout {
|
|
||||||
TimeComboBox {
|
|
||||||
id: startHour
|
|
||||||
onSelectedHourChanged: {
|
|
||||||
mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
console.log("selected hour", selectedHour, selectedMin)
|
|
||||||
endHour.selectedTimeString = Qt.formatDateTime(UtilsCpp.createDateTime(new Date(), selectedHour == 23 ? 0 : selectedHour + 1, selectedMin), "hh:mm")
|
|
||||||
}
|
|
||||||
onSelectedMinChanged: {
|
|
||||||
mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
console.log("selected min", selectedHour, selectedMin)
|
|
||||||
endHour.selectedTimeString = Qt.formatDateTime(UtilsCpp.createDateTime(new Date(), selectedHour == 23 ? 0 : selectedHour + 1, selectedMin), "hh:mm")
|
|
||||||
}
|
|
||||||
Layout.preferredWidth: 94 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 30 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
TimeComboBox {
|
|
||||||
id: endHour
|
|
||||||
property date startTime: new Date()
|
|
||||||
onSelectedHourChanged: mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
onSelectedMinChanged: mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
Layout.preferredWidth: 94 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 30 * DefaultStyle.dp
|
|
||||||
Component.onCompleted: selectedTimeString = Qt.formatDateTime(UtilsCpp.addSecs(startTime, 3600), "hh:mm")
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
property int durationSec: UtilsCpp.secsTo(startHour.selectedTime, endHour.selectedTime)
|
|
||||||
property int hour: durationSec/3600
|
|
||||||
property int min: (durationSec - hour*3600)/60
|
|
||||||
text: (hour > 0 ? hour + "h" : "") + (min > 0 ? min + "mn" : "")
|
|
||||||
font {
|
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
|
||||||
weight: 700 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CalendarComboBox {
|
|
||||||
id: endDate
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: 30 * DefaultStyle.dp
|
|
||||||
onSelectedDateChanged: mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(selectedDate, 23, 59)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
Item {
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
Switch {
|
|
||||||
id: allDaySwitch
|
|
||||||
text: qsTr("Toute la journée")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ComboBox {
|
|
||||||
id: repeaterCbox
|
|
||||||
enabled: false
|
|
||||||
Component.onCompleted: console.log("TODO : handle conf repetition")
|
|
||||||
constantImageSource: AppIcons.reloadArrow
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: height
|
|
||||||
height: 30 * DefaultStyle.dp
|
|
||||||
width: 307 * DefaultStyle.dp
|
|
||||||
weight: 700 * DefaultStyle.dp
|
|
||||||
leftMargin: 0
|
|
||||||
currentIndex: 0
|
|
||||||
background: Rectangle {
|
|
||||||
visible: parent.hovered || parent.down
|
|
||||||
anchors.fill: parent
|
|
||||||
color: DefaultStyle.grey_100
|
|
||||||
}
|
|
||||||
model: [
|
|
||||||
{text: qsTr("Une fois")},
|
|
||||||
{text: qsTr("Tous les jours")},
|
|
||||||
{text: qsTr("Tous les jours de la semaine (Lun-Ven)")},
|
|
||||||
{text: qsTr("Toutes les semaines")},
|
|
||||||
{text: qsTr("Tous les mois")}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Section {
|
|
||||||
content: RowLayout {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
EffectImage {
|
|
||||||
imageSource: AppIcons.note
|
|
||||||
colorizationColor: DefaultStyle.main2_600
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
TextArea {
|
|
||||||
id: descriptionEdit
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredWidth: 275 * DefaultStyle.dp
|
|
||||||
leftPadding: 8 * DefaultStyle.dp
|
|
||||||
rightPadding: 8 * DefaultStyle.dp
|
|
||||||
hoverEnabled: true
|
|
||||||
placeholderText: qsTr("Ajouter une description")
|
|
||||||
placeholderTextColor: DefaultStyle.main2_600
|
|
||||||
placeholderWeight: 700 * DefaultStyle.dp
|
|
||||||
color: DefaultStyle.main2_600
|
|
||||||
font {
|
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
|
||||||
weight: 400 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
background: Rectangle {
|
|
||||||
anchors.fill: parent
|
|
||||||
color: descriptionEdit.hovered || descriptionEdit.activeFocus ? DefaultStyle.grey_100 : "transparent"
|
|
||||||
radius: 4 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
onEditingFinished: mainItem.conferenceInfoGui.core.description = text
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Section {
|
|
||||||
content: ColumnLayout {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
Button {
|
|
||||||
id: addParticipantsButton
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: 30 * DefaultStyle.dp
|
|
||||||
background: Rectangle {
|
|
||||||
anchors.fill: parent
|
|
||||||
color: addParticipantsButton.hovered ? DefaultStyle.grey_100 : "transparent"
|
|
||||||
radius: 4 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
contentItem: RowLayout {
|
|
||||||
EffectImage {
|
|
||||||
imageSource: AppIcons.usersThree
|
|
||||||
colorizationColor: DefaultStyle.main2_600
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: qsTr("Ajouter des participants")
|
|
||||||
font {
|
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
|
||||||
weight: 700 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onClicked: mainItem.addParticipantsRequested()
|
|
||||||
}
|
|
||||||
ListView {
|
|
||||||
id: participantList
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.preferredHeight: contentHeight
|
|
||||||
Layout.maximumHeight: 250 * DefaultStyle.dp
|
|
||||||
clip: true
|
|
||||||
model: mainItem.conferenceInfoGui.core.participants
|
|
||||||
delegate: Item {
|
|
||||||
height: 56 * DefaultStyle.dp
|
|
||||||
width: participantList.width
|
|
||||||
RowLayout {
|
|
||||||
anchors.fill: parent
|
|
||||||
Avatar {
|
|
||||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 45 * DefaultStyle.dp
|
|
||||||
address: modelData.address
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
text: modelData.displayName
|
|
||||||
font.pixelSize: 14 * DefaultStyle.dp
|
|
||||||
font.capitalization: Font.Capitalize
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
Button {
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
Layout.rightMargin: 10 * DefaultStyle.dp
|
|
||||||
background: Item{}
|
|
||||||
icon.source: AppIcons.closeX
|
|
||||||
contentImageColor: DefaultStyle.main1_500_main
|
|
||||||
onClicked: mainItem.conferenceInfoGui.core.removeParticipant(index)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Switch {
|
|
||||||
text: qsTr("Send invitation to participants")
|
|
||||||
Component.onCompleted: {
|
|
||||||
console.log("TODO : handle send invitation to participants")
|
|
||||||
toggle()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillHeight: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -4,9 +4,11 @@ import UtilsCpp 1.0
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property string selectedTimeString: Qt.formatDateTime(new Date(), "hh:mm")
|
property var selectedDateTime
|
||||||
|
readonly property string selectedTimeString: Qt.formatDateTime(selectedDateTime, "hh:mm")
|
||||||
property int selectedHour: input.hour*1
|
property int selectedHour: input.hour*1
|
||||||
property int selectedMin: input.min*1
|
property int selectedMin: input.min*1
|
||||||
|
property alias contentText: input
|
||||||
popup.width: 73 * DefaultStyle.dp
|
popup.width: 73 * DefaultStyle.dp
|
||||||
listView.model: 48
|
listView.model: 48
|
||||||
listView.implicitHeight: 204 * DefaultStyle.dp
|
listView.implicitHeight: 204 * DefaultStyle.dp
|
||||||
|
|
@ -33,7 +35,7 @@ ComboBox {
|
||||||
mainItem.popup.open()
|
mainItem.popup.open()
|
||||||
} else {
|
} else {
|
||||||
listView.currentIndex = -1
|
listView.currentIndex = -1
|
||||||
mainItem.selectedTimeString = Qt.formatDateTime(UtilsCpp.createDateTime(new Date(), hour, min), "hh:mm")
|
mainItem.selectedDateTime = UtilsCpp.createDateTime(mainItem.selectedDateTime, hour, min)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
font {
|
font {
|
||||||
|
|
@ -48,7 +50,7 @@ ComboBox {
|
||||||
}
|
}
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
console.log("set time", hour, min)
|
console.log("set time", hour, min)
|
||||||
mainItem.selectedTimeString = Qt.formatDateTime(UtilsCpp.createDateTime(new Date(), hour, min), "hh:mm")
|
mainItem.selectedDateTime = UtilsCpp.createDateTime(mainItem.selectedDateTime, hour, min)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
listView.delegate: Text {
|
listView.delegate: Text {
|
||||||
|
|
@ -71,7 +73,7 @@ ComboBox {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
// mainItem.text = parent.text
|
// mainItem.text = parent.text
|
||||||
mainItem.listView.currentIndex = index
|
mainItem.listView.currentIndex = index
|
||||||
mainItem.selectedTimeString = hourDelegate.text
|
mainItem.selectedDateTime = UtilsCpp.createDateTime(mainItem.selectedDateTime, hour, min)
|
||||||
mainItem.popup.close()
|
mainItem.popup.close()
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,16 @@ Layout with line separator used in several views
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 15 * DefaultStyle.dp
|
spacing: 15 * DefaultStyle.dp
|
||||||
property alias content: contentItem.data
|
property alias content: contentLayout.data
|
||||||
implicitHeight: contentItem.implicitHeight + 1 * DefaultStyle.dp + spacing
|
property alias contentLayout: contentLayout
|
||||||
Item {
|
implicitHeight: contentLayout.implicitHeight + 1 * DefaultStyle.dp + spacing
|
||||||
id: contentItem
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
id: contentLayout
|
||||||
Layout.preferredHeight: childrenRect.height
|
spacing: 8 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: childrenRect.width
|
// width: parent.width
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
// Layout.preferredHeight: childrenRect.height
|
||||||
|
// Layout.preferredWidth: parent.width
|
||||||
// Layout.leftMargin: 8 * DefaultStyle.dp
|
// Layout.leftMargin: 8 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
|
||||||
|
|
@ -231,6 +231,7 @@ Item {
|
||||||
id: rightPanelStackView
|
id: rightPanelStackView
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.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 {
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,16 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
onMeetingListCountChanged: showDefaultItem = leftPanelStackView.currentItem.objectName == "listLayout" && meetingListCount === 0
|
onMeetingListCountChanged: showDefaultItem = leftPanelStackView.currentItem.objectName == "listLayout" && meetingListCount === 0
|
||||||
|
|
||||||
function createConference(name, address) {
|
function setUpConference(confInfoGui = null) {
|
||||||
var confInfoGui = Qt.createQmlObject('import Linphone
|
var isCreation = !confInfoGui
|
||||||
|
if (isCreation) {
|
||||||
|
confInfoGui = Qt.createQmlObject('import Linphone
|
||||||
ConferenceInfoGui{
|
ConferenceInfoGui{
|
||||||
}', mainItem)
|
}', mainItem)
|
||||||
leftPanelStackView.push(createConference, {"conferenceInfoGui": confInfoGui})
|
leftPanelStackView.push(createConf, {"conferenceInfoGui": confInfoGui, "isCreation": isCreation})
|
||||||
|
} else {
|
||||||
|
rightPanelStackView.push(editConf, {"conferenceInfoGui": confInfoGui, "isCreation": isCreation})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
leftPanelContent: ColumnLayout {
|
leftPanelContent: ColumnLayout {
|
||||||
|
|
@ -53,14 +58,28 @@ AbstractMainPage {
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
|
Control.ScrollBar {
|
||||||
|
id: meetingsScrollbar
|
||||||
|
visible: leftPanelStackView.currentItem.objectName == "listLayout"
|
||||||
|
active: true
|
||||||
|
interactive: true
|
||||||
|
policy: Control.ScrollBar.AsNeeded
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
Control.StackView {
|
Control.StackView {
|
||||||
id: leftPanelStackView
|
id: leftPanelStackView
|
||||||
initialItem: listLayout
|
initialItem: listLayout
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
anchors.rightMargin: leftPanel.sideMargin
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
id: listLayout
|
id: listLayout
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
property string objectName: "listLayout"
|
||||||
spacing: 19 * DefaultStyle.dp
|
spacing: 19 * DefaultStyle.dp
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -84,7 +103,7 @@ AbstractMainPage {
|
||||||
width: 30 * DefaultStyle.dp
|
width: 30 * DefaultStyle.dp
|
||||||
height: 30 * DefaultStyle.dp
|
height: 30 * DefaultStyle.dp
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mainItem.createConference()
|
mainItem.setUpConference()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -121,35 +140,7 @@ AbstractMainPage {
|
||||||
onCountChanged: {
|
onCountChanged: {
|
||||||
mainItem.meetingListCount = count
|
mainItem.meetingListCount = count
|
||||||
}
|
}
|
||||||
Control.ScrollBar.vertical: Control.ScrollBar {
|
Control.ScrollBar.vertical: meetingsScrollbar
|
||||||
id: meetingsScrollbar
|
|
||||||
active: true
|
|
||||||
interactive: true
|
|
||||||
policy: Control.ScrollBar.AsNeeded
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.right: parent.right
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Component {
|
|
||||||
id: createConference
|
|
||||||
NewMeeting {
|
|
||||||
onReturnRequested: leftPanelStackView.pop()
|
|
||||||
onAddParticipantsRequested: {
|
|
||||||
onClicked: leftPanelStackView.push(addParticipants, {"conferenceInfoGui": conferenceInfoGui})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Component {
|
|
||||||
id: addParticipants
|
|
||||||
AddParticipantsLayout {
|
|
||||||
title: qsTr("Ajouter des participants")
|
|
||||||
validateButtonText: qsTr("Ajouter")
|
|
||||||
titleColor: DefaultStyle.main1_500_main
|
|
||||||
onReturnRequested: {
|
|
||||||
leftPanelStackView.pop()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -157,6 +148,54 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: createConf
|
||||||
|
MeetingSetUp {
|
||||||
|
Layout.rightMargin: leftPanel.sideMargin
|
||||||
|
onCreationSucceed: {
|
||||||
|
leftPanelStackView.pop()
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Nouvelle réunion"), qsTr("Réunion planifiée avec succès"), true)
|
||||||
|
}
|
||||||
|
onAddParticipantsRequested: {
|
||||||
|
leftPanelStackView.push(addParticipants, {"conferenceInfoGui": conferenceInfoGui, "container": leftPanelStackView})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
id: editConf
|
||||||
|
RowLayout {
|
||||||
|
property bool isCreation
|
||||||
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
|
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
|
||||||
|
conferenceInfoGui: parent.conferenceInfoGui
|
||||||
|
onReturnRequested: {
|
||||||
|
mainItem.rightPanelStackView.pop()
|
||||||
|
}
|
||||||
|
onAddParticipantsRequested: {
|
||||||
|
mainItem.rightPanelStackView.push(addParticipants, {"conferenceInfoGui": conferenceInfoGui, "container": mainItem.rightPanelStackView})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
id: addParticipants
|
||||||
|
AddParticipantsLayout {
|
||||||
|
title: qsTr("Ajouter des participants")
|
||||||
|
validateButtonText: qsTr("Ajouter")
|
||||||
|
titleColor: DefaultStyle.main1_500_main
|
||||||
|
property Control.StackView container
|
||||||
|
onReturnRequested: {
|
||||||
|
container.pop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Component {
|
Component {
|
||||||
id: meetingDetail
|
id: meetingDetail
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -192,7 +231,7 @@ AbstractMainPage {
|
||||||
icon.source: AppIcons.pencil
|
icon.source: AppIcons.pencil
|
||||||
contentImageColor: DefaultStyle.main1_500_main
|
contentImageColor: DefaultStyle.main1_500_main
|
||||||
background: Item{}
|
background: Item{}
|
||||||
onClicked: mainItem.rightPanelStackView.replace()
|
onClicked: mainItem.setUpConference(mainItem.selectedConference) //mainItem.rightPanelStackView.push(meetingEdition)
|
||||||
}
|
}
|
||||||
PopupButton {
|
PopupButton {
|
||||||
id: deletePopup
|
id: deletePopup
|
||||||
|
|
@ -402,42 +441,149 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component {
|
// Component {
|
||||||
id: meetingEdition
|
// id: meetingEdition
|
||||||
Section {
|
// RowLayout {
|
||||||
content: RowLayout {
|
// ColumnLayout {
|
||||||
spacing: 8 * DefaultStyle.dp
|
// Layout.alignment: Qt.AlignTop
|
||||||
Button {
|
// Layout.preferredWidth: 393 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
// Layout.fillWidth: false
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
// Layout.fillHeight: true
|
||||||
icon.source: AppIcons.leftArrow
|
// Layout.leftMargin: 39 * DefaultStyle.dp
|
||||||
contentImageColor: DefaultStyle.main1_500_main
|
// Layout.topMargin: 39 * DefaultStyle.dp
|
||||||
background: Item{}
|
// spacing: 25 * DefaultStyle.dp
|
||||||
onClicked: mainItem.rightPanelStackView.pop()
|
// Section {
|
||||||
}
|
// content: RowLayout {
|
||||||
Image {
|
// spacing: 8 * DefaultStyle.dp
|
||||||
source: AppIcons.usersThree
|
// Button {
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
// Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
// Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
}
|
// icon.source: AppIcons.leftArrow
|
||||||
Text {
|
// contentImageColor: DefaultStyle.main1_500_main
|
||||||
text: mainItem.selectedConference.core.subject
|
// background: Item{}
|
||||||
font {
|
// onClicked: mainItem.rightPanelStackView.pop()
|
||||||
pixelSize: 20 * DefaultStyle.dp
|
// }
|
||||||
weight: 800 * DefaultStyle.dp
|
// EffectImage {
|
||||||
}
|
// imageSource: AppIcons.usersThree
|
||||||
}
|
// Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Item {
|
// Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
Layout.fillWidth: true
|
// colorizationColor: DefaultStyle.main2_600
|
||||||
}
|
// }
|
||||||
Button {
|
// TextInput {
|
||||||
text: qsTr("Save")
|
// Component.onCompleted: text = mainItem.selectedConference.core.subject
|
||||||
onClicked: {
|
// color: DefaultStyle.main2_600
|
||||||
console.log("TODO : save meeting infos")
|
// font {
|
||||||
mainItem.rightPanelStackView.pop(meetingDetail, Control.StackView.Immediate)
|
// 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