home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.4)
-
- from base.g import *
- import os.path as os
- from qt import *
- from align10form_base import Align10Form_Base
-
- class Align10Form(Align10Form_Base):
-
- def __init__(self, pattern, parent = None, name = None, modal = 0, fl = 0):
- Align10Form_Base.__init__(self, parent, name, modal, fl)
- self.Icon.setPixmap(QPixmap(os.path.join(prop.image_dir, 'align10.png')))
- if pattern == 1:
- self.controls = {
- 'A': (True, 23),
- 'B': (True, 9),
- 'C': (True, 9),
- 'D': (False, 0),
- 'E': (False, 0),
- 'F': (False, 0),
- 'G': (False, 0),
- 'H': (False, 0) }
- elif pattern == 2:
- self.controls = {
- 'A': (True, 23),
- 'B': (True, 17),
- 'C': (True, 23),
- 'D': (True, 23),
- 'E': (True, 9),
- 'F': (True, 9),
- 'G': (True, 9),
- 'H': (True, 9) }
- elif pattern == 3:
- self.controls = {
- 'A': (True, 23),
- 'B': (True, 9),
- 'C': (True, 23),
- 'D': (True, 23),
- 'E': (True, 9),
- 'F': (True, 9),
- 'G': (True, 9),
- 'H': (True, 9) }
-
- for line in self.controls:
- if not self.controls[line][0]:
- eval('self.comboBox%s.setEnabled(False)' % line)
- continue
- for x in range(self.controls[line][1]):
- eval('self.comboBox%s.insertItem("%s%d")' % (line, line, x + 1))
-
-
-
-
- def getValues(self):
- ret = []
- for line in self.controls:
- if not self.controls[line][0]:
- ret.append(0)
- continue
- exec 'selected = str(self.comboBox%s.currentText())' % line
-
- try:
- selected = int(selected[1:])
- except ValueError:
- selected = 0
-
- ret.append(selected)
-
- return ret
-
-
-