diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts
index 3a0dbfead..d66c7dceb 100644
--- a/linphone-app/assets/languages/da.ts
+++ b/linphone-app/assets/languages/da.ts
@@ -520,6 +520,11 @@ Server url ikke konfigureret.
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1101,6 +1106,24 @@ Server url ikke konfigureret.
Din konto er blevet oprettet men endnu ikke valideret. Hvis du lukker denne dialogboks skal du indtaste og validere din konto indenfor 24 timer.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts
index 80140be4d..bc670b24f 100644
--- a/linphone-app/assets/languages/de.ts
+++ b/linphone-app/assets/languages/de.ts
@@ -520,6 +520,11 @@ Server URL ist nicht konfiguriert.
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1101,6 +1106,24 @@ Server URL ist nicht konfiguriert.
Ihr Konto wurde erstellt aber noch nicht verifiziert. Wenn Sie diese Ansicht schließen müssen Sie Ihr Konto innerhalb der nächsten 24 Stunden manuell anlegen und verifizieren.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts
index 760d1fa5c..379b6a424 100644
--- a/linphone-app/assets/languages/en.ts
+++ b/linphone-app/assets/languages/en.ts
@@ -520,6 +520,11 @@ Server URL not configured.
'Join' : Action button to join the conference.
Join
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+ Do you really want do delete this meeting?
+
ChatConferenceInvitationMessage
@@ -1101,6 +1106,24 @@ Server URL not configured.
Your account has been created but has not been validated yet. If you quit this view, you would have to manually add and validate your account within 24 hours.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+ Select date
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+ Select time
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+ Select date and time
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts
index 89349f81a..1fb7405b0 100644
--- a/linphone-app/assets/languages/es.ts
+++ b/linphone-app/assets/languages/es.ts
@@ -520,6 +520,11 @@ URL del servidor no configurada.
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1101,6 +1106,24 @@ URL del servidor no configurada.
Tu cuenta se ha creado pero aún no se ha validado. Si sales de esta vista, tendrás que agregar y validar manualmente tu cuenta en un plazo de 24 horas.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts
index de63f6464..570ea6152 100644
--- a/linphone-app/assets/languages/fr_FR.ts
+++ b/linphone-app/assets/languages/fr_FR.ts
@@ -520,6 +520,11 @@ URL du serveur non configurée.
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1101,6 +1106,24 @@ URL du serveur non configurée.
Votre compte a été créé mais il n'a pas été validé. Si vous quittez cette vue, vous devrez ajouter et valider manuellement votre compte dans les 24 heures.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts
index 5b5e60249..71e0aae3c 100644
--- a/linphone-app/assets/languages/hu.ts
+++ b/linphone-app/assets/languages/hu.ts
@@ -519,6 +519,11 @@ A kiszolgáló URL-je nincs konfigurálva.
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1095,6 +1100,24 @@ A kiszolgáló URL-je nincs konfigurálva.
Fiókját létrehozta, de még nem hitelesítette. Ha kilép ebből a nézetből, akkor 24 órán belül kézzel kell hozzáadnia és érvényesítenie a fiókját.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts
index 1f8d25923..bbe4d1fff 100644
--- a/linphone-app/assets/languages/it.ts
+++ b/linphone-app/assets/languages/it.ts
@@ -520,6 +520,11 @@ URL del server non configurato.
'Join' : Action button to join the conference.
Partecipa
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1101,6 +1106,24 @@ URL del server non configurato.
Il tuo account è stato creato ma non è ancora stato convalidato. Se esci da questa schermata, dovrai aggiungere e convalidare manualmente il tuo account entro 24 ore.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts
index b4ab4aabd..d3d741f23 100644
--- a/linphone-app/assets/languages/ja.ts
+++ b/linphone-app/assets/languages/ja.ts
@@ -519,6 +519,11 @@
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1095,6 +1100,24 @@
アカウントは作成されましたが、まだ確認が完了していません。このビューを終了するには、24時間以内に手動でアカウントを追加して検証する必要があります。
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts
index de45e2faf..4043261ce 100644
--- a/linphone-app/assets/languages/lt.ts
+++ b/linphone-app/assets/languages/lt.ts
@@ -521,6 +521,11 @@ Nesukonfigūruotas serverio url.
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1107,6 +1112,24 @@ Nesukonfigūruotas serverio url.
Jūsų paskyra buvo sukurta, bet dar nepatvirtinta. Jei atsisakysite šio rodinio, turėtumėte rankiniu būdu pridėti ir patvirtinti savo sąskaitą per 24 valandas.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts
index 67a5bbd04..92bcd0f09 100644
--- a/linphone-app/assets/languages/pt_BR.ts
+++ b/linphone-app/assets/languages/pt_BR.ts
@@ -520,6 +520,11 @@ URL do servidor não configurado.
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1101,6 +1106,24 @@ URL do servidor não configurado.
Sua conta foi criada, mas ainda não foi validada. Se sair desta vista, terá de adicionar e validar manualmente a sua conta dentro de 24 horas.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts
index cc6b22cd5..7e61dc4ce 100644
--- a/linphone-app/assets/languages/ru.ts
+++ b/linphone-app/assets/languages/ru.ts
@@ -521,6 +521,11 @@
'Join' : Action button to join the conference.
Присоединиться
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1107,6 +1112,24 @@
Ваш аккаунт был создан, но ещё не подтверждён. Если вы выйдете, вам потребуется вручную добавить и подтвердить свой аккаунт в течении 24 часов.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts
index 84b571117..152297c92 100644
--- a/linphone-app/assets/languages/sv.ts
+++ b/linphone-app/assets/languages/sv.ts
@@ -520,6 +520,11 @@ Serverwebbadressen är inte konfigurerad.
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1101,6 +1106,24 @@ Serverwebbadressen är inte konfigurerad.
Ditt konto har skapats men har ännu inte validerats. Om du avslutar den här vyn måste du manuellt lägga till och validera ditt konto inom 24 timmar.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts
index 365aa8ac1..16bcd99aa 100644
--- a/linphone-app/assets/languages/tr.ts
+++ b/linphone-app/assets/languages/tr.ts
@@ -519,6 +519,11 @@ Sunucu url'si yapılandırılmadı.
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1095,6 +1100,24 @@ Sunucu url'si yapılandırılmadı.
Hesabınız oluşturuldu ancak henüz doğrulanmadı. Eğer bu görünümden çıkarsanız, hesabınızı 24 saat içinde doğrulamanız ve kendi kendinize yeniden eklemek zorunda kalırsınız.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts
index 7ccd7340b..83ae43862 100644
--- a/linphone-app/assets/languages/uk.ts
+++ b/linphone-app/assets/languages/uk.ts
@@ -521,6 +521,11 @@
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1107,6 +1112,24 @@
Вашу обліківку було створено, але ще не підтверджено. Якщо ви вийдете, вам знадобиться вручну додати та підтвердити свою обліківку впродовж 24 годин.
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts
index a07a93104..c33b47c94 100644
--- a/linphone-app/assets/languages/zh_CN.ts
+++ b/linphone-app/assets/languages/zh_CN.ts
@@ -519,6 +519,11 @@
'Join' : Action button to join the conference.
+
+ deleteConferenceInfo
+ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+
+
ChatConferenceInvitationMessage
@@ -1095,6 +1100,24 @@
您的账户已创建,但未验证。如果您退出当前界面,您将需要在 24 小时之内手动添加并验证您的账户。
+
+ DateTimeDialog
+
+ dateTimeDialogDate
+ 'Select date' : Menu title to show select date.
+
+
+
+ dateTimeDialogTime
+ 'Select time' : Menu title to show select time.
+
+
+
+ dateTimeDialogDateTime
+ 'Select date and time' : Menu title to show select date and time.
+
+
+
DroppableTextArea
diff --git a/linphone-app/resources.qrc b/linphone-app/resources.qrc
index be45788a3..9f8cb951d 100644
--- a/linphone-app/resources.qrc
+++ b/linphone-app/resources.qrc
@@ -169,6 +169,7 @@
ui/modules/Common/Animations/BusyIndicator.qml
ui/modules/Common/Constants/Constants.qml
ui/modules/Common/Dialog/ConfirmDialog.qml
+ ui/modules/Common/Dialog/DateTimeDialog.qml
ui/modules/Common/Dialog/DialogDescription.qml
ui/modules/Common/Dialog/DialogPlus.qml
ui/modules/Common/Dialog/DialogTitle.qml
@@ -244,6 +245,7 @@
ui/modules/Common/Popup/PopupShadow.qml
ui/modules/Common/qmldir
ui/modules/Common/Styles/Animations/BusyIndicatorStyle.qml
+ ui/modules/Common/Styles/Dialog/DateTimeDialogStyle.qml
ui/modules/Common/Styles/Dialog/DialogStyle.qml
ui/modules/Common/Styles/Form/ActionBarStyle.qml
ui/modules/Common/Styles/Form/ActionSwitchStyle.qml
diff --git a/linphone-app/src/components/core/CoreManager.cpp b/linphone-app/src/components/core/CoreManager.cpp
index 6e9653ac5..887c6b64c 100644
--- a/linphone-app/src/components/core/CoreManager.cpp
+++ b/linphone-app/src/components/core/CoreManager.cpp
@@ -315,20 +315,31 @@ void CoreManager::migrate () {
if( rcVersion < 1) {
newParams->setContactParameters(Constants::DefaultContactParameters);
newParams->setExpires(Constants::DefaultExpires);
- qInfo() << "Migrating " << accountIdentity << " for version 1. contact parameters = " << Constants::DefaultContactParameters << ", expires = " << Constants::DefaultExpires;
+ qInfo() << "Migrating" << accountIdentity << "for version 1. contact parameters =" << Constants::DefaultContactParameters << ", expires =" << Constants::DefaultExpires;
}
if( rcVersion < 2) {
- newParams->setConferenceFactoryUri(Constants::DefaultConferenceURI);
+ bool exists = newParams->getConferenceFactoryUri() != "";
setlimeServerUrl = true;
- qInfo() << "Migrating " << accountIdentity << " for version 2. conference factory URI = " << Constants::DefaultConferenceURI;
+ if(!exists )
+ newParams->setConferenceFactoryUri(Constants::DefaultConferenceURI);
+ qInfo() << "Migrating" << accountIdentity << "for version 2. Conference factory URI" << (exists ? std::string("unchanged") : std::string("= ") +Constants::DefaultConferenceURI).c_str();
+ // note: using std::string.c_str() to avoid having double quotes in qInfo()
}
if( rcVersion < 3){
newParams->enableCpimInBasicChatRoom(true);
- qInfo() << "Migrating " << accountIdentity << " for version 3. enable Cpim in basic chat rooms";
+ qInfo() << "Migrating" << accountIdentity << "for version 3. Enable Cpim in basic chat rooms";
}
if( rcVersion < 4){
newParams->enableRtpBundle(true);
- qInfo() << "Migrating " << accountIdentity << " for version 4. enable RTP bundle mode";
+ qInfo() << "Migrating" << accountIdentity << "for version 4. Enable RTP bundle mode";
+ }
+ if( rcVersion < 5) {
+ bool exists = !!newParams->getAudioVideoConferenceFactoryAddress();
+ setlimeServerUrl = true;
+ if( !exists)
+ newParams->setAudioVideoConferenceFactoryAddress(Utils::interpretUrl(Constants::DefaultVideoConferenceURI));
+ qInfo() << "Migrating" << accountIdentity << "for version 5. Video conference factory URI" << (exists ? std::string("unchanged") : std::string("= ") +Constants::DefaultVideoConferenceURI).c_str();
+ // note: using std::string.c_str() to avoid having double quotes in qInfo()
}
account->setParams(newParams);
}
diff --git a/linphone-app/src/utils/Constants.cpp b/linphone-app/src/utils/Constants.cpp
index 6f731186b..7f75b6b7b 100644
--- a/linphone-app/src/utils/Constants.cpp
+++ b/linphone-app/src/utils/Constants.cpp
@@ -65,6 +65,7 @@ constexpr qint64 Constants::FileSizeLimit;
constexpr char Constants::DefaultXmlrpcUri[];
constexpr char Constants::DefaultConferenceURI[];
+constexpr char Constants::DefaultVideoConferenceURI[];
constexpr char Constants::DefaultLimeServerURL[];
constexpr char Constants::RemoteProvisioningURL[];
constexpr char Constants::DefaultAssistantRegistrationUrl[];
diff --git a/linphone-app/src/utils/Constants.hpp b/linphone-app/src/utils/Constants.hpp
index 0a34fdcb0..52a083af5 100644
--- a/linphone-app/src/utils/Constants.hpp
+++ b/linphone-app/src/utils/Constants.hpp
@@ -69,8 +69,8 @@ public:
static constexpr char LinphoneBZip2_dll[] = "https://www.linphone.org/releases/windows/tools/bzip2/bzip2.dll";
static constexpr char DefaultRlsUri[] = "sips:rls@sip.linphone.org";
static constexpr char DefaultLogsEmail[] = "linphone-desktop@belledonne-communications.com";
- //static constexpr char DefaultConferenceURI[] = "sip:conference-factory@sip.linphone.org";
- static constexpr char DefaultConferenceURI[] = "sip:videoconference-factory2@sip.linphone.org";
+ static constexpr char DefaultConferenceURI[] = "sip:conference-factory@sip.linphone.org";
+ static constexpr char DefaultVideoConferenceURI[] = "sip:videoconference-factory2@sip.linphone.org";
static constexpr char DefaultLimeServerURL[] = "https://lime.linphone.org/lime-server/lime-server.php";
static constexpr char RemoteProvisioningURL[] = "https://subscribe.linphone.org/flexiapi/provisioning";
@@ -138,9 +138,10 @@ public:
static constexpr char VcardScheme[] = EXECUTABLE_NAME "-desktop:/";
static constexpr int CbsCallInterval = 20;
static constexpr char RcVersionName[] = "rc_version";
- static constexpr int RcVersionCurrent = 4; // 2 = Conference URI
+ static constexpr int RcVersionCurrent = 5; // 2 = Conference URI
// 3 = CPIM on basic chat rooms
// 4 = RTP bundle mode
+ // 5 = Video Conference URI
//--------------------------------------------------------------------------------
// CISCO
diff --git a/linphone-app/ui/modules/Common/Dialog/DateTimeDialog.qml b/linphone-app/ui/modules/Common/Dialog/DateTimeDialog.qml
new file mode 100644
index 000000000..e968b74a8
--- /dev/null
+++ b/linphone-app/ui/modules/Common/Dialog/DateTimeDialog.qml
@@ -0,0 +1,64 @@
+import QtQuick 2.7
+import QtQuick.Controls 2.7
+import QtQuick.Layouts 1.3
+
+import Common 1.0
+import Common.Styles 1.0
+import Linphone 1.0
+import Linphone.Styles 1.0
+import Utils 1.0
+
+// =============================================================================
+
+DialogPlus {
+ id: mainItem
+ height: 550
+ width: 500
+
+ property alias showDatePicker : datePicker.visible
+ property alias showTimePicker: timePicker.visible
+
+ property alias selectedDate: datePicker.selectedDate
+ property alias selectedTime: timePicker.selectedTime
+
+// ---------------------------------------------------------------------------
+ buttons: [
+ TextButtonB {
+ text: 'ok'
+
+ onClicked: {
+ exit({selectedDate: mainItem.selectedDate, selectedTime: mainItem.selectedTime})
+ }
+ }
+ ]
+
+ buttonsAlignment: Qt.AlignCenter
+
+ //: 'Select date' : Menu title to show select date.
+ property string dateTitle: qsTr('dateTimeDialogDate')
+ //: 'Select time' : Menu title to show select time.
+ property string timeTitle: qsTr('dateTimeDialogTime')
+ //: 'Select date and time' : Menu title to show select date and time.
+ property string dateTimeTitle: qsTr('dateTimeDialogDateTime')
+ title: showDatePicker
+ ? showTimePicker
+ ? dateTimeTitle
+ : timeTitle
+ : timeTitle
+ // ---------------------------------------------------------------------------
+ RowLayout{
+ anchors.fill: parent
+ DatePicker{
+ id: datePicker
+ visible: false
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ }
+ TimePicker{
+ id: timePicker
+ visible: false
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ }
+ }
+}
diff --git a/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml b/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml
index 1e6c6d945..23b691217 100644
--- a/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml
+++ b/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml
@@ -41,7 +41,7 @@ Rectangle {
// ---------------------------------------------------------------------------
- signal exitStatus (int status)
+ signal exitStatus (var status)
// ---------------------------------------------------------------------------
diff --git a/linphone-app/ui/modules/Common/Form/ComboBox.qml b/linphone-app/ui/modules/Common/Form/ComboBox.qml
index f83fd16ec..d7f683f2c 100644
--- a/linphone-app/ui/modules/Common/Form/ComboBox.qml
+++ b/linphone-app/ui/modules/Common/Form/ComboBox.qml
@@ -97,14 +97,22 @@ Controls.ComboBox {
// ---------------------------------------------------------------------------
popup: Controls.Popup{
+ id: popupItem
y: comboBox.yPopup
+ x: comboBox.rootItem ? comboBox.width : 0
width: comboBox.selectionWidth
- implicitHeight: contentItem.contentHeight
+ implicitHeight: selector.contentHeight
+ Connections{// Break binding loops
+ target: selector
+ ignoreUnknownSignals: true
+ onContentHeightChanged: Qt.callLater(function(){popupItem.implicitHeight = selector.contentHeight})
+ }
topPadding: 0
bottomPadding: 0
leftPadding: 0
rightPadding: 0
contentItem: ListItemSelector{
+ id: selector
model: comboBox.popup.visible ? comboBox.model : null
currentIndex: comboBox.highlightedIndex
textRole: comboBox.textRole
diff --git a/linphone-app/ui/modules/Common/Picker/DatePicker.qml b/linphone-app/ui/modules/Common/Picker/DatePicker.qml
index f6fe8ae43..b1e8891a3 100644
--- a/linphone-app/ui/modules/Common/Picker/DatePicker.qml
+++ b/linphone-app/ui/modules/Common/Picker/DatePicker.qml
@@ -7,7 +7,7 @@ import Units 1.0
Item{
id: mainItem
-
+ property bool allYears : false // if false : years from today
property alias selectedDate: monthList.selectedDate
signal clicked(date date);
@@ -18,23 +18,27 @@ Item{
anchors.left: parent.left
anchors.right: parent.right
height: 30
+ Layout.alignment: Qt.AlignCenter
ActionButton{
isCustom: true
colorSet: DatePickerStyle.nextMonthButton
rotation: 180
onClicked: --monthList.currentIndex
+ visible: monthList.currentIndex > 0
}
Text { // month year
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
horizontalAlignment: Qt.AlignCenter
text: new Date(monthList.currentYear, monthList.currentMonth, 1).toLocaleString(Qt.locale(), 'MMMM yyyy')
- font.pointSize: Units.dp * 11
+ color: DatePickerStyle.title.color
+ font.pointSize: DatePickerStyle.title.pointSize
}
ActionButton{
isCustom: true
colorSet: DatePickerStyle.nextMonthButton
onClicked: ++monthList.currentIndex
+ visible: monthList.currentIndex < monthList.count
}
}
ListView {
@@ -43,18 +47,17 @@ Item{
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
-
+ cacheBuffer:0
property int maxYears: 5 // Max years to be requested.
function set(date) {
selectedDate = new Date(date)
- positionViewAtIndex((selectedDate.getFullYear()-minYear) * 12 + selectedDate.getMonth(), ListView.Center)
+ var moveTo = (selectedDate.getFullYear()-minYear) * 12 + selectedDate.getMonth()
+ currentIndex = moveTo
}
-
-
- property date selectedDate
- property int minYear: new Date(0,0,0).getFullYear()
+ property date selectedDate: new Date()
+ property int minYear: mainItem.allYears ? new Date(0,0,0).getFullYear() : new Date().getFullYear()
snapMode: ListView.SnapOneItem
orientation: Qt.Horizontal
@@ -69,72 +72,88 @@ Item{
highlightFollowsCurrentItem: true
highlightRangeMode: ListView.StrictlyEnforceRange
highlightMoveDuration: 100
+
+ Component.onCompleted: monthList.set(mainItem.selectedDate)
+
delegate: Item {
- width: monthList.width; height: monthList.height
+ width: monthList.width == 0 ? 100 : monthList.width
+ height: monthList.height == 0 ? 100 : monthList.height
property int year: Math.floor(index / 12) + monthList.minYear
property int month: index % 12
property int firstDay: new Date(year, month, 1).getDay()
-
- Column {
- Grid { // 1 month calender
- id: grid
+ GridLayout { // 1 month calender
+ id: grid
+
+ //width: monthList.width; height: monthList.height
+ anchors.fill: parent
+ property real cellWidth: width / columns;
+ property real cellHeight: height / rows // width and height of each cell in the grid.
+ property real cellMinSize: Math.min(cellHeight, cellWidth)
+
+ columns: 7 // days
+ rows: 7
+
+ Repeater {
+ model: grid.columns * grid.rows // 49 cells per month
- width: monthList.width; height: monthList.height
- property real cellWidth: width / columns;
- property real cellHeight: height / rows // width and height of each cell in the grid.
-
- columns: 7 // days
- rows: 7
-
- Repeater {
- model: grid.columns * grid.rows // 49 cells per month
+ delegate: Item{
+ id: cellItem
+ property int day: index - 7 // 0 = top left below Sunday (-7 to 41)
+ property int date: day - firstDay + 1 // 1-31
+ property bool selected : new Date(year, month, date).toDateString() == monthList.selectedDate.toDateString() && text.text && day >= 0
+ width: grid.cellMinSize
+ height: width
- delegate: Rectangle { // index is 0 to 48
- property int day: index - 7 // 0 = top left below Sunday (-7 to 41)
- property int date: day - firstDay + 1 // 1-31
-
- width: grid.cellWidth; height: grid.cellHeight
- border.width: 0.3 * radius
- border.color: new Date(year, month, date).toDateString() == monthList.selectedDate.toDateString() && text.text && day >= 0?
- 'black': 'transparent' // selected
- radius: 0.02 * monthList.height
+ Rectangle { // index is 0 to 48
+ anchors.centerIn: parent
+ width: Math.max(text.implicitWidth, text.implicitHeight) + 20
+ height: width
+ //border.width: 0.3 * radius
+ border.width: 2
+ border.color: cellItem.selected ? DatePickerStyle.cell.selectedBorderColor : 'transparent' // selected
+ //radius: 0.02 * monthList.height
+ radius: width/2
opacity: !mouseArea.pressed? 1: 0.3 // pressed state
Text {
id: text
anchors.centerIn: parent
- font.pixelSize: day < 0 ? Units.dp * 11 : Units.dp * 10
- font.bold: day < 0 || new Date(year, month, date).toDateString() == new Date().toDateString() // today
+ color: DatePickerStyle.cell.color
+ font.pixelSize: cellItem.selected
+ ? DatePickerStyle.cell.selectedPointSize
+ : cellItem.day < 0
+ ? DatePickerStyle.cell.dayHeaderPointSize
+ : DatePickerStyle.cell.dayPointSize
+ font.bold: cellItem.day < 0 || cellItem.selected || new Date(year, month, cellItem.date).toDateString() == new Date().toDateString() // today
text: {
- if(day < 0)
+ if(cellItem.day < 0)
// Magic date to set day names in this order : 'S', 'M', 'T', 'W', 'T', 'F', 'S' in Locale
return new Date(1,3,index).toLocaleString(Qt.locale(), 'ddd')[0]
- else if(new Date(year, month, date).getMonth() == month)
- return date
+ else if(new Date(year, month, cellItem.date).getMonth() == month)
+ return cellItem.date
else
return ''
}
}
+ }
+
+ MouseArea {
+ id: mouseArea
- MouseArea {
- id: mouseArea
-
- anchors.fill: parent
- enabled: text.text && day >= 0
-
- onClicked: {
- monthList.selectedDate = new Date(year, month, date)
- mainItem.clicked(monthList.selectedDate)
- }
+ anchors.fill: parent
+ enabled: text.text && cellItem.day >= 0
+
+ onClicked: {
+ monthList.selectedDate = new Date(year, month, cellItem.date)
+ mainItem.clicked(monthList.selectedDate)
}
}
}
}
}
}
- Component.onCompleted: set(mainItem.selectedDate)
}
}
\ No newline at end of file
diff --git a/linphone-app/ui/modules/Common/Picker/TimePicker.qml b/linphone-app/ui/modules/Common/Picker/TimePicker.qml
index c9aba081e..3a11561ed 100644
--- a/linphone-app/ui/modules/Common/Picker/TimePicker.qml
+++ b/linphone-app/ui/modules/Common/Picker/TimePicker.qml
@@ -17,12 +17,14 @@ Item{
signal newDate(date date)
signal clicked(date date)
- function getDate(){
+ onNewDate: selectedTime = date
+
+ function getDate(hText, mText){
var d = new Date()
- if(outer.currentItem)
- d.setHours(outer.currentItem.text)
- if(inner.currentItem)
- d.setMinutes(inner.currentItem.text)
+ if(hText || outer.currentItem)
+ d.setHours(hText ? hText : outer.currentItem.text)
+ if(mText || inner.currentItem)
+ d.setMinutes(mText ? mText : inner.currentItem.text)
d.setSeconds(0)
return d;
}
@@ -34,6 +36,13 @@ Item{
interactive: false
highlightRangeMode: PathView.NoHighlightRange
+ currentIndex: 0
+ Connections{// startX/Y begin from currentIndex. It must be set to 0 at first.
+ target: mainItem
+ onSelectedTimeChanged: outer.currentIndex = mainItem.selectedTime.getHours() % 24
+ }
+ Component.onCompleted: currentIndex = mainItem.selectedTime.getHours() % 24
+
highlight: Rectangle {
id: rect
width: 30 * 1.5
@@ -60,7 +69,7 @@ Item{
MouseArea {
anchors.fill: parent
- onClicked: outer.currentIndex = index
+ onClicked: mainItem.selectedTime = mainItem.getDate(parent.text, undefined)
}
}
@@ -89,6 +98,13 @@ Item{
interactive: false
highlightRangeMode: PathView.NoHighlightRange
+ currentIndex: 0
+ Connections{// startX/Y begin from currentIndex. It must be set to 0 at first.
+ target: mainItem
+ onSelectedTimeChanged: inner.currentIndex = mainItem.selectedTime.getMinutes() / 5
+ }
+ Component.onCompleted: currentIndex = mainItem.selectedTime.getMinutes() / 5
+
highlight: Rectangle {
width: 30 * 1.5
height: width
@@ -113,7 +129,7 @@ Item{
MouseArea {
anchors.fill: parent
- onClicked: inner.currentIndex = index
+ onClicked: mainItem.selectedTime = mainItem.getDate(undefined, parent.text)
}
}
@@ -136,15 +152,14 @@ Item{
RowLayout {
id: selectedTimeArea
- x: centerPosition - width/2
- y: centerPosition - height/2
+ property int cBinding: centerPosition // remove binding loop
+ onCBindingChanged: Qt.callLater(function(){x = centerPosition - width/2; y= centerPosition - height/2})// To avoid binding loops
Text {
id: h
font.pointSize: Units.dp * 12
font.bold: true
text: outer.currentItem.text.length < 2 ? '0' + outer.currentItem.text : outer.currentItem.text
- onTextChanged: mainItem.newDate(mainItem.getDate())
}
Text {
id: div
@@ -157,7 +172,6 @@ Item{
font.pointSize: Units.dp * 12
font.bold: true
text: inner.currentItem.text.length < 2 ? '0' + inner.currentItem.text : inner.currentItem.text
- onTextChanged: mainItem.newDate(mainItem.getDate())
}
@@ -165,12 +179,8 @@ Item{
MouseArea {
anchors.fill: selectedTimeArea
onClicked: {
- mainItem.clicked(mainItem.getDate())
+ mainItem.selectedTime = mainItem.getDate()
+ mainItem.clicked(mainItem.selectedTime)
}
}
- Component.onCompleted: {
- outer.currentIndex = mainItem.selectedTime.getHours() % 24
- inner.currentIndex = mainItem.selectedTime.getMinutes() / 10
-
- }
}
\ No newline at end of file
diff --git a/linphone-app/ui/modules/Common/Styles/Dialog/DateTimeDialogStyle.qml b/linphone-app/ui/modules/Common/Styles/Dialog/DateTimeDialogStyle.qml
new file mode 100644
index 000000000..00358d965
--- /dev/null
+++ b/linphone-app/ui/modules/Common/Styles/Dialog/DateTimeDialogStyle.qml
@@ -0,0 +1,56 @@
+pragma Singleton
+import QtQml 2.2
+
+import Units 1.0
+import ColorsList 1.0
+
+// =============================================================================
+
+QtObject {
+ property string sectionName : 'DateTimeDialog'
+ property color color: ColorsList.add(sectionName, 'k').color
+
+ property QtObject title: QtObject {
+ property color lowGradient: ColorsList.add(sectionName+'_title_gradient_low', 'y').color
+ property color highGradient: ColorsList.add(sectionName+'_title_gradient_high', 'z').color
+ }
+
+ property QtObject buttons: QtObject {
+ property int bottomMargin: 25
+ property int leftMargin: 50
+ property int rightMargin: 50
+ property int spacing: 20
+ property int topMargin: 15
+ }
+
+ property QtObject confirmDialog: QtObject {
+ property int height: 200
+ property int width: 400
+ }
+
+ property QtObject content: QtObject {
+ property int leftMargin: 25
+ property int rightMargin: 25
+ property int topMargin: 10
+ property int bottomMargin: 25
+ }
+
+ property QtObject description: QtObject {
+ property color color: ColorsList.add(sectionName+'_description', 'j').color
+ property int leftMargin: 50
+ property int pointSize: Units.dp * 11
+ property int rightMargin: 50
+ property int verticalMargin: 25
+ }
+ property QtObject closeButton: QtObject {
+ property int iconSize: 20
+ property string name : 'close'
+ property string icon : 'close_custom'
+ property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_b_n', icon, 'l_n_b_bg').color
+ property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_b_h', icon, 'l_h_b_bg').color
+ property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_b_p', icon, 'l_p_b_bg').color
+ property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_f_n', icon, 'l_n_b_fg').color
+ property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_f_h', icon, 'l_h_b_fg').color
+ property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_f_p', icon, 'l_p_b_fg').color
+ }
+}
diff --git a/linphone-app/ui/modules/Common/Styles/Picker/DatePickerStyle.qml b/linphone-app/ui/modules/Common/Styles/Picker/DatePickerStyle.qml
index 4b2223cd5..b9b379cdd 100644
--- a/linphone-app/ui/modules/Common/Styles/Picker/DatePickerStyle.qml
+++ b/linphone-app/ui/modules/Common/Styles/Picker/DatePickerStyle.qml
@@ -9,6 +9,18 @@ import ColorsList 1.0
QtObject {
property string sectionName : 'DatePicker'
+ property QtObject title: QtObject{
+ property color color: ColorsList.add(sectionName+'_title_fg', 'g').color
+ property real pointSize: Units.dp * 11
+ }
+ property QtObject cell: QtObject{
+ property color color: ColorsList.add(sectionName+'_cell_fg', 'g').color
+ property color selectedBorderColor: ColorsList.add(sectionName+'_selected', 'i').color
+ property real selectedPointSize: Units.dp * 14
+ property real dayHeaderPointSize: Units.dp * 12
+ property real dayPointSize: Units.dp * 11
+ }
+
property QtObject nextMonthButton: QtObject {
property int iconSize: 20
property string name : 'nextMonth'
diff --git a/linphone-app/ui/modules/Common/Styles/qmldir b/linphone-app/ui/modules/Common/Styles/qmldir
index 5d861f5c3..d76b12f3d 100644
--- a/linphone-app/ui/modules/Common/Styles/qmldir
+++ b/linphone-app/ui/modules/Common/Styles/qmldir
@@ -7,6 +7,7 @@ module Common.Styles
singleton BusyIndicatorStyle 1.0 Animations/BusyIndicatorStyle.qml
singleton DialogStyle 1.0 Dialog/DialogStyle.qml
+singleton DateTimeDialogStyle 1.0 Dialog/DateTimeDialogStyle.qml
singleton ActionBarStyle 1.0 Form/ActionBarStyle.qml
singleton ActionSwitchStyle 1.0 Form/ActionSwitchStyle.qml
diff --git a/linphone-app/ui/modules/Common/qmldir b/linphone-app/ui/modules/Common/qmldir
index 0974817b8..a025a39b3 100644
--- a/linphone-app/ui/modules/Common/qmldir
+++ b/linphone-app/ui/modules/Common/qmldir
@@ -12,6 +12,7 @@ singleton Constants 1.0 Constants/Constants.qml
BusyIndicator 1.0 Animations/BusyIndicator.qml
+DateTimeDialog 1.0 Dialog/DateTimeDialog.qml
DialogDescription 1.0 Dialog/DialogDescription.qml
ConfirmDialog 1.0 Dialog/ConfirmDialog.qml
DialogPlus 1.0 Dialog/DialogPlus.qml
diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml
index 68e0cddb7..901335c96 100644
--- a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml
+++ b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml
@@ -327,7 +327,14 @@ Loader{
colorSet: ChatCalendarMessageStyle.deleteButton
backgroundRadius: width/2
onClicked: {
- mainItem.conferenceInfoModel.deleteConferenceInfo()
+ window.attachVirtualWindow(Utils.buildCommonDialogUri('ConfirmDialog'), {
+ //: 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting.
+ descriptionText: qsTr('deleteConferenceInfo'),
+ }, function (status) {
+ if (status) {
+ mainItem.conferenceInfoModel.deleteConferenceInfo()
+ }
+ })
}
}
}
diff --git a/linphone-app/ui/views/App/Dialog/NewConference.qml b/linphone-app/ui/views/App/Dialog/NewConference.qml
index e55655282..3eddad3c7 100644
--- a/linphone-app/ui/views/App/Dialog/NewConference.qml
+++ b/linphone-app/ui/views/App/Dialog/NewConference.qml
@@ -294,27 +294,27 @@ DialogPlus {
Layout.preferredWidth: parent.cellWidth; wrapMode: Text.WordWrap; color: NewConferenceStyle.titles.textColor; font.weight: NewConferenceStyle.titles.weight; font.pointSize: NewConferenceStyle.titles.pointSize }
TextField{id: dateField; Layout.preferredWidth: parent.cellWidth
color: NewConferenceStyle.fields.textColor; font.weight: NewConferenceStyle.fields.weight; font.pointSize: NewConferenceStyle.fields.pointSize
+ property date currentDate: new Date()
function getDate(){
- return Date.fromLocaleDateString(scheduleForm.locale, text,'yyyy/MM/dd')
+ return currentDate
}
function setDate(date){
- text = date.toLocaleDateString(scheduleForm.locale, 'yyyy/MM/dd')
+ currentDate = date
+ text = date.toLocaleDateString(scheduleForm.locale, Qt.ISODate)
}
- text: conferenceManager.conferenceInfoModel? conferenceManager.conferenceInfoModel.dateTime.toLocaleDateString(scheduleForm.locale, 'yyyy/MM/dd') : ''
+ text: conferenceManager.conferenceInfoModel ? conferenceManager.conferenceInfoModel.dateTime.toLocaleDateString(scheduleForm.locale, Qt.ISODate) : ''
icon: 'drop_down_custom'
showWhenEmpty: false
MouseArea{
anchors.fill: parent
onClicked: {
- if( rightStackView.currentItemType === 1) {
- rightStackView.currentItemType = 0
- rightStackView.pop()// Cancel
- }else {
- if( rightStackView.depth > 1 )
- rightStackView.pop()//Remove previous request
- rightStackView.currentItemType = 1
- rightStackView.push(datePicker, {selectedDate: new Date(dateField.getDate())})
- }
+ window.attachVirtualWindow(Utils.buildCommonDialogUri('DateTimeDialog'), {showDatePicker:true, selectedDate: new Date(dateField.getDate())}
+ , function (status) {
+ if(status){
+ dateField.setDate(status.selectedDate)
+ }
+ }
+ )
}
}
}
@@ -341,15 +341,13 @@ DialogPlus {
anchors.right: parent.right
width: parent.width-50
onClicked: {
- if( rightStackView.currentItemType === 2) {
- rightStackView.currentItemType = 0
- rightStackView.pop()// Cancel
- }else {
- if( rightStackView.depth > 1 )
- rightStackView.pop()//Remove previous request
- rightStackView.currentItemType = 2
- rightStackView.push(timePicker,{selectedTime: new Date(timeField.getTime())})
- }
+ window.attachVirtualWindow(Utils.buildCommonDialogUri('DateTimeDialog'), {showTimePicker:true, selectedTime: new Date(timeField.getTime())}
+ , function (status) {
+ if(status){
+ timeField.setTime(status.selectedTime)
+ }
+ }
+ )
}
}
}
@@ -364,7 +362,7 @@ DialogPlus {
]
textRole: "text"
selectionWidth: 200
- rootItem: conferenceManager
+ //rootItem: conferenceManager
}
ComboBox{
@@ -600,31 +598,6 @@ DialogPlus {
//----------------------------------------------------
// STACKVIEWS
//----------------------------------------------------
- Component{
- id: datePicker
- DatePicker{
- onClicked: {
- dateField.setDate(date)
- rightStackView.currentItemType = 0
- rightStackView.pop()
- }
- }
- }
-
- Component{
- id: timePicker
- TimePicker{
- onNewDate:{
- if(date != timeField.getTime())
- timeField.setTime(date)
- }
- onClicked: {
- timeField.setTime(date)
- rightStackView.currentItemType = 0
- rightStackView.pop()
- }
- }
- }
}
}
}