File tree Expand file tree Collapse file tree
lib/matplotlib/backends/qt4_editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,42 +79,21 @@ def choose_color(self):
7979 def get_color (self ):
8080 return self ._color
8181
82- < << << << HEAD
8382 @QtCore .Slot ("QColor" )
84- == == == =
85- << << << < HEAD
86- @pyqtSignature ("QColor" )
87- == == == =
88- @QtCore .Slot ("QColor" )
89- >> >> >> > 8 bba2a4 ... Merge pull request #2328 from mspacek/qtapi
90- >> >> >> > upstream / v1 .3 .x
9183 def set_color (self , color ):
9284 if color != self ._color :
9385 self ._color = color
9486 self .emit (QtCore .SIGNAL ("colorChanged(QColor)" ), self ._color )
9587 pixmap = QtGui .QPixmap (self .iconSize ())
9688 pixmap .fill (color )
97- << << << < HEAD
98- self .setIcon (QtGui .QIcon (pixmap ))
99- == == == =
100- << << << < HEAD
101- self .setIcon (QIcon (pixmap ))
102- == == == =
10389 self .setIcon (QtGui .QIcon (pixmap ))
10490
10591 color = QtCore .Property ("QColor" , get_color , set_color )
106- >> >> >> > 8 bba2a4 ... Merge pull request #2328 from mspacek/qtapi
107- > >> >> >> upstream / v1 .3. x
10892
109- color = QtCore .Property ("QColor" , get_color , set_color )
110-
111- < << << << HEAD
11293def col2hex (color ):
11394 """Convert matplotlib color to hex before passing to Qt"""
11495 return rgb2hex (colorConverter .to_rgb (color ))
115- == == == =
116- << << << < HEAD
117- == == == =
96+
11897def to_qcolor (color ):
11998 """Create a QColor from a matplotlib color"""
12099 qcolor = QtGui .QColor ()
@@ -126,8 +105,6 @@ def to_qcolor(color):
126105 return qcolor # return invalid QColor
127106 qcolor .setNamedColor (color ) # set using hex color
128107 return qcolor # return valid QColor
129- > >> >> >> 8 bba2a4 ... Merge pull request #2328 from mspacek/qtapi
130- > >> >> >> upstream / v1 .3. x
131108
132109def to_qcolor (color ):
133110 """Create a QColor from a matplotlib color"""
You can’t perform that action at this time.
0 commit comments