10 """ Table view that lists python configuration code.
13 LABEL =
"Python configuration code"
16 logging.debug(__name__ +
": __init__")
17 TableView.__init__(self,parent)
19 self.horizontalHeader().hide()
23 self.connect(self, SIGNAL(
"itemClicked(QTableWidgetItem*)"), self.
itemClicked)
26 """ Create item for an object.
28 TableView._createItem(self, object, properties)
40 self.setCellWidget(self.rowCount()-1, 0, button)
43 self.emit(SIGNAL(
"importButtonClicked"),self.sender().object)
46 self.emit(SIGNAL(
"applyButtonClicked"),self.sender().object)
49 self.emit(SIGNAL(
"removeButtonClicked"),self.sender().object)
52 result=TableView.updateContent(self)
53 self.horizontalHeader().resizeSection(0,self.cellWidget(0,0).sizeHint().
width())
57 TableView.keyPressEvent(self,event)
58 if event.key()
in [Qt.Key_Backspace,Qt.Key_Delete]:
59 self.emit(SIGNAL(
"removeButtonClicked"),self.
selection())
62 logging.debug(__name__ +
": itemClicked")
64 self.setCurrentCell(self.currentRow(),0)