How to use the plottr.Slot function in plottr

To help you get started, we’ve selected a few plottr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github data-plottr / plottr / plottr / apps / monitr.py View on Github external
    @Slot(str)
    def processFileSelection(self, filePath: str):
        self.selectedFile = filePath
        groups = all_datadicts_from_hdf5(filePath, structure_only=True)
        self.dataFileSelected.emit(groups)
github data-plottr / plottr / plottr / apps / ui / monitr.py View on Github external
    @Slot()
    def processSelection(self):
        selected = self.selectedItems()
        if len(selected) == 0:
            return
        nameAndExt = os.path.splitext(selected[0].text(0))
        if nameAndExt[-1] in self.fileExtensions:
            path = self.itemPath(selected[0])
            self.dataFileSelected.emit(path)
github data-plottr / plottr / plottr / apps / ui / monitr.py View on Github external
    @Slot()
    def onPlotActionTriggered(self):
        self.plotRequested.emit(self.selectedGroup)
github data-plottr / plottr / plottr / apps / ui / monitr.py View on Github external
    @Slot(QtCore.QPoint)
    def onCustomContextMenuRequested(self, pos):
        item = self.itemAt(pos)
        if item not in self.groupItems:
            return

        self.selectedGroup = item.text(0)
        self.plotAction.setText(f"Plot '{item.text(0)}'")
        self.dataPopup.exec(self.mapToGlobal(pos))
github data-plottr / plottr / plottr / apps / monitr.py View on Github external
    @Slot()
    def plotQueuedFiles(self):
        if not self.ui.autoPlotNewAction.isChecked():
            return

        removeFiles = []
        for f in self.newFiles:
            try:
                contents = all_datadicts_from_hdf5(f, structure_only=True)
            except OSError:
                contents = {}

            if len(contents) > 0:
                for grp in contents.keys():
                    self.plot(f, grp)
                removeFiles.append(f)
github data-plottr / plottr / plottr / apps / monitr.py View on Github external
    @Slot(list)
    def onNewDataFilesFound(self, files: List[str]):
        if not self.ui.autoPlotNewAction.isChecked():
            return

        self.newFiles += files
github data-plottr / plottr / plottr / apps / monitr.py View on Github external
    @Slot(str)
    def plotSelected(self, group: str):
        self.plot(self.selectedFile, group)
github data-plottr / plottr / plottr / apps / ui / monitr.py View on Github external
    @Slot(object)
    def setData(self, data: Dict[str, DataDict]):
        """Set the data to display."""
        self.clear()
        self.data = {}
        self.groupItems = []

        for grpName, grpData in data.items():
            self.data[grpName] = data[grpName]
            grpItem = QtWidgets.QTreeWidgetItem(self, [grpName])
            self.groupItems.append(grpItem)
            self.addTopLevelItem(grpItem)
            dataParent = QtWidgets.QTreeWidgetItem(grpItem, ['[DATA]'])
            metaParent = QtWidgets.QTreeWidgetItem(grpItem, ['[META]'])

            for dn, dv in grpData.data_items():
                vals = [grpData.label(dn), str(grpData.meta_val('shape', dn))]
github data-plottr / plottr / plottr / plot / mpl.py View on Github external
    @Slot(PlotType)
    def _plotTypeFromToolBar(self, plotType: PlotType):
        if plotType is not self.plotType:
            self.plotType = plotType
            self._plotData(adjustSize=True)
github data-plottr / plottr / plottr / node / filter / correct_offset.py View on Github external
    @Slot(str)
    @emitGuiUpdate('dimensionSelected')
    def signalDimensionSelection(self, val: str):
        return val