class QDataMatrix(QtWidgets.QWidget): """ desc: QDataMatrix is the main widget for viewing DataMatrix objects. """ cellchanged = QtCore.Signal(int, int) changed = QtCore.Signal() def __init__(self, dm, parent=None): """ desc: Constructor to initialize a QDataMatrix object. arguments: dm: type: `DataMatrix` keywords: parent: desc: A parent QWidget, or None for no parent. type: [QWidget, None] """ QtWidgets.QWidget.__init__(self, parent=parent) self._dm = dm self._dm.sorted = False self._spreadsheet = QSpreadSheet(self) self._layout = QtWidgets.QHBoxLayout(self) self._layout.addWidget(self._spreadsheet) self._layout.setContentsMargins(0,0,0,0) self.refresh() @property def dm(self): return self._dm @dm.setter def dm(self, dm): self._dm = dm def refresh(self): """ desc: Refresh the widget to reflect changes in the associated `DataMatrix`. """ self._spreadsheet.refresh()
class QDataMatrix(QtWidgets.QWidget): """ desc: QDataMatrix is the main widget for viewing DataMatrix objects. """ cellchanged = QtCore.Signal(int, int) changed = QtCore.Signal() def __init__(self, dm, parent=None): """ desc: Constructor to initialize a QDataMatrix object. arguments: dm: type: `DataMatrix` keywords: parent: desc: A parent QWidget, or None for no parent. type: [QWidget, None] """ QtWidgets.QWidget.__init__(self, parent=parent) self._dm = dm self._spreadsheet = QSpreadSheet(self) self._layout = QtWidgets.QHBoxLayout(self) self._layout.addWidget(self._spreadsheet) self._layout.setContentsMargins(0,0,0,0) self.refresh() @property def dm(self): return self._dm @dm.setter def dm(self, dm): self._dm = dm def refresh(self): """ desc: Refresh the widget to reflect changes in the associated `DataMatrix`. """ self._spreadsheet.refresh()
def __init__(self, dm, parent=None): """ desc: Constructor to initialize a QDataMatrix object. arguments: dm: type: `DataMatrix` keywords: parent: desc: A parent QWidget, or None for no parent. type: [QWidget, None] """ QtWidgets.QWidget.__init__(self, parent=parent) self._dm = dm self._spreadsheet = QSpreadSheet(self) self._layout = QtWidgets.QHBoxLayout(self) self._layout.addWidget(self._spreadsheet) self._layout.setContentsMargins(0, 0, 0, 0) self.refresh()
def __init__(self, dm, parent=None): """ desc: Constructor to initialize a QDataMatrix object. arguments: dm: type: `DataMatrix` keywords: parent: desc: A parent QWidget, or None for no parent. type: [QWidget, None] """ QtWidgets.QWidget.__init__(self, parent=parent) self._dm = dm self._spreadsheet = QSpreadSheet(self) self._layout = QtWidgets.QHBoxLayout(self) self._layout.addWidget(self._spreadsheet) self._layout.setContentsMargins(0,0,0,0) self.refresh()