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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_6/eric3/Wizards/PyRegExpWizard/PyRegExpWizardCharactersForm.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 *


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

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


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

        self.negativeCheckBox = QCheckBox(self,"negativeCheckBox")
        PyRegExpWizardCharactersFormLayout.addWidget(self.negativeCheckBox)

        self.buttonGroup1 = QButtonGroup(self,"buttonGroup1")
        self.buttonGroup1.setColumnLayout(0,Qt.Vertical)
        self.buttonGroup1.layout().setSpacing(0)
        self.buttonGroup1.layout().setMargin(6)
        buttonGroup1Layout = QGridLayout(self.buttonGroup1.layout())
        buttonGroup1Layout.setAlignment(Qt.AlignTop)

        self.nonWordCharCheckBox = QCheckBox(self.buttonGroup1,"nonWordCharCheckBox")

        buttonGroup1Layout.addWidget(self.nonWordCharCheckBox,1,0)

        self.wordCharCheckBox = QCheckBox(self.buttonGroup1,"wordCharCheckBox")

        buttonGroup1Layout.addWidget(self.wordCharCheckBox,0,0)

        self.digitsCheckBox = QCheckBox(self.buttonGroup1,"digitsCheckBox")

        buttonGroup1Layout.addWidget(self.digitsCheckBox,0,1)

        self.nonDigitsCheckBox = QCheckBox(self.buttonGroup1,"nonDigitsCheckBox")

        buttonGroup1Layout.addWidget(self.nonDigitsCheckBox,1,1)

        self.whitespaceCheckBox = QCheckBox(self.buttonGroup1,"whitespaceCheckBox")

        buttonGroup1Layout.addWidget(self.whitespaceCheckBox,0,2)

        self.nonWhitespaceCheckBox = QCheckBox(self.buttonGroup1,"nonWhitespaceCheckBox")

        buttonGroup1Layout.addWidget(self.nonWhitespaceCheckBox,1,2)
        PyRegExpWizardCharactersFormLayout.addWidget(self.buttonGroup1)

        self.singlesBox = QGroupBox(self,"singlesBox")
        self.singlesBox.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Expanding,0,0,self.singlesBox.sizePolicy().hasHeightForWidth()))
        PyRegExpWizardCharactersFormLayout.addWidget(self.singlesBox)

        self.rangesBox = QGroupBox(self,"rangesBox")
        self.rangesBox.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Expanding,0,0,self.rangesBox.sizePolicy().hasHeightForWidth()))
        PyRegExpWizardCharactersFormLayout.addWidget(self.rangesBox)

        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)
        PyRegExpWizardCharactersFormLayout.addLayout(layout1)

        self.languageChange()

        self.resize(QSize(832,450).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.setTabOrder(self.negativeCheckBox,self.wordCharCheckBox)
        self.setTabOrder(self.wordCharCheckBox,self.nonWordCharCheckBox)
        self.setTabOrder(self.nonWordCharCheckBox,self.digitsCheckBox)
        self.setTabOrder(self.digitsCheckBox,self.nonDigitsCheckBox)
        self.setTabOrder(self.nonDigitsCheckBox,self.whitespaceCheckBox)
        self.setTabOrder(self.whitespaceCheckBox,self.nonWhitespaceCheckBox)
        self.setTabOrder(self.nonWhitespaceCheckBox,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("Editor for character sets"))
        self.negativeCheckBox.setText(self.__tr("The defined characters should not match"))
        self.buttonGroup1.setTitle(self.__tr("Predefined character ranges"))
        self.nonWordCharCheckBox.setText(self.__tr("Non-word characters"))
        self.wordCharCheckBox.setText(self.__tr("Word character"))
        self.digitsCheckBox.setText(self.__tr("Digits"))
        self.nonDigitsCheckBox.setText(self.__tr("Non-digits"))
        self.whitespaceCheckBox.setText(self.__tr("Whitespace characters"))
        self.nonWhitespaceCheckBox.setText(self.__tr("Non-whitespace characters"))
        self.singlesBox.setTitle(self.__tr("Single character"))
        self.rangesBox.setTitle(self.__tr("Character ranges"))
        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("PyRegExpWizardCharactersForm",s,c)

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