Mantid
Loading...
Searching...
No Matches
Functions
MantidQt::MantidWidgets::DropEventHelper Namespace Reference

Functions

EXPORT_OPT_MANTIDQT_COMMON QStringList extractPythonFiles (const QDropEvent *event)
 Get all python files from q QDropEvent. More...
 
EXPORT_OPT_MANTIDQT_COMMON QStringList getFileNames (const QDropEvent *event)
 Get all filenames from a QDropEvent. More...
 

Function Documentation

◆ extractPythonFiles()

QStringList MantidQt::MantidWidgets::DropEventHelper::extractPythonFiles ( const QDropEvent *  event)

Get all python files from q QDropEvent.

Extract python file names from a drop event.

This will filter the list of file names extracted from a QDropEvent that end with the extension .py

Parameters
event:: the QDropEvent to filter filenames from
Returns
a list of python file names

Definition at line 94 of file DropEventHelper.cpp.

References getFileNames().

◆ getFileNames()

QStringList MantidQt::MantidWidgets::DropEventHelper::getFileNames ( const QDropEvent *  event)

Get all filenames from a QDropEvent.

Extract a list of file names from a drop event.

This is a special OSX version because the OSX broke the way Qt decoded the file path in OSX 10.10. This is fixed in Qt5 but not backported to Qt4.

Parameters
event:: the event to extract file names from
Returns
a list of file names as a QStringList

Definition at line 70 of file DropEventHelper.cpp.

References fixupURL().

Referenced by MantidQt::API::FileFinderWidget::dropEvent(), MantidQt::MantidWidgets::MantidTreeWidget::dropEvent(), and extractPythonFiles().