forked from openlp/openlp
Moved MediaManagerItem to core.
bzr-revno: 111
This commit is contained in:
parent
8b0c226826
commit
f37dd74b4e
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
|
||||
<!-- eric4 user project file for project openlp.org 2.0 -->
|
||||
<!-- Saved: 2008-11-21, 20:51:04 -->
|
||||
<!-- Saved: 2008-11-22, 17:14:47 -->
|
||||
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
|
||||
<UserProject version="4.0">
|
||||
</UserProject>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd">
|
||||
<!-- eric4 tasks file for project openlp.org 2.0 -->
|
||||
<!-- Saved: 2008-11-21, 20:51:04 -->
|
||||
<!-- Saved: 2008-11-22, 17:14:47 -->
|
||||
<Tasks version="4.2">
|
||||
</Tasks>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Project SYSTEM "Project-4.4.dtd">
|
||||
<!-- eric4 project file for project openlp.org 2.0 -->
|
||||
<!-- Saved: 2008-11-21, 20:51:04 -->
|
||||
<!-- Saved: 2008-11-22, 17:14:47 -->
|
||||
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
|
||||
<Project version="4.4">
|
||||
<ProgLanguage mixed="0">Python</ProgLanguage>
|
||||
@ -48,8 +48,6 @@
|
||||
<Source>openlp/song/test/test_song_verse.py</Source>
|
||||
<Source>openlp/plugins/__init__.py</Source>
|
||||
<Source>openlp/plugins/testplugin1.py</Source>
|
||||
<Source>openlp/plugins/plugin.py</Source>
|
||||
<Source>openlp/plugins/plugin_manager.py</Source>
|
||||
<Source>openlp/plugins/testplugin2/__init__.py</Source>
|
||||
<Source>openlp/plugins/testplugin2/testplugin2.py</Source>
|
||||
<Source>openlp/plugins/test/test_plugin_manager.py</Source>
|
||||
@ -70,6 +68,8 @@
|
||||
<Source>openlp/plugins/test/test_mediamanageritem.py</Source>
|
||||
<Source>openlp/plugins/biblemanager/BibleOSISImpl.py</Source>
|
||||
<Source>openlp/plugins/biblemanager/test/test_bibleManagerOSIS.py</Source>
|
||||
<Source>openlp/core/pluginmanager.py</Source>
|
||||
<Source>openlp/core/mediamanageritem.py</Source>
|
||||
</Sources>
|
||||
<Forms>
|
||||
<Form>openlp/resources/forms/mainwindow.ui</Form>
|
||||
|
@ -21,4 +21,4 @@ from openlp.core.settingsmanager import SettingsManager
|
||||
from openlp.core.plugin import Plugin
|
||||
from openlp.core.pluginmanager import PluginManager
|
||||
|
||||
__all__ = ['Renderer', 'SettingsManager', 'Plugin']
|
||||
__all__ = ['Renderer', 'SettingsManager', 'Plugin', 'PluginManager']
|
||||
|
41
openlp/core/mediamanageritem.py
Normal file
41
openlp/core/mediamanageritem.py
Normal file
@ -0,0 +1,41 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.resources import *
|
||||
|
||||
class MediaManagerItem(QtGui.QWidget):
|
||||
"""
|
||||
MediaManagerItem is a helper widget for plugins.
|
||||
"""
|
||||
def __init__(self, icon=None, title=None):
|
||||
"""
|
||||
Constructor to create the media manager item.
|
||||
"""
|
||||
QtGui.QWidget.__init__(self)
|
||||
self.Icon = QtGui.QIcon()
|
||||
if icon is not None:
|
||||
self.Icon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
else:
|
||||
self.Icon = None
|
||||
if title is not None:
|
||||
self.Title = title
|
||||
else:
|
||||
self.Title = ''
|
Loading…
Reference in New Issue
Block a user