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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_6/eric3/Wizards/PyRegExpWizard/PyRegExpWizardRepeatForm.ui'
#
# Created: Do Dez 30 14:12:48 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 *


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

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


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

        self.repetitionsGroup = QButtonGroup(self,"repetitionsGroup")
        self.repetitionsGroup.setFrameShape(QButtonGroup.NoFrame)
        self.repetitionsGroup.setColumnLayout(0,Qt.Vertical)
        self.repetitionsGroup.layout().setSpacing(6)
        self.repetitionsGroup.layout().setMargin(6)
        repetitionsGroupLayout = QGridLayout(self.repetitionsGroup.layout())
        repetitionsGroupLayout.setAlignment(Qt.AlignTop)

        self.radioButton3 = QRadioButton(self.repetitionsGroup,"radioButton3")

        repetitionsGroupLayout.addMultiCellWidget(self.radioButton3,0,0,0,4)

        self.radioButton4 = QRadioButton(self.repetitionsGroup,"radioButton4")

        repetitionsGroupLayout.addWidget(self.radioButton4,1,0)

        self.radioButton5 = QRadioButton(self.repetitionsGroup,"radioButton5")

        repetitionsGroupLayout.addWidget(self.radioButton5,2,0)

        self.radioButton6 = QRadioButton(self.repetitionsGroup,"radioButton6")

        repetitionsGroupLayout.addWidget(self.radioButton6,3,0)

        self.radioButton7 = QRadioButton(self.repetitionsGroup,"radioButton7")

        repetitionsGroupLayout.addWidget(self.radioButton7,4,0)

        self.minSpin = QSpinBox(self.repetitionsGroup,"minSpin")
        self.minSpin.setEnabled(0)
        self.minSpin.setValue(1)

        repetitionsGroupLayout.addWidget(self.minSpin,1,1)

        self.maxSpin = QSpinBox(self.repetitionsGroup,"maxSpin")
        self.maxSpin.setEnabled(0)
        self.maxSpin.setValue(1)

        repetitionsGroupLayout.addWidget(self.maxSpin,2,1)

        self.exactSpin = QSpinBox(self.repetitionsGroup,"exactSpin")
        self.exactSpin.setEnabled(0)
        self.exactSpin.setValue(1)

        repetitionsGroupLayout.addWidget(self.exactSpin,3,1)

        self.lowerSpin = QSpinBox(self.repetitionsGroup,"lowerSpin")
        self.lowerSpin.setEnabled(0)
        self.lowerSpin.setValue(1)

        repetitionsGroupLayout.addWidget(self.lowerSpin,4,1)

        self.upperSpin = QSpinBox(self.repetitionsGroup,"upperSpin")
        self.upperSpin.setEnabled(0)
        self.upperSpin.setValue(1)

        repetitionsGroupLayout.addWidget(self.upperSpin,4,3)

        self.textLabel1_3 = QLabel(self.repetitionsGroup,"textLabel1_3")

        repetitionsGroupLayout.addWidget(self.textLabel1_3,4,4)

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

        repetitionsGroupLayout.addWidget(self.textLabel1,1,2)

        self.textLabel1_2 = QLabel(self.repetitionsGroup,"textLabel1_2")

        repetitionsGroupLayout.addWidget(self.textLabel1_2,2,2)

        self.textLabel1_4 = QLabel(self.repetitionsGroup,"textLabel1_4")

        repetitionsGroupLayout.addWidget(self.textLabel1_4,3,2)

        self.textLabel6 = QLabel(self.repetitionsGroup,"textLabel6")

        repetitionsGroupLayout.addWidget(self.textLabel6,4,2)
        PyRegExpWizardRepeatFormLayout.addWidget(self.repetitionsGroup)

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

        layout1 = QHBoxLayout(None,0,6,"layout1")
        spacer1 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout1.addItem(spacer1)

        self.okButton = QPushButton(self,"okButton")
        self.okButton.setDefault(1)
        layout1.addWidget(self.okButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        layout1.addWidget(self.cancelButton)
        spacer2 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout1.addItem(spacer2)
        PyRegExpWizardRepeatFormLayout.addLayout(layout1)

        self.languageChange()

        self.resize(QSize(331,229).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
        self.connect(self.cancelButton,SIGNAL("clicked()"),self.reject)
        self.connect(self.radioButton4,SIGNAL("toggled(bool)"),self.minSpin.setEnabled)
        self.connect(self.radioButton5,SIGNAL("toggled(bool)"),self.maxSpin.setEnabled)
        self.connect(self.radioButton6,SIGNAL("toggled(bool)"),self.exactSpin.setEnabled)
        self.connect(self.radioButton7,SIGNAL("toggled(bool)"),self.lowerSpin.setEnabled)
        self.connect(self.radioButton7,SIGNAL("toggled(bool)"),self.upperSpin.setEnabled)

        self.setTabOrder(self.radioButton3,self.radioButton4)
        self.setTabOrder(self.radioButton4,self.minSpin)
        self.setTabOrder(self.minSpin,self.radioButton5)
        self.setTabOrder(self.radioButton5,self.maxSpin)
        self.setTabOrder(self.maxSpin,self.radioButton6)
        self.setTabOrder(self.radioButton6,self.exactSpin)
        self.setTabOrder(self.exactSpin,self.radioButton7)
        self.setTabOrder(self.radioButton7,self.lowerSpin)
        self.setTabOrder(self.lowerSpin,self.upperSpin)
        self.setTabOrder(self.upperSpin,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("Number of repetitions"))
        self.repetitionsGroup.setTitle(QString.null)
        self.radioButton3.setText(self.__tr("Unlimited (incl. zero times)"))
        self.radioButton4.setText(self.__tr("Minimum"))
        self.radioButton5.setText(self.__tr("Maximum"))
        self.radioButton6.setText(self.__tr("Exactly"))
        self.radioButton7.setText(self.__tr("Between"))
        self.textLabel1_3.setText(self.__tr("times"))
        self.textLabel1.setText(self.__tr("times"))
        self.textLabel1_2.setText(self.__tr("times"))
        self.textLabel1_4.setText(self.__tr("times"))
        self.textLabel6.setText(self.__tr("and"))
        self.minimalCheckBox.setText(self.__tr("Minimal match"))
        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"))


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

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