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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_6/eric3/Wizards/QRegExpWizard/QRegExpWizardForm.ui'
#
# Created: Do Dez 30 14:12:46 2004
#      by: The PyQt User Interface Compiler (pyuic) snapshot-20041229
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *
from qttable import QTable


class QRegExpWizardForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

        if not name:
            self.setName("QRegExpWizardForm")

        self.setSizeGripEnabled(1)

        QRegExpWizardFormLayout = QVBoxLayout(self,6,6,"QRegExpWizardFormLayout")

        layout4 = QHBoxLayout(None,0,6,"layout4")

        self.variableLabel = QLabel(self,"variableLabel")
        layout4.addWidget(self.variableLabel)

        self.variableLineEdit = QLineEdit(self,"variableLineEdit")
        layout4.addWidget(self.variableLineEdit)
        QRegExpWizardFormLayout.addLayout(layout4)

        self.variableLine = QFrame(self,"variableLine")
        self.variableLine.setFrameShape(QFrame.HLine)
        self.variableLine.setFrameShadow(QFrame.Sunken)
        self.variableLine.setFrameShape(QFrame.HLine)
        QRegExpWizardFormLayout.addWidget(self.variableLine)

        layout6 = QHBoxLayout(None,0,6,"layout6")

        self.charButton = QToolButton(self,"charButton")
        layout6.addWidget(self.charButton)

        self.anycharButton = QToolButton(self,"anycharButton")
        layout6.addWidget(self.anycharButton)

        self.repeatButton = QToolButton(self,"repeatButton")
        layout6.addWidget(self.repeatButton)

        self.groupButton = QToolButton(self,"groupButton")
        layout6.addWidget(self.groupButton)

        self.altnButton = QToolButton(self,"altnButton")
        layout6.addWidget(self.altnButton)

        self.beglineButton = QToolButton(self,"beglineButton")
        layout6.addWidget(self.beglineButton)

        self.endlineButton = QToolButton(self,"endlineButton")
        layout6.addWidget(self.endlineButton)

        self.wordboundButton = QToolButton(self,"wordboundButton")
        layout6.addWidget(self.wordboundButton)

        self.nonwordboundButton = QToolButton(self,"nonwordboundButton")
        layout6.addWidget(self.nonwordboundButton)

        self.poslookaheadButton = QToolButton(self,"poslookaheadButton")
        layout6.addWidget(self.poslookaheadButton)

        self.neglookaheadButton = QToolButton(self,"neglookaheadButton")
        layout6.addWidget(self.neglookaheadButton)
        spacer5 = QSpacerItem(16,20,QSizePolicy.Fixed,QSizePolicy.Minimum)
        layout6.addItem(spacer5)

        self.undoButton = QToolButton(self,"undoButton")
        layout6.addWidget(self.undoButton)

        self.redoButton = QToolButton(self,"redoButton")
        layout6.addWidget(self.redoButton)
        spacer4 = QSpacerItem(280,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout6.addItem(spacer4)
        QRegExpWizardFormLayout.addLayout(layout6)

        layout5 = QGridLayout(None,1,1,0,6,"layout5")

        self.textLabel2 = QLabel(self,"textLabel2")
        self.textLabel2.setAlignment(QLabel.AlignTop)

        layout5.addWidget(self.textLabel2,1,0)

        self.textTextEdit = QTextEdit(self,"textTextEdit")
        self.textTextEdit.setTextFormat(QTextEdit.PlainText)

        layout5.addWidget(self.textTextEdit,1,1)

        self.regexpLineEdit = QLineEdit(self,"regexpLineEdit")

        layout5.addWidget(self.regexpLineEdit,0,1)

        self.textLabel1 = QLabel(self,"textLabel1")

        layout5.addWidget(self.textLabel1,0,0)
        QRegExpWizardFormLayout.addLayout(layout5)

        layout2 = QHBoxLayout(None,0,6,"layout2")

        self.caseSensitiveCheckBox = QCheckBox(self,"caseSensitiveCheckBox")
        self.caseSensitiveCheckBox.setChecked(1)
        layout2.addWidget(self.caseSensitiveCheckBox)

        self.minimalCheckBox = QCheckBox(self,"minimalCheckBox")
        layout2.addWidget(self.minimalCheckBox)

        self.wildcardCheckBox = QCheckBox(self,"wildcardCheckBox")
        layout2.addWidget(self.wildcardCheckBox)
        spacer1 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(spacer1)
        QRegExpWizardFormLayout.addLayout(layout2)

        self.resultTable = QTable(self,"resultTable")
        self.resultTable.setNumRows(3)
        self.resultTable.setNumCols(3)
        self.resultTable.setReadOnly(1)
        QRegExpWizardFormLayout.addWidget(self.resultTable)

        layout9 = QHBoxLayout(None,0,6,"layout9")
        spacer2 = QSpacerItem(20,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout9.addItem(spacer2)

        self.okButton = QPushButton(self,"okButton")
        layout9.addWidget(self.okButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        layout9.addWidget(self.cancelButton)

        self.validateButton = QPushButton(self,"validateButton")
        layout9.addWidget(self.validateButton)

        self.executeButton = QPushButton(self,"executeButton")
        self.executeButton.setDefault(1)
        layout9.addWidget(self.executeButton)

        self.copyButton = QPushButton(self,"copyButton")
        layout9.addWidget(self.copyButton)
        spacer3 = QSpacerItem(20,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout9.addItem(spacer3)
        QRegExpWizardFormLayout.addLayout(layout9)

        self.languageChange()

        self.resize(QSize(600,551).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
        self.connect(self.copyButton,SIGNAL("clicked()"),self.copy)
        self.connect(self.executeButton,SIGNAL("clicked()"),self.execute)
        self.connect(self.cancelButton,SIGNAL("clicked()"),self.reject)
        self.connect(self.neglookaheadButton,SIGNAL("clicked()"),self.handleNegLookahead)
        self.connect(self.poslookaheadButton,SIGNAL("clicked()"),self.handlePosLookahead)
        self.connect(self.nonwordboundButton,SIGNAL("clicked()"),self.handleNonWordBoundary)
        self.connect(self.wordboundButton,SIGNAL("clicked()"),self.handleWordBoundary)
        self.connect(self.endlineButton,SIGNAL("clicked()"),self.handleEndLine)
        self.connect(self.beglineButton,SIGNAL("clicked()"),self.handleBeginLine)
        self.connect(self.altnButton,SIGNAL("clicked()"),self.handleAlternatives)
        self.connect(self.repeatButton,SIGNAL("clicked()"),self.handleRepeat)
        self.connect(self.anycharButton,SIGNAL("clicked()"),self.handleAnyChar)
        self.connect(self.charButton,SIGNAL("clicked()"),self.handleCharacters)
        self.connect(self.validateButton,SIGNAL("clicked()"),self.validate)
        self.connect(self.undoButton,SIGNAL("clicked()"),self.regexpLineEdit.undo)
        self.connect(self.redoButton,SIGNAL("clicked()"),self.regexpLineEdit.redo)
        self.connect(self.groupButton,SIGNAL("clicked()"),self.handleGroup)

        self.setTabOrder(self.variableLineEdit,self.regexpLineEdit)
        self.setTabOrder(self.regexpLineEdit,self.textTextEdit)
        self.setTabOrder(self.textTextEdit,self.caseSensitiveCheckBox)
        self.setTabOrder(self.caseSensitiveCheckBox,self.minimalCheckBox)
        self.setTabOrder(self.minimalCheckBox,self.wildcardCheckBox)
        self.setTabOrder(self.wildcardCheckBox,self.resultTable)
        self.setTabOrder(self.resultTable,self.validateButton)
        self.setTabOrder(self.validateButton,self.copyButton)
        self.setTabOrder(self.copyButton,self.executeButton)
        self.setTabOrder(self.executeButton,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)

        self.variableLabel.setBuddy(self.variableLineEdit)
        self.textLabel2.setBuddy(self.textTextEdit)
        self.textLabel1.setBuddy(self.regexpLineEdit)


    def languageChange(self):
        self.setCaption(self.__tr("QRegExp Wizard"))
        self.variableLabel.setText(self.__tr("&Variable Name:"))
        self.charButton.setText(self.__tr("..."))
        QToolTip.add(self.charButton,self.__tr("Single character of a range"))
        self.anycharButton.setText(self.__tr("..."))
        QToolTip.add(self.anycharButton,self.__tr("Any character"))
        self.repeatButton.setText(self.__tr("..."))
        QToolTip.add(self.repeatButton,self.__tr("Repeat contents"))
        self.groupButton.setText(self.__tr("..."))
        QToolTip.add(self.groupButton,self.__tr("Group"))
        self.altnButton.setText(self.__tr("..."))
        QToolTip.add(self.altnButton,self.__tr("Alternatives"))
        self.beglineButton.setText(self.__tr("..."))
        QToolTip.add(self.beglineButton,self.__tr("Begin of line"))
        self.endlineButton.setText(self.__tr("..."))
        QToolTip.add(self.endlineButton,self.__tr("End of line"))
        self.wordboundButton.setText(self.__tr("..."))
        QToolTip.add(self.wordboundButton,self.__tr("Word boundary"))
        self.nonwordboundButton.setText(self.__tr("..."))
        QToolTip.add(self.nonwordboundButton,self.__tr("Non word boundary"))
        self.poslookaheadButton.setText(self.__tr("..."))
        QToolTip.add(self.poslookaheadButton,self.__tr("Positive lookahead"))
        self.neglookaheadButton.setText(self.__tr("..."))
        QToolTip.add(self.neglookaheadButton,self.__tr("Negative lookahead"))
        self.undoButton.setText(self.__tr("..."))
        QToolTip.add(self.undoButton,self.__tr("Undo last edit"))
        self.redoButton.setText(self.__tr("..."))
        QToolTip.add(self.redoButton,self.__tr("Redo last edit"))
        self.textLabel2.setText(self.__tr("&Text:"))
        self.textLabel1.setText(self.__tr("&Regexp:"))
        self.caseSensitiveCheckBox.setText(self.__tr("Case &Sensitive"))
        self.caseSensitiveCheckBox.setAccel(self.__tr("Alt+S"))
        self.minimalCheckBox.setText(self.__tr("&Minimal"))
        self.minimalCheckBox.setAccel(self.__tr("Alt+M"))
        self.wildcardCheckBox.setText(self.__tr("&Wildcard"))
        self.wildcardCheckBox.setAccel(self.__tr("Alt+W"))
        self.okButton.setText(self.__tr("&OK"))
        self.okButton.setAccel(self.__tr("Alt+O"))
        self.cancelButton.setText(self.__tr("&Cancel"))
        self.cancelButton.setAccel(self.__tr("Alt+C"))
        self.validateButton.setText(self.__tr("V&alidate"))
        self.validateButton.setAccel(self.__tr("Alt+A"))
        QToolTip.add(self.validateButton,self.__tr("Validate the regular expression"))
        self.executeButton.setText(self.__tr("&Execute"))
        self.executeButton.setAccel(self.__tr("Alt+E"))
        QToolTip.add(self.executeButton,self.__tr("Execute the regular expression"))
        self.copyButton.setText(self.__tr("Cop&y"))
        self.copyButton.setAccel(self.__tr("Alt+Y"))
        QToolTip.add(self.copyButton,self.__tr("Copy the regular expression to the clipboard"))


    def copy(self):
        print "QRegExpWizardForm.copy(): Not implemented yet"

    def execute(self):
        print "QRegExpWizardForm.execute(): Not implemented yet"

    def handleCharacters(self):
        print "QRegExpWizardForm.handleCharacters(): Not implemented yet"

    def handleAnyChar(self):
        print "QRegExpWizardForm.handleAnyChar(): Not implemented yet"

    def handleRepeat(self):
        print "QRegExpWizardForm.handleRepeat(): Not implemented yet"

    def handleAlternatives(self):
        print "QRegExpWizardForm.handleAlternatives(): Not implemented yet"

    def handleBeginLine(self):
        print "QRegExpWizardForm.handleBeginLine(): Not implemented yet"

    def handleEndLine(self):
        print "QRegExpWizardForm.handleEndLine(): Not implemented yet"

    def handleWordBoundary(self):
        print "QRegExpWizardForm.handleWordBoundary(): Not implemented yet"

    def handleNonWordBoundary(self):
        print "QRegExpWizardForm.handleNonWordBoundary(): Not implemented yet"

    def handlePosLookahead(self):
        print "QRegExpWizardForm.handlePosLookahead(): Not implemented yet"

    def handleNegLookahead(self):
        print "QRegExpWizardForm.handleNegLookahead(): Not implemented yet"

    def validate(self):
        print "QRegExpWizardForm.validate(): Not implemented yet"

    def handleGroup(self):
        print "QRegExpWizardForm.handleGroup(): Not implemented yet"

    def __tr(self,s,c = None):
        return qApp.translate("QRegExpWizardForm",s,c)

if __name__ == "__main__":
    a = QApplication(sys.argv)
    QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
    w = QRegExpWizardForm()
    a.setMainWidget(w)
    w.show()
    a.exec_loop()
