forked from openlp/openlp
fix up location of icons
This commit is contained in:
parent
cd418f7825
commit
4760343899
@ -554,58 +554,3 @@ def get_language(name):
|
|||||||
if language.name == name_title or language.code == name_lower:
|
if language.name == name_title or language.code == name_lower:
|
||||||
return language
|
return language
|
||||||
return None
|
return None
|
||||||
|
|
||||||
import qtawesome as qta
|
|
||||||
|
|
||||||
|
|
||||||
class UiIcons(object):
|
|
||||||
"""
|
|
||||||
Provide standard icons for objects to use.
|
|
||||||
"""
|
|
||||||
__instance__ = None
|
|
||||||
|
|
||||||
def __new__(cls):
|
|
||||||
"""
|
|
||||||
Override the default object creation method to return a single instance.
|
|
||||||
"""
|
|
||||||
if not cls.__instance__:
|
|
||||||
cls.__instance__ = object.__new__(cls)
|
|
||||||
return cls.__instance__
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
"""
|
|
||||||
These are the font icons used in the code.
|
|
||||||
"""
|
|
||||||
self.add = qta.icon('fa.plus-circle')
|
|
||||||
self.arrow_down = qta.icon('fa.arrow-down')
|
|
||||||
self.arrow_up = qta.icon('fa.arrow-up')
|
|
||||||
self.address = qta.icon('fa.book')
|
|
||||||
self.bible = qta.icon('fa.book')
|
|
||||||
self.bottom = qta.icon('fa.angle-double-down')
|
|
||||||
self.clone = qta.icon('fa.clone')
|
|
||||||
self.copy = qta.icon('fa.copy')
|
|
||||||
self.copyright = qta.icon('fa.copyright')
|
|
||||||
self.database = qta.icon('fa.database')
|
|
||||||
self.default = qta.icon('fa.info-circle')
|
|
||||||
self.delete = qta.icon('fa.trash')
|
|
||||||
self.edit = qta.icon('fa.edit')
|
|
||||||
self.exit = qta.icon('fa.sign-out')
|
|
||||||
self.download = qta.icon('fa.cloud-download')
|
|
||||||
self.live = qta.icon('fa.camera')
|
|
||||||
self.minus = qta.icon('fa.minus')
|
|
||||||
self.music = qta.icon('fa.music')
|
|
||||||
self.new = qta.icon('fa.file')
|
|
||||||
self.notes = qta.icon('fa.sticky-note')
|
|
||||||
self.open = qta.icon('fa.map')
|
|
||||||
self.plus = qta.icon('fa.plus')
|
|
||||||
self.presentation = qta.icon("fa.bar-chart")
|
|
||||||
self.preview = qta.icon('fa.laptop')
|
|
||||||
self.picture = qta.icon("fa.picture-o")
|
|
||||||
self.print = qta.icon('fa.print')
|
|
||||||
#self.remote = qta.icon('fa.podcast')
|
|
||||||
self.save = qta.icon('fa.save')
|
|
||||||
self.settings = qta.icon('fa.cogs')
|
|
||||||
self.top = qta.icon('fa.angle-double-up')
|
|
||||||
self.upload = qta.icon('fa.cloud-upload')
|
|
||||||
self.user = qta.icon('fa.user')
|
|
||||||
self.video = qta.icon('fa.file-video-o')
|
|
||||||
|
@ -27,7 +27,8 @@ import re
|
|||||||
|
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from PyQt5 import QtCore, QtWidgets
|
||||||
|
|
||||||
from openlp.core.common.i18n import UiStrings, UiIcons, translate
|
from openlp.core.common.i18n import UiStrings, translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.mixins import RegistryProperties
|
from openlp.core.common.mixins import RegistryProperties
|
||||||
from openlp.core.common.path import path_to_str, str_to_path
|
from openlp.core.common.path import path_to_str, str_to_path
|
||||||
from openlp.core.common.registry import Registry
|
from openlp.core.common.registry import Registry
|
||||||
|
@ -34,7 +34,8 @@ from PyQt5 import QtGui
|
|||||||
|
|
||||||
from openlp.core.common import md5_hash
|
from openlp.core.common import md5_hash
|
||||||
from openlp.core.common.applocation import AppLocation
|
from openlp.core.common.applocation import AppLocation
|
||||||
from openlp.core.common.i18n import UiIcons, translate
|
from openlp.core.common.i18n import translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.mixins import RegistryProperties
|
from openlp.core.common.mixins import RegistryProperties
|
||||||
from openlp.core.common.path import Path
|
from openlp.core.common.path import Path
|
||||||
from openlp.core.common.settings import Settings
|
from openlp.core.common.settings import Settings
|
||||||
|
@ -29,7 +29,8 @@ import logging
|
|||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from openlp.core.common.i18n import UiIcons, translate
|
from openlp.core.common.i18n import translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||||
from openlp.core.common.registry import RegistryBase
|
from openlp.core.common.registry import RegistryBase
|
||||||
from openlp.core.common.settings import Settings
|
from openlp.core.common.settings import Settings
|
||||||
|
@ -25,7 +25,8 @@ The GUI widgets of the exception dialog.
|
|||||||
|
|
||||||
from PyQt5 import QtGui, QtWidgets
|
from PyQt5 import QtGui, QtWidgets
|
||||||
|
|
||||||
from openlp.core.common.i18n import UiIcons, translate
|
from openlp.core.common.i18n import translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.lib import build_icon
|
from openlp.core.lib import build_icon
|
||||||
from openlp.core.lib.ui import create_button, create_button_box
|
from openlp.core.lib.ui import create_button, create_button_box
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ The UI widgets for the formatting tags window.
|
|||||||
"""
|
"""
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from PyQt5 import QtCore, QtWidgets
|
||||||
|
|
||||||
from openlp.core.common.i18n import UiStrings, UiIcons, translate
|
from openlp.core.common.i18n import UiStrings, translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.lib import build_icon
|
from openlp.core.lib import build_icon
|
||||||
from openlp.core.lib.ui import create_button_box
|
from openlp.core.lib.ui import create_button_box
|
||||||
|
|
||||||
|
85
openlp/core/ui/icons.py
Normal file
85
openlp/core/ui/icons.py
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2018 OpenLP Developers #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
# Software Foundation; version 2 of the License. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`languages` module provides a list of icons.
|
||||||
|
"""
|
||||||
|
import qtawesome as qta
|
||||||
|
|
||||||
|
from PyQt5 import QtGui, QtWidgets
|
||||||
|
|
||||||
|
|
||||||
|
class UiIcons(object):
|
||||||
|
"""
|
||||||
|
Provide standard icons for objects to use.
|
||||||
|
"""
|
||||||
|
__instance__ = None
|
||||||
|
|
||||||
|
def __new__(cls):
|
||||||
|
"""
|
||||||
|
Override the default object creation method to return a single instance.
|
||||||
|
"""
|
||||||
|
if not cls.__instance__:
|
||||||
|
cls.__instance__ = object.__new__(cls)
|
||||||
|
return cls.__instance__
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
"""
|
||||||
|
These are the font icons used in the code.
|
||||||
|
"""
|
||||||
|
palette = QtWidgets.QApplication.palette()
|
||||||
|
qta.set_defaults(color=palette.color(QtGui.QPalette.Active,
|
||||||
|
QtGui.QPalette.ButtonText),
|
||||||
|
color_disabled=palette.color(QtGui.QPalette.Disabled,
|
||||||
|
QtGui.QPalette.ButtonText))
|
||||||
|
self.add = qta.icon('fa.plus-circle')
|
||||||
|
self.arrow_down = qta.icon('fa.arrow-down')
|
||||||
|
self.arrow_up = qta.icon('fa.arrow-up')
|
||||||
|
self.address = qta.icon('fa.book')
|
||||||
|
self.bible = qta.icon('fa.book')
|
||||||
|
self.bottom = qta.icon('fa.angle-double-down')
|
||||||
|
self.clone = qta.icon('fa.clone')
|
||||||
|
self.copy = qta.icon('fa.copy')
|
||||||
|
self.copyright = qta.icon('fa.copyright')
|
||||||
|
self.database = qta.icon('fa.database')
|
||||||
|
self.default = qta.icon('fa.info-circle')
|
||||||
|
self.delete = qta.icon('fa.trash')
|
||||||
|
self.edit = qta.icon('fa.edit')
|
||||||
|
self.exit = qta.icon('fa.sign-out')
|
||||||
|
self.download = qta.icon('fa.cloud-download')
|
||||||
|
self.live = qta.icon('fa.camera')
|
||||||
|
self.minus = qta.icon('fa.minus')
|
||||||
|
self.music = qta.icon('fa.music')
|
||||||
|
self.new = qta.icon('fa.file')
|
||||||
|
self.notes = qta.icon('fa.sticky-note')
|
||||||
|
self.open = qta.icon('fa.map')
|
||||||
|
self.plus = qta.icon('fa.plus')
|
||||||
|
self.presentation = qta.icon("fa.bar-chart")
|
||||||
|
self.preview = qta.icon('fa.laptop')
|
||||||
|
self.picture = qta.icon("fa.picture-o")
|
||||||
|
self.print = qta.icon('fa.print')
|
||||||
|
#self.remote = qta.icon('fa.podcast')
|
||||||
|
self.save = qta.icon('fa.save')
|
||||||
|
self.settings = qta.icon('fa.cogs')
|
||||||
|
self.top = qta.icon('fa.angle-double-up')
|
||||||
|
self.upload = qta.icon('fa.cloud-upload')
|
||||||
|
self.user = qta.icon('fa.user')
|
||||||
|
self.video = qta.icon('fa.file-video-o')
|
@ -35,7 +35,8 @@ from openlp.core.api.http import server
|
|||||||
from openlp.core.common import is_win, is_macosx, add_actions
|
from openlp.core.common import is_win, is_macosx, add_actions
|
||||||
from openlp.core.common.actions import ActionList, CategoryOrder
|
from openlp.core.common.actions import ActionList, CategoryOrder
|
||||||
from openlp.core.common.applocation import AppLocation
|
from openlp.core.common.applocation import AppLocation
|
||||||
from openlp.core.common.i18n import LanguageManager, UiStrings, UiIcons, translate
|
from openlp.core.common.i18n import LanguageManager, UiStrings, translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||||
from openlp.core.common.path import Path, copyfile, create_paths
|
from openlp.core.common.path import Path, copyfile, create_paths
|
||||||
from openlp.core.common.registry import Registry
|
from openlp.core.common.registry import Registry
|
||||||
|
@ -36,7 +36,8 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||||||
from openlp.core.common import ThemeLevel, delete_file
|
from openlp.core.common import ThemeLevel, delete_file
|
||||||
from openlp.core.common.actions import ActionList, CategoryOrder
|
from openlp.core.common.actions import ActionList, CategoryOrder
|
||||||
from openlp.core.common.applocation import AppLocation
|
from openlp.core.common.applocation import AppLocation
|
||||||
from openlp.core.common.i18n import UiStrings, UiIcons, format_time, translate
|
from openlp.core.common.i18n import UiStrings, format_time, translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.json import OpenLPJsonDecoder, OpenLPJsonEncoder
|
from openlp.core.common.json import OpenLPJsonDecoder, OpenLPJsonEncoder
|
||||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||||
from openlp.core.common.path import Path, str_to_path
|
from openlp.core.common.path import Path, str_to_path
|
||||||
|
@ -31,7 +31,8 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||||||
|
|
||||||
from openlp.core.common import SlideLimits
|
from openlp.core.common import SlideLimits
|
||||||
from openlp.core.common.actions import ActionList, CategoryOrder
|
from openlp.core.common.actions import ActionList, CategoryOrder
|
||||||
from openlp.core.common.i18n import UiStrings, UiIcons, translate
|
from openlp.core.common.i18n import UiStrings, translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||||
from openlp.core.common.registry import Registry, RegistryBase
|
from openlp.core.common.registry import Registry, RegistryBase
|
||||||
from openlp.core.common.settings import Settings
|
from openlp.core.common.settings import Settings
|
||||||
|
@ -30,7 +30,8 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||||||
|
|
||||||
from openlp.core.common import delete_file
|
from openlp.core.common import delete_file
|
||||||
from openlp.core.common.applocation import AppLocation
|
from openlp.core.common.applocation import AppLocation
|
||||||
from openlp.core.common.i18n import UiStrings, UiIcons, translate, get_locale_key
|
from openlp.core.common.i18n import UiStrings, translate, get_locale_key
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||||
from openlp.core.common.path import Path, copyfile, create_paths, path_to_str
|
from openlp.core.common.path import Path, copyfile, create_paths, path_to_str
|
||||||
from openlp.core.common.registry import Registry, RegistryBase
|
from openlp.core.common.registry import Registry, RegistryBase
|
||||||
|
@ -27,7 +27,8 @@ import logging
|
|||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from openlp.core.common import is_macosx
|
from openlp.core.common import is_macosx
|
||||||
from openlp.core.common.i18n import UiStrings, UiIcons, translate
|
from openlp.core.common.i18n import UiStrings, translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.mixins import RegistryProperties
|
from openlp.core.common.mixins import RegistryProperties
|
||||||
from openlp.core.common.registry import Registry
|
from openlp.core.common.registry import Registry
|
||||||
from openlp.core.common.settings import Settings
|
from openlp.core.common.settings import Settings
|
||||||
|
@ -22,7 +22,8 @@
|
|||||||
|
|
||||||
from PyQt5 import QtWidgets
|
from PyQt5 import QtWidgets
|
||||||
|
|
||||||
from openlp.core.common.i18n import UiIcons, translate
|
from openlp.core.common.i18n import translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.lib import build_icon
|
from openlp.core.lib import build_icon
|
||||||
from openlp.core.lib.ui import create_button, create_button_box
|
from openlp.core.lib.ui import create_button, create_button_box
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ import logging
|
|||||||
|
|
||||||
from openlp.core.api.http import register_endpoint
|
from openlp.core.api.http import register_endpoint
|
||||||
from openlp.core.common.actions import ActionList
|
from openlp.core.common.actions import ActionList
|
||||||
from openlp.core.common.i18n import UiStrings, UiIcons, translate
|
from openlp.core.common.i18n import UiStrings, translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||||
from openlp.core.lib.ui import create_action
|
from openlp.core.lib.ui import create_action
|
||||||
from openlp.plugins.bibles.endpoint import api_bibles_endpoint, bibles_endpoint
|
from openlp.plugins.bibles.endpoint import api_bibles_endpoint, bibles_endpoint
|
||||||
|
@ -27,7 +27,8 @@ for the Custom Slides plugin.
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from openlp.core.api.http import register_endpoint
|
from openlp.core.api.http import register_endpoint
|
||||||
from openlp.core.common.i18n import UiIcons, translate
|
from openlp.core.common.i18n import translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
from openlp.plugins.custom.endpoint import api_custom_endpoint, custom_endpoint
|
from openlp.plugins.custom.endpoint import api_custom_endpoint, custom_endpoint
|
||||||
|
@ -25,7 +25,8 @@ import logging
|
|||||||
from PyQt5 import QtGui
|
from PyQt5 import QtGui
|
||||||
|
|
||||||
from openlp.core.api.http import register_endpoint
|
from openlp.core.api.http import register_endpoint
|
||||||
from openlp.core.common.i18n import UiIcons, translate
|
from openlp.core.common.i18n import translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.settings import Settings
|
from openlp.core.common.settings import Settings
|
||||||
from openlp.core.lib import Plugin, StringContent, ImageSource, build_icon
|
from openlp.core.lib import Plugin, StringContent, ImageSource, build_icon
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
|
@ -30,7 +30,8 @@ from PyQt5 import QtCore
|
|||||||
from openlp.core.api.http import register_endpoint
|
from openlp.core.api.http import register_endpoint
|
||||||
from openlp.core.common import check_binary_exists
|
from openlp.core.common import check_binary_exists
|
||||||
from openlp.core.common.applocation import AppLocation
|
from openlp.core.common.applocation import AppLocation
|
||||||
from openlp.core.common.i18n import UiIcons, translate
|
from openlp.core.common.i18n import translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.path import Path
|
from openlp.core.common.path import Path
|
||||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||||
from openlp.plugins.media.endpoint import api_media_endpoint, media_endpoint
|
from openlp.plugins.media.endpoint import api_media_endpoint, media_endpoint
|
||||||
|
@ -30,7 +30,8 @@ from PyQt5 import QtCore
|
|||||||
|
|
||||||
from openlp.core.api.http import register_endpoint
|
from openlp.core.api.http import register_endpoint
|
||||||
from openlp.core.common import extension_loader
|
from openlp.core.common import extension_loader
|
||||||
from openlp.core.common.i18n import UiIcons, translate
|
from openlp.core.common.i18n import translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.settings import Settings
|
from openlp.core.common.settings import Settings
|
||||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||||
from openlp.plugins.presentations.endpoint import api_presentations_endpoint, presentations_endpoint
|
from openlp.plugins.presentations.endpoint import api_presentations_endpoint, presentations_endpoint
|
||||||
|
@ -26,7 +26,8 @@ from PyQt5 import QtCore, QtWidgets
|
|||||||
from sqlalchemy.sql import and_, or_
|
from sqlalchemy.sql import and_, or_
|
||||||
|
|
||||||
from openlp.core.common.applocation import AppLocation
|
from openlp.core.common.applocation import AppLocation
|
||||||
from openlp.core.common.i18n import UiStrings, UiIcons, translate, get_natural_key
|
from openlp.core.common.i18n import UiStrings, translate, get_natural_key
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.path import copyfile, create_paths
|
from openlp.core.common.path import copyfile, create_paths
|
||||||
from openlp.core.common.registry import Registry
|
from openlp.core.common.registry import Registry
|
||||||
from openlp.core.common.settings import Settings
|
from openlp.core.common.settings import Settings
|
||||||
|
@ -33,7 +33,8 @@ from PyQt5 import QtCore, QtWidgets
|
|||||||
|
|
||||||
from openlp.core.api.http import register_endpoint
|
from openlp.core.api.http import register_endpoint
|
||||||
from openlp.core.common.actions import ActionList
|
from openlp.core.common.actions import ActionList
|
||||||
from openlp.core.common.i18n import UiStrings, UiIcons, translate
|
from openlp.core.common.i18n import UiStrings, translate
|
||||||
|
from openlp.core.ui.icons import UiIcons
|
||||||
from openlp.core.common.registry import Registry
|
from openlp.core.common.registry import Registry
|
||||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
|
Loading…
Reference in New Issue
Block a user