Example #1
0
 def __init__(self, parent=None):
     logging.debug(__name__ + ": __init__")
     TableView.__init__(self,parent)
     self.setColumns(["Type","Label","Product","Process"])
     self._firstColumn=0
     self._autosizeColumns=False
     self._sortingFlag=True
Example #2
0
 def __init__(self, parent=None):
     logging.debug(__name__ + ": __init__")
     TableView.__init__(self, parent)
     self.setColumns(["Type", "Label", "Product", "Process"])
     self._firstColumn = 0
     self._autosizeColumns = False
     self._sortingFlag = True
Example #3
0
    def __init__(self, parent=None):
        logging.debug(__name__ + ": __init__")
        TableView.__init__(self,parent)
        self.setColumns(["Buttons","code"])
        self.horizontalHeader().hide()
        self.setSorting(False)
        self._firstColumn=1

        self.connect(self, SIGNAL("itemClicked(QTableWidgetItem*)"), self.itemClicked)
Example #4
0
    def __init__(self, parent=None):
        logging.debug(__name__ + ": __init__")
        TableView.__init__(self, parent)
        self.setColumns(["Buttons", "code"])
        self.horizontalHeader().hide()
        self.setSorting(False)
        self._firstColumn = 1

        self.connect(self, SIGNAL("itemClicked(QTableWidgetItem*)"),
                     self.itemClicked)
Example #5
0
 def _createItem(self, object, properties):
     """ Create item for an object.
     """
     TableView._createItem(self, object, properties)
     button=QToolButton()
     button.object=object
     if self.dataAccessor().label(object)=="Import":
         button.setText("...")
         self.connect(button, SIGNAL('clicked(bool)'), self.importButtonClicked)
     elif self.dataAccessor().label(object)=="Apply tool":
         button.setText("+")
         self.connect(button, SIGNAL('clicked(bool)'), self.applyButtonClicked)
     else:
         button.setText("X")
         self.connect(button, SIGNAL('clicked(bool)'), self.removeButtonClicked)
     self.setCellWidget(self.rowCount()-1, 0, button)
Example #6
0
 def _createItem(self, object, properties):
     """ Create item for an object.
     """
     TableView._createItem(self, object, properties)
     button = QToolButton()
     button.object = object
     if self.dataAccessor().label(object) == "Import":
         button.setText("...")
         self.connect(button, SIGNAL('clicked(bool)'),
                      self.importButtonClicked)
     elif self.dataAccessor().label(object) == "Apply tool":
         button.setText("+")
         self.connect(button, SIGNAL('clicked(bool)'),
                      self.applyButtonClicked)
     else:
         button.setText("X")
         self.connect(button, SIGNAL('clicked(bool)'),
                      self.removeButtonClicked)
     self.setCellWidget(self.rowCount() - 1, 0, button)
Example #7
0
 def keyPressEvent(self,event):
     TableView.keyPressEvent(self,event)
     if event.key() in [Qt.Key_Backspace,Qt.Key_Delete]:    
         self.emit(SIGNAL("removeButtonClicked"),self.selection())
Example #8
0
 def updateContent(self):
     result=TableView.updateContent(self)
     self.horizontalHeader().resizeSection(0,self.cellWidget(0,0).sizeHint().width())
     return result
Example #9
0
 def selection(self):
     return self.dataAccessor().read(TableView.selection(self))
Example #10
0
 def selection(self):
     return self.dataAccessor().read(TableView.selection(self))
Example #11
0
 def keyPressEvent(self, event):
     TableView.keyPressEvent(self, event)
     if event.key() in [Qt.Key_Backspace, Qt.Key_Delete]:
         self.emit(SIGNAL("removeButtonClicked"), self.selection())
Example #12
0
 def updateContent(self):
     result = TableView.updateContent(self)
     self.horizontalHeader().resizeSection(
         0,
         self.cellWidget(0, 0).sizeHint().width())
     return result