add attributes

This commit is contained in:
Tim Bentley 2018-05-06 09:03:42 +01:00
parent 7487721e26
commit ccafcfe0e5

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
# -*- coding: {'icon': utf-8 -*-
# vim: {'icon': autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
@ -54,69 +54,74 @@ class UiIcons(object):
color_disabled=palette.color(QtGui.QPalette.Disabled,
QtGui.QPalette.ButtonText))
icon_list = {
'add': 'fa.plus-circle',
'alert': 'fa.exclamation-triangle',
'arrow_down': 'fa.arrow-down',
'arrow_left': 'fa.arrow-left',
'arrow_right': 'fa.arrow-right',
'arrow_up': 'fa.arrow-up',
'audio': 'fa.file-sound-o',
'address': 'fa.book',
'back': 'fa.step-backward',
'bible': 'fa.book',
'blank': 'fa.times-circle',
'bottom': 'fa.angle-double-down',
'clock': 'fa.clock-o',
'clone': 'fa.clone',
'copy': 'fa.copy',
'copyright': 'fa.copyright',
'database': 'fa.database',
'default': 'fa.info-circle',
'desktop': 'fa.desktop',
'delete': 'fa.trash',
'download': 'fa.cloud-download',
'edit': 'fa.edit',
'email': 'fa.envelope',
'exit': 'fa.sign-out',
'group': 'fa.object-group',
'info': 'fa.info',
'live': 'fa.desktop',
'manual': 'fa.graduation-cap',
'minus': 'fa.minus',
'music': 'fa.music',
'new': 'fa.file',
'new_group': 'fa.folder',
'notes': 'fa.sticky-note',
'open': 'fa.folder-open',
'optical': 'fa.file-video-o',
'pause': 'fa.pause',
'play': 'fa.play',
'plus': 'fa.plus',
'presentation': 'fa.bar-chart',
'preview': 'fa.laptop',
'picture': 'fa.picture-o',
'print': 'fa.print',
'remote': 'fa.rss',
'repeat': 'fa.repeat',
'save': 'fa.save',
'search': 'fa.search',
'search_minus': 'fa.search-minus',
'search_plus': 'fa.search-plus',
'settings': 'fa.cogs',
'shortcuts': 'fa.wrench',
'stop': 'fa.stop',
'theme': 'fa.file-image-o',
'top': 'fa.angle-double-up',
'undo': 'fa.undo',
'upload': 'fa.cloud-upload',
'user': 'fa.user',
'users': 'fa.users',
'video': 'fa.file-video-o'
'add': {'icon': 'fa.plus-circle'},
'alert': {'icon': 'fa.exclamation-triangle'},
'arrow_down': {'icon': 'fa.arrow-down'},
'arrow_left': {'icon': 'fa.arrow-left'},
'arrow_right': {'icon': 'fa.arrow-right'},
'arrow_up': {'icon': 'fa.arrow-up'},
'audio': {'icon': 'fa.file-sound-o'},
'address': {'icon': 'fa.book'},
'back': {'icon': 'fa.step-backward'},
'bible': {'icon': 'fa.book'},
'blank': {'icon': 'fa.times-circle'},
'bottom': {'icon': 'fa.angle-double-down'},
'clock': {'icon': 'fa.clock-o'},
'clone': {'icon': 'fa.clone'},
'copy': {'icon': 'fa.copy'},
'copyright': {'icon': 'fa.copyright'},
'database': {'icon': 'fa.database'},
'default': {'icon': 'fa.info-circle'},
'desktop': {'icon': 'fa.desktop'},
'delete': {'icon': 'fa.trash'},
'download': {'icon': 'fa.cloud-download'},
'edit': {'icon': 'fa.edit'},
'email': {'icon': 'fa.envelope'},
'exit': {'icon': 'fa.sign-out'},
'group': {'icon': 'fa.object-group'},
'info': {'icon': 'fa.info'},
'live': {'icon': 'fa.desktop'},
'manual': {'icon': 'fa.graduation-cap'},
'minus': {'icon': 'fa.minus'},
'music': {'icon': 'fa.music'},
'new': {'icon': 'fa.file'},
'new_group': {'icon': 'fa.folder'},
'notes': {'icon': 'fa.sticky-note'},
'open': {'icon': 'fa.folder-open'},
'optical': {'icon': 'fa.file-video-o'},
'pause': {'icon': 'fa.pause'},
'play': {'icon': 'fa.play'},
'plus': {'icon': 'fa.plus'},
'presentation': {'icon': 'fa.bar-chart'},
'preview': {'icon': 'fa.laptop'},
'picture': {'icon': 'fa.picture-o'},
'print': {'icon': 'fa.print'},
'remote': {'icon': 'fa.rss'},
'repeat': {'icon': 'fa.repeat'},
'save': {'icon': 'fa.save'},
'search': {'icon': 'fa.search'},
'search_minus': {'icon': 'fa.search-minus'},
'search_plus': {'icon': 'fa.search-plus'},
'settings': {'icon': 'fa.cogs'},
'shortcuts': {'icon': 'fa.wrench'},
'stop': {'icon': 'fa.stop'},
'theme': {'icon': 'fa.file-image-o'},
'top': {'icon': 'fa.angle-double-up'},
'undo': {'icon': 'fa.undo'},
'upload': {'icon': 'fa.cloud-upload'},
'user': {'icon': 'fa.user'},
'users': {'icon': 'fa.users'},
'video': {'icon': 'fa.file-video-o'}
}
for key in icon_list:
try:
setattr(self, key, qta.icon(icon_list[key]))
icon = icon_list[key]['icon']
try:
attr = icon_list[key]['attr']
setattr(self, key, qta.icon('fa.plus-circle', attr))
except:
setattr(self, key, qta.icon(icon))
except:
setattr(self, key, qta.icon('fa.plus-circle', color='red'))