def layout(self):
"""
Layout the row for this experiment.
"""
self._main_layout = QW.QGridLayout(self)
# Construct the header for the experiment
self._main_layout.addWidget(QW.QLabel(self._expt_label),0,0)
# -------------- Buttons --------------------
# Button to show experiment options
self._show_options_button = QW.QPushButton("", self)
self._show_options_button.clicked.connect(self._options_callback)
self._show_options_button.setIcon(QG.QIcon(os.path.join(self._image_base,"icons","more-info.png")))
self._show_options_button.setIconSize(QC.QSize(21,21))
self._show_options_button.setFixedWidth(30)
self._main_layout.addWidget(self._show_options_button,0,1)
# Button to remove experiment
self._remove_button = QW.QPushButton("", self)
self._remove_button.clicked.connect(self._remove_callback)
self._remove_button.setIcon(QG.QIcon(os.path.join(self._image_base,"icons","delete-icon.png")))
self._remove_button.setIconSize(QC.QSize(21,21))
self._remove_button.setFixedWidth(30)
self._main_layout.addWidget(self._remove_button,0,2)
self.setFrameShape(QW.QFrame.StyledPanel)
if self._experiment is None:
self._show_options_button.setDisabled(True)
self._remove_button.setDisabled(True)
评论列表
文章目录