Пример #1
0
    def add_checkable(self, item):
        """
        Add a checkable UI element to the main layout and add
        Copy or Export radiobutton options.
        Save the radiobutton group in row_button_grp_dict for later access.

        :param item: item for the checkable elements
        """
        row_idx = self.channel_layout.count()

        reuse_rb = QtGui.QRadioButton(self.reuse_text)
        export_rb = QtGui.QRadioButton(self.export_text)
        export_rb.setChecked(True)

        radio_button_layout = QtGui.QHBoxLayout()
        radio_button_layout.addWidget(reuse_rb)
        radio_button_layout.addWidget(export_rb)

        group_box = QtGui.QGroupBox(item.name)
        group_box.setMaximumHeight(55)
        group_box.setLayout(radio_button_layout)
        group_box.setCheckable(True)

        button_group = QtGui.QButtonGroup(radio_button_layout)
        button_group.addButton(reuse_rb)
        button_group.addButton(export_rb)
        # save the button group for later access
        self.row_button_grp_dict[row_idx] = button_group

        self.channel_layout.addWidget(group_box)
    def setup_ui(self, page_id):
        BasePage.setup_ui(self, page_id)

        # Setup buttongroup by hand since in PySide it breaks the ui compilation
        wiz = self.wizard()
        self._config_button_group = QtGui.QButtonGroup(self)
        self._config_button_group.addButton(wiz.ui.select_default_config,
                                            self.DEFAULT_ID)
        self._config_button_group.addButton(
            wiz.ui.select_legacy_default_config, self.LEGACY_DEFAULT_ID)
Пример #3
0
    def setup_ui(self, page_id):
        BasePage.setup_ui(self, page_id)

        # Setup buttongroup by hand since in PySide it breaks the ui compilation
        wiz = self.wizard()
        self._config_type_button_group = QtGui.QButtonGroup(self)
        self._config_type_button_group.addButton(wiz.ui.select_standard, self.STANDARD_ID)
        self._config_type_button_group.addButton(wiz.ui.select_project, self.PROJECT_ID)
        self._config_type_button_group.addButton(wiz.ui.select_github, self.GITHUB_ID)
        self._config_type_button_group.addButton(wiz.ui.select_disk, self.DISK_ID)
Пример #4
0
    def setup_ui(self, page_id):
        BasePage.setup_ui(self, page_id)

        # Setup buttongroup by hand since in PySide it breaks the ui compilation
        wiz = self.wizard()
        self._config_button_group = QtGui.QButtonGroup(self)
        self._config_button_group.addButton(wiz.ui.select_default_config,
                                            self.DEFAULT_ID)
        self._config_button_group.addButton(wiz.ui.select_multiroot_config,
                                            self.MULTIROOT_ID)
        self._config_button_group.addButton(wiz.ui.select_games_config,
                                            self.GAMES_ID)