# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'preferences_dialog.ui'
#
# Created: Wed May 14 11:59:08 2014
#      by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    def _fromUtf8(s):
        return s

try:
    _encoding = QtGui.QApplication.UnicodeUTF8
    def _translate(context, text, disambig):
        return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
    def _translate(context, text, disambig):
        return QtGui.QApplication.translate(context, text, disambig)

class Ui_PreferencesDialog(object):
    def setupUi(self, PreferencesDialog):
        PreferencesDialog.setObjectName(_fromUtf8("PreferencesDialog"))
        PreferencesDialog.resize(310, 450)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(PreferencesDialog.sizePolicy().hasHeightForWidth())
        PreferencesDialog.setSizePolicy(sizePolicy)
        PreferencesDialog.setMinimumSize(QtCore.QSize(300, 450))
        PreferencesDialog.setMaximumSize(QtCore.QSize(310, 208))
        PreferencesDialog.setAutoFillBackground(False)
        PreferencesDialog.setSizeGripEnabled(False)
        self.gridLayout = QtGui.QGridLayout(PreferencesDialog)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.buttonBox = QtGui.QDialogButtonBox(PreferencesDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth())
        self.buttonBox.setSizePolicy(sizePolicy)
        self.buttonBox.setLayoutDirection(QtCore.Qt.RightToLeft)
        self.buttonBox.setAutoFillBackground(True)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(True)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 1, QtCore.Qt.AlignRight)
        self.group_box_ms2 = QtGui.QGroupBox(PreferencesDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.group_box_ms2.sizePolicy().hasHeightForWidth())
        self.group_box_ms2.setSizePolicy(sizePolicy)
        self.group_box_ms2.setFlat(False)
        self.group_box_ms2.setCheckable(False)
        self.group_box_ms2.setObjectName(_fromUtf8("group_box_ms2"))
        self.gridLayout_2 = QtGui.QGridLayout(self.group_box_ms2)
        self.gridLayout_2.setMargin(10)
        self.gridLayout_2.setSpacing(-1)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.label_4 = QtGui.QLabel(self.group_box_ms2)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridLayout_2.addWidget(self.label_4, 4, 0, 1, 1)
        self.label = QtGui.QLabel(self.group_box_ms2)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1, QtCore.Qt.AlignRight)
        self.label_2 = QtGui.QLabel(self.group_box_ms2)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout_2.addWidget(self.label_2, 2, 0, 1, 1, QtCore.Qt.AlignRight|QtCore.Qt.AlignTop)
        self.label_3 = QtGui.QLabel(self.group_box_ms2)
        self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout_2.addWidget(self.label_3, 0, 0, 1, 1)
        self.label_6 = QtGui.QLabel(self.group_box_ms2)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.gridLayout_2.addWidget(self.label_6, 5, 0, 1, 1, QtCore.Qt.AlignRight)
        self.ms2_tolerance_unit_is_da = QtGui.QRadioButton(self.group_box_ms2)
        self.ms2_tolerance_unit_is_da.setObjectName(_fromUtf8("ms2_tolerance_unit_is_da"))
        self.gridLayout_2.addWidget(self.ms2_tolerance_unit_is_da, 0, 1, 1, 1)
        self.add_losses = QtGui.QCheckBox(self.group_box_ms2)
        self.add_losses.setText(_fromUtf8(""))
        self.add_losses.setObjectName(_fromUtf8("add_losses"))
        self.gridLayout_2.addWidget(self.add_losses, 5, 1, 1, 1)
        self.add_isotopes = QtGui.QCheckBox(self.group_box_ms2)
        self.add_isotopes.setText(_fromUtf8(""))
        self.add_isotopes.setObjectName(_fromUtf8("add_isotopes"))
        self.gridLayout_2.addWidget(self.add_isotopes, 3, 1, 1, 1)
        self.label_5 = QtGui.QLabel(self.group_box_ms2)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.gridLayout_2.addWidget(self.label_5, 3, 0, 1, 1)
        self.ms2_tolerance_unit_is_ppm = QtGui.QRadioButton(self.group_box_ms2)
        self.ms2_tolerance_unit_is_ppm.setObjectName(_fromUtf8("ms2_tolerance_unit_is_ppm"))
        self.gridLayout_2.addWidget(self.ms2_tolerance_unit_is_ppm, 0, 2, 1, 1)
        self.frame_2 = QtGui.QFrame(self.group_box_ms2)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.frame_2.sizePolicy().hasHeightForWidth())
        self.frame_2.setSizePolicy(sizePolicy)
        self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtGui.QFrame.Raised)
        self.frame_2.setObjectName(_fromUtf8("frame_2"))
        self.gridLayout_4 = QtGui.QGridLayout(self.frame_2)
        self.gridLayout_4.setVerticalSpacing(10)
        self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
        self.show_x_ion = QtGui.QCheckBox(self.frame_2)
        self.show_x_ion.setObjectName(_fromUtf8("show_x_ion"))
        self.gridLayout_4.addWidget(self.show_x_ion, 0, 2, 1, 1)
        self.show_c_ion = QtGui.QCheckBox(self.frame_2)
        self.show_c_ion.setObjectName(_fromUtf8("show_c_ion"))
        self.gridLayout_4.addWidget(self.show_c_ion, 3, 0, 1, 1)
        self.show_z_ion = QtGui.QCheckBox(self.frame_2)
        self.show_z_ion.setObjectName(_fromUtf8("show_z_ion"))
        self.gridLayout_4.addWidget(self.show_z_ion, 3, 2, 1, 1)
        self.show_y_ion = QtGui.QCheckBox(self.frame_2)
        self.show_y_ion.setObjectName(_fromUtf8("show_y_ion"))
        self.gridLayout_4.addWidget(self.show_y_ion, 1, 2, 1, 1)
        self.show_a_ion = QtGui.QCheckBox(self.frame_2)
        self.show_a_ion.setObjectName(_fromUtf8("show_a_ion"))
        self.gridLayout_4.addWidget(self.show_a_ion, 0, 0, 1, 1)
        self.show_b_ion = QtGui.QCheckBox(self.frame_2)
        self.show_b_ion.setObjectName(_fromUtf8("show_b_ion"))
        self.gridLayout_4.addWidget(self.show_b_ion, 1, 0, 1, 1)
        self.gridLayout_2.addWidget(self.frame_2, 2, 1, 1, 2)
        self.max_isotope = QtGui.QSpinBox(self.group_box_ms2)
        self.max_isotope.setMinimum(1)
        self.max_isotope.setMaximum(20)
        self.max_isotope.setObjectName(_fromUtf8("max_isotope"))
        self.gridLayout_2.addWidget(self.max_isotope, 4, 1, 1, 2)
        self.ms2_tolerance = QtGui.QLineEdit(self.group_box_ms2)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ms2_tolerance.sizePolicy().hasHeightForWidth())
        self.ms2_tolerance.setSizePolicy(sizePolicy)
        self.ms2_tolerance.setObjectName(_fromUtf8("ms2_tolerance"))
        self.gridLayout_2.addWidget(self.ms2_tolerance, 1, 1, 1, 2)
        self.gridLayout.addWidget(self.group_box_ms2, 0, 0, 1, 1)
        self.group_box_ms1 = QtGui.QGroupBox(PreferencesDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.group_box_ms1.sizePolicy().hasHeightForWidth())
        self.group_box_ms1.setSizePolicy(sizePolicy)
        self.group_box_ms1.setObjectName(_fromUtf8("group_box_ms1"))
        self.gridLayout_3 = QtGui.QGridLayout(self.group_box_ms1)
        self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
        self.ms1_tolerance_unit_is_da = QtGui.QRadioButton(self.group_box_ms1)
        self.ms1_tolerance_unit_is_da.setObjectName(_fromUtf8("ms1_tolerance_unit_is_da"))
        self.gridLayout_3.addWidget(self.ms1_tolerance_unit_is_da, 0, 1, 1, 1)
        self.label_7 = QtGui.QLabel(self.group_box_ms1)
        self.label_7.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.gridLayout_3.addWidget(self.label_7, 0, 0, 1, 1)
        self.ms1_tolerance_unit_is_ppm = QtGui.QRadioButton(self.group_box_ms1)
        self.ms1_tolerance_unit_is_ppm.setObjectName(_fromUtf8("ms1_tolerance_unit_is_ppm"))
        self.gridLayout_3.addWidget(self.ms1_tolerance_unit_is_ppm, 0, 2, 1, 1)
        self.label_8 = QtGui.QLabel(self.group_box_ms1)
        self.label_8.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.gridLayout_3.addWidget(self.label_8, 1, 0, 1, 1)
        self.ms1_tolerance = QtGui.QLineEdit(self.group_box_ms1)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ms1_tolerance.sizePolicy().hasHeightForWidth())
        self.ms1_tolerance.setSizePolicy(sizePolicy)
        self.ms1_tolerance.setObjectName(_fromUtf8("ms1_tolerance"))
        self.gridLayout_3.addWidget(self.ms1_tolerance, 1, 1, 1, 2)
        self.gridLayout.addWidget(self.group_box_ms1, 1, 0, 1, 1)

        self.retranslateUi(PreferencesDialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), PreferencesDialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), PreferencesDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(PreferencesDialog)

    def retranslateUi(self, PreferencesDialog):
        PreferencesDialog.setWindowTitle(_translate("PreferencesDialog", "Preferences", None))
        self.group_box_ms2.setTitle(_translate("PreferencesDialog", "MS2 visualization parameters", None))
        self.label_4.setText(_translate("PreferencesDialog", "Max isotope:", None))
        self.label.setText(_translate("PreferencesDialog", "Tolerance:", None))
        self.label_2.setText(_translate("PreferencesDialog", "Show Ions:", None))
        self.label_3.setText(_translate("PreferencesDialog", "Unit:", None))
        self.label_6.setText(_translate("PreferencesDialog", "Add losses:", None))
        self.ms2_tolerance_unit_is_da.setText(_translate("PreferencesDialog", "Da", None))
        self.label_5.setText(_translate("PreferencesDialog", "Add isotopes:", None))
        self.ms2_tolerance_unit_is_ppm.setText(_translate("PreferencesDialog", "ppm", None))
        self.show_x_ion.setText(_translate("PreferencesDialog", "X", None))
        self.show_c_ion.setText(_translate("PreferencesDialog", "C", None))
        self.show_z_ion.setText(_translate("PreferencesDialog", "Z", None))
        self.show_y_ion.setText(_translate("PreferencesDialog", "Y", None))
        self.show_a_ion.setText(_translate("PreferencesDialog", "A", None))
        self.show_b_ion.setText(_translate("PreferencesDialog", "B", None))
        self.group_box_ms1.setTitle(_translate("PreferencesDialog", "MS1 visualization parameters", None))
        self.ms1_tolerance_unit_is_da.setText(_translate("PreferencesDialog", "Da", None))
        self.label_7.setText(_translate("PreferencesDialog", "Unit:", None))
        self.ms1_tolerance_unit_is_ppm.setText(_translate("PreferencesDialog", "ppm", None))
        self.label_8.setText(_translate("PreferencesDialog", "Tolerance:", None))


class PreferencesDialog(QtGui.QDialog, Ui_PreferencesDialog):
    def __init__(self, parent=None, f=QtCore.Qt.WindowFlags()):
        QtGui.QDialog.__init__(self, parent, f)

        self.setupUi(self)


if __name__ == "__main__":
    import sys
    app = QtGui.QApplication(sys.argv)
    PreferencesDialog = QtGui.QDialog()
    ui = Ui_PreferencesDialog()
    ui.setupUi(PreferencesDialog)
    PreferencesDialog.show()
    sys.exit(app.exec_())

