def change_color(self, index): """Invoke palette editor and set the color""" color = self.model().data(index, ColorRole) if color is None: return dlg = QColorDialog(QColor(*color)) if dlg.exec(): color = dlg.selectedColor() self.model().setData(index, color.getRgb(), ColorRole)
def __pick_a_color_event(self): color = QColor(self.color[2], self.color[1], self.color[0]) color = QColorDialog.getColor(color, parent=self, title='Pick a color for the path') self.color = color.blue(), color.green(), color.red() self.mainwindow._player.refresh()
def __pick_color_evt(self): color = QColorDialog.getColor( initial = QColor(self._color.label), parent = self._widget, options = conf.PYFORMS_COLORDIALOGS_OPTIONS ) if color: self._color.label = color.name()
def mousePressEvent(self, ev): color = QColorDialog.getColor(self.color) if color.isValid(): self.setColor(color) if self.master and hasattr(self.master, "colorSchemaChange"): self.master.colorSchemaChange()
def changeDiscreteColor(self, item): r, g, b = item.rgbColor color = QColorDialog.getColor(QColor(r, g, b), self) if color.isValid(): item.setIcon(ColorPixmap(color, 25)) item.rgbColor = (color.red(), color.green(), color.blue())
def __pick_color(self): """Dialog to choose a color.""" self.color = QColorDialog.getColor(self.color) self.__preview_color()
def __pickcolor_evt(self): color = QColorDialog.getColor(self._current_selected_graph._color, self, 'Pick a color for the graph') self._current_selected_graph._color = color self._timeline.repaint()
def __pickColor(self): self._time.color = QColorDialog.getColor(self._time.color) if self._time._selected != None: self._time._selected.color = self._time.color self._time.repaint()