Blurs UI while processing

Before the processing of a query starts, it will blur the UI.

This gives feedback to the user that something is happening, and is
simple to implement because I am too lazy to move the processing in
a separate thread.
This commit is contained in:
Salvo 'LtWorf' Tomaselli 2015-12-21 00:54:05 +01:00
parent c8c894bb7b
commit 239e0e58dd
2 changed files with 33 additions and 23 deletions

View File

@ -1,6 +1,7 @@
2.2
- Added again make install target
- Ctrl+C in the terminal will terminate the GUI
- Blurs UI while processing
2.1
- Introduced sessions; GUI loads the same relations of the previous time

View File

@ -133,6 +133,12 @@ class relForm(QtWidgets.QMainWindow):
self.showRelation(self.selectedRelation)
def execute(self):
blur = QtWidgets.QGraphicsBlurEffect()
self.setGraphicsEffect(blur)
QtCore.QCoreApplication.processEvents()
try:
'''Executes the query'''
if self.multiline:
return self._run_multiline()
@ -161,6 +167,9 @@ class relForm(QtWidgets.QMainWindow):
self.qcounter += 1
# Sets the result relation name to none
self.ui.txtResult.setText(u"_last%d" % self.qcounter)
finally:
blur.setBlurRadius(0)
def showRelation(self, rel):
'''Shows the selected relation into the table'''