summaryrefslogtreecommitdiff
path: root/SDL_Core/src/components/qt_hmi/References/Look/Widgets/MenuListItemWidget.qml
blob: 48b3bff4a668ada8070256849be5398e880e781d (plain)
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
40
41
42
43
44
45
46
47
48
// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
import QtQuick 2.0
import com.ford.hmiframework 1.0
import "../Widgets"
import "../WidgetLayouts"

FWidget {
    id: w
    height: 50

    layout: TGListItemLayout {
        id: l
        anchors.fill: parent
        ax_bitmap: ""
        cx_text: menuText
        activeMarker_visible: false
        indentLevel: level
    }

    FViewUseCaseSimple {
        condition: isEnabled == false
        PropertyChanges { target: l
            opacity: 0.5
        }
    }

    FViewUseCaseGroup {
        FViewUseCase {
            condition: menuType == FMenuElement.Popup
            PropertyChanges { target: l
                ax_bitmap: "../Resources/g137p.png"
            }
        }

        FViewUseCase {
            condition: menuType == FMenuElement.Submenu
            PropertyChanges { target: l
                ax_bitmap: "../Resources/g136p.png"
            }
        }
    }

    triggers: [
        FTrgTouchArea { touchArea: l.touch; touchAction: TA.In
            FActScriptCall { onScript: w.ListView.view.model.selectElement(index) }
        }
    ]
}