COUNTER 5 Report Tool
latest

Modules:

  • Constants module
  • Costs module
  • FetchData module
  • GeneralUtils module
  • ImportFile module
  • MainDriver module
  • ManageDB module
  • ManageVendors module
  • Search module
  • Settings module
  • Visual module
COUNTER 5 Report Tool
  • Docs »
  • Search module
  • Edit on GitHub

Search module¶

class Search.SearchController(search_ui, settings)¶

Bases: object

Controls the Search tab

Parameters
  • search_ui (Ui_search_tab) – the UI for the search_widget

  • settings (SettingsModel) – the user’s settings

add_and_clause()¶

Adds an and clause to the search

Return type

Ui_search_and_clause_parameter_frame

add_or_clause(and_clause)¶

Adds an or clause to the search

Parameters

and_clause (Ui_search_and_clause_parameter_frame) – the and clause the or clause is added to

Return type

Ui_search_or_clause_parameter_frame

export_parameters()¶

Exports the current search parameters to the selected file

get_search_parameters()¶

Reads the current search parameters from the UI

Return type

Tuple[str, int, int, Sequence[Sequence[Dict[str, Any]]]]

Returns

(report, start_year, end_year, search_parameters) a Tuple with the kind of report selected, the starting year selected, the ending year selected, and a list of the search parameters in POS form (and of ors)

hide_and_label_in_first_and_clause()¶

Hides the and label for the first and clause in the search

hide_or_label_in_first_or_clause(and_clause)¶

Hides the or label for the first or clause in an and clause

Parameters

and_clause (Ui_search_and_clause_parameter_frame) – the and clause

import_parameters()¶

Imports a new set of search parameters from the selected file

refresh_clauses()¶

Resets the search clauses

search()¶

Queries the database based on the current search parameters and saves the results to the selected file

update_settings(settings)¶

Called when the settings are saved

Parameters

settings (SettingsModel) – the new settings

Next Previous

© Copyright 2020, Adam McGuigan, Chandler Acorn, Samuel Esan, Urvesh Boodhoon, Ziheng Huang Revision 5d70a8a8.

Built with Sphinx using a theme provided by Read the Docs.