-
Notifications
You must be signed in to change notification settings - Fork 4
Feature/ui improvements #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Rewrite the application splash widget to use QSettings to track/display recent projects. Also simplified much of the splash screen logic. Refactor create_project_dialog sigProjectCreated signal signature.
Rename splash.py dialog to RecentProjectDialog, the project loading screen will no longer be shown by default (before the MainWindow), instead it will be displayed only if no recent projects is defined (based on user local settings). Enhanced utility script to find/load projects from a directory location. The 'load_project_from_path' function will now iterate any JSON file in the specified path, and check for a _type property, which is then used to select the appropriate Project class to load the file.
Add simple splash screen (with placeholder image) which displays on launch. Change application window display ordering, the old 'splash' dialog (now RecentProjectsDialog) is not displayed unless there is no saved project for the user in their local settings, and it is spawned from the MainWindow (just before the MainWindow is set to visible) Application settings (QSettings) methods and classes moved into their own module (gui/settings.py), while some of the objects are re-exported via gui/__init__.
Add QSettings integration to MainWindow, window state/geometry is now loaded/saved on open/exit. Update MainWindow compatibility with new RecentProjectsDialog. Allow MainWindow to be instantiated without defining a root project. Projects are added to the window via the add_project method. Add ability for user to open project in a new window (if there is already a project in the base MainWindow) via dialog input. Refactor new_project_dialog/open_project_dialog methods of MainWindow to uniformly use the open_project method instead of using custom inner functions. Add 'Recent Projects' sub-menu to the File menu, allowing users to directly open up other recent projects once the MainWindow is loaded. Add signal to project tree-model to notify when a project is closed via the tree view.
Use new icons from material design library (Apache 2 License), uniform icon theme across application. Update Icons enumeration, add method to automatically create new QIcon instance.
Refactor Icon Enumeration to reduce duplicated path definitions; Icon.icon() method now constructs the Qt Resource path, using the Enum value as the name/alias. The prefix can be overridden in cases where the icon comes from a separate QRC prefix.
Rename channel_select_widget -> channel_control_widgets Complete re-write of what was ChannelSelectWidget to ChannelController. The ChannelController widget now takes ownership of a supplied plotter, and handles all user interaction (adding/removing/updating plot lines).
Merge QSettings state features into current UI working branch.
DataSets are now directly associated with their own independent tab (instead of relying on the selected flights 'active child') Rewrite and refactor workspace tab handling to support multiple different 'workspaces' for different objects, e.g. DataSets, Flights, and Projects. Each controller object can have its own display tab class, enabling us to present different workspaces depending on the context. For example each DataSet can be opened in its own tab, allowing the user to view/modify independent datasets from the same flight concurrently. In future the idea will be to add controller specific features to the tabs, the flight tab for example should have the ability to display a map with an overlay of the flights path.
Add launcher action to help menu to load DGP documentation on read-the-docs. Add simple about dialog to the help menu.
Enable linking (referencing) of Gravimeters to a DataSet/Controller Add simple ComboBox dialog action on DataSetController to allow linking Refactor add_flight_dialog to remove references to sensor linkage, as flights do not directly associate with a sensor any longer. Fix Dataset controller sensor linking behavior. Change logo on recent project dialog.
Implemented a simple state save/load mechanism utilizing QSettings enabling the application to automatically load/plot whichever channels were active in the plot when the tab or application was closed. This will pave the way for a standard interface for all workspace tabs to implement similar persistent state tracking mechanisms.
Move WorkspaceTab into workspaces/bases.py Add SubTab base class for nested tabs in the workspace. Define basic interface for saving/restoring persistent state of tabs Refactor project_treemodel to simplify item_activated logic
Refactor ChannelController so that series may be added after initialization. Add logic to Dataset SegmentSelectTab to use a QThread to load the dataset's DataFrame, making the launching of tabs more responsive.
Add toolbar action to LSP toolbar to toggle the visibility of data segment selections on the plot.
Fix documentation build errors due to refactored sources
dgp/gui/settings.py
Outdated
yield self.model.item(i).data(RefRole) | ||
|
||
def last_project_path(self) -> MaybePath: | ||
path = Path(self._settings.value(SettingsKey.LastProjectPath(), None)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path
doesn't take None
as an argument. Testing without any prior projects raises an exception.
Also, a couple of issues that came up in QA testing:
|
When I minimize the windows (in Mac OSX), and then maximize, then the project tree side bar is toggled off closed. I can bring it back with the toggle button on top. Not sure if this is an issue in Windows. |
Also, I can't seem to get the fields from the gravity data to appear in channels boxes on the right of the plots. The issue appears also to happen for trajectory, but at some point the lat, lon, and height fields did appear, though I don't recall what series of actions I made for that to happen. |
Re-order splash screen finish trigger and main window visibility so that the splash screen correctly disappears when the UI controls have loaded.
…tion Datafile uid property will now return None when there is no underlying datafile (i.e. we have a placeholder controller). Project model signal signature changed to permit None values as uid. main.py _tab_open_requested updated to ignore requests where UID is None. This may (should) be changed in future to remove the confusion of having 'empty' DataFileControllers. Perhaps by introducing a new type of QStandardItem subclass to be used as a placeholder, which can be replaced by a complete DFC when the data has been loaded. Fix invalid attempt to construct a pathlib.Path object from a None value in settings.py. Will now correctly check that the retrieved path is not None before constructing a Path object, which otherwise results in a TypeError.
Unsure of the root cause of this issue, but it occurs on Linux/Windows/OSX all the same. Using the toggleViewAction() method of QDockWidget to construct the QAction seems to fix the issue where the DockWidget is hidden after the Main Window has been minimized then restored.
Hey Chris, thanks for doing some QC and reviewing! I've pushed up a change set which should resolve the Path issue in settings.py, the exception caused by trying to activate/double-click empty DataFiles, and the issue where the project tree/dock is being hidden after minimizing the window. Also the splash screen visibility issue should have been resolved. The issue you point out where the DataSet name is not being updated in the import dialog, and the issue where you're not seeing the data channels appear are sort of related I think.
Both of these issues are sort of related, in that there needs to be some sort of communication between the controllers and 1. any clones that they have, and 2. any UI items such as Tabs that their state has changed. |
UI Improvements Branch
The UI Improvements branch addresses various quality-of-life improvements in the user interface.
Related Issues
Closes #82