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

# Form implementation generated from reading ui file 'shopgen.ui'
#
# Created: Sat Mar 29 20:59:38 2014
#      by: PyQt4 UI code generator 4.9.6
#
# 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_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.setWindowModality(QtCore.Qt.ApplicationModal)
        Dialog.resize(778, 565)
        self.gridLayout_2 = QtGui.QGridLayout(Dialog)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.groupBox = QtGui.QGroupBox(Dialog)
        self.groupBox.setMaximumSize(QtCore.QSize(16777215, 83))
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.gridLayout_4 = QtGui.QGridLayout(self.groupBox)
        self.gridLayout_4.setMargin(9)
        self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
        self.fielddelim_le = QtGui.QLineEdit(self.groupBox)
        self.fielddelim_le.setObjectName(_fromUtf8("fielddelim_le"))
        self.gridLayout_4.addWidget(self.fielddelim_le, 1, 5, 1, 1)
        self.skip_cb = QtGui.QCheckBox(self.groupBox)
        self.skip_cb.setObjectName(_fromUtf8("skip_cb"))
        self.gridLayout_4.addWidget(self.skip_cb, 1, 0, 1, 2)
        self.textdelim_le = QtGui.QLineEdit(self.groupBox)
        self.textdelim_le.setObjectName(_fromUtf8("textdelim_le"))
        self.gridLayout_4.addWidget(self.textdelim_le, 1, 3, 1, 1)
        self.label_2 = QtGui.QLabel(self.groupBox)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout_4.addWidget(self.label_2, 1, 2, 1, 1)
        self.label = QtGui.QLabel(self.groupBox)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout_4.addWidget(self.label, 0, 0, 1, 1)
        self.label_3 = QtGui.QLabel(self.groupBox)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout_4.addWidget(self.label_3, 1, 4, 1, 1)
        self.label_7 = QtGui.QLabel(self.groupBox)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.gridLayout_4.addWidget(self.label_7, 1, 6, 1, 1)
        self.encoding_cb = QtGui.QComboBox(self.groupBox)
        self.encoding_cb.setObjectName(_fromUtf8("encoding_cb"))
        self.encoding_cb.addItem(_fromUtf8(""))
        self.encoding_cb.addItem(_fromUtf8(""))
        self.gridLayout_4.addWidget(self.encoding_cb, 1, 7, 1, 1)
        self.fname_le = LineEditButton(self.groupBox)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/folder.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.fname_le.setIcon(icon)
        self.fname_le.setObjectName(_fromUtf8("fname_le"))
        self.gridLayout_4.addWidget(self.fname_le, 0, 1, 1, 7)
        self.gridLayout_2.addWidget(self.groupBox, 0, 0, 1, 2)
        self.preview_pb = QtGui.QPushButton(Dialog)
        self.preview_pb.setObjectName(_fromUtf8("preview_pb"))
        self.gridLayout_2.addWidget(self.preview_pb, 2, 0, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(Dialog)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridLayout_2.addWidget(self.buttonBox, 2, 1, 1, 1)
        self.splitter = QtGui.QSplitter(Dialog)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName(_fromUtf8("splitter"))
        self.frame = QtGui.QFrame(self.splitter)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(3)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
        self.frame.setSizePolicy(sizePolicy)
        self.frame.setObjectName(_fromUtf8("frame"))
        self.gridLayout = QtGui.QGridLayout(self.frame)
        self.gridLayout.setMargin(0)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.add_tb = QtGui.QToolButton(self.frame)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/add.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.add_tb.setIcon(icon1)
        self.add_tb.setAutoRaise(True)
        self.add_tb.setObjectName(_fromUtf8("add_tb"))
        self.gridLayout.addWidget(self.add_tb, 0, 0, 1, 1)
        self.remove_tb = QtGui.QToolButton(self.frame)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/delete.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.remove_tb.setIcon(icon2)
        self.remove_tb.setAutoRaise(True)
        self.remove_tb.setObjectName(_fromUtf8("remove_tb"))
        self.gridLayout.addWidget(self.remove_tb, 0, 1, 1, 1)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 0, 2, 1, 1)
        self.templates_lv = QtGui.QListView(self.frame)
        self.templates_lv.setAlternatingRowColors(True)
        self.templates_lv.setObjectName(_fromUtf8("templates_lv"))
        self.gridLayout.addWidget(self.templates_lv, 1, 0, 1, 3)
        self.frame_2 = QtGui.QFrame(self.splitter)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(5)
        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_3 = QtGui.QGridLayout(self.frame_2)
        self.gridLayout_3.setMargin(0)
        self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
        self.label_4 = QtGui.QLabel(self.frame_2)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridLayout_3.addWidget(self.label_4, 0, 0, 1, 1)
        self.label_5 = QtGui.QLabel(self.frame_2)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.gridLayout_3.addWidget(self.label_5, 1, 0, 1, 1)
        self.cat_le = SingleLinePlainText(self.frame_2)
        self.cat_le.setObjectName(_fromUtf8("cat_le"))
        self.gridLayout_3.addWidget(self.cat_le, 1, 1, 1, 1)
        self.label_6 = QtGui.QLabel(self.frame_2)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.gridLayout_3.addWidget(self.label_6, 1, 2, 1, 1)
        self.tags_le = SingleLinePlainText(self.frame_2)
        self.tags_le.setObjectName(_fromUtf8("tags_le"))
        self.gridLayout_3.addWidget(self.tags_le, 1, 3, 1, 1)
        self.editor_sc = Qsci.QsciScintilla(self.frame_2)
        self.editor_sc.setToolTip(_fromUtf8(""))
        self.editor_sc.setWhatsThis(_fromUtf8(""))
        self.editor_sc.setObjectName(_fromUtf8("editor_sc"))
        self.gridLayout_3.addWidget(self.editor_sc, 2, 0, 1, 4)
        self.title_le = SingleLinePlainText(self.frame_2)
        self.title_le.setObjectName(_fromUtf8("title_le"))
        self.gridLayout_3.addWidget(self.title_le, 0, 1, 1, 3)
        self.gridLayout_2.addWidget(self.splitter, 1, 0, 1, 2)

        self.retranslateUi(Dialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
        Dialog.setTabOrder(self.skip_cb, self.textdelim_le)
        Dialog.setTabOrder(self.textdelim_le, self.fielddelim_le)
        Dialog.setTabOrder(self.fielddelim_le, self.encoding_cb)
        Dialog.setTabOrder(self.encoding_cb, self.title_le)
        Dialog.setTabOrder(self.title_le, self.cat_le)
        Dialog.setTabOrder(self.cat_le, self.tags_le)
        Dialog.setTabOrder(self.tags_le, self.editor_sc)
        Dialog.setTabOrder(self.editor_sc, self.preview_pb)
        Dialog.setTabOrder(self.preview_pb, self.buttonBox)

    def retranslateUi(self, Dialog):
        Dialog.setWindowTitle(_translate("Dialog", "Генератор магазинов", None))
        self.groupBox.setTitle(_translate("Dialog", "Настроки CSV", None))
        self.fielddelim_le.setText(_translate("Dialog", ";", None))
        self.skip_cb.setText(_translate("Dialog", "Пропускать первую строку", None))
        self.textdelim_le.setText(_translate("Dialog", "\"", None))
        self.label_2.setText(_translate("Dialog", "Разделитель текста", None))
        self.label.setText(_translate("Dialog", "Данные", None))
        self.label_3.setText(_translate("Dialog", "Разделитель полей", None))
        self.label_7.setText(_translate("Dialog", "Кодировка", None))
        self.encoding_cb.setItemText(0, _translate("Dialog", "UTF-8", None))
        self.encoding_cb.setItemText(1, _translate("Dialog", "CP1251", None))
        self.preview_pb.setText(_translate("Dialog", "Просмотр", None))
        self.add_tb.setText(_translate("Dialog", "...", None))
        self.remove_tb.setText(_translate("Dialog", "...", None))
        self.label_4.setText(_translate("Dialog", "Заголовок", None))
        self.label_5.setText(_translate("Dialog", "Категория", None))
        self.cat_le.setPlainText(_translate("Dialog", "{{ row.1 }}", None))
        self.label_6.setText(_translate("Dialog", "Метки", None))
        self.tags_le.setPlainText(_translate("Dialog", "{{ row.2 }}", None))
        self.title_le.setPlainText(_translate("Dialog", "{{ row.0 }}", None))

from PyQt4 import Qsci
from singlelineplaintext import SingleLinePlainText
from lineeditbutton import LineEditButton
import icons_rc

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

