tik_manager4.ui.mcv.subproject_mcv ================================== .. py:module:: tik_manager4.ui.mcv.subproject_mcv Classes ------- .. autoapisummary:: tik_manager4.ui.mcv.subproject_mcv.ProxyModel tik_manager4.ui.mcv.subproject_mcv.TikColumnItem tik_manager4.ui.mcv.subproject_mcv.TikSubItem tik_manager4.ui.mcv.subproject_mcv.TikSubModel tik_manager4.ui.mcv.subproject_mcv.TikSubProjectWidget tik_manager4.ui.mcv.subproject_mcv.TikSubView Module Contents --------------- .. py:class:: ProxyModel(parent=None) Bases: :py:obj:`tik_manager4.ui.mcv.filter.FilterModel` A simple filter model based on sequencematcher quick_ratio. ratio is 0-1 value for a match. Note: This is not performant, it is an example, ideally you would look into precaching or difflib.get_close_matches() for many items https://docs.python.org/3/library/difflib.html .. py:method:: filterAcceptsRow(source_row, source_parent) .. py:class:: TikColumnItem(name, overridden=False) Bases: :py:obj:`tik_manager4.ui.Qt.QtGui.QStandardItem` .. py:method:: set_overridden(value) .. py:method:: set_value(value) .. py:method:: tag_normal() .. py:method:: tag_overridden() .. py:class:: TikSubItem(sub_obj) Bases: :py:obj:`tik_manager4.ui.Qt.QtGui.QStandardItem` .. py:method:: refresh() .. py:class:: TikSubModel(structure_object) Bases: :py:obj:`tik_manager4.ui.Qt.QtGui.QStandardItemModel` .. py:method:: append_sub(sub_obj, parent) .. py:method:: find_item_by_id_column(unique_id) Search entire tree and find the matching item. .. py:method:: populate() .. py:method:: set_data(structure_object) .. py:method:: update_item(item, sub_obj) Update the item with the new subproject object .. py:class:: TikSubProjectWidget(project_obj, recursive_enabled=True, right_click_enabled=True, parent=None) Bases: :py:obj:`tik_manager4.ui.Qt.QtWidgets.QWidget` .. py:method:: get_active_subproject() Get the selected item and return the subproject object .. py:method:: manual_refresh() Refresh the layout and the view .. py:method:: refresh() Refresh the layout .. py:method:: set_purgatory_mode(value) .. py:property:: purgatory_mode .. py:class:: TikSubView(project_obj=None, right_click_enabled=True) Bases: :py:obj:`tik_manager4.ui.Qt.QtWidgets.QTreeView` .. py:method:: collect_tasks(sub_items, recursive=True, filtered=True) :staticmethod: .. py:method:: delete_sub_project(item) .. py:method:: edit(index, trigger, event) .. py:method:: edit_sub_project(item) .. py:method:: expandAll() .. py:method:: expand_first_item() Try to expand the first item in the tree .. py:method:: find_items_in_tree(root_item, text) .. py:method:: get_column_sizes() Return all column sizes in a dictionary. .. py:method:: get_expanded_state() Returns the subproject ids of the expanded items .. py:method:: get_items_count() Return the number of items in the tree under selected one .. py:method:: get_selected_items() Return the current item. .. py:method:: get_tasks(idx=None) Returns the tasks of the selected subproject .. py:method:: get_visible_columns() Returns the visible columns. .. py:method:: header_right_click_menu(position) Creates a right click menu for the header .. py:method:: hide_all_columns() Hides all columns. .. py:method:: hide_columns(columns) If the given column exists in the model, hides it .. py:method:: keyPressEvent(event) .. py:method:: keyReleaseEvent(event) .. py:method:: mousePressEvent(event) .. py:method:: mouseReleaseEvent(event) .. py:method:: new_sub_project(item) .. py:method:: new_task() .. py:method:: on_resurrect(item) .. py:method:: refresh() Re-populates the model keeping the expanded state .. py:method:: right_click_menu(position) Create a right click menu for the view. Args: position (QPoint): The position of the right click. .. py:method:: select_by_id(unique_id, append=False) Look at the id column and select the subproject item that matched the unique id. Args: unique_id (str): The unique id to search for. append (bool): Whether to append the selection or not. .. py:method:: select_first_item() Select the first item in the tree .. py:method:: selectionChanged(*args, **kwargs) .. py:method:: set_column_sizes(column_sizes) Set the column sizes from the given dictionary. .. py:method:: set_expanded_state(expanded_state) Sets the expanded state of the items by matching the subproject ids .. py:method:: set_project(project_obj) .. py:method:: set_recursive_task_scan(value) .. py:method:: show_columns(list_of_columns) Shows the given columns. .. py:method:: toggle_column(column, state) Hide/unhide the given column. .. py:method:: unhide_columns(columns) If the given column exists in the model, unhides it .. py:attribute:: add_item .. py:attribute:: item_selected