Exemplo n.º 1
0
 def __init__(self, parent, fields, name='SimpleRecordDialog'):
     KDialogBase.__init__(self, parent, name)
     self.page = QFrame(self)
     self.setMainWidget(self.page)
     text = 'this is a <em>simple</em> record dialog'
     self.grid = SimpleRecord(self.page, fields, text, name=name)
     self.showButtonApply(False)
     self.setButtonOKText('insert', 'insert')
     self.show()
Exemplo n.º 2
0
 def __init__(self, app, parent, profile):
     KMainWindow.__init__(self, parent, 'TraitAssigner')
     self.page = QFrame(self)
     self.vbox = QVBoxLayout(self.page, 5, 7)
     self.listBox = KActionSelector(self.page)
     self.listBox.setShowUpDownButtons(True)
     self.setCentralWidget(self.page)
     self.vbox.addWidget(self.listBox)
     hbox = QHBoxLayout(self.page, 5, 7)
     self.vbox.addLayout(hbox)
     self.ok_button = KPushButton('ok', self.page)
     self.cancel_button = KPushButton('cancel', self.page)
     hbox.addWidget(self.ok_button)
     hbox.addWidget(self.cancel_button)
     self.app = app
     self.db = app.db
     self.profile = Profile(app.conn)
     self.profile.set_profile(profile)
     self.suite = self.profile.current.suite
     self.traits = StatementCursor(app.conn)
     self.traits.set_table('%s_traits'  % self.suite)
     self.initlistView()
     self.show()