def __init__(self, parent=None, designMode=False, with_filter_widget=True, perspective=None): TaurusBaseTableWidget.__init__(self, parent=parent, designMode=designMode, with_filter_widget=with_filter_widget, perspective=perspective, proxy=None) self.setContextMenuPolicy(Qt.Qt.ActionsContextMenu) self._simpleViewAction = Qt.QAction("Simple View", self) self._simpleViewAction.setCheckable(True) self.connect(self._simpleViewAction, Qt.SIGNAL("toggled(bool)"), self.setSimpleView) self.addAction(self._simpleViewAction) self.registerConfigProperty(self.isSimpleView, self.setSimpleView, "simpleView")
def __init__(self, parent=None, designMode=False, with_filter_widget=True, perspective=None): TaurusBaseTableWidget.__init__(self, parent=parent, designMode=designMode, with_filter_widget=with_filter_widget, perspective=perspective, proxy=None) self.setContextMenuPolicy(Qt.Qt.ActionsContextMenu) self._simpleViewAction = Qt.QAction("Simple View", self) self._simpleViewAction.setCheckable(True) self._simpleViewAction.toggled.connect(self.setSimpleView) self.addAction(self._simpleViewAction) self.registerConfigProperty( self.isSimpleView, self.setSimpleView, "simpleView")
def createViewWidget(self): tableView = TaurusBaseTableWidget.createViewWidget(self) self._delegate = ChannelDelegate(self) #self._delegate.setItemEditorFactory(Qt.QItemEditorFactory()) #This causes a segfault when calling ChannelDelegate.createEditor tableView.setItemDelegate(self._delegate) tableView.setSortingEnabled(False) self.connect(self._editorBar, Qt.SIGNAL("addTriggered"), self.addChannel) #TODO: For Taurus 4 compatibility if hasattr(self._editorBar, "addTriggered"): self._editorBar.addTriggered.connect(self.addChannel) self.connect(self._editorBar, Qt.SIGNAL("removeTriggered"), self.removeChannels) #TODO: For Taurus 4 compatibility if hasattr(self._editorBar, "removeTriggered"): self._editorBar.removeTriggered.connect(self.removeChannels) self.connect(self._editorBar, Qt.SIGNAL("moveUpTriggered"), self.moveUpChannel) #TODO: For Taurus 4 compatibility if hasattr(self._editorBar, "moveUpTriggered"): self._editorBar.moveUpTriggered.connect(self.moveUpChannel) self.connect(self._editorBar, Qt.SIGNAL("moveDownTriggered"), self.moveDownChannel) #TODO: For Taurus 4 compatibility if hasattr(self._editorBar, "moveDownTriggered"): self._editorBar.moveDownTriggered.connect(self.moveDownChannel) self.connect(self._editorBar, Qt.SIGNAL("moveTopTriggered"), self.moveTopChannel) if hasattr(self._editorBar, "moveTopTriggered"): self._editorBar.moveTopTriggered.connect(self.moveTopChannel) self.connect(self._editorBar, Qt.SIGNAL("moveBottomTriggered"), self.moveBottomChannel) if hasattr(self._editorBar, "moveBottomTriggered"): self._editorBar.moveBottomTriggered.connect(self.moveBottomChannel) return tableView
def createViewWidget(self): tableView = TaurusBaseTableWidget.createViewWidget(self) self._delegate = ChannelDelegate(self) # self._delegate.setItemEditorFactory(Qt.QItemEditorFactory()) #This # causes a segfault when calling ChannelDelegate.createEditor tableView.setItemDelegate(self._delegate) tableView.setSortingEnabled(False) self._editorBar.addTriggered.connect(self.addChannel) self._editorBar.removeTriggered.connect(self.removeChannels) self._editorBar.moveUpTriggered.connect(self.moveUpChannel) self._editorBar.moveDownTriggered.connect(self.moveDownChannel) self._editorBar.moveTopTriggered.connect(self.moveTopChannel) self._editorBar.moveBottomTriggered.connect(self.moveBottomChannel) return tableView
def getQtDesignerPluginInfo(cls): ret = TaurusBaseTableWidget.getQtDesignerPluginInfo() ret['module'] = 'taurus.qt.qtgui.extra_sardana' ret['group'] = 'Taurus Sardana' ret['icon'] = ":/designer/table.png" return ret
def createToolArea(self): ta = TaurusBaseTableWidget.createToolArea(self) e_bar = self._editorBar = EditorToolBar(self, self) ta.append(e_bar) return ta