A few years ago I wrote a python command-line utility for a local community radio station. The purpose of this job was to enhance a radio-stream with metadata obtained from Google Calendar. This meant that anybody listening to the radio station on the stream would be able to read a stream of up-to-date information about what was currently playing and how many minutes it would be until the next show starts.
Mostly this script worked very well and gave good service for years.
Recently a new requirement has come to me: The users of this application want to occasionally stop, start or reload the process (e.g. because schedule information has changed). Rather than teach every member of the studio staff how to use the command-line we thought of giving this tool a simple GUI.
Since the app will be developed and run only on Ubuntu, we selected Quickly as a simple development framework. It's well documented and provides low burdens on developers getting to know the platform.
We hope that the initial design of the application will consist of a browser-like ribbon of tool buttons (start, stop, reload). A large panel containing a scrolling status message. Below that there will be a small status-bar that will give some insight into the current internal state of the program.
Being completely new to GUI programming I'm still unsure how to structure the UI: Major mysteries remain:
What kind of control should be used for the scrolling text-panel where log-messages will flow. This needs to be read-only but updated every time a log message is generated. I had planned to make a custom Python logging handler that redirects any log message to this panel - but what's the easiest way to do this?
The script I have at the moment blocks when it's not doing anything with time.sleep() - that's clearly no good for a GUI, so what's the correct behavior for a process in a GUI app that's got nothing to do for a while?
My process was originally designed to run as a single thread in a terminal. Given that I need it to run more or less as before does that mean I should consider putting the GUI stuff on a separate thread to the worker process. Are there any documented patterns for how to do this within the Quickly framework?
Moving on - is there a good way to make applications developed with Quickly run on platforms other than Ubuntu? For example can I easily adapt my application to work on any other Linux-based OS. What about something unrelated like OSX or Windows?
Thanks!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With