diff --git a/pyglance/glance/gui_view.py b/pyglance/glance/gui_view.py index 53979be2ce8bca823d6d2a38a969b6b2e36e37c8..bbe9d1e4ca73e5908ae156ea1eeb604d50a9767d 100644 --- a/pyglance/glance/gui_view.py +++ b/pyglance/glance/gui_view.py @@ -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