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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_8/eric3/Checks/PyLintConfigForm.ui'
#
# Created: So Sep 25 19:04:51 2005
#      by: The PyQt User Interface Compiler (pyuic) 3.15
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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

        self.setSizeGripEnabled(1)

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

        self.tabWidget = QTabWidget(self,"tabWidget")

        self.Widget8 = QWidget(self.tabWidget,"Widget8")
        Widget8Layout = QGridLayout(self.Widget8,1,1,6,6,"Widget8Layout")

        self.line1 = QFrame(self.Widget8,"line1")
        self.line1.setFrameShape(QFrame.HLine)
        self.line1.setFrameShadow(QFrame.Sunken)
        self.line1.setFrameShape(QFrame.HLine)

        Widget8Layout.addMultiCellWidget(self.line1,2,2,0,2)

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

        self.configButton = QPushButton(self.Widget8,"configButton")
        layout3.addWidget(self.configButton)
        spacer5 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout3.addItem(spacer5)

        Widget8Layout.addMultiCellLayout(layout3,3,3,0,2)

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

        Widget8Layout.addWidget(self.textLabel1,0,0)

        self.configfileButton = QPushButton(self.Widget8,"configfileButton")

        Widget8Layout.addWidget(self.configfileButton,0,2)

        self.configfileEdit = QLineEdit(self.Widget8,"configfileEdit")

        Widget8Layout.addWidget(self.configfileEdit,0,1)

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

        self.txtOutputButton = QRadioButton(self.buttonGroup1,"txtOutputButton")
        buttonGroup1Layout.addWidget(self.txtOutputButton)

        self.htmlOutputButton = QRadioButton(self.buttonGroup1,"htmlOutputButton")
        buttonGroup1Layout.addWidget(self.htmlOutputButton)

        self.dialogOutputButton = QRadioButton(self.buttonGroup1,"dialogOutputButton")
        buttonGroup1Layout.addWidget(self.dialogOutputButton)

        self.groupBox2 = QGroupBox(self.buttonGroup1,"groupBox2")
        self.groupBox2.setColumnLayout(0,Qt.Vertical)
        self.groupBox2.layout().setSpacing(6)
        self.groupBox2.layout().setMargin(6)
        groupBox2Layout = QHBoxLayout(self.groupBox2.layout())
        groupBox2Layout.setAlignment(Qt.AlignTop)

        self.reportfileEdit = QLineEdit(self.groupBox2,"reportfileEdit")
        groupBox2Layout.addWidget(self.reportfileEdit)

        self.reportfileButton = QPushButton(self.groupBox2,"reportfileButton")
        groupBox2Layout.addWidget(self.reportfileButton)
        buttonGroup1Layout.addWidget(self.groupBox2)

        Widget8Layout.addMultiCellWidget(self.buttonGroup1,1,1,0,2)
        self.tabWidget.insertTab(self.Widget8,QString.fromLatin1(""))

        self.Widget9 = QWidget(self.tabWidget,"Widget9")
        Widget9Layout = QGridLayout(self.Widget9,1,1,6,6,"Widget9Layout")

        self.basicCheckBox = QCheckBox(self.Widget9,"basicCheckBox")

        Widget9Layout.addWidget(self.basicCheckBox,0,0)
        spacer6 = QSpacerItem(20,40,QSizePolicy.Minimum,QSizePolicy.Expanding)
        Widget9Layout.addItem(spacer6,4,1)

        self.exceptionsCheckBox = QCheckBox(self.Widget9,"exceptionsCheckBox")

        Widget9Layout.addWidget(self.exceptionsCheckBox,3,0)

        self.classesCheckBox = QCheckBox(self.Widget9,"classesCheckBox")

        Widget9Layout.addWidget(self.classesCheckBox,1,0)

        self.designCheckBox = QCheckBox(self.Widget9,"designCheckBox")

        Widget9Layout.addWidget(self.designCheckBox,2,0)

        self.formatCheckBox = QCheckBox(self.Widget9,"formatCheckBox")

        Widget9Layout.addWidget(self.formatCheckBox,0,1)

        self.importsCheckBox = QCheckBox(self.Widget9,"importsCheckBox")

        Widget9Layout.addWidget(self.importsCheckBox,1,1)

        self.miscellaneousCheckBox = QCheckBox(self.Widget9,"miscellaneousCheckBox")

        Widget9Layout.addWidget(self.miscellaneousCheckBox,3,1)

        self.metricsCheckBox = QCheckBox(self.Widget9,"metricsCheckBox")

        Widget9Layout.addWidget(self.metricsCheckBox,2,1)

        self.similaritiesCheckBox = QCheckBox(self.Widget9,"similaritiesCheckBox")

        Widget9Layout.addWidget(self.similaritiesCheckBox,0,2)

        self.variablesCheckBox = QCheckBox(self.Widget9,"variablesCheckBox")

        Widget9Layout.addWidget(self.variablesCheckBox,1,2)
        self.tabWidget.insertTab(self.Widget9,QString.fromLatin1(""))
        PyLintConfigFormLayout.addWidget(self.tabWidget)

        layout2 = QHBoxLayout(None,0,6,"layout2")
        Horizontal_Spacing2 = QSpacerItem(110,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(Horizontal_Spacing2)

        self.okButton = QPushButton(self,"okButton")
        self.okButton.setEnabled(0)
        self.okButton.setAutoDefault(1)
        self.okButton.setDefault(1)
        layout2.addWidget(self.okButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        self.cancelButton.setAutoDefault(1)
        layout2.addWidget(self.cancelButton)
        spacer2 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(spacer2)
        PyLintConfigFormLayout.addLayout(layout2)

        self.languageChange()

        self.resize(QSize(528,320).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.configButton,SIGNAL("clicked()"),self.handleCreateConfig)
        self.connect(self.txtOutputButton,SIGNAL("toggled(bool)"),self.groupBox2.setEnabled)
        self.connect(self.htmlOutputButton,SIGNAL("toggled(bool)"),self.groupBox2.setEnabled)
        self.connect(self.dialogOutputButton,SIGNAL("toggled(bool)"),self.groupBox2.setDisabled)
        self.connect(self.configfileButton,SIGNAL("clicked()"),self.handleConfigfile)
        self.connect(self.reportfileButton,SIGNAL("clicked()"),self.handleReportfile)
        self.connect(self.configfileEdit,SIGNAL("textChanged(const QString&)"),self.handleTextChanged)

        self.textLabel1.setBuddy(self.configfileEdit)


    def languageChange(self):
        self.setCaption(self.__tr("PyLint Configuration"))
        self.configButton.setText(self.__tr("&Generate Configuration Template"))
        self.configButton.setAccel(self.__tr("Alt+G"))
        QToolTip.add(self.configButton,self.__tr("Press to generate a sample configuration"))
        QWhatsThis.add(self.configButton,self.__tr("<b>Generate Configuration Template</b>\n"
"<p>This generates a sample configuration. The data is shown in a new editor window.</p>"))
        self.textLabel1.setText(self.__tr("Configuration &File"))
        self.configfileButton.setText(self.__tr("..."))
        QToolTip.add(self.configfileButton,self.__tr("Press to open a file selection dialog"))
        QToolTip.add(self.configfileEdit,self.__tr("Enter the name of the configuration file"))
        self.buttonGroup1.setTitle(self.__tr("Output"))
        self.txtOutputButton.setText(self.__tr("Generate &Textreport"))
        self.txtOutputButton.setAccel(self.__tr("Alt+T"))
        QToolTip.add(self.txtOutputButton,self.__tr("Select to generate a plain text report"))
        self.htmlOutputButton.setText(self.__tr("Generate &HTML Report"))
        self.htmlOutputButton.setAccel(self.__tr("Alt+H"))
        QToolTip.add(self.htmlOutputButton,self.__tr("Select to generate a HTML report"))
        self.dialogOutputButton.setText(self.__tr("Show Result &Dialog"))
        self.dialogOutputButton.setAccel(self.__tr("Alt+D"))
        QToolTip.add(self.dialogOutputButton,self.__tr("Show the pylint result in a dialog"))
        self.groupBox2.setTitle(self.__tr("Report File"))
        QToolTip.add(self.reportfileEdit,self.__tr("Enter the name of the report file"))
        self.reportfileButton.setText(self.__tr("..."))
        QToolTip.add(self.reportfileButton,self.__tr("Press to open a file selection dialog"))
        self.tabWidget.changeTab(self.Widget8,self.__tr("General"))
        self.basicCheckBox.setText(self.__tr("Basic"))
        QToolTip.add(self.basicCheckBox,self.__tr("Select to enable the basic checker"))
        self.exceptionsCheckBox.setText(self.__tr("Exceptions"))
        QToolTip.add(self.exceptionsCheckBox,self.__tr("Select to enable the exceptions checker"))
        self.classesCheckBox.setText(self.__tr("Classes"))
        QToolTip.add(self.classesCheckBox,self.__tr("Select to enable the classes checker"))
        self.designCheckBox.setText(self.__tr("Design"))
        QToolTip.add(self.designCheckBox,self.__tr("Select to enable the design checker"))
        self.formatCheckBox.setText(self.__tr("Format"))
        QToolTip.add(self.formatCheckBox,self.__tr("Select to enable the format checker"))
        self.importsCheckBox.setText(self.__tr("Imports"))
        QToolTip.add(self.importsCheckBox,self.__tr("Select to enable the imports checker"))
        self.miscellaneousCheckBox.setText(self.__tr("Miscellaneous"))
        QToolTip.add(self.miscellaneousCheckBox,self.__tr("Select to enable the miscellaneous checker"))
        self.metricsCheckBox.setText(self.__tr("Metrics"))
        QToolTip.add(self.metricsCheckBox,self.__tr("Select to enable the metrics checker"))
        self.similaritiesCheckBox.setText(self.__tr("Similarities"))
        QToolTip.add(self.similaritiesCheckBox,self.__tr("Select to enable the similarities checker"))
        self.variablesCheckBox.setText(self.__tr("Variables"))
        QToolTip.add(self.variablesCheckBox,self.__tr("Select to enable the variables checker"))
        self.tabWidget.changeTab(self.Widget9,self.__tr("Checkers"))
        self.okButton.setText(self.__tr("&OK"))
        self.okButton.setAccel(QString.null)
        self.cancelButton.setText(self.__tr("&Cancel"))
        self.cancelButton.setAccel(QString.null)


    def handleCreateConfig(self):
        print "PyLintConfigForm.handleCreateConfig(): Not implemented yet"

    def handleConfigfile(self):
        print "PyLintConfigForm.handleConfigfile(): Not implemented yet"

    def handleReportfile(self):
        print "PyLintConfigForm.handleReportfile(): Not implemented yet"

    def handleTextChanged(self,a0):
        print "PyLintConfigForm.handleTextChanged(const QString&): Not implemented yet"

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

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