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

# Form implementation generated from reading ui file 'C:\Users\cem\.qgis\python\plugins\FlowMapper\ui_flowmapper.ui'
#
# Created: Mon Jan 28 00:33:48 2013
#      by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    _fromUtf8 = lambda s: s

class Ui_FlowMapper(object):
    def setupUi(self, FlowMapper):
        FlowMapper.setObjectName(_fromUtf8("FlowMapper"))
        FlowMapper.setWindowModality(QtCore.Qt.NonModal)
        FlowMapper.resize(480, 290)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/flowmapper/icon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        FlowMapper.setWindowIcon(icon)
        FlowMapper.setModal(False)
        self.buttonBox = QtGui.QDialogButtonBox(FlowMapper)
        self.buttonBox.setEnabled(True)
        self.buttonBox.setGeometry(QtCore.QRect(305, 250, 160, 25))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.BrowseShapeLineEdit = QtGui.QLineEdit(FlowMapper)
        self.BrowseShapeLineEdit.setEnabled(False)
        self.BrowseShapeLineEdit.setGeometry(QtCore.QRect(190, 140, 190, 20))
        self.BrowseShapeLineEdit.setText(_fromUtf8(""))
        self.BrowseShapeLineEdit.setObjectName(_fromUtf8("BrowseShapeLineEdit"))
        self.BrowseShape = QtGui.QPushButton(FlowMapper)
        self.BrowseShape.setGeometry(QtCore.QRect(390, 140, 75, 23))
        self.BrowseShape.setObjectName(_fromUtf8("BrowseShape"))
        self.BrowseNodesLineEdit = QtGui.QLineEdit(FlowMapper)
        self.BrowseNodesLineEdit.setEnabled(False)
        self.BrowseNodesLineEdit.setGeometry(QtCore.QRect(190, 20, 190, 20))
        self.BrowseNodesLineEdit.setText(_fromUtf8(""))
        self.BrowseNodesLineEdit.setObjectName(_fromUtf8("BrowseNodesLineEdit"))
        self.BrowseNodes = QtGui.QPushButton(FlowMapper)
        self.BrowseNodes.setGeometry(QtCore.QRect(390, 20, 75, 24))
        self.BrowseNodes.setObjectName(_fromUtf8("BrowseNodes"))
        self.label_02 = QtGui.QLabel(FlowMapper)
        self.label_02.setGeometry(QtCore.QRect(10, 80, 150, 20))
        self.label_02.setObjectName(_fromUtf8("label_02"))
        self.label_01 = QtGui.QLabel(FlowMapper)
        self.label_01.setGeometry(QtCore.QRect(10, 20, 180, 20))
        self.label_01.setObjectName(_fromUtf8("label_01"))
        self.BrowseMatrixLineEdit = QtGui.QLineEdit(FlowMapper)
        self.BrowseMatrixLineEdit.setEnabled(False)
        self.BrowseMatrixLineEdit.setGeometry(QtCore.QRect(190, 80, 190, 20))
        self.BrowseMatrixLineEdit.setText(_fromUtf8(""))
        self.BrowseMatrixLineEdit.setObjectName(_fromUtf8("BrowseMatrixLineEdit"))
        self.BrowseMatrix = QtGui.QPushButton(FlowMapper)
        self.BrowseMatrix.setGeometry(QtCore.QRect(390, 80, 75, 23))
        self.BrowseMatrix.setObjectName(_fromUtf8("BrowseMatrix"))
        self.label_04 = QtGui.QLabel(FlowMapper)
        self.label_04.setGeometry(QtCore.QRect(10, 140, 180, 20))
        self.label_04.setObjectName(_fromUtf8("label_04"))
        self.label_03 = QtGui.QLabel(FlowMapper)
        self.label_03.setGeometry(QtCore.QRect(10, 110, 101, 20))
        self.label_03.setObjectName(_fromUtf8("label_03"))
        self.NetRadioButton = QtGui.QRadioButton(FlowMapper)
        self.NetRadioButton.setGeometry(QtCore.QRect(340, 110, 41, 17))
        self.NetRadioButton.setChecked(True)
        self.NetRadioButton.setObjectName(_fromUtf8("NetRadioButton"))
        self.GrossRadioButton = QtGui.QRadioButton(FlowMapper)
        self.GrossRadioButton.setGeometry(QtCore.QRect(270, 110, 51, 17))
        self.GrossRadioButton.setObjectName(_fromUtf8("GrossRadioButton"))
        self.TwowayRadioButton = QtGui.QRadioButton(FlowMapper)
        self.TwowayRadioButton.setGeometry(QtCore.QRect(190, 110, 71, 17))
        self.TwowayRadioButton.setCheckable(True)
        self.TwowayRadioButton.setChecked(False)
        self.TwowayRadioButton.setObjectName(_fromUtf8("TwowayRadioButton"))
        self.comboBox = QtGui.QComboBox(FlowMapper)
        self.comboBox.setGeometry(QtCore.QRect(300, 50, 81, 22))
        self.comboBox.setObjectName(_fromUtf8("comboBox"))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.label_5 = QtGui.QLabel(FlowMapper)
        self.label_5.setGeometry(QtCore.QRect(190, 50, 111, 20))
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.Add2MapcheckBox = QtGui.QCheckBox(FlowMapper)
        self.Add2MapcheckBox.setEnabled(True)
        self.Add2MapcheckBox.setGeometry(QtCore.QRect(10, 180, 231, 17))
        self.Add2MapcheckBox.setChecked(True)
        self.Add2MapcheckBox.setObjectName(_fromUtf8("Add2MapcheckBox"))
        self.comboBoxSelectSymbology = QtGui.QComboBox(FlowMapper)
        self.comboBoxSelectSymbology.setEnabled(True)
        self.comboBoxSelectSymbology.setGeometry(QtCore.QRect(340, 180, 124, 22))
        self.comboBoxSelectSymbology.setObjectName(_fromUtf8("comboBoxSelectSymbology"))
        self.comboBoxSelectSymbology.addItem(_fromUtf8(""))
        self.comboBoxSelectSymbology.addItem(_fromUtf8(""))
        self.comboBoxSelectSymbology.addItem(_fromUtf8(""))
        self.comboBoxSelectSymbology.addItem(_fromUtf8(""))
        self.comboBoxSelectSymbology.addItem(_fromUtf8(""))
        self.spinBoxClasses = QtGui.QSpinBox(FlowMapper)
        self.spinBoxClasses.setEnabled(False)
        self.spinBoxClasses.setGeometry(QtCore.QRect(90, 210, 51, 22))
        self.spinBoxClasses.setMinimum(2)
        self.spinBoxClasses.setProperty(_fromUtf8("value"), 2)
        self.spinBoxClasses.setObjectName(_fromUtf8("spinBoxClasses"))
        self.lineEditInterval = QtGui.QLineEdit(FlowMapper)
        self.lineEditInterval.setEnabled(False)
        self.lineEditInterval.setGeometry(QtCore.QRect(230, 210, 51, 20))
        self.lineEditInterval.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.lineEditInterval.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.lineEditInterval.setObjectName(_fromUtf8("lineEditInterval"))
        self.label_6 = QtGui.QLabel(FlowMapper)
        self.label_6.setGeometry(QtCore.QRect(150, 210, 81, 20))
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.label_7 = QtGui.QLabel(FlowMapper)
        self.label_7.setGeometry(QtCore.QRect(10, 210, 81, 20))
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.comboBoxSelectStdDev = QtGui.QComboBox(FlowMapper)
        self.comboBoxSelectStdDev.setEnabled(False)
        self.comboBoxSelectStdDev.setGeometry(QtCore.QRect(370, 210, 94, 22))
        self.comboBoxSelectStdDev.setObjectName(_fromUtf8("comboBoxSelectStdDev"))
        self.comboBoxSelectStdDev.addItem(_fromUtf8(""))
        self.comboBoxSelectStdDev.addItem(_fromUtf8(""))
        self.comboBoxSelectStdDev.addItem(_fromUtf8(""))
        self.comboBoxSelectStdDev.addItem(_fromUtf8(""))
        self.label_8 = QtGui.QLabel(FlowMapper)
        self.label_8.setGeometry(QtCore.QRect(290, 210, 81, 20))
        self.label_8.setObjectName(_fromUtf8("label_8"))

