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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/UI/EmailForm.ui'
#
# Created: So Nov 27 16:13:04 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 EmailForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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


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

        self.mainSplitter = QSplitter(self,"mainSplitter")
        self.mainSplitter.setOrientation(QSplitter.Vertical)

        LayoutWidget = QWidget(self.mainSplitter,"layout5")
        layout5 = QVBoxLayout(LayoutWidget,6,6,"layout5")

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

        self.textLabel1 = QLabel(LayoutWidget,"textLabel1")
        layout2.addWidget(self.textLabel1)

        self.subject = QLineEdit(LayoutWidget,"subject")
        layout2.addWidget(self.subject)
        layout5.addLayout(layout2)

        self.textLabel2 = QLabel(LayoutWidget,"textLabel2")
        layout5.addWidget(self.textLabel2)

        self.message = QTextEdit(LayoutWidget,"message")
        self.message.setTextFormat(QTextEdit.PlainText)
        self.message.setWordWrap(QTextEdit.FixedColumnWidth)
        self.message.setWrapColumnOrWidth(70)
        layout5.addWidget(self.message)

        LayoutWidget_2 = QWidget(self.mainSplitter,"layout9")
        layout9 = QGridLayout(LayoutWidget_2,1,1,6,6,"layout9")

        self.attachments = QListView(LayoutWidget_2,"attachments")
        self.attachments.addColumn(self.__tr("Name"))
        self.attachments.addColumn(self.__tr("Type"))
        self.attachments.setAllColumnsShowFocus(1)

        layout9.addWidget(self.attachments,1,0)

        layout8 = QVBoxLayout(None,0,6,"layout8")

        self.addButton = QPushButton(LayoutWidget_2,"addButton")
        layout8.addWidget(self.addButton)

        self.deleteButton = QPushButton(LayoutWidget_2,"deleteButton")
        layout8.addWidget(self.deleteButton)
        spacer3 = QSpacerItem(20,16,QSizePolicy.Minimum,QSizePolicy.Expanding)
        layout8.addItem(spacer3)

        layout9.addLayout(layout8,1,1)

        self.textLabel3 = QLabel(LayoutWidget_2,"textLabel3")
        self.textLabel3.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Fixed,0,0,self.textLabel3.sizePolicy().hasHeightForWidth()))

        layout9.addMultiCellWidget(self.textLabel3,0,0,0,1)
        EmailFormLayout.addWidget(self.mainSplitter)

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

        self.sendButton = QPushButton(self,"sendButton")
        self.sendButton.setDefault(1)
        layout1.addWidget(self.sendButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        layout1.addWidget(self.cancelButton)
        spacer1 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout1.addItem(spacer1)
        EmailFormLayout.addLayout(layout1)

        self.languageChange()

        self.resize(QSize(600,547).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.addButton,SIGNAL("clicked()"),self.handleAdd)
        self.connect(self.deleteButton,SIGNAL("clicked()"),self.handleDelete)
        self.connect(self.sendButton,SIGNAL("clicked()"),self.handleSend)
        self.connect(self.cancelButton,SIGNAL("clicked()"),self.reject)

        self.setTabOrder(self.subject,self.message)
        self.setTabOrder(self.message,self.attachments)
        self.setTabOrder(self.attachments,self.addButton)
        self.setTabOrder(self.addButton,self.deleteButton)
        self.setTabOrder(self.deleteButton,self.sendButton)
        self.setTabOrder(self.sendButton,self.cancelButton)

        self.textLabel1.setBuddy(self.subject)
        self.textLabel2.setBuddy(self.message)
        self.textLabel3.setBuddy(self.attachments)


    def languageChange(self):
        self.setCaption(self.__tr("Send bug report"))
        self.textLabel1.setText(self.__tr("&Subject:"))
        QToolTip.add(self.subject,self.__tr("Enter the subject"))
        self.textLabel2.setText(self.__tr("Enter your &bug description below.  All needed version information is added automatically."))
        self.attachments.header().setLabel(0,self.__tr("Name"))
        self.attachments.header().setLabel(1,self.__tr("Type"))
        self.addButton.setText(self.__tr("&Add..."))
        self.addButton.setAccel(self.__tr("Alt+A"))
        QToolTip.add(self.addButton,self.__tr("Press to add an attachment"))
        self.deleteButton.setText(self.__tr("&Delete"))
        self.deleteButton.setAccel(self.__tr("Alt+D"))
        QToolTip.add(self.deleteButton,self.__tr("Delete the selected entry from the list of attachments"))
        self.textLabel3.setText(self.__tr("A&ttachments"))
        self.sendButton.setText(self.__tr("S&end"))
        self.sendButton.setAccel(self.__tr("Alt+E"))
        QToolTip.add(self.sendButton,self.__tr("Press to send your bug report"))
        self.cancelButton.setText(self.__tr("&Cancel"))
        self.cancelButton.setAccel(self.__tr("Alt+C"))
        QToolTip.add(self.cancelButton,QString.null)


    def handleAdd(self):
        print "EmailForm.handleAdd(): Not implemented yet"

    def handleDelete(self):
        print "EmailForm.handleDelete(): Not implemented yet"

    def handleSend(self):
        print "EmailForm.handleSend(): Not implemented yet"

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

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