spinetoolbox.spine_db_editor.widgets.pivot_table_header_view

Contains custom QHeaderView for the pivot table.

Module Contents

Classes

PivotTableHeaderView

Header view for the pivot table.

ParameterValuePivotHeaderView

Header view for the pivot table in parameter value and index expansion mode.

ScenarioAlternativePivotHeaderView

Header view for the pivot table in parameter value and index expansion mode.

class spinetoolbox.spine_db_editor.widgets.pivot_table_header_view.PivotTableHeaderView(orientation, area, pivot_table_view)[source]

Bases: PySide6.QtWidgets.QHeaderView

Header view for the pivot table.

Parameters
  • orientation (Qt.Orientation) – Qt.Orientation.Horizontal or Qt.Orientation.Vertical

  • area (str) – which pivot area the header represents: “columns”, “rows” or “frozen”

  • pivot_table_view (PivotTableView) – parent view

property area[source]
header_dropped[source]
dragEnterEvent(event)[source]
dragMoveEvent(event)[source]
dropEvent(event)[source]
class spinetoolbox.spine_db_editor.widgets.pivot_table_header_view.ParameterValuePivotHeaderView(orientation, area, pivot_table_view)[source]

Bases: PivotTableHeaderView

Header view for the pivot table in parameter value and index expansion mode.

Parameters
  • orientation (Qt.Orientation) – Qt.Orientation.Horizontal or Qt.Orientation.Vertical

  • area (str) – which pivot area the header represents: “columns”, “rows” or “frozen”

  • pivot_table_view (PivotTableView) – parent view

_column_selection()[source]

Lists current column’s indexes that contain some data.

Returns

column indexes

Return type

list of QModelIndex

_add_column_to_plot(action)[source]

Adds a single column to existing plot window.

_plot_column()[source]

Plots a single column not the selection.

_column_indexes(column)[source]

Makes indexes for given column.

Parameters

column (int) – column

Returns

column indexes

Return type

list of QModelIndex

_set_x_flag()[source]

Sets the X flag for a column.

contextMenuEvent(event)[source]

Shows context menu.

Parameters

event (QContextMenuEvent) –

class spinetoolbox.spine_db_editor.widgets.pivot_table_header_view.ScenarioAlternativePivotHeaderView(orientation, area, pivot_table_view)[source]

Bases: PivotTableHeaderView

Header view for the pivot table in parameter value and index expansion mode.

Parameters
  • orientation (Qt.Orientation) – Qt.Orientation.Horizontal or Qt.Orientation.Vertical

  • area (str) – which pivot area the header represents: “columns”, “rows” or “frozen”

  • pivot_table_view (PivotTableView) – parent view

context_menu_requested[source]

Requests a header context menu be shown at given global position.

contextMenuEvent(event)[source]