#----------------------------------------------------------------------------------------------------------------------------------------#
#----------------------------------------------------------------------------------------------------------------------------------------#
        self.retranslateUi(FlowMapper)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), FlowMapper.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), FlowMapper.reject)
        QtCore.QObject.connect(self.Add2MapcheckBox, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.comboBoxSelectSymbology.setEnabled)
        QtCore.QObject.connect(self.Add2MapcheckBox, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.reset_enable_disable_state)
        QtCore.QObject.connect(self.comboBoxSelectSymbology, QtCore.SIGNAL(_fromUtf8("currentIndexChanged(int)")), self.enable_disable)
        QtCore.QMetaObject.connectSlotsByName(FlowMapper)        
#----------------------------------------------------------------------------------------------------------------------------------------#
#----------------------------------------------------------------------------------------------------------------------------------------#

        FlowMapper.setTabOrder(self.BrowseNodesLineEdit, self.BrowseNodes)
        FlowMapper.setTabOrder(self.BrowseNodes, self.comboBox)
        FlowMapper.setTabOrder(self.comboBox, self.BrowseMatrixLineEdit)
        FlowMapper.setTabOrder(self.BrowseMatrixLineEdit, self.BrowseMatrix)
        FlowMapper.setTabOrder(self.BrowseMatrix, self.TwowayRadioButton)
        FlowMapper.setTabOrder(self.TwowayRadioButton, self.GrossRadioButton)
        FlowMapper.setTabOrder(self.GrossRadioButton, self.NetRadioButton)
        FlowMapper.setTabOrder(self.NetRadioButton, self.BrowseShapeLineEdit)
        FlowMapper.setTabOrder(self.BrowseShapeLineEdit, self.BrowseShape)
        FlowMapper.setTabOrder(self.BrowseShape, self.Add2MapcheckBox)
        FlowMapper.setTabOrder(self.Add2MapcheckBox, self.comboBoxSelectSymbology)
        FlowMapper.setTabOrder(self.comboBoxSelectSymbology, self.spinBoxClasses)
        FlowMapper.setTabOrder(self.spinBoxClasses, self.lineEditInterval)
        FlowMapper.setTabOrder(self.lineEditInterval, self.comboBoxSelectStdDev)
        FlowMapper.setTabOrder(self.comboBoxSelectStdDev, self.buttonBox)

#----------------------------------------------------------------------------------------------------------------------------------------#
#----------------------------------------------------------------------------------------------------------------------------------------#
    def reset_enable_disable_state(self):
        self.comboBoxSelectSymbology.setCurrentIndex(0)
        self.spinBoxClasses.setEnabled(False)
        self.lineEditInterval.setEnabled(False)
        self.comboBoxSelectStdDev.setEnabled(False)
    def enable_disable(self):
        if self.comboBoxSelectSymbology.currentText() == "Single Symbol":
            self.spinBoxClasses.setEnabled(False)
            self.lineEditInterval.setEnabled(False)
            self.comboBoxSelectStdDev.setEnabled(False)
        elif self.comboBoxSelectSymbology.currentText() == "Equal Size Classes":
            self.spinBoxClasses.setEnabled(True)
            self.lineEditInterval.setEnabled(False)
            self.comboBoxSelectStdDev.setEnabled(False)            
        elif self.comboBoxSelectSymbology.currentText() == "Equal Interval":
            self.spinBoxClasses.setEnabled(True)
            self.lineEditInterval.setEnabled(False)
            self.comboBoxSelectStdDev.setEnabled(False)  
        elif self.comboBoxSelectSymbology.currentText() == "Defined Interval":
            self.spinBoxClasses.setEnabled(False)
            self.lineEditInterval.setEnabled(True)
            self.comboBoxSelectStdDev.setEnabled(False)            
        elif self.comboBoxSelectSymbology.currentText() == "Standard Deviation":
            self.spinBoxClasses.setEnabled(False)
            self.lineEditInterval.setEnabled(False)
            self.comboBoxSelectStdDev.setEnabled(True)          
#----------------------------------------------------------------------------------------------------------------------------------------#
#----------------------------------------------------------------------------------------------------------------------------------------#
        
    def retranslateUi(self, FlowMapper):
        FlowMapper.setWindowTitle(QtGui.QApplication.translate("FlowMapper", "Flow Mapper", None, QtGui.QApplication.UnicodeUTF8))
        self.BrowseShape.setText(QtGui.QApplication.translate("FlowMapper", "Browse...", None, QtGui.QApplication.UnicodeUTF8))
        self.BrowseNodes.setText(QtGui.QApplication.translate("FlowMapper", "Browse...", None, QtGui.QApplication.UnicodeUTF8))
        self.label_02.setText(QtGui.QApplication.translate("FlowMapper", "Select file storing flow matrix :", None, QtGui.QApplication.UnicodeUTF8))
        self.label_01.setText(QtGui.QApplication.translate("FlowMapper", "Select file storing node coordinates :", None, QtGui.QApplication.UnicodeUTF8))
        self.BrowseMatrix.setText(QtGui.QApplication.translate("FlowMapper", "Browse...", None, QtGui.QApplication.UnicodeUTF8))
        self.label_04.setText(QtGui.QApplication.translate("FlowMapper", "Output shapefile to store flow lines :", None, QtGui.QApplication.UnicodeUTF8))
        self.label_03.setText(QtGui.QApplication.translate("FlowMapper", "Select flow type :", None, QtGui.QApplication.UnicodeUTF8))
        self.NetRadioButton.setText(QtGui.QApplication.translate("FlowMapper", "Net", None, QtGui.QApplication.UnicodeUTF8))
        self.GrossRadioButton.setText(QtGui.QApplication.translate("FlowMapper", "Gross", None, QtGui.QApplication.UnicodeUTF8))
        self.TwowayRadioButton.setText(QtGui.QApplication.translate("FlowMapper", "Two Way", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(0, QtGui.QApplication.translate("FlowMapper", "Geographic", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(1, QtGui.QApplication.translate("FlowMapper", "Cartesian", None, QtGui.QApplication.UnicodeUTF8))
        self.label_5.setText(QtGui.QApplication.translate("FlowMapper", "Node coordinates are", None, QtGui.QApplication.UnicodeUTF8))
        self.Add2MapcheckBox.setText(QtGui.QApplication.translate("FlowMapper", "Add shapefile to map canvas after creating", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBoxSelectSymbology.setItemText(0, QtGui.QApplication.translate("FlowMapper", "Single Symbol", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBoxSelectSymbology.setItemText(1, QtGui.QApplication.translate("FlowMapper", "Equal Size Classes", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBoxSelectSymbology.setItemText(2, QtGui.QApplication.translate("FlowMapper", "Equal Interval", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBoxSelectSymbology.setItemText(3, QtGui.QApplication.translate("FlowMapper", "Defined Interval", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBoxSelectSymbology.setItemText(4, QtGui.QApplication.translate("FlowMapper", "Standard Deviation", None, QtGui.QApplication.UnicodeUTF8))
        self.lineEditInterval.setText(QtGui.QApplication.translate("FlowMapper", "100", None, QtGui.QApplication.UnicodeUTF8))
        self.label_6.setText(QtGui.QApplication.translate("FlowMapper", "Class interval :", None, QtGui.QApplication.UnicodeUTF8))
        self.label_7.setText(QtGui.QApplication.translate("FlowMapper", "No. of classes :", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBoxSelectStdDev.setItemText(0, QtGui.QApplication.translate("FlowMapper", "1/4 Std. Dev", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBoxSelectStdDev.setItemText(1, QtGui.QApplication.translate("FlowMapper", "1/2 Std. Dev", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBoxSelectStdDev.setItemText(2, QtGui.QApplication.translate("FlowMapper", "1 Std. Dev", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBoxSelectStdDev.setItemText(3, QtGui.QApplication.translate("FlowMapper", "2 Std. Dev", None, QtGui.QApplication.UnicodeUTF8))
        self.label_8.setText(QtGui.QApplication.translate("FlowMapper", "Class Interval :", None, QtGui.QApplication.UnicodeUTF8))

import resources
