Changeset View
Changeset View
Standalone View
Standalone View
applets/kickoff/package/contents/ui/SearchView.qml
Show All 16 Lines | 1 | /* | |||
---|---|---|---|---|---|
17 | with this program; if not, write to the Free Software Foundation, Inc., | 17 | with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | 19 | */ | ||
20 | import QtQuick 2.0 | 20 | import QtQuick 2.0 | ||
21 | import org.kde.plasma.core 2.0 as PlasmaCore | 21 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
22 | import org.kde.plasma.extras 2.0 as PlasmaExtras | 22 | import org.kde.plasma.extras 2.0 as PlasmaExtras | ||
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | 23 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
24 | 24 | | |||
25 | import org.kde.plasma.private.kicker 0.1 as Kicker | ||||
26 | | ||||
25 | Item { | 27 | Item { | ||
26 | id: searchViewContainer | 28 | id: searchViewContainer | ||
27 | 29 | | |||
28 | anchors.fill: parent | 30 | anchors.fill: parent | ||
29 | 31 | | |||
30 | objectName: "SearchView" | 32 | objectName: "SearchView" | ||
31 | 33 | | |||
32 | function decrementCurrentIndex() { | 34 | function decrementCurrentIndex() { | ||
33 | searchView.decrementCurrentIndex(); | 35 | searchView.decrementCurrentIndex(); | ||
34 | } | 36 | } | ||
35 | 37 | | |||
36 | function incrementCurrentIndex() { | 38 | function incrementCurrentIndex() { | ||
37 | searchView.incrementCurrentIndex(); | 39 | searchView.incrementCurrentIndex(); | ||
38 | } | 40 | } | ||
39 | 41 | | |||
40 | function activateCurrentIndex() { | 42 | function activateCurrentIndex() { | ||
41 | searchView.currentItem.activate(); | 43 | searchView.currentItem.activate(); | ||
42 | } | 44 | } | ||
43 | 45 | | |||
44 | function openContextMenu() { | 46 | function openContextMenu() { | ||
45 | searchView.currentItem.openActionMenu(); | 47 | searchView.currentItem.openActionMenu(); | ||
46 | } | 48 | } | ||
47 | 49 | | |||
50 | Kicker.RunnerModel { | ||||
51 | id: runnerModel | ||||
52 | | ||||
53 | appletInterface: plasmoid | ||||
54 | | ||||
55 | runners: { | ||||
56 | var runners = ["services", "places", "desktopsessions", | ||||
57 | "PowerDevil"]; | ||||
58 | | ||||
59 | if (plasmoid.configuration.useExtraRunners) { | ||||
60 | runners = runners.concat(plasmoid.configuration.runners); | ||||
61 | } | ||||
62 | return runners; | ||||
63 | } | ||||
64 | mergeResults: true | ||||
65 | | ||||
66 | favoritesModel: globalFavorites | ||||
67 | } | ||||
68 | | ||||
48 | PlasmaExtras.ScrollArea { | 69 | PlasmaExtras.ScrollArea { | ||
49 | anchors.fill: parent | 70 | anchors.fill: parent | ||
50 | 71 | | |||
51 | ListView { | 72 | ListView { | ||
52 | id: searchView | 73 | id: searchView | ||
53 | 74 | | |||
54 | anchors.fill: parent | 75 | anchors.fill: parent | ||
55 | keyNavigationWraps: true | 76 | keyNavigationWraps: true | ||
Show All 33 Lines |