2012-02-11 00:58:30 +01:00
|
|
|
// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
|
|
|
|
import QtQuick 1.1
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: container
|
|
|
|
width: 100
|
|
|
|
height: 62
|
|
|
|
|
|
|
|
signal clicked(string url)
|
|
|
|
|
|
|
|
Text {
|
|
|
|
id: header
|
2013-01-03 13:59:06 +01:00
|
|
|
text: qsTr("OpenPilot Websites")
|
2012-02-11 00:58:30 +01:00
|
|
|
width: parent.width
|
2012-02-25 08:22:08 +01:00
|
|
|
color: "#44515c"
|
2012-02-11 00:58:30 +01:00
|
|
|
font {
|
|
|
|
pointSize: 14
|
|
|
|
weight: Font.Bold
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ListModel {
|
|
|
|
id: sitesModel
|
2013-10-13 23:38:09 +02:00
|
|
|
ListElement { title: "Home"; link: "http://www.openpilot.org" }
|
|
|
|
ListElement { title: "Wiki"; link: "http://wiki.openpilot.org" }
|
|
|
|
ListElement { title: "Store"; link: "http://www.openpilot.org/hardware/get-hardware/" }
|
|
|
|
ListElement { title: "Forums"; link: "http://forums.openpilot.org" }
|
|
|
|
ListElement { title: "Code Reviews"; link: "http://git.openpilot.org" }
|
|
|
|
ListElement { title: "Progress Tracker"; link: "http://progress.openpilot.org" }
|
2012-02-11 00:58:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
id: view
|
2013-10-13 23:38:09 +02:00
|
|
|
width: 839
|
|
|
|
anchors.topMargin: 30
|
|
|
|
anchors { top: parent.top; bottom: parent.bottom }
|
|
|
|
orientation: ListView.Horizontal
|
2012-02-11 00:58:30 +01:00
|
|
|
model: sitesModel
|
2013-10-13 23:38:09 +02:00
|
|
|
spacing: 80
|
2012-02-11 00:58:30 +01:00
|
|
|
|
|
|
|
delegate: Text {
|
|
|
|
text: title
|
|
|
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
|
|
|
font {
|
|
|
|
pointSize: 12
|
|
|
|
weight: Font.Bold
|
|
|
|
}
|
|
|
|
|
2012-02-25 08:22:08 +01:00
|
|
|
color: mouseArea.containsMouse ? "#224d81" : "black"
|
2012-02-11 00:58:30 +01:00
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: mouseArea
|
|
|
|
anchors.fill: parent
|
|
|
|
hoverEnabled: true
|
|
|
|
onClicked: {
|
|
|
|
console.log(link)
|
|
|
|
container.clicked(link)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|