This commit is contained in:
Andreas Preikschat 2011-01-12 20:31:46 +01:00
parent 98b0d9b4a8
commit 727f7fe7bf
3 changed files with 18 additions and 13 deletions

View File

@ -266,7 +266,7 @@ class MediaManagerItem(QtGui.QWidget):
"""
Creates the main widget for listing items the media item is tracking
"""
#Add the List widget
# Add the List widget
self.listView = self.ListViewWithDnD_class(self)
self.listView.uniformItemSizes = True
self.listView.setSpacing(1)
@ -275,9 +275,9 @@ class MediaManagerItem(QtGui.QWidget):
self.listView.setAlternatingRowColors(True)
self.listView.setDragEnabled(True)
self.listView.setObjectName(u'%sListView' % self.plugin.name)
#Add to pageLayout
# Add to pageLayout
self.pageLayout.addWidget(self.listView)
#define and add the context menu
# define and add the context menu
self.listView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
name_string = self.plugin.getString(StringContent.Name)
if self.hasEditIcon:

View File

@ -60,6 +60,7 @@ class ItemCapabilities(object):
AddIfNewItem = 9
ProvidesOwnDisplay = 10
class ServiceItem(object):
"""
The service item is a base class for the plugins to use to interact with

View File

@ -412,13 +412,17 @@ class SlideController(QtGui.QWidget):
max_width = self.PreviewFrame.width() - self.grid.margin() * 2
self.SlidePreview.setFixedSize(QtCore.QSize(max_width,
max_width / self.ratio))
width = self.parent.ControlSplitter.sizes()[self.split]
self.PreviewListWidget.setColumnWidth(0, width)
# Make sure that the frames have the correct size.
if self.serviceItem:
self.PreviewListWidget.resizeRowsToContents()
# Sort out image heights (Songs, bibles excluded)
if self.serviceItem and not self.serviceItem.is_text():
if not self.serviceItem.is_text():
width = self.parent.ControlSplitter.sizes()[self.split]
for framenumber in range(len(self.serviceItem.get_frames())):
self.PreviewListWidget.setRowHeight(
framenumber, width / self.ratio)
self.PreviewListWidget.setColumnWidth(0,
self.PreviewListWidget.viewport().size().width())
def onSongBarHandler(self):
request = unicode(self.sender().text())