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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_6/eric3/Wizards/PyRegExpWizard/PyRegExpWizardForm.ui'
#
# Created: Do Dez 30 14:12:47 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 PyRegExpWizardForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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

        self.setSizeGripEnabled(1)

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

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

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

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

        self.importCheckBox = QCheckBox(self,"importCheckBox")
        PyRegExpWizardFormLayout.addWidget(self.importCheckBox)

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

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

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

        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.nonGroupButton = QToolButton(self,"nonGroupButton")
        layout6.addWidget(self.nonGroupButton)

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

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

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

        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)

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

        self.neglookbehindButton = QToolButton(self,"neglookbehindButton")
        layout6.addWidget(self.neglookbehindButton)
        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(20,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout6.addItem(spacer4)
        PyRegExpWizardFormLayout.addLayout(layout6)

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

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

        layout7.addWidget(self.regexpTextEdit,0,1)

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

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

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

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

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

        layout7.addWidget(self.textLabel1,0,0)
        PyRegExpWizardFormLayout.addLayout(layout7)

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

        self.dotallCheckBox = QCheckBox(self,"dotallCheckBox")

        layout8.addWidget(self.dotallCheckBox,0,2)

        self.multilineCheckBox = QCheckBox(self,"multilineCheckBox")

        layout8.addWidget(self.multilineCheckBox,0,1)

        self.unicodeCheckBox = QCheckBox(self,"unicodeCheckBox")

        layout8.addWidget(self.unicodeCheckBox,1,2)

        self.localeCheckBox = QCheckBox(self,"localeCheckBox")

        layout8.addWidget(self.localeCheckBox,1,1)

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

        layout8.addWidget(self.caseSensitiveCheckBox,0,0)

        self.verboseCheckBox = QCheckBox(self,"verboseCheckBox")

        layout8.addWidget(self.verboseCheckBox,1,0)
        PyRegExpWizardFormLayout.addLayout(layout8)

        self.resultTable = QTable(self,"resultTable")
        self.resultTable.setNumRows(3)
        self.resultTable.setNumCols(3)
        self.resultTable.setReadOnly(1)
        PyRegExpWizardFormLayout.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)
        PyRegExpWizardFormLayout.addLayout(layout9)

        self.languageChange()

        self.resize(QSize(598,619).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.groupButton,SIGNAL("clicked()"),self.handleGroup)
        self.connect(self.poslookbehindButton,SIGNAL("clicked()"),self.handlePosLookbehind)
        self.connect(self.neglookbehindButton,SIGNAL("clicked()"),self.handleNegLookbehind)
        self.connect(self.undoButton,SIGNAL("clicked()"),self.regexpTextEdit.undo)
        self.connect(self.redoButton,SIGNAL("clicked()"),self.regexpTextEdit.redo)
        self.connect(self.commentButton,SIGNAL("clicked()"),self.handleComment)
        self.connect(self.nonGroupButton,SIGNAL("clicked()"),self.handleNonGroup)
        self.connect(self.namedGroupButton,SIGNAL("clicked()"),self.handleNamedGroup)
        self.connect(self.namedReferenceButton,SIGNAL("clicked()"),self.handleNamedReference)

        self.setTabOrder(self.variableLineEdit,self.importCheckBox)
        self.setTabOrder(self.importCheckBox,self.regexpTextEdit)
        self.setTabOrder(self.regexpTextEdit,self.textTextEdit)
        self.setTabOrder(self.textTextEdit,self.caseSensitiveCheckBox)
        self.setTabOrder(self.caseSensitiveCheckBox,self.verboseCheckBox)
        self.setTabOrder(self.verboseCheckBox,self.multilineCheckBox)
        self.setTabOrder(self.multilineCheckBox,self.localeCheckBox)
        self.setTabOrder(self.localeCheckBox,self.dotallCheckBox)
        self.setTabOrder(self.dotallCheckBox,self.unicodeCheckBox)
        self.setTabOrder(self.unicodeCheckBox,self.resultTable)
        self.setTabOrder(self.resultTable,self.validateButton)
        self.setTabOrder(self.validateButton,self.executeButton)
        self.setTabOrder(self.executeButton,self.copyButton)
        self.setTabOrder(self.copyButton,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("Python re Wizard"))
        self.variableLabel.setText(self.__tr("Variable Name:"))
        self.importCheckBox.setText(self.__tr("Include import statement"))
        self.commentButton.setText(self.__tr("..."))
        QToolTip.add(self.commentButton,self.__tr("Comment"))
        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.nonGroupButton.setText(self.__tr("..."))
        QToolTip.add(self.nonGroupButton,self.__tr("Non grouping parentheses"))
        self.groupButton.setText(self.__tr("..."))
        QToolTip.add(self.groupButton,self.__tr("Group"))
        self.namedGroupButton.setText(self.__tr("..."))
        QToolTip.add(self.namedGroupButton,self.__tr("Named group"))
        self.namedReferenceButton.setText(self.__tr("..."))
        QToolTip.add(self.namedReferenceButton,self.__tr("Reference named 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.poslookbehindButton.setText(self.__tr("..."))
        QToolTip.add(self.poslookbehindButton,self.__tr("Positive lookbehind"))
        self.neglookbehindButton.setText(self.__tr("..."))
        QToolTip.add(self.neglookbehindButton,self.__tr("Negative lookbehind"))
        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.dotallCheckBox.setText(self.__tr("Dot matches Linebreak"))
        QToolTip.add(self.dotallCheckBox,self.__tr("\".\" matches linebreaks as well"))
        self.multilineCheckBox.setText(self.__tr("Match Linebreaks"))
        QToolTip.add(self.multilineCheckBox,self.__tr("\"^\" matches beginning of line, \"$\" matches end of line"))
        self.unicodeCheckBox.setText(self.__tr("Unicode"))
        self.localeCheckBox.setText(self.__tr("Observe Locale"))
        self.caseSensitiveCheckBox.setText(self.__tr("Case Sensitive"))
        self.verboseCheckBox.setText(self.__tr("Verbose Regexp"))
        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 "PyRegExpWizardForm.copy(): Not implemented yet"

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

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

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

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

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

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

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

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

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

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

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

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

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

    def handlePosLookbehind(self):
        print "PyRegExpWizardForm.handlePosLookbehind(): Not implemented yet"

    def handleNegLookbehind(self):
        print "PyRegExpWizardForm.handleNegLookbehind(): Not implemented yet"

    def handleComment(self):
        print "PyRegExpWizardForm.handleComment(): Not implemented yet"

    def handleNonGroup(self):
        print "PyRegExpWizardForm.handleNonGroup(): Not implemented yet"

    def handleNamedGroup(self):
        print "PyRegExpWizardForm.handleNamedGroup(): Not implemented yet"

    def handleNamedReference(self):
        print "PyRegExpWizardForm.handleNamedReference(): Not implemented yet"

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

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