diff options
Diffstat (limited to 'src/gui/qml')
-rw-r--r-- | src/gui/qml/TextImageButton.qml | 59 | ||||
-rw-r--r-- | src/gui/qml/incoming_call.qml | 62 | ||||
-rw-r--r-- | src/gui/qml/qml.qrc | 2 |
3 files changed, 123 insertions, 0 deletions
diff --git a/src/gui/qml/TextImageButton.qml b/src/gui/qml/TextImageButton.qml new file mode 100644 index 0000000..3630029 --- /dev/null +++ b/src/gui/qml/TextImageButton.qml @@ -0,0 +1,59 @@ +import QtQuick 1.1 + +Rectangle { + id: backgroundRect + width: 150 + height: 30 + radius: 0 + + property alias image: img.source + property alias text: text.text + property alias color: backgroundRect.color + signal clicked + + color: "red" + z: 2 + + Image { + id: img + width: height + anchors.top: parent.top + anchors.topMargin: 2 + anchors.bottom: parent.bottom + anchors.bottomMargin: 2 + anchors.left: parent.left + anchors.leftMargin: 5 + smooth: true + source: "qrc:/qtquickplugin/images/template_image.png" + } + + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: parent.clicked() + } + + Text { + id: text + text: "Button text" + font.bold: true + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + anchors.right: parent.right + anchors.rightMargin: 0 + anchors.left: img.right + anchors.leftMargin: 5 + anchors.top: parent.top + anchors.topMargin: 0 + anchors.bottom: parent.bottom + anchors.bottomMargin: 0 + color: "white" + font.pixelSize: 12 + } + + states: State { + name: "pressed"; when: mouseArea.pressed + PropertyChanges { target: backgroundRect; color: Qt.darker(color) } + } +} + diff --git a/src/gui/qml/incoming_call.qml b/src/gui/qml/incoming_call.qml new file mode 100644 index 0000000..bdcb161 --- /dev/null +++ b/src/gui/qml/incoming_call.qml @@ -0,0 +1,62 @@ +import QtQuick 1.1 + +Rectangle { + id: rectangle1 + width: 400 + height: 70 + 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 + } + + Text { + id: callerText + objectName: "callerText" + height: 22 + color: "#ffffff" + text: "... calling" + anchors.top: parent.top + anchors.topMargin: 8 + anchors.left: image1.right + anchors.leftMargin: 9 + anchors.right: parent.right + anchors.rightMargin: 10 + font.pixelSize: 19 + } + + TextImageButton { + id: buttonAnswer + objectName: "buttonAnswer" + x: 74 + y: 36 + width: 120 + height: 26 + color: "#00aa00" + radius: 7 + text: qsTr("Answer") + image: "qrc:/icons/images/popup_incoming_answer.png" + } + + TextImageButton { + id: buttonReject + objectName: "buttonReject" + y: 36 + width: 120 + height: 26 + radius: 7 + text: qsTr("Reject") + anchors.left: buttonAnswer.right + anchors.leftMargin: 15 + image: "qrc:/icons/images/popup_incoming_reject.png" + } +} + diff --git a/src/gui/qml/qml.qrc b/src/gui/qml/qml.qrc index 95e8f77..87c5184 100644 --- a/src/gui/qml/qml.qrc +++ b/src/gui/qml/qml.qrc @@ -2,5 +2,7 @@ <qresource prefix="/qml"> <file>ImageButton.qml</file> <file>osd.qml</file> + <file>TextImageButton.qml</file> + <file>incoming_call.qml</file> </qresource> </RCC> |