from PyQt4 import QtCore, QtGui, Qt
from EditorMisc import Constants


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_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(800, 662)
        MainWindow.setToolTip(_fromUtf8(""))
        MainWindow.setStatusTip(_fromUtf8(""))
        MainWindow.setWhatsThis(_fromUtf8(""))
        MainWindow.setAccessibleName(_fromUtf8(""))
        MainWindow.setAccessibleDescription(_fromUtf8(""))
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))

        # central panel - label
        self.add_central_label()

        # central panel - sliders
        self.verticalLayoutWidget_2 = QtGui.QWidget(self.centralwidget)
        self.verticalLayoutWidget_2.setGeometry(QtCore.QRect(300, 10, 181, 331))
        self.verticalLayoutWidget_2.setObjectName(_fromUtf8("verticalLayoutWidget_2"))
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.verticalLayoutWidget_2)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.add_sliders()

        # central panel - fears
        self.gridLayoutWidget = QtGui.QWidget(self.centralwidget)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(300, 341, 181, 103))
        self.gridLayoutWidget.setObjectName(_fromUtf8("gridLayoutWidget"))
        self.gridLayout = QtGui.QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.add_fear_combo_boxes()

        # left panel
        self.verticalLayoutWidget_3 = QtGui.QWidget(self.centralwidget)
        self.verticalLayoutWidget_3.setGeometry(QtCore.QRect(10, 10, 175, 607)) # increase last param by 23 for each new checkbox
        self.verticalLayoutWidget_3.setObjectName(_fromUtf8("verticalLayoutWidget_3"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.verticalLayoutWidget_3)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.add_scenario_combo_box()
        self.add_set_bytes_button()
        self.add_global_ghost_level_combo_box()
        self.add_normal_check_boxes()
        self.add_recommended_label()
        self.add_recommended_check_boxes()

        # right panel
        self.verticalLayoutWidget = QtGui.QWidget(self.centralwidget)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(630, 10, 160, 38))
        self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
        self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.add_mortal_combo_box()

        # scenario panel
        self.verticalLayoutWidget_4 = QtGui.QWidget(self.centralwidget)
        self.verticalLayoutWidget_4.setGeometry(QtCore.QRect(180, 10, 111, 186))
        self.verticalLayoutWidget_4.setObjectName(_fromUtf8("verticalLayoutWidget_4"))
        self.verticalLayout_4 = QtGui.QVBoxLayout(self.verticalLayoutWidget_4)
        self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
        self.add_scenario_label()
        self.add_scenario_spin_boxes()
        self.add_plasm_line_edit()
        self.add_mood_combo_box()
        self.add_manual_terror_check_box()

        #
        MainWindow.setCentralWidget(self.centralwidget)
        self.add_menu_bar(MainWindow)
        self.add_status_bar(MainWindow)
        self.retranslateUi(MainWindow)
        self.add_object_connections(MainWindow)
        self.integrity_dialog = IntegrityCheckDialog(self)

    # combo boxes
    def add_scenario_combo_box(self):
        self.comboBox_3 = QtGui.QComboBox(self.verticalLayoutWidget_3)
        self.comboBox_3.setObjectName(_fromUtf8("comboBox_3"))
        self.comboBox_3.addItem("")
        self.comboBox_3.setEnabled(False)
        self.verticalLayout_3.addWidget(self.comboBox_3)

    def add_mortal_combo_box(self):
        self.comboBox_4 = QtGui.QComboBox(self.verticalLayoutWidget)
        self.comboBox_4.setObjectName(_fromUtf8("comboBox_4"))
        self.comboBox_4.addItem("")
        self.comboBox_4.setEnabled(False)
        self.verticalLayout.addWidget(self.comboBox_4)

    def add_fear_combo_boxes(self):
        self.label_4 = QtGui.QLabel(self.gridLayoutWidget)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.label_5 = QtGui.QLabel(self.gridLayoutWidget)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.comboBox = CustomComboBox(self)
        self.comboBox.setObjectName(_fromUtf8("comboBox"))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.setEnabled(False)
        self.comboBox_2 = CustomComboBox(self)
        self.comboBox_2.setObjectName(_fromUtf8("comboBox_2"))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.addItem(_fromUtf8(""))
        self.comboBox_2.setItemText(15, _fromUtf8(""))
        self.comboBox_2.setEnabled(False)
        self.comboBox_6 = CustomComboBox(self)
        self.comboBox_6.setObjectName(_fromUtf8("comboBox_6"))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.addItem(_fromUtf8(""))
        self.comboBox_6.setItemText(15, _fromUtf8(""))
        self.comboBox_6.setEnabled(False)

        self.gridLayout.addWidget(self.label_4,    0, 0, 1, 1)
        self.gridLayout.addWidget(self.comboBox,   1, 0, 1, 1)
        self.gridLayout.addWidget(self.comboBox_6, 1, 1, 1, 1)
        self.gridLayout.addWidget(self.label_5,    2, 0, 1, 1)
        self.gridLayout.addWidget(self.comboBox_2, 3, 0, 1, 1)

    def add_global_ghost_level_combo_box(self):
        self.comboBox_7 = QtGui.QComboBox(self.verticalLayoutWidget_3)
        self.comboBox_7.setObjectName(_fromUtf8("comboBox_7"))
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")
        self.comboBox_7.setToolTip(Constants.GLOBAL_GHOST_LEVEL)
        self.comboBox_7.setEnabled(False)
        self.verticalLayout_3.addWidget(self.comboBox_7)

    def add_mood_combo_box(self):
        self.comboBox_5 = QtGui.QComboBox(self.verticalLayoutWidget_4)
        self.comboBox_5.setObjectName(_fromUtf8("comboBox_5"))
        self.comboBox_5.addItem(_fromUtf8(""))
        self.comboBox_5.addItem(_fromUtf8(""))
        self.comboBox_5.addItem(_fromUtf8(""))
        self.comboBox_5.addItem(_fromUtf8(""))
        self.comboBox_5.addItem(_fromUtf8(""))
        self.comboBox_5.addItem(_fromUtf8(""))
        self.comboBox_5.addItem(_fromUtf8(""))
        self.comboBox_5.addItem(_fromUtf8(""))
        self.comboBox_5.addItem(_fromUtf8(""))
        self.comboBox_5.setEnabled(False)
        self.comboBox_5.setHidden(True)
        self.verticalLayout_4.addWidget(self.comboBox_5)

    # check boxes
    def add_normal_check_boxes(self):
        self.checkBox1 = QtGui.QCheckBox(self.verticalLayoutWidget_3)
        self.checkBox1.setObjectName(_fromUtf8("checkBox_1"))
        self.checkBox1.setToolTip(Constants.UNLIMITED_PLASM)
        self.checkBox1.setEnabled(False)
        self.verticalLayout_3.addWidget(self.checkBox1)
        self.checkBox2 = QtGui.QCheckBox(self.verticalLayoutWidget_3)
        self.checkBox2.setObjectName(_fromUtf8("checkBox_2"))
        self.checkBox2.setToolTip(Constants.UNLIMITED_GOLDPLASM)
        self.checkBox2.setEnabled(False)