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 *
-
- class AlignForm(QDialog):
-
- def __init__(self, parent, line_id, orientation, colors, line_count, choice_count, name = None, modal = 0, fl = 0):
- QDialog.__init__(self, parent, name, modal, fl)
- mid_point = (choice_count + 1) / 2
- if not name:
- self.setProperty('name', QVariant('AlignForm'))
-
- AlignFormLayout = QGridLayout(self, 1, 1, 11, 6, 'AlignFormLayout')
- self.helpButton = QPushButton(self, 'helpButton')
- AlignFormLayout.addWidget(self.helpButton, 1, 0)
- self.CancelButton = QPushButton(self, 'CancelButton')
- AlignFormLayout.addWidget(self.CancelButton, 1, 2)
- self.ContinueButton = QPushButton(self, 'ContinueButton')
- AlignFormLayout.addWidget(self.ContinueButton, 1, 3)
- spacer1 = QSpacerItem(270, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
- AlignFormLayout.addItem(spacer1, 1, 1)
- self.buttonGroup = QButtonGroup(self, 'buttonGroup')
- self.buttonGroup.setColumnLayout(0, Qt.Vertical)
- self.buttonGroup.layout().setSpacing(6)
- self.buttonGroup.layout().setMargin(11)
- buttonGroupLayout = QGridLayout(self.buttonGroup.layout())
- buttonGroupLayout.setAlignment(Qt.AlignTop)
- ChoiceLayout = QHBoxLayout(None, 0, 6, 'ChoiceLayout')
- for x in range(1, choice_count + 1):
- exec 'self.radioButton%d = QRadioButton( self.buttonGroup, "radioButton%d" )' % (x, x)
- exec 'self.radioButton%d.setText( "%s%d" )' % (x, line_id, x)
- if x == mid_point:
- exec 'self.radioButton%d.setChecked( 1 )' % x
-
- exec 'ChoiceLayout.addWidget( self.radioButton%d )' % x
-
- buttonGroupLayout.addMultiCellLayout(ChoiceLayout, 1, 1, 0, 1)
- self.Icon = QLabel(self.buttonGroup, 'Icon')
- self.Icon.setProperty('sizePolicy', QVariant(QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed, 0, 0, self.Icon.sizePolicy().hasHeightForWidth())))
- self.Icon.setProperty('scaledContents', QVariant(QVariant(1, 0)))
- buttonGroupLayout.addWidget(self.Icon, 0, 0)
- self.textLabel2_2 = QLabel(self.buttonGroup, 'textLabel2_2')
- self.textLabel2_2.setProperty('alignment', QVariant(QLabel.WordBreak | QLabel.AlignVCenter))
- buttonGroupLayout.addWidget(self.textLabel2_2, 0, 1)
- AlignFormLayout.addMultiCellWidget(self.buttonGroup, 0, 0, 0, 3)
- self.languageChange()
- self.resize(QSize(608, 222).expandedTo(self.minimumSizeHint()))
- self.clearWState(Qt.WState_Polished)
- self.connect(self.CancelButton, SIGNAL('clicked()'), self, SLOT('reject()'))
- self.connect(self.ContinueButton, SIGNAL('clicked()'), self, SLOT('accept()'))
- self.connect(self.buttonGroup, SIGNAL('clicked(int)'), self.buttonGroup_clicked)
- self.Icon.setPixmap(QPixmap(os.path.join(prop.image_dir, '%s-%s-%d.png' % (orientation, colors, line_count))))
- self.buttonGroup.setTitle(line_id)
- self.value = (choice_count + 1) / 2
-
-
- def buttonGroup_clicked(self, a0):
- self.value = a0 + 1
- log.debug(self.value)
-
-
- def languageChange(self):
- self.setProperty('caption', QVariant(self._AlignForm__tr('HP Device Manager - Alignment')))
- self.helpButton.setProperty('text', QVariant(self._AlignForm__tr('Help')))
- self.CancelButton.setProperty('text', QVariant(self._AlignForm__tr('Cancel')))
- self.ContinueButton.setProperty('text', QVariant(self._AlignForm__tr('Next >')))
- self.buttonGroup.setProperty('title', QVariant(self._AlignForm__tr('')))
- self.textLabel2_2.setProperty('text', QVariant(self._AlignForm__tr('Choose the set of lines where the line segments are <b>best</b> aligned.')))
-
-
- def __tr(self, s, c = None):
- return qApp.translate('AlignForm', s, c)
-
-
-