(self, data)
| 56 | # Pane widget itself. This can be any QWidget. |
| 57 | class HelloPaneWidget(QWidget, UIContextNotification): |
| 58 | def __init__(self, data): |
| 59 | global instance_id |
| 60 | QWidget.__init__(self) |
| 61 | self.actionHandler = UIActionHandler() |
| 62 | self.actionHandler.setupActionHandler(self) |
| 63 | offset_layout = QHBoxLayout() |
| 64 | offset_layout.addWidget(QLabel("Offset: ")) |
| 65 | self.offset = QLabel(hex(0)) |
| 66 | offset_layout.addWidget(self.offset) |
| 67 | offset_layout.setAlignment(QtCore.Qt.AlignCenter) |
| 68 | datatype_layout = QHBoxLayout() |
| 69 | datatype_layout.addWidget(QLabel("Data Type: ")) |
| 70 | self.datatype = QLabel("") |
| 71 | datatype_layout.addWidget(self.datatype) |
| 72 | datatype_layout.setAlignment(QtCore.Qt.AlignCenter) |
| 73 | layout = QVBoxLayout() |
| 74 | title = QLabel("Hello Pane", self) |
| 75 | title.setAlignment(QtCore.Qt.AlignCenter) |
| 76 | instance = QLabel("Instance: " + str(instance_id), self) |
| 77 | instance.setAlignment(QtCore.Qt.AlignCenter) |
| 78 | layout.addStretch() |
| 79 | layout.addWidget(title) |
| 80 | layout.addWidget(instance) |
| 81 | layout.addLayout(datatype_layout) |
| 82 | layout.addLayout(offset_layout) |
| 83 | layout.addStretch() |
| 84 | self.setLayout(layout) |
| 85 | instance_id += 1 |
| 86 | self.data = data |
| 87 | |
| 88 | # Populate initial state |
| 89 | self.updateState() |
| 90 | |
| 91 | # Set up view and address change notifications |
| 92 | self.notifications = HelloNotifications(self) |
| 93 | |
| 94 | def updateState(self): |
| 95 | # Get the currently active view frame for this group of panes. There can be |
no test coverage detected