'''
Created on 09.09.2013

@author: hmeissner
'''
from PyQt4 import QtCore, QtGui

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

class GraphView(QtGui.QWidget):
    ''' represents the GUI of the GraphEditor '''

    def setupUi(self, Form):
        ''' sets up all graphical components like frames, pushbuttons, labels etc '''
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(551, 322)
        self.frame = QtGui.QFrame(Form)
        self.frame.setGeometry(QtCore.QRect(10, 10, 531, 131))
        self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtGui.QFrame.Raised)
        self.frame.setObjectName(_fromUtf8("frame"))
        self.label = QtGui.QLabel(self.frame)
        self.label.setGeometry(QtCore.QRect(10, 0, 91, 30))
        self.label.setObjectName(_fromUtf8("label"))
        self.font = QtGui.QFont()
        self.font.setBold(True)
        self.label.setFont(self.font)
        self.lineEdit = QtGui.QLineEdit(self.frame)
        self.lineEdit.setGeometry(QtCore.QRect(10, 60, 431, 27))
        self.lineEdit.setText(_fromUtf8(""))
        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
        self.pushButton = QtGui.QPushButton(self.frame)
        self.pushButton.setGeometry(QtCore.QRect(450, 60, 71, 27))
        self.pushButton.setObjectName(_fromUtf8("pushButton"))
        self.previousButton = QtGui.QCommandLinkButton(self.frame)
        self.previousButton.setGeometry(QtCore.QRect(10, 90, 136, 31))
        self.previousButton.setObjectName(_fromUtf8("previousButton"))
        self.nextButton = QtGui.QCommandLinkButton(self.frame)
        self.nextButton.setGeometry(QtCore.QRect(148, 90, 116, 31))
        self.nextButton.setObjectName(_fromUtf8("nextButton"))
        self.warning = QtGui.QLabel(self.frame)
        self.warning.setGeometry(QtCore.QRect(269, 98, 180, 17))
        self.warning.setText(_fromUtf8(""))
        self.warning.setObjectName(_fromUtf8("warning"))
        self.warning.setStyleSheet('color: red')
        self.pushButton_2 = QtGui.QPushButton(self.frame)
        self.pushButton_2.setGeometry(QtCore.QRect(456, 93, 61, 27))
        self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
        self.eeg = QtGui.QRadioButton(self.frame)
        self.eeg.setGeometry(QtCore.QRect(10, 30, 116, 22))
        self.eeg.setObjectName(_fromUtf8("eeg"))
        self.phaseshift = QtGui.QRadioButton(self.frame)
        self.phaseshift.setGeometry(QtCore.QRect(130, 30, 151, 22))
        self.phaseshift.setObjectName(_fromUtf8("phaseshift"))
        self.frame_2 = QtGui.QFrame(Form)
        self.frame_2.setGeometry(QtCore.QRect(10, 160, 231, 151))
        self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtGui.QFrame.Raised)
        self.frame_2.setObjectName(_fromUtf8("frame_2"))
        self.label_2 = QtGui.QLabel(self.frame_2)
        self.label_2.setGeometry(QtCore.QRect(10, 10, 145, 17))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.font2 = QtGui.QFont()
        self.font2.setBold(True)
        self.label_2.setFont(self.font2)
        self.label_3 = QtGui.QLabel(self.frame_2)
        self.label_3.setGeometry(QtCore.QRect(10, 54, 41, 17))
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.spinBox = QtGui.QSpinBox(self.frame_2)
        self.spinBox.setGeometry(QtCore.QRect(104, 50, 60, 27))
        self.spinBox.setObjectName(_fromUtf8("spinBox"))
        self.pushButton_3 = QtGui.QPushButton(self.frame_2)
        self.pushButton_3.setGeometry(QtCore.QRect(180, 50, 31, 27))
        self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
        self.label_4 = QtGui.QLabel(self.frame_2)
        self.label_4.setGeometry(QtCore.QRect(10, 90, 66, 17))
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.label_6 = QtGui.QLabel(self.frame_2)
        self.label_6.setGeometry(QtCore.QRect(70, 70, 51, 57))
        self.label_6.setText(_fromUtf8(""))
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.warning2 = QtGui.QLabel(self.frame_2)
        self.warning2.setGeometry(QtCore.QRect(10, 120, 161, 20))
        self.warning2.setText(_fromUtf8(""))
        self.warning2.setObjectName(_fromUtf8("warning2"))
        self.warning2.setStyleSheet('color: red')
        self.frame_3 = QtGui.QFrame(Form)
        self.frame_3.setGeometry(QtCore.QRect(260, 160, 281, 151))
        self.frame_3.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame_3.setFrameShadow(QtGui.QFrame.Raised)
        self.frame_3.setObjectName(_fromUtf8("frame_3"))
        self.label_5 = QtGui.QLabel(self.frame_3)
        self.label_5.setGeometry(QtCore.QRect(10, 10, 108, 17))
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.font3 = QtGui.QFont()
        self.font3.setBold(True)
        self.label_5.setFont(self.font3)
        self.lower = QtGui.QLabel(self.frame_3)
        self.lower.setGeometry(QtCore.QRect(10, 54, 76, 17))
        self.lower.setObjectName(_fromUtf8("lower"))
        self.pushButton_4 = QtGui.QPushButton(self.frame_3)
        self.pushButton_4.setGeometry(QtCore.QRect(200, 64, 61, 27))
        self.pushButton_4.setObjectName(_fromUtf8("pushButton_4"))
        self.doubleSpinBox = QtGui.QDoubleSpinBox(self.frame_3)
        self.doubleSpinBox.setGeometry(QtCore.QRect(123, 50, 62, 27))
        self.doubleSpinBox.setObjectName(_fromUtf8("doubleSpinBox"))
        self.warning3 = QtGui.QLabel(self.frame_3)
        self.warning3.setGeometry(QtCore.QRect(10, 120, 241, 17))
        self.warning3.setText(_fromUtf8(""))
        self.warning3.setObjectName(_fromUtf8("warning3"))
        self.warning3.setStyleSheet('color: red')
        self.upper = QtGui.QLabel(self.frame_3)
        self.upper.setGeometry(QtCore.QRect(10, 86, 76, 17))
        self.upper.setObjectName(_fromUtf8("upper"))
        self.doubleSpinBox_2 = QtGui.QDoubleSpinBox(self.frame_3)
        self.doubleSpinBox_2.setGeometry(QtCore.QRect(123, 80, 62, 27))
        self.doubleSpinBox_2.setObjectName(_fromUtf8("doubleSpinBox_2"))

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
        
        # manages the tab order in the GUI
        Form.setTabOrder(self.eeg, self.phaseshift)
        Form.setTabOrder(self.phaseshift, self.lineEdit)
        Form.setTabOrder(self.lineEdit, self.pushButton)
        Form.setTabOrder(self.pushButton, self.previousButton)
        Form.setTabOrder(self.previousButton, self.nextButton)
        Form.setTabOrder(self.nextButton, self.pushButton_2)
        Form.setTabOrder(self.pushButton_2, self.spinBox)
        Form.setTabOrder(self.spinBox, self.pushButton_3)
        Form.setTabOrder(self.pushButton_3, self.doubleSpinBox)
        Form.setTabOrder(self.doubleSpinBox, self.doubleSpinBox_2)
        Form.setTabOrder(self.doubleSpinBox_2, self.pushButton_4)

    def retranslateUi(self, Form):
        ''' sets the text for every label, pushbutton etc. in the GUI '''
        Form.setWindowTitle(QtGui.QApplication.translate("Form", "Graph Editor", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("Form", "Show graph", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton.setText(QtGui.QApplication.translate("Form", "Browse", None, QtGui.QApplication.UnicodeUTF8))
        self.previousButton.setText(QtGui.QApplication.translate("Form", "Previous segment", None, QtGui.QApplication.UnicodeUTF8))
        self.nextButton.setText(QtGui.QApplication.translate("Form", "Next segment", None, QtGui.QApplication.UnicodeUTF8))
        self.eeg.setText(QtGui.QApplication.translate("Form", "EEG graph", None, QtGui.QApplication.UnicodeUTF8))
        self.phaseshift.setText(QtGui.QApplication.translate("Form", "Phase shift graph", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_2.setText(QtGui.QApplication.translate("Form", "Save", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(QtGui.QApplication.translate("Form", "Select node", None, QtGui.QApplication.UnicodeUTF8))
        self.label_3.setText(QtGui.QApplication.translate("Form", "node:", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_3.setText(QtGui.QApplication.translate("Form", "OK", None, QtGui.QApplication.UnicodeUTF8))
        self.label_4.setText(QtGui.QApplication.translate("Form", "degree:", None, QtGui.QApplication.UnicodeUTF8))
        self.label_5.setText(QtGui.QApplication.translate("Form", "Fade out edges", None, QtGui.QApplication.UnicodeUTF8))
        self.lower.setText(QtGui.QApplication.translate("Form", "lower limit:", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_4.setText(QtGui.QApplication.translate("Form", "submit", None, QtGui.QApplication.UnicodeUTF8))
        self.upper.setText(QtGui.QApplication.translate("Form", "upper limit:", None, QtGui.QApplication.UnicodeUTF8))