summaryrefslogtreecommitdiffstats
path: root/pbap/pbap.cpp
AgeCommit message (Expand)AuthorFilesLines
2018-12-27libqtappfw: pbap: add VC_PHOTO support to contactsMatt Ranostay1-6/+26
2018-09-12libqtappfw: remove deleteLater instances that aren't usedguppy_6.90.0guppy/6.90.06.90.0Matt Ranostay1-5/+5
2018-06-26pbap: add PBAP data backed ContactsModelflounder_5.99.1flounder/5.99.15.99.1Matt Porter1-5/+11
2018-06-26pbap: sort and trim contact listMatt Porter1-0/+13
2018-06-25pbap: clear the recent call list before updatingMatt Porter1-0/+2
2018-06-25Reorg binding-specific modules into subdirectoriesMatt Porter1-0/+294
e: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * Copyright (C) 2018 Konsulko Group
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import QtQuick 2.6
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import AGL.Demo.Controls 1.0
import RecentCall 1.0
import 'models'

Item {
    id: root

    function log_icon(type) {
        if (type == RecentCall.MISSED) {
            return './images/ic_call_missed_48px.svg'
        } else if (type == RecentCall.RECEIVED) {
            return './images/ic_call_received_48px.svg'
        } else if (type == RecentCall.DIALED) {
            return './images/ic_call_made_48px.svg'
        }
    }

    signal call(var cname, var cnumber)

    ListView {
        anchors.fill: parent
        anchors.margins: 100

        model: RecentCallModel

        delegate: MouseArea {
            width: ListView.view.width
            height: width / 5
            RowLayout {
                anchors.fill: parent
                spacing: 50
                Image {
                    source: log_icon(model.modelData.type)
                    Layout.preferredWidth: 150
                    Layout.preferredHeight: 150
                }
                Image {
                    source: './images/HMI_Phone_Contact_BlankPhoto.svg'
                    Layout.preferredWidth: 150
                    Layout.preferredHeight: 150
                }
                ColumnLayout {
                    Label {
                        Layout.fillWidth: true
                        color: '#59FF7F'
                        font.pixelSize: 50
                        text: model.modelData.name
                    }

                    Label {
                        Layout.fillWidth: true
                        font.pixelSize: 50
                        text: new Date(model.modelData.datetime).toLocaleString(Qt.locale(), "ddd MMM d 'at' HH':'mm")
                    }
                }
            }
            onClicked: root.call(model.modelData.name, model.modelData.number)
        }
    }
}