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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/Wizards/ColorDialogWizard/ColorDialogWizardForm.ui'
#
# Created: Sa Dez 31 12:37:41 2005
#      by: The PyQt User Interface Compiler (pyuic) 3.15.1
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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

        self.setSizeGripEnabled(1)

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

        self.ButtonGroup1 = QButtonGroup(self,"ButtonGroup1")
        self.ButtonGroup1.setColumnLayout(0,Qt.Vertical)
        self.ButtonGroup1.layout().setSpacing(6)
        self.ButtonGroup1.layout().setMargin(6)
        ButtonGroup1Layout = QHBoxLayout(self.ButtonGroup1.layout())
        ButtonGroup1Layout.setAlignment(Qt.AlignTop)

        self.rColor = QRadioButton(self.ButtonGroup1,"rColor")
        self.rColor.setChecked(1)
        ButtonGroup1Layout.addWidget(self.rColor)

        self.rRGBA = QRadioButton(self.ButtonGroup1,"rRGBA")
        self.rRGBA.setFocusPolicy(QRadioButton.NoFocus)
        ButtonGroup1Layout.addWidget(self.rRGBA)
        ColorDialogWizardFormLayout.addWidget(self.ButtonGroup1)

        self.GroupBox1 = QGroupBox(self,"GroupBox1")
        self.GroupBox1.setColumnLayout(0,Qt.Vertical)
        self.GroupBox1.layout().setSpacing(6)
        self.GroupBox1.layout().setMargin(6)
        GroupBox1Layout = QVBoxLayout(self.GroupBox1.layout())
        GroupBox1Layout.setAlignment(Qt.AlignTop)

        self.eColor = QComboBox(0,self.GroupBox1,"eColor")
        self.eColor.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed,0,0,self.eColor.sizePolicy().hasHeightForWidth()))
        self.eColor.setEditable(1)
        GroupBox1Layout.addWidget(self.eColor)
        ColorDialogWizardFormLayout.addWidget(self.GroupBox1)

        self.GroupBox3 = QGroupBox(self,"GroupBox3")
        self.GroupBox3.setEnabled(0)
        self.GroupBox3.setColumnLayout(0,Qt.Vertical)
        self.GroupBox3.layout().setSpacing(6)
        self.GroupBox3.layout().setMargin(6)
        GroupBox3Layout = QGridLayout(self.GroupBox3.layout())
        GroupBox3Layout.setAlignment(Qt.AlignTop)

        self.TextLabel1 = QLabel(self.GroupBox3,"TextLabel1")

        GroupBox3Layout.addWidget(self.TextLabel1,0,0)

        self.sRed = QSpinBox(self.GroupBox3,"sRed")
        self.sRed.setMaxValue(255)
        self.sRed.setValue(128)

        GroupBox3Layout.addWidget(self.sRed,1,0)

        self.TextLabel1_2 = QLabel(self.GroupBox3,"TextLabel1_2")

        GroupBox3Layout.addWidget(self.TextLabel1_2,0,1)

        self.TextLabel1_3 = QLabel(self.GroupBox3,"TextLabel1_3")

        GroupBox3Layout.addWidget(self.TextLabel1_3,0,2)

        self.TextLabel1_4 = QLabel(self.GroupBox3,"TextLabel1_4")

        GroupBox3Layout.addWidget(self.TextLabel1_4,0,3)

        self.sAlpha = QSpinBox(self.GroupBox3,"sAlpha")
        self.sAlpha.setMaxValue(255)

        GroupBox3Layout.addWidget(self.sAlpha,1,3)

        self.sBlue = QSpinBox(self.GroupBox3,"sBlue")
        self.sBlue.setMaxValue(255)
        self.sBlue.setValue(128)

        GroupBox3Layout.addWidget(self.sBlue,1,2)

        self.sGreen = QSpinBox(self.GroupBox3,"sGreen")
        self.sGreen.setMaxValue(255)
        self.sGreen.setValue(128)

        GroupBox3Layout.addWidget(self.sGreen,1,1)

        self.TextLabel2 = QLabel(self.GroupBox3,"TextLabel2")

        GroupBox3Layout.addWidget(self.TextLabel2,2,0)

        self.eRGB = QLineEdit(self.GroupBox3,"eRGB")

        GroupBox3Layout.addMultiCellWidget(self.eRGB,3,3,0,3)
        ColorDialogWizardFormLayout.addWidget(self.GroupBox3)

        Layout4 = QHBoxLayout(None,0,6,"Layout4")
        Spacer3 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout4.addItem(Spacer3)

        self.PushButton4 = QPushButton(self,"PushButton4")
        Layout4.addWidget(self.PushButton4)

        self.PushButton5 = QPushButton(self,"PushButton5")
        Layout4.addWidget(self.PushButton5)

        self.bTest = QPushButton(self,"bTest")
        self.bTest.setDefault(1)
        Layout4.addWidget(self.bTest)
        Spacer4 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout4.addItem(Spacer4)
        ColorDialogWizardFormLayout.addLayout(Layout4)

        self.languageChange()

        self.resize(QSize(367,261).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.rColor,SIGNAL("toggled(bool)"),self.GroupBox1.setEnabled)
        self.connect(self.rColor,SIGNAL("toggled(bool)"),self.GroupBox3.setDisabled)
        self.connect(self.rRGBA,SIGNAL("toggled(bool)"),self.GroupBox1.setDisabled)
        self.connect(self.rRGBA,SIGNAL("toggled(bool)"),self.GroupBox3.setEnabled)
        self.connect(self.PushButton4,SIGNAL("clicked()"),self.accept)
        self.connect(self.PushButton5,SIGNAL("clicked()"),self.reject)
        self.connect(self.bTest,SIGNAL("clicked()"),self.testDlg)
        self.connect(self.eRGB,SIGNAL("textChanged(const QString&)"),self.handleRGBVar)
        self.connect(self.eColor,SIGNAL("textChanged(const QString&)"),self.handleColorVar)

        self.setTabOrder(self.rColor,self.rRGBA)
        self.setTabOrder(self.rRGBA,self.eColor)
        self.setTabOrder(self.eColor,self.sRed)
        self.setTabOrder(self.sRed,self.sGreen)
        self.setTabOrder(self.sGreen,self.sBlue)
        self.setTabOrder(self.sBlue,self.sAlpha)
        self.setTabOrder(self.sAlpha,self.eRGB)
        self.setTabOrder(self.eRGB,self.bTest)
        self.setTabOrder(self.bTest,self.PushButton4)
        self.setTabOrder(self.PushButton4,self.PushButton5)


    def languageChange(self):
        self.setCaption(self.__tr("QColorDialog Wizard"))
        self.ButtonGroup1.setTitle(self.__tr("Type"))
        self.rColor.setText(self.__tr("Color"))
        QToolTip.add(self.rColor,self.__tr("Select to generate a QColorDialog.getColor dialog"))
        self.rRGBA.setText(self.__tr("RGBA"))
        QToolTip.add(self.rRGBA,self.__tr("Select to generate a QColorDialog.getRgba dialog"))
        self.GroupBox1.setTitle(self.__tr("Color"))
        self.eColor.clear()
        self.eColor.insertItem(QString.null)
        self.eColor.insertItem(self.__tr("Qt.red"))
        self.eColor.insertItem(self.__tr("Qt.darkRed"))
        self.eColor.insertItem(self.__tr("Qt.green"))
        self.eColor.insertItem(self.__tr("Qt.darkGreen"))
        self.eColor.insertItem(self.__tr("Qt.blue"))
        self.eColor.insertItem(self.__tr("Qt.darkBlue"))
        self.eColor.insertItem(self.__tr("Qt.cyan"))
        self.eColor.insertItem(self.__tr("Qt.darkCyan"))
        self.eColor.insertItem(self.__tr("Qt.magenta"))
        self.eColor.insertItem(self.__tr("Qt.darkMagenta"))
        self.eColor.insertItem(self.__tr("Qt.yellow"))
        self.eColor.insertItem(self.__tr("Qt.darkYellow"))
        self.eColor.insertItem(self.__tr("Qt.white"))
        self.eColor.insertItem(self.__tr("Qt.lightGray"))
        self.eColor.insertItem(self.__tr("Qt.gray"))
        self.eColor.insertItem(self.__tr("Qt.darkGray"))
        self.eColor.insertItem(self.__tr("Qt.black"))
        QToolTip.add(self.eColor,self.__tr("Enter a variable name or a colour"))
        self.GroupBox3.setTitle(self.__tr("RGBA"))
        self.TextLabel1.setText(self.__tr("Red"))
        QToolTip.add(self.sRed,self.__tr("Enter the red value"))
        self.TextLabel1_2.setText(self.__tr("Green"))
        self.TextLabel1_3.setText(self.__tr("Blue"))
        self.TextLabel1_4.setText(self.__tr("Alpha"))
        QToolTip.add(self.sAlpha,self.__tr("Enter the alpha value"))
        QToolTip.add(self.sBlue,self.__tr("Enter the blue value"))
        QToolTip.add(self.sGreen,self.__tr("Enter the green value"))
        self.TextLabel2.setText(self.__tr("Variable"))
        QToolTip.add(self.eRGB,self.__tr("Enter a variable name"))
        self.PushButton4.setText(self.__tr("&OK"))
        self.PushButton5.setText(self.__tr("&Cancel"))
        self.bTest.setText(self.__tr("&Test"))


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

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

    def testDlg(self):
        print "ColorDialogWizardForm.testDlg(): Not implemented yet"

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

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