summaryrefslogtreecommitdiffstats
path: root/src/gui/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/qml')
-rw-r--r--src/gui/qml/ImageButton.qml28
-rw-r--r--src/gui/qml/osd.qml94
-rw-r--r--src/gui/qml/qml.qrc6
3 files changed, 128 insertions, 0 deletions
diff --git a/src/gui/qml/ImageButton.qml b/src/gui/qml/ImageButton.qml
new file mode 100644
index 0000000..3d76fa7
--- /dev/null
+++ b/src/gui/qml/ImageButton.qml
@@ -0,0 +1,28 @@
+import QtQuick 1.1
+
+Rectangle {
+
+ property alias image: img.source
+ signal clicked
+
+ color: "transparent"
+ z: 2
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: parent.clicked()
+ }
+
+ Image {
+ id: img
+ smooth: true
+ anchors.fill: parent
+ }
+
+ states: State {
+ name: "pressed"; when: mouseArea.pressed
+ PropertyChanges { target: img; anchors.topMargin: 2; anchors.bottomMargin: -2 }
+ }
+}
+
diff --git a/src/gui/qml/osd.qml b/src/gui/qml/osd.qml
new file mode 100644
index 0000000..cfbf85e
--- /dev/null
+++ b/src/gui/qml/osd.qml
@@ -0,0 +1,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)
+ }
+ }
+ }
+}
+
diff --git a/src/gui/qml/qml.qrc b/src/gui/qml/qml.qrc
new file mode 100644
index 0000000..95e8f77
--- /dev/null
+++ b/src/gui/qml/qml.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/qml">
+ <file>ImageButton.qml</file>
+ <file>osd.qml</file>
+ </qresource>
+</RCC>