MCPcopy Create free account
hub / github.com/KLayout/klayout / get_drag_drop_data

Function get_drag_drop_data

src/laybasic/laybasic/layViewObject.cc:291–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289 }
290
291 DragDropDataBase *get_drag_drop_data (const QMimeData *data)
292 {
293 if (! data || ! data->hasFormat (QString::fromUtf8 (drag_drop_mime_type ()))) {
294 return 0;
295 }
296
297 QByteArray ba = data->data (QString::fromUtf8 (drag_drop_mime_type ()));
298
299 // TODO: provide some global mechanism to register drag & drop classes
300 std::unique_ptr<DragDropDataBase> cd (new CellDragDropData ());
301 if (cd->deserialize (ba)) {
302 return cd.release ();
303 }
304
305 // TODO: more ...
306
307 return 0;
308 }
309
310 void dragEnterEvent (QDragEnterEvent *event)
311 {

Callers 3

dragEnterEventFunction · 0.85
dragMoveEventFunction · 0.85
dropEventFunction · 0.85

Calls 5

drag_drop_mime_typeFunction · 0.85
hasFormatMethod · 0.45
dataMethod · 0.45
deserializeMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected