Пример #1
0
    def build_widget(self):
        self._h_layout = QtWidgets.QHBoxLayout()

        spacer = QtWidgets.QSpacerItem(20, 20)

        self._integrate_location_label = QtWidgets.QLabel()
        self._integrate_location_label.setText('Output Location: {}'.format(
            self.add_configuration.output_location))
        self._integrate_location_changeBtn = QtWidgets.QPushButton()
        self._integrate_location_changeBtn.setMaximumHeight(23)
        self._integrate_location_changeBtn.setText('Change')

        self._logging_location_label = QtWidgets.QLabel()
        self._logging_location_label.setText('Logging Location: {}'.format(
            self.add_configuration.logging_location))
        self._logging_location_changeBtn = QtWidgets.QPushButton()
        self._logging_location_changeBtn.setMaximumHeight(23)
        self._logging_location_changeBtn.setText('Change')

        self._logging_status = QtWidgets.QLabel()
        self._logging_status.setText('Logging: ')
        self._logging_status_checkBox = QtWidgets.QCheckBox()
        self._logging_status_checkBox.setChecked(
            self.add_configuration.logging_option)

        self._h_layout.addWidget(self._integrate_location_label)
        self._h_layout.addWidget(self._integrate_location_changeBtn)
        self._h_layout.addItem(spacer)
        self._h_layout.addWidget(self._logging_location_label)
        self._h_layout.addWidget(self._logging_location_changeBtn)
        self._h_layout.addItem(spacer)
        self._h_layout.addWidget(self._logging_status)
        self._h_layout.addWidget(self._logging_status_checkBox)
        self.setLayout(self._h_layout)
Пример #2
0
    def __init__(self, parent):
        super(BaseAddItems, self).__init__(parent)

        self._h_layout = QtWidgets.QHBoxLayout()  # setting the main layout
        self.build_widget()  # building the widget contents
        self.set_layout()  # adding all items to the main layout