OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
unpagedworldspacewidget.hpp
Go to the documentation of this file.
1 #ifndef OPENCS_VIEW_UNPAGEDWORLDSPACEWIDGET_H
2 #define OPENCS_VIEW_UNPAGEDWORLDSPACEWIDGET_H
3 
4 #include <string>
5 #include <memory>
6 
7 #include "worldspacewidget.hpp"
8 #include "cell.hpp"
9 
10 class QModelIndex;
11 
12 namespace CSMDoc
13 {
14  class Document;
15 }
16 
17 namespace CSMWorld
18 {
19  class IdTable;
20 }
21 
22 namespace CSVRender
23 {
25  {
26  Q_OBJECT
27 
29  std::string mCellId;
32  std::auto_ptr<Cell> mCell;
33 
34  void update();
35 
36  public:
37 
38  UnpagedWorldspaceWidget (const std::string& cellId, CSMDoc::Document& document,
39  QWidget *parent);
40 
41  virtual dropRequirments getDropRequirements(DropType type) const;
42 
44  virtual bool handleDrop (const std::vector<CSMWorld::UniversalId>& data,
45  DropType type);
46 
48  virtual void clearSelection (int elementMask);
49 
51  virtual void invertSelection (int elementMask);
52 
54  virtual void selectAll (int elementMask);
55 
56  // Select everything that references the same ID as at least one of the elements
57  // already selected
58  //
60  virtual void selectAllWithSameParentId (int elementMask);
61 
62  virtual std::string getCellId (const osg::Vec3f& point) const;
63 
64  virtual Cell* getCell(const osg::Vec3d& point) const;
65 
66  virtual std::vector<osg::ref_ptr<TagBase> > getSelection (unsigned int elementMask)
67  const;
68 
69  virtual std::vector<osg::ref_ptr<TagBase> > getEdited (unsigned int elementMask)
70  const;
71 
72  virtual void setSubMode (int subMode, unsigned int elementMask);
73 
75  virtual void reset (unsigned int elementMask);
76 
77  private:
78 
79  virtual void referenceableDataChanged (const QModelIndex& topLeft,
80  const QModelIndex& bottomRight);
81 
82  virtual void referenceableAboutToBeRemoved (const QModelIndex& parent, int start, int end);
83 
84  virtual void referenceableAdded (const QModelIndex& index, int start, int end);
85 
86  virtual void referenceDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight);
87 
88  virtual void referenceAboutToBeRemoved (const QModelIndex& parent, int start, int end);
89 
90  virtual void referenceAdded (const QModelIndex& index, int start, int end);
91 
92  virtual void pathgridDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight);
93 
94  virtual void pathgridAboutToBeRemoved (const QModelIndex& parent, int start, int end);
95 
96  virtual void pathgridAdded (const QModelIndex& parent, int start, int end);
97 
98 
99  virtual std::string getStartupInstruction();
100 
101  protected:
102 
104 
105  private slots:
106 
107  void cellDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight);
108 
109  void cellRowsAboutToBeRemoved (const QModelIndex& parent, int start, int end);
110 
111  signals:
112 
113  void cellChanged(const CSMWorld::UniversalId& id);
114  };
115 }
116 
117 #endif
virtual std::vector< osg::ref_ptr< TagBase > > getSelection(unsigned int elementMask) const
Definition: unpagedworldspacewidget.cpp:135
Definition: worldspacewidget.hpp:48
virtual void referenceableDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Definition: unpagedworldspacewidget.cpp:157
virtual std::string getStartupInstruction()
Definition: unpagedworldspacewidget.cpp:288
static const struct @2 signals[]
virtual void pathgridAboutToBeRemoved(const QModelIndex &parent, int start, int end)
Definition: unpagedworldspacewidget.cpp:241
virtual void referenceableAdded(const QModelIndex &index, int start, int end)
Definition: unpagedworldspacewidget.cpp:173
Definition: idtable.hpp:15
CSMWorld::IdTable * mReferenceablesModel
Definition: unpagedworldspacewidget.hpp:31
virtual void referenceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Definition: unpagedworldspacewidget.cpp:187
virtual std::vector< osg::ref_ptr< TagBase > > getEdited(unsigned int elementMask) const
Definition: unpagedworldspacewidget.cpp:141
void cellChanged(const CSMWorld::UniversalId &id)
virtual dropRequirments getDropRequirements(DropType type) const
Definition: unpagedworldspacewidget.cpp:304
virtual void setSubMode(int subMode, unsigned int elementMask)
Definition: unpagedworldspacewidget.cpp:147
virtual std::string getCellId(const osg::Vec3f &point) const
Definition: unpagedworldspacewidget.cpp:125
virtual void invertSelection(int elementMask)
Definition: unpagedworldspacewidget.cpp:107
void cellRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
Definition: unpagedworldspacewidget.cpp:74
virtual void referenceableAboutToBeRemoved(const QModelIndex &parent, int start, int end)
Definition: unpagedworldspacewidget.cpp:165
void cellDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Definition: unpagedworldspacewidget.cpp:53
virtual bool handleDrop(const std::vector< CSMWorld::UniversalId > &data, DropType type)
Definition: unpagedworldspacewidget.cpp:83
virtual void reset(unsigned int elementMask)
Erase all overrides and restore the visual representation to its true state.
Definition: unpagedworldspacewidget.cpp:152
UnpagedWorldspaceWidget(const std::string &cellId, CSMDoc::Document &document, QWidget *parent)
Definition: unpagedworldspacewidget.cpp:34
virtual void pathgridAdded(const QModelIndex &parent, int start, int end)
Definition: unpagedworldspacewidget.cpp:261
std::auto_ptr< Cell > mCell
Definition: unpagedworldspacewidget.hpp:32
virtual void selectAll(int elementMask)
Definition: unpagedworldspacewidget.cpp:113
virtual void referenceAdded(const QModelIndex &index, int start, int end)
Definition: unpagedworldspacewidget.cpp:203
Definition: unpagedworldspacewidget.hpp:24
virtual void pathgridDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Definition: unpagedworldspacewidget.cpp:211
CSMWorld::IdTable * mCellsModel
Definition: unpagedworldspacewidget.hpp:30
Definition: document.hpp:57
Multi-Toggle tool.
Definition: scenetooltoggle2.hpp:19
virtual void clearSelection(int elementMask)
Definition: unpagedworldspacewidget.cpp:101
virtual void addVisibilitySelectorButtons(CSVWidget::SceneToolToggle2 *tool)
Definition: unpagedworldspacewidget.cpp:280
DropType
Definition: worldspacewidget.hpp:73
Definition: cell.hpp:42
dropRequirments
Definition: worldspacewidget.hpp:81
virtual Cell * getCell(const osg::Vec3d &point) const
Definition: unpagedworldspacewidget.cpp:130
virtual void selectAllWithSameParentId(int elementMask)
Definition: unpagedworldspacewidget.cpp:119
void update()
Definition: unpagedworldspacewidget.cpp:20
CSMDoc::Document & mDocument
Definition: unpagedworldspacewidget.hpp:28
std::string mCellId
Definition: unpagedworldspacewidget.hpp:29
virtual void referenceAboutToBeRemoved(const QModelIndex &parent, int start, int end)
Definition: unpagedworldspacewidget.cpp:195
Definition: universalid.hpp:12