master
unknown 6 years ago
parent 3cbf779050
commit 9c960893fc

@ -6,7 +6,12 @@ def signals(self):
self.calculer_pushbutton.clicked.connect(self.calc)
def calc(self):
frequence = int(self.freqCp_lineedit.text())
if( self.uniteFreq_combobox.currentIndex() == 0):
frequence = int(self.freqCp_lineedit.text())*1000
elif (self.uniteFreq_combobox.currentIndex() ==1):
frequence = int(self.freqCp_lineedit.text())*1000000
elif (self.uniteFreq_combobox.currentIndex()== 2):
frequence = int(self.freqCp_lineedit.text())*1000000000
amplitude = float(self.amplitude_lineedit.text())
impedance = float(self.impEntree_lineedit.text())
ordre = int(self.ordre_lineedit.text())

@ -58,7 +58,7 @@ class Ui_MainWindow(object):
self.ordre_lineedit.setGeometry(QtCore.QRect(200, 124, 140, 20))
self.ordre_lineedit.setObjectName("ordre_lineedit")
self.freqCp_lineedit = QtWidgets.QLineEdit(self.centralwidget)
self.freqCp_lineedit.setGeometry(QtCore.QRect(200, 46, 140, 20))
self.freqCp_lineedit.setGeometry(QtCore.QRect(200, 46, 80, 20))
self.freqCp_lineedit.setObjectName("freqCp_lineedit")
self.effacer_pushbutton = QtWidgets.QPushButton(self.centralwidget)
self.effacer_pushbutton.setGeometry(QtCore.QRect(22, 150, 145, 23))
@ -72,6 +72,12 @@ class Ui_MainWindow(object):
self.amplitude_label = QtWidgets.QLabel(self.centralwidget)
self.amplitude_label.setGeometry(QtCore.QRect(22, 72, 171, 16))
self.amplitude_label.setObjectName("amplitude_label")
self.uniteFreq_combobox = QtWidgets.QComboBox(self.centralwidget)
self.uniteFreq_combobox.setGeometry(QtCore.QRect(290, 46, 50, 20))
self.uniteFreq_combobox.setObjectName("uniteFreq_combobox")
self.uniteFreq_combobox.addItem("")
self.uniteFreq_combobox.addItem("")
self.uniteFreq_combobox.addItem("")
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
@ -105,7 +111,10 @@ class Ui_MainWindow(object):
self.amplitude_lineedit.setToolTip(_translate("MainWindow", "amplitude"))
self.calculer_pushbutton.setStatusTip(_translate("MainWindow", "Calculer le résultat"))
self.calculer_pushbutton.setText(_translate("MainWindow", "Calculer"))
self.amplitude_label.setText(_translate("MainWindow", "Amplitude (V)"))
self.amplitude_label.setText(_translate("MainWindow", "Amplitude (dB)"))
self.uniteFreq_combobox.setItemText(0, _translate("MainWindow", "kHz"))
self.uniteFreq_combobox.setItemText(1, _translate("MainWindow", "MHz"))
self.uniteFreq_combobox.setItemText(2, _translate("MainWindow", "GHz"))

Loading…
Cancel
Save