-
Notifications
You must be signed in to change notification settings - Fork 88
Views Widget
The Views Widget provides an overview of all existing views in a tree like manner. From within the widget, new views can be created and old ones can be (re)opened in the Graph View, duplicated, have their name changed, searched, and deleted. Directories can be created to provide a structure, especially if there is a large number of views to be managed.

There are three widget components to be discussed in detail: The tree of views in the center, the toolbar at the top and the context menu when right clicking a tree item.
There are two types of items in the tree: views and directories. Views correspond to existing graph views which are either stacked as tabs in the Graph-Views widget or stored invisible in the background. Thus a view can kept to be reopened at any time without waiting for time consuming rendering. For each view an icon, its name, ID, and creation time is shown. Each column of the tree has an interactive header allowing to have the tree branches sort in ascending or descending order.
The tree structure is provided by directories which can be nested at any level. The use of directories helps to have a large number of views organized. It is also helpful when dealing with views which are only used temporarily since a directory with all its content can be deleted at once. When deleting a non-empty directory a warning message will pop up that this action cannot be undone.
There a three types of icons:
- Directory icons for directories
- Module icons for views that are linked to a module. The view name gets generated from module name and module ID (not to be confused with the view ID). If new gates are added to the module they will be added to the view as well. When the module gets deleted the view will be disposed as well.
- View icons for all views that are not linked to a module. This icon is also been used in the case that the user "breaks" the link between view and module, e.g. by adding gates to the view which are not part of the module.
The toolbar on the top of the widget facilitates the actions Create New Directory (1), Create New View (2), Open View (3), Duplicate View (4), Rename Item (5), Delete Item (6) and Search View (7) which are described in more detail below. When clicking on one of the buttons, the respective action is applied to the view currently selected within the table.

Toolbar options 1 through 6 are also available by context menu when right clicking on a view item (see screenshot). For a directory the actions Create New View (2), Create New Directory (1), Rename Item (5), and Delete Item (6) can be triggered from context menu.

Overall, the view manager widget provides access to all the actions listed below. Some of them are available through the toolbar or the context menu, while others can only be accessed by operating on the table itself.
Creates a directory entry to organize views in a tree structure. The created directory is the default location when creating new views. Directories can be nested to any level.
Creates a new view containing the folded top module of the current design. The view is automatically added to the table and a new tab showing that view is opened in the graph view.
Opens the selected view in the graph view. If a tab showing that view is already open in the graph view, that tab receives focus. Otherwise, a new tab showing the selected view is added to the Graph View.
Duplicates the currently selected view. The new view added to the table and a tab showing that view is opened in the graph view.
Opens a prompt to change the name of the currently selected item (directory or view). Names must be unique, hence the user is responsible for choosing a name accordingly.
Deletes the selected item (directory or view). If a view gets deleted it will also be removed from the Graph View. While views and empty directories deleted accidentally can be restored by undo button the deletion of a directory containing views cannot be undone.
To find a specific view, a filter can be applied to the table. Pressing the shortcut CTRL + F while the widget is focused or left-clicking the magnifying glass in the toolbar of the widget toggles the search bar. As a result, only views matching the text in the search bar are shown in the table. The views can be filtered by name, ID, or timestamp. The filter is only active when the searchbar is visible. The magnifying glass in the toolbar changes to a green color to indicate that the filter is active.
By default, the views are filled in the tree by time of creation. Views created earlier are shown at the the top of the table. The order of Items in the table can be changed by drag'n drop. Most user interfaces indicate which drop is allowed (green +) and which drop is refused (red circle, e.g. you cannot drop a view on a view). Blame your operating system or window manager if this indicator is missing.
The views in the directory branches can also be sorted by any column in ascending or descending order. To do so left click the appropriate header entry. A 'v' or '^' sign following the header label will indicate that sorting has been activated for this column. Note that Qt5 tree view interface does not offer a simple way to go back to the unsorted tree where you can directly influence the sort order by drag'n drop. Once we migrate to Qt6 this option will be available as well.