Extend treeview to combination filesystemviewer
Closes #168 (together with !260 (merged)).
Expands the left hand, 'file exploration' widget. The original QTreeView is now part of a parent widget that also holds a toolbar and an addressbar (QComboBox).
The Treeview behaviour has a couple changes:
- The default directory to expand to is now the default apparent root directory. (i.e.
MainProgram.lastLocation). - The context menu for a single directory now includes an option to set that directory as the current view root 'base directory'.
- The most recently expanded directories are now remembered as expanded by ssNake between sessions.
The toolbar has the following buttons for changing the apparant root directory of the treeview:
- Go up one directory
- Go to the previous directory ('undo')
- Go to the next directory ('redo')
- Select a directory using a system file explorer.
In addition, there's a button to collapse all expanded directories.
The addressbar drops down to the unique elements in the root directory history. It can also be edited to change the view root directory. The paths in the addressbar are also remembered between sessions. The paths can be deleted in the context menu of the dropdown.
Memory of the addressbar and the expanded directories can be (separately) turned off in Preferences.
Small fix:
- Right clicking with no item selected in the treeview will no longer open a context menu with
Load Selection.
TODO:
-
Test on Linux. -
Add icons for the toolbar.