def setColor(self, *args): color = QtGui.QColor() color.setRgbF(*self.backupColor) color = QtWidgets.QColorDialog.getColor( color, self, 'Color', QtWidgets.QColorDialog.ColorDialogOption(1)) if not color.isValid(): return self.line.set_color(color.getRgbF()) self.canvas.draw()
def setFaceColor(self, *args): """ Sets the facecolor of the selected line. """ color = QtGui.QColor() color.setRgbF(*self.backupFaceColor) color = QtWidgets.QColorDialog.getColor( color, self, 'Facecolor', QtWidgets.QColorDialog.ColorDialogOption(1)) if not color.isValid(): return self.line.set_markerfacecolor(color.getRgbF()) self.canvas.draw()