Changeset View
Changeset View
Standalone View
Standalone View
discover/qml/SourcesPage.qml
Show All 15 Lines | 11 | DiscoverPage { | |||
---|---|---|---|---|---|
16 | 16 | | |||
17 | Kirigami.Theme.inherit: false | 17 | Kirigami.Theme.inherit: false | ||
18 | Kirigami.Theme.colorSet: Kirigami.Theme.View | 18 | Kirigami.Theme.colorSet: Kirigami.Theme.View | ||
19 | 19 | | |||
20 | background: Rectangle { | 20 | background: Rectangle { | ||
21 | color: Kirigami.Theme.backgroundColor | 21 | color: Kirigami.Theme.backgroundColor | ||
22 | } | 22 | } | ||
23 | 23 | | |||
24 | header: QQC2.ToolBar { | 24 | contextualActions: [ | ||
25 | Kirigami.Theme.inherit: false | 25 | KirigamiActionBridge { action: app.action("help_contents") }, | ||
26 | Kirigami.Theme.colorSet: Kirigami.Theme.Window | 26 | KirigamiActionBridge { action: app.action("help_about_app") }, | ||
27 | anchors { | 27 | KirigamiActionBridge { action: app.action("help_report_bug") } | ||
28 | right: parent.right | 28 | ] | ||
29 | left: parent.left | | |||
30 | } | | |||
31 | | ||||
32 | contentItem: RowLayout { | | |||
33 | anchors { | | |||
34 | topMargin: Kirigami.Units.smallSpacing | | |||
35 | bottomMargin: Kirigami.Units.smallSpacing | | |||
36 | } | | |||
37 | | ||||
38 | Item { | | |||
39 | Layout.fillWidth: true | | |||
40 | } | | |||
41 | | ||||
42 | ToolButton { | | |||
43 | action: refreshAction | | |||
44 | } | | |||
45 | | ||||
46 | ToolButton { | | |||
47 | text: i18n("Help...") | | |||
48 | menu: Menu { | | |||
49 | MenuItem { action: ActionBridge { action: app.action("help_contents") } } | | |||
50 | MenuItem { action: ActionBridge { action: app.action("help_about_app") } } | | |||
51 | MenuItem { action: ActionBridge { action: app.action("help_report_bug") } } | | |||
52 | } | | |||
53 | } | | |||
54 | } | | |||
55 | } | | |||
56 | 29 | | |||
57 | mainItem: ListView { | 30 | mainItem: ListView { | ||
58 | id: sourcesView | 31 | id: sourcesView | ||
59 | model: QSortFilterProxyModel { | 32 | model: QSortFilterProxyModel { | ||
60 | filterRegExp: new RegExp(page.search, 'i') | 33 | filterRegExp: new RegExp(page.search, 'i') | ||
61 | sortRole: SourcesModelClass.SourceNameRole | 34 | sortRole: SourcesModelClass.SourceNameRole | ||
62 | sourceModel: SourcesModel | 35 | sourceModel: SourcesModel | ||
63 | } | 36 | } | ||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 78 | menu: Menu { | |||
125 | } | 98 | } | ||
126 | 99 | | |||
127 | Instantiator { | 100 | Instantiator { | ||
128 | id: backendActionsInst | 101 | id: backendActionsInst | ||
129 | model: ActionsModel { | 102 | model: ActionsModel { | ||
130 | actions: backendItem.backend ? backendItem.backend.actions : undefined | 103 | actions: backendItem.backend ? backendItem.backend.actions : undefined | ||
131 | } | 104 | } | ||
132 | delegate: MenuItem { | 105 | delegate: MenuItem { | ||
133 | action: ActionBridge { action: modelData } | 106 | action: ActionBridge { action: modelData.action } | ||
134 | } | 107 | } | ||
135 | onObjectAdded: { | 108 | onObjectAdded: { | ||
136 | settingsMenu.insertItem(index, object) | 109 | settingsMenu.insertItem(index, object) | ||
137 | } | 110 | } | ||
138 | onObjectRemoved: { | 111 | onObjectRemoved: { | ||
139 | object.destroy() | 112 | object.destroy() | ||
140 | } | 113 | } | ||
141 | } | 114 | } | ||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |