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

from PyQt5 import QtCore, QtGui, QtWidgets, QtSvg
from aqt.utils import showInfo
from os.path import dirname, join
from anki.utils import isMac, isWin, isLin
import platform
from aqt.theme import theme_manager

class MigakuLabel(QtWidgets.QLabel):
    clicked=QtCore.pyqtSignal()
    def __init__(self, parent=None):
        QtWidgets.QLabel.__init__(self, parent)

    def mousePressEvent(self, ev):
        self.clicked.emit()

class MigakuSVG(QtSvg.QSvgWidget):
    clicked=QtCore.pyqtSignal()
    def __init__(self, parent=None):
        QtSvg.QSvgWidget.__init__(self, parent)

    def mousePressEvent(self, ev):
        self.clicked.emit()

class Ui_Dialog(object):
    def getIcon(self, name, size = 27):
        icon = QtGui.QPixmap(join(self.addon_path,'icons', name))
        return icon.scaled(size, size)


    def setupUi(self, Dialog):
        macLin = False
        if isMac  or isLin:
            macLin = True
        Dialog.setObjectName("MigakuJapaneseSupportSettings")
        Dialog.setWindowModality(QtCore.Qt.ApplicationModal)
        Dialog.resize(1167, 725)
        Dialog.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
        self.addon_path = dirname(__file__)
        self.applyButton = QtWidgets.QPushButton('Apply', Dialog)
        self.cancelButton = QtWidgets.QPushButton('Cancel', Dialog)
        self.applyButton.setGeometry(QtCore.QRect(1075, 685, 85, 32))
        self.cancelButton.setGeometry(QtCore.QRect(985, 685, 85, 32))
        self.tabWidget = QtWidgets.QTabWidget(Dialog)
        self.tabWidget.setGeometry(QtCore.QRect(10, 10, 1151, 671))
        self.tabWidget.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
        self.tabWidget.setObjectName("tabWidget")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.gridLayoutWidget = QtWidgets.QWidget(self.tab_2)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 10, 1131, 631))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.tab_2)
        self.gridLayout_2.setContentsMargins(5, 5, 5, 5)
        self.gridLayout_2.setVerticalSpacing(5)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.groupBox_4 = QtWidgets.QGroupBox(self.tab_2)
        self.groupBox_4.setTitle("")
        self.groupBox_4.setObjectName("groupBox_4")
        self.gridLayout_15 = QtWidgets.QGridLayout(self.groupBox_4)
        self.gridLayout_15.setContentsMargins(5, 5, 5, 5)
        self.gridLayout_15.setObjectName("gridLayout_15")
        self.horizontalLayout_31 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_31.setObjectName("horizontalLayout_31")
        self.label_37 = QtWidgets.QLabel(self.groupBox_4)
        self.label_37.setFixedWidth(55)
        self.label_37.setObjectName("label_37")
        self.horizontalLayout_31.addWidget(self.label_37)
        self.heibanColor = QtWidgets.QLineEdit(self.groupBox_4)
        self.heibanColor.setFixedWidth(120)
        self.heibanColor.setObjectName("heibanColor")
        self.horizontalLayout_31.addWidget(self.heibanColor)
        self.heibanSelect = QtWidgets.QPushButton(self.groupBox_4)
        self.horizontalLayout_31.addWidget(self.heibanSelect)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_31.addItem(spacerItem)
        self.gridLayout_15.addLayout(self.horizontalLayout_31, 1, 0, 1, 2)
        self.horizontalLayout_32 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_32.setObjectName("horizontalLayout_32")
        self.label_82 = QtWidgets.QLabel(self.groupBox_4)
        self.label_82.setFixedWidth(65)
        self.label_82.setObjectName("label_82")
        self.horizontalLayout_32.addWidget(self.label_82)
        self.atamadakaColor = QtWidgets.QLineEdit(self.groupBox_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.atamadakaColor.sizePolicy().hasHeightForWidth())
        self.atamadakaColor.setSizePolicy(sizePolicy)
        self.atamadakaColor.setFixedWidth(120)
        self.atamadakaColor.setObjectName("atamadakaColor")
        self.horizontalLayout_32.addWidget(self.atamadakaColor)
        self.atamadakaSelect = QtWidgets.QPushButton(self.groupBox_4)
        self.groupBox_4.setFixedHeight(110)
        self.gridLayout_15.setSpacing(3)
        self.horizontalLayout_32.addWidget(self.atamadakaSelect)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_32.addItem(spacerItem1)
        self.gridLayout_15.addLayout(self.horizontalLayout_32, 1, 2, 1, 2)
        self.horizontalLayout_33 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_33.setObjectName("horizontalLayout_33")
        self.label_83 = QtWidgets.QLabel(self.groupBox_4)
        self.label_83.setFixedWidth(60)
        self.label_83.setObjectName("label_83")
        self.horizontalLayout_33.addWidget(self.label_83)
        self.nakadakaColor = QtWidgets.QLineEdit(self.groupBox_4)
        self.nakadakaColor.setFixedWidth(120)
        self.nakadakaColor.setObjectName("nakadakaColor")
        self.horizontalLayout_33.addWidget(self.nakadakaColor)
        self.nakadakaSelect = QtWidgets.QPushButton(self.groupBox_4)
        self.horizontalLayout_33.addWidget(self.nakadakaSelect)
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_33.addItem(spacerItem2)
        self.gridLayout_15.addLayout(self.horizontalLayout_33, 1, 4, 1, 2)
        self.horizontalLayout_34 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_34.setObjectName("horizontalLayout_34")
        self.label_84 = QtWidgets.QLabel(self.groupBox_4)
        self.label_84.setFixedWidth(55)
        self.label_84.setObjectName("label_84")
        self.horizontalLayout_34.addWidget(self.label_84)
        self.odakaColor = QtWidgets.QLineEdit(self.groupBox_4)
        self.odakaColor.setFixedWidth(120)
        self.odakaColor.setObjectName("odakaColor")
        self.horizontalLayout_34.addWidget(self.odakaColor)
        self.odakaSelect = QtWidgets.QPushButton(self.groupBox_4)
        self.horizontalLayout_34.addWidget(self.odakaSelect)
        spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_34.addItem(spacerItem3)
        self.gridLayout_15.addLayout(self.horizontalLayout_34, 2, 0, 1, 2)
        self.horizontalLayout_35 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_35.setObjectName("horizontalLayout_35")
        self.label_110 = QtWidgets.QLabel(self.groupBox_4)
        self.label_110.setFixedWidth(65)
        self.label_110.setObjectName("label_110")
        self.horizontalLayout_35.addWidget(self.label_110)
        self.kifukuColor = QtWidgets.QLineEdit(self.groupBox_4)
        self.kifukuColor.setFixedWidth(120)
        self.kifukuColor.setObjectName("kifukuColor")
        self.horizontalLayout_35.addWidget(self.kifukuColor)
        self.kifukuSelect = QtWidgets.QPushButton(self.groupBox_4)
        self.horizontalLayout_35.addWidget(self.kifukuSelect)
        spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_35.addItem(spacerItem4)
        self.gridLayout_15.addLayout(self.horizontalLayout_35, 2, 2, 1, 2)
        self.label_39 = QtWidgets.QLabel(self.groupBox_4)
        self.label_39.setObjectName("label_39")
        self.gridLayout_15.addWidget(self.label_39, 0, 0, 1, 1)
        self.gridLayout_2.addWidget(self.groupBox_4, 10, 0, 1, 2)
        self.groupBox_5 = QtWidgets.QGroupBox(self.tab_2)
        self.groupBox_5.setTitle("")
        self.groupBox_5.setObjectName("groupBox_5")
        self.gridLayout_21 = QtWidgets.QGridLayout(self.groupBox_5)
        self.gridLayout_21.setContentsMargins(5, 5, 5, 5)
        self.gridLayout_21.setObjectName("gridLayout_21")
        self.label_64 = QtWidgets.QLabel(self.groupBox_5)
        self.label_64.setObjectName("label_64")
        self.gridLayout_21.addWidget(self.label_64, 1, 0, 1, 1)
        self.label_63 = QtWidgets.QLabel(self.groupBox_5)
        self.label_63.setObjectName("label_63")
        self.gridLayout_21.addWidget(self.label_63, 0, 0, 1, 1)
        self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_9.setObjectName("horizontalLayout_9")
        self.furiganaFontSize = QtWidgets.QSpinBox(self.groupBox_5)
        self.furiganaFontSize.setMinimum(1)
        self.furiganaFontSize.setMaximum(10)
        self.furiganaFontSize.setFixedWidth(80)
        self.furiganaFontSize.setObjectName("furiganaFontSize")
        self.horizontalLayout_9.addWidget(self.furiganaFontSize, 0, QtCore.Qt.AlignLeft)
        spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_9.addItem(spacerItem5)
        self.gridLayout_21.addLayout(self.horizontalLayout_9, 1, 1, 1, 1)
        self.horizontalLayout_20 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_20.setObjectName("horizontalLayout_20")
        self.historicalKanji = QtWidgets.QCheckBox(self.groupBox_5)
        self.historicalKanji.setObjectName("historicalKanji")
        self.horizontalLayout_20.addWidget(self.historicalKanji)
        self.historicalKana = QtWidgets.QCheckBox(self.groupBox_5)
        self.historicalKana.setObjectName("historicalKana")
        self.horizontalLayout_20.addWidget(self.historicalKana)
        self.gridLayout_21.addLayout(self.horizontalLayout_20, 4, 1, 1, 1)
        self.displayShapes = QtWidgets.QCheckBox(self.groupBox_5)
        self.displayShapes.setText("")
        self.displayShapes.setObjectName("displayShapes")
        self.gridLayout_21.addWidget(self.displayShapes, 1, 3, 1, 1)
        self.label_68 = QtWidgets.QLabel(self.groupBox_5)
        self.label_68.setObjectName("label_68")
        self.gridLayout_21.addWidget(self.label_68, 1, 2, 1, 1)
        self.label_40 = QtWidgets.QLabel(self.groupBox_5)
        self.label_40.setObjectName("label_40")
        self.gridLayout_21.addWidget(self.label_40, 4, 0, 1, 1)
        self.label_69 = QtWidgets.QLabel(self.groupBox_5)
        self.label_69.setObjectName("label_69")
        self.gridLayout_21.addWidget(self.label_69, 1, 4, 1, 1)
        self.graphOnHover = QtWidgets.QCheckBox(self.groupBox_5)
        self.graphOnHover.setText("")
        self.graphOnHover.setObjectName("graphOnHover")
        self.gridLayout_21.addWidget(self.graphOnHover, 1, 5, 1, 1)
        self.label_111 = QtWidgets.QLabel(self.groupBox_5)
        self.label_111.setObjectName("label_111")
        self.gridLayout_21.addWidget(self.label_111, 2, 0, 1, 1)
        self.bufferedOutput = QtWidgets.QCheckBox(self.groupBox_5)
        self.bufferedOutput.setText("")
        self.bufferedOutput.setObjectName("bufferedOutput")
        self.gridLayout_21.addWidget(self.bufferedOutput, 2, 1, 1, 1)
        self.label_42 = QtWidgets.QLabel(self.groupBox_5)
        self.label_42.setObjectName("label_42")
        self.gridLayout_21.addWidget(self.label_42, 2, 2, 1, 1)
        self.audioOnClick = QtWidgets.QCheckBox(self.groupBox_5)
        self.audioOnClick.setText("")
        self.audioOnClick.setObjectName("audioOnClick")
        self.gridLayout_21.addWidget(self.audioOnClick, 2, 3, 1, 1)

        self.labelGraphBack = QtWidgets.QLabel(self.groupBox_5)
        self.labelGraphBack.setObjectName("labelGraphBack")
        self.gridLayout_21.addWidget(self.labelGraphBack, 2, 4, 1, 1)
        self.graphOnHoverBack = QtWidgets.QCheckBox(self.groupBox_5)
        self.graphOnHoverBack .setText("")
        self.graphOnHoverBack .setObjectName("graphOnHoverBack")
        self.gridLayout_21.addWidget(self.graphOnHoverBack, 2, 5, 1, 1)

        self.label_41 = QtWidgets.QLabel(self.groupBox_5)
        self.label_41.setObjectName("label_41")
        self.gridLayout_21.addWidget(self.label_41, 3, 0, 1, 1)
        self.katakanaConversion = QtWidgets.QCheckBox(self.groupBox_5)
        self.katakanaConversion.setText("")
        self.katakanaConversion.setObjectName("katakanaConversion")
        self.gridLayout_21.addWidget(self.katakanaConversion, 3, 1, 1, 1)

        self.labelLegacy = QtWidgets.QLabel(self.groupBox_5)
        self.labelLegacy.setText("Remove Legacy JS & CSS")
        self.labelLegacy.setObjectName("labelLegacy")
        self.gridLayout_21.addWidget(self.labelLegacy, 3, 2, 1, 1)
        self.removeLegacy = QtWidgets.QCheckBox(self.groupBox_5)
        self.removeLegacy.setText("")
        self.removeLegacy.setObjectName("removeLegacy")
        self.gridLayout_21.addWidget(self.removeLegacy, 3, 3, 1, 1)

        self.gridLayout_2.addWidget(self.groupBox_5, 11, 0, 1, 2)
        self.groupBox = QtWidgets.QGroupBox(self.tab_2)
        self.groupBox.setTitle("")
        self.groupBox.setObjectName("groupBox")
        self.genVL = QtWidgets.QVBoxLayout()
        self.genGrid = QtWidgets.QWidget()
        self.gridLayout_13 = QtWidgets.QGridLayout(self.genGrid)
        self.gridLayout_13.setContentsMargins(5, 0, 5, 5)
        self.gridLayout_13.setObjectName("gridLayout_13")
        self.groupBox_7 = QtWidgets.QGroupBox()
        self.groupBox_7.setFixedHeight(90)
        self.groupBox_7.setObjectName("groupBox_7")
        self.gridLayout_16 = QtWidgets.QGridLayout(self.groupBox_7)
        self.gridLayout_16.setContentsMargins(5, 5, 5, 5)
        self.gridLayout_16.setObjectName("gridLayout_16")
        self.sentenceGraphs = QtWidgets.QCheckBox(self.groupBox_7)
        self.sentenceGraphs.setText("")
        self.sentenceGraphs.setObjectName("sentenceGraphs")
        self.gridLayout_16.addWidget(self.sentenceGraphs, 0, 3, 1, 1)
        self.label_87 = QtWidgets.QLabel(self.groupBox_7)
        self.label_87.setObjectName("label_87")
        self.gridLayout_16.addWidget(self.label_87, 0, 2, 1, 1)
        self.label_86 = QtWidgets.QLabel(self.groupBox_7)
        self.label_86.setObjectName("label_86")
        self.gridLayout_16.addWidget(self.label_86, 0, 0, 1, 1)
        self.sentenceDictForm = QtWidgets.QCheckBox(self.groupBox_7)
        self.sentenceDictForm.setText("")
        self.sentenceDictForm.setObjectName("sentenceDictForm")
        self.gridLayout_16.addWidget(self.sentenceDictForm, 1, 1, 1, 1)
        self.label_85 = QtWidgets.QLabel(self.groupBox_7)
        self.label_85.setObjectName("label_85")
        self.gridLayout_16.addWidget(self.label_85, 1, 0, 1, 1)
        self.label_88 = QtWidgets.QLabel(self.groupBox_7)
        self.label_88.setObjectName("label_88")
        self.gridLayout_16.addWidget(self.label_88, 1, 2, 1, 1)
        self.sentenceAccents = QtWidgets.QCheckBox(self.groupBox_7)
        self.sentenceAccents.setText("")
        self.sentenceAccents.setObjectName("sentenceAccents")
        self.gridLayout_16.addWidget(self.sentenceAccents, 1, 3, 1, 1)
        self.label_89 = QtWidgets.QLabel(self.groupBox_7)
        self.label_89.setObjectName("label_89")
        self.gridLayout_16.addWidget(self.label_89, 2, 0, 1, 1)
        self.sentenceAudio = QtWidgets.QCheckBox(self.groupBox_7)
        self.sentenceAudio.setText("")
        self.sentenceAudio.setObjectName("sentenceAudio")
        self.gridLayout_16.addWidget(self.sentenceAudio, 2, 1, 1, 1)
        self.sentenceKana = QtWidgets.QCheckBox(self.groupBox_7)
        self.sentenceKana.setText("")
        self.sentenceKana.setObjectName("sentenceKana")
        self.gridLayout_16.addWidget(self.sentenceKana, 0, 1, 1, 1)
        self.groupBox_8 = QtWidgets.QGroupBox()
        self.groupBox_8.setFixedHeight(90)
        self.groupBox_8.setObjectName("groupBox_8")
        self.gridLayout_18 = QtWidgets.QGridLayout(self.groupBox_8)
        self.gridLayout_18.setContentsMargins(5, 5, 5, 5)
        self.gridLayout_18.setObjectName("gridLayout_18")
        self.wordGraphs = QtWidgets.QCheckBox(self.groupBox_8)
        self.wordGraphs.setText("")
        self.wordGraphs.setObjectName("wordGraphs")
        self.gridLayout_18.addWidget(self.wordGraphs, 0, 3, 1, 1)
        self.label_95 = QtWidgets.QLabel(self.groupBox_8)
        self.label_95.setObjectName("label_95")
        self.gridLayout_18.addWidget(self.label_95, 0, 2, 1, 1)
        self.label_96 = QtWidgets.QLabel(self.groupBox_8)
        self.label_96.setObjectName("label_96")
        self.gridLayout_18.addWidget(self.label_96, 0, 0, 1, 1)
        self.wordDictForm = QtWidgets.QCheckBox(self.groupBox_8)
        self.wordDictForm.setText("")
        self.wordDictForm.setObjectName("wordDictForm")
        self.gridLayout_18.addWidget(self.wordDictForm, 1, 1, 1, 1)
        self.label_97 = QtWidgets.QLabel(self.groupBox_8)
        self.label_97.setObjectName("label_97")
        self.gridLayout_18.addWidget(self.label_97, 1, 0, 1, 1)
        self.label_98 = QtWidgets.QLabel(self.groupBox_8)
        self.label_98.setObjectName("label_98")
        self.gridLayout_18.addWidget(self.label_98, 1, 2, 1, 1)
        self.wordAccents = QtWidgets.QCheckBox(self.groupBox_8)
        self.wordAccents.setText("")
        self.wordAccents.setObjectName("wordAccents")
        self.gridLayout_18.addWidget(self.wordAccents, 1, 3, 1, 1)
        self.label_99 = QtWidgets.QLabel(self.groupBox_8)
        self.label_99.setObjectName("label_99")
        self.gridLayout_18.addWidget(self.label_99, 2, 0, 1, 1)
        self.wordAudio = QtWidgets.QCheckBox(self.groupBox_8)
        self.wordAudio.setText("")
        self.wordAudio.setObjectName("wordAudio")
        self.gridLayout_18.addWidget(self.wordAudio, 2, 1, 1, 1)
        self.wordKana = QtWidgets.QCheckBox(self.groupBox_8)
        self.wordKana.setText("")
        self.wordKana.setObjectName("wordKana")
        self.gridLayout_18.addWidget(self.wordKana, 0, 1, 1, 1)
        self.audioFieldsCB = QtWidgets.QComboBox()
        self.audioFieldsCB.setObjectName("audioFieldsCB")
        self.audioLayout = QtWidgets.QHBoxLayout()
        self.audioLayout.addWidget(QtWidgets.QLabel('Audio Field(s):'))
        self.audioLayout.addWidget(self.audioFieldsCB)
        self.gridLayout_13.addLayout(self.audioLayout, 0, 0, 1, 1)
        self.pitchGraphsCB = QtWidgets.QComboBox()
        self.pitchGraphsCB.setObjectName("pitchGraphsCB")
        self.pitchGraphsLayout = QtWidgets.QHBoxLayout()
        self.pitchGraphsLayout.addWidget(QtWidgets.QLabel('Pitch Graph Field(s):'))
        self.pitchGraphsLayout.addWidget(self.pitchGraphsCB)
        self.gridLayout_13.addLayout(self.pitchGraphsLayout, 2, 0, 1, 1)
        self.horizontalLayout_14 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_14.setObjectName("horizontalLayout_14")
        self.label_30 = QtWidgets.QLabel()
        self.label_30.setObjectName("label_30")
        self.horizontalLayout_14.addWidget(self.label_30)
        self.pitchGraphsList = QtWidgets.QLabel()
        self.pitchGraphsList.setObjectName("pitchGraphsList")
        self.horizontalLayout_14.addWidget(self.pitchGraphsList)
        spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_14.addItem(spacerItem6)
        self.gridLayout_13.addLayout(self.horizontalLayout_14, 3, 0, 1, 4)
        self.horizontalLayout_15 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_15.setObjectName("horizontalLayout_15")
        self.label_31 = QtWidgets.QLabel()
        self.label_31.setObjectName("label_31")
        self.horizontalLayout_15.addWidget(self.label_31)
        self.audioFieldsList = QtWidgets.QLabel()
        self.audioFieldsList.setObjectName("audioFieldsList")
        self.horizontalLayout_15.addWidget(self.audioFieldsList)
        spacerItem7 = QtWidgets.QSpacerItem(40, 25, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_15.addItem(spacerItem7)
        self.gridLayout_13.addLayout(self.horizontalLayout_15, 1, 0, 1, 4)
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.audioFieldsPB = QtWidgets.QPushButton()
        self.audioFieldsPB.setFixedHeight(30)
        self.audioFieldsPB.setFixedWidth(80)
        self.audioFieldsPB.setObjectName("audioFieldsPB")
        self.horizontalLayout_5.addWidget(self.audioFieldsPB, 0, QtCore.Qt.AlignLeft)
        self.AudioRadioButtons = QtWidgets.QGroupBox()
        self.AudioRadioButtons.setFixedSize(430, 30)
        self.AudioRadioButtons.setTitle("")
        self.AudioRadioButtons.setObjectName("AudioRadioButton")
        self.AudioRadioButtons.setStyleSheet(".QGroupBox {border:none}");
        self.horizontalLayoutWidget = QtWidgets.QWidget(self.AudioRadioButtons)
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
        self.horizontalLayout.setContentsMargins(5, 5, 5, 5)
        self.horizontalLayout.setSpacing(0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.audioOverwrite = QtWidgets.QRadioButton(self.horizontalLayoutWidget)
        self.audioOverwrite.setFixedWidth(95)
        self.audioOverwrite.setObjectName("audioOverwrite")
        self.horizontalLayout.addWidget(self.audioOverwrite, 0, QtCore.Qt.AlignLeft)
        self.audioIfEmpty = QtWidgets.QRadioButton(self.horizontalLayoutWidget)
        self.audioIfEmpty.setFixedWidth(85)
        self.audioIfEmpty.setObjectName("audioIfEmpty")
        self.horizontalLayout.addWidget(self.audioIfEmpty)
        self.audioAdd = QtWidgets.QRadioButton(self.horizontalLayoutWidget)
        self.audioAdd.setFixedWidth(142)
        self.audioAdd.setObjectName("audioAdd")
        self.horizontalLayout.addWidget(self.audioAdd)
        self.audioSep = QtWidgets.QLineEdit(self.horizontalLayoutWidget)
        self.audioSep.setFixedWidth(100)
        self.audioSep.setObjectName("audioSep")
        self.horizontalLayout.addWidget(self.audioSep)
        self.horizontalLayout_5.addWidget(self.AudioRadioButtons)
        spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_5.addItem(spacerItem8)
        self.gridLayout_13.addLayout(self.horizontalLayout_5, 0, 1, 1, 3)
        self.horizontalLayout_11 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_11.setObjectName("horizontalLayout_11")
        self.pitchGraphsPB = QtWidgets.QPushButton()
        self.pitchGraphsPB.setFixedWidth(80)
        self.pitchGraphsPB.setFixedHeight(30)
        self.pitchGraphsPB.setObjectName("pitchGraphsPB")
        self.horizontalLayout_11.addWidget(self.pitchGraphsPB, 0, QtCore.Qt.AlignLeft)
        self.GraphRadioButtons = QtWidgets.QGroupBox()
        self.GraphRadioButtons.setFixedSize(430, 30)
        self.GraphRadioButtons.setTitle("")
        self.GraphRadioButtons.setObjectName("GraphRadioButton")
        self.GraphRadioButtons.setStyleSheet(".QGroupBox {border:none}");
        self.horizontalLayoutWidgetGraphs = QtWidgets.QWidget(self.GraphRadioButtons)
        self.horizontalLayoutWidgetGraphs.setObjectName("horizontalLayoutWidget")
        self.horizontalLayoutGraphs = QtWidgets.QHBoxLayout(self.horizontalLayoutWidgetGraphs)
        self.horizontalLayoutGraphs.setContentsMargins(5, 5, 5, 5)
        self.horizontalLayoutGraphs.setSpacing(0)
        self.horizontalLayoutGraphs.setObjectName("horizontalLayout")
        self.graphOverwrite = QtWidgets.QRadioButton(self.horizontalLayoutWidgetGraphs)
        self.graphOverwrite.setFixedWidth(95)
        self.graphOverwrite.setObjectName("graphOverwrite")
        self.horizontalLayoutGraphs.addWidget(self.graphOverwrite, 0, QtCore.Qt.AlignLeft)
        self.graphIfEmpty = QtWidgets.QRadioButton(self.horizontalLayoutWidgetGraphs)
        self.graphIfEmpty.setFixedWidth(85)
        self.graphIfEmpty.setObjectName("graphIfEmpty")
        self.horizontalLayoutGraphs.addWidget(self.graphIfEmpty)
        self.graphAdd = QtWidgets.QRadioButton(self.horizontalLayoutWidgetGraphs)
        self.graphAdd.setFixedWidth(142)
        self.graphAdd.setObjectName("graphAdd")
        self.horizontalLayoutGraphs.addWidget(self.graphAdd)
        self.graphSep = QtWidgets.QLineEdit(self.horizontalLayoutWidgetGraphs)
        self.graphSep.setFixedWidth(100)
        self.graphSep.setObjectName("graphSep")
        self.horizontalLayoutGraphs.addWidget(self.graphSep)
        self.horizontalLayout_11.addWidget(self.GraphRadioButtons)
        spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_11.addItem(spacerItem9)
        self.gridLayout_13.addLayout(self.horizontalLayout_11, 2, 1, 1, 3)
        self.horizontalLayout_12 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_12.setObjectName("horizontalLayout_12")
        self.label_29 = QtWidgets.QLabel()
        self.label_29.setFixedWidth(68)
        self.label_29.setObjectName("label_29")
        self.horizontalLayout_12.addWidget(self.label_29, 0, QtCore.Qt.AlignLeft)
        self.lookAhead = QtWidgets.QSpinBox()
        self.lookAhead.setFixedWidth(80)
        self.lookAhead.setObjectName("lookAhead")
        self.horizontalLayout_12.addWidget(self.lookAhead, 0, QtCore.Qt.AlignLeft)
        spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_12.addItem(spacerItem10)
        self.gridLayout_13.addLayout(self.horizontalLayout_12, 4, 0, 1, 4)
        self.gridLayout_2.addWidget(self.groupBox, 3, 0, 1, 2)
        self.groupBox_6 = QtWidgets.QGroupBox(self.tab_2)
        self.groupBox_6.setFixedHeight(100)
        self.label_6 = QtWidgets.QLabel(self.groupBox)
        if macLin:
            self.label_6.setGeometry(8,0,100, 30)
        else:
            self.genVL.addWidget(self.label_6, alignment = QtCore.Qt.AlignLeft)
        self.label_6.setObjectName("label_6")
        self.genHL = QtWidgets.QHBoxLayout()
        self.genHL.addWidget(self.groupBox_7)
        self.genHL.addWidget(self.groupBox_8)
        self.genVL.addLayout(self.genHL)
        self.genVL.setSpacing(3)
        self.genGrid.setFixedHeight(170)
        self.genVL.addWidget(self.genGrid)
        self.genVL.addStretch()
        self.groupBox.setFixedHeight(295)
        self.groupBox.setLayout(self.genVL)
        self.groupBox_6.setTitle("")
        self.groupBox_6.setObjectName("groupBox_6")
        self.gridLayout_12 = QtWidgets.QGridLayout(self.groupBox_6)
        self.gridLayout_12.setContentsMargins(5, 5, 5, 5)
        self.gridLayout_12.setObjectName("gridLayout_12")
        self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_8.setObjectName("horizontalLayout_8")
        self.label_23 = QtWidgets.QLabel(self.groupBox_6)
        self.label_23.setObjectName("label_23")
        self.horizontalLayout_8.addWidget(self.label_23)
        self.profilesList = QtWidgets.QLabel(self.groupBox_6)
        self.profilesList.setObjectName("profilesList")
        self.horizontalLayout_8.addWidget(self.profilesList)
        spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_8.addItem(spacerItem11)
        self.gridLayout_12.addLayout(self.horizontalLayout_8, 2, 0, 1, 4)
        self.label_3 = QtWidgets.QLabel(self.groupBox_6)
        self.label_3.setObjectName("label_3")
        self.gridLayout_12.addWidget(self.label_3, 0, 0, 1, 1)
        self.profilesCB = QtWidgets.QComboBox(self.groupBox_6)
        self.profilesCB.setObjectName("profilesCB")
        self.gridLayout_12.addWidget(self.profilesCB, 1, 0, 1, 1)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.profilesPB = QtWidgets.QPushButton(self.groupBox_6)
        self.profilesPB.setFixedWidth(80)
        self.profilesPB.setFixedHeight(30)
        self.profilesPB.setObjectName("profilesPB")
        self.horizontalLayout_2.addWidget(self.profilesPB, 0, QtCore.Qt.AlignLeft)
        spacerItem12 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem12)
        self.gridLayout_12.addLayout(self.horizontalLayout_2, 1, 1, 1, 3)
        self.gridLayout_2.addWidget(self.groupBox_6, 0, 0, 1, 2)
        self.tabWidget.addTab(self.tab_2, "")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")
        self.gridLayout = QtWidgets.QGridLayout(self.tab)
        self.gridLayout.setObjectName("gridLayout")
        self.activeCardTypeCB = QtWidgets.QComboBox(self.tab)
        self.activeCardTypeCB.setObjectName("activeCardTypeCB")
        self.gridLayout.addWidget(self.activeCardTypeCB, 1, 2, 1, 1)
        self.activeActionButton = QtWidgets.QPushButton(self.tab)
        self.activeActionButton.setFixedHeight(30)
        self.activeActionButton.setObjectName("activeActionButton")
        self.gridLayout.addWidget(self.activeActionButton, 2, 5, 1, 1)
        self.label_10 = QtWidgets.QLabel(self.tab)
        self.label_10.setObjectName("label_10")
        self.gridLayout.addWidget(self.label_10, 0, 2, 1, 1)
        self.activeNoteTypeCB = QtWidgets.QComboBox(self.tab)
        self.activeNoteTypeCB.setObjectName("activeNoteTypeCB")
        self.gridLayout.addWidget(self.activeNoteTypeCB, 1, 1, 1, 1)
        self.activeDisplayTypeCB = QtWidgets.QComboBox(self.tab)
        self.activeDisplayTypeCB.setObjectName("activeDisplayTypeCB")
        self.gridLayout.addWidget(self.activeDisplayTypeCB, 1, 5, 1, 1)
        self.activeProfileCB = QtWidgets.QComboBox(self.tab)
        self.activeProfileCB.setObjectName("activeProfileCB")
        self.gridLayout.addWidget(self.activeProfileCB, 1, 0, 1, 1)
        self.label_9 = QtWidgets.QLabel(self.tab)
        self.label_9.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
        self.label_9.setObjectName("label_9")
        self.gridLayout.addWidget(self.label_9, 0, 0, 1, 1)
        self.activeSideCB = QtWidgets.QComboBox(self.tab)
        self.activeSideCB.setObjectName("activeSideCB")
        self.gridLayout.addWidget(self.activeSideCB, 1, 4, 1, 1)
        self.activeFieldCB = QtWidgets.QComboBox(self.tab)
        self.activeFieldCB.setObjectName("activeFieldCB")
        self.gridLayout.addWidget(self.activeFieldCB, 1, 3, 1, 1)
        self.autoCSSJS = QtWidgets.QCheckBox(self.tab)
        self.autoCSSJS.setText("")
        self.autoCSSJS.setObjectName("autoCSSJS")
        self.gridLayout.addWidget(self.autoCSSJS, 0, 1, 1, 1)
        self.addMigakuNoteType = QtWidgets.QCheckBox(self.tab)
        self.addMigakuNoteType.setText("")
        self.addMigakuNoteType.setObjectName("addMigakuNoteType")
        self.gridLayout.addWidget(self.addMigakuNoteType, 0, 3, 1, 1)
        self.listWidget = QtWidgets.QTableWidget(self.tab)
        if isWin and platform.release() == '10' and theme_manager.night_mode != True:
            self.listWidget.setStyleSheet(
        "QHeaderView::section{"
            "border-top:0px solid #D8D8D8;"
            "border-left:0px solid #D8D8D8;"
            "border-right:1px solid #D8D8D8;"
            "border-bottom: 1px solid #D8D8D8;"
            "background-color:white;"
            "padding:4px;"
        "}"
        "QTableCornerButton::section{"
            "border-top:0px solid #D8D8D8;"
            "border-left:0px solid #D8D8D8;"
            "border-right:1px solid #D8D8D8;"
            "border-bottom: 1px solid #D8D8D8;"
            "background-color:white;"
        "}")
        self.listWidget.setSortingEnabled(True)
        self.listWidget.setColumnCount(7)
        self.listWidget.setSelectionBehavior(QtWidgets.QTableView.SelectRows);
        self.listWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff);
        tableHeader = self.listWidget.horizontalHeader()
        self.listWidget.setHorizontalHeaderLabels(['Profile', 'Note Type', 'Card Type', 'Field', 'Side', 'Display Type', ''])
        tableHeader.setSectionResizeMode(0, QtWidgets.QHeaderView.Stretch)
        tableHeader.setSectionResizeMode(1, QtWidgets.QHeaderView.Stretch)
        tableHeader.setSectionResizeMode(2, QtWidgets.QHeaderView.Stretch)
        tableHeader.setSectionResizeMode(3, QtWidgets.QHeaderView.Stretch)
        tableHeader.setSectionResizeMode(4, QtWidgets.QHeaderView.Stretch)
        tableHeader.setSectionResizeMode(5, QtWidgets.QHeaderView.Stretch)
        tableHeader.setSectionResizeMode(6, QtWidgets.QHeaderView.Fixed)
        self.listWidget.setColumnWidth(6, 40)
        self.listWidget.setObjectName("listWidget")
        self.listWidget.setEditTriggers(QtWidgets.QTableWidget.NoEditTriggers)
        self.gridLayout.addWidget(self.listWidget, 3, 0, 1, 6)
        self.tabWidget.addTab(self.tab, "")

        self.tab_3 = QtWidgets.QWidget()
        self.tab_3.setObjectName("tab_3")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.tab_3)
        self.gridLayout_3.setContentsMargins(5, 5, 5, 5)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.gridLayout_4 = QtWidgets.QGridLayout()
        self.gridLayout_4.setSpacing(0)
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setSpacing(0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setSpacing(0)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.searchRulesLE = QtWidgets.QLineEdit(self.tab_3)
        self.searchRulesLE.setFixedSize(570, 30)
        self.searchRulesLE.setObjectName("searchRulesLE")
        self.horizontalLayout_3.addWidget(self.searchRulesLE, 0, QtCore.Qt.AlignLeft)
        self.searchRulesButton = QtWidgets.QPushButton(self.tab_3)
        font = QtGui.QFont()
        
        if macLin:
            self.searchRulesButton.setFixedSize(40, 40)
            font.setPointSize(14)
        else:
            self.searchRulesButton.setFixedSize(30, 30)
            font.setPointSize(12)

        self.searchRulesButton.setFont(font)
        self.searchRulesButton.setObjectName("searchRulesButton")
        self.horizontalLayout_3.addWidget(self.searchRulesButton, 0, QtCore.Qt.AlignLeft)
        self.verticalLayout.addLayout(self.horizontalLayout_3)
        self.rulesTable = QtWidgets.QTableView(self.tab_3)
        if isWin and platform.release() == '10' and theme_manager.night_mode != True:
            self.rulesTable.setStyleSheet(
        "QHeaderView::section{"
            "border-top:0px solid #D8D8D8;"
            "border-left:0px solid #D8D8D8;"
            "border-right:1px solid #D8D8D8;"
            "border-bottom: 1px solid #D8D8D8;"
            "background-color:white;"
            "padding:4px;"
        "}"
        "QTableCornerButton::section{"
            "border-top:0px solid #D8D8D8;"
            "border-left:0px solid #D8D8D8;"
            "border-right:1px solid #D8D8D8;"
            "border-bottom: 1px solid #D8D8D8;"
            "background-color:white;"
        "}")
        self.rulesTable.setSelectionBehavior(QtWidgets.QTableView.SelectRows);
        self.rulesTable.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff);
        self.rulesTable.setFixedWidth(600)
        self.rulesTable.setObjectName("rulesTable")
        self.verticalLayout.addWidget(self.rulesTable)
        self.gridLayout_4.addLayout(self.verticalLayout, 0, 0, 1, 1)
        self.gridLayout_3.addLayout(self.gridLayout_4, 0, 0, 1, 1)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setSpacing(4)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.groupBox_2 = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox_2.setObjectName("groupBox_2")
        self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_2)
        self.gridLayout_5.setContentsMargins(5, 5, 5, 5)
        self.gridLayout_5.setObjectName("gridLayout_5")
        self.label_4 = QtWidgets.QLabel(self.groupBox_2)
        self.label_4.setObjectName("label_4")
        self.gridLayout_5.addWidget(self.label_4, 0, 2, 1, 1)
        self.label = QtWidgets.QLabel(self.groupBox_2)
        self.label.setObjectName("label")
        self.gridLayout_5.addWidget(self.label, 0, 0, 1, 1)
        self.originalLE = QtWidgets.QLineEdit(self.groupBox_2)
        self.originalLE.setObjectName("originalLE")
        self.gridLayout_5.addWidget(self.originalLE, 0, 1, 1, 1)
        self.overwriteLE = QtWidgets.QLineEdit(self.groupBox_2)
        self.overwriteLE.setObjectName("overwriteLE")
        self.gridLayout_5.addWidget(self.overwriteLE, 0, 3, 1, 1)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.label_11 = QtWidgets.QLabel(self.groupBox_2)
        self.label_11.setObjectName("label_11")
        self.horizontalLayout_4.addWidget(self.label_11)
        self.gridLayout_5.addLayout(self.horizontalLayout_4, 1, 0, 1, 4)
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_6.setSpacing(2)
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.ncAddCB = QtWidgets.QCheckBox(self.groupBox_2)
        self.ncAddCB.setObjectName("ncAddCB")
        self.horizontalLayout_6.addWidget(self.ncAddCB)
        self.lcAddCB = QtWidgets.QCheckBox(self.groupBox_2)
        self.lcAddCB.setObjectName("lcAddCB")
        self.horizontalLayout_6.addWidget(self.lcAddCB)
        self.gridLayout_5.addLayout(self.horizontalLayout_6, 2, 0, 1, 3)
        self.addRuleButton = QtWidgets.QPushButton(self.groupBox_2)
        self.addRuleButton.setObjectName("addRuleButton")
        self.gridLayout_5.addWidget(self.addRuleButton, 2, 3, 1, 1)
        self.verticalLayout_2.addWidget(self.groupBox_2)
        self.groupBox_9 = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox_9.setObjectName("groupBox_9")
        self.groupBox_9.setFixedHeight(80)
        self.gridLayout_6 = QtWidgets.QGridLayout(self.groupBox_9)
        self.gridLayout_6.setContentsMargins(5, 5, 5, 5)
        self.gridLayout_6.setObjectName("gridLayout_6")
        self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_10.setSpacing(2)
        self.horizontalLayout_10.setObjectName("horizontalLayout_10")
        self.ncAllCB = QtWidgets.QCheckBox(self.groupBox_9)
        self.ncAllCB.setObjectName("ncAllCB")
        self.horizontalLayout_10.addWidget(self.ncAllCB)
        self.lcAllCB = QtWidgets.QCheckBox(self.groupBox_9)
        self.lcAllCB.setObjectName("lcAllCB")
        self.horizontalLayout_10.addWidget(self.lcAllCB)
        self.gridLayout_6.addLayout(self.horizontalLayout_10, 0, 0, 1, 2)
        self.runRulesButton = QtWidgets.QPushButton(self.groupBox_9)
        self.runRulesButton.setFixedWidth(190)
        self.runRulesButton.setObjectName("runRulesButton")
        self.gridLayout_6.addWidget(self.runRulesButton, 0, 2, 1, 1)
        self.verticalLayout_2.addWidget(self.groupBox_9)
        self.groupBox_3 = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox_3.setObjectName("groupBox_3")
        self.groupBox_3.setFixedHeight(60)
        self.importRules = QtWidgets.QPushButton(self.groupBox_3)
        self.importRules.setGeometry(QtCore.QRect(60, 25, 190, 28))
        self.importRules.setObjectName("importRules")
        self.exportRules = QtWidgets.QPushButton(self.groupBox_3)
        self.exportRules.setGeometry(QtCore.QRect(260, 25, 190, 28))
        self.exportRules.setObjectName("exportRules")
        self.verticalLayout_2.addWidget(self.groupBox_3)
        spacerItem13 = QtWidgets.QSpacerItem(20, 350, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
        self.verticalLayout_2.addItem(spacerItem13)
        self.ruleCounter = QtWidgets.QLabel(self.tab_3)
        self.ruleCounter.setObjectName("ruleCounter")
        self.ruleCounter.setFixedHeight(30)
        self.verticalLayout_2.addWidget(self.ruleCounter)
        self.gridLayout_3.addLayout(self.verticalLayout_2, 0, 1, 1, 1)
        self.tabWidget.addTab(self.tab_3, "")
        self.tab_4 = QtWidgets.QWidget()
        self.tab_4.setObjectName("tab_4")
        self.tab4vl = QtWidgets.QVBoxLayout()
        self.migakuAbout = QtWidgets.QGroupBox()
        self.migakuAbout.setTitle('Migaku')
        self.migakuAboutVL = QtWidgets.QVBoxLayout()

        self.migakuAbout.setStyleSheet("QGroupBox { font-weight: bold; } ")
        self.migakuAboutText = QtWidgets.QLabel("This an original Migaku add-on. Migaku seeks to be a comprehensive platform for acquiring foreign languages. The official Migaku website will be published soon!")
        self.migakuAboutText.setWordWrap(True);
        self.migakuAboutText.setOpenExternalLinks(True);
        self.migakuAbout.setLayout(self.migakuAboutVL)
        self.migakuAboutLinksTitle = QtWidgets.QLabel("<b>Links<b>")

        self.migakuPatreonIcon = self.getSVGWidget('Patreon.svg')
        self.migakuPatreonIcon.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))

        self.migakuAboutLinksHL3 = QtWidgets.QHBoxLayout()

        self.migakuInfo = QtWidgets.QLabel("Migaku:")
        self.migakuInfoYT = self.getSVGWidget('Youtube.svg')
        self.migakuInfoSite = self.getSVGWidget('migaku.svg')
        self.migakuInfoSite.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))

        self.migakuInfoYT.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))

        self.migakuInfoTW = self.getSVGWidget('Twitter.svg')
        self.migakuInfoTW.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))

        self.migakuAboutLinksHL3.addWidget(self.migakuInfo)
        self.migakuAboutLinksHL3.addWidget(self.migakuInfoSite)
        self.migakuAboutLinksHL3.addWidget(self.migakuInfoYT)
        self.migakuAboutLinksHL3.addWidget(self.migakuInfoTW)
        self.migakuAboutLinksHL3.addWidget(self.migakuPatreonIcon)
        self.migakuAboutLinksHL3.addStretch()

        self.migakuAboutVL.addWidget(self.migakuAboutText)
        self.migakuAboutVL.addWidget(self.migakuAboutLinksTitle)
        
        self.migakuAboutVL.addLayout(self.migakuAboutLinksHL3)
        
        self.migakuContact = QtWidgets.QGroupBox()
        self.migakuContact.setTitle('Contact Us')
        self.migakuContactVL = QtWidgets.QVBoxLayout()
        self.migakuContact.setStyleSheet("QGroupBox { font-weight: bold; } ")
        self.migakuContactText = QtWidgets.QLabel("If you would like to report a bug or contribute to the add-on, the best way to do so is by starting a ticket or pull request on GitHub. If you are looking for personal assistance using the add-on, check out the Migaku Patreon Discord Server.")
        self.migakuContactText.setWordWrap(True)

        self.gitHubIcon = self.getSVGWidget('Github.svg')
        self.gitHubIcon.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        
        self.migakuThanks = QtWidgets.QGroupBox()
        self.migakuThanks.setTitle('A Word of Thanks')
        self.migakuThanksVL = QtWidgets.QVBoxLayout()
        self.migakuThanks.setStyleSheet("QGroupBox { font-weight: bold; } ")
        self.migakuThanksText = QtWidgets.QLabel("Thanks so much to all Migaku supporters! We would not have been able to develop this add-on or any other Migaku project without your support!")
        self.migakuThanksText.setOpenExternalLinks(True);
        self.migakuThanksText.setWordWrap(True);
        self.migakuThanksVL.addWidget(self.migakuThanksText)

        self.migakuContactVL.addWidget(self.migakuContactText)
        self.migakuContactVL.addWidget(self.gitHubIcon)
        self.migakuContact.setLayout(self.migakuContactVL)
        self.migakuThanks.setLayout(self.migakuThanksVL)
        self.tab4vl.addWidget(self.migakuAbout)
        self.tab4vl.addWidget(self.migakuContact)
        self.tab4vl.addWidget(self.migakuThanks)
        self.tab4vl.addStretch()
        self.tab_4.setLayout(self.tab4vl)
        self.tabWidget.addTab(self.tab_4, "")
        self.restoreDefaults = QtWidgets.QPushButton(Dialog)
        self.restoreDefaults.setGeometry(QtCore.QRect(10, 690, 120, 32))
        self.restoreDefaults.setObjectName("restoreDefaults")
        self.activeProfileCB.setFixedWidth(184)
        self.activeNoteTypeCB.setFixedWidth(184)
        self.activeCardTypeCB.setFixedWidth(184)
        self.activeFieldCB.setFixedWidth(184)
        self.activeSideCB.setFixedWidth(184)
        self.activeDisplayTypeCB.setFixedWidth(180)
        self.retranslateUi(Dialog)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def getSVGWidget(self,  name):
        widget = MigakuSVG(join(self.addon_path, 'icons', name))
        widget.setFixedSize(27,27)
        return widget

    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "Dialog"))

        self.audioOverwrite.setText(_translate("Dialog", "Overwrite"))
        self.audioIfEmpty.setText(_translate("Dialog", "If Empty"))
        self.audioAdd.setText(_translate("Dialog", "Add with Separator:"))
        self.graphOverwrite.setText(_translate("Dialog", "Overwrite"))
        self.graphIfEmpty.setText(_translate("Dialog", "If Empty"))
        self.graphAdd.setText(_translate("Dialog", "Add with Separator:"))
        self.heibanSelect.setText(_translate("Dialog", "Select Color"))
        self.atamadakaSelect.setText(_translate("Dialog", "Select Color"))
        self.nakadakaSelect.setText(_translate("Dialog", "Select Color"))
        self.odakaSelect.setText(_translate("Dialog", "Select Color"))
        self.kifukuSelect.setText(_translate("Dialog", "Select Color"))
        self.activeActionButton.setText(_translate("Dialog", "Add"))
        self.label_10.setText(_translate("Dialog", "Add Migaku Japanese Note Type:"))
        self.label_9.setText(_translate("Dialog", "Auto CSS & JS Generation:"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("Dialog", "Active Fields"))
        self.label_37.setText(_translate("Dialog", "Heiban"))
        self.label_82.setText(_translate("Dialog", "Atamadaka"))
        self.label_83.setText(_translate("Dialog", "Nakadaka"))
        self.label_84.setText(_translate("Dialog", "Odaka"))
        self.label_110.setText(_translate("Dialog", "Kifuku"))
        self.label_39.setText(_translate("Dialog", "<b>Colors<b>"))
        self.label_64.setText(_translate("Dialog", "Furigana Font Size"))
        self.label_63.setText(_translate("Dialog", "<b>Behavior</b>"))
        self.historicalKanji.setText(_translate("Dialog", "Kanji"))
        self.historicalKana.setText(_translate("Dialog", "Kana"))
        self.label_68.setText(_translate("Dialog", "Display Shapes"))
        self.label_40.setText(_translate("Dialog", "Historical Conversion"))
        self.label_69.setText(_translate("Dialog", "Graph On Hover (Front)"))
        self.labelGraphBack.setText(_translate("Dialog", "Graph On Hover (Back)"))
        self.label_111.setText(_translate("Dialog", "Buffered Output"))
        self.label_42.setText(_translate("Dialog", "Audio On Click"))
        self.label_41.setText(_translate("Dialog", "Katakana Conversion"))
        self.label_6.setText(_translate("Dialog", "<b>Generation</b>"))
        self.groupBox_7.setTitle(_translate("Dialog", "Sentence Button (文)"))
        self.label_87.setText(_translate("Dialog", "Pitch Graph"))
        self.label_86.setText(_translate("Dialog", "Kana"))
        self.label_85.setText(_translate("Dialog", "Dictionary Form"))
        self.label_88.setText(_translate("Dialog", "Pitch Accent"))
        self.label_89.setText(_translate("Dialog", "Audio"))
        self.groupBox_8.setTitle(_translate("Dialog", "Word Button (語)"))
        self.label_95.setText(_translate("Dialog", "Pitch Graph"))
        self.label_96.setText(_translate("Dialog", "Kana"))
        self.label_97.setText(_translate("Dialog", "Dictionary Form"))
        self.label_98.setText(_translate("Dialog", "Pitch Accent"))
        self.label_99.setText(_translate("Dialog", "Audio"))
        self.label_30.setText(_translate("Dialog", "Current Pitch Graph Fields:"))
        self.pitchGraphsList.setText(_translate("Dialog", ""))
        self.label_31.setText(_translate("Dialog", "Current Audio Fields:"))
        self.audioFieldsList.setText(_translate("Dialog", ""))
        self.audioFieldsPB.setText(_translate("Dialog", "Add"))
        self.pitchGraphsPB.setText(_translate("Dialog", "Add"))
        self.label_29.setText(_translate("Dialog", "Look Ahead"))
        self.label_23.setText(_translate("Dialog", "Current Profiles:"))
        self.profilesList.setText(_translate("Dialog", ""))
        self.label_3.setText(_translate("Dialog", "<b>Profiles</b>"))
        self.profilesPB.setText(_translate("Dialog", "Add"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("Dialog", "Options"))
        self.searchRulesButton.setIcon(QtGui.QIcon(join(self.addon_path, 'icons', 'search.png')))
        self.groupBox_2.setTitle(_translate("Dialog", "Add New Parsing Overwrite Rule"))
        self.label_4.setText(_translate("Dialog", "Overwrite"))
        self.label.setText(_translate("Dialog", "Original"))
        self.label_11.setText(_translate("Dialog", "Apply to current collection:"))
        self.ncAddCB.setText(_translate("Dialog", "New Cards"))
        self.lcAddCB.setText(_translate("Dialog", "Learned Cards"))
        self.addRuleButton.setText(_translate("Dialog", "Add"))
        self.groupBox_9.setTitle(_translate("Dialog", "Apply All Rules to Current Collection"))
        self.ncAllCB.setText(_translate("Dialog", "New Cards"))
        self.lcAllCB.setText(_translate("Dialog", "Learned Cards"))
        self.runRulesButton.setText(_translate("Dialog", "Run"))
        self.groupBox_3.setTitle(_translate("Dialog", "Import/Export Rule List"))
        self.importRules.setText(_translate("Dialog", "Import"))
        self.exportRules.setText(_translate("Dialog", "Export"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("Dialog", "Overwrite Rules"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), _translate("Dialog", "About"))
        self.restoreDefaults.setText(_translate("Dialog", "Restore Defaults"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Dialog = QtWidgets.QDialog()
    ui = Ui_Dialog()
    ui.setupUi(Dialog)
    Dialog.show()
    sys.exit(app.exec_())

