GUI refactoring: diminished cyclic include dependence in View

For training purpose I started refactoring from View part. It already had distinct hierarchy on dependency graph, but there still existed triangle Edit <--> Tool <--> PropertyEditor

The changes are following:

  1. Whole folder GUI/View/Edit merged to GUI/View/Common. GUI/View/Edit had DoubleSpinBox and DoubleLineEdit. These classes that are just changed Qt classes should lie with other simple "bricks" and be accessible for any class in View folder. That is why the GUI/View/Common folder is the right place.

  2. ScientificSpinBox and CustomEventFilters are also simple Qt derivatives that should be accessible everywhere in View. So they were also moved from GUI/View/PropertyEditor to GUI/View/Common.

  3. ScientificSpinBox now inherits QDoubleSpinbox instead of QAbstractSpinbox. In fact, it was anyway intended for "double" values but there was necessity to explicitly overload some configuration functions for both QDoubleSpinbox and ScientificSpinBox.

Dependency graphs:

There are still mutual dependencies Common<-->Tool and Job<-->Main.

DoubleSpinBox from Common uses configuration method from Tool at creation. This looks tolerable.

Job and Main should see each other for showing progress bar and automatically refocus when simulation is finished. This is also looks OK.

Before Was.svg

After Now.svg

Edited by Mikhail Svechnikov

Merge request reports

Loading