def select_color(cls, color, callback): '''select color, receives a e3.Message.Color with the current color the callback receives a new color object woth the new selection ''' qt_color = Utils.e3_color_to_qcolor(color) new_qt_color = QtGui.QColorDialog.getColor(qt_color) if new_qt_color.isValid() and not new_qt_color == qt_color: color = Utils.qcolor_to_e3_color(new_qt_color) callback(color)
def _get_e3_style(self): '''Returns the font style in e3 format''' qt_font = self._get_qt_font() e3_color = Utils.qcolor_to_e3_color(self._qt_color) e3_style = Utils.qfont_to_style(qt_font, e3_color) return e3_style