Move QFileInput to plugins.

bzr-revno: 298
This commit is contained in:
Tim Bentley 2009-02-05 19:18:43 +00:00
parent 11e3d43caf
commit 49ed24a69b
4 changed files with 3 additions and 13 deletions

View File

@ -82,13 +82,3 @@ class MediaManagerItem(QtGui.QWidget):
A very simple method to add a separator to the toolbar. A very simple method to add a separator to the toolbar.
""" """
self.Toolbar.addSeparator() self.Toolbar.addSeparator()
def getInputFile(self, dialogname, dialoglocation, dialogfilter):
return QtGui.QFileDialog.getOpenFileName(self, dialogname,
dialoglocation, dialogfilter)
def getInputFiles(self, dialogname, dialoglocation, dialogfilter):
return QtGui.QFileDialog.getOpenFileNames(self, dialogname,
dialoglocation, dialogfilter)

View File

@ -86,7 +86,7 @@ class ImagePlugin(Plugin, PluginUtils):
self._load_image_list(list) self._load_image_list(list)
def onImagesNewClick(self): def onImagesNewClick(self):
files = self.MediaManagerItem.getInputFiles("Select Image(s)", self._get_last_dir(), "Images (*.jpg *.gif *.png *.bmp)") files = QtGui.QFileDialog.getOpenFileNames(None, "Select Image(s)", self._get_last_dir(), "Images (*.jpg *.gif *.png *.bmp)")
if len(files) > 0: if len(files) > 0:
self._load_image_list(files) self._load_image_list(files)
self._save_last_directory(files[0]) self._save_last_directory(files[0])

View File

@ -89,7 +89,7 @@ class PresentationPlugin(Plugin, PluginUtils):
self._load_presentation_list(list) self._load_presentation_list(list)
def onPresentationLoadClick(self): def onPresentationLoadClick(self):
files = self.MediaManagerItem.getInputFiles("Select Presentation(s)", self._get_last_dir(), "Images (*.ppt *.pps *.odi)") files = QtGui.QFileDialog.getOpenFileNames(None, "Select Presentation(s)", self._get_last_dir(), "Images (*.ppt *.pps *.odi)")
if len(files) > 0: if len(files) > 0:
self._load_presentation_list(files) self._load_presentation_list(files)
self._save_last_directory(files[0]) self._save_last_directory(files[0])

View File

@ -84,7 +84,7 @@ class VideoPlugin(Plugin, PluginUtils):
self._load_video_list(list) self._load_video_list(list)
def onVideoNewClick(self): def onVideoNewClick(self):
files = self.MediaManagerItem.getInputFiles("Select Image(s)", self._get_last_dir(), "Images (*.avi *.mpeg)") files = QtGui.QFileDialog.getOpenFileNames(None, "Select Image(s)", self._get_last_dir(), "Images (*.avi *.mpeg)")
if len(files) > 0: if len(files) > 0:
self._load_video_list(files) self._load_video_list(files)
self._save_last_directory(files[0]) self._save_last_directory(files[0])