Ejemplo n.º 1
0
    def __init__(self, parent=None, backend=None):
        qt.QMainWindow.__init__(self, parent=parent, flags=qt.Qt.Dialog)

        self.setWindowTitle('Profile window')
        self._plot1D = None
        self._plot2D = None
        self._backend = backend
        self._data = None

        widget = qt.QWidget()
        self._layout = qt.QStackedLayout(widget)
        self._layout.setContentsMargins(0, 0, 0, 0)
        self.setCentralWidget(widget)
Ejemplo n.º 2
0
    def __init__(self, parent=None):
        qt.QMainWindow.__init__(self, parent=parent)
        self._createPlot2D()
        self._createScatterView()
        self._createStackView()

        dataWidget = qt.QWidget(self)
        dataLayout = qt.QStackedLayout(dataWidget)
        dataLayout.addWidget(self.plot)
        dataLayout.addWidget(self.scatter)
        dataLayout.addWidget(self.stack)
        dataLayout.setCurrentWidget(self.plot)
        self.dataLayout = dataLayout

        clearButton = qt.QPushButton(self)
        clearButton.clicked.connect(self._clearData)
        clearButton.setText("Clear")

        imageButton = qt.QPushButton(self)
        imageButton.clicked.connect(self._updateImage)
        imageButton.setText("Intensity image")

        imageRgbButton = qt.QPushButton(self)
        imageRgbButton.clicked.connect(self._updateRgbImage)
        imageRgbButton.setText("RGB image")

        scatterButton = qt.QPushButton(self)
        scatterButton.clicked.connect(self._updateScatter)
        scatterButton.setText("Scatter")

        stackButton = qt.QPushButton(self)
        stackButton.clicked.connect(self._updateStack)
        stackButton.setText("Stack")

        options = qt.QWidget(self)
        layout = qt.QHBoxLayout(options)
        layout.addStretch()
        layout.addWidget(clearButton)
        layout.addWidget(imageButton)
        layout.addWidget(imageRgbButton)
        layout.addWidget(scatterButton)
        layout.addWidget(stackButton)
        layout.addStretch()

        widget = qt.QWidget(self)
        layout = qt.QVBoxLayout(widget)
        layout.addWidget(dataWidget)
        layout.addWidget(options)
        self.setCentralWidget(widget)

        self._updateImage()
Ejemplo n.º 3
0
    def __init__(self, parent):
        super(_PlotWithWaitingLabel, self).__init__(parent=parent)
        layout = qt.QStackedLayout(self)
        layout.setStackingMode(qt.QStackedLayout.StackAll)

        self._waiting_label = qt.QLabel(parent=self)
        self._waiting_label.setAlignment(qt.Qt.AlignHCenter | qt.Qt.AlignVCenter)
        layout.addWidget(self._waiting_label)

        self._plot = Plot2D(parent=self)
        layout.addWidget(self._plot)

        self.updateThread = _PlotWithWaitingLabel.AnimationThread(self._waiting_label)
        self.updateThread.start()