Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
UW-Glance
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eva Schiffer
UW-Glance
Commits
09541329
Commit
09541329
authored
3 years ago
by
Eva Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
using a wait cursor when doing potentially slow things in the gui
parent
82276bea
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyglance/glance/gui_view.py
+35
-5
35 additions, 5 deletions
pyglance/glance/gui_view.py
with
35 additions
and
5 deletions
pyglance/glance/gui_view.py
+
35
−
5
View file @
09541329
...
...
@@ -540,10 +540,16 @@ class GlanceGUIView (QWidget) :
if
(
tempFilePath
is
not
None
)
and
(
len
(
tempFilePath
)
>
0
)
:
self
.
lastFilePath
=
os
.
path
.
dirname
(
str
(
tempFilePath
))
# turn on the wait cursor, in case this takes a long time
self
.
setCursor
(
Qt
.
WaitCursor
)
# let our listeners know that the user picked a file
for
listener
in
self
.
userUpdateListeners
:
listener
.
newFileSelected
(
file_prefix
,
tempFilePath
)
# now that we're done, put the cursor back to an arrow
self
.
setCursor
(
Qt
.
ArrowCursor
)
def
reportVariableSelected
(
self
,
file_prefix
=
None
)
:
"""
...
...
@@ -803,10 +809,16 @@ class GlanceGUIView (QWidget) :
# make sure the focus isn't in a line-edit box
self
.
statsButton
.
setFocus
()
# turn on the wait cursor, in case this takes a long time
self
.
setCursor
(
Qt
.
WaitCursor
)
# now report to our listeners that the user wants stats
for
listener
in
self
.
userUpdateListeners
:
listener
.
userRequestsStats
()
# now that we're done, put the cursor back to an arrow
self
.
setCursor
(
Qt
.
ArrowCursor
)
def
reportDisplayRawDataClicked
(
self
)
:
"""
...
...
@@ -815,22 +827,34 @@ class GlanceGUIView (QWidget) :
# make sure the focus isn't in a line-edit box
self
.
rawDataButton
.
setFocus
()
# turn on the wait cursor, in case this takes a long time
self
.
setCursor
(
Qt
.
WaitCursor
)
for
listener
in
self
.
userUpdateListeners
:
listener
.
userRequestsRawData
()
# now that we're done, put the cursor back to an arrow
self
.
setCursor
(
Qt
.
ArrowCursor
)
def
reportDisplayPlotClicked
(
self
)
:
"""
the user clicked the
display
plot button
the user clicked the
create
plot button
"""
# first we need to clean up focus in case it's in one of the line-edit boxes
self
.
displayButton
.
setFocus
()
# turn on the wait cursor, in case this takes a long time
self
.
setCursor
(
Qt
.
WaitCursor
)
# now report to our listeners that the user wants a plot
for
listener
in
self
.
userUpdateListeners
:
listener
.
userRequestsPlot
()
# now that we're done, put the cursor back to an arrow
self
.
setCursor
(
Qt
.
ArrowCursor
)
def
reportDisplayGlobalAttrsClicked
(
self
):
"""
the user clicked the show global attributes button
...
...
@@ -839,9 +863,15 @@ class GlanceGUIView (QWidget) :
# make sure the focus isn't in a line-edit box
self
.
gAttrsButton
.
setFocus
()
# turn on the wait cursor, in case this takes a long time
self
.
setCursor
(
Qt
.
WaitCursor
)
for
listener
in
self
.
userUpdateListeners
:
listener
.
userRequestsGlobalAttrs
()
# now that we're done, put the cursor back to an arrow
self
.
setCursor
(
Qt
.
ArrowCursor
)
def
_extra_number_validation
(
self
,
string_that_should_be_a_number
)
:
"""
try to validate the string that should be a number
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment