spinetoolbox.widgets.custom_qtreeview

Classes for custom QTreeView.

author:
  1. Marin (KTH)
date:

25.4.2018

Module Contents

Classes

CopyTreeView Custom QTreeView class with copy support.
ReferencesTreeView Custom QTreeView class for ‘References’ in Data Connection properties.
DataTreeView Custom QTreeView class for ‘Data’ in Data Connection properties.
SourcesTreeView Custom QTreeView class for ‘Sources’ in Tool specification editor widget.
CustomTreeView Custom QTreeView class for Tool specification editor form to enable keyPressEvent.
class spinetoolbox.widgets.custom_qtreeview.CopyTreeView(parent)[source]

Bases: PySide2.QtWidgets.QTreeView

Custom QTreeView class with copy support.

Initialize the view.

copy(self)[source]

Copy current selection to clipboard in excel format.

class spinetoolbox.widgets.custom_qtreeview.ReferencesTreeView(parent)[source]

Bases: PySide2.QtWidgets.QTreeView

Custom QTreeView class for ‘References’ in Data Connection properties.

parent

The parent of this view

Type:QWidget

Initialize the view.

files_dropped[source]
del_key_pressed[source]
dragEnterEvent(self, event)[source]

Accept file drops from the filesystem.

dragMoveEvent(self, event)[source]

Accept event.

dropEvent(self, event)[source]

Emit files_dropped signal with a list of files for each dropped url.

keyPressEvent(self, event)[source]

Overridden method to make the view support deleting items with a delete key.

class spinetoolbox.widgets.custom_qtreeview.DataTreeView(parent)[source]

Bases: PySide2.QtWidgets.QTreeView

Custom QTreeView class for ‘Data’ in Data Connection properties.

parent

The parent of this view

Type:QWidget

Initialize the view.

files_dropped[source]
del_key_pressed[source]
dragEnterEvent(self, event)[source]

Accept file drops from the filesystem.

dragMoveEvent(self, event)[source]

Accept event.

dropEvent(self, event)[source]

Emit files_dropped signal with a list of files for each dropped url.

mousePressEvent(self, event)[source]

Register drag start position.

mouseMoveEvent(self, event)[source]

Start dragging action if needed.

mouseReleaseEvent(self, event)[source]

Forget drag start position

keyPressEvent(self, event)[source]

Overridden method to make the view support deleting items with a delete key.

class spinetoolbox.widgets.custom_qtreeview.SourcesTreeView(parent)[source]

Bases: PySide2.QtWidgets.QTreeView

Custom QTreeView class for ‘Sources’ in Tool specification editor widget.

parent

The parent of this view

Type:QWidget

Initialize the view.

files_dropped[source]
del_key_pressed[source]
dragEnterEvent(self, event)[source]

Accept file and folder drops from the filesystem.

dragMoveEvent(self, event)[source]

Accept event.

dropEvent(self, event)[source]

Emit files_dropped signal with a list of files for each dropped url.

keyPressEvent(self, event)[source]

Overridden method to make the view support deleting items with a delete key.

class spinetoolbox.widgets.custom_qtreeview.CustomTreeView(parent)[source]

Bases: PySide2.QtWidgets.QTreeView

Custom QTreeView class for Tool specification editor form to enable keyPressEvent.

parent

The parent of this view

Type:QWidget

Initialize the view.

del_key_pressed[source]
keyPressEvent(self, event)[source]

Overridden method to make the view support deleting items with a delete key.