mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Moved MimeData into RimMimeData
p4#: 21317
This commit is contained in:
@@ -23,8 +23,6 @@
|
||||
#include "cafPdmDocument.h"
|
||||
#include "cafUiTreeModelPdm.h"
|
||||
|
||||
#include <QMimeData>
|
||||
|
||||
class QFileSystemWatcher;
|
||||
|
||||
class RimCellPropertyFilter;
|
||||
@@ -35,55 +33,6 @@ class RimInputProperty;
|
||||
class RimStatisticsCase;
|
||||
class RimIdenticalGridCaseGroup;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// MimeData class used to carry a QModelIndexList
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class MimeDataWithIndexes : public QMimeData
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MimeDataWithIndexes()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
MimeDataWithIndexes(const MimeDataWithIndexes & other) : QMimeData()
|
||||
{
|
||||
setIndexes(other.indexes());
|
||||
}
|
||||
|
||||
void setIndexes(const QModelIndexList & indexes)
|
||||
{
|
||||
m_indexes = indexes;
|
||||
}
|
||||
|
||||
const QModelIndexList& indexes() const { return m_indexes; }
|
||||
|
||||
virtual bool hasFormat( const QString &mimetype ) const
|
||||
{
|
||||
return (mimetype == formatName());
|
||||
}
|
||||
|
||||
virtual QStringList formats() const
|
||||
{
|
||||
QStringList supportedFormats = QMimeData::formats();
|
||||
supportedFormats << formatName();
|
||||
|
||||
return supportedFormats;
|
||||
}
|
||||
|
||||
static QString formatName()
|
||||
{
|
||||
return "MimeDataWithIndexes";
|
||||
}
|
||||
|
||||
private:
|
||||
QModelIndexList m_indexes;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(MimeDataWithIndexes)
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user