summaryrefslogtreecommitdiffstats
path: root/src/gui/qml/osd.qml
blob: cfbf85e22a9d1143b0332354c091f42274b2e508 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import QtQuick 1.1

Rectangle {
    id: rectangle1
    width: 310
    height: 55
    color: "black"

    Image {
        id: image1
        anchors.bottom: parent.bottom
        anchors.bottomMargin: 5
        anchors.top: parent.top
        anchors.topMargin: 5
        anchors.left: parent.left
        anchors.leftMargin: 5
        source: "qrc:/icons/images/twinkle48.png"
        width: height
    }

    ImageButton {
        id: hangup
        objectName: "hangup"
        x: 262
        anchors.bottom: parent.bottom
        anchors.bottomMargin: 15
        anchors.top: parent.top
        anchors.topMargin: 15
        anchors.right: parent.right
        anchors.rightMargin: 10
        width: height
        image: "qrc:/icons/images/osd_hangup.png"
    }

    ImageButton {
        id: mute
        objectName: "mute"
        x: 222
        width: height
        image: "qrc:/icons/images/osd_mic_on.png"
        anchors.bottomMargin: 15
        anchors.topMargin: 15
        anchors.top: parent.top
        anchors.bottom: parent.bottom
        anchors.rightMargin: 14
        anchors.right: hangup.left
    }

    Text {
        id: callerName
        objectName: "callerName"
        x: 56
        y: 5
        width: 158
        height: 21
        text: "Caller name"
        clip: true
        verticalAlignment: Text.AlignVCenter
        font.bold: true
        font.pixelSize: 12
        color: "white"
    }

    Text {
        id: callTime
        objectName: "callTime"
        x: 56
        y: 27
        width: 158
        height: 20
        text: "Time"
        clip: true
        verticalAlignment: Text.AlignVCenter
        font.pixelSize: 12
        color: "white"
    }

    MouseArea {
        anchors.fill: parent
        property variant previousPosition
        onPressed: {
            previousPosition = Qt.point(mouseX, mouseY)
        }
        onPositionChanged: {
            if (pressedButtons == Qt.LeftButton) {
                var dx = mouseX - previousPosition.x
                var dy = mouseY - previousPosition.y
                viewerWidget.pos = Qt.point(viewerWidget.pos.x + dx,
                                            viewerWidget.pos.y + dy)
            }
        }
    }
}