Implementation of GUI based on PyQt5 and PyOpenGL #896
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implementing the PyQt5 GUI
Hello, I have completed a development for initial version implementation of a
PyQt5 GUI
idea which I spoke of in #421 three days ago. In the GUI, there is a widget includes a circular shape which is created byPyOpenGL
draw. And the GUI works like an audio visualizer but not all the way. A tracer function trace thesay
method, and works with respect to this method. Whenever thesay
method is called, the circular shape animate, so it looks like Jarvis speaks.And a screenshot from the GUI is shown below which is run with
python --with-gui --with-voice
.Important Points
I had to change the logical order in the
start
function which is inside of themain.py
file. The reason for this, a PyQt5 application must run in main thread according to docs. (https://doc.qt.io/qt-5/thread-basics.html#gui-thread-and-worker-thread)That's why the
PyQt5 GUI
application lives in main thread and theJarvis CLI
runs on another thread in the same processwith the
PyQt5 GUI
.On the other hand, in the
custom_circle_widget.py
file, there is an inheritance from QOpenGLWidget. That is why I could not change the some of method names (initializeGL
andpaintGL
) which violate thePEP 8
naming convention.I hope, you like the my idea on GUI. :)
Note: For right now, there are some docs are missing, but in the future developments I will add those.