class EventTemplateWidget(QtGui.QWidget): commandIssued = QtCore.pyqtSignal(QtGui.QUndoCommand) criticalCommandIssued = QtCore.pyqtSignal() def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.layout = QtGui.QVBoxLayout(self) self.core_widget = widget_core.EventTemplateWidget(self) self.layout.addWidget(self.core_widget) self.core_widget.commandIssued.connect(self.emitCommand) self.core_widget.criticalCommandIssued.connect(self.emitCriticalCommand) self.appointment_widget = AppointmentsListWidget(self) self.layout.addWidget(self.appointment_widget) self.appointment_widget.commandIssued.connect(self.emitCommand) self.appointment_widget.criticalCommandIssued.connect(self.emitCriticalCommand) @QtCore.pyqtSlot(QtCore.QObject) def setEvent(self, item): self.core_widget.setEvent(item) self.appointment_widget.setEvent(item) @QtCore.pyqtSlot(QtGui.QUndoCommand) def emitCommand(self, command): self.commandIssued.emit(command) @QtCore.pyqtSlot() def emitCriticalCommand(self): self.criticalCommandIssued.emit()
def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.layout = QtGui.QVBoxLayout(self) self.core_widget = widget_core.EventTemplateWidget(self) self.layout.addWidget(self.core_widget) self.core_widget.commandIssued.connect(self.emitCommand) self.core_widget.criticalCommandIssued.connect(self.emitCriticalCommand) self.appointment_widget = AppointmentsListWidget(self) self.layout.addWidget(self.appointment_widget) self.appointment_widget.commandIssued.connect(self.emitCommand) self.appointment_widget.criticalCommandIssued.connect(self.emitCriticalCommand)