def alterPanel(self): if self.simpleBevelOptionsAction.isChecked(): self.setCentralWidget(Panel.SimpleOptionsWidget(self)) elif self.fullBevelOptionsAction.isChecked(): self.setCentralWidget(Panel.OptionTableViewWidget(self)) elif self.bevelSetEditorAction.isChecked(): self.setCentralWidget(Panel.BevelSetEditorWidget(self))
def __init__(self, parent=None): super(MainWindowForBevelTool, self).__init__(parent) self._bevelNodes = [] self._bevelOptions = copy.copy(options.bevelOptions) self.setAttribute(Qt.WA_DeleteOnClose, True) self.setupUi(self) self.setCentralWidget(Panel.SimpleOptionsWidget(self)) self.bevelActionGroup = QActionGroup(self) self.bevelActionGroup.addAction(self.simpleBevelOptionsAction) self.bevelActionGroup.addAction(self.fullBevelOptionsAction) self.bevelActionGroup.addAction(self.bevelSetEditorAction) self.simpleBevelOptionsAction.setChecked(True) self.bevelActionGroup.triggered.connect(self.alterPanel)