Advanced Search Dialog

Inheritance diagram of advancedsearchdialog
class AdvancedSearchDialog(parent, root)[source]

A dialog for advanced searching, notifying ImportDialog when search parameters have been chosen and entered. Uses the observer design pattern to notify ImportDialog when the ranges have been changed from an invalid state to valid.

Parameters:
  • parent – The class to attach the observer to
  • root – The base widget for Toplevel
free()[source]

Notify base class window has been destroyed.

parse_ranges()[source]

Command for the search button, upon the user clicking the search button this function will perform a number of regex parsing to ensure all fields contain valid numbers, then sets the observers range dictionary to the valid fields and destroys AdvancedSearchDialog. If any fields are invalid, an error will be displayed and the function will return, keeping the window open and allowing the user to fix their error.

class Query[source]

Observer object that holds a ranges dictionary which can be used to query the database once updated. Notifies it’s parent upon ranges being changed