-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathServerFileModel.h
More file actions
48 lines (33 loc) · 1.41 KB
/
ServerFileModel.h
File metadata and controls
48 lines (33 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef COMET_SERVERFILEMODEL_H
#define COMET_SERVERFILEMODEL_H
#include <QAbstractTableModel>
#include <QtWidgets>
#include <QMimeData>
class ServerFileModel : public QAbstractTableModel
{
Q_OBJECT
public:
explicit ServerFileModel(QObject* parent = 0, int numRows = 0, QStringList dataList = QStringList(), QString _path = "");
// Drag And Drop
Qt::DropActions supportedDropActions() const;
Qt::ItemFlags flags(const QModelIndex &index) const;
Qt::DropActions supportedDragActions() const;
QStringList mimeTypes() const;
QMimeData* mimeData(const QModelIndexList &indexes) const;
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
bool removeRows(int row, int count, const QModelIndex &parent);
bool insertRows(int row, int count, const QModelIndex &parent);
// Default Model Actions
int rowCount(const QModelIndex &parent = QModelIndex()) const ;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QStringList dataList_;
int row;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
QString path;
QString source;
signals:
void sendDropData(QString type, QString source, QString destination, QString sftpType);
public slots:
};
#endif // COMET_SERVERFILEMODEL_H