2014-04-29 10:27:26 +00:00
|
|
|
#ifndef CSV_WORLD_DRAGRECORDTABLE_H
|
|
|
|
#define CSV_WORLD_DRAGRECORDTABLE_H
|
2014-04-29 09:19:19 +00:00
|
|
|
|
|
|
|
#include <QTableView>
|
2015-06-12 13:10:12 +00:00
|
|
|
#include <QEvent>
|
2014-04-29 09:19:19 +00:00
|
|
|
|
2015-06-21 15:40:13 +00:00
|
|
|
#include "../../model/world/columnbase.hpp"
|
|
|
|
|
2014-04-29 10:27:26 +00:00
|
|
|
class QWidget;
|
2014-04-29 09:19:19 +00:00
|
|
|
class QAction;
|
|
|
|
|
|
|
|
namespace CSMDoc
|
|
|
|
{
|
|
|
|
class Document;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
|
|
|
class UniversalId;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSVWorld
|
|
|
|
{
|
|
|
|
class DragRecordTable : public QTableView
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
CSMDoc::Document& mDocument;
|
2014-04-29 17:43:58 +00:00
|
|
|
bool mEditLock;
|
2014-04-29 09:19:19 +00:00
|
|
|
|
|
|
|
public:
|
2014-04-29 10:27:26 +00:00
|
|
|
DragRecordTable(CSMDoc::Document& document, QWidget* parent = NULL);
|
2014-04-29 09:19:19 +00:00
|
|
|
|
2014-05-01 10:34:54 +00:00
|
|
|
virtual std::vector<CSMWorld::UniversalId> getDraggedRecords() const = 0;
|
2014-04-29 09:19:19 +00:00
|
|
|
|
2014-05-01 10:34:54 +00:00
|
|
|
void setEditLock(bool locked);
|
2014-04-29 17:43:58 +00:00
|
|
|
|
2014-04-29 09:19:19 +00:00
|
|
|
protected:
|
2015-03-14 08:41:55 +00:00
|
|
|
void startDragFromTable(const DragRecordTable& table);
|
2014-04-30 11:32:54 +00:00
|
|
|
|
|
|
|
void dragEnterEvent(QDragEnterEvent *event);
|
|
|
|
|
|
|
|
void dragMoveEvent(QDragMoveEvent *event);
|
2015-06-21 15:40:13 +00:00
|
|
|
|
|
|
|
void dropEvent(QDropEvent *event);
|
|
|
|
|
|
|
|
private:
|
|
|
|
CSMWorld::ColumnBase::Display getIndexDisplayType(const QModelIndex &index) const;
|
2014-04-29 09:19:19 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2014-04-29 10:27:26 +00:00
|
|
|
|