def __init__(self, filenames, parent=None):
        super().__init__(parent)
        self.ui = Ui_YaxisScalingDialog()
        self.ui.setupUi(self)

        valid = QtGui.QDoubleValidator()
        self.ui.lineEdit.setValidator(valid)
        self.ui.lineEdit_2.setValidator(valid)
class YaxisScaleDialog(QtWidgets.QDialog):

    def __init__(self, filenames, parent=None):
        super().__init__(parent)
        self.ui = Ui_YaxisScalingDialog()
        self.ui.setupUi(self)

        valid = QtGui.QDoubleValidator()
        self.ui.lineEdit.setValidator(valid)
        self.ui.lineEdit_2.setValidator(valid)

        #for f in filenames:
            #self.ui.filename_for_normal.addItem(f)

    def accept(self):
        if not self.ui.lineEdit.text():
            return
        super().accept()