Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/JobDelegate.qml
Show All 35 Lines | 28 | Column { | |||
---|---|---|---|---|---|
36 | 36 | | |||
37 | readonly property string infoMessage: getData(jobsSource.data, "infoMessage", '') | 37 | readonly property string infoMessage: getData(jobsSource.data, "infoMessage", '') | ||
38 | readonly property string labelName0: getData(jobsSource.data, "labelName0", '') | 38 | readonly property string labelName0: getData(jobsSource.data, "labelName0", '') | ||
39 | readonly property string labelName1: getData(jobsSource.data, "labelName1", '') | 39 | readonly property string labelName1: getData(jobsSource.data, "labelName1", '') | ||
40 | readonly property string label0: getData(jobsSource.data, "label0", '') | 40 | readonly property string label0: getData(jobsSource.data, "label0", '') | ||
41 | readonly property string label1: getData(jobsSource.data, "label1", '') | 41 | readonly property string label1: getData(jobsSource.data, "label1", '') | ||
42 | readonly property bool isSuspended: getData(jobsSource.data, "state", '') === "suspended" | 42 | readonly property bool isSuspended: getData(jobsSource.data, "state", '') === "suspended" | ||
43 | 43 | | |||
44 | property alias infoMessageVisible: infoLabel.visible | ||||
45 | | ||||
44 | function getData(data, name, defaultValue) { | 46 | function getData(data, name, defaultValue) { | ||
45 | var source = model.name | 47 | var source = model.name | ||
46 | return data[source] ? (data[source][name] ? data[source][name] : defaultValue) : defaultValue; | 48 | return data[source] ? (data[source][name] ? data[source][name] : defaultValue) : defaultValue; | ||
47 | } | 49 | } | ||
48 | 50 | | |||
49 | PlasmaExtras.Heading { | 51 | PlasmaExtras.Heading { | ||
50 | id: infoLabel | 52 | id: infoLabel | ||
51 | width: parent.width | 53 | width: parent.width | ||
▲ Show 20 Lines • Show All 142 Lines • Show Last 20 Lines |