Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Mobile
Commits
8570cee0
Commit
8570cee0
authored
Apr 02, 2012
by
Lamarque Souza
Browse files
Add busy indicator to ViewSearch.qml to indicate ongoing search.
CCBUG: 296958 (cherry picked from commit
29301f97
)
parent
f1ee2173
Changes
6
Hide whitespace changes
Inline
Side-by-side
applications/filebrowser/package/contents/ui/Browser.qml
View file @
8570cee0
...
...
@@ -161,6 +161,7 @@ PlasmaComponents.Page {
onSearchQueryChanged
:
{
metadataModel
.
extraParameters
[
"
nfo:fileName
"
]
=
searchBox
.
searchQuery
busy
=
(
searchBox
.
searchQuery
.
length
>
0
)
}
}
}
...
...
@@ -182,6 +183,7 @@ PlasmaComponents.Page {
Connections
{
target
:
metadataModel
onModelReset
:
selectedModel
.
clear
()
onCountChanged
:
{
searchBox
.
restartBusyTimer
()
}
}
//This pinch area is for selection
...
...
applications/imageviewer/package/contents/ui/Browser.qml
View file @
8570cee0
...
...
@@ -92,10 +92,16 @@ PlasmaComponents.Page {
}
onSearchQueryChanged
:
{
metadataModel
.
extraParameters
[
"
nfo:fileName
"
]
=
searchBox
.
searchQuery
busy
=
(
searchBox
.
searchQuery
.
length
>
0
)
}
}
}
Connections
{
target
:
metadataModel
onCountChanged
:
{
searchBox
.
restartBusyTimer
()
}
}
MobileComponents.IconGrid
{
id
:
resultsGrid
anchors.fill
:
parent
...
...
applications/videoplayer/package/contents/ui/Toolbar.qml
View file @
8570cee0
...
...
@@ -79,6 +79,11 @@ PlasmaCore.FrameSvgItem {
}
onSearchQueryChanged
:
{
filterModel
.
filterRegExp
=
"
.*
"
+
searchBox
.
searchQuery
+
"
.*
"
busy
=
(
searchBox
.
searchQuery
.
length
>
0
)
}
Connections
{
target
:
filterModel
onCountChanged
:
{
searchBox
.
restartBusyTimer
()
}
}
opacity
:
viewer
.
scale
==
1
?
0
:
1
Behavior
on
opacity
{
...
...
components/mobilecomponents/ViewSearch.qml
View file @
8570cee0
...
...
@@ -29,6 +29,7 @@ Item {
property
string
searchQuery
property
int
delay
:
100
property
bool
busy
:
false
onSearchQueryChanged
:
{
searchField
.
text
=
searchQuery
...
...
@@ -47,6 +48,28 @@ Item {
onTextChanged
:
searchTimer
.
restart
()
}
PlasmaComponents.BusyIndicator
{
anchors.verticalCenter
:
searchField
.
verticalCenter
anchors.right
:
searchField
.
right
anchors.rightMargin
:
searchFieldContainer
.
height
height
:
searchField
.
height
width
:
searchField
.
height
visible
:
searchFieldContainer
.
busy
running
:
searchFieldContainer
.
busy
}
function
restartBusyTimer
()
{
busyTimer
.
restart
()
}
Timer
{
id
:
busyTimer
repeat
:
false
interval
:
1000
running
:
false
onTriggered
:
{
searchFieldContainer
.
busy
=
false
}
}
Timer
{
id
:
searchTimer
interval
:
delay
...
...
qmlpackages/launcher/contents/ui/main.qml
View file @
8570cee0
...
...
@@ -86,6 +86,7 @@ MouseArea {
RunnerModels.RunnerModel
{
id
:
runnerModel
runners
:
[
"
services
"
,
"
nepomuksearch
"
,
"
recentdocuments
"
,
"
desktopsessions
"
,
"
PowerDevil
"
,
"
calculator
"
]
onCountChanged
:
{
searchField
.
restartBusyTimer
()
}
}
MobileComponents.ViewSearch
{
...
...
@@ -104,9 +105,11 @@ MouseArea {
appGrid
.
model
=
null
appGrid
.
model
=
appsModel
runnerModel
.
query
=
""
busy
=
false
}
else
{
appGrid
.
model
=
runnerModel
runnerModel
.
query
=
searchQuery
busy
=
true
}
}
...
...
shell/widgetsexplorer/package/contents/ui/view.qml
View file @
8570cee0
...
...
@@ -131,6 +131,9 @@ MobileComponents.Sheet {
onSearchQueryChanged
:
{
if
(
stack
.
depth
==
1
&&
searchQuery
.
length
>
3
)
{
stack
.
push
(
globalSearchComponent
)
busy
=
true
}
else
{
busy
=
false
}
}
},
...
...
@@ -161,6 +164,7 @@ MobileComponents.Sheet {
stack
.
pop
()
}
}
onCountChanged
:
{
searchField
.
restartBusyTimer
()
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment