def __create_contours(self):
     items = [x.name for x in self._video.objects2D]
     item = QInputDialog.getItem(self,
                                 "Select the object to add a contour",
                                 "Object",
                                 items,
                                 editable=False)
     try:
         index = items.index(item[0])
         self.create_contours(list(self._video.objects2D)[index])
     except ValueError:
         pass
Example #2
0
    def __import_value_from_timeline(self):
        timeline = self.mainwindow._time
        graphs = timeline.graphs

        item, ok = QInputDialog.getItem(self,
                                        "Select the value to import",
                                        'Value',
                                        [str(graph) for graph in graphs],
                                        editable=False)
        if ok:
            for graph in graphs:
                if str(item) == str(graph):
                    v = self.create_value()
                    v.name = graph.name
                    for i in range(len(graph)):
                        v.set_value(i, graph[i])