fosKeyMan
Loading...
Searching...
No Matches
src.frontend.tableoperator.TableOperator Class Reference

Class to handle operations on the table, such as adding or deleting rows, filtering rows based on different criteria, and handling checkbox selection (check all/uncheck all). More...

Public Member Functions

 __init__ (self, table_widget)
 Initialize the TableOperator with the table widget.
 
 add_new_row (self)
 Add a new row to the table widget.
 
 check_all_boxes (self)
 Check or uncheck all checkboxes in the first column of the table.
 
 delete_row (self)
 Delete the currently selected row from the table widget.
 
 filter_table (self, filter_inputs)
 Filter the table rows based on user input from various filter fields.
 
 reset_filter (self, filter_inputs)
 Reset the filters by clearing all input fields and showing all rows in the table.
 

Public Attributes

 table_widget = table_widget
 

Detailed Description

Class to handle operations on the table, such as adding or deleting rows, filtering rows based on different criteria, and handling checkbox selection (check all/uncheck all).

This class only make UI-level changes.

Definition at line 10 of file tableoperator.py.

Constructor & Destructor Documentation

◆ __init__()

src.frontend.tableoperator.TableOperator.__init__ ( self,
table_widget )

Initialize the TableOperator with the table widget.

Parameters
table_widget(QTableWidget): The table widget to operate on.

Definition at line 17 of file tableoperator.py.

Member Function Documentation

◆ add_new_row()

src.frontend.tableoperator.TableOperator.add_new_row ( self)

Add a new row to the table widget.

Definition at line 25 of file tableoperator.py.

◆ check_all_boxes()

src.frontend.tableoperator.TableOperator.check_all_boxes ( self)

Check or uncheck all checkboxes in the first column of the table.

If all boxes are checked, it unchecks them, otherwise, it checks all of them.

Definition at line 42 of file tableoperator.py.

◆ delete_row()

src.frontend.tableoperator.TableOperator.delete_row ( self)

Delete the currently selected row from the table widget.

Definition at line 32 of file tableoperator.py.

◆ filter_table()

src.frontend.tableoperator.TableOperator.filter_table ( self,
filter_inputs )

Filter the table rows based on user input from various filter fields.

Rows that do not match the criteria will be hidden.

Parameters
filter_inputs(dict[str, QWidget]): A dictionary mapping filter label text (also the table column header) to the corresponding input widget (QLineEdit or QComboBox).

Definition at line 65 of file tableoperator.py.

◆ reset_filter()

src.frontend.tableoperator.TableOperator.reset_filter ( self,
filter_inputs )

Reset the filters by clearing all input fields and showing all rows in the table.

Parameters
filter_inputs(dict[str, QWidget]): A dictionary mapping filter label text (also the table column header) to the corresponding input widget (QLineEdit or QComboBox).

Definition at line 143 of file tableoperator.py.

Member Data Documentation

◆ table_widget

src.frontend.tableoperator.TableOperator.table_widget = table_widget

Definition at line 23 of file tableoperator.py.


The documentation for this class was generated from the following file: