예제 #1
0
		def mimeData(self, items):
			links = [ struct.RevLink(self.__store, self.__revs[self.row(item)])
				for item in items ]
			if not links:
				return None

			mimeData = QtCore.QMimeData()
			struct.dumpMimeData(mimeData, links)
			return mimeData
예제 #2
0
파일: folder.py 프로젝트: wizzk42/peerdrive
	def mimeData(self, indexes):
		links = [self.getItemLink(index) for index in indexes
			if index.isValid() and (index.column() == 0)]
		if not links:
			return None

		mimeData = QtCore.QMimeData()
		struct.dumpMimeData(mimeData, links)
		fuseData = []
		for link in links:
			if isinstance(link, struct.DocLink):
				f = fuse.findFuseFile(link)
				if f:
					fuseData.append(f)
		if fuseData:
			mimeData.setUrls([QtCore.QUrl.fromLocalFile(f) for f in fuseData])
		return mimeData