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)
Esempio n. 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)
Esempio n. 6
0
 def change_point_color(self,color=None):
     if color==None:color=QColorDialog.getColor()
     if color.isValid():
         self.curve.setSymbolBrush(color)
Esempio n. 7
0
 def change_line_color(self,color=None):
     if color==None:color=QColorDialog.getColor()
     if color.isValid():
         self.curve.setPen(color)
Esempio n. 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)
Esempio n. 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())
Esempio n. 10
0
 def change_point_color(self):
     color = QColorDialog.getColor()
     if color.isValid():
         self.pointcolor = color
Esempio n. 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()