forked from openlp/openlp
Moved everything to *real* toolbars... much better!
bzr-revno: 145
This commit is contained in:
parent
dbec7d75b3
commit
9c5b487840
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
|
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
|
||||||
<!-- eric4 user project file for project openlp.org 2.0 -->
|
<!-- eric4 user project file for project openlp.org 2.0 -->
|
||||||
<!-- Saved: 2008-11-30, 20:32:44 -->
|
<!-- Saved: 2008-11-30, 21:56:54 -->
|
||||||
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
|
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
|
||||||
<UserProject version="4.0">
|
<UserProject version="4.0">
|
||||||
</UserProject>
|
</UserProject>
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd">
|
<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd">
|
||||||
<!-- eric4 tasks file for project openlp.org 2.0 -->
|
<!-- eric4 tasks file for project openlp.org 2.0 -->
|
||||||
<!-- Saved: 2008-11-30, 20:32:44 -->
|
<!-- Saved: 2008-11-30, 21:56:54 -->
|
||||||
<Tasks version="4.2">
|
<Tasks version="4.2">
|
||||||
<Task priority="1" completed="False" bugfix="False">
|
<Task priority="1" completed="False" bugfix="False">
|
||||||
<Summary>TODO: what is the tags for bridge, pre-chorus?</Summary>
|
<Summary>TODO: what is the tags for bridge, pre-chorus?</Summary>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE Project SYSTEM "Project-4.4.dtd">
|
<!DOCTYPE Project SYSTEM "Project-4.4.dtd">
|
||||||
<!-- eric4 project file for project openlp.org 2.0 -->
|
<!-- eric4 project file for project openlp.org 2.0 -->
|
||||||
<!-- Saved: 2008-11-30, 20:32:44 -->
|
<!-- Saved: 2008-11-30, 21:56:54 -->
|
||||||
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
|
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
|
||||||
<Project version="4.4">
|
<Project version="4.4">
|
||||||
<ProgLanguage mixed="0">Python</ProgLanguage>
|
<ProgLanguage mixed="0">Python</ProgLanguage>
|
||||||
@ -76,6 +76,8 @@
|
|||||||
<Source>openlp/plugins/biblemanager/forms/__init__.py</Source>
|
<Source>openlp/plugins/biblemanager/forms/__init__.py</Source>
|
||||||
<Source>openlp/plugins/biblemanager/forms/bibleimportdialog.py</Source>
|
<Source>openlp/plugins/biblemanager/forms/bibleimportdialog.py</Source>
|
||||||
<Source>openlp/plugins/biblemanager/forms/bibleimportform.py</Source>
|
<Source>openlp/plugins/biblemanager/forms/bibleimportform.py</Source>
|
||||||
|
<Source>openlp/plugins/biblemanager/forms/bibleimportprogressform.py</Source>
|
||||||
|
<Source>openlp/plugins/biblemanager/forms/bibleimportprogressdialog.py</Source>
|
||||||
</Sources>
|
</Sources>
|
||||||
<Forms>
|
<Forms>
|
||||||
<Form>resources/forms/bibleimport.ui</Form>
|
<Form>resources/forms/bibleimport.ui</Form>
|
||||||
@ -91,6 +93,7 @@
|
|||||||
<Form>resources/forms/songexport.ui</Form>
|
<Form>resources/forms/songexport.ui</Form>
|
||||||
<Form>resources/forms/openlpimportform.ui</Form>
|
<Form>resources/forms/openlpimportform.ui</Form>
|
||||||
<Form>resources/forms/splashscreen.ui</Form>
|
<Form>resources/forms/splashscreen.ui</Form>
|
||||||
|
<Form>resources/forms/bibleimportprogress.ui</Form>
|
||||||
</Forms>
|
</Forms>
|
||||||
<Translations>
|
<Translations>
|
||||||
</Translations>
|
</Translations>
|
||||||
|
@ -53,32 +53,14 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
self.PageLayout.setSpacing(0)
|
self.PageLayout.setSpacing(0)
|
||||||
self.PageLayout.setMargin(0)
|
self.PageLayout.setMargin(0)
|
||||||
self.PageLayout.setObjectName('PageLayout')
|
self.PageLayout.setObjectName('PageLayout')
|
||||||
self.Toolbar = QtGui.QWidget(self)
|
self.Toolbar = QtGui.QToolBar(self)
|
||||||
self.Toolbar.setObjectName('Toolbar')
|
self.Toolbar.setObjectName('Toolbar')
|
||||||
self.ToolbarLayout = QtGui.QHBoxLayout(self.Toolbar)
|
self.PageLayout.addWidget(self.Toolbar)
|
||||||
self.ToolbarLayout.setSpacing(0)
|
|
||||||
self.ToolbarLayout.setMargin(0)
|
|
||||||
self.ToolbarLayout.setObjectName('ToolbarLayout')
|
|
||||||
|
|
||||||
def addToolbarItem(self, item):
|
|
||||||
"""
|
|
||||||
A method to help developers easily add any control to the toolbar.
|
|
||||||
"""
|
|
||||||
if self.Toolbar is None:
|
|
||||||
self.addToolbar()
|
|
||||||
if item.__class__.__name__ == 'QSpacerItem':
|
|
||||||
self.ToolbarLayout.addSpacerItem(item)
|
|
||||||
else:
|
|
||||||
self.ToolbarLayout.addWidget(item)
|
|
||||||
|
|
||||||
def addToolbarButton(self, title, tooltip, icon, slot=None, objectname=None):
|
def addToolbarButton(self, title, tooltip, icon, slot=None, objectname=None):
|
||||||
"""
|
"""
|
||||||
A method to help developers easily add a button to the toolbar.
|
A method to help developers easily add a button to the toolbar.
|
||||||
"""
|
"""
|
||||||
ToolbarButton = QtGui.QToolButton(self.Toolbar)
|
|
||||||
ToolbarButton.setText(QtCore.QObject.trUtf8(ToolbarButton, title))
|
|
||||||
ToolbarButton.setToolTip(QtCore.QObject.trUtf8(ToolbarButton, tooltip))
|
|
||||||
self.addToolbarItem(ToolbarButton)
|
|
||||||
if type(icon) is QtGui.QIcon:
|
if type(icon) is QtGui.QIcon:
|
||||||
ButtonIcon = icon
|
ButtonIcon = icon
|
||||||
elif type(icon) is types.StringType:
|
elif type(icon) is types.StringType:
|
||||||
@ -89,22 +71,14 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
|
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
|
||||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
ToolbarButton.setIcon(ButtonIcon)
|
ToolbarButton = self.Toolbar.addAction(ButtonIcon, title)
|
||||||
ToolbarButton.setIconSize(QtCore.QSize(20, 20))
|
if tooltip is not None:
|
||||||
ToolbarButton.setAutoRaise(True)
|
ToolbarButton.setToolTip(tooltip)
|
||||||
ToolbarButton.setMinimumSize(QtCore.QSize(20, 20))
|
|
||||||
if objectname is not None:
|
|
||||||
ToolbarButton.setObjectName(objectname)
|
|
||||||
if slot is not None:
|
if slot is not None:
|
||||||
QtCore.QObject.connect(ToolbarButton, QtCore.SIGNAL("clicked()"), slot)
|
QtCore.QObject.connect(ToolbarButton, QtCore.SIGNAL("triggered()"), slot)
|
||||||
|
|
||||||
def addToolbarLine(self):
|
def addToolbarSeparator(self):
|
||||||
ToolbarLine = QtGui.QFrame(self.Toolbar)
|
"""
|
||||||
ToolbarLine.setMinimumSize(QtCore.QSize(0, 0))
|
A very simple method to add a separator to the toolbar.
|
||||||
ToolbarLine.setFrameShadow(QtGui.QFrame.Sunken)
|
"""
|
||||||
ToolbarLine.setLineWidth(1)
|
self.Toolbar.addSeparator()
|
||||||
ToolbarLine.setMidLineWidth(0)
|
|
||||||
ToolbarLine.setFrameShape(QtGui.QFrame.VLine)
|
|
||||||
ToolbarLine.setFrameShadow(QtGui.QFrame.Sunken)
|
|
||||||
ToolbarLine.setObjectName('ToolbarLine')
|
|
||||||
self.addToolbarItem(ToolbarLine)
|
|
||||||
|
@ -70,7 +70,7 @@ class Plugin(object):
|
|||||||
self.Name = 'Plugin'
|
self.Name = 'Plugin'
|
||||||
if version is not None:
|
if version is not None:
|
||||||
self.Version = version
|
self.Version = version
|
||||||
self.MediaManagerItem = None
|
#self.MediaManagerItem = None
|
||||||
self.SettingsTab = None
|
self.SettingsTab = None
|
||||||
self.ImportMenuItem = None
|
self.ImportMenuItem = None
|
||||||
self.ExportMenuItem = None
|
self.ExportMenuItem = None
|
||||||
@ -102,6 +102,13 @@ class Plugin(object):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def getMediaManagerItem(self):
|
||||||
|
"""
|
||||||
|
Construct a MediaManagerItem object with all the buttons and things you
|
||||||
|
need, and return it for integration into openlp.org.
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
def addToMenu(self, menubar):
|
def addToMenu(self, menubar):
|
||||||
"""
|
"""
|
||||||
Add menu items to the menu, given the menubar.
|
Add menu items to the menu, given the menubar.
|
||||||
|
@ -82,7 +82,8 @@ class PluginManager(object):
|
|||||||
"""
|
"""
|
||||||
for pname in self.plugin_by_name:
|
for pname in self.plugin_by_name:
|
||||||
plugin = self.plugin_by_name[pname]
|
plugin = self.plugin_by_name[pname]
|
||||||
if plugin.MediaManagerItem is not None:
|
media_manager_item = plugin.getMediaManagerItem()
|
||||||
|
if media_manager_item is not None:
|
||||||
log.debug('Inserting media manager item from %s' % plugin.Name)
|
log.debug('Inserting media manager item from %s' % plugin.Name)
|
||||||
MediaToolBox.addItem(plugin.MediaManagerItem, plugin.Icon, plugin.Name)
|
MediaToolBox.addItem(media_manager_item, plugin.Icon, plugin.Name)
|
||||||
|
|
||||||
|
@ -164,9 +164,10 @@ class MainWindow(object):
|
|||||||
self.MediaManagerDock.setWidget(self.MediaManagerContents)
|
self.MediaManagerDock.setWidget(self.MediaManagerContents)
|
||||||
self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.MediaManagerDock)
|
self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.MediaManagerDock)
|
||||||
self.ServiceManagerDock = QtGui.QDockWidget(self.main_window)
|
self.ServiceManagerDock = QtGui.QDockWidget(self.main_window)
|
||||||
icon20 = QtGui.QIcon()
|
ServiceManagerIcon = QtGui.QIcon()
|
||||||
icon20.addPixmap(QtGui.QPixmap(":/system/system_servicemanager.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
ServiceManagerIcon.addPixmap(QtGui.QPixmap(":/system/system_servicemanager.png"),
|
||||||
self.ServiceManagerDock.setWindowIcon(icon20)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
|
self.ServiceManagerDock.setWindowIcon(ServiceManagerIcon)
|
||||||
self.ServiceManagerDock.setFeatures(QtGui.QDockWidget.AllDockWidgetFeatures)
|
self.ServiceManagerDock.setFeatures(QtGui.QDockWidget.AllDockWidgetFeatures)
|
||||||
self.ServiceManagerDock.setObjectName("ServiceManagerDock")
|
self.ServiceManagerDock.setObjectName("ServiceManagerDock")
|
||||||
self.ServiceManagerContents = QtGui.QWidget()
|
self.ServiceManagerContents = QtGui.QWidget()
|
||||||
@ -175,82 +176,47 @@ class MainWindow(object):
|
|||||||
self.ServiceManagerLayout.setSpacing(0)
|
self.ServiceManagerLayout.setSpacing(0)
|
||||||
self.ServiceManagerLayout.setMargin(0)
|
self.ServiceManagerLayout.setMargin(0)
|
||||||
self.ServiceManagerLayout.setObjectName("ServiceManagerLayout")
|
self.ServiceManagerLayout.setObjectName("ServiceManagerLayout")
|
||||||
self.ServiceToolbar = QtGui.QWidget(self.ServiceManagerContents)
|
self.ServiceToolbar = QtGui.QToolBar(self.ServiceManagerContents)
|
||||||
self.ServiceToolbar.setObjectName("ServiceToolbar")
|
self.ServiceToolbar.setObjectName("ServiceToolbar")
|
||||||
self.ServiceToolbarLayout = QtGui.QHBoxLayout(self.ServiceToolbar)
|
MoveTopIcon = QtGui.QIcon()
|
||||||
self.ServiceToolbarLayout.setSpacing(0)
|
MoveTopIcon.addPixmap(QtGui.QPixmap(":/services/service_top.png"),
|
||||||
self.ServiceToolbarLayout.setContentsMargins(0, 2, 0, 0)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.ServiceToolbarLayout.setObjectName("ServiceToolbarLayout")
|
self.MoveTopButton = self.ServiceToolbar.addAction(MoveTopIcon, 'Move to top')
|
||||||
self.MoveTopButton = QtGui.QToolButton(self.ServiceToolbar)
|
MoveUpIcon = QtGui.QIcon()
|
||||||
icon21 = QtGui.QIcon()
|
MoveUpIcon.addPixmap(QtGui.QPixmap(":/services/service_up.png"),
|
||||||
icon21.addPixmap(QtGui.QPixmap(":/services/service_top.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.MoveTopButton.setIcon(icon21)
|
self.MoveUpButton = self.ServiceToolbar.addAction(MoveUpIcon, 'Move up')
|
||||||
self.MoveTopButton.setIconSize(QtCore.QSize(20, 20))
|
MoveDownIcon = QtGui.QIcon()
|
||||||
self.MoveTopButton.setAutoRaise(True)
|
MoveDownIcon.addPixmap(QtGui.QPixmap(":/services/service_down.png"),
|
||||||
self.MoveTopButton.setObjectName("MoveTopButton")
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.ServiceToolbarLayout.addWidget(self.MoveTopButton)
|
self.MoveDownButton = self.ServiceToolbar.addAction(MoveDownIcon, 'Move down')
|
||||||
self.MoveUpButton = QtGui.QToolButton(self.ServiceToolbar)
|
MoveBottomIcon = QtGui.QIcon()
|
||||||
icon22 = QtGui.QIcon()
|
MoveBottomIcon.addPixmap(QtGui.QPixmap(":/services/service_bottom.png"),
|
||||||
icon22.addPixmap(QtGui.QPixmap(":/services/service_up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.MoveUpButton.setIcon(icon22)
|
self.MoveBottomButton = self.ServiceToolbar.addAction(MoveBottomIcon, 'Move to bottom')
|
||||||
self.MoveUpButton.setIconSize(QtCore.QSize(20, 20))
|
self.ServiceToolbar.addSeparator()
|
||||||
self.MoveUpButton.setAutoRaise(True)
|
NewServiceIcon = QtGui.QIcon()
|
||||||
self.MoveUpButton.setObjectName("MoveUpButton")
|
NewServiceIcon.addPixmap(QtGui.QPixmap(":/services/service_new.png"),
|
||||||
self.ServiceToolbarLayout.addWidget(self.MoveUpButton)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.MoveDownButton = QtGui.QToolButton(self.ServiceToolbar)
|
self.ServiceNewItem = self.ServiceToolbar.addAction(NewServiceIcon, 'New service')
|
||||||
icon23 = QtGui.QIcon()
|
OpenServiceIcon = QtGui.QIcon()
|
||||||
icon23.addPixmap(QtGui.QPixmap(":/services/service_down.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
OpenServiceIcon.addPixmap(QtGui.QPixmap(":/services/service_open.png"),
|
||||||
self.MoveDownButton.setIcon(icon23)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.MoveDownButton.setIconSize(QtCore.QSize(20, 20))
|
self.ServiceOpenItem = self.ServiceToolbar.addAction(OpenServiceIcon, 'Open service')
|
||||||
self.MoveDownButton.setAutoRaise(True)
|
SaveServiceIcon = QtGui.QIcon()
|
||||||
self.MoveDownButton.setObjectName("MoveDownButton")
|
SaveServiceIcon.addPixmap(QtGui.QPixmap(":/services/service_save.png"),
|
||||||
self.ServiceToolbarLayout.addWidget(self.MoveDownButton)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.MoveBottomButton = QtGui.QToolButton(self.ServiceToolbar)
|
self.ServiceSaveItem = self.ServiceToolbar.addAction(SaveServiceIcon, 'Save service')
|
||||||
icon24 = QtGui.QIcon()
|
self.ServiceToolbar.addSeparator()
|
||||||
icon24.addPixmap(QtGui.QPixmap(":/services/service_bottom.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.MoveBottomButton.setIcon(icon24)
|
|
||||||
self.MoveBottomButton.setIconSize(QtCore.QSize(20, 20))
|
|
||||||
self.MoveBottomButton.setAutoRaise(True)
|
|
||||||
self.MoveBottomButton.setObjectName("MoveBottomButton")
|
|
||||||
self.ServiceToolbarLayout.addWidget(self.MoveBottomButton)
|
|
||||||
self.ServiceDividerLine = QtGui.QFrame(self.ServiceToolbar)
|
|
||||||
self.ServiceDividerLine.setFrameShape(QtGui.QFrame.VLine)
|
|
||||||
self.ServiceDividerLine.setFrameShadow(QtGui.QFrame.Sunken)
|
|
||||||
self.ServiceDividerLine.setObjectName("ServiceDividerLine")
|
|
||||||
self.ServiceToolbarLayout.addWidget(self.ServiceDividerLine)
|
|
||||||
self.ServiceNewItem = QtGui.QToolButton(self.ServiceToolbar)
|
|
||||||
icon25 = QtGui.QIcon()
|
|
||||||
icon25.addPixmap(QtGui.QPixmap(":/services/service_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ServiceNewItem.setIcon(icon25)
|
|
||||||
self.ServiceNewItem.setIconSize(QtCore.QSize(20, 20))
|
|
||||||
self.ServiceNewItem.setAutoRaise(True)
|
|
||||||
self.ServiceNewItem.setObjectName("ServiceNewItem")
|
|
||||||
self.ServiceToolbarLayout.addWidget(self.ServiceNewItem)
|
|
||||||
self.ServiceOpenItem = QtGui.QToolButton(self.ServiceToolbar)
|
|
||||||
icon26 = QtGui.QIcon()
|
|
||||||
icon26.addPixmap(QtGui.QPixmap(":/services/service_open.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ServiceOpenItem.setIcon(icon26)
|
|
||||||
self.ServiceOpenItem.setIconSize(QtCore.QSize(20, 20))
|
|
||||||
self.ServiceOpenItem.setAutoRaise(True)
|
|
||||||
self.ServiceOpenItem.setObjectName("ServiceOpenItem")
|
|
||||||
self.ServiceToolbarLayout.addWidget(self.ServiceOpenItem)
|
|
||||||
self.ServiceSaveItem = QtGui.QToolButton(self.ServiceToolbar)
|
|
||||||
icon27 = QtGui.QIcon()
|
|
||||||
icon27.addPixmap(QtGui.QPixmap(":/services/service_save.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ServiceSaveItem.setIcon(icon27)
|
|
||||||
self.ServiceSaveItem.setIconSize(QtCore.QSize(20, 20))
|
|
||||||
self.ServiceSaveItem.setAutoRaise(True)
|
|
||||||
self.ServiceSaveItem.setObjectName("ServiceSaveItem")
|
|
||||||
self.ServiceToolbarLayout.addWidget(self.ServiceSaveItem)
|
|
||||||
self.ServiceThemeComboBox = QtGui.QComboBox(self.ServiceToolbar)
|
self.ServiceThemeComboBox = QtGui.QComboBox(self.ServiceToolbar)
|
||||||
self.ServiceThemeComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
|
self.ServiceThemeComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
|
||||||
self.ServiceThemeComboBox.setObjectName("ServiceThemeComboBox")
|
self.ServiceThemeComboBox.setObjectName("ServiceThemeComboBox")
|
||||||
self.ServiceThemeComboBox.addItem(QtCore.QString())
|
self.ServiceThemeComboBox.addItem(QtCore.QString())
|
||||||
self.ServiceThemeComboBox.addItem(QtCore.QString())
|
self.ServiceThemeComboBox.addItem(QtCore.QString())
|
||||||
self.ServiceThemeComboBox.addItem(QtCore.QString())
|
self.ServiceThemeComboBox.addItem(QtCore.QString())
|
||||||
self.ServiceToolbarLayout.addWidget(self.ServiceThemeComboBox)
|
self.ServiceThemeWidget = QtGui.QWidgetAction(self.ServiceToolbar)
|
||||||
spacerItem7 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
self.ServiceThemeWidget.setDefaultWidget(self.ServiceThemeComboBox)
|
||||||
self.ServiceToolbarLayout.addItem(spacerItem7)
|
self.ServiceToolbar.addAction(self.ServiceThemeWidget)
|
||||||
self.ServiceManagerLayout.addWidget(self.ServiceToolbar)
|
self.ServiceManagerLayout.addWidget(self.ServiceToolbar)
|
||||||
self.ServiceListView = QtGui.QListView(self.ServiceManagerContents)
|
self.ServiceListView = QtGui.QListView(self.ServiceManagerContents)
|
||||||
self.ServiceListView.setObjectName("ServiceListView")
|
self.ServiceListView.setObjectName("ServiceListView")
|
||||||
@ -258,9 +224,10 @@ class MainWindow(object):
|
|||||||
self.ServiceManagerDock.setWidget(self.ServiceManagerContents)
|
self.ServiceManagerDock.setWidget(self.ServiceManagerContents)
|
||||||
self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.ServiceManagerDock)
|
self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.ServiceManagerDock)
|
||||||
self.ThemeManagerDock = QtGui.QDockWidget(self.main_window)
|
self.ThemeManagerDock = QtGui.QDockWidget(self.main_window)
|
||||||
icon28 = QtGui.QIcon()
|
ThemeManagerIcon = QtGui.QIcon()
|
||||||
icon28.addPixmap(QtGui.QPixmap(":/system/system_thememanager.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
ThemeManagerIcon.addPixmap(QtGui.QPixmap(":/system/system_thememanager.png"),
|
||||||
self.ThemeManagerDock.setWindowIcon(icon28)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
|
self.ThemeManagerDock.setWindowIcon(ThemeManagerIcon)
|
||||||
self.ThemeManagerDock.setFloating(False)
|
self.ThemeManagerDock.setFloating(False)
|
||||||
self.ThemeManagerDock.setObjectName("ThemeManagerDock")
|
self.ThemeManagerDock.setObjectName("ThemeManagerDock")
|
||||||
self.ThemeManagerContents = QtGui.QWidget()
|
self.ThemeManagerContents = QtGui.QWidget()
|
||||||
@ -269,59 +236,29 @@ class MainWindow(object):
|
|||||||
self.ThemeManagerLayout.setSpacing(0)
|
self.ThemeManagerLayout.setSpacing(0)
|
||||||
self.ThemeManagerLayout.setMargin(0)
|
self.ThemeManagerLayout.setMargin(0)
|
||||||
self.ThemeManagerLayout.setObjectName("ThemeManagerLayout")
|
self.ThemeManagerLayout.setObjectName("ThemeManagerLayout")
|
||||||
self.ThemeManagerToolbar = QtGui.QWidget(self.ThemeManagerContents)
|
self.ThemeManagerToolbar = QtGui.QToolBar(self.ThemeManagerContents)
|
||||||
self.ThemeManagerToolbar.setObjectName("ThemeManagerToolbar")
|
self.ThemeManagerToolbar.setObjectName("ThemeManagerToolbar")
|
||||||
self.ThemeManagerToolbarLayout = QtGui.QHBoxLayout(self.ThemeManagerToolbar)
|
NewThemeIcon = QtGui.QIcon()
|
||||||
self.ThemeManagerToolbarLayout.setSpacing(0)
|
NewThemeIcon.addPixmap(QtGui.QPixmap(":/themes/theme_new.png"),
|
||||||
self.ThemeManagerToolbarLayout.setContentsMargins(0, 2, 0, 0)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.ThemeManagerToolbarLayout.setObjectName("ThemeManagerToolbarLayout")
|
self.ThemeNewItem = self.ThemeManagerToolbar.addAction(NewThemeIcon, 'New theme')
|
||||||
self.ThemeNewItem = QtGui.QToolButton(self.ThemeManagerToolbar)
|
EditThemeIcon = QtGui.QIcon()
|
||||||
icon29 = QtGui.QIcon()
|
EditThemeIcon.addPixmap(QtGui.QPixmap(":/themes/theme_edit.png"),
|
||||||
icon29.addPixmap(QtGui.QPixmap(":/themes/theme_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.ThemeNewItem.setIcon(icon29)
|
self.ThemeEditItem = self.ThemeManagerToolbar.addAction(EditThemeIcon, 'Edit theme')
|
||||||
self.ThemeNewItem.setIconSize(QtCore.QSize(20, 20))
|
DeleteThemeIcon = QtGui.QIcon()
|
||||||
self.ThemeNewItem.setAutoRaise(True)
|
DeleteThemeIcon.addPixmap(QtGui.QPixmap(":/themes/theme_delete.png"),
|
||||||
self.ThemeNewItem.setObjectName("ThemeNewItem")
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.ThemeManagerToolbarLayout.addWidget(self.ThemeNewItem)
|
self.ThemeDeleteButton = self.ThemeManagerToolbar.addAction(DeleteThemeIcon, 'Delete theme')
|
||||||
self.ThemeEditItem = QtGui.QToolButton(self.ThemeManagerToolbar)
|
self.ThemeManagerToolbar.addSeparator()
|
||||||
icon30 = QtGui.QIcon()
|
ImportThemeIcon = QtGui.QIcon()
|
||||||
icon30.addPixmap(QtGui.QPixmap(":/themes/theme_edit.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
ImportThemeIcon.addPixmap(QtGui.QPixmap(":/themes/theme_import.png"),
|
||||||
self.ThemeEditItem.setIcon(icon30)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.ThemeEditItem.setIconSize(QtCore.QSize(20, 20))
|
self.ThemeImportButton = self.ThemeManagerToolbar.addAction(ImportThemeIcon, 'Import theme')
|
||||||
self.ThemeEditItem.setAutoRaise(True)
|
ExportThemeIcon = QtGui.QIcon()
|
||||||
self.ThemeEditItem.setObjectName("ThemeEditItem")
|
ExportThemeIcon.addPixmap(QtGui.QPixmap(":/themes/theme_export.png"),
|
||||||
self.ThemeManagerToolbarLayout.addWidget(self.ThemeEditItem)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.ThemeDeleteButton = QtGui.QToolButton(self.ThemeManagerToolbar)
|
self.ThemeExportButton = self.ThemeManagerToolbar.addAction(ExportThemeIcon, 'Export theme')
|
||||||
icon31 = QtGui.QIcon()
|
|
||||||
icon31.addPixmap(QtGui.QPixmap(":/themes/theme_delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ThemeDeleteButton.setIcon(icon31)
|
|
||||||
self.ThemeDeleteButton.setIconSize(QtCore.QSize(20, 20))
|
|
||||||
self.ThemeDeleteButton.setAutoRaise(True)
|
|
||||||
self.ThemeDeleteButton.setObjectName("ThemeDeleteButton")
|
|
||||||
self.ThemeManagerToolbarLayout.addWidget(self.ThemeDeleteButton)
|
|
||||||
self.ThemeToolbarLine = QtGui.QFrame(self.ThemeManagerToolbar)
|
|
||||||
self.ThemeToolbarLine.setFrameShape(QtGui.QFrame.VLine)
|
|
||||||
self.ThemeToolbarLine.setFrameShadow(QtGui.QFrame.Sunken)
|
|
||||||
self.ThemeToolbarLine.setObjectName("ThemeToolbarLine")
|
|
||||||
self.ThemeManagerToolbarLayout.addWidget(self.ThemeToolbarLine)
|
|
||||||
self.ThemeImportButton = QtGui.QToolButton(self.ThemeManagerToolbar)
|
|
||||||
icon32 = QtGui.QIcon()
|
|
||||||
icon32.addPixmap(QtGui.QPixmap(":/themes/theme_import.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ThemeImportButton.setIcon(icon32)
|
|
||||||
self.ThemeImportButton.setIconSize(QtCore.QSize(20, 20))
|
|
||||||
self.ThemeImportButton.setAutoRaise(True)
|
|
||||||
self.ThemeImportButton.setObjectName("ThemeImportButton")
|
|
||||||
self.ThemeManagerToolbarLayout.addWidget(self.ThemeImportButton)
|
|
||||||
self.ThemeExportButton = QtGui.QToolButton(self.ThemeManagerToolbar)
|
|
||||||
icon33 = QtGui.QIcon()
|
|
||||||
icon33.addPixmap(QtGui.QPixmap(":/themes/theme_export.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ThemeExportButton.setIcon(icon33)
|
|
||||||
self.ThemeExportButton.setIconSize(QtCore.QSize(20, 20))
|
|
||||||
self.ThemeExportButton.setAutoRaise(True)
|
|
||||||
self.ThemeExportButton.setObjectName("ThemeExportButton")
|
|
||||||
self.ThemeManagerToolbarLayout.addWidget(self.ThemeExportButton)
|
|
||||||
spacerItem8 = QtGui.QSpacerItem(201, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.ThemeManagerToolbarLayout.addItem(spacerItem8)
|
|
||||||
self.ThemeManagerLayout.addWidget(self.ThemeManagerToolbar)
|
self.ThemeManagerLayout.addWidget(self.ThemeManagerToolbar)
|
||||||
self.ThemeManagerListView = QtGui.QListView(self.ThemeManagerContents)
|
self.ThemeManagerListView = QtGui.QListView(self.ThemeManagerContents)
|
||||||
self.ThemeManagerListView.setObjectName("ThemeManagerListView")
|
self.ThemeManagerListView.setObjectName("ThemeManagerListView")
|
||||||
@ -329,13 +266,13 @@ class MainWindow(object):
|
|||||||
self.ThemeManagerDock.setWidget(self.ThemeManagerContents)
|
self.ThemeManagerDock.setWidget(self.ThemeManagerContents)
|
||||||
self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.ThemeManagerDock)
|
self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.ThemeManagerDock)
|
||||||
self.FileNewItem = QtGui.QAction(self.main_window)
|
self.FileNewItem = QtGui.QAction(self.main_window)
|
||||||
self.FileNewItem.setIcon(icon25)
|
self.FileNewItem.setIcon(NewServiceIcon)
|
||||||
self.FileNewItem.setObjectName("FileNewItem")
|
self.FileNewItem.setObjectName("FileNewItem")
|
||||||
self.FileOpenItem = QtGui.QAction(self.main_window)
|
self.FileOpenItem = QtGui.QAction(self.main_window)
|
||||||
self.FileOpenItem.setIcon(icon26)
|
self.FileOpenItem.setIcon(OpenServiceIcon)
|
||||||
self.FileOpenItem.setObjectName("FileOpenItem")
|
self.FileOpenItem.setObjectName("FileOpenItem")
|
||||||
self.FileSaveItem = QtGui.QAction(self.main_window)
|
self.FileSaveItem = QtGui.QAction(self.main_window)
|
||||||
self.FileSaveItem.setIcon(icon27)
|
self.FileSaveItem.setIcon(SaveServiceIcon)
|
||||||
self.FileSaveItem.setObjectName("FileSaveItem")
|
self.FileSaveItem.setObjectName("FileSaveItem")
|
||||||
self.FileSaveAsItem = QtGui.QAction(self.main_window)
|
self.FileSaveAsItem = QtGui.QAction(self.main_window)
|
||||||
self.FileSaveAsItem.setObjectName("FileSaveAsItem")
|
self.FileSaveAsItem.setObjectName("FileSaveAsItem")
|
||||||
@ -371,12 +308,12 @@ class MainWindow(object):
|
|||||||
self.ViewThemeManagerItem = QtGui.QAction(self.main_window)
|
self.ViewThemeManagerItem = QtGui.QAction(self.main_window)
|
||||||
self.ViewThemeManagerItem.setCheckable(True)
|
self.ViewThemeManagerItem.setCheckable(True)
|
||||||
self.ViewThemeManagerItem.setChecked(True)
|
self.ViewThemeManagerItem.setChecked(True)
|
||||||
self.ViewThemeManagerItem.setIcon(icon28)
|
self.ViewThemeManagerItem.setIcon(ThemeManagerIcon)
|
||||||
self.ViewThemeManagerItem.setObjectName("ViewThemeManagerItem")
|
self.ViewThemeManagerItem.setObjectName("ViewThemeManagerItem")
|
||||||
self.ViewServiceManagerItem = QtGui.QAction(self.main_window)
|
self.ViewServiceManagerItem = QtGui.QAction(self.main_window)
|
||||||
self.ViewServiceManagerItem.setCheckable(True)
|
self.ViewServiceManagerItem.setCheckable(True)
|
||||||
self.ViewServiceManagerItem.setChecked(True)
|
self.ViewServiceManagerItem.setChecked(True)
|
||||||
self.ViewServiceManagerItem.setIcon(icon20)
|
self.ViewServiceManagerItem.setIcon(ServiceManagerIcon)
|
||||||
self.ViewServiceManagerItem.setObjectName("ViewServiceManagerItem")
|
self.ViewServiceManagerItem.setObjectName("ViewServiceManagerItem")
|
||||||
self.ToolsAlertItem = QtGui.QAction(self.main_window)
|
self.ToolsAlertItem = QtGui.QAction(self.main_window)
|
||||||
icon36 = QtGui.QIcon()
|
icon36 = QtGui.QIcon()
|
||||||
|
@ -26,6 +26,8 @@ class SongsPlugin(Plugin):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Call the parent constructor
|
# Call the parent constructor
|
||||||
Plugin.__init__(self, 'Songs', '1.9.0')
|
Plugin.__init__(self, 'Songs', '1.9.0')
|
||||||
|
|
||||||
|
def getMediaManagerItem(self):
|
||||||
# Create the plugin icon
|
# Create the plugin icon
|
||||||
self.Icon = QtGui.QIcon()
|
self.Icon = QtGui.QIcon()
|
||||||
self.Icon.addPixmap(QtGui.QPixmap(':/media/media_song.png'),
|
self.Icon.addPixmap(QtGui.QPixmap(':/media/media_song.png'),
|
||||||
@ -45,7 +47,7 @@ class SongsPlugin(Plugin):
|
|||||||
self.MediaManagerItem.addToolbarButton('Delete Song', 'Delete the selected song',
|
self.MediaManagerItem.addToolbarButton('Delete Song', 'Delete the selected song',
|
||||||
':/songs/song_delete.png', self.onSongDeleteClick, 'SongDeleteItem')
|
':/songs/song_delete.png', self.onSongDeleteClick, 'SongDeleteItem')
|
||||||
## Separator Line ##
|
## Separator Line ##
|
||||||
self.MediaManagerItem.addToolbarLine()
|
self.MediaManagerItem.addToolbarSeparator()
|
||||||
## Preview Song Button ##
|
## Preview Song Button ##
|
||||||
self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected song',
|
self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected song',
|
||||||
':/system/system_preview.png', self.onSongPreviewClick, 'SongPreviewItem')
|
':/system/system_preview.png', self.onSongPreviewClick, 'SongPreviewItem')
|
||||||
@ -56,16 +58,13 @@ class SongsPlugin(Plugin):
|
|||||||
self.MediaManagerItem.addToolbarButton('Add Song To Service',
|
self.MediaManagerItem.addToolbarButton('Add Song To Service',
|
||||||
'Add the selected song(s) to the service', ':/system/system_add.png',
|
'Add the selected song(s) to the service', ':/system/system_add.png',
|
||||||
self.onSongAddClick, 'SongAddItem')
|
self.onSongAddClick, 'SongAddItem')
|
||||||
## Spacer ##
|
## Add the songlist widget ##
|
||||||
self.SongSpacerItem = QtGui.QSpacerItem(40, 20,
|
self.SongList = QtGui.QTableWidget(self.MediaManagerItem)
|
||||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
self.SongList.setObjectName("SongList")
|
||||||
self.MediaManagerItem.addToolbarItem(self.SongSpacerItem)
|
self.SongList.setColumnCount(0)
|
||||||
# Add the songlist widget
|
self.SongList.setRowCount(0)
|
||||||
#self.SongList = QtGui.QTableWidget(self.MediaManagerItem)
|
self.MediaManagerItem.PageLayout.addWidget(self.SongList)
|
||||||
#self.SongList.setObjectName("SongList")
|
return self.MediaManagerItem
|
||||||
#self.SongList.setColumnCount(0)
|
|
||||||
#self.SongList.setRowCount(0)
|
|
||||||
#self.MediaManagerItem.PageLayout.addWidget(self.SongList)
|
|
||||||
|
|
||||||
def onSongNewClick(self):
|
def onSongNewClick(self):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user