Logo Search packages:      
Sourcecode: qa-assistant version File versions  Download package

def propview::PropertiesView::create_layout (   self  ) 

Definition at line 30 of file propview.py.

00030                            :
        '''
        '''
        props = self.model
        if not props:
            label = gtk.Label('This CheckList does not contain any properties.')
            self.add(label)
            label.show()
            return
        
        self.labels = gtk.VBox()
        self.entries = gtk.VBox()
        self.add(self.labels)
        self.add(self.entries)
        self.propDisplays = {}

        for propName in props.keys():
            if props[propName].propType == 'automatic':
                value = props[propName].value or '<No value>'
                self.propDisplays[propName] = gtk.Label(value)
                outPropName = None
            else:
                value = props[propName].value or ''
                entry = gtk.Entry()
                entry.set_text(value)
                entry.connect('focus-out-event', self._change_property,
                        propName)
                self.propDisplays[propName] = entry
                if props[propName].propType == 'onload':
                    outPropName = '<span foreground="red" style="italic">' \
                            + propName + '</span>'
                else:
                    outPropName = None
            label = gtk.Label()
            if outPropName:
                label.set_markup(outPropName)
            else:
                label.set_text(propName)
            self.labels.add(label)
            label.show()
            self.propDisplays[propName].show()
            self.entries.add(self.propDisplays[propName])

        self.labels.show()
        self.entries.show()
            
    def _change_property(self, entry, event, propName):


Generated by  Doxygen 1.6.0   Back to index