Пример #1
0
    def __init__(self,parent, schema):
        self.schema = schema
        
        QWizard.__init__(self, parent)
        self.setWindowTitle(_('Generate Report'))

        self.selectElements = QWizardPage()
        self.selectElements.setLayout(QVBoxLayout())

        self.selectElements.setTitle(_('Create A Report'))
        self.selectElements.setSubTitle(_('Select the widgets to include in this report.'))
        
        #mainWidgetBox = redRQTCore.widgetBox(self.selectElements)

        self.topWidgetBox = redRQTCore.widgetBox(self.selectElements)
        #redRQTCore.widgetLabel(topWidgetBox,label='Select the widgets to include in the report.')
        
        self.widgetList = redRQTCore.treeWidget(self.topWidgetBox, label=_('Widget List'), displayLabel=False)
        self.widgetList.setHeaderLabels([_('Element'), _('Parameters')])

        self.widgetList.setSelectionMode(QAbstractItemView.NoSelection)
        buttonWidgetBox = redRQTCore.widgetBox(self.topWidgetBox,orientation='horizontal')
        
        acceptButton = redRQTCore.button(buttonWidgetBox, _('Expand/Collapse'),callback=self.expandCollapse)
        self.expandState=False
        #acceptButton = redRQTCore.button(buttonWidgetBox, _('Expand'),toggleButton=True)
        # QObject.connect(acceptButton, SIGNAL("clicked()"), self.accept)
        QObject.connect(self.widgetList, SIGNAL(" itemClicked (QTreeWidgetItem *,int)"), 
        self.widgetListItemClicked)
        
        QObject.connect(self.widgetList, SIGNAL(" itemChanged (QTreeWidgetItem *,int)"), 
        self.widgetListStateChange)
        
        self.addPage(self.selectElements)