#include <treeview.h>
The TreeView is a tab widget for the three QTreeViews visualizing dependents, dependencies and both. Inherits QWidget.
TreeView::TreeView |
( |
QWidget * |
parent = 0 | ) |
|
Contructor for the TreeView
- Parameters
-
parent | Parent widget for the TreeView, default null |
int TreeView::column_index |
( |
QString |
str | ) |
|
Fetches the index in the model (ie. the column number) of a named column from the model. name The name / title of the column.
- Returns
- The index if successfull, -1 otherwise.
void TreeView::contract_item_in_graph |
( |
std::string |
item_name, |
|
|
bool |
last |
|
) |
| |
|
signal |
Signal for contracting an item in the graph (opposite to expand).
- Parameters
-
item_name | Name of the item |
last | True if last item to be expanded for batch processing, false if not |
void TreeView::deselect_all_rows_in_treeview |
( |
| ) |
|
Deselect all current selected rows in the TreeViews
void TreeView::exclude_item_in_graph |
( |
std::string |
item_name, |
|
|
bool |
last |
|
) |
| |
|
signal |
Signal for excluding a specific item in the graph
- Parameters
-
item_name | Name of the item |
exclude | True if the last item to be excluded, false if not |
void TreeView::expand_item_in_graph |
( |
std::string |
item_name, |
|
|
bool |
last |
|
) |
| |
|
signal |
Signal for expanding a specific item in the graph
- Parameters
-
item_name | Name of the item |
last | True if last item to be expanded, false if not |
void TreeView::expand_row |
( |
QModelIndex |
item | ) |
|
|
slot |
Slot for expanding a row belonging to a specific item
- Parameters
-
item | Index of the item to expand |
void TreeView::focus_item_in_graph |
( |
std::string |
item_name | ) |
|
|
signal |
Signal for focusing a specific item in the graph
- Parameters
-
item_name | Name of the item |
void TreeView::item_action |
( |
QAction * |
action | ) |
|
|
slot |
Slot for performing the action ordered by the user through the right click menu
- Parameters
-
action | The action to be performed |
void TreeView::item_selected_in_treeview |
( |
std::string |
item_name, |
|
|
bool |
first, |
|
|
bool |
multiple |
|
) |
| |
|
signal |
Signal for selecting a specific item in the graph
- Parameters
-
item_name | Name of the item |
selected | True if first item to be selected, false if not |
void TreeView::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
slot |
Slot for registering shift/control down for extended/multi selection
- Parameters
-
void TreeView::keyReleaseEvent |
( |
QKeyEvent * |
event | ) |
|
|
slot |
Slot for registering shift/control release for extended/multi selection
- Parameters
-
QSortFilterProxyModel * TreeView::model_both |
( |
| ) |
|
Get the model containing dependencies and dependents
- Returns
- Model containing dependencies and dependents
QSortFilterProxyModel * TreeView::model_dependencies |
( |
| ) |
|
Get the dependencies only model
- Returns
- Dependencies only model
QSortFilterProxyModel * TreeView::model_dependents |
( |
| ) |
|
Get the dependents only model
- Returns
- Dependents only model
void TreeView::mouseEvent |
( |
QModelIndex |
item | ) |
|
|
slot |
Slot for registering mouse clicks on items in the tree view
- Parameters
-
item | Item that was clicked |
void TreeView::onCustomContextMenu |
( |
const QPoint & |
point | ) |
|
|
slot |
Creates the right click menu inside the TreeView
- Parameters
-
point | The point where the right click occurred |
void TreeView::resize_columns_to_fit |
( |
| ) |
|
Resizes all columns in all tree views so that they fit the content.
void TreeView::select_row_in_treeview |
( |
std::string |
item, |
|
|
bool |
last |
|
) |
| |
Method for selecting a specific item(row) in the TreeView. If multiple selections are to be made then the boolean last will be set to true or false
- Parameters
-
item | Name of the item to be selected |
last | True if this item is the last, false if not |
void TreeView::setModel |
( |
QSortFilterProxyModel * |
new_model_dependents, |
|
|
QSortFilterProxyModel * |
new_model_depenencies, |
|
|
QSortFilterProxyModel * |
new_model_both, |
|
|
std::string |
root_name |
|
) |
| |
Set the models to be used for the TreeView. The name of the root item in the graph is needed to display incoming and outgoing dependencies properly. If the root item(focused node) is "*" as it is when there is a run-block search or a search for "*" then the tree view will display nodes as if there is no root.
- Parameters
-
new_model_dependents | Model consisting of only dependents for the corresponding QTreeView |
new_model_dependencies | Model consisting of only dependencies for the corresponding QTreeView |
new_model_both | Model containing dependencies and dependents for the corresponding QTreeView |
root_name | name of the focused node |
std::vector< QTreeView * > TreeView::tree_views |
( |
| ) |
|
Accessor for the internal treeView widgets. This graph has multiple treeviews in tabs.
void TreeView::treeview_column_action |
( |
QAction * |
action | ) |
|
|
slot |
Slot for enabling/disabling disabled/enabled columns in the treeviews
- Parameters
-
action | QAction containing the name of the column to adjust |
The documentation for this class was generated from the following files: