Esempio n. 1
0
    def mousePressEvent(self, event):
        QFrame.mousePressEvent(self, event)

        video = self.backend.fillobj(self.video)
        if video:
            video_widget = Video(video, self)
            video_widget.show()
Esempio n. 2
0
    def mousePressEvent(self, event):
        QFrame.mousePressEvent(self, event)

        if event.button() == 4:
            self.newTabPressed()
        else:
            self.viewPressed()
Esempio n. 3
0
    def mousePressEvent(self, event):
        QFrame.mousePressEvent(self, event)

        if event.button() == 4:
            self.newTabPressed()
        else:
            self.viewPressed()
Esempio n. 4
0
    def mousePressEvent(self, event):
        QFrame.mousePressEvent(self, event)

        video = self.backend.fillobj(self.video)
        if video:
            video_widget = Video(video, self)
            video_widget.show()
    def mousePressEvent(self, event):
        QFrame.mousePressEvent(self, event)
        if self.clickable == False:
            return

        if event.button() == Qt.LeftButton:
            x = event.pos().x()
            rating = int(x / self.width() * 5.0) + 1
        elif event.button() == Qt.RightButton:
            rating = 5
        self.setRating(rating)
        self.ratingChangedByClicking.emit(rating)
Esempio n. 6
0
 def initGrid(self, rows: int, cols: int, newData: np.ndarray = None):
     """
     Initializes grid with given rows, cols and current data (last param is DEPRECATED).
     :param rows:
     :param cols:
     :param newData:
     :return:
     """
     for i in range(rows):
         self.all_cells.append([])
         for j in range(cols):
             cell = QFrame(self)
             self.setupFrame(cell)
             cell.setSizePolicy(
                 QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                       QtWidgets.QSizePolicy.Expanding))
             cell.mousePressEvent = partial(self.cell_clicked, (i, j))
             self.all_cells[-1].append(cell)
             self.lay.addWidget(cell, i, j)
Esempio n. 7
0
 def mousePressEvent(self, event):
     self.clicked_cb(self.segment.id)
     QFrame.mousePressEvent(self, event)