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.

checked_items_to_locations()

Connect items -> locations tabs.

checked_items_to_orders()

Connect items -> orders tabs.

checked_locations_to_items()

Connect locations -> items tabs.

checked_locations_to_orders()

Connect locations -> orders tabs.

checked_orders_to_items()

Connect orders -> items tabs.

checked_orders_to_locations()

Connect orders -> locations tabs.

get_selected()

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_heatmap()

Switch heat-map display state.

switch_view()

Switch 2D - 3D model and update selection.

Attributes

agent_manager

drawModeChanged

is_heatmap

itemSelected

item_model

location_model

map

model

model2D

model3D

modelChanged

onto_manager

order_model

plugin_manager

progressChanged

progress_value

sideviewChanged

sideview_model

staticMetaObject

Full Description

agent_manager = <PySide2.QtCore.Property object>
checked_items_to_locations()[source]

Connect items -> locations tabs.

checked_items_to_orders()[source]

Connect items -> orders tabs.

checked_locations_to_items()[source]

Connect locations -> items tabs.

checked_locations_to_orders()[source]

Connect locations -> orders tabs.

checked_orders_to_items()[source]

Connect orders -> items tabs.

checked_orders_to_locations()[source]

Connect orders -> locations tabs.

drawModeChanged = <PySide2.QtCore.Signal object>
get_selected()[source]

Get list of indexes of selected locations inside the map.

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], …]

hover_item(idx)[source]

Hover location on the map - displaying statistics in sideview.

is2D()[source]

Select between 2D and 3D view.

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_all(select)[source]

Select/unselect all locations from the tab list in the map.

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

set_progress_value(val)[source]

Set progress bar value.

sideviewChanged = <PySide2.QtCore.Signal object>
sideview_model = <PySide2.QtCore.Property object>
staticMetaObject = <PySide2.QtCore.QMetaObject object>
switch_heatmap()[source]

Switch heat-map display state.

switch_view()[source]

Switch 2D - 3D model and update selection.