Example #1
0
 def __init__(self, parent, fields, record=None, name='BaseRecordDialog'):
     BaseDialogWindow.__init__(self, parent, name=name)
     text = 'This is a base record dialog.'
     self.frame = BaseRecordFrame(self, fields, text=text, record=record)
     self.showButtonApply(False)
     self.setButtonOKText('insert', 'insert')
     self.dialogs = {}
     self.refbuttons = self.frame._refbuttons
     self.setMainWidget(self.frame)
Example #2
0
class BaseRecordDialog(BaseDialogWindow):
    """This dialog has a BaseRecordFrame at self.frame.  It takes,
    as arguments, an ordered list of fields, and a dictionary containing
    at least those fields and it's values."""
    def __init__(self, parent, fields, record=None, name='BaseRecordDialog'):
        BaseDialogWindow.__init__(self, parent, name=name)
        text = 'This is a base record dialog.'
        self.frame = BaseRecordFrame(self, fields, text=text, record=record)
        self.showButtonApply(False)
        self.setButtonOKText('insert', 'insert')
        self.dialogs = {}
        self.refbuttons = self.frame._refbuttons
        self.setMainWidget(self.frame)
        
    def getRecordData(self):
        return self.frame.getRecordData()

    def setRecordData(self, data):
        self.frame.setRecordData(data)