Wolfmyths/Myth-Mod-Manager

[Refactor] Redesigning how threaded classes are handled

Closed this issue · 1 comments

I'm fairly happy with how most of the code in the project is designed, but there is a "middle-man" issue I created with the QThreaded classes, more specifically, fileMover.py

These threaded classes are used in conjunction with QDialog widgets to show the progress of the threaded task to the user, like how fileMover.py uses progressWidget.py to display it's progress in it's task.

The biggest problem is that fileMover.py has different modes (that point to different functions within the class), and to choose that mode you need to input an argument in it's constructor function. And I have it setup so you need to also put the same mode argument in progressWidget.py's constructor so it passes it to fileMover.py.

Another issue that I have, more than one widget that is exactly like progressWidget.py. I would like to create a base class to streamline the process of creating these progress widget dialog boxes.

Recap:

  • The relationship between fileMover.py and progressWidget.py is very messy when it comes to passing arguments
  • There are too many other widgets that are similar to progressWidget.py without inheriting from a base class
    • The other Threaded class is update.py with newUpdateQDialog.py and in update 1.2.0 there will be more.

Because of the way I designed these classes, this might sound confusing so don't be afraid to ask any questions if you're interested on working on this.

Fixed in latest version