Example #1
0
    def mimeData(self, indexes):
        mimeData = QMimeData()
        encodedData = QByteArray()

        stream = QDataStream(encodedData, QIODevice.WriteOnly)

        for index in indexes:
            if not index.isValid():
                continue
            if not isinstance(index.internalPointer(), TableItem):
                continue
            table = self.getItem(index)
            stream.writeQString(table.mimeUri())

        mimeData.setData(self.QGIS_URI_MIME, encodedData)
        return mimeData
Example #2
0
 def _mimeDataAlgorithm(items):
     item = items[0]
     if isinstance(item, TreeAlgorithmItem):
         mimeData = QMimeData()
         mimeData.setText(item.alg.commandLineName())
     return mimeData
Example #3
0
 def _mimeDataAlgorithm(items):
     item = items[0]
     if isinstance(item, TreeAlgorithmItem):
         mimeData = QMimeData()
         mimeData.setText(item.alg.commandLineName())
     return mimeData
Example #4
0
 def _mimeDataInput(items):
     mimeData = QMimeData()
     text = items[0].text(0)
     mimeData.setText(text)
     return mimeData
Example #5
0
 def _mimeDataInput(items):
     mimeData = QMimeData()
     text = items[0].text(0)
     mimeData.setText(text)
     return mimeData