Example #1
0
    def __init__(self, parent=None, name=None, modal=0, fl=0):
        ImageForm.__init__(self, parent, name, modal, fl)
        self.comboAlign.insertItem('None')
        self.notifier = Notifier(parent, 1, args=[self.progressBar])
        self.alignList['Left'] = 'left'
        self.alignList['Right'] = 'right'
        self.alignList['Center'] = 'center'
        self.btnUpload.setEnabled(False)
        self.buttonOk.setEnabled(False)
        self.http = QHttp()
        self.connect(self.http, SIGNAL("done(bool)"), self.httpDone)
        self.connect(self.http, SIGNAL("dataSendProgress (int, int)"),
                     self.httpProgress)
        self.http2 = QHttp()
        self.connect(self.http2, SIGNAL("done(bool)"), self.http2Done)
        self.connect(self.http2, SIGNAL("dataSendProgress (int, int)"),
                     self.httpProgress)

        for key in self.alignList.keys():
            self.comboAlign.insertItem(key)
Example #2
0
    def init(self):
        self.comboAlign.insertItem('None')
        self.alignList['Left'] = 'left'
        self.alignList['Right'] = 'right'
        self.alignList['Center'] = 'center'
        self.btnUpload.setEnabled(False)
        self.buttonOk.setEnabled(False)
        self.http = QHttp()
        self.connect(self.http, SIGNAL("done(bool)"), self.httpDone)
        self.connect(self.http, SIGNAL("dataSendProgress (int, int)"),
                     self.httpProgress)
        self.http2 = QHttp()
        self.connect(self.http2, SIGNAL("done(bool)"), self.http2Done)
        self.connect(self.http2, SIGNAL("dataSendProgress (int, int)"),
                     self.httpProgress)
        validatorBorder = QIntValidator(0, 99, self)
        validatorHeight = QIntValidator(0, 9999, self)
        validatorWidth = QIntValidator(0, 9999, self)
        self.editBorder.setValidator(validatorBorder)
        self.editHeight.setValidator(validatorHeight)
        self.editWidth.setValidator(validatorWidth)

        for key in self.alignList.keys():
            self.comboAlign.insertItem(key)