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

# Form implementation generated from reading ui file 'Regular.ui'
#
# Created: Thu Nov 18 15:46:10 2010
#      by: PyQt4 UI code generator 4.7.4
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

class Ui_MainForm(object):
    def setupUi(self, MainForm):
        MainForm.setObjectName("MainForm")
        MainForm.resize(440, 460)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(MainForm.sizePolicy().hasHeightForWidth())
        MainForm.setSizePolicy(sizePolicy)
        # set font
        setFont(MainForm)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icon/icon_32x32.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainForm.setWindowIcon(icon)
        MainForm.setStyleSheet("None")
        self.verticalLayout = QtGui.QVBoxLayout(MainForm)
        self.verticalLayout.setMargin(5)
        self.verticalLayout.setObjectName("verticalLayout")
        self.RegSet = QtGui.QHBoxLayout()
        self.RegSet.setObjectName("RegSet")
        self.SetGroupBox = QtGui.QGroupBox(MainForm)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.SetGroupBox.sizePolicy().hasHeightForWidth())
        self.SetGroupBox.setSizePolicy(sizePolicy)
        self.SetGroupBox.setObjectName("SetGroupBox")
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.SetGroupBox)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.TextCode = QtGui.QPlainTextEdit(self.SetGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.TextCode.sizePolicy().hasHeightForWidth())
        self.TextCode.setSizePolicy(sizePolicy)
        self.TextCode.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.TextCode.setLineWidth(1)
        self.TextCode.setObjectName("TextCode")
        self.verticalLayout_2.addWidget(self.TextCode)
        self.SetChild_1 = QtGui.QHBoxLayout()
        self.SetChild_1.setObjectName("SetChild_1")
        self.SetLetter = QtGui.QCheckBox(self.SetGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.SetLetter.sizePolicy().hasHeightForWidth())
        self.SetLetter.setSizePolicy(sizePolicy)
        self.SetLetter.setObjectName("SetLetter")
        self.SetChild_1.addWidget(self.SetLetter)
        self.SetGlobal = QtGui.QCheckBox(self.SetGroupBox)
        self.SetGlobal.setChecked(True)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.SetGlobal.sizePolicy().hasHeightForWidth())
        self.SetGlobal.setSizePolicy(sizePolicy)
        self.SetGlobal.setObjectName("SetGlobal")
        self.SetChild_1.addWidget(self.SetGlobal)
        self.SetMultiline = QtGui.QCheckBox(self.SetGroupBox)
        self.SetMultiline.setChecked(True)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.SetMultiline.sizePolicy().hasHeightForWidth())
        self.SetMultiline.setSizePolicy(sizePolicy)
        self.SetMultiline.setObjectName("SetMultiline")
        self.SetChild_1.addWidget(self.SetMultiline)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.SetChild_1.addItem(spacerItem)
        self.QCButton = QtGui.QPushButton(self.SetGroupBox)
        self.QCButton.setMinimumSize(QtCore.QSize(90, 28))
        self.QCButton.setObjectName("QCButton")
        self.SetChild_1.addWidget(self.QCButton)
        self.verticalLayout_2.addLayout(self.SetChild_1)
        self.SetChild_2 = QtGui.QHBoxLayout()
        self.SetChild_2.setObjectName("SetChild_2")
        self.SetReplace = QtGui.QCheckBox(self.SetGroupBox)
        self.SetReplace.setObjectName("SetReplace")
        self.SetChild_2.addWidget(self.SetReplace)
        self.TextReplacer = QtGui.QLineEdit(self.SetGroupBox)
        self.TextReplacer.setDisabled(True)
        self.TextReplacer.setObjectName("TextReplacer")
        self.SetChild_2.addWidget(self.TextReplacer)
        self.verticalLayout_2.addLayout(self.SetChild_2)
        self.RegSet.addWidget(self.SetGroupBox)
        self.verticalLayout.addLayout(self.RegSet)
        self.RegText = QtGui.QHBoxLayout()
        self.RegText.setObjectName("RegText")
        self.TextGroupBox = QtGui.QGroupBox(MainForm)
        self.TextGroupBox.setObjectName("TextGroupBox")
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.TextGroupBox)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.TextMatch = QtGui.QPlainTextEdit(self.TextGroupBox)
        self.TextMatch.setEnabled(True)
        self.TextMatch.setTabStopWidth(28)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.TextMatch.sizePolicy().hasHeightForWidth())
        self.TextMatch.setSizePolicy(sizePolicy)
        self.TextMatch.setBaseSize(QtCore.QSize(0, 0))
        self.TextMatch.setObjectName("TextMatch")
        self.verticalLayout_3.addWidget(self.TextMatch)
        self.RegText.addWidget(self.TextGroupBox)
        self.verticalLayout.addLayout(self.RegText)
        self.RegResualt = QtGui.QHBoxLayout()
        self.RegResualt.setObjectName("RegResualt")
        self.ResualtGroupBox = QtGui.QGroupBox(MainForm)
        self.ResualtGroupBox.setObjectName("ResualtGroupBox")
        self.verticalLayout_4 = QtGui.QVBoxLayout(self.ResualtGroupBox)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.TextResualt = QtGui.QPlainTextEdit(self.ResualtGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.TextResualt.sizePolicy().hasHeightForWidth())
        self.TextResualt.setSizePolicy(sizePolicy)
        self.TextResualt.setReadOnly(True)
        self.TextResualt.setObjectName("TextResualt")
        self.verticalLayout_4.addWidget(self.TextResualt)
        self.RegResualt.addWidget(self.ResualtGroupBox)
        self.verticalLayout.addLayout(self.RegResualt)

        # set font
        setFont(self.SetLetter)
        setFont(self.SetGlobal)
        setFont(self.SetMultiline)
        setFont(self.QCButton)
        setFont(self.SetReplace)
        setFont(self.TextReplacer)

        setFont(self.TextCode)
        setFont(self.TextMatch)
        setFont(self.TextResualt)

        self.retranslateUi(MainForm)
        QtCore.QMetaObject.connectSlotsByName(MainForm)

    def retranslateUi(self, MainForm):
        MainForm.setWindowTitle(QtGui.QApplication.translate("MainForm", "PyRegEx Tester", None, QtGui.QApplication.UnicodeUTF8))
        self.SetGroupBox.setTitle(QtGui.QApplication.translate("MainForm", "正则表达式", None, QtGui.QApplication.UnicodeUTF8))
        self.SetLetter.setText(QtGui.QApplication.translate("MainForm", "大小写注意", None, QtGui.QApplication.UnicodeUTF8))
        self.SetGlobal.setText(QtGui.QApplication.translate("MainForm", "全局", None, QtGui.QApplication.UnicodeUTF8))
        self.SetMultiline.setText(QtGui.QApplication.translate("MainForm", "多行", None, QtGui.QApplication.UnicodeUTF8))
        self.QCButton.setText(QtGui.QApplication.translate("MainForm", "用户选项", None, QtGui.QApplication.UnicodeUTF8))
        self.SetReplace.setText(QtGui.QApplication.translate("MainForm", "替换", None, QtGui.QApplication.UnicodeUTF8))
        self.TextGroupBox.setTitle(QtGui.QApplication.translate("MainForm", "查找文本", None, QtGui.QApplication.UnicodeUTF8))
        self.ResualtGroupBox.setTitle(QtGui.QApplication.translate("MainForm", "结果", None, QtGui.QApplication.UnicodeUTF8))


class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(480, 159)
        Dialog.setMinimumSize(QtCore.QSize(400, 0))
        self.verticalLayout = QtGui.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.label = QtGui.QLabel(Dialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setMinimumSize(QtCore.QSize(36, 0))
        self.label.setObjectName("label")
        self.horizontalLayout_2.addWidget(self.label)
        self.RegName = QtGui.QLineEdit(Dialog)
        self.RegName.setMinimumSize(QtCore.QSize(0, 25))
        self.RegName.setObjectName("RegName")
        self.horizontalLayout_2.addWidget(self.RegName)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.label_2 = QtGui.QLabel(Dialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy)
        self.label_2.setMinimumSize(QtCore.QSize(0, 0))
        self.label_2.setMaximumSize(QtCore.QSize(36, 16777215))
        self.label_2.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout_3.addWidget(self.label_2)
        self.RegCode = QtGui.QPlainTextEdit(Dialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.RegCode.sizePolicy().hasHeightForWidth())
        self.RegCode.setSizePolicy(sizePolicy)
        self.RegCode.setObjectName("RegCode")
        self.horizontalLayout_3.addWidget(self.RegCode)
        self.verticalLayout.addLayout(self.horizontalLayout_3)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.BtnSave = QtGui.QPushButton(Dialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.BtnSave.sizePolicy().hasHeightForWidth())
        self.BtnSave.setSizePolicy(sizePolicy)
        self.BtnSave.setMinimumSize(QtCore.QSize(0, 0))
        self.BtnSave.setMaximumSize(QtCore.QSize(16777215, 27))
        self.BtnSave.setObjectName("BtnSave")
        self.horizontalLayout.addWidget(self.BtnSave)
        self.BtnCancel = QtGui.QPushButton(Dialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.BtnCancel.sizePolicy().hasHeightForWidth())
        self.BtnCancel.setSizePolicy(sizePolicy)
        self.BtnCancel.setMinimumSize(QtCore.QSize(0, 27))
        self.BtnCancel.setMaximumSize(QtCore.QSize(16777215, 27))
        self.BtnCancel.setObjectName("BtnCancel")
        self.horizontalLayout.addWidget(self.BtnCancel)
        self.verticalLayout.addLayout(self.horizontalLayout)

        # set font
        setFont(self.label)
        setFont(self.label_2)
        setFont(self.RegName)
        setFont(self.RegCode)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Dialog", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("Dialog", "名字", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(QtGui.QApplication.translate("Dialog", "表达式", None, QtGui.QApplication.UnicodeUTF8))
        self.BtnSave.setText(QtGui.QApplication.translate("Dialog", "确定", None, QtGui.QApplication.UnicodeUTF8))
        self.BtnCancel.setText(QtGui.QApplication.translate("Dialog", "取消", None, QtGui.QApplication.UnicodeUTF8))


def setFont (ele):
    font = QtGui.QFont()
    font.setFamily(u"Courier New,微软雅黑")
    ele.setFont(font)