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

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

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


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

        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.rInformation = QRadioButton(self.buttonGroup1,"rInformation")
        self.rInformation.setChecked(1)
        buttonGroup1Layout.addWidget(self.rInformation)

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

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

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

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

        self.rAboutQt = QRadioButton(self.buttonGroup1,"rAboutQt")
        buttonGroup1Layout.addWidget(self.rAboutQt)
        MessageBoxWizardFormLayout.addWidget(self.buttonGroup1)

        self.textLabel1 = QLabel(self,"textLabel1")
        MessageBoxWizardFormLayout.addWidget(self.textLabel1)

        self.eCaption = QLineEdit(self,"eCaption")
        MessageBoxWizardFormLayout.addWidget(self.eCaption)

        self.textLabel2 = QLabel(self,"textLabel2")
        MessageBoxWizardFormLayout.addWidget(self.textLabel2)

        self.eMessage = QTextEdit(self,"eMessage")
        MessageBoxWizardFormLayout.addWidget(self.eMessage)

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

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

        self.cButton1 = QComboBox(0,self.Buttons,"cButton1")
        self.cButton1.setEnabled(0)
        self.cButton1.setEditable(1)

        Layout3.addWidget(self.cButton1,1,1)

        self.cButton0 = QComboBox(0,self.Buttons,"cButton0")
        self.cButton0.setEditable(1)

        Layout3.addWidget(self.cButton0,1,0)

        self.textLabel3_2_2 = QLabel(self.Buttons,"textLabel3_2_2")

        Layout3.addWidget(self.textLabel3_2_2,0,2)

        self.cButton2 = QComboBox(0,self.Buttons,"cButton2")
        self.cButton2.setEnabled(0)
        self.cButton2.setEditable(1)

        Layout3.addWidget(self.cButton2,1,2)

        self.textLabel3_2 = QLabel(self.Buttons,"textLabel3_2")

        Layout3.addWidget(self.textLabel3_2,0,1)

        self.textLabel3 = QLabel(self.Buttons,"textLabel3")

        Layout3.addWidget(self.textLabel3,0,0)
        ButtonsLayout.addLayout(Layout3)

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

        self.TextLabel1 = QLabel(self.Buttons,"TextLabel1")
        Layout5.addWidget(self.TextLabel1)

        self.sDefault = QSpinBox(self.Buttons,"sDefault")
        self.sDefault.setMaxValue(0)
        Layout5.addWidget(self.sDefault)

        self.TextLabel2 = QLabel(self.Buttons,"TextLabel2")
        Layout5.addWidget(self.TextLabel2)

        self.sEscape = QSpinBox(self.Buttons,"sEscape")
        self.sEscape.setMaxValue(0)
        self.sEscape.setMinValue(-1)
        self.sEscape.setValue(-1)
        Layout5.addWidget(self.sEscape)
        ButtonsLayout.addLayout(Layout5)
        MessageBoxWizardFormLayout.addWidget(self.Buttons)

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

        self.pushButton3 = QPushButton(self,"pushButton3")
        Layout2.addWidget(self.pushButton3)

        self.pushButton4 = QPushButton(self,"pushButton4")
        Layout2.addWidget(self.pushButton4)

        self.pushButton2 = QPushButton(self,"pushButton2")
        self.pushButton2.setDefault(1)
        Layout2.addWidget(self.pushButton2)
        Spacer4 = QSpacerItem(134,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout2.addItem(Spacer4)
        MessageBoxWizardFormLayout.addLayout(Layout2)

        self.languageChange()

        self.resize(QSize(528,368).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.pushButton3,SIGNAL("clicked()"),self.accept)
        self.connect(self.pushButton2,SIGNAL("clicked()"),self.testMsg)
        self.connect(self.pushButton4,SIGNAL("clicked()"),self.reject)
        self.connect(self.buttonGroup1,SIGNAL("clicked(int)"),self.typeSelected)
        self.connect(self.cButton0,SIGNAL("textChanged(const QString&)"),self.button0Text)
        self.connect(self.cButton1,SIGNAL("textChanged(const QString&)"),self.button1Text)
        self.connect(self.cButton2,SIGNAL("textChanged(const QString&)"),self.button2Text)

        self.setTabOrder(self.rInformation,self.rQuestion)
        self.setTabOrder(self.rQuestion,self.rWarning)
        self.setTabOrder(self.rWarning,self.rCritical)
        self.setTabOrder(self.rCritical,self.rAbout)
        self.setTabOrder(self.rAbout,self.rAboutQt)
        self.setTabOrder(self.rAboutQt,self.eCaption)
        self.setTabOrder(self.eCaption,self.eMessage)
        self.setTabOrder(self.eMessage,self.cButton0)
        self.setTabOrder(self.cButton0,self.cButton1)
        self.setTabOrder(self.cButton1,self.cButton2)
        self.setTabOrder(self.cButton2,self.sDefault)
        self.setTabOrder(self.sDefault,self.sEscape)
        self.setTabOrder(self.sEscape,self.pushButton3)
        self.setTabOrder(self.pushButton3,self.pushButton4)
        self.setTabOrder(self.pushButton4,self.pushButton2)


    def languageChange(self):
        self.setCaption(self.__tr("QMessageBox Wizard"))
        self.buttonGroup1.setTitle(self.__tr("Type"))
        self.rInformation.setText(self.__tr("Information"))
        QToolTip.add(self.rInformation,self.__tr("Generate an Information QMessageBox"))
        self.rQuestion.setText(self.__tr("Question"))
        QToolTip.add(self.rQuestion,self.__tr("Generate a Question QMessageBox"))
        self.rWarning.setText(self.__tr("Warning"))
        QToolTip.add(self.rWarning,self.__tr("Generate a Warning QMessageBox"))
        self.rCritical.setText(self.__tr("Critical"))
        QToolTip.add(self.rCritical,self.__tr("Generate a Critical QMessageBox"))
        self.rAbout.setText(self.__tr("About"))
        QToolTip.add(self.rAbout,self.__tr("Generate an About QMessageBox"))
        self.rAboutQt.setText(self.__tr("About Qt"))
        QToolTip.add(self.rAboutQt,self.__tr("Generate an AboutQt QMessageBox"))
        self.textLabel1.setText(self.__tr("Caption"))
        QToolTip.add(self.eCaption,self.__tr("Enter the caption for the QMessageBox"))
        self.textLabel2.setText(self.__tr("Message"))
        QToolTip.add(self.eMessage,self.__tr("Enter the message to be shown in the QMessageBox"))
        self.Buttons.setTitle(self.__tr("Buttons"))
        self.cButton1.clear()
        self.cButton1.insertItem(QString.null)
        self.cButton1.insertItem(self.__tr("&OK"))
        self.cButton1.insertItem(self.__tr("&Cancel"))
        self.cButton1.insertItem(self.__tr("&Yes"))
        self.cButton1.insertItem(self.__tr("&No"))
        self.cButton1.insertItem(self.__tr("&Abort"))
        self.cButton1.insertItem(self.__tr("&Retry"))
        self.cButton1.insertItem(self.__tr("&Ignore"))
        QToolTip.add(self.cButton1,self.__tr("Enter the text of button 1"))
        self.cButton0.clear()
        self.cButton0.insertItem(QString.null)
        self.cButton0.insertItem(self.__tr("&OK"))
        self.cButton0.insertItem(self.__tr("&Cancel"))
        self.cButton0.insertItem(self.__tr("&Yes"))
        self.cButton0.insertItem(self.__tr("&No"))
        self.cButton0.insertItem(self.__tr("&Abort"))
        self.cButton0.insertItem(self.__tr("&Retry"))
        self.cButton0.insertItem(self.__tr("&Ignore"))
        QToolTip.add(self.cButton0,self.__tr("Enter the text of button 0"))
        self.textLabel3_2_2.setText(self.__tr("Button 2"))
        self.cButton2.clear()
        self.cButton2.insertItem(QString.null)
        self.cButton2.insertItem(self.__tr("&OK"))
        self.cButton2.insertItem(self.__tr("&Cancel"))
        self.cButton2.insertItem(self.__tr("&Yes"))
        self.cButton2.insertItem(self.__tr("&No"))
        self.cButton2.insertItem(self.__tr("&Abort"))
        self.cButton2.insertItem(self.__tr("&Retry"))
        self.cButton2.insertItem(self.__tr("&Ignore"))
        QToolTip.add(self.cButton2,self.__tr("Enter the text of button 2"))
        self.textLabel3_2.setText(self.__tr("Button 1"))
        self.textLabel3.setText(self.__tr("Button 0"))
        self.TextLabel1.setText(self.__tr("Default Button:"))
        QToolTip.add(self.sDefault,self.__tr("Enter the index of the default button"))
        self.TextLabel2.setText(self.__tr("Escape Button:"))
        QToolTip.add(self.sEscape,self.__tr("Enter the index of the button to be activated upon pressing Esc or -1 to ignore"))
        self.pushButton3.setText(self.__tr("&OK"))
        self.pushButton4.setText(self.__tr("&Cancel"))
        self.pushButton2.setText(self.__tr("&Test"))


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

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

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

    def testMsg(self):
        print "MessageBoxWizardForm.testMsg(): Not implemented yet"

    def typeSelected(self,a0):
        print "MessageBoxWizardForm.typeSelected(int): Not implemented yet"

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

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