napari_locan.data_model.data_model_base.DataModel#

class napari_locan.data_model.data_model_base.DataModel(datasets=None, names=None)[source]#

Bases: PyQt5.QtCore.QObject, abc.ABC

Abstract base class for container classes holding various data structures.

Variables
  • count (int) – Monotonically increasing integer counting the overall created datasets.

  • datasets_changed_signal (PyQt5.QtCore.pyqtSignal) – A Qt signal for index

  • names_changed_signal (PyQt5.QtCore.pyqtSignal) – A Qt signal for names

  • index_changed_signal (PyQt5.QtCore.pyqtSignal) – A Qt signal for index

  • datasets – Data structures

  • names – Data structure string identifier

  • index – Current selection of data structure

  • dataset – The selected data object

  • name – The selected data identifier

Methods

__init__([datasets, names])

append_item(dataset[, name, set_index])

Append a new item to the end of datasets and point index to new dataset if set_index is true.

blockSignals(self, b)

childEvent(self, a0)

children(self)

connectNotify(self, signal)

customEvent(self, a0)

deleteLater(self)

delete_all()

Delete all datasets and set index to -1.

delete_item()

Delete current dataset and set index to the previous dataset.

disconnect(-> bool)

disconnectNotify(self, signal)

dumpObjectInfo(self)

dumpObjectTree(self)

dynamicPropertyNames(self)

event(self, a0)

eventFilter(self, a0, a1)

findChild(-> QObjectT)

findChildren(...)

inherits(self, classname)

installEventFilter(self, a0)

isSignalConnected(self, signal)

isWidgetType(self)

isWindowType(self)

killTimer(self, id)

metaObject(self)

moveToThread(self, thread)

objectName(self)

parent(self)

property(self, name)

pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal.

receivers(self, signal)

removeEventFilter(self, a0)

sender(self)

senderSignalIndex(self)

setObjectName(self, name)

setParent(self, a0)

setProperty(self, name, value)

set_datasets_and_names([datasets, names])

Set datasets and names to the given values and point index to the last item.

set_index_slot(value)

QT slot for property self.index.

signalsBlocked(self)

startTimer(self, interval[, timerType])

thread(self)

timerEvent(self, a0)

tr(self, sourceText[, disambiguation, n])

Attributes

count

dataset

rtype

Optional[Any]

datasets

rtype

list[Any]

datasets_changed_signal

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

destroyed

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

index

rtype

int

index_changed_signal

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

name

rtype

str

names

rtype

list[str]

names_changed_signal

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

objectNameChanged

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

staticMetaObject

append_item(dataset, name=None, set_index=True)[source]#

Append a new item to the end of datasets and point index to new dataset if set_index is true.

Return type

None

count: int = 0#
property dataset: Optional[Any]#
Return type

Optional[Any]

property datasets: list[Any]#
Return type

list[Any]

datasets_changed_signal: PyQt5.QtCore.pyqtSignal#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type

pyqtSignal(*types, name

Type

str = …, revision

delete_all()[source]#

Delete all datasets and set index to -1.

Return type

None

delete_item()[source]#

Delete current dataset and set index to the previous dataset.

Return type

None

property index: int#
Return type

int

index_changed_signal: PyQt5.QtCore.pyqtSignal#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type

pyqtSignal(*types, name

Type

str = …, revision

property name: str#
Return type

str

property names: list[str]#
Return type

list[str]

names_changed_signal: PyQt5.QtCore.pyqtSignal#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type

pyqtSignal(*types, name

Type

str = …, revision

set_datasets_and_names(datasets=None, names=None)[source]#

Set datasets and names to the given values and point index to the last item.

Return type

None

set_index_slot(value)[source]#

QT slot for property self.index.

Return type

None