mirror of
https://github.com/Indy970/QtHPConnect
synced 2024-12-25 21:59:15 +01:00
32 lines
1.1 KiB
C++
32 lines
1.1 KiB
C++
#ifndef CONTENTFILESYSTEMMODEL_H
|
|
#define CONTENTFILESYSTEMMODEL_H
|
|
#include <QObject>
|
|
#include <QFileSystemModel>
|
|
#include <QDropEvent>
|
|
#include <QMdiArea>
|
|
#include "hpdata.h"
|
|
|
|
class contentFileSystemModel : public QFileSystemModel
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
contentFileSystemModel(QObject * parent=nullptr);
|
|
virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
|
|
bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row,
|
|
int column, const QModelIndex &parent);
|
|
QMimeData* mimeData(const QModelIndexList &indexes) const;
|
|
Qt::DropActions supportedDropActions() const;
|
|
bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const;
|
|
|
|
Qt::ItemFlags flags(const QModelIndex &index) const;
|
|
void clickAction(QMdiArea * mdiwin,QModelIndex &index);
|
|
hp_DataStruct getFileType(QFileInfo info);
|
|
~contentFileSystemModel();
|
|
|
|
private:
|
|
const static QString filetype_list[][2];
|
|
const static hp_DataType func_type[];
|
|
const static QString file_type[];
|
|
};
|
|
|
|
#endif // CONTENTFILESYSTEMMODEL_H
|