def showColorDialog(self):
		color = QColorDialog.getColor()
		if not color.isValid():
			return
		rgba = list(color.getRgbF())
		self.node.color = [rgba[0], rgba[1], rgba[2]]
		self.colorButton.setColor(self.node.color)
		self.nodeUpdated.emit(self.node)
 def showColorDialog(self):
     color = QColorDialog.getColor()
     if not color.isValid():
         return
     rgba = list(color.getRgbF())
     self.node.color = [rgba[0], rgba[1], rgba[2]]
     self.colorButton.setColor(self.node.color)
     self.nodeUpdated.emit(self.node)
	def showColorDialog(self):
		color = QColorDialog.getColor()
		if not color.isValid():
			return
		rgba = list(color.getRgbF())

		self.colorButton.setColor(rgba[0:3])
		self.color = self.colorButton.color
		self.valueChanged.emit(self.color)
    def showColorDialog(self):
        color = QColorDialog.getColor()
        if not color.isValid():
            return
        rgba = list(color.getRgbF())

        self.colorButton.setColor(rgba[0:3])
        self.color = self.colorButton.color
        self.valueChanged.emit(self.color)
示例#5
0
 def editorEvent( self, event, model, option, index ):
     column = GridManagerColumns.Columns[index.column()]
     # The only situation that we are looking at right now, is when we click at the button in the Color Column.
     if( (column == GridManagerColumns.Color) and (event.type() == QEvent.MouseButtonRelease) ):
         button_rect = self._get_color_picker_button_dimensions(option.rect)
         # If the user click inside the area of the button, we show the QColorDialog and use the color returned =]
         if( button_rect.contains( event.pos() ) ):
             self._color = QColorDialog.getColor()
             # There must be a better way to update the model, however, I found that this workaround works pretty well >.<
             # I'm still learning this s**t :P
             self.setModelData( None, model, index )
     return super(VoxelGridDelegate, self).editorEvent(event, model, option, index)
示例#6
0
 def change_point_color(self,color=None):
     if color==None:color=QColorDialog.getColor()
     if color.isValid():
         self.curve.setSymbolBrush(color)
示例#7
0
 def change_line_color(self,color=None):
     if color==None:color=QColorDialog.getColor()
     if color.isValid():
         self.curve.setPen(color)
示例#8
0
 def on_button_clicked(self):
     """Respond to button clicked event (callback)."""
     color = QColorDialog.getColor(initial=self.color)
     if color.isValid():
         self.color = color
         self._set_icon(color)
示例#9
0
 def chooseColor(self, button, option):
     """The user modifies an UI background color."""
     color = QColorDialog.getColor()
     if color.isValid():
         button.setPalette(QPalette(color))
         self.config.set('Appearance', option, color.name())
示例#10
0
 def change_point_color(self):
     color = QColorDialog.getColor()
     if color.isValid():
         self.pointcolor = color
示例#11
0
 def change_line_color(self):
     color = QColorDialog.getColor()
     if color.isValid():
         self.linecolor = color
 def changeColor(self, row, column):
     if column == 1:
         col = QColorDialog.getColor()
         parametricPulseGraph.COLOR_MAP[self.window.categoryTable.item(row,0).text()] = col
         self.window.categoryTable.item(row,1).setBackground(col)
         self.multiPanel.scene.update()