18 import Ubuntu.Components 0.1
21 import
"../Components"
29 property ListModel searchHistory: SearchHistoryModel {}
30 property bool searchable: !dashContent.previewOpen && !scopeItem.previewOpen
32 property string showScopeOnLoaded:
"clickscope"
33 property real contentScale: 1.0
35 function setCurrentScope(scopeId, animate, reset) {
36 var scopeIndex = filteredScopes.findFirst(Scopes.RoleId, scopeId)
38 if (scopeIndex == -1) {
39 console.warn(
"No match for scope with id: %1".arg(scopeId))
45 dashContent.closePreview();
47 if (scopeIndex == dashContent.currentIndex && !reset) {
52 dashContent.setCurrentScopeAtIndex(scopeIndex, animate, reset)
55 function closeOverlayScope() {
56 if (dashContent.x != 0) {
61 SortFilterProxyModel {
66 dynamicSortFilter:
true
68 filterRole: Scopes.RoleVisible
69 filterRegExp: RegExp(
"^true$")
74 objectName:
"dashContent"
79 searchHistory: dash.searchHistory
82 dash.setCurrentScope(scopeId,
true,
false);
85 scopeItem.scope = scope;
89 if (scopeId == dash.showScopeOnLoaded) {
90 dash.setCurrentScope(scopeId,
false,
false)
91 dash.showScopeOnLoaded =
""
94 scale: dash.contentScale
95 clip: scale != 1.0 || scopeItem.visible
97 UbuntuNumberAnimation {
99 if (!running && dashContent.x == 0) {
100 dashContent.closeScope(scopeItem.scope);
101 scopeItem.scope = null;
110 anchors.left: dashContent.right
112 height: parent.height
113 searchHistory: dash.searchHistory
114 scale: dash.contentScale
116 visible: scope != null
122 console.log(
"gotoScope from an openScope scope is not implemented");
126 console.log(
"openScope from an openScope scope is not implemented");