mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
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());
|
||||
mStatus = LinphoneEnums::fromLinphone(call->getCallLog()->getStatus());
|
||||
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());
|
||||
auto tokenVerified = mCallModel->getAuthenticationTokenVerified();
|
||||
mLocalSas = localToken;
|
||||
mRemoteSas = remoteToken;
|
||||
mIsSecured = (mEncryption == LinphoneEnums::MediaEncryption::Zrtp && tokenVerified) ||
|
||||
mEncryption == LinphoneEnums::MediaEncryption::Srtp ||
|
||||
mEncryption == LinphoneEnums::MediaEncryption::Dtls;
|
||||
mPaused = mState == LinphoneEnums::CallState::Pausing || mState == LinphoneEnums::CallState::Paused ||
|
||||
mState == LinphoneEnums::CallState::PausedByRemote;
|
||||
mRemoteVideoEnabled = call->getRemoteParams() && call->getRemoteParams()->videoEnabled();
|
||||
mRecording = call->getParams() && call->getParams()->isRecording();
|
||||
mRemoteRecording = call->getRemoteParams() && call->getRemoteParams()->isRecording();
|
||||
mRecordable = mState == LinphoneEnums::CallState::StreamsRunning;
|
||||
|
|
@ -159,12 +165,14 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
|
|||
auto tokenVerified = mCallModel->getAuthenticationTokenVerified();
|
||||
auto token = Utils::coreStringToAppString(mCallModel->getAuthenticationToken());
|
||||
mCallModelConnection->invokeToCore([this, call, encryption, tokenVerified, token]() {
|
||||
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();
|
||||
setLocalSas(localToken);
|
||||
setRemoteSas(remoteToken);
|
||||
if (token.size() == 4) {
|
||||
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();
|
||||
setLocalSas(localToken);
|
||||
setRemoteSas(remoteToken);
|
||||
}
|
||||
setEncryption(encryption);
|
||||
setIsSecured((encryption == LinphoneEnums::MediaEncryption::Zrtp && tokenVerified) ||
|
||||
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,
|
||||
bool withVideo,
|
||||
const QString &prepareTransfertAddress,
|
||||
const QHash<QString, QString> &headers,
|
||||
linphone::MediaEncryption mediaEncryption) {
|
||||
|
|
@ -96,7 +97,7 @@ QSharedPointer<CallCore> ToolModel::createCall(const QString &sipAddress,
|
|||
}
|
||||
|
||||
std::shared_ptr<linphone::CallParams> params = core->createCallParams(nullptr);
|
||||
params->enableVideo(false);
|
||||
params->enableVideo(withVideo);
|
||||
params->setMediaEncryption(mediaEncryption);
|
||||
if (Utils::coreStringToAppString(params->getRecordFile()).isEmpty()) {
|
||||
|
||||
|
|
@ -116,6 +117,7 @@ QSharedPointer<CallCore> ToolModel::createCall(const QString &sipAddress,
|
|||
|
||||
if (core->getDefaultAccount()) params->setAccount(core->getDefaultAccount());
|
||||
auto call = core->inviteAddressWithParams(address, params);
|
||||
call->enableCamera(withVideo);
|
||||
return call ? CallCore::create(call) : nullptr;
|
||||
|
||||
/* TODO transfer
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ public:
|
|||
static QString getDisplayName(QString address);
|
||||
|
||||
static QSharedPointer<CallCore> createCall(const QString &sipAddress,
|
||||
bool withVideo = false,
|
||||
const QString &prepareTransfertAddress = "",
|
||||
const QHash<QString, QString> &headers = {},
|
||||
linphone::MediaEncryption = linphone::MediaEncryption::None);
|
||||
|
|
|
|||
|
|
@ -93,12 +93,13 @@ QString Utils::getInitials(const QString &username) {
|
|||
}
|
||||
|
||||
VariantObject *Utils::createCall(const QString &sipAddress,
|
||||
bool withVideo,
|
||||
const QString &prepareTransfertAddress,
|
||||
const QHash<QString, QString> &headers) {
|
||||
VariantObject *data = new VariantObject(QVariant()); // Scope : GUI
|
||||
if (!data) return nullptr;
|
||||
data->makeRequest([sipAddress, prepareTransfertAddress, headers]() {
|
||||
auto call = ToolModel::createCall(sipAddress, prepareTransfertAddress, headers);
|
||||
data->makeRequest([sipAddress, withVideo, prepareTransfertAddress, headers]() {
|
||||
auto call = ToolModel::createCall(sipAddress, withVideo, prepareTransfertAddress, headers);
|
||||
if (call) {
|
||||
auto callGui = QVariant::fromValue(new CallGui(call));
|
||||
App::postCoreSync([callGui]() {
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public:
|
|||
Q_INVOKABLE static QString getInitials(const QString &username); // Support UTF32
|
||||
|
||||
Q_INVOKABLE static VariantObject *createCall(const QString &sipAddress,
|
||||
bool withVideo = false,
|
||||
const QString &prepareTransfertAddress = "",
|
||||
const QHash<QString, QString> &headers = {});
|
||||
Q_INVOKABLE static void setFirstLaunch(bool first);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ Window {
|
|||
// modality: Qt.WindowModal
|
||||
|
||||
property CallGui call
|
||||
property bool callTerminatedByUser: false
|
||||
|
||||
Connections {
|
||||
target: call.core
|
||||
|
|
@ -32,7 +33,7 @@ Window {
|
|||
onCallChanged: {
|
||||
waitingTime.seconds = 0
|
||||
waitingTimer.restart()
|
||||
console.log("call changed", call)
|
||||
console.log("call changed", call, waitingTime.seconds)
|
||||
}
|
||||
|
||||
property var callState: call.core.state
|
||||
|
|
@ -128,13 +129,10 @@ Window {
|
|||
: DefaultStyle.grey_600
|
||||
radius: 71 * DefaultStyle.dp
|
||||
}
|
||||
contentItem: EffectImage {
|
||||
source: disabledIcon && bottomButton.checked ? disabledIcon : enabledIcon
|
||||
imageWidth: 32 * DefaultStyle.dp
|
||||
imageHeight: 32 * DefaultStyle.dp
|
||||
anchors.centerIn: parent
|
||||
colorizationColor: disabledIcon && bottomButton.checked ? DefaultStyle.main2_0 : DefaultStyle.grey_0
|
||||
}
|
||||
icon.source: disabledIcon && bottomButton.checked ? disabledIcon : enabledIcon
|
||||
height: 32 * DefaultStyle.dp
|
||||
width: 32 * DefaultStyle.dp
|
||||
contentImageColor: DefaultStyle.grey_0
|
||||
}
|
||||
ZrtpTokenAuthenticationDialog {
|
||||
id: zrtpValidation
|
||||
|
|
@ -214,7 +212,8 @@ Window {
|
|||
source:(mainWindow.call.core.state === LinphoneEnums.CallState.End
|
||||
|| mainWindow.call.core.state === LinphoneEnums.CallState.Released)
|
||||
? AppIcons.endCall
|
||||
: mainWindow.call.core.paused
|
||||
: (mainWindow.call.core.state === LinphoneEnums.CallState.Paused
|
||||
|| mainWindow.call.core.state === LinphoneEnums.CallState.PausedByRemote)
|
||||
? AppIcons.pause
|
||||
: mainWindow.call.core.dir === LinphoneEnums.CallDir.Outgoing
|
||||
? AppIcons.outgoingCall
|
||||
|
|
@ -227,7 +226,8 @@ Window {
|
|||
id: callStatusText
|
||||
text: (mainWindow.call.core.state === LinphoneEnums.CallState.End || mainWindow.call.core.state === LinphoneEnums.CallState.Released)
|
||||
? 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")
|
||||
: EnumsToStringCpp.dirToString(mainWindow.call.core.dir) + qsTr(" call")
|
||||
color: DefaultStyle.grey_0
|
||||
|
|
@ -277,15 +277,11 @@ Window {
|
|||
bottomPadding: 8 * DefaultStyle.dp
|
||||
leftPadding: 10 * DefaultStyle.dp
|
||||
rightPadding: 10 * DefaultStyle.dp
|
||||
width: 269 * DefaultStyle.dp
|
||||
visible: mainWindow.call.core.peerSecured
|
||||
onVisibleChanged: console.log("peer secured", mainWindow.call.core.peerSecured)
|
||||
visible: mainWindow.call.core.isSecured
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
color: DefaultStyle.main2_0
|
||||
border.color: DefaultStyle.info_500_main
|
||||
border.width: 1 * DefaultStyle.dp
|
||||
radius: 50 * DefaultStyle.dp
|
||||
radius: 15 * DefaultStyle.dp
|
||||
}
|
||||
contentItem: RowLayout {
|
||||
Image {
|
||||
|
|
@ -301,6 +297,7 @@ Window {
|
|||
color: DefaultStyle.info_500_main
|
||||
font {
|
||||
pixelSize: 14 * DefaultStyle.dp
|
||||
weight: 400 * DefaultStyle.dp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -322,6 +319,28 @@ Window {
|
|||
contentItem: Item {
|
||||
id: centerItem
|
||||
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 {
|
||||
id: centerLayout
|
||||
currentIndex: 0
|
||||
|
|
@ -335,10 +354,10 @@ Window {
|
|||
}
|
||||
}
|
||||
Sticker {
|
||||
visible: false
|
||||
call: mainWindow.call
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
// visible: mainWindow.call.core.state != LinphoneEnums.CallState.End
|
||||
|
||||
Timer {
|
||||
id: waitingTimer
|
||||
|
|
@ -391,6 +410,8 @@ Window {
|
|||
}
|
||||
Sticker {
|
||||
id: preview
|
||||
visible: mainWindow.call.core.state != LinphoneEnums.CallState.End
|
||||
&& mainWindow.call.core.state != LinphoneEnums.CallState.Released
|
||||
height: 180 * DefaultStyle.dp
|
||||
width: 300 * DefaultStyle.dp
|
||||
anchors.right: centerItem.right
|
||||
|
|
@ -492,7 +513,7 @@ Window {
|
|||
visible: parent.visible
|
||||
closeButtonVisible: false
|
||||
onLaunchCall: {
|
||||
callObj = UtilsCpp.createCall(dialerTextInput.text + "@sip.linphone.org")
|
||||
callObj = UtilsCpp.createCall(dialerTextInput.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -558,8 +579,8 @@ Window {
|
|||
}
|
||||
Text {
|
||||
id: callStateText
|
||||
text: modelData.core.state === LinphoneEnums.CallState.Paused
|
||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||
text: mainWindow.call.core.state === LinphoneEnums.CallState.Paused
|
||||
|| mainWindow.call.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||
? qsTr("Appel en pause") : qsTr("Appel en cours")
|
||||
}
|
||||
PopupButton {
|
||||
|
|
@ -570,12 +591,14 @@ Window {
|
|||
|
||||
popup.contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
Control.Button {
|
||||
Button {
|
||||
leftPadding: 0
|
||||
topPadding: 5 * DefaultStyle.dp
|
||||
bottomPadding: 5 * DefaultStyle.dp
|
||||
background: Item {}
|
||||
contentItem: RowLayout {
|
||||
Image {
|
||||
source: modelData.core.state === LinphoneEnums.CallState.Paused
|
||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||
source: modelData.core.paused
|
||||
? AppIcons.phone : AppIcons.pause
|
||||
sourceSize.width: 32 * DefaultStyle.dp
|
||||
sourceSize.height: 32 * DefaultStyle.dp
|
||||
|
|
@ -584,8 +607,7 @@ Window {
|
|||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
Text {
|
||||
text: modelData.core.state === LinphoneEnums.CallState.Paused
|
||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||
text: modelData.core.paused
|
||||
? qsTr("Reprendre l'appel") : qsTr("Mettre en pause")
|
||||
color: DefaultStyle.main2_500main
|
||||
Layout.preferredWidth: metrics.width
|
||||
|
|
@ -600,7 +622,10 @@ Window {
|
|||
}
|
||||
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
|
||||
}
|
||||
Control.Button {
|
||||
Button {
|
||||
leftPadding: 0
|
||||
topPadding: 5 * DefaultStyle.dp
|
||||
bottomPadding: 5 * DefaultStyle.dp
|
||||
background: Item {}
|
||||
contentItem: RowLayout {
|
||||
EffectImage {
|
||||
|
|
@ -617,7 +642,10 @@ Window {
|
|||
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) {
|
||||
bottomButtonsLayout.layoutDirection = Qt.RightToLeft
|
||||
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
|
||||
bottomButtonsLayout.layoutDirection = Qt.LeftToRight
|
||||
videoCameraButton.enabled = false
|
||||
moreOptionsButton.visible = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -680,7 +713,10 @@ Window {
|
|||
color: DefaultStyle.danger_500main
|
||||
radius: 71 * DefaultStyle.dp
|
||||
}
|
||||
onClicked: mainWindow.endCall(mainWindow.call)
|
||||
onClicked: {
|
||||
mainWindow.endCall(mainWindow.call)
|
||||
mainWindow.callTerminatedByUser = true
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
id: connectedCallButtons
|
||||
|
|
@ -688,6 +724,7 @@ Window {
|
|||
Layout.row: 0
|
||||
Layout.column: 1
|
||||
BottomButton {
|
||||
id: pauseButton
|
||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||
background: Rectangle {
|
||||
|
|
@ -708,18 +745,6 @@ Window {
|
|||
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 {
|
||||
id: transferCallButton
|
||||
enabledIcon: AppIcons.transferCall
|
||||
|
|
@ -738,6 +763,18 @@ Window {
|
|||
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 {
|
||||
Layout.row: 0
|
||||
|
|
@ -748,6 +785,7 @@ Window {
|
|||
|| mainWindow.call.core.state == LinphoneEnums.CallState.IncomingReceived
|
||||
? bottomButtonsLayout.columns - 1 : 0
|
||||
BottomButton {
|
||||
id: videoCameraButton
|
||||
enabledIcon: AppIcons.videoCamera
|
||||
disabledIcon: AppIcons.videoCameraSlash
|
||||
checked: !mainWindow.call.core.cameraEnabled
|
||||
|
|
@ -787,7 +825,7 @@ Window {
|
|||
id: optionsList
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
|
||||
Control.Button {
|
||||
Button {
|
||||
id: callListButton
|
||||
Layout.fillWidth: true
|
||||
background: Item {
|
||||
|
|
@ -810,7 +848,7 @@ Window {
|
|||
moreOptionsMenu.close()
|
||||
}
|
||||
}
|
||||
Control.Button {
|
||||
Button {
|
||||
id: dialerButton
|
||||
Layout.fillWidth: true
|
||||
background: Item {
|
||||
|
|
@ -833,32 +871,7 @@ Window {
|
|||
moreOptionsMenu.close()
|
||||
}
|
||||
}
|
||||
Control.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 {
|
||||
Button {
|
||||
id: recordButton
|
||||
Layout.fillWidth: true
|
||||
enabled: mainWindow.call.core.recordable
|
||||
|
|
@ -884,6 +897,31 @@ Window {
|
|||
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 {
|
||||
id: labelButton
|
||||
property alias image: buttonImg
|
||||
// property alias image: buttonImg
|
||||
property alias button: button
|
||||
property string label
|
||||
spacing: 8 * DefaultStyle.dp
|
||||
|
|
@ -38,15 +38,6 @@ ColumnLayout {
|
|||
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
|
||||
|
|
@ -108,16 +99,16 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
Item {
|
||||
// spacing: 10 * DefaultStyle.dp
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.preferredWidth: mainItem.implicitWidth
|
||||
Layout.preferredHeight: childrenRect.height
|
||||
// Layout.fillHeight: true
|
||||
LabelButton {
|
||||
anchors.left: parent.left
|
||||
// width: 24 * DefaultStyle.dp//image.width
|
||||
// height: image.height
|
||||
image.source: AppIcons.phone
|
||||
width: 56 * DefaultStyle.dp
|
||||
height: 56 * DefaultStyle.dp
|
||||
button.icon.width: 24 * DefaultStyle.dp
|
||||
button.icon.height: 24 * DefaultStyle.dp
|
||||
button.icon.source: AppIcons.phone
|
||||
label: qsTr("Appel")
|
||||
property var callObj
|
||||
button.onClicked: {
|
||||
|
|
@ -127,18 +118,22 @@ ColumnLayout {
|
|||
}
|
||||
LabelButton {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
// Layout.preferredWidth: image.width
|
||||
// Layout.preferredHeight: image.height
|
||||
image.source: AppIcons.chatTeardropText
|
||||
width: 56 * DefaultStyle.dp
|
||||
height: 56 * DefaultStyle.dp
|
||||
button.icon.width: 24 * DefaultStyle.dp
|
||||
button.icon.height: 24 * DefaultStyle.dp
|
||||
button.icon.source: AppIcons.chatTeardropText
|
||||
label: qsTr("Message")
|
||||
button.onClicked: console.debug("[CallPage.qml] TODO : open conversation")
|
||||
}
|
||||
LabelButton {
|
||||
id: videoCall
|
||||
anchors.right: parent.right
|
||||
// Layout.preferredWidth: image.width
|
||||
// Layout.preferredHeight: image.height
|
||||
image.source: AppIcons.videoCamera
|
||||
width: 56 * DefaultStyle.dp
|
||||
height: 56 * DefaultStyle.dp
|
||||
button.icon.width: 24 * DefaultStyle.dp
|
||||
button.icon.height: 24 * DefaultStyle.dp
|
||||
button.icon.source: AppIcons.videoCamera
|
||||
label: qsTr("Appel Video")
|
||||
property var callObj
|
||||
button.onClicked: {
|
||||
|
|
@ -147,8 +142,6 @@ ColumnLayout {
|
|||
console.log("[CallPage.qml] TODO : enable video")
|
||||
}
|
||||
}
|
||||
// Item {Layout.fillWidth: true}
|
||||
|
||||
}
|
||||
ColumnLayout {
|
||||
id: detailControl
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Item {
|
|||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Control.Button {
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
// Layout.bottomMargin: 20
|
||||
background: Rectangle {
|
||||
|
|
@ -53,7 +53,6 @@ Item {
|
|||
}
|
||||
onClicked: console.debug("[LoginLayout]User: open about popup")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
|
|
|||
|
|
@ -238,34 +238,25 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
Control.Button {
|
||||
PopupButton {
|
||||
id: avatarButton
|
||||
AccountProxy{
|
||||
id: accountProxy
|
||||
//property bool haveAvatar: defaultAccount && defaultAccount.core.pictureUri || false
|
||||
}
|
||||
|
||||
background.visible: false
|
||||
Layout.preferredWidth: 54 * DefaultStyle.dp
|
||||
Layout.preferredHeight: width
|
||||
background: Item {
|
||||
visible: false
|
||||
}
|
||||
contentItem: Avatar {
|
||||
id: avatar
|
||||
height: avatarButton.height
|
||||
width: avatarButton.width
|
||||
account: accountProxy.defaultAccount
|
||||
}
|
||||
onClicked: {
|
||||
accountList.open()
|
||||
}
|
||||
Popup{
|
||||
id: accountList
|
||||
x: -width + parent.width
|
||||
y: settingsButton.height + (10 * DefaultStyle.dp)
|
||||
contentWidth: accounts.width
|
||||
contentHeight: accounts.height
|
||||
Accounts{
|
||||
popup.x: width - popup.width
|
||||
popup.padding: 0
|
||||
popup.contentItem: ColumnLayout {
|
||||
Accounts {
|
||||
id: accounts
|
||||
onAddAccountRequest: mainItem.addAccountRequest()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.2 as Control
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import Linphone
|
||||
|
||||
Control.Button {
|
||||
|
|
@ -13,12 +14,15 @@ Control.Button {
|
|||
property int textWeight: 600 * DefaultStyle.dp
|
||||
property bool underline: false
|
||||
property bool shadowEnabled: false
|
||||
property var contentImageColor
|
||||
hoverEnabled: true
|
||||
icon.width: width
|
||||
icon.height: height
|
||||
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
// leftPadding: 20 * DefaultStyle.dp
|
||||
// rightPadding: 20 * DefaultStyle.dp
|
||||
// topPadding: 11 * DefaultStyle.dp
|
||||
// bottomPadding: 11 * DefaultStyle.dp
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
|
@ -58,19 +62,46 @@ Control.Button {
|
|||
}
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
id: contentText
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.centerIn: parent
|
||||
wrapMode: Text.WordWrap
|
||||
text: mainItem.text
|
||||
color: inversedColors ? mainItem.color : DefaultStyle.grey_0
|
||||
font {
|
||||
pixelSize: mainItem.textSize
|
||||
weight: mainItem.textWeight
|
||||
family: DefaultStyle.defaultFont
|
||||
capitalization: mainItem.capitalization
|
||||
underline: mainItem.underline
|
||||
contentItem: StackLayout {
|
||||
currentIndex: mainItem.text.length != 0
|
||||
? 0
|
||||
: mainItem.icon.source != undefined
|
||||
? 1
|
||||
: 2
|
||||
|
||||
Text {
|
||||
id: contentText
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
width: implicitWidth
|
||||
height: implicitHeight
|
||||
wrapMode: Text.WordWrap
|
||||
text: mainItem.text
|
||||
color: inversedColors ? mainItem.color : DefaultStyle.grey_0
|
||||
font {
|
||||
pixelSize: mainItem.textSize
|
||||
weight: mainItem.textWeight
|
||||
family: DefaultStyle.defaultFont
|
||||
capitalization: mainItem.capitalization
|
||||
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.preferredHeight: 24 * DefaultStyle.dp
|
||||
background: Item{}
|
||||
icon.source:AppIcons.closeX
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
contentItem: Image {
|
||||
anchors.fill: parent
|
||||
source: AppIcons.closeX
|
||||
|
|
@ -158,10 +161,6 @@ Item {
|
|||
Button {
|
||||
visible: mainItem.groupCallVisible
|
||||
Layout.fillWidth: true
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
rightPadding: 0
|
||||
bottomPadding: 0
|
||||
background: Rectangle {
|
||||
color: DefaultStyle.groupCallButtonColor
|
||||
anchors.fill: parent
|
||||
|
|
@ -190,35 +189,33 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
visible: searchBar.text.length > 0
|
||||
Layout.maximumWidth: parent.width
|
||||
Layout.fillWidth: true
|
||||
Text {
|
||||
text: searchBar.text
|
||||
maximumLineCount: 1
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Control.Button {
|
||||
implicitWidth: 30 * DefaultStyle.dp
|
||||
implicitHeight: 30 * DefaultStyle.dp
|
||||
background: Item {
|
||||
visible: false
|
||||
}
|
||||
contentItem: Image {
|
||||
source: AppIcons.phone
|
||||
width: 20 * DefaultStyle.dp
|
||||
sourceSize.width: 20 * DefaultStyle.dp
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
onClicked: {
|
||||
mainItem.callButtonPressed(searchBar.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
// RowLayout {
|
||||
// //DEBUG
|
||||
// visible: searchBar.text.length > 0
|
||||
// Layout.maximumWidth: parent.width
|
||||
// Layout.fillWidth: true
|
||||
// Text {
|
||||
// text: searchBar.text
|
||||
// maximumLineCount: 1
|
||||
// elide: Text.ElideRight
|
||||
// }
|
||||
// Item {
|
||||
// Layout.fillWidth: true
|
||||
// }
|
||||
// Button {
|
||||
// implicitWidth: 30 * DefaultStyle.dp
|
||||
// implicitHeight: 30 * DefaultStyle.dp
|
||||
// background: Item {
|
||||
// visible: false
|
||||
// }
|
||||
// icon.source: AppIcons.phone
|
||||
// width: 20 * DefaultStyle.dp
|
||||
// height: 20 * DefaultStyle.dp
|
||||
// onClicked: {
|
||||
// mainItem.callButtonPressed(searchBar.text)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
ColumnLayout {
|
||||
Text {
|
||||
text: qsTr("All contacts")
|
||||
|
|
|
|||
|
|
@ -47,13 +47,11 @@ Control.Page {
|
|||
background: Item {
|
||||
visible: false
|
||||
}
|
||||
contentItem: Image {
|
||||
anchors.centerIn: closeButton
|
||||
source: AppIcons.closeX
|
||||
width: 10 * DefaultStyle.dp
|
||||
sourceSize.width: 10 * DefaultStyle.dp
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
icon.source: AppIcons.closeX
|
||||
Layout.preferredWidth: 10 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 10 * DefaultStyle.dp
|
||||
width: 10 * DefaultStyle.dp
|
||||
height: 10 * DefaultStyle.dp
|
||||
onClicked: mainItem.visible = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,25 +20,11 @@ ColumnLayout {
|
|||
id: carouselStackLayout
|
||||
children: mainItem.itemsList
|
||||
property int previousIndex: currentIndex
|
||||
currentIndex: 0
|
||||
|
||||
function goToSlideAtIndex(index) {
|
||||
carouselStackLayout.previousIndex = carouselStackLayout.currentIndex;
|
||||
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
|
||||
carouselStackLayout.previousIndex = carouselStackLayout.currentIndex
|
||||
carouselStackLayout.currentIndex = index
|
||||
}
|
||||
|
||||
onCurrentIndexChanged: {
|
||||
|
|
@ -75,25 +61,37 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
id: carouselButtonsLayout
|
||||
|
||||
Component {
|
||||
id: carouselButton
|
||||
Control.Button {
|
||||
property int slideIndex
|
||||
property var stackLayout
|
||||
signal buttonClicked(int index)
|
||||
|
||||
background: Rectangle {
|
||||
color: stackLayout.currentIndex == slideIndex ? DefaultStyle.main1_500_main : DefaultStyle.main2_200
|
||||
radius: 15 * DefaultStyle.dp
|
||||
width: stackLayout.currentIndex == slideIndex ? 11 * DefaultStyle.dp : 8 * DefaultStyle.dp
|
||||
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 {
|
||||
id: carouselButtonsLayout
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
Repeater {
|
||||
id: carouselButton
|
||||
model: mainItem.itemsCount
|
||||
delegate: Button {
|
||||
width: 8 * DefaultStyle.dp
|
||||
height: 8 * DefaultStyle.dp
|
||||
Behavior on width { NumberAnimation {duration: 100}}
|
||||
}
|
||||
onClicked: {
|
||||
buttonClicked(slideIndex)
|
||||
padding: 0
|
||||
background: Rectangle {
|
||||
color: DefaultStyle.main2_200
|
||||
radius: 30 * DefaultStyle.dp
|
||||
width: 8 * DefaultStyle.dp
|
||||
height: 8 * DefaultStyle.dp
|
||||
}
|
||||
onClicked: {
|
||||
mainItem.goToSlide(modelData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ ColumnLayout {
|
|||
property string label: ""
|
||||
// Usage : each item of the model list must be {text: ..., img: ...}
|
||||
// If string list, only text part of the delegate will be filled
|
||||
property var modelList: []
|
||||
property var model: []
|
||||
readonly property string currentText: selectedItemText.text
|
||||
property bool enableBackgroundColors: true
|
||||
readonly property bool hasActiveFocus: combobox.activeFocus
|
||||
|
|
@ -27,7 +27,7 @@ ColumnLayout {
|
|||
|
||||
Control.ComboBox {
|
||||
id: combobox
|
||||
model: mainItem.modelList
|
||||
model: mainItem.model
|
||||
Layout.preferredWidth: mainItem.width
|
||||
background: Rectangle {
|
||||
implicitWidth: mainItem.width
|
||||
|
|
@ -67,13 +67,13 @@ ColumnLayout {
|
|||
|
||||
Component.onCompleted: {
|
||||
var index = combobox.currentIndex < 0 ? 0 : combobox.currentIndex
|
||||
if (mainItem.modelList[index].img) {
|
||||
selectedItemImg.source = mainItem.modelList[0].img
|
||||
if (mainItem.model[index].img) {
|
||||
selectedItemImg.source = mainItem.model[0].img
|
||||
}
|
||||
if (mainItem.modelList[index].text)
|
||||
selectedItemText.text = mainItem.modelList[0].text
|
||||
else if (mainItem.modelList[index])
|
||||
selectedItemText.text = mainItem.modelList[0]
|
||||
if (mainItem.model[index].text)
|
||||
selectedItemText.text = mainItem.model[0].text
|
||||
else if (mainItem.model[index])
|
||||
selectedItemText.text = mainItem.model[0]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,10 +35,7 @@ ColumnLayout {
|
|||
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
contentItem: Image {
|
||||
anchors.fill: parent
|
||||
source: AppIcons.closeX
|
||||
}
|
||||
icon.source: AppIcons.closeX
|
||||
onClicked: {
|
||||
// contact.core.pictureUri = mainItem.oldPictureUri
|
||||
mainItem.contact.core.undo()
|
||||
|
|
@ -156,10 +153,9 @@ ColumnLayout {
|
|||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||
background: Item{}
|
||||
contentItem: Image {
|
||||
anchors.fill: parent
|
||||
source: AppIcons.closeX
|
||||
}
|
||||
icon.source: AppIcons.closeX
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
onClicked: mainItem.contact.core.removeAddress(index)
|
||||
}
|
||||
}
|
||||
|
|
@ -196,10 +192,9 @@ ColumnLayout {
|
|||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||
background: Item{}
|
||||
contentItem: Image {
|
||||
anchors.fill: parent
|
||||
source: AppIcons.closeX
|
||||
}
|
||||
icon.source: AppIcons.closeX
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
onClicked: mainItem.contact.core.removePhoneNumber(index)
|
||||
}
|
||||
}
|
||||
|
|
@ -242,6 +237,10 @@ ColumnLayout {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
enabled: mainItem.contact && mainItem.contact.core.givenName.length > 0
|
||||
text: mainItem.saveButtonText
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
mainItem.contact.core.save()
|
||||
mainItem.closeEdition()
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ ListView {
|
|||
colorizationColor: DefaultStyle.danger_500main
|
||||
}
|
||||
Text {
|
||||
text: qsTr("Supprimmer")
|
||||
text: qsTr("Supprimer")
|
||||
color: DefaultStyle.danger_500main
|
||||
font {
|
||||
pixelSize: 14 * DefaultStyle.dp
|
||||
|
|
|
|||
|
|
@ -70,7 +70,10 @@ Item {
|
|||
interval: 1
|
||||
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)
|
||||
sourceComponent: cameraComponent
|
||||
}
|
||||
|
|
@ -99,7 +102,7 @@ Item {
|
|||
anchors.bottom: parent.bottom
|
||||
anchors.leftMargin: 10 * DefaultStyle.dp
|
||||
anchors.bottomMargin: 10 * DefaultStyle.dp
|
||||
width: txtMeter.width
|
||||
width: implicitWidth
|
||||
text: mainItem.peerAddress.length != 0
|
||||
? mainItem.peerAddress
|
||||
: mainItem.account && mainItem.identityAddress
|
||||
|
|
@ -111,10 +114,6 @@ Item {
|
|||
weight: 500 * DefaultStyle.dp
|
||||
}
|
||||
}
|
||||
TextMetrics {
|
||||
id: txtMeter
|
||||
text: bottomAddress.text
|
||||
}
|
||||
}
|
||||
MultiEffect {
|
||||
id: shadow
|
||||
|
|
|
|||
|
|
@ -83,6 +83,10 @@ Popup {
|
|||
Button {
|
||||
visible: mainItem.buttons.length === 2
|
||||
text: qsTr("Oui")
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
mainItem.accepted()
|
||||
mainItem.close()
|
||||
|
|
@ -91,6 +95,10 @@ Popup {
|
|||
Button {
|
||||
visible: mainItem.buttons.length === 2
|
||||
text: qsTr("Non")
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
mainItem.rejected()
|
||||
mainItem.close()
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ Loader {
|
|||
|
||||
MultiEffect {
|
||||
id: effect2
|
||||
visible: mainItem.useColor
|
||||
enabled: mainItem.useColor
|
||||
anchors.fill: effect
|
||||
source: effect
|
||||
|
|
|
|||
|
|
@ -64,6 +64,10 @@ ColumnLayout {
|
|||
RowLayout {
|
||||
id: lastFormLineLayout
|
||||
Button {
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
contentItem: StackLayout {
|
||||
id: connectionButton
|
||||
currentIndex: 0
|
||||
|
|
|
|||
|
|
@ -43,19 +43,17 @@ Control.Popup {
|
|||
Button {
|
||||
id: closeButton
|
||||
visible: mainItem.closeButtonVisible
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: 10 * DefaultStyle.dp
|
||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
visible: false
|
||||
}
|
||||
contentItem: Image {
|
||||
anchors.centerIn: parent
|
||||
source: AppIcons.closeX
|
||||
width: 24 * DefaultStyle.dp
|
||||
sourceSize.width: 24 * DefaultStyle.dp
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
icon.source: AppIcons.closeX
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
onClicked: mainItem.close()
|
||||
}
|
||||
}
|
||||
|
|
@ -152,15 +150,10 @@ Control.Popup {
|
|||
color: DefaultStyle.success_500main
|
||||
radius: 71 * DefaultStyle.dp
|
||||
}
|
||||
contentItem: EffectImage {
|
||||
id: buttonIcon
|
||||
source: AppIcons.phone
|
||||
anchors.centerIn: parent
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
fillMode: Image.PreserveAspectFit
|
||||
colorizationColor: DefaultStyle.grey_0
|
||||
}
|
||||
icon.source: AppIcons.phone
|
||||
icon.width: 32 * DefaultStyle.dp
|
||||
icon.height: 32 * DefaultStyle.dp
|
||||
contentImageColor: DefaultStyle.grey_0
|
||||
onClicked: mainItem.launchCall()
|
||||
}
|
||||
Button {
|
||||
|
|
@ -172,12 +165,9 @@ Control.Popup {
|
|||
background: Item {
|
||||
visible: false
|
||||
}
|
||||
contentItem: Image {
|
||||
source: AppIcons.backspaceFill
|
||||
anchors.centerIn: parent
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
}
|
||||
icon.source: AppIcons.backspaceFill
|
||||
icon.width: 38 * DefaultStyle.dp
|
||||
icon.height: 38 * DefaultStyle.dp
|
||||
onClicked: mainItem.wipe()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,13 +22,9 @@ Button {
|
|||
color: DefaultStyle.main2_300
|
||||
radius: 40 * DefaultStyle.dp
|
||||
}
|
||||
contentItem: Image {
|
||||
source: AppIcons.more
|
||||
sourceSize.width: 24 * DefaultStyle.dp
|
||||
sourceSize.height: 24 * DefaultStyle.dp
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
}
|
||||
icon.source: AppIcons.more
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
onPressed: {
|
||||
if (popup.visible) popup.close()
|
||||
else popup.open()
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ import Linphone
|
|||
|
||||
Control.RadioButton {
|
||||
id: mainItem
|
||||
property bool inversedColors: false
|
||||
property string title
|
||||
property string contentText
|
||||
property string imgUrl
|
||||
property color color
|
||||
hoverEnabled: true
|
||||
|
||||
MouseArea {
|
||||
|
|
@ -20,7 +20,7 @@ Control.RadioButton {
|
|||
|
||||
background: Rectangle {
|
||||
color: DefaultStyle.grey_100
|
||||
border.color: mainItem.checked ? DefaultStyle.info_500_main : "transparent"
|
||||
border.color: mainItem.checked ? mainItem.color : "transparent"
|
||||
radius: 20 * DefaultStyle.dp
|
||||
}
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ Control.RadioButton {
|
|||
implicitWidth: 16 * DefaultStyle.dp
|
||||
implicitHeight: 16 * DefaultStyle.dp
|
||||
radius: implicitWidth/2
|
||||
border.color: mainItem.checked ? DefaultStyle.info_500_main : DefaultStyle.main1_500_main
|
||||
border.color: mainItem.color
|
||||
|
||||
Rectangle {
|
||||
width: parent.width/2
|
||||
|
|
@ -42,7 +42,7 @@ Control.RadioButton {
|
|||
x: parent.width/4
|
||||
y: parent.width/4
|
||||
radius: width/2
|
||||
color: DefaultStyle.info_500_main
|
||||
color: mainItem.color
|
||||
visible: mainItem.checked
|
||||
}
|
||||
}
|
||||
|
|
@ -52,17 +52,16 @@ Control.RadioButton {
|
|||
color: DefaultStyle.grey_900
|
||||
font.pixelSize: 16 * DefaultStyle.dp
|
||||
}
|
||||
Control.Button {
|
||||
Button {
|
||||
padding: 0
|
||||
background: Item {
|
||||
visible: false
|
||||
}
|
||||
contentItem: Image {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: AppIcons.info
|
||||
width: 2 * DefaultStyle.dp
|
||||
height: 2 * DefaultStyle.dp
|
||||
}
|
||||
icon.source: AppIcons.info
|
||||
Layout.preferredWidth: 2 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 2 * DefaultStyle.dp
|
||||
width: 2 * DefaultStyle.dp
|
||||
height: 2 * DefaultStyle.dp
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ Rectangle {
|
|||
width: 1 * DefaultStyle.dp
|
||||
}
|
||||
}
|
||||
Control.Button {
|
||||
Button {
|
||||
id: dialerButton
|
||||
visible: numericPad != undefined && textField.text.length === 0
|
||||
checkable: true
|
||||
|
|
@ -79,33 +79,30 @@ Rectangle {
|
|||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
contentItem: Image {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: dialerButton.checked ? AppIcons.dialerSelected : AppIcons.dialer
|
||||
}
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
icon.source: dialerButton.checked ? AppIcons.dialerSelected : AppIcons.dialer
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||
anchors.rightMargin: 15 * DefaultStyle.dp
|
||||
onCheckedChanged: {
|
||||
if (checked) mainItem.numericPad.open()
|
||||
else mainItem.numericPad.close()
|
||||
}
|
||||
}
|
||||
Control.Button {
|
||||
Button {
|
||||
id: clearTextButton
|
||||
visible: textField.text.length > 0
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
contentItem: Image {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: AppIcons.closeX
|
||||
}
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
icon.source: AppIcons.closeX
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||
anchors.rightMargin: 15 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
textField.clear()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Window {
|
|||
text: "Combobox with image"
|
||||
}
|
||||
ComboBox {
|
||||
modelList: [
|
||||
model: [
|
||||
{text: "item 1", img: AppIcons.info},
|
||||
{text: "item 2", img: AppIcons.info},
|
||||
{text: "item 3", img: AppIcons.info}
|
||||
|
|
@ -27,7 +27,7 @@ Window {
|
|||
text: "Combobox without image"
|
||||
}
|
||||
ComboBox {
|
||||
modelList: [
|
||||
model: [
|
||||
{text: "item 1"},
|
||||
{text: "item 2"},
|
||||
{text: "item 3"}
|
||||
|
|
|
|||
|
|
@ -108,23 +108,20 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
Control.Button {
|
||||
Button {
|
||||
id: eyeButton
|
||||
visible: mainItem.hidden
|
||||
checkable: true
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
contentItem: Image {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: eyeButton.checked ? AppIcons.eyeShow : AppIcons.eyeHide
|
||||
width: 20 * DefaultStyle.dp
|
||||
height: 20 * DefaultStyle.dp
|
||||
}
|
||||
icon.source: eyeButton.checked ? AppIcons.eyeShow : AppIcons.eyeHide
|
||||
width: 20 * DefaultStyle.dp
|
||||
height: 20 * DefaultStyle.dp
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 5 * DefaultStyle.dp
|
||||
anchors.rightMargin: 15 * DefaultStyle.dp
|
||||
}
|
||||
}
|
||||
ErrorText {
|
||||
|
|
|
|||
|
|
@ -12,12 +12,11 @@ LoginLayout {
|
|||
signal connectionSucceed()
|
||||
|
||||
titleContent: RowLayout {
|
||||
Control.Button {
|
||||
Layout.preferredHeight: 40 * DefaultStyle.dp
|
||||
Layout.preferredWidth: height
|
||||
spacing: 15 * DefaultStyle.dp
|
||||
Button {
|
||||
visible: mainItem.showBackButton
|
||||
icon.width: width
|
||||
icon.height: height
|
||||
Layout.preferredHeight: 27 * DefaultStyle.dp
|
||||
Layout.preferredWidth: 27 * DefaultStyle.dp
|
||||
icon.source: AppIcons.returnArrow
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
|
|
@ -30,6 +29,8 @@ LoginLayout {
|
|||
Image {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: AppIcons.profile
|
||||
Layout.preferredHeight: 34 * DefaultStyle.dp
|
||||
Layout.preferredWidth: 34 * DefaultStyle.dp
|
||||
}
|
||||
Text {
|
||||
text: qsTr("Connexion")
|
||||
|
|
@ -37,7 +38,6 @@ LoginLayout {
|
|||
pixelSize: 36 * DefaultStyle.dp
|
||||
weight: 800 * DefaultStyle.dp
|
||||
}
|
||||
scaleLettersFactor: 1.1
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -50,6 +50,10 @@ LoginLayout {
|
|||
}
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
text: qsTr("S'inscrire")
|
||||
onClicked: {
|
||||
console.debug("[LoginPage] User: go to register")
|
||||
|
|
@ -58,7 +62,7 @@ LoginLayout {
|
|||
}
|
||||
}
|
||||
centerContent: ColumnLayout {
|
||||
|
||||
Layout.leftMargin: 45 * DefaultStyle.dp
|
||||
RowLayout {
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -68,6 +72,10 @@ LoginLayout {
|
|||
Button {
|
||||
Layout.topMargin: 40 * DefaultStyle.dp
|
||||
inversedColors: true
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
text: qsTr("Compte SIP tiers")
|
||||
onClicked: {mainItem.useSIPButtonClicked()}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,9 @@ LoginLayout {
|
|||
property string email
|
||||
|
||||
titleContent: RowLayout {
|
||||
Control.Button {
|
||||
Layout.preferredHeight: 40 * DefaultStyle.dp
|
||||
Layout.preferredWidth: 40 * DefaultStyle.dp
|
||||
icon.width: 40 * DefaultStyle.dp
|
||||
icon.height: 40 * DefaultStyle.dp
|
||||
Button {
|
||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||
icon.source: AppIcons.returnArrow
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
|
|
@ -104,6 +102,10 @@ LoginLayout {
|
|||
}
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
inversedColors: true
|
||||
text: "Resend a code"
|
||||
onClicked: {
|
||||
|
|
|
|||
|
|
@ -40,6 +40,10 @@ LoginLayout {
|
|||
}
|
||||
Button {
|
||||
// Layout.alignment: Qt.AlignRight
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
text: qsTr("Connexion")
|
||||
onClicked: {
|
||||
console.debug("[RegisterPage] User: return")
|
||||
|
|
@ -72,7 +76,7 @@ LoginLayout {
|
|||
ComboBox {
|
||||
label: " "
|
||||
enabled: false
|
||||
modelList: [{text:"@sip.linphone.org"}]
|
||||
model: [{text:"@sip.linphone.org"}]
|
||||
Layout.preferredWidth: 210 * DefaultStyle.dp
|
||||
}
|
||||
}
|
||||
|
|
@ -131,6 +135,10 @@ LoginLayout {
|
|||
}
|
||||
}
|
||||
Button {
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
text: qsTr("Register")
|
||||
onClicked:{
|
||||
console.log("[RegisterPage] User: Call register with phone number", phoneNumberInput.phoneNumber)
|
||||
|
|
@ -164,7 +172,7 @@ LoginLayout {
|
|||
// due to the invisibility of the upper label
|
||||
label: " "
|
||||
enabled: false
|
||||
modelList: [{text:"@sip.linphone.org"}]
|
||||
model: [{text:"@sip.linphone.org"}]
|
||||
Layout.preferredWidth: 210 * DefaultStyle.dp
|
||||
}
|
||||
}
|
||||
|
|
@ -224,6 +232,10 @@ LoginLayout {
|
|||
}
|
||||
}
|
||||
Button {
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
text: qsTr("Register")
|
||||
onClicked:{
|
||||
console.log("[RegisterPage] User: Call register with email", emailInput.text)
|
||||
|
|
|
|||
|
|
@ -14,12 +14,9 @@ LoginLayout {
|
|||
Button {
|
||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||
contentItem: Image {
|
||||
anchors.fill: parent
|
||||
source: AppIcons.returnArrow
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
}
|
||||
icon.source: AppIcons.returnArrow
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
|
@ -162,7 +159,7 @@ LoginLayout {
|
|||
}
|
||||
ComboBox {
|
||||
label: qsTr("Transport")
|
||||
modelList:[ "TCP", "UDP", "TLS", "DTLS"]
|
||||
model:[ "TCP", "UDP", "TLS", "DTLS"]
|
||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,14 +42,15 @@ LoginLayout {
|
|||
spacing: 70 * DefaultStyle.dp
|
||||
Repeater {
|
||||
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: 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: 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, color: DefaultStyle.main1_500_main}
|
||||
]
|
||||
RadioButton {
|
||||
title: modelData.title
|
||||
contentText: modelData.text
|
||||
imgUrl: modelData.imgUrl
|
||||
checked: modelData.checked
|
||||
color: modelData. color
|
||||
onCheckedChanged: {
|
||||
if (checked) continueButton.selectedIndex = index
|
||||
}
|
||||
|
|
@ -60,6 +61,8 @@ LoginLayout {
|
|||
id: continueButton
|
||||
property int selectedIndex: 0
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
leftPadding: 100 * DefaultStyle.dp
|
||||
rightPadding: 100 * DefaultStyle.dp
|
||||
text: qsTr("Continuer")
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ LoginLayout {
|
|||
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("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 {
|
||||
spacing: 15 * DefaultStyle.dp
|
||||
|
|
@ -111,9 +112,13 @@ LoginLayout {
|
|||
anchors.bottomMargin: 20 * DefaultStyle.dp
|
||||
anchors.leftMargin: (centerLayout.width - width) * DefaultStyle.dp
|
||||
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")
|
||||
onClicked: {
|
||||
if (carousel.currentIndex < 2) carousel.goToSlide(carousel.currentIndex + 1);
|
||||
if (carousel.currentIndex < carousel.itemsCount - 1) carousel.goToSlide(carousel.currentIndex + 1);
|
||||
else mainItem.startButtonPressed();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ Item {
|
|||
contentItem: RowLayout {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
EffectImage {
|
||||
colorizationColor: DefaultStyle.grey_0
|
||||
colorizationColor: "red"// DefaultStyle.grey_0
|
||||
source: mainItem.newItemIconSource
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ AbstractMainPage {
|
|||
ColumnLayout {
|
||||
property alias listView: historyListView
|
||||
RowLayout {
|
||||
spacing: 16 * DefaultStyle.dp
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: listStackView.sideMargin
|
||||
Layout.rightMargin: listStackView.sideMargin
|
||||
|
|
@ -73,6 +74,8 @@ AbstractMainPage {
|
|||
}
|
||||
PopupButton {
|
||||
id: removeHistory
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
popup.x: 0
|
||||
popup.padding: 10 * DefaultStyle.dp
|
||||
popup.contentItem: Button {
|
||||
|
|
@ -108,17 +111,11 @@ AbstractMainPage {
|
|||
}
|
||||
}
|
||||
}
|
||||
Control.Button {
|
||||
|
||||
background: Item {
|
||||
visible: false
|
||||
}
|
||||
contentItem: Image {
|
||||
source: AppIcons.newCall
|
||||
width: 30 * DefaultStyle.dp
|
||||
sourceSize.width: 30 * DefaultStyle.dp
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
Button {
|
||||
background: Item {}
|
||||
icon.source: AppIcons.newCall
|
||||
Layout.preferredWidth: 28 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 28 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
console.debug("[CallPage]User: create new call")
|
||||
listStackView.push(newCallItem)
|
||||
|
|
@ -249,21 +246,16 @@ AbstractMainPage {
|
|||
// Item {
|
||||
// Layout.fillWidth: true
|
||||
// }
|
||||
Control.Button {
|
||||
implicitWidth: 24 * DefaultStyle.dp
|
||||
implicitHeight: 24 * DefaultStyle.dp
|
||||
Button {
|
||||
Layout.rightMargin: 5 * DefaultStyle.dp
|
||||
padding: 0
|
||||
property var callObj
|
||||
background: Item {
|
||||
visible: false
|
||||
}
|
||||
contentItem: Image {
|
||||
source: AppIcons.phone
|
||||
width: 24 * DefaultStyle.dp
|
||||
sourceSize.width: 24 * DefaultStyle.dp
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
icon.source: AppIcons.phone
|
||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
var addr = UtilsCpp.generateLinphoneSipAddress(modelData.core.remoteAddress)
|
||||
callObj = UtilsCpp.createCall(addr)
|
||||
|
|
@ -293,6 +285,7 @@ AbstractMainPage {
|
|||
positionViewAtIndex(currentIndex, ListView.Visible)
|
||||
mainItem.selectedRowHistoryGui = model.getAt(currentIndex)
|
||||
}
|
||||
onCountChanged: mainItem.selectedRowHistoryGui = model.getAt(currentIndex)
|
||||
onVisibleChanged: {
|
||||
if (!visible) currentIndex = -1
|
||||
}
|
||||
|
|
@ -324,12 +317,12 @@ AbstractMainPage {
|
|||
RowLayout {
|
||||
Layout.leftMargin: listStackView.sideMargin
|
||||
Layout.rightMargin: listStackView.sideMargin
|
||||
Control.Button {
|
||||
Button {
|
||||
background: Item {
|
||||
}
|
||||
contentItem: Image {
|
||||
source: AppIcons.returnArrow
|
||||
}
|
||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||
icon.source: AppIcons.returnArrow
|
||||
onClicked: {
|
||||
console.debug("[CallPage]User: return to call history")
|
||||
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 {
|
||||
id: iconLabel
|
||||
property string text
|
||||
|
|
|
|||
|
|
@ -72,17 +72,14 @@ AbstractMainPage {
|
|||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Control.Button {
|
||||
|
||||
Button {
|
||||
background: Item {
|
||||
visible: false
|
||||
}
|
||||
contentItem: Image {
|
||||
source: AppIcons.plusCircle
|
||||
width: 30 * DefaultStyle.dp
|
||||
sourceSize.width: 30 * DefaultStyle.dp
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
icon.source: AppIcons.plusCircle
|
||||
Layout.preferredWidth: 30 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||
width: 30 * DefaultStyle.dp
|
||||
height: 30 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
mainItem.createContact("", "")
|
||||
}
|
||||
|
|
@ -93,12 +90,6 @@ AbstractMainPage {
|
|||
Layout.topMargin: 30 * DefaultStyle.dp
|
||||
Layout.leftMargin: leftPanel.sideMargin
|
||||
enabled: mainItem.leftPanelEnabled
|
||||
Button {
|
||||
onClicked: {
|
||||
favoriteList.currentIndex = -1
|
||||
contactList.currentIndex = -1
|
||||
}
|
||||
}
|
||||
SearchBar {
|
||||
id: searchBar
|
||||
Layout.rightMargin: leftPanel.sideMargin
|
||||
|
|
@ -162,9 +153,9 @@ AbstractMainPage {
|
|||
}
|
||||
Button {
|
||||
background: Item{}
|
||||
contentItem: Image {
|
||||
source: favoriteList.visible ? AppIcons.upArrow : AppIcons.downArrow
|
||||
}
|
||||
icon.source: favoriteList.visible ? AppIcons.upArrow : AppIcons.downArrow
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
onClicked: favoriteList.visible = !favoriteList.visible
|
||||
}
|
||||
}
|
||||
|
|
@ -211,9 +202,9 @@ AbstractMainPage {
|
|||
}
|
||||
Button {
|
||||
background: Item{}
|
||||
contentItem: Image {
|
||||
source: contactList.visible ? AppIcons.upArrow : AppIcons.downArrow
|
||||
}
|
||||
icon.source: favoriteList.visible ? AppIcons.upArrow : AppIcons.downArrow
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
onClicked: contactList.visible = !contactList.visible
|
||||
}
|
||||
}
|
||||
|
|
@ -269,11 +260,8 @@ AbstractMainPage {
|
|||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
background: Item{}
|
||||
contentItem: Image {
|
||||
anchors.fill: parent
|
||||
source: AppIcons.pencil
|
||||
}
|
||||
onClicked: mainItem.editContact(mainItem.selectedContact)
|
||||
icon.source: AppIcons.pencil
|
||||
}
|
||||
detailContent: ColumnLayout {
|
||||
Layout.fillWidth: false
|
||||
|
|
@ -319,7 +307,6 @@ AbstractMainPage {
|
|||
Layout.fillWidth: true
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
// TODO change with domain
|
||||
text: modelData.label
|
||||
font {
|
||||
pixelSize: 13 * DefaultStyle.dp
|
||||
|
|
@ -343,12 +330,9 @@ AbstractMainPage {
|
|||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||
property var callObj
|
||||
contentItem: Image {
|
||||
anchors.fill: parent
|
||||
source: AppIcons.phone
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
}
|
||||
icon.source: AppIcons.phone
|
||||
width: 24 * DefaultStyle.dp
|
||||
height: 24 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
callObj = UtilsCpp.createCall(modelData.address)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue