28 if (event->mimeData()->hasUrls())
33 m_mw->activateWindow();
38 if (event->mouseButtons() & Qt::RightButton)
43 m_mw->activateWindow();
48 if (event->mouseButtons() & Qt::RightButton)
54 event->acceptProposedAction();
66 m_mw->activateWindow();
71 if (event->keyboardModifiers() & Qt::MetaModifier)
87 urls =
event->mimeData()->urls();
89 m_mw->drag_files.clear();
91 for (
int i=0; i<urls.size(); i++)
93 QFileInfo fi(urls[i].toLocalFile());
94 QString ext = fi.suffix();
96 if ( (ext.toLower()==
"obj") || (ext.toLower()==
"off") || (ext.toLower()==
"coff") || (ext.toLower()==
"ply") || (ext.toLower()==
"msh")
98 || (ext.toLower()==
"vtk") || (ext.toLower()==
"vtp") || (ext.toLower()==
"vtu")
101 || (ext.toLower()==
"fbx")
105 || (ext.toLower()==
"xyz")
108 || (ext.toLower()==
"pcd")
112 QString sFile = urls[i].toLocalFile();
113 m_mw->drag_files << sFile;
119 if (! m_mw->drag_files.isEmpty())
126 m_mw->shift_drag =
true;
128 m_mw->shift_drag =
false;
130 if (event->keyboardModifiers() & Qt::ShiftModifier)
131 m_mw->shift_drag =
true;
133 if (event->keyboardModifiers() & Qt::AltModifier)
134 m_mw->alt_drag =
true;
135 if (event->keyboardModifiers() & Qt::ControlModifier)
136 m_mw->ctrl_drag =
true;
139 event->acceptProposedAction();
141 m_mw->on_actionOpen_triggered();