FIXES:
correctly initialize remote params + create video call paused call ui calls window simplify carousel effect image : don't show effect if no colorization use our custom button instead of qtquick one image buttons size security page ui update right panel on call history deleted
This commit is contained in:
parent
9667aae47f
commit
c588688197
39 changed files with 435 additions and 427 deletions
|
|
@ -50,13 +50,19 @@ CallCore::CallCore(const std::shared_ptr<linphone::Call> &call) : QObject(nullpt
|
||||||
mPeerAddress = Utils::coreStringToAppString(mCallModel->getRemoteAddress()->asStringUriOnly());
|
mPeerAddress = Utils::coreStringToAppString(mCallModel->getRemoteAddress()->asStringUriOnly());
|
||||||
mStatus = LinphoneEnums::fromLinphone(call->getCallLog()->getStatus());
|
mStatus = LinphoneEnums::fromLinphone(call->getCallLog()->getStatus());
|
||||||
mTransferState = LinphoneEnums::fromLinphone(call->getTransferState());
|
mTransferState = LinphoneEnums::fromLinphone(call->getTransferState());
|
||||||
|
auto token = Utils::coreStringToAppString(mCallModel->getAuthenticationToken());
|
||||||
|
auto localToken = mDir == LinphoneEnums::CallDir::Incoming ? token.left(2).toUpper() : token.right(2).toUpper();
|
||||||
|
auto remoteToken = mDir == LinphoneEnums::CallDir::Outgoing ? token.left(2).toUpper() : token.right(2).toUpper();
|
||||||
mEncryption = LinphoneEnums::fromLinphone(call->getParams()->getMediaEncryption());
|
mEncryption = LinphoneEnums::fromLinphone(call->getParams()->getMediaEncryption());
|
||||||
auto tokenVerified = mCallModel->getAuthenticationTokenVerified();
|
auto tokenVerified = mCallModel->getAuthenticationTokenVerified();
|
||||||
|
mLocalSas = localToken;
|
||||||
|
mRemoteSas = remoteToken;
|
||||||
mIsSecured = (mEncryption == LinphoneEnums::MediaEncryption::Zrtp && tokenVerified) ||
|
mIsSecured = (mEncryption == LinphoneEnums::MediaEncryption::Zrtp && tokenVerified) ||
|
||||||
mEncryption == LinphoneEnums::MediaEncryption::Srtp ||
|
mEncryption == LinphoneEnums::MediaEncryption::Srtp ||
|
||||||
mEncryption == LinphoneEnums::MediaEncryption::Dtls;
|
mEncryption == LinphoneEnums::MediaEncryption::Dtls;
|
||||||
mPaused = mState == LinphoneEnums::CallState::Pausing || mState == LinphoneEnums::CallState::Paused ||
|
mPaused = mState == LinphoneEnums::CallState::Pausing || mState == LinphoneEnums::CallState::Paused ||
|
||||||
mState == LinphoneEnums::CallState::PausedByRemote;
|
mState == LinphoneEnums::CallState::PausedByRemote;
|
||||||
|
mRemoteVideoEnabled = call->getRemoteParams() && call->getRemoteParams()->videoEnabled();
|
||||||
mRecording = call->getParams() && call->getParams()->isRecording();
|
mRecording = call->getParams() && call->getParams()->isRecording();
|
||||||
mRemoteRecording = call->getRemoteParams() && call->getRemoteParams()->isRecording();
|
mRemoteRecording = call->getRemoteParams() && call->getRemoteParams()->isRecording();
|
||||||
mRecordable = mState == LinphoneEnums::CallState::StreamsRunning;
|
mRecordable = mState == LinphoneEnums::CallState::StreamsRunning;
|
||||||
|
|
@ -159,12 +165,14 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
|
||||||
auto tokenVerified = mCallModel->getAuthenticationTokenVerified();
|
auto tokenVerified = mCallModel->getAuthenticationTokenVerified();
|
||||||
auto token = Utils::coreStringToAppString(mCallModel->getAuthenticationToken());
|
auto token = Utils::coreStringToAppString(mCallModel->getAuthenticationToken());
|
||||||
mCallModelConnection->invokeToCore([this, call, encryption, tokenVerified, token]() {
|
mCallModelConnection->invokeToCore([this, call, encryption, tokenVerified, token]() {
|
||||||
|
if (token.size() == 4) {
|
||||||
auto localToken =
|
auto localToken =
|
||||||
mDir == LinphoneEnums::CallDir::Incoming ? token.left(2).toUpper() : token.right(2).toUpper();
|
mDir == LinphoneEnums::CallDir::Incoming ? token.left(2).toUpper() : token.right(2).toUpper();
|
||||||
auto remoteToken =
|
auto remoteToken =
|
||||||
mDir == LinphoneEnums::CallDir::Outgoing ? token.left(2).toUpper() : token.right(2).toUpper();
|
mDir == LinphoneEnums::CallDir::Outgoing ? token.left(2).toUpper() : token.right(2).toUpper();
|
||||||
setLocalSas(localToken);
|
setLocalSas(localToken);
|
||||||
setRemoteSas(remoteToken);
|
setRemoteSas(remoteToken);
|
||||||
|
}
|
||||||
setEncryption(encryption);
|
setEncryption(encryption);
|
||||||
setIsSecured((encryption == LinphoneEnums::MediaEncryption::Zrtp && tokenVerified) ||
|
setIsSecured((encryption == LinphoneEnums::MediaEncryption::Zrtp && tokenVerified) ||
|
||||||
encryption == LinphoneEnums::MediaEncryption::Srtp ||
|
encryption == LinphoneEnums::MediaEncryption::Srtp ||
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
|
|
||||||
|
|
@ -82,6 +82,7 @@ QString ToolModel::getDisplayName(QString address) {
|
||||||
}
|
}
|
||||||
|
|
||||||
QSharedPointer<CallCore> ToolModel::createCall(const QString &sipAddress,
|
QSharedPointer<CallCore> ToolModel::createCall(const QString &sipAddress,
|
||||||
|
bool withVideo,
|
||||||
const QString &prepareTransfertAddress,
|
const QString &prepareTransfertAddress,
|
||||||
const QHash<QString, QString> &headers,
|
const QHash<QString, QString> &headers,
|
||||||
linphone::MediaEncryption mediaEncryption) {
|
linphone::MediaEncryption mediaEncryption) {
|
||||||
|
|
@ -96,7 +97,7 @@ QSharedPointer<CallCore> ToolModel::createCall(const QString &sipAddress,
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<linphone::CallParams> params = core->createCallParams(nullptr);
|
std::shared_ptr<linphone::CallParams> params = core->createCallParams(nullptr);
|
||||||
params->enableVideo(false);
|
params->enableVideo(withVideo);
|
||||||
params->setMediaEncryption(mediaEncryption);
|
params->setMediaEncryption(mediaEncryption);
|
||||||
if (Utils::coreStringToAppString(params->getRecordFile()).isEmpty()) {
|
if (Utils::coreStringToAppString(params->getRecordFile()).isEmpty()) {
|
||||||
|
|
||||||
|
|
@ -116,6 +117,7 @@ QSharedPointer<CallCore> ToolModel::createCall(const QString &sipAddress,
|
||||||
|
|
||||||
if (core->getDefaultAccount()) params->setAccount(core->getDefaultAccount());
|
if (core->getDefaultAccount()) params->setAccount(core->getDefaultAccount());
|
||||||
auto call = core->inviteAddressWithParams(address, params);
|
auto call = core->inviteAddressWithParams(address, params);
|
||||||
|
call->enableCamera(withVideo);
|
||||||
return call ? CallCore::create(call) : nullptr;
|
return call ? CallCore::create(call) : nullptr;
|
||||||
|
|
||||||
/* TODO transfer
|
/* TODO transfer
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ public:
|
||||||
static QString getDisplayName(QString address);
|
static QString getDisplayName(QString address);
|
||||||
|
|
||||||
static QSharedPointer<CallCore> createCall(const QString &sipAddress,
|
static QSharedPointer<CallCore> createCall(const QString &sipAddress,
|
||||||
|
bool withVideo = false,
|
||||||
const QString &prepareTransfertAddress = "",
|
const QString &prepareTransfertAddress = "",
|
||||||
const QHash<QString, QString> &headers = {},
|
const QHash<QString, QString> &headers = {},
|
||||||
linphone::MediaEncryption = linphone::MediaEncryption::None);
|
linphone::MediaEncryption = linphone::MediaEncryption::None);
|
||||||
|
|
|
||||||
|
|
@ -93,12 +93,13 @@ QString Utils::getInitials(const QString &username) {
|
||||||
}
|
}
|
||||||
|
|
||||||
VariantObject *Utils::createCall(const QString &sipAddress,
|
VariantObject *Utils::createCall(const QString &sipAddress,
|
||||||
|
bool withVideo,
|
||||||
const QString &prepareTransfertAddress,
|
const QString &prepareTransfertAddress,
|
||||||
const QHash<QString, QString> &headers) {
|
const QHash<QString, QString> &headers) {
|
||||||
VariantObject *data = new VariantObject(QVariant()); // Scope : GUI
|
VariantObject *data = new VariantObject(QVariant()); // Scope : GUI
|
||||||
if (!data) return nullptr;
|
if (!data) return nullptr;
|
||||||
data->makeRequest([sipAddress, prepareTransfertAddress, headers]() {
|
data->makeRequest([sipAddress, withVideo, prepareTransfertAddress, headers]() {
|
||||||
auto call = ToolModel::createCall(sipAddress, prepareTransfertAddress, headers);
|
auto call = ToolModel::createCall(sipAddress, withVideo, prepareTransfertAddress, headers);
|
||||||
if (call) {
|
if (call) {
|
||||||
auto callGui = QVariant::fromValue(new CallGui(call));
|
auto callGui = QVariant::fromValue(new CallGui(call));
|
||||||
App::postCoreSync([callGui]() {
|
App::postCoreSync([callGui]() {
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ public:
|
||||||
Q_INVOKABLE static QString getInitials(const QString &username); // Support UTF32
|
Q_INVOKABLE static QString getInitials(const QString &username); // Support UTF32
|
||||||
|
|
||||||
Q_INVOKABLE static VariantObject *createCall(const QString &sipAddress,
|
Q_INVOKABLE static VariantObject *createCall(const QString &sipAddress,
|
||||||
|
bool withVideo = false,
|
||||||
const QString &prepareTransfertAddress = "",
|
const QString &prepareTransfertAddress = "",
|
||||||
const QHash<QString, QString> &headers = {});
|
const QHash<QString, QString> &headers = {});
|
||||||
Q_INVOKABLE static void setFirstLaunch(bool first);
|
Q_INVOKABLE static void setFirstLaunch(bool first);
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ Window {
|
||||||
// modality: Qt.WindowModal
|
// modality: Qt.WindowModal
|
||||||
|
|
||||||
property CallGui call
|
property CallGui call
|
||||||
|
property bool callTerminatedByUser: false
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: call.core
|
target: call.core
|
||||||
|
|
@ -32,7 +33,7 @@ Window {
|
||||||
onCallChanged: {
|
onCallChanged: {
|
||||||
waitingTime.seconds = 0
|
waitingTime.seconds = 0
|
||||||
waitingTimer.restart()
|
waitingTimer.restart()
|
||||||
console.log("call changed", call)
|
console.log("call changed", call, waitingTime.seconds)
|
||||||
}
|
}
|
||||||
|
|
||||||
property var callState: call.core.state
|
property var callState: call.core.state
|
||||||
|
|
@ -128,13 +129,10 @@ Window {
|
||||||
: DefaultStyle.grey_600
|
: DefaultStyle.grey_600
|
||||||
radius: 71 * DefaultStyle.dp
|
radius: 71 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
contentItem: EffectImage {
|
icon.source: disabledIcon && bottomButton.checked ? disabledIcon : enabledIcon
|
||||||
source: disabledIcon && bottomButton.checked ? disabledIcon : enabledIcon
|
height: 32 * DefaultStyle.dp
|
||||||
imageWidth: 32 * DefaultStyle.dp
|
width: 32 * DefaultStyle.dp
|
||||||
imageHeight: 32 * DefaultStyle.dp
|
contentImageColor: DefaultStyle.grey_0
|
||||||
anchors.centerIn: parent
|
|
||||||
colorizationColor: disabledIcon && bottomButton.checked ? DefaultStyle.main2_0 : DefaultStyle.grey_0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ZrtpTokenAuthenticationDialog {
|
ZrtpTokenAuthenticationDialog {
|
||||||
id: zrtpValidation
|
id: zrtpValidation
|
||||||
|
|
@ -214,7 +212,8 @@ Window {
|
||||||
source:(mainWindow.call.core.state === LinphoneEnums.CallState.End
|
source:(mainWindow.call.core.state === LinphoneEnums.CallState.End
|
||||||
|| mainWindow.call.core.state === LinphoneEnums.CallState.Released)
|
|| mainWindow.call.core.state === LinphoneEnums.CallState.Released)
|
||||||
? AppIcons.endCall
|
? AppIcons.endCall
|
||||||
: mainWindow.call.core.paused
|
: (mainWindow.call.core.state === LinphoneEnums.CallState.Paused
|
||||||
|
|| mainWindow.call.core.state === LinphoneEnums.CallState.PausedByRemote)
|
||||||
? AppIcons.pause
|
? AppIcons.pause
|
||||||
: mainWindow.call.core.dir === LinphoneEnums.CallDir.Outgoing
|
: mainWindow.call.core.dir === LinphoneEnums.CallDir.Outgoing
|
||||||
? AppIcons.outgoingCall
|
? AppIcons.outgoingCall
|
||||||
|
|
@ -227,7 +226,8 @@ Window {
|
||||||
id: callStatusText
|
id: callStatusText
|
||||||
text: (mainWindow.call.core.state === LinphoneEnums.CallState.End || mainWindow.call.core.state === LinphoneEnums.CallState.Released)
|
text: (mainWindow.call.core.state === LinphoneEnums.CallState.End || mainWindow.call.core.state === LinphoneEnums.CallState.Released)
|
||||||
? qsTr("End of the call")
|
? qsTr("End of the call")
|
||||||
: (mainWindow.call.core.paused)
|
: (mainWindow.call.core.state === LinphoneEnums.CallState.Paused
|
||||||
|
|| mainWindow.call.core.state === LinphoneEnums.CallState.PausedByRemote)
|
||||||
? qsTr("Appel mis en pause")
|
? qsTr("Appel mis en pause")
|
||||||
: EnumsToStringCpp.dirToString(mainWindow.call.core.dir) + qsTr(" call")
|
: EnumsToStringCpp.dirToString(mainWindow.call.core.dir) + qsTr(" call")
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
|
|
@ -277,15 +277,11 @@ Window {
|
||||||
bottomPadding: 8 * DefaultStyle.dp
|
bottomPadding: 8 * DefaultStyle.dp
|
||||||
leftPadding: 10 * DefaultStyle.dp
|
leftPadding: 10 * DefaultStyle.dp
|
||||||
rightPadding: 10 * DefaultStyle.dp
|
rightPadding: 10 * DefaultStyle.dp
|
||||||
width: 269 * DefaultStyle.dp
|
visible: mainWindow.call.core.isSecured
|
||||||
visible: mainWindow.call.core.peerSecured
|
|
||||||
onVisibleChanged: console.log("peer secured", mainWindow.call.core.peerSecured)
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: DefaultStyle.main2_0
|
|
||||||
border.color: DefaultStyle.info_500_main
|
border.color: DefaultStyle.info_500_main
|
||||||
border.width: 1 * DefaultStyle.dp
|
radius: 15 * DefaultStyle.dp
|
||||||
radius: 50 * DefaultStyle.dp
|
|
||||||
}
|
}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
Image {
|
Image {
|
||||||
|
|
@ -301,6 +297,7 @@ Window {
|
||||||
color: DefaultStyle.info_500_main
|
color: DefaultStyle.info_500_main
|
||||||
font {
|
font {
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
|
weight: 400 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -322,6 +319,28 @@ Window {
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
id: centerItem
|
id: centerItem
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
Text {
|
||||||
|
id: callTerminatedText
|
||||||
|
Connections {
|
||||||
|
target: mainWindow
|
||||||
|
onCallStateChanged: {
|
||||||
|
if (mainWindow.call.core.state === LinphoneEnums.CallState.End) {
|
||||||
|
callTerminatedText.visible = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
visible: false
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 25 * DefaultStyle.dp
|
||||||
|
text: mainWindow.callTerminatedByUser ? qsTr("Vous avez terminé l'appel") : qsTr("Votre correspondant a terminé l'appel")
|
||||||
|
color: DefaultStyle.grey_0
|
||||||
|
z: 1
|
||||||
|
font {
|
||||||
|
pixelSize: 22 * DefaultStyle.dp
|
||||||
|
weight: 300 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
StackLayout {
|
StackLayout {
|
||||||
id: centerLayout
|
id: centerLayout
|
||||||
currentIndex: 0
|
currentIndex: 0
|
||||||
|
|
@ -335,10 +354,10 @@ Window {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Sticker {
|
Sticker {
|
||||||
visible: false
|
|
||||||
call: mainWindow.call
|
call: mainWindow.call
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
// visible: mainWindow.call.core.state != LinphoneEnums.CallState.End
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: waitingTimer
|
id: waitingTimer
|
||||||
|
|
@ -391,6 +410,8 @@ Window {
|
||||||
}
|
}
|
||||||
Sticker {
|
Sticker {
|
||||||
id: preview
|
id: preview
|
||||||
|
visible: mainWindow.call.core.state != LinphoneEnums.CallState.End
|
||||||
|
&& mainWindow.call.core.state != LinphoneEnums.CallState.Released
|
||||||
height: 180 * DefaultStyle.dp
|
height: 180 * DefaultStyle.dp
|
||||||
width: 300 * DefaultStyle.dp
|
width: 300 * DefaultStyle.dp
|
||||||
anchors.right: centerItem.right
|
anchors.right: centerItem.right
|
||||||
|
|
@ -492,7 +513,7 @@ Window {
|
||||||
visible: parent.visible
|
visible: parent.visible
|
||||||
closeButtonVisible: false
|
closeButtonVisible: false
|
||||||
onLaunchCall: {
|
onLaunchCall: {
|
||||||
callObj = UtilsCpp.createCall(dialerTextInput.text + "@sip.linphone.org")
|
callObj = UtilsCpp.createCall(dialerTextInput.text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -558,8 +579,8 @@ Window {
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
id: callStateText
|
id: callStateText
|
||||||
text: modelData.core.state === LinphoneEnums.CallState.Paused
|
text: mainWindow.call.core.state === LinphoneEnums.CallState.Paused
|
||||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
|| mainWindow.call.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||||
? qsTr("Appel en pause") : qsTr("Appel en cours")
|
? qsTr("Appel en pause") : qsTr("Appel en cours")
|
||||||
}
|
}
|
||||||
PopupButton {
|
PopupButton {
|
||||||
|
|
@ -570,12 +591,14 @@ Window {
|
||||||
|
|
||||||
popup.contentItem: ColumnLayout {
|
popup.contentItem: ColumnLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Control.Button {
|
Button {
|
||||||
|
leftPadding: 0
|
||||||
|
topPadding: 5 * DefaultStyle.dp
|
||||||
|
bottomPadding: 5 * DefaultStyle.dp
|
||||||
background: Item {}
|
background: Item {}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
Image {
|
Image {
|
||||||
source: modelData.core.state === LinphoneEnums.CallState.Paused
|
source: modelData.core.paused
|
||||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
|
||||||
? AppIcons.phone : AppIcons.pause
|
? AppIcons.phone : AppIcons.pause
|
||||||
sourceSize.width: 32 * DefaultStyle.dp
|
sourceSize.width: 32 * DefaultStyle.dp
|
||||||
sourceSize.height: 32 * DefaultStyle.dp
|
sourceSize.height: 32 * DefaultStyle.dp
|
||||||
|
|
@ -584,8 +607,7 @@ Window {
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
text: modelData.core.state === LinphoneEnums.CallState.Paused
|
text: modelData.core.paused
|
||||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
|
||||||
? qsTr("Reprendre l'appel") : qsTr("Mettre en pause")
|
? qsTr("Reprendre l'appel") : qsTr("Mettre en pause")
|
||||||
color: DefaultStyle.main2_500main
|
color: DefaultStyle.main2_500main
|
||||||
Layout.preferredWidth: metrics.width
|
Layout.preferredWidth: metrics.width
|
||||||
|
|
@ -600,7 +622,10 @@ Window {
|
||||||
}
|
}
|
||||||
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
|
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
|
||||||
}
|
}
|
||||||
Control.Button {
|
Button {
|
||||||
|
leftPadding: 0
|
||||||
|
topPadding: 5 * DefaultStyle.dp
|
||||||
|
bottomPadding: 5 * DefaultStyle.dp
|
||||||
background: Item {}
|
background: Item {}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
EffectImage {
|
EffectImage {
|
||||||
|
|
@ -617,7 +642,10 @@ Window {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: mainWindow.endCall(modelData)
|
onClicked: {
|
||||||
|
mainWindow.endCall(modelData)
|
||||||
|
mainWindow.callTerminatedByUser = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -647,9 +675,14 @@ Window {
|
||||||
if (mainWindow.call.core.state === LinphoneEnums.CallState.Connected || mainWindow.call.core.state === LinphoneEnums.CallState.StreamsRunning) {
|
if (mainWindow.call.core.state === LinphoneEnums.CallState.Connected || mainWindow.call.core.state === LinphoneEnums.CallState.StreamsRunning) {
|
||||||
bottomButtonsLayout.layoutDirection = Qt.RightToLeft
|
bottomButtonsLayout.layoutDirection = Qt.RightToLeft
|
||||||
connectedCallButtons.visible = true
|
connectedCallButtons.visible = true
|
||||||
} else if (mainWindow.callState === LinphoneEnums.CallState.OutgoingInit || mainWindow.callState === LinphoneEnums.CallState.End) {
|
videoCameraButton.enabled = true
|
||||||
|
moreOptionsButton.visible = true
|
||||||
|
}
|
||||||
|
else if (mainWindow.callState === LinphoneEnums.CallState.OutgoingInit) {
|
||||||
connectedCallButtons.visible = false
|
connectedCallButtons.visible = false
|
||||||
bottomButtonsLayout.layoutDirection = Qt.LeftToRight
|
bottomButtonsLayout.layoutDirection = Qt.LeftToRight
|
||||||
|
videoCameraButton.enabled = false
|
||||||
|
moreOptionsButton.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -680,7 +713,10 @@ Window {
|
||||||
color: DefaultStyle.danger_500main
|
color: DefaultStyle.danger_500main
|
||||||
radius: 71 * DefaultStyle.dp
|
radius: 71 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
onClicked: mainWindow.endCall(mainWindow.call)
|
onClicked: {
|
||||||
|
mainWindow.endCall(mainWindow.call)
|
||||||
|
mainWindow.callTerminatedByUser = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: connectedCallButtons
|
id: connectedCallButtons
|
||||||
|
|
@ -688,6 +724,7 @@ Window {
|
||||||
Layout.row: 0
|
Layout.row: 0
|
||||||
Layout.column: 1
|
Layout.column: 1
|
||||||
BottomButton {
|
BottomButton {
|
||||||
|
id: pauseButton
|
||||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|
@ -708,18 +745,6 @@ Window {
|
||||||
mainWindow.call.core.lSetPaused(!callsModel.currentCall.core.paused)
|
mainWindow.call.core.lSetPaused(!callsModel.currentCall.core.paused)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BottomButton {
|
|
||||||
id: newCallButton
|
|
||||||
checkable: false
|
|
||||||
enabledIcon: AppIcons.newCall
|
|
||||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
|
||||||
onClicked: {
|
|
||||||
var mainWin = UtilsCpp.getMainWindow()
|
|
||||||
UtilsCpp.smartShowWindow(mainWin)
|
|
||||||
mainWin.goToNewCall()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BottomButton {
|
BottomButton {
|
||||||
id: transferCallButton
|
id: transferCallButton
|
||||||
enabledIcon: AppIcons.transferCall
|
enabledIcon: AppIcons.transferCall
|
||||||
|
|
@ -738,6 +763,18 @@ Window {
|
||||||
onVisibleChanged: if(!rightPanel.visible) transferCallButton.checked = false
|
onVisibleChanged: if(!rightPanel.visible) transferCallButton.checked = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BottomButton {
|
||||||
|
id: newCallButton
|
||||||
|
checkable: false
|
||||||
|
enabledIcon: AppIcons.newCall
|
||||||
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
|
onClicked: {
|
||||||
|
var mainWin = UtilsCpp.getMainWindow()
|
||||||
|
UtilsCpp.smartShowWindow(mainWin)
|
||||||
|
mainWin.goToNewCall()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.row: 0
|
Layout.row: 0
|
||||||
|
|
@ -748,6 +785,7 @@ Window {
|
||||||
|| mainWindow.call.core.state == LinphoneEnums.CallState.IncomingReceived
|
|| mainWindow.call.core.state == LinphoneEnums.CallState.IncomingReceived
|
||||||
? bottomButtonsLayout.columns - 1 : 0
|
? bottomButtonsLayout.columns - 1 : 0
|
||||||
BottomButton {
|
BottomButton {
|
||||||
|
id: videoCameraButton
|
||||||
enabledIcon: AppIcons.videoCamera
|
enabledIcon: AppIcons.videoCamera
|
||||||
disabledIcon: AppIcons.videoCameraSlash
|
disabledIcon: AppIcons.videoCameraSlash
|
||||||
checked: !mainWindow.call.core.cameraEnabled
|
checked: !mainWindow.call.core.cameraEnabled
|
||||||
|
|
@ -787,7 +825,7 @@ Window {
|
||||||
id: optionsList
|
id: optionsList
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
|
|
||||||
Control.Button {
|
Button {
|
||||||
id: callListButton
|
id: callListButton
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
background: Item {
|
background: Item {
|
||||||
|
|
@ -810,7 +848,7 @@ Window {
|
||||||
moreOptionsMenu.close()
|
moreOptionsMenu.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Control.Button {
|
Button {
|
||||||
id: dialerButton
|
id: dialerButton
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
background: Item {
|
background: Item {
|
||||||
|
|
@ -833,32 +871,7 @@ Window {
|
||||||
moreOptionsMenu.close()
|
moreOptionsMenu.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Control.Button {
|
Button {
|
||||||
id: speakerButton
|
|
||||||
Layout.fillWidth: true
|
|
||||||
checkable: true
|
|
||||||
background: Item {
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
contentItem: RowLayout {
|
|
||||||
EffectImage {
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: mainWindow.call.core.speakerMuted ? AppIcons.speakerSlash : AppIcons.speaker
|
|
||||||
colorizationColor: mainWindow.call.core.speakerMuted ? DefaultStyle.danger_500main : undefined
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
text: mainWindow.call.core.speakerMuted ? qsTr("Activer le son") : qsTr("Désactiver le son")
|
|
||||||
color: mainWindow.call.core.speakerMuted ? DefaultStyle.danger_500main : DefaultStyle.main2_600
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
onClicked: {
|
|
||||||
mainWindow.call.core.lSetSpeakerMuted(!mainWindow.call.core.speakerMuted)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Control.Button {
|
|
||||||
id: recordButton
|
id: recordButton
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
enabled: mainWindow.call.core.recordable
|
enabled: mainWindow.call.core.recordable
|
||||||
|
|
@ -884,6 +897,31 @@ Window {
|
||||||
mainWindow.call.core.recording ? mainWindow.call.core.lStopRecording() : mainWindow.call.core.lStartRecording()
|
mainWindow.call.core.recording ? mainWindow.call.core.lStopRecording() : mainWindow.call.core.lStartRecording()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Button {
|
||||||
|
id: speakerButton
|
||||||
|
Layout.fillWidth: true
|
||||||
|
checkable: true
|
||||||
|
background: Item {
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
contentItem: RowLayout {
|
||||||
|
EffectImage {
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
source: mainWindow.call.core.speakerMuted ? AppIcons.speakerSlash : AppIcons.speaker
|
||||||
|
colorizationColor: mainWindow.call.core.speakerMuted ? DefaultStyle.danger_500main : undefined
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: mainWindow.call.core.speakerMuted ? qsTr("Activer le son") : qsTr("Désactiver le son")
|
||||||
|
color: mainWindow.call.core.speakerMuted ? DefaultStyle.danger_500main : DefaultStyle.main2_600
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
mainWindow.call.core.lSetSpeakerMuted(!mainWindow.call.core.speakerMuted)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ ColumnLayout {
|
||||||
|
|
||||||
component LabelButton: ColumnLayout {
|
component LabelButton: ColumnLayout {
|
||||||
id: labelButton
|
id: labelButton
|
||||||
property alias image: buttonImg
|
// property alias image: buttonImg
|
||||||
property alias button: button
|
property alias button: button
|
||||||
property string label
|
property string label
|
||||||
spacing: 8 * DefaultStyle.dp
|
spacing: 8 * DefaultStyle.dp
|
||||||
|
|
@ -38,15 +38,6 @@ ColumnLayout {
|
||||||
radius: 40 * DefaultStyle.dp
|
radius: 40 * DefaultStyle.dp
|
||||||
color: DefaultStyle.main2_200
|
color: DefaultStyle.main2_200
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
|
||||||
id: buttonImg
|
|
||||||
source: labelButton.source
|
|
||||||
width: 24 * DefaultStyle.dp
|
|
||||||
height: 24 * DefaultStyle.dp
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
sourceSize.width: 24 * DefaultStyle.dp
|
|
||||||
sourceSize.height: 24 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
@ -108,16 +99,16 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
// spacing: 10 * DefaultStyle.dp
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.preferredWidth: mainItem.implicitWidth
|
Layout.preferredWidth: mainItem.implicitWidth
|
||||||
Layout.preferredHeight: childrenRect.height
|
Layout.preferredHeight: childrenRect.height
|
||||||
// Layout.fillHeight: true
|
|
||||||
LabelButton {
|
LabelButton {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// width: 24 * DefaultStyle.dp//image.width
|
width: 56 * DefaultStyle.dp
|
||||||
// height: image.height
|
height: 56 * DefaultStyle.dp
|
||||||
image.source: AppIcons.phone
|
button.icon.width: 24 * DefaultStyle.dp
|
||||||
|
button.icon.height: 24 * DefaultStyle.dp
|
||||||
|
button.icon.source: AppIcons.phone
|
||||||
label: qsTr("Appel")
|
label: qsTr("Appel")
|
||||||
property var callObj
|
property var callObj
|
||||||
button.onClicked: {
|
button.onClicked: {
|
||||||
|
|
@ -127,18 +118,22 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
LabelButton {
|
LabelButton {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
// Layout.preferredWidth: image.width
|
width: 56 * DefaultStyle.dp
|
||||||
// Layout.preferredHeight: image.height
|
height: 56 * DefaultStyle.dp
|
||||||
image.source: AppIcons.chatTeardropText
|
button.icon.width: 24 * DefaultStyle.dp
|
||||||
|
button.icon.height: 24 * DefaultStyle.dp
|
||||||
|
button.icon.source: AppIcons.chatTeardropText
|
||||||
label: qsTr("Message")
|
label: qsTr("Message")
|
||||||
button.onClicked: console.debug("[CallPage.qml] TODO : open conversation")
|
button.onClicked: console.debug("[CallPage.qml] TODO : open conversation")
|
||||||
}
|
}
|
||||||
LabelButton {
|
LabelButton {
|
||||||
id: videoCall
|
id: videoCall
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// Layout.preferredWidth: image.width
|
width: 56 * DefaultStyle.dp
|
||||||
// Layout.preferredHeight: image.height
|
height: 56 * DefaultStyle.dp
|
||||||
image.source: AppIcons.videoCamera
|
button.icon.width: 24 * DefaultStyle.dp
|
||||||
|
button.icon.height: 24 * DefaultStyle.dp
|
||||||
|
button.icon.source: AppIcons.videoCamera
|
||||||
label: qsTr("Appel Video")
|
label: qsTr("Appel Video")
|
||||||
property var callObj
|
property var callObj
|
||||||
button.onClicked: {
|
button.onClicked: {
|
||||||
|
|
@ -147,8 +142,6 @@ ColumnLayout {
|
||||||
console.log("[CallPage.qml] TODO : enable video")
|
console.log("[CallPage.qml] TODO : enable video")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Item {Layout.fillWidth: true}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: detailControl
|
id: detailControl
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ Item {
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Control.Button {
|
Button {
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
// Layout.bottomMargin: 20
|
// Layout.bottomMargin: 20
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|
@ -53,7 +53,6 @@ Item {
|
||||||
}
|
}
|
||||||
onClicked: console.debug("[LoginLayout]User: open about popup")
|
onClicked: console.debug("[LoginLayout]User: open about popup")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
|
||||||
|
|
@ -238,34 +238,25 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Control.Button {
|
PopupButton {
|
||||||
id: avatarButton
|
id: avatarButton
|
||||||
AccountProxy{
|
AccountProxy{
|
||||||
id: accountProxy
|
id: accountProxy
|
||||||
//property bool haveAvatar: defaultAccount && defaultAccount.core.pictureUri || false
|
//property bool haveAvatar: defaultAccount && defaultAccount.core.pictureUri || false
|
||||||
}
|
}
|
||||||
|
background.visible: false
|
||||||
Layout.preferredWidth: 54 * DefaultStyle.dp
|
Layout.preferredWidth: 54 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: width
|
Layout.preferredHeight: width
|
||||||
background: Item {
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
contentItem: Avatar {
|
contentItem: Avatar {
|
||||||
id: avatar
|
id: avatar
|
||||||
height: avatarButton.height
|
height: avatarButton.height
|
||||||
width: avatarButton.width
|
width: avatarButton.width
|
||||||
account: accountProxy.defaultAccount
|
account: accountProxy.defaultAccount
|
||||||
}
|
}
|
||||||
onClicked: {
|
popup.x: width - popup.width
|
||||||
accountList.open()
|
popup.padding: 0
|
||||||
}
|
popup.contentItem: ColumnLayout {
|
||||||
Popup{
|
Accounts {
|
||||||
id: accountList
|
|
||||||
x: -width + parent.width
|
|
||||||
y: settingsButton.height + (10 * DefaultStyle.dp)
|
|
||||||
contentWidth: accounts.width
|
|
||||||
contentHeight: accounts.height
|
|
||||||
Accounts{
|
|
||||||
id: accounts
|
id: accounts
|
||||||
onAddAccountRequest: mainItem.addAccountRequest()
|
onAddAccountRequest: mainItem.addAccountRequest()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.2 as Control
|
import QtQuick.Controls 2.2 as Control
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
|
import QtQuick.Layouts
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
||||||
Control.Button {
|
Control.Button {
|
||||||
|
|
@ -13,12 +14,15 @@ Control.Button {
|
||||||
property int textWeight: 600 * DefaultStyle.dp
|
property int textWeight: 600 * DefaultStyle.dp
|
||||||
property bool underline: false
|
property bool underline: false
|
||||||
property bool shadowEnabled: false
|
property bool shadowEnabled: false
|
||||||
|
property var contentImageColor
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
icon.width: width
|
||||||
|
icon.height: height
|
||||||
|
|
||||||
leftPadding: 20 * DefaultStyle.dp
|
// leftPadding: 20 * DefaultStyle.dp
|
||||||
rightPadding: 20 * DefaultStyle.dp
|
// rightPadding: 20 * DefaultStyle.dp
|
||||||
topPadding: 11 * DefaultStyle.dp
|
// topPadding: 11 * DefaultStyle.dp
|
||||||
bottomPadding: 11 * DefaultStyle.dp
|
// bottomPadding: 11 * DefaultStyle.dp
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -58,10 +62,22 @@ Control.Button {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: StackLayout {
|
||||||
|
currentIndex: mainItem.text.length != 0
|
||||||
|
? 0
|
||||||
|
: mainItem.icon.source != undefined
|
||||||
|
? 1
|
||||||
|
: 2
|
||||||
|
|
||||||
|
Text {
|
||||||
id: contentText
|
id: contentText
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
anchors.centerIn: parent
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
width: implicitWidth
|
||||||
|
height: implicitHeight
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: mainItem.text
|
text: mainItem.text
|
||||||
color: inversedColors ? mainItem.color : DefaultStyle.grey_0
|
color: inversedColors ? mainItem.color : DefaultStyle.grey_0
|
||||||
|
|
@ -73,4 +89,19 @@ Control.Button {
|
||||||
underline: mainItem.underline
|
underline: mainItem.underline
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EffectImage {
|
||||||
|
id: image
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
source: mainItem.icon.source
|
||||||
|
imageWidth: mainItem.icon.width
|
||||||
|
imageHeight: mainItem.icon.height
|
||||||
|
colorizationColor: mainItem.contentImageColor
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,9 @@ Item {
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
background: Item{}
|
background: Item{}
|
||||||
|
icon.source:AppIcons.closeX
|
||||||
|
width: 24 * DefaultStyle.dp
|
||||||
|
height: 24 * DefaultStyle.dp
|
||||||
contentItem: Image {
|
contentItem: Image {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: AppIcons.closeX
|
source: AppIcons.closeX
|
||||||
|
|
@ -158,10 +161,6 @@ Item {
|
||||||
Button {
|
Button {
|
||||||
visible: mainItem.groupCallVisible
|
visible: mainItem.groupCallVisible
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
leftPadding: 0
|
|
||||||
topPadding: 0
|
|
||||||
rightPadding: 0
|
|
||||||
bottomPadding: 0
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: DefaultStyle.groupCallButtonColor
|
color: DefaultStyle.groupCallButtonColor
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -190,35 +189,33 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
// RowLayout {
|
||||||
visible: searchBar.text.length > 0
|
// //DEBUG
|
||||||
Layout.maximumWidth: parent.width
|
// visible: searchBar.text.length > 0
|
||||||
Layout.fillWidth: true
|
// Layout.maximumWidth: parent.width
|
||||||
Text {
|
// Layout.fillWidth: true
|
||||||
text: searchBar.text
|
// Text {
|
||||||
maximumLineCount: 1
|
// text: searchBar.text
|
||||||
elide: Text.ElideRight
|
// maximumLineCount: 1
|
||||||
}
|
// elide: Text.ElideRight
|
||||||
Item {
|
// }
|
||||||
Layout.fillWidth: true
|
// Item {
|
||||||
}
|
// Layout.fillWidth: true
|
||||||
Control.Button {
|
// }
|
||||||
implicitWidth: 30 * DefaultStyle.dp
|
// Button {
|
||||||
implicitHeight: 30 * DefaultStyle.dp
|
// implicitWidth: 30 * DefaultStyle.dp
|
||||||
background: Item {
|
// implicitHeight: 30 * DefaultStyle.dp
|
||||||
visible: false
|
// background: Item {
|
||||||
}
|
// visible: false
|
||||||
contentItem: Image {
|
// }
|
||||||
source: AppIcons.phone
|
// icon.source: AppIcons.phone
|
||||||
width: 20 * DefaultStyle.dp
|
// width: 20 * DefaultStyle.dp
|
||||||
sourceSize.width: 20 * DefaultStyle.dp
|
// height: 20 * DefaultStyle.dp
|
||||||
fillMode: Image.PreserveAspectFit
|
// onClicked: {
|
||||||
}
|
// mainItem.callButtonPressed(searchBar.text)
|
||||||
onClicked: {
|
// }
|
||||||
mainItem.callButtonPressed(searchBar.text)
|
// }
|
||||||
}
|
// }
|
||||||
}
|
|
||||||
}
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("All contacts")
|
text: qsTr("All contacts")
|
||||||
|
|
|
||||||
|
|
@ -47,13 +47,11 @@ Control.Page {
|
||||||
background: Item {
|
background: Item {
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
icon.source: AppIcons.closeX
|
||||||
anchors.centerIn: closeButton
|
Layout.preferredWidth: 10 * DefaultStyle.dp
|
||||||
source: AppIcons.closeX
|
Layout.preferredHeight: 10 * DefaultStyle.dp
|
||||||
width: 10 * DefaultStyle.dp
|
width: 10 * DefaultStyle.dp
|
||||||
sourceSize.width: 10 * DefaultStyle.dp
|
height: 10 * DefaultStyle.dp
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
}
|
|
||||||
onClicked: mainItem.visible = false
|
onClicked: mainItem.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,25 +20,11 @@ ColumnLayout {
|
||||||
id: carouselStackLayout
|
id: carouselStackLayout
|
||||||
children: mainItem.itemsList
|
children: mainItem.itemsList
|
||||||
property int previousIndex: currentIndex
|
property int previousIndex: currentIndex
|
||||||
|
currentIndex: 0
|
||||||
|
|
||||||
function goToSlideAtIndex(index) {
|
function goToSlideAtIndex(index) {
|
||||||
carouselStackLayout.previousIndex = carouselStackLayout.currentIndex;
|
carouselStackLayout.previousIndex = carouselStackLayout.currentIndex
|
||||||
carouselStackLayout.currentIndex = index;
|
carouselStackLayout.currentIndex = index
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
// The animation is not working until the slide
|
|
||||||
// has been displayed once
|
|
||||||
for (var i = 0; i < mainItem.itemsCount; ++i) {
|
|
||||||
// const newObject = Qt.createQmlObject(mainItem.itemsList[i], carouselStackLayout);
|
|
||||||
// mainItem.itemsList[i].createObject(carouselStackLayout)
|
|
||||||
// carouselStackLayout.append(itemsList[i])
|
|
||||||
var button = carouselButton.createObject(carouselButtonsLayout, {slideIndex: i, stackLayout: carouselStackLayout})
|
|
||||||
button.buttonClicked.connect(goToSlideAtIndex)
|
|
||||||
currentIndex = i
|
|
||||||
}
|
|
||||||
currentIndex = 0
|
|
||||||
previousIndex = currentIndex
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
|
|
@ -75,25 +61,37 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Rectangle {
|
||||||
|
id: currentIndicator
|
||||||
|
width: 13 * DefaultStyle.dp
|
||||||
|
height: 8 * DefaultStyle.dp
|
||||||
|
radius: 30 * DefaultStyle.dp
|
||||||
|
color: DefaultStyle.main1_500_main
|
||||||
|
z: 1
|
||||||
|
x: carouselButton.itemAt(mainItem.currentIndex).x
|
||||||
|
Behavior on x { NumberAnimation {duration: 100}}
|
||||||
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: carouselButtonsLayout
|
id: carouselButtonsLayout
|
||||||
|
spacing: 10 * DefaultStyle.dp
|
||||||
Component {
|
Repeater {
|
||||||
id: carouselButton
|
id: carouselButton
|
||||||
Control.Button {
|
model: mainItem.itemsCount
|
||||||
property int slideIndex
|
delegate: Button {
|
||||||
property var stackLayout
|
width: 8 * DefaultStyle.dp
|
||||||
signal buttonClicked(int index)
|
height: 8 * DefaultStyle.dp
|
||||||
|
padding: 0
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: stackLayout.currentIndex == slideIndex ? DefaultStyle.main1_500_main : DefaultStyle.main2_200
|
color: DefaultStyle.main2_200
|
||||||
radius: 15 * DefaultStyle.dp
|
radius: 30 * DefaultStyle.dp
|
||||||
width: stackLayout.currentIndex == slideIndex ? 11 * DefaultStyle.dp : 8 * DefaultStyle.dp
|
width: 8 * DefaultStyle.dp
|
||||||
height: 8 * DefaultStyle.dp
|
height: 8 * DefaultStyle.dp
|
||||||
Behavior on width { NumberAnimation {duration: 100}}
|
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
buttonClicked(slideIndex)
|
mainItem.goToSlide(modelData)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ ColumnLayout {
|
||||||
property string label: ""
|
property string label: ""
|
||||||
// Usage : each item of the model list must be {text: ..., img: ...}
|
// Usage : each item of the model list must be {text: ..., img: ...}
|
||||||
// If string list, only text part of the delegate will be filled
|
// If string list, only text part of the delegate will be filled
|
||||||
property var modelList: []
|
property var model: []
|
||||||
readonly property string currentText: selectedItemText.text
|
readonly property string currentText: selectedItemText.text
|
||||||
property bool enableBackgroundColors: true
|
property bool enableBackgroundColors: true
|
||||||
readonly property bool hasActiveFocus: combobox.activeFocus
|
readonly property bool hasActiveFocus: combobox.activeFocus
|
||||||
|
|
@ -27,7 +27,7 @@ ColumnLayout {
|
||||||
|
|
||||||
Control.ComboBox {
|
Control.ComboBox {
|
||||||
id: combobox
|
id: combobox
|
||||||
model: mainItem.modelList
|
model: mainItem.model
|
||||||
Layout.preferredWidth: mainItem.width
|
Layout.preferredWidth: mainItem.width
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
implicitWidth: mainItem.width
|
implicitWidth: mainItem.width
|
||||||
|
|
@ -67,13 +67,13 @@ ColumnLayout {
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var index = combobox.currentIndex < 0 ? 0 : combobox.currentIndex
|
var index = combobox.currentIndex < 0 ? 0 : combobox.currentIndex
|
||||||
if (mainItem.modelList[index].img) {
|
if (mainItem.model[index].img) {
|
||||||
selectedItemImg.source = mainItem.modelList[0].img
|
selectedItemImg.source = mainItem.model[0].img
|
||||||
}
|
}
|
||||||
if (mainItem.modelList[index].text)
|
if (mainItem.model[index].text)
|
||||||
selectedItemText.text = mainItem.modelList[0].text
|
selectedItemText.text = mainItem.model[0].text
|
||||||
else if (mainItem.modelList[index])
|
else if (mainItem.model[index])
|
||||||
selectedItemText.text = mainItem.modelList[0]
|
selectedItemText.text = mainItem.model[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,7 @@ ColumnLayout {
|
||||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||||
width: 24 * DefaultStyle.dp
|
width: 24 * DefaultStyle.dp
|
||||||
height: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
contentItem: Image {
|
icon.source: AppIcons.closeX
|
||||||
anchors.fill: parent
|
|
||||||
source: AppIcons.closeX
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
// contact.core.pictureUri = mainItem.oldPictureUri
|
// contact.core.pictureUri = mainItem.oldPictureUri
|
||||||
mainItem.contact.core.undo()
|
mainItem.contact.core.undo()
|
||||||
|
|
@ -156,10 +153,9 @@ ColumnLayout {
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
background: Item{}
|
background: Item{}
|
||||||
contentItem: Image {
|
icon.source: AppIcons.closeX
|
||||||
anchors.fill: parent
|
width: 24 * DefaultStyle.dp
|
||||||
source: AppIcons.closeX
|
height: 24 * DefaultStyle.dp
|
||||||
}
|
|
||||||
onClicked: mainItem.contact.core.removeAddress(index)
|
onClicked: mainItem.contact.core.removeAddress(index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -196,10 +192,9 @@ ColumnLayout {
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
background: Item{}
|
background: Item{}
|
||||||
contentItem: Image {
|
icon.source: AppIcons.closeX
|
||||||
anchors.fill: parent
|
width: 24 * DefaultStyle.dp
|
||||||
source: AppIcons.closeX
|
height: 24 * DefaultStyle.dp
|
||||||
}
|
|
||||||
onClicked: mainItem.contact.core.removePhoneNumber(index)
|
onClicked: mainItem.contact.core.removePhoneNumber(index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -242,6 +237,10 @@ ColumnLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
enabled: mainItem.contact && mainItem.contact.core.givenName.length > 0
|
enabled: mainItem.contact && mainItem.contact.core.givenName.length > 0
|
||||||
text: mainItem.saveButtonText
|
text: mainItem.saveButtonText
|
||||||
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mainItem.contact.core.save()
|
mainItem.contact.core.save()
|
||||||
mainItem.closeEdition()
|
mainItem.closeEdition()
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ ListView {
|
||||||
colorizationColor: DefaultStyle.danger_500main
|
colorizationColor: DefaultStyle.danger_500main
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("Supprimmer")
|
text: qsTr("Supprimer")
|
||||||
color: DefaultStyle.danger_500main
|
color: DefaultStyle.danger_500main
|
||||||
font {
|
font {
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,10 @@ Item {
|
||||||
interval: 1
|
interval: 1
|
||||||
onTriggered: {cameraLoader.active=false; cameraLoader.active=true;}
|
onTriggered: {cameraLoader.active=false; cameraLoader.active=true;}
|
||||||
}
|
}
|
||||||
active: mainItem.visible && call ? call.core.remoteVideoEnabled : mainItem.enablePersonalCamera
|
active: mainItem.visible && call
|
||||||
|
? call.core.remoteVideoEnabled && (mainItem.call.core.state != LinphoneEnums.CallState.End
|
||||||
|
&& mainItem.call.core.state != LinphoneEnums.CallState.Released)
|
||||||
|
: mainItem.enablePersonalCamera
|
||||||
onActiveChanged: console.log("camera active", active)
|
onActiveChanged: console.log("camera active", active)
|
||||||
sourceComponent: cameraComponent
|
sourceComponent: cameraComponent
|
||||||
}
|
}
|
||||||
|
|
@ -99,7 +102,7 @@ Item {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.leftMargin: 10 * DefaultStyle.dp
|
anchors.leftMargin: 10 * DefaultStyle.dp
|
||||||
anchors.bottomMargin: 10 * DefaultStyle.dp
|
anchors.bottomMargin: 10 * DefaultStyle.dp
|
||||||
width: txtMeter.width
|
width: implicitWidth
|
||||||
text: mainItem.peerAddress.length != 0
|
text: mainItem.peerAddress.length != 0
|
||||||
? mainItem.peerAddress
|
? mainItem.peerAddress
|
||||||
: mainItem.account && mainItem.identityAddress
|
: mainItem.account && mainItem.identityAddress
|
||||||
|
|
@ -111,10 +114,6 @@ Item {
|
||||||
weight: 500 * DefaultStyle.dp
|
weight: 500 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TextMetrics {
|
|
||||||
id: txtMeter
|
|
||||||
text: bottomAddress.text
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
id: shadow
|
id: shadow
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,10 @@ Popup {
|
||||||
Button {
|
Button {
|
||||||
visible: mainItem.buttons.length === 2
|
visible: mainItem.buttons.length === 2
|
||||||
text: qsTr("Oui")
|
text: qsTr("Oui")
|
||||||
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mainItem.accepted()
|
mainItem.accepted()
|
||||||
mainItem.close()
|
mainItem.close()
|
||||||
|
|
@ -91,6 +95,10 @@ Popup {
|
||||||
Button {
|
Button {
|
||||||
visible: mainItem.buttons.length === 2
|
visible: mainItem.buttons.length === 2
|
||||||
text: qsTr("Non")
|
text: qsTr("Non")
|
||||||
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mainItem.rejected()
|
mainItem.rejected()
|
||||||
mainItem.close()
|
mainItem.close()
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ Loader {
|
||||||
|
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
id: effect2
|
id: effect2
|
||||||
|
visible: mainItem.useColor
|
||||||
enabled: mainItem.useColor
|
enabled: mainItem.useColor
|
||||||
anchors.fill: effect
|
anchors.fill: effect
|
||||||
source: effect
|
source: effect
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,10 @@ ColumnLayout {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: lastFormLineLayout
|
id: lastFormLineLayout
|
||||||
Button {
|
Button {
|
||||||
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
contentItem: StackLayout {
|
contentItem: StackLayout {
|
||||||
id: connectionButton
|
id: connectionButton
|
||||||
currentIndex: 0
|
currentIndex: 0
|
||||||
|
|
|
||||||
|
|
@ -43,19 +43,17 @@ Control.Popup {
|
||||||
Button {
|
Button {
|
||||||
id: closeButton
|
id: closeButton
|
||||||
visible: mainItem.closeButtonVisible
|
visible: mainItem.closeButtonVisible
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.topMargin: 10 * DefaultStyle.dp
|
||||||
|
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||||
background: Item {
|
background: Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
icon.source: AppIcons.closeX
|
||||||
anchors.centerIn: parent
|
|
||||||
source: AppIcons.closeX
|
|
||||||
width: 24 * DefaultStyle.dp
|
width: 24 * DefaultStyle.dp
|
||||||
sourceSize.width: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
}
|
|
||||||
onClicked: mainItem.close()
|
onClicked: mainItem.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -152,15 +150,10 @@ Control.Popup {
|
||||||
color: DefaultStyle.success_500main
|
color: DefaultStyle.success_500main
|
||||||
radius: 71 * DefaultStyle.dp
|
radius: 71 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
contentItem: EffectImage {
|
icon.source: AppIcons.phone
|
||||||
id: buttonIcon
|
icon.width: 32 * DefaultStyle.dp
|
||||||
source: AppIcons.phone
|
icon.height: 32 * DefaultStyle.dp
|
||||||
anchors.centerIn: parent
|
contentImageColor: DefaultStyle.grey_0
|
||||||
width: 24 * DefaultStyle.dp
|
|
||||||
height: 24 * DefaultStyle.dp
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
colorizationColor: DefaultStyle.grey_0
|
|
||||||
}
|
|
||||||
onClicked: mainItem.launchCall()
|
onClicked: mainItem.launchCall()
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
|
@ -172,12 +165,9 @@ Control.Popup {
|
||||||
background: Item {
|
background: Item {
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
icon.source: AppIcons.backspaceFill
|
||||||
source: AppIcons.backspaceFill
|
icon.width: 38 * DefaultStyle.dp
|
||||||
anchors.centerIn: parent
|
icon.height: 38 * DefaultStyle.dp
|
||||||
width: 24 * DefaultStyle.dp
|
|
||||||
height: 24 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
onClicked: mainItem.wipe()
|
onClicked: mainItem.wipe()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,9 @@ Button {
|
||||||
color: DefaultStyle.main2_300
|
color: DefaultStyle.main2_300
|
||||||
radius: 40 * DefaultStyle.dp
|
radius: 40 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
icon.source: AppIcons.more
|
||||||
source: AppIcons.more
|
|
||||||
sourceSize.width: 24 * DefaultStyle.dp
|
|
||||||
sourceSize.height: 24 * DefaultStyle.dp
|
|
||||||
width: 24 * DefaultStyle.dp
|
width: 24 * DefaultStyle.dp
|
||||||
height: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
}
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
if (popup.visible) popup.close()
|
if (popup.visible) popup.close()
|
||||||
else popup.open()
|
else popup.open()
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ import Linphone
|
||||||
|
|
||||||
Control.RadioButton {
|
Control.RadioButton {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property bool inversedColors: false
|
|
||||||
property string title
|
property string title
|
||||||
property string contentText
|
property string contentText
|
||||||
property string imgUrl
|
property string imgUrl
|
||||||
|
property color color
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|
@ -20,7 +20,7 @@ Control.RadioButton {
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: DefaultStyle.grey_100
|
color: DefaultStyle.grey_100
|
||||||
border.color: mainItem.checked ? DefaultStyle.info_500_main : "transparent"
|
border.color: mainItem.checked ? mainItem.color : "transparent"
|
||||||
radius: 20 * DefaultStyle.dp
|
radius: 20 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ Control.RadioButton {
|
||||||
implicitWidth: 16 * DefaultStyle.dp
|
implicitWidth: 16 * DefaultStyle.dp
|
||||||
implicitHeight: 16 * DefaultStyle.dp
|
implicitHeight: 16 * DefaultStyle.dp
|
||||||
radius: implicitWidth/2
|
radius: implicitWidth/2
|
||||||
border.color: mainItem.checked ? DefaultStyle.info_500_main : DefaultStyle.main1_500_main
|
border.color: mainItem.color
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: parent.width/2
|
width: parent.width/2
|
||||||
|
|
@ -42,7 +42,7 @@ Control.RadioButton {
|
||||||
x: parent.width/4
|
x: parent.width/4
|
||||||
y: parent.width/4
|
y: parent.width/4
|
||||||
radius: width/2
|
radius: width/2
|
||||||
color: DefaultStyle.info_500_main
|
color: mainItem.color
|
||||||
visible: mainItem.checked
|
visible: mainItem.checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -52,19 +52,18 @@ Control.RadioButton {
|
||||||
color: DefaultStyle.grey_900
|
color: DefaultStyle.grey_900
|
||||||
font.pixelSize: 16 * DefaultStyle.dp
|
font.pixelSize: 16 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
Control.Button {
|
Button {
|
||||||
padding: 0
|
padding: 0
|
||||||
background: Item {
|
background: Item {
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
icon.source: AppIcons.info
|
||||||
fillMode: Image.PreserveAspectFit
|
Layout.preferredWidth: 2 * DefaultStyle.dp
|
||||||
source: AppIcons.info
|
Layout.preferredHeight: 2 * DefaultStyle.dp
|
||||||
width: 2 * DefaultStyle.dp
|
width: 2 * DefaultStyle.dp
|
||||||
height: 2 * DefaultStyle.dp
|
height: 2 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
anchors.top: indicator.bottom
|
anchors.top: indicator.bottom
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ Rectangle {
|
||||||
width: 1 * DefaultStyle.dp
|
width: 1 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Control.Button {
|
Button {
|
||||||
id: dialerButton
|
id: dialerButton
|
||||||
visible: numericPad != undefined && textField.text.length === 0
|
visible: numericPad != undefined && textField.text.length === 0
|
||||||
checkable: true
|
checkable: true
|
||||||
|
|
@ -79,33 +79,30 @@ Rectangle {
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
icon.source: dialerButton.checked ? AppIcons.dialerSelected : AppIcons.dialer
|
||||||
fillMode: Image.PreserveAspectFit
|
width: 24 * DefaultStyle.dp
|
||||||
source: dialerButton.checked ? AppIcons.dialerSelected : AppIcons.dialer
|
height: 24 * DefaultStyle.dp
|
||||||
}
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
anchors.rightMargin: 15 * DefaultStyle.dp
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if (checked) mainItem.numericPad.open()
|
if (checked) mainItem.numericPad.open()
|
||||||
else mainItem.numericPad.close()
|
else mainItem.numericPad.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Control.Button {
|
Button {
|
||||||
id: clearTextButton
|
id: clearTextButton
|
||||||
visible: textField.text.length > 0
|
visible: textField.text.length > 0
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
width: 24 * DefaultStyle.dp
|
||||||
fillMode: Image.PreserveAspectFit
|
height: 24 * DefaultStyle.dp
|
||||||
source: AppIcons.closeX
|
icon.source: AppIcons.closeX
|
||||||
}
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
anchors.rightMargin: 15 * DefaultStyle.dp
|
||||||
onClicked: {
|
onClicked: {
|
||||||
textField.clear()
|
textField.clear()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ Window {
|
||||||
text: "Combobox with image"
|
text: "Combobox with image"
|
||||||
}
|
}
|
||||||
ComboBox {
|
ComboBox {
|
||||||
modelList: [
|
model: [
|
||||||
{text: "item 1", img: AppIcons.info},
|
{text: "item 1", img: AppIcons.info},
|
||||||
{text: "item 2", img: AppIcons.info},
|
{text: "item 2", img: AppIcons.info},
|
||||||
{text: "item 3", img: AppIcons.info}
|
{text: "item 3", img: AppIcons.info}
|
||||||
|
|
@ -27,7 +27,7 @@ Window {
|
||||||
text: "Combobox without image"
|
text: "Combobox without image"
|
||||||
}
|
}
|
||||||
ComboBox {
|
ComboBox {
|
||||||
modelList: [
|
model: [
|
||||||
{text: "item 1"},
|
{text: "item 1"},
|
||||||
{text: "item 2"},
|
{text: "item 2"},
|
||||||
{text: "item 3"}
|
{text: "item 3"}
|
||||||
|
|
|
||||||
|
|
@ -108,23 +108,20 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Control.Button {
|
Button {
|
||||||
id: eyeButton
|
id: eyeButton
|
||||||
visible: mainItem.hidden
|
visible: mainItem.hidden
|
||||||
checkable: true
|
checkable: true
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
icon.source: eyeButton.checked ? AppIcons.eyeShow : AppIcons.eyeHide
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: eyeButton.checked ? AppIcons.eyeShow : AppIcons.eyeHide
|
|
||||||
width: 20 * DefaultStyle.dp
|
width: 20 * DefaultStyle.dp
|
||||||
height: 20 * DefaultStyle.dp
|
height: 20 * DefaultStyle.dp
|
||||||
}
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 5 * DefaultStyle.dp
|
anchors.rightMargin: 15 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ErrorText {
|
ErrorText {
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,11 @@ LoginLayout {
|
||||||
signal connectionSucceed()
|
signal connectionSucceed()
|
||||||
|
|
||||||
titleContent: RowLayout {
|
titleContent: RowLayout {
|
||||||
Control.Button {
|
spacing: 15 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 40 * DefaultStyle.dp
|
Button {
|
||||||
Layout.preferredWidth: height
|
|
||||||
visible: mainItem.showBackButton
|
visible: mainItem.showBackButton
|
||||||
icon.width: width
|
Layout.preferredHeight: 27 * DefaultStyle.dp
|
||||||
icon.height: height
|
Layout.preferredWidth: 27 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.returnArrow
|
icon.source: AppIcons.returnArrow
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
@ -30,6 +29,8 @@ LoginLayout {
|
||||||
Image {
|
Image {
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: AppIcons.profile
|
source: AppIcons.profile
|
||||||
|
Layout.preferredHeight: 34 * DefaultStyle.dp
|
||||||
|
Layout.preferredWidth: 34 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("Connexion")
|
text: qsTr("Connexion")
|
||||||
|
|
@ -37,7 +38,6 @@ LoginLayout {
|
||||||
pixelSize: 36 * DefaultStyle.dp
|
pixelSize: 36 * DefaultStyle.dp
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
scaleLettersFactor: 1.1
|
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -50,6 +50,10 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
text: qsTr("S'inscrire")
|
text: qsTr("S'inscrire")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.debug("[LoginPage] User: go to register")
|
console.debug("[LoginPage] User: go to register")
|
||||||
|
|
@ -58,7 +62,7 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
centerContent: ColumnLayout {
|
centerContent: ColumnLayout {
|
||||||
|
Layout.leftMargin: 45 * DefaultStyle.dp
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
@ -68,6 +72,10 @@ LoginLayout {
|
||||||
Button {
|
Button {
|
||||||
Layout.topMargin: 40 * DefaultStyle.dp
|
Layout.topMargin: 40 * DefaultStyle.dp
|
||||||
inversedColors: true
|
inversedColors: true
|
||||||
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
text: qsTr("Compte SIP tiers")
|
text: qsTr("Compte SIP tiers")
|
||||||
onClicked: {mainItem.useSIPButtonClicked()}
|
onClicked: {mainItem.useSIPButtonClicked()}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,9 @@ LoginLayout {
|
||||||
property string email
|
property string email
|
||||||
|
|
||||||
titleContent: RowLayout {
|
titleContent: RowLayout {
|
||||||
Control.Button {
|
Button {
|
||||||
Layout.preferredHeight: 40 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: 40 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
icon.width: 40 * DefaultStyle.dp
|
|
||||||
icon.height: 40 * DefaultStyle.dp
|
|
||||||
icon.source: AppIcons.returnArrow
|
icon.source: AppIcons.returnArrow
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
@ -104,6 +102,10 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
inversedColors: true
|
inversedColors: true
|
||||||
text: "Resend a code"
|
text: "Resend a code"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,10 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
// Layout.alignment: Qt.AlignRight
|
// Layout.alignment: Qt.AlignRight
|
||||||
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
text: qsTr("Connexion")
|
text: qsTr("Connexion")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.debug("[RegisterPage] User: return")
|
console.debug("[RegisterPage] User: return")
|
||||||
|
|
@ -72,7 +76,7 @@ LoginLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
label: " "
|
label: " "
|
||||||
enabled: false
|
enabled: false
|
||||||
modelList: [{text:"@sip.linphone.org"}]
|
model: [{text:"@sip.linphone.org"}]
|
||||||
Layout.preferredWidth: 210 * DefaultStyle.dp
|
Layout.preferredWidth: 210 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -131,6 +135,10 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
text: qsTr("Register")
|
text: qsTr("Register")
|
||||||
onClicked:{
|
onClicked:{
|
||||||
console.log("[RegisterPage] User: Call register with phone number", phoneNumberInput.phoneNumber)
|
console.log("[RegisterPage] User: Call register with phone number", phoneNumberInput.phoneNumber)
|
||||||
|
|
@ -164,7 +172,7 @@ LoginLayout {
|
||||||
// due to the invisibility of the upper label
|
// due to the invisibility of the upper label
|
||||||
label: " "
|
label: " "
|
||||||
enabled: false
|
enabled: false
|
||||||
modelList: [{text:"@sip.linphone.org"}]
|
model: [{text:"@sip.linphone.org"}]
|
||||||
Layout.preferredWidth: 210 * DefaultStyle.dp
|
Layout.preferredWidth: 210 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -224,6 +232,10 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
text: qsTr("Register")
|
text: qsTr("Register")
|
||||||
onClicked:{
|
onClicked:{
|
||||||
console.log("[RegisterPage] User: Call register with email", emailInput.text)
|
console.log("[RegisterPage] User: Call register with email", emailInput.text)
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,9 @@ LoginLayout {
|
||||||
Button {
|
Button {
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
contentItem: Image {
|
icon.source: AppIcons.returnArrow
|
||||||
anchors.fill: parent
|
|
||||||
source: AppIcons.returnArrow
|
|
||||||
width: 24 * DefaultStyle.dp
|
width: 24 * DefaultStyle.dp
|
||||||
height: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
}
|
|
||||||
background: Item {
|
background: Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
|
@ -162,7 +159,7 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
ComboBox {
|
ComboBox {
|
||||||
label: qsTr("Transport")
|
label: qsTr("Transport")
|
||||||
modelList:[ "TCP", "UDP", "TLS", "DTLS"]
|
model:[ "TCP", "UDP", "TLS", "DTLS"]
|
||||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,14 +42,15 @@ LoginLayout {
|
||||||
spacing: 70 * DefaultStyle.dp
|
spacing: 70 * DefaultStyle.dp
|
||||||
Repeater {
|
Repeater {
|
||||||
model: [
|
model: [
|
||||||
{checked: true, title: qsTr("Chiffrement de bout en bout"), text: qsTr("Ce mode vous garanti la confidentialité de tous vos échanges. Notre technologie de chiffrement de bout en bout assure un niveau de sécurité maximal pour tous vos échanges."), imgUrl: AppIcons.chiffrement},
|
{checked: true, title: qsTr("Chiffrement de bout en bout"), text: qsTr("Ce mode vous garanti la confidentialité de tous vos échanges. Notre technologie de chiffrement de bout en bout assure un niveau de sécurité maximal pour tous vos échanges."), imgUrl: AppIcons.chiffrement, color: DefaultStyle.info_500_main},
|
||||||
{checked: false, title: qsTr("Interoperable"), text: qsTr("Ce mode vous permet de profiter de toute les fonctionnalités de Linphone, toute en restant interopérable avec n’importe qu’elle autre service SIP."), imgUrl: AppIcons.interoperable}
|
{checked: false, title: qsTr("Interoperable"), text: qsTr("Ce mode vous permet de profiter de toute les fonctionnalités de Linphone, toute en restant interopérable avec n’importe qu’elle autre service SIP."), imgUrl: AppIcons.interoperable, color: DefaultStyle.main1_500_main}
|
||||||
]
|
]
|
||||||
RadioButton {
|
RadioButton {
|
||||||
title: modelData.title
|
title: modelData.title
|
||||||
contentText: modelData.text
|
contentText: modelData.text
|
||||||
imgUrl: modelData.imgUrl
|
imgUrl: modelData.imgUrl
|
||||||
checked: modelData.checked
|
checked: modelData.checked
|
||||||
|
color: modelData. color
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if (checked) continueButton.selectedIndex = index
|
if (checked) continueButton.selectedIndex = index
|
||||||
}
|
}
|
||||||
|
|
@ -60,6 +61,8 @@ LoginLayout {
|
||||||
id: continueButton
|
id: continueButton
|
||||||
property int selectedIndex: 0
|
property int selectedIndex: 0
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
leftPadding: 100 * DefaultStyle.dp
|
leftPadding: 100 * DefaultStyle.dp
|
||||||
rightPadding: 100 * DefaultStyle.dp
|
rightPadding: 100 * DefaultStyle.dp
|
||||||
text: qsTr("Continuer")
|
text: qsTr("Continuer")
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,8 @@ LoginLayout {
|
||||||
model: [
|
model: [
|
||||||
{title: qsTr("Linphone"), text: qsTr("Une application de communication <b>sécurisée</b>,<br> <b>open source</b> et <b>française</b>.")},
|
{title: qsTr("Linphone"), text: qsTr("Une application de communication <b>sécurisée</b>,<br> <b>open source</b> et <b>française</b>.")},
|
||||||
{title: qsTr("Sécurisé"), text: qsTr("Vos communications sont en sécurité grâce aux <br><b>Chiffrement de bout en bout</b>.")},
|
{title: qsTr("Sécurisé"), text: qsTr("Vos communications sont en sécurité grâce aux <br><b>Chiffrement de bout en bout</b>.")},
|
||||||
{title: qsTr("Open Source"), text: qsTr("Une application open source et un <b>service gratuit</b> <br>depuis <b>2001</b>")},
|
{title: qsTr("Open Source"), text: qsTr("Une application open source et un <b>service gratuit</b> <br>depuis <b>2001</b>")}
|
||||||
|
// {title: qsTr("Sécurisé"), text: qsTr("Vos communications sont en sécurité grâce aux <br><b>Chiffrement de bout en bout</b>.")}
|
||||||
]
|
]
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 15 * DefaultStyle.dp
|
spacing: 15 * DefaultStyle.dp
|
||||||
|
|
@ -111,9 +112,13 @@ LoginLayout {
|
||||||
anchors.bottomMargin: 20 * DefaultStyle.dp
|
anchors.bottomMargin: 20 * DefaultStyle.dp
|
||||||
anchors.leftMargin: (centerLayout.width - width) * DefaultStyle.dp
|
anchors.leftMargin: (centerLayout.width - width) * DefaultStyle.dp
|
||||||
y: centerLayout.implicitWidth - width
|
y: centerLayout.implicitWidth - width
|
||||||
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
topPadding: 11 * DefaultStyle.dp
|
||||||
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
text: carousel.currentIndex < (carousel.itemsCount - 1) ? qsTr("Suivant") : qsTr("Commencer")
|
text: carousel.currentIndex < (carousel.itemsCount - 1) ? qsTr("Suivant") : qsTr("Commencer")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (carousel.currentIndex < 2) carousel.goToSlide(carousel.currentIndex + 1);
|
if (carousel.currentIndex < carousel.itemsCount - 1) carousel.goToSlide(carousel.currentIndex + 1);
|
||||||
else mainItem.startButtonPressed();
|
else mainItem.startButtonPressed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ Item {
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
EffectImage {
|
EffectImage {
|
||||||
colorizationColor: DefaultStyle.grey_0
|
colorizationColor: "red"// DefaultStyle.grey_0
|
||||||
source: mainItem.newItemIconSource
|
source: mainItem.newItemIconSource
|
||||||
width: 24 * DefaultStyle.dp
|
width: 24 * DefaultStyle.dp
|
||||||
height: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ AbstractMainPage {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
property alias listView: historyListView
|
property alias listView: historyListView
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
spacing: 16 * DefaultStyle.dp
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.leftMargin: listStackView.sideMargin
|
Layout.leftMargin: listStackView.sideMargin
|
||||||
Layout.rightMargin: listStackView.sideMargin
|
Layout.rightMargin: listStackView.sideMargin
|
||||||
|
|
@ -73,6 +74,8 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
PopupButton {
|
PopupButton {
|
||||||
id: removeHistory
|
id: removeHistory
|
||||||
|
width: 24 * DefaultStyle.dp
|
||||||
|
height: 24 * DefaultStyle.dp
|
||||||
popup.x: 0
|
popup.x: 0
|
||||||
popup.padding: 10 * DefaultStyle.dp
|
popup.padding: 10 * DefaultStyle.dp
|
||||||
popup.contentItem: Button {
|
popup.contentItem: Button {
|
||||||
|
|
@ -108,17 +111,11 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Control.Button {
|
Button {
|
||||||
|
background: Item {}
|
||||||
background: Item {
|
icon.source: AppIcons.newCall
|
||||||
visible: false
|
Layout.preferredWidth: 28 * DefaultStyle.dp
|
||||||
}
|
Layout.preferredHeight: 28 * DefaultStyle.dp
|
||||||
contentItem: Image {
|
|
||||||
source: AppIcons.newCall
|
|
||||||
width: 30 * DefaultStyle.dp
|
|
||||||
sourceSize.width: 30 * DefaultStyle.dp
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.debug("[CallPage]User: create new call")
|
console.debug("[CallPage]User: create new call")
|
||||||
listStackView.push(newCallItem)
|
listStackView.push(newCallItem)
|
||||||
|
|
@ -249,21 +246,16 @@ AbstractMainPage {
|
||||||
// Item {
|
// Item {
|
||||||
// Layout.fillWidth: true
|
// Layout.fillWidth: true
|
||||||
// }
|
// }
|
||||||
Control.Button {
|
Button {
|
||||||
implicitWidth: 24 * DefaultStyle.dp
|
|
||||||
implicitHeight: 24 * DefaultStyle.dp
|
|
||||||
Layout.rightMargin: 5 * DefaultStyle.dp
|
Layout.rightMargin: 5 * DefaultStyle.dp
|
||||||
padding: 0
|
padding: 0
|
||||||
property var callObj
|
property var callObj
|
||||||
background: Item {
|
background: Item {
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
icon.source: AppIcons.phone
|
||||||
source: AppIcons.phone
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
width: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
sourceSize.width: 24 * DefaultStyle.dp
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var addr = UtilsCpp.generateLinphoneSipAddress(modelData.core.remoteAddress)
|
var addr = UtilsCpp.generateLinphoneSipAddress(modelData.core.remoteAddress)
|
||||||
callObj = UtilsCpp.createCall(addr)
|
callObj = UtilsCpp.createCall(addr)
|
||||||
|
|
@ -293,6 +285,7 @@ AbstractMainPage {
|
||||||
positionViewAtIndex(currentIndex, ListView.Visible)
|
positionViewAtIndex(currentIndex, ListView.Visible)
|
||||||
mainItem.selectedRowHistoryGui = model.getAt(currentIndex)
|
mainItem.selectedRowHistoryGui = model.getAt(currentIndex)
|
||||||
}
|
}
|
||||||
|
onCountChanged: mainItem.selectedRowHistoryGui = model.getAt(currentIndex)
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (!visible) currentIndex = -1
|
if (!visible) currentIndex = -1
|
||||||
}
|
}
|
||||||
|
|
@ -324,12 +317,12 @@ AbstractMainPage {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.leftMargin: listStackView.sideMargin
|
Layout.leftMargin: listStackView.sideMargin
|
||||||
Layout.rightMargin: listStackView.sideMargin
|
Layout.rightMargin: listStackView.sideMargin
|
||||||
Control.Button {
|
Button {
|
||||||
background: Item {
|
background: Item {
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
source: AppIcons.returnArrow
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
}
|
icon.source: AppIcons.returnArrow
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.debug("[CallPage]User: return to call history")
|
console.debug("[CallPage]User: return to call history")
|
||||||
listStackView.pop()
|
listStackView.pop()
|
||||||
|
|
@ -539,46 +532,6 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
component LabelButton: ColumnLayout {
|
|
||||||
id: labelButton
|
|
||||||
property alias image: buttonImg
|
|
||||||
property alias button: button
|
|
||||||
property string label
|
|
||||||
spacing: 8 * DefaultStyle.dp
|
|
||||||
Button {
|
|
||||||
id: button
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.preferredWidth: 56 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 56 * DefaultStyle.dp
|
|
||||||
topPadding: 16 * DefaultStyle.dp
|
|
||||||
bottomPadding: 16 * DefaultStyle.dp
|
|
||||||
leftPadding: 16 * DefaultStyle.dp
|
|
||||||
rightPadding: 16 * DefaultStyle.dp
|
|
||||||
background: Rectangle {
|
|
||||||
anchors.fill: parent
|
|
||||||
radius: 40 * DefaultStyle.dp
|
|
||||||
color: DefaultStyle.main2_200
|
|
||||||
}
|
|
||||||
contentItem: Image {
|
|
||||||
id: buttonImg
|
|
||||||
source: labelButton.source
|
|
||||||
width: 24 * DefaultStyle.dp
|
|
||||||
height: 24 * DefaultStyle.dp
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
sourceSize.width: 24 * DefaultStyle.dp
|
|
||||||
sourceSize.height: 24 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
text: labelButton.label
|
|
||||||
font {
|
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
|
||||||
weight: 400 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
component IconLabel: RowLayout {
|
component IconLabel: RowLayout {
|
||||||
id: iconLabel
|
id: iconLabel
|
||||||
property string text
|
property string text
|
||||||
|
|
|
||||||
|
|
@ -72,17 +72,14 @@ AbstractMainPage {
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Control.Button {
|
Button {
|
||||||
|
|
||||||
background: Item {
|
background: Item {
|
||||||
visible: false
|
|
||||||
}
|
}
|
||||||
contentItem: Image {
|
icon.source: AppIcons.plusCircle
|
||||||
source: AppIcons.plusCircle
|
Layout.preferredWidth: 30 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
width: 30 * DefaultStyle.dp
|
width: 30 * DefaultStyle.dp
|
||||||
sourceSize.width: 30 * DefaultStyle.dp
|
height: 30 * DefaultStyle.dp
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mainItem.createContact("", "")
|
mainItem.createContact("", "")
|
||||||
}
|
}
|
||||||
|
|
@ -93,12 +90,6 @@ AbstractMainPage {
|
||||||
Layout.topMargin: 30 * DefaultStyle.dp
|
Layout.topMargin: 30 * DefaultStyle.dp
|
||||||
Layout.leftMargin: leftPanel.sideMargin
|
Layout.leftMargin: leftPanel.sideMargin
|
||||||
enabled: mainItem.leftPanelEnabled
|
enabled: mainItem.leftPanelEnabled
|
||||||
Button {
|
|
||||||
onClicked: {
|
|
||||||
favoriteList.currentIndex = -1
|
|
||||||
contactList.currentIndex = -1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SearchBar {
|
SearchBar {
|
||||||
id: searchBar
|
id: searchBar
|
||||||
Layout.rightMargin: leftPanel.sideMargin
|
Layout.rightMargin: leftPanel.sideMargin
|
||||||
|
|
@ -162,9 +153,9 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
background: Item{}
|
background: Item{}
|
||||||
contentItem: Image {
|
icon.source: favoriteList.visible ? AppIcons.upArrow : AppIcons.downArrow
|
||||||
source: favoriteList.visible ? AppIcons.upArrow : AppIcons.downArrow
|
width: 24 * DefaultStyle.dp
|
||||||
}
|
height: 24 * DefaultStyle.dp
|
||||||
onClicked: favoriteList.visible = !favoriteList.visible
|
onClicked: favoriteList.visible = !favoriteList.visible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -211,9 +202,9 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
background: Item{}
|
background: Item{}
|
||||||
contentItem: Image {
|
icon.source: favoriteList.visible ? AppIcons.upArrow : AppIcons.downArrow
|
||||||
source: contactList.visible ? AppIcons.upArrow : AppIcons.downArrow
|
width: 24 * DefaultStyle.dp
|
||||||
}
|
height: 24 * DefaultStyle.dp
|
||||||
onClicked: contactList.visible = !contactList.visible
|
onClicked: contactList.visible = !contactList.visible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -269,11 +260,8 @@ AbstractMainPage {
|
||||||
width: 24 * DefaultStyle.dp
|
width: 24 * DefaultStyle.dp
|
||||||
height: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
background: Item{}
|
background: Item{}
|
||||||
contentItem: Image {
|
|
||||||
anchors.fill: parent
|
|
||||||
source: AppIcons.pencil
|
|
||||||
}
|
|
||||||
onClicked: mainItem.editContact(mainItem.selectedContact)
|
onClicked: mainItem.editContact(mainItem.selectedContact)
|
||||||
|
icon.source: AppIcons.pencil
|
||||||
}
|
}
|
||||||
detailContent: ColumnLayout {
|
detailContent: ColumnLayout {
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: false
|
||||||
|
|
@ -319,7 +307,6 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Text {
|
Text {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
// TODO change with domain
|
|
||||||
text: modelData.label
|
text: modelData.label
|
||||||
font {
|
font {
|
||||||
pixelSize: 13 * DefaultStyle.dp
|
pixelSize: 13 * DefaultStyle.dp
|
||||||
|
|
@ -343,12 +330,9 @@ AbstractMainPage {
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
property var callObj
|
property var callObj
|
||||||
contentItem: Image {
|
icon.source: AppIcons.phone
|
||||||
anchors.fill: parent
|
|
||||||
source: AppIcons.phone
|
|
||||||
width: 24 * DefaultStyle.dp
|
width: 24 * DefaultStyle.dp
|
||||||
height: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
callObj = UtilsCpp.createCall(modelData.address)
|
callObj = UtilsCpp.createCall(modelData.address)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue