virtual_warehouse.view_controller.ViewController¶
- class ViewController(parent=None)[source]¶
Bases:
PySide2.QtCore.QObject
Main controller which communicates with QML GUI and controls all components.
Initialize view controller which connects all app components.
- INIT DESCRIPTION
Methods
__init__
([parent])Initialize view controller which connects all app components.
Connect items -> locations tabs.
Connect items -> orders tabs.
Connect locations -> items tabs.
Connect locations -> orders tabs.
Connect orders -> items tabs.
Connect orders -> locations tabs.
Get list of indexes of selected locations inside the map.
get_sheets
(file_path)Get names of sheets inside the file and expected type.
hover_item
(idx)Hover location on the map - displaying statistics in sideview.
is2D
()Select between 2D and 3D view.
load
(file_path, types)Load excel file with corresponding sheet types.
save_ontology
(file_path)Save ontology in RDF/XML format.
select_all
(select)Select/unselect all locations from the tab list in the map.
select_location
(selected, checked)Select location index of location checked/unchecked in tab list.
select_map_location
(idx[, control])Update selected location from map (CTRL adds location).
select_onto_objects
(is_class, name, base_class)Check custom class/query instances in side bar.
set_progress_value
(val)Set progress bar value.
Switch heat-map display state.
Switch 2D - 3D model and update selection.
Attributes
Full Description
- agent_manager = <PySide2.QtCore.Property object>¶
- drawModeChanged = <PySide2.QtCore.Signal object>¶
- get_sheets(file_path)[source]¶
Get names of sheets inside the file and expected type.
- Parameters
file_path (QUrl) – file url
- Returns
list[tuple[str, str]] – list containing lists [[name, type_name], …]
- is_heatmap = <PySide2.QtCore.Property object>¶
- itemSelected = <PySide2.QtCore.Signal object>¶
- item_model = <PySide2.QtCore.Property object>¶
- load(file_path, types)[source]¶
Load excel file with corresponding sheet types.
- Parameters
file_path (QUrl) – file url object
types (list[dict[str, str]]) – list of dictionaries, each containing keys “name”: name of the sheet, “type”: name of the type. There are 6 types (“None”, “Locations”, “Coordinates”, “Items”, “Inventory”, “Orders”)
- location_model = <PySide2.QtCore.Property object>¶
- map = <PySide2.QtCore.Property object>¶
- model = <PySide2.QtCore.Property object>¶
- model2D = <PySide2.QtCore.Property object>¶
- model3D = <PySide2.QtCore.Property object>¶
- modelChanged = <PySide2.QtCore.Signal object>¶
- onto_manager = <PySide2.QtCore.Property object>¶
- order_model = <PySide2.QtCore.Property object>¶
- plugin_manager = <PySide2.QtCore.Property object>¶
- progressChanged = <PySide2.QtCore.Signal object>¶
- progress_value = <PySide2.QtCore.Property object>¶
- save_ontology(file_path)[source]¶
Save ontology in RDF/XML format.
- Parameters
file_path (QUrl) – file url object
- select_location(selected, checked)[source]¶
Select location index of location checked/unchecked in tab list.
- Parameters
selected (str) – name of selected location
checked (bool) – check state, if true add location, remove otherwise
- select_map_location(idx, control=False)[source]¶
Update selected location from map (CTRL adds location).
- select_onto_objects(is_class, name, base_class, clear=True)[source]¶
Check custom class/query instances in side bar.
- Parameters
is_class (bool) – True if class, False if query
name (str) – name of custom class/ontology
base_class (str) – name of base classes
clear (bool) – If true, clear all previous selections
- sideviewChanged = <PySide2.QtCore.Signal object>¶
- sideview_model = <PySide2.QtCore.Property object>¶
- staticMetaObject = <PySide2.QtCore.QMetaObject object>¶