Example #1
0
    def __init__(self, gui, titel, beschriftung):
        """
        :type gui: Module.Gui.Gui
        :type titel: str
        :type beschriftung: Module.Sonstige.Achsenbeschriftung
        """
        Canvas.__init__(self, gui, titel)
        vertikal = QtGui.QVBoxLayout()
        self.centralWidget().setLayout(vertikal)
        horizontal = QtGui.QHBoxLayout()
        vertikal.addLayout(horizontal)
        sp = QtGui.QSizePolicy()
        sp.setHorizontalPolicy(sp.Maximum)
        text = [canvas_zeile[lang], canvas_spalte[lang]]
        self.koord = [QtGui.QSpinBox(), QtGui.QSpinBox()]
        for k in range(2):
            label = QtGui.QLabel(text[k])
            label.setSizePolicy(sp)
            horizontal.addWidget(label)
            self.koord[k].setMinimum(1)
            self.koord[k].setMaximum(1)
            horizontal.addWidget(self.koord[k])
            self.koord[k].valueChanged.connect(self.aktualisiere)

        self.plotter = Plotter(self, beschriftung)
        vertikal.addWidget(self.plotter)
Example #2
0
 def set_werte(self, neu):
     """
     :type neu: Module.Ergebnis.FitWerte
     """
     self.box_min.setValue(neu.normal_min)
     self.box_max.setValue(neu.normal_max)
     Canvas.set_werte(self, neu)
Example #3
0
    def __init__(self, gui, resonanzkurve, titel, beschriftung):
        """
        :type gui: Module.Gui.Gui
        :type resonanzkurve: Module.Resonanzkurve.Resonanzkurve
        :type titel: str
        :type beschriftung: Module.Sonstige.Achsenbeschriftung
        """
        Canvas.__init__(self, gui, titel)
        self.resonanzkurve = resonanzkurve
        vertikal = QtGui.QVBoxLayout()
        self.centralWidget().setLayout(vertikal)
        horizontal = QtGui.QHBoxLayout()
        vertikal.addLayout(horizontal)

        label = QtGui.QLabel(raster_bereich[lang])
        horizontal.addWidget(label)

        self.box_min = QtGui.QDoubleSpinBox()
        self.box_min.setMinimum(-sys.float_info.max)
        genauigkeit(self.box_min)
        horizontal.addWidget(self.box_min)

        self.box_max = QtGui.QDoubleSpinBox()
        self.box_max.setMaximum(sys.float_info.max)
        genauigkeit(self.box_max)
        horizontal.addWidget(self.box_max)

        self.box_fehler = QtGui.QCheckBox(raster_fehler[lang])
        horizontal.addWidget(self.box_fehler)

        self.box_prozentual = QtGui.QCheckBox(raster_prozent[lang])
        self.box_prozentual.setEnabled(False)
        horizontal.addWidget(self.box_prozentual)
        horizontal.addItem(QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum))

        self.box_min.valueChanged.connect(self.aktualisiere)
        self.box_max.valueChanged.connect(self.aktualisiere)
        self.box_fehler.clicked.connect(self.akt_fehler)
        self.box_prozentual.clicked.connect(self.aktualisiere)

        self.plotter = Plotter(self, beschriftung)
        vertikal.addWidget(self.plotter)
        self.plotter.mpl_connect("button_press_event", self.maus_press)
Example #4
0
    def __init__(self, gui, titel, beschriftung):
        """
        :type gui: Module.Gui.Gui
        :type titel: str
        :type beschriftung: Module.Sonstige.Achsenbeschriftung
        """
        Canvas.__init__(self, gui, titel)
        vertikal = QtGui.QVBoxLayout()
        self.centralWidget().setLayout(vertikal)

        self.plotter = Plotter(self, beschriftung)
        vertikal.addWidget(self.plotter)

        horizontal = QtGui.QHBoxLayout()
        vertikal.addLayout(horizontal)
        sp = QtGui.QSizePolicy()
        sp.setHorizontalPolicy(sp.Maximum)

        def neue_cbox(text):
            """
            :param text: Beschriftung vor der Auswahlbox
            :type text: str
            """
            cbox = QtGui.QComboBox()
            label = QtGui.QLabel(text)
            label.setSizePolicy(sp)
            horizontal.addWidget(label)
            horizontal.addWidget(cbox)
            cbox.currentIndexChanged.connect(self.aktualisiere)
            return cbox

        self.box_omega = neue_cbox(wahl_omega[lang])
        self.box_ac = neue_cbox(wahl_ac[lang])
        self.box_dc = neue_cbox(wahl_dc[lang])

        self.box_omega.value = lambda: int(self.box_omega.currentText())
        self.box_ac.value = lambda: float(self.box_ac.currentText())
        self.box_dc.value = lambda: float(self.box_dc.currentText())

        self.gesperrt = False
Example #5
0
 def set_werte(self, neu):
     """
     :type neu: Module.Ergebnis.FitWerte
     """
     self.zeile.setMaximum(self.gui.fit.par.pixel)
     Canvas.set_werte(self, neu)