Closed bradyzp closed 6 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
dgp/gui/main.py | 77 | 78 | 98.72% | ||
dgp/gui/workspaces/PlotTab.py | 5 | 7 | 71.43% | ||
dgp/gui/workspaces/TaskTab.py | 14 | 16 | 87.5% | ||
dgp/gui/views/ProjectTreeView.py | 5 | 8 | 62.5% | ||
dgp/core/controllers/project_controllers.py | 5 | 8 | 62.5% | ||
dgp/gui/utils.py | 24 | 32 | 75.0% | ||
dgp/gui/workspace.py | 51 | 62 | 82.26% | ||
dgp/core/controllers/project_treemodel.py | 49 | 64 | 76.56% | ||
<!-- | Total: | 242 | 287 | 84.32% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
dgp/core/controllers/project_treemodel.py | 1 | 77.17% | ||
dgp/lib/etc.py | 2 | 50.33% | ||
<!-- | Total: | 3 | --> |
Totals | |
---|---|
Change from base Build 316: | 7.9% |
Covered Lines: | 2612 |
Relevant Lines: | 3559 |
Project Signalling Branch
This branch is primarily a cleanup/refactoring of the MainWindow GUI code and functionality related to interacting with Project objects/controllers.
Project Model
The ProjectTreeModel class (core/controllers/project_treemodel.py) takes on central responsibility here for delegating user interaction to the appropriate Project[Controller], allowing multiple projects to be open within a single MainWindow instance.
The ProjectTreeModel likewise provides an interface for the Project Controllers to interact with the MainWindow, without tightly coupling them. Project Controllers can request interface actions (e.g. Open/Close a Flight tab, display a progress bar) via the ProjectTreeModel, which emits these as signals for the MainWindow to connect/handle.
Following on to the above changes, the new_project_dialog/open_project_dialog functions of the MainWindow class have been re-written to work with the new project-model API. Still TODO here is the ability for the user to choose whether to open the new/existing project within the current MainWindow, or within a completely separate MainWindow instance.
Workspaces
This branch also refactors some of the gui/workspace(s) classes, greatly simplifying the BaseTab (renamed to TaskTab), with an eye towards generalizing the 'Tab Interface' away from the Flight-centric way in which it was originally written - the idea here being that in future the same basic tab interface can/will be used for Marine projects as well as Airborne.
Secondarily there is the thought that some other types of tabs may be introduced in the future, for example to allow a user to open a raw DataFrame, or Meter configuration etc as a full Tab within the MainWindow for viewing/editing.
Also some of the placeholder sub-workspace-tabs have been deleted simply to clean up the project. These will be recreated as needed when we get to that stage.
Tests
Tests have been added which cover most of the functionality in MainWindow, and the ProjectTreeModel classes.
Resolves #76