Esempio n. 1
0
    def _setup_gui(self):
        """Create the gui for the widget."""
        self._show_average_rotation_radio = QtGui.QRadioButton("Average rot")
        self._show_average_rotation_radio.setChecked(True)
        self._show_single_rotation_radio = QtGui.QRadioButton("Single rot")

        layout = QtGui.QVBoxLayout()
        layout.addWidget(self._show_average_rotation_radio)
        layout.addWidget(self._show_single_rotation_radio)
        self._show_average_rotation_radio.clicked.connect(
            partial(self.set_rotation_type,
                    rotation_type=ROTATION_TYPE.average))
        self._show_single_rotation_radio.clicked.connect(
            partial(self.set_rotation_type,
                    rotation_type=ROTATION_TYPE.single))

        self._rotation_image_number_box = QtGui.QSpinBox()
        self._rotation_image_number_box.setRange(-1, 10000)

        self._single_slice_widget = convenient_widgets.IntegerControll(0)
        self._single_slice_widget.valueChanged.connect(self.set_image_number)

        layout.addWidget(self._single_slice_widget)

        self._widget.setLayout(layout)
        self._single_slice_widget.hide()
Esempio n. 2
0
    def _setup_gui(self):
        """Create the gui and set layout."""
        self._spin_box = QtGui.QSpinBox()
        self._update_spinbox_max(self._max_lim)
        #self._spin_box.setRange(self._min_lim, self._max_lim)
        self._spin_box.setValue(self._value)

        self._max_label = QtGui.QLabel("")
        self._update_max_label(self._max_lim)

        self._prev_button = QtGui.QPushButton("Previous")
        self._next_button = QtGui.QPushButton("Next")

        layout = QtGui.QHBoxLayout()
        layout.addWidget(self._spin_box)
        layout.addWidget(self._max_label)
        layout.addWidget(self._prev_button)
        layout.addWidget(self._next_button)

        self.setLayout(layout)