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

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

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


        UMLCanvasSizeFormLayout = QGridLayout(self,1,1,6,6,"UMLCanvasSizeFormLayout")

        self.widthSpinBox = QSpinBox(self,"widthSpinBox")
        self.widthSpinBox.setMaxValue(100000)
        self.widthSpinBox.setMinValue(100)

        UMLCanvasSizeFormLayout.addWidget(self.widthSpinBox,0,1)

        self.heightSpinBox = QSpinBox(self,"heightSpinBox")
        self.heightSpinBox.setMaxValue(100000)
        self.heightSpinBox.setMinValue(100)

        UMLCanvasSizeFormLayout.addWidget(self.heightSpinBox,1,1)

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

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

        self.pushButton2 = QPushButton(self,"pushButton2")
        layout1.addWidget(self.pushButton2)
        spacer2 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout1.addItem(spacer2)

        UMLCanvasSizeFormLayout.addMultiCellLayout(layout1,2,2,0,1)

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

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

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

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

        self.languageChange()

        self.resize(QSize(314,107).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.pushButton1,SIGNAL("clicked()"),self.accept)
        self.connect(self.pushButton2,SIGNAL("clicked()"),self.reject)


    def languageChange(self):
        self.setCaption(self.__tr("Set Size"))
        QToolTip.add(self.widthSpinBox,self.__tr("Select the width of the diagram"))
        QToolTip.add(self.heightSpinBox,self.__tr("Select the height of the diagram"))
        self.pushButton1.setText(self.__tr("&Ok"))
        self.pushButton1.setAccel(self.__tr("Alt+O"))
        self.pushButton2.setText(self.__tr("&Cancel"))
        self.pushButton2.setAccel(self.__tr("Alt+C"))
        self.textLabel1.setText(self.__tr("Width (in pixels):"))
        self.textLabel2.setText(self.__tr("Height (in pixels):"))


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

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