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

# Form implementation generated from reading ui file 'UsermanagementWidgetDesign.ui'
#
# Created: Mon Dec 10 19:25:51 2007
#      by: The PyQt User Interface Compiler (pyuic) 3.16
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


class UsermanagementWidgetDesign(QWidget):
    def __init__(self,parent = None,name = None,fl = 0):
        QWidget.__init__(self,parent,name,fl)

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


        UsermanagementWidgetDesignLayout = QGridLayout(self,1,1,6,6,"UsermanagementWidgetDesignLayout")
        spacer8 = QSpacerItem(190,21,QSizePolicy.Expanding,QSizePolicy.Minimum)
        UsermanagementWidgetDesignLayout.addMultiCell(spacer8,6,6,0,1)

        self.accountLabel = QLabel(self,"accountLabel")
        self.accountLabel.setMinimumSize(QSize(32,32))
        self.accountLabel.setMaximumSize(QSize(32,32))

        UsermanagementWidgetDesignLayout.addWidget(self.accountLabel,0,0)

        self.shellLabel = QLabel(self,"shellLabel")
        self.shellLabel.setMinimumSize(QSize(32,32))

        UsermanagementWidgetDesignLayout.addWidget(self.shellLabel,7,0)

        self.homeLabel = QLabel(self,"homeLabel")
        self.homeLabel.setMinimumSize(QSize(32,32))

        UsermanagementWidgetDesignLayout.addWidget(self.homeLabel,8,0)

        self.groupLabel = QLabel(self,"groupLabel")
        self.groupLabel.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.groupLabel.sizePolicy().hasHeightForWidth()))
        self.groupLabel.setMinimumSize(QSize(32,32))

        UsermanagementWidgetDesignLayout.addWidget(self.groupLabel,4,0)

        self.passwordLabel = QLabel(self,"passwordLabel")
        self.passwordLabel.setMinimumSize(QSize(32,32))

        UsermanagementWidgetDesignLayout.addWidget(self.passwordLabel,9,0)

        self.mailLabel = QLabel(self,"mailLabel")
        self.mailLabel.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.mailLabel.sizePolicy().hasHeightForWidth()))
        self.mailLabel.setMinimumSize(QSize(32,32))

        UsermanagementWidgetDesignLayout.addWidget(self.mailLabel,11,0)
        spacer3 = QSpacerItem(21,16,QSizePolicy.Minimum,QSizePolicy.Fixed)
        UsermanagementWidgetDesignLayout.addItem(spacer3,5,0)
        spacer1 = QSpacerItem(21,16,QSizePolicy.Minimum,QSizePolicy.Expanding)
        UsermanagementWidgetDesignLayout.addMultiCell(spacer1,1,3,0,0)

        self.textLabel18 = QLabel(self,"textLabel18")
        self.textLabel18.setAlignment(QLabel.AlignVCenter)

        UsermanagementWidgetDesignLayout.addWidget(self.textLabel18,2,1)

        self.textLabel2 = QLabel(self,"textLabel2")
        self.textLabel2.setAlignment(QLabel.AlignVCenter)

        UsermanagementWidgetDesignLayout.addWidget(self.textLabel2,0,1)

        self.textLabel10 = QLabel(self,"textLabel10")
        self.textLabel10.setAlignment(QLabel.AlignVCenter)

        UsermanagementWidgetDesignLayout.addWidget(self.textLabel10,7,1)

        self.textLabel3 = QLabel(self,"textLabel3")
        self.textLabel3.setAlignment(QLabel.AlignVCenter)

        UsermanagementWidgetDesignLayout.addWidget(self.textLabel3,1,1)

        self.textLabel15 = QLabel(self,"textLabel15")
        self.textLabel15.setAlignment(QLabel.AlignVCenter)

        UsermanagementWidgetDesignLayout.addWidget(self.textLabel15,3,1)

        self.textLabel12 = QLabel(self,"textLabel12")
        self.textLabel12.setAlignment(QLabel.AlignVCenter)

        UsermanagementWidgetDesignLayout.addWidget(self.textLabel12,8,1)

        self.textLabel14 = QLabel(self,"textLabel14")
        self.textLabel14.setAlignment(QLabel.AlignVCenter)

        UsermanagementWidgetDesignLayout.addWidget(self.textLabel14,9,1)

        self.textLabel5 = QLabel(self,"textLabel5")
        self.textLabel5.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Preferred,0,0,self.textLabel5.sizePolicy().hasHeightForWidth()))
        self.textLabel5.setAlignment(QLabel.AlignVCenter)

        UsermanagementWidgetDesignLayout.addWidget(self.textLabel5,4,1)

        self.textLabel17 = QLabel(self,"textLabel17")
        self.textLabel17.setAlignment(QLabel.AlignVCenter)

        UsermanagementWidgetDesignLayout.addWidget(self.textLabel17,11,1)

        self.textLabel4 = QLabel(self,"textLabel4")
        self.textLabel4.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Preferred,0,0,self.textLabel4.sizePolicy().hasHeightForWidth()))
        self.textLabel4.setAlignment(QLabel.AlignVCenter | QLabel.AlignRight)

        UsermanagementWidgetDesignLayout.addWidget(self.textLabel4,5,1)

        self.groupEdit = QLineEdit(self,"groupEdit")
        self.groupEdit.setReadOnly(1)

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.groupEdit,4,4,2,5)
        spacer6 = QSpacerItem(112,21,QSizePolicy.Expanding,QSizePolicy.Minimum)
        UsermanagementWidgetDesignLayout.addMultiCell(spacer6,12,12,2,3)

        self.groupNumberEdit = QLineEdit(self,"groupNumberEdit")
        self.groupNumberEdit.setReadOnly(1)

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.groupNumberEdit,5,5,2,5)

        self.uidBox = QSpinBox(self,"uidBox")
        self.uidBox.setMaxValue(999999999)
        self.uidBox.setMinValue(0)
        self.uidBox.setValue(1000)

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.uidBox,1,1,2,4)

        self.nameEdit = QLineEdit(self,"nameEdit")

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.nameEdit,2,2,2,5)

        self.homeEdit = QLineEdit(self,"homeEdit")

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.homeEdit,8,8,2,5)

        self.passwordEdit = QLineEdit(self,"passwordEdit")
        self.passwordEdit.setReadOnly(1)

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.passwordEdit,9,9,2,5)

        self.shellEdit = QLineEdit(self,"shellEdit")

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.shellEdit,7,7,2,5)

        self.expireEdit = QDateEdit(self,"expireEdit")

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.expireEdit,3,3,2,5)

        self.uidEdit = QLineEdit(self,"uidEdit")
        self.uidEdit.setReadOnly(1)

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.uidEdit,0,0,2,5)

        self.mailBox = QComboBox(0,self,"mailBox")

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.mailBox,11,11,2,5)
        spacer4 = QSpacerItem(112,21,QSizePolicy.Expanding,QSizePolicy.Minimum)
        UsermanagementWidgetDesignLayout.addMultiCell(spacer4,10,10,2,3)

        self.addGroupButton = QPushButton(self,"addGroupButton")
        self.addGroupButton.setSizePolicy(QSizePolicy(QSizePolicy.Minimum,QSizePolicy.Fixed,0,0,self.addGroupButton.sizePolicy().hasHeightForWidth()))

        UsermanagementWidgetDesignLayout.addWidget(self.addGroupButton,6,2)
        spacer8_2 = QSpacerItem(31,31,QSizePolicy.Expanding,QSizePolicy.Minimum)
        UsermanagementWidgetDesignLayout.addItem(spacer8_2,6,3)

        self.groupButton = QPushButton(self,"groupButton")
        self.groupButton.setSizePolicy(QSizePolicy(QSizePolicy.Minimum,QSizePolicy.Fixed,0,0,self.groupButton.sizePolicy().hasHeightForWidth()))

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.groupButton,6,6,4,5)

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

        self.addMailButton = QPushButton(self,"addMailButton")
        layout3.addWidget(self.addMailButton)

        self.deleteMailButton = QPushButton(self,"deleteMailButton")
        layout3.addWidget(self.deleteMailButton)

        UsermanagementWidgetDesignLayout.addMultiCellLayout(layout3,12,12,4,5)

        self.passwordButton = QPushButton(self,"passwordButton")

        UsermanagementWidgetDesignLayout.addMultiCellWidget(self.passwordButton,10,10,4,5)
        spacer5 = QSpacerItem(21,16,QSizePolicy.Minimum,QSizePolicy.Expanding)
        UsermanagementWidgetDesignLayout.addItem(spacer5,13,4)

        self.findButton = QPushButton(self,"findButton")

        UsermanagementWidgetDesignLayout.addWidget(self.findButton,1,5)

        self.languageChange()

        self.resize(QSize(624,551).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.addMailButton,SIGNAL("clicked()"),self.addMail)
        self.connect(self.deleteMailButton,SIGNAL("clicked()"),self.deleteMail)
        self.connect(self.passwordButton,SIGNAL("clicked()"),self.editPassword)
        self.connect(self.groupButton,SIGNAL("clicked()"),self.editGroups)
        self.connect(self.uidBox,SIGNAL("valueChanged(int)"),self.uidChanged)
        self.connect(self.nameEdit,SIGNAL("textChanged(const QString&)"),self.commonNameChanged)
        self.connect(self.expireEdit,SIGNAL("valueChanged(const QDate&)"),self.expireChanged)
        self.connect(self.shellEdit,SIGNAL("textChanged(const QString&)"),self.shellChanged)
        self.connect(self.homeEdit,SIGNAL("textChanged(const QString&)"),self.homeChanged)
        self.connect(self.uidEdit,SIGNAL("textChanged(const QString&)"),self.uidNameChanged)
        self.connect(self.findButton,SIGNAL("clicked()"),self.nextFreeUserID)
        self.connect(self.addGroupButton,SIGNAL("clicked()"),self.addGroup)

        self.setTabOrder(self.uidEdit,self.uidBox)
        self.setTabOrder(self.uidBox,self.findButton)
        self.setTabOrder(self.findButton,self.nameEdit)
        self.setTabOrder(self.nameEdit,self.expireEdit)
        self.setTabOrder(self.expireEdit,self.groupEdit)
        self.setTabOrder(self.groupEdit,self.groupNumberEdit)
        self.setTabOrder(self.groupNumberEdit,self.groupButton)
        self.setTabOrder(self.groupButton,self.shellEdit)
        self.setTabOrder(self.shellEdit,self.homeEdit)
        self.setTabOrder(self.homeEdit,self.passwordEdit)
        self.setTabOrder(self.passwordEdit,self.passwordButton)
        self.setTabOrder(self.passwordButton,self.mailBox)
        self.setTabOrder(self.mailBox,self.addMailButton)
        self.setTabOrder(self.addMailButton,self.deleteMailButton)


    def languageChange(self):
        self.setCaption(self.__tr("Usermanagement"))
        self.accountLabel.setText(self.__tr("US","DO NOT TRANSLATE"))
        self.shellLabel.setText(self.__tr("SH","DO NOT TRANSLATE"))
        self.homeLabel.setText(self.__tr("HO","DO NOT TRANSLATE"))
        self.groupLabel.setText(self.__tr("GR"))
        self.passwordLabel.setText(self.__tr("PW","DO NOT TRANSLATE"))
        self.mailLabel.setText(self.__tr("M","DO NOT TRANSLATE"))
        self.textLabel18.setText(self.__tr("Common name:"))
        self.textLabel2.setText(self.__tr("User ID:"))
        self.textLabel10.setText(self.__tr("Login shell:"))
        self.textLabel3.setText(self.__tr("User ID number:"))
        self.textLabel15.setText(self.__tr("Valid until:"))
        self.textLabel12.setText(self.__tr("Home directory:"))
        self.textLabel14.setText(self.__tr("Password:"))
        self.textLabel5.setText(self.__tr("Primary group:"))
        self.textLabel17.setText(self.__tr("Mail:"))
        self.textLabel4.setText(self.__tr("Group ID number:"))
        self.homeEdit.setText(QString.null)
        self.shellEdit.setText(QString.null)
        self.addGroupButton.setText(self.__tr("Add group"))
        QToolTip.add(self.addGroupButton,self.__tr("Add a new posixGroup"))
        QWhatsThis.add(self.addGroupButton,QString.null)
        self.groupButton.setText(self.__tr("Manage group memberships"))
        self.addMailButton.setText(self.__tr("Add..."))
        self.deleteMailButton.setText(self.__tr("Delete"))
        self.passwordButton.setText(self.__tr("Change password..."))
        self.findButton.setText(self.__tr("Find next free"))


    def editPassword(self):
        print "UsermanagementWidgetDesign.editPassword(): Not implemented yet"

    def deleteMail(self):
        print "UsermanagementWidgetDesign.deleteMail(): Not implemented yet"

    def addMail(self):
        print "UsermanagementWidgetDesign.addMail(): Not implemented yet"

    def editGroups(self):
        print "UsermanagementWidgetDesign.editGroups(): Not implemented yet"

    def uidChanged(self):
        print "UsermanagementWidgetDesign.uidChanged(): Not implemented yet"

    def commonNameChanged(self):
        print "UsermanagementWidgetDesign.commonNameChanged(): Not implemented yet"

    def expireChanged(self):
        print "UsermanagementWidgetDesign.expireChanged(): Not implemented yet"

    def shellChanged(self):
        print "UsermanagementWidgetDesign.shellChanged(): Not implemented yet"

    def homeChanged(self):
        print "UsermanagementWidgetDesign.homeChanged(): Not implemented yet"

    def saveAccount(self):
        print "UsermanagementWidgetDesign.saveAccount(): Not implemented yet"

    def uidNameChanged(self):
        print "UsermanagementWidgetDesign.uidNameChanged(): Not implemented yet"

    def nextFreeUserID(self):
        print "UsermanagementWidgetDesign.nextFreeUserID(): Not implemented yet"

    def addGroup(self):
        print "UsermanagementWidgetDesign.addGroup(): Not implemented yet"

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

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