forked from teamnwah/openmw-tes3coop
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.0 KiB
C++
53 lines
1.0 KiB
C++
#ifndef CSV_WORLD_DRAGRECORDTABLE_H
|
|
#define CSV_WORLD_DRAGRECORDTABLE_H
|
|
|
|
#include <QTableView>
|
|
#include <QEvent>
|
|
|
|
#include "../../model/world/columnbase.hpp"
|
|
|
|
class QWidget;
|
|
class QAction;
|
|
|
|
namespace CSMDoc
|
|
{
|
|
class Document;
|
|
}
|
|
|
|
namespace CSMWorld
|
|
{
|
|
class UniversalId;
|
|
}
|
|
|
|
namespace CSVWorld
|
|
{
|
|
class DragRecordTable : public QTableView
|
|
{
|
|
protected:
|
|
CSMDoc::Document& mDocument;
|
|
bool mEditLock;
|
|
|
|
public:
|
|
DragRecordTable(CSMDoc::Document& document, QWidget* parent = NULL);
|
|
|
|
virtual std::vector<CSMWorld::UniversalId> getDraggedRecords() const = 0;
|
|
|
|
void setEditLock(bool locked);
|
|
|
|
protected:
|
|
void startDragFromTable(const DragRecordTable& table);
|
|
|
|
void dragEnterEvent(QDragEnterEvent *event);
|
|
|
|
void dragMoveEvent(QDragMoveEvent *event);
|
|
|
|
void dropEvent(QDropEvent *event);
|
|
|
|
private:
|
|
CSMWorld::ColumnBase::Display getIndexDisplayType(const QModelIndex &index) const;
|
|
};
|
|
}
|
|
|
|
#endif
|
|
|