I realise this is a long post but I hope at least someone will find the time to read and offer suggestions...
When writing a new User Interface plugin which involves looping around selected books or looping around files within a book container (or both) I have a decision to make. Should I:
- Code it in the main QDialog as simple python for x in y: do_something.
Easiest to code but may tie up calibre when running if each do_something is lengthy.
- Code a standard QProgressDialog to loop around the do_something.
Not too difficult to code. Ties up calibre when running but has the benefit of a Cancel button if the user gets impatient.
- Code a QProgressDialog to set up a queue of thread jobs of do_something to run in the background.
Quite challenging to code (for me, at least. I've only done it once.) Has the benefit of running in the background, but a potential headache of dealing with what to do if the user changes something whilst the do_somethings are running.
Can anyone offer any general advice on how to go about deciding which option to choose?