OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
idtablebase.hpp
Go to the documentation of this file.
1 #ifndef CSM_WOLRD_IDTABLEBASE_H
2 #define CSM_WOLRD_IDTABLEBASE_H
3 
4 #include <QAbstractItemModel>
5 
6 #include "columns.hpp"
7 
8 namespace CSMWorld
9 {
10  class UniversalId;
11 
13  {
14  Q_OBJECT
15 
16  public:
17 
18  enum Features
19  {
21 
25 
29 
31 
33 
36  };
37 
38  private:
39 
40  unsigned int mFeatures;
41 
42  public:
43 
44  IdTableBase (unsigned int features);
45 
46  virtual QModelIndex getModelIndex (const std::string& id, int column) const = 0;
47 
50  virtual int searchColumnIndex (Columns::ColumnId id) const = 0;
51 
54  virtual int findColumnIndex (Columns::ColumnId id) const = 0;
55 
58  virtual std::pair<UniversalId, std::string> view (int row) const = 0;
59 
61  virtual bool isDeleted (const std::string& id) const = 0;
62 
63  virtual int getColumnId (int column) const = 0;
64 
65  unsigned int getFeatures() const;
66  };
67 }
68 
69 #endif
Definition: idtablebase.hpp:32
virtual bool isDeleted(const std::string &id) const =0
Is id flagged as deleted?
virtual int searchColumnIndex(Columns::ColumnId id) const =0
unsigned int mFeatures
Definition: idtablebase.hpp:40
Definition: idtablebase.hpp:28
virtual QModelIndex getModelIndex(const std::string &id, int column) const =0
IdTableBase(unsigned int features)
Definition: idtablebase.cpp:3
Table can not be modified through ordinary means.
Definition: idtablebase.hpp:35
virtual int findColumnIndex(Columns::ColumnId id) const =0
unsigned int getFeatures() const
Definition: idtablebase.cpp:5
Definition: idtablebase.hpp:30
Definition: idtablebase.hpp:24
virtual std::pair< UniversalId, std::string > view(int row) const =0
Features
Definition: idtablebase.hpp:18
ColumnId
Definition: columns.hpp:13
virtual int getColumnId(int column) const =0
Definition: idtablebase.hpp:12