OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
dragrecordtable.hpp
Go to the documentation of this file.
1 #ifndef CSV_WORLD_DRAGRECORDTABLE_H
2 #define CSV_WORLD_DRAGRECORDTABLE_H
3 
4 #include <QTableView>
5 #include <QEvent>
6 
7 #include "../../model/world/columnbase.hpp"
8 
9 class QWidget;
10 class QAction;
11 
12 namespace CSMDoc
13 {
14  class Document;
15 }
16 
17 namespace CSMWorld
18 {
19  class UniversalId;
20 }
21 
22 namespace CSVWorld
23 {
24  class DragRecordTable : public QTableView
25  {
26  protected:
28  bool mEditLock;
29 
30  public:
31  DragRecordTable(CSMDoc::Document& document, QWidget* parent = NULL);
32 
33  virtual std::vector<CSMWorld::UniversalId> getDraggedRecords() const = 0;
34 
35  void setEditLock(bool locked);
36 
37  protected:
38  void startDragFromTable(const DragRecordTable& table);
39 
40  void dragEnterEvent(QDragEnterEvent *event);
41 
42  void dragMoveEvent(QDragMoveEvent *event);
43 
44  void dropEvent(QDropEvent *event);
45 
46  private:
47  CSMWorld::ColumnBase::Display getIndexDisplayType(const QModelIndex &index) const;
48  };
49 }
50 
51 #endif
52 
void dropEvent(QDropEvent *event)
Definition: dragrecordtable.cpp:64
Display
Definition: columnbase.hpp:39
Definition: dragrecordtable.hpp:24
void startDragFromTable(const DragRecordTable &table)
Definition: dragrecordtable.cpp:13
void setEditLock(bool locked)
Definition: dragrecordtable.cpp:40
CSMWorld::ColumnBase::Display getIndexDisplayType(const QModelIndex &index) const
Definition: dragrecordtable.cpp:84
void dragMoveEvent(QDragMoveEvent *event)
Definition: dragrecordtable.cpp:50
void dragEnterEvent(QDragEnterEvent *event)
Definition: dragrecordtable.cpp:45
CSMDoc::Document & mDocument
Definition: dragrecordtable.hpp:27
DragRecordTable(CSMDoc::Document &document, QWidget *parent=NULL)
Definition: dragrecordtable.cpp:32
Definition: document.hpp:57
virtual std::vector< CSMWorld::UniversalId > getDraggedRecords() const =0
bool mEditLock
Definition: dragrecordtable.hpp:28