connected basic navigation model; completed controller
This commit is contained in:
parent
8a81c48606
commit
717e131b75
10 changed files with 60 additions and 39 deletions
36
LenaPi/NavigationListDelegate.qml
Normal file
36
LenaPi/NavigationListDelegate.qml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import QtQuick 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
Rectangle{
|
||||
id: container
|
||||
|
||||
property var model
|
||||
property bool isCircle : true
|
||||
property alias imageSource: contentImage.source
|
||||
|
||||
width: 100
|
||||
height: width
|
||||
radius: isCircle ? width/2 : 0
|
||||
color: "blue"
|
||||
|
||||
Image{
|
||||
id: contentImage
|
||||
source: model ? model.pImageSource : "file:///home/ar/source/LenaPi/pics/benjamin.jpeg"
|
||||
anchors.centerIn: parent
|
||||
width: parent.width-10
|
||||
height: width
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
layer.enabled: true
|
||||
layer.effect: OpacityMask{
|
||||
maskSource: container
|
||||
}
|
||||
}
|
||||
MouseArea{
|
||||
id: controlObject
|
||||
anchors.fill: parent
|
||||
onClicked:{
|
||||
model.onClicked();
|
||||
console.log("circle clicked")
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue