-
Notifications
You must be signed in to change notification settings - Fork 3
/
MapSearchItem.qml
39 lines (39 loc) · 1.08 KB
/
MapSearchItem.qml
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
import QtQuick 2.4
import QtLocation 5.9
import QtPositioning 5.6;
import "fontawesome"
MapQuickItem {
property string name: ""
property int index: 0
anchorPoint: Qt.point(32,32)
sourceItem: Item {
width: 64; height: 64
Text {
visible: itemArea.containsMouse
text: qsTr(name)
color: "#46a2da"
font.pixelSize: 12
horizontalAlignment: Text.AlignHCenter
}
FontAwesome{
name: "map_marker"
color: "red"
font.pixelSize: 54
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
Text {
anchors.fill: parent
text: qsTr(index.toString())
color: "#46a2da"
font.pixelSize: 24
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
}
MouseArea{
id: itemArea
anchors.fill: parent
hoverEnabled: true
}
}
}