OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
infotableproxymodel.hpp
Go to the documentation of this file.
1 #ifndef CSM_WORLD_INFOTABLEPROXYMODEL_HPP
2 #define CSM_WORLD_INFOTABLEPROXYMODEL_HPP
3 
4 #include <QHash>
5 
6 #include "idtableproxymodel.hpp"
7 #include "columns.hpp"
8 #include "universalid.hpp"
9 
10 namespace CSMWorld
11 {
12  class IdTableBase;
13 
15  {
16  Q_OBJECT
17 
23 
24  mutable QHash<QString, int> mFirstRowCache;
25 
26  int getFirstInfoRow(int currentRow) const;
29 
30  public:
32 
33  virtual void setSourceModel(QAbstractItemModel *sourceModel);
34 
35  protected:
36  virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
37 
38  protected slots:
39  virtual void sourceRowsInserted(const QModelIndex &parent, int start, int end);
40  virtual void sourceRowsRemoved(const QModelIndex &parent, int start, int end);
41  virtual void sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
42  };
43 }
44 
45 #endif
virtual void setSourceModel(QAbstractItemModel *sourceModel)
Definition: infotableproxymodel.cpp:27
virtual void sourceRowsInserted(const QModelIndex &parent, int start, int end)
Definition: infotableproxymodel.cpp:80
virtual void sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Definition: infotableproxymodel.cpp:93
Type
Definition: universalid.hpp:40
Definition: infotableproxymodel.hpp:14
int mInfoColumnIndex
Definition: infotableproxymodel.hpp:21
int mLastAddedSourceRow
Definition: infotableproxymodel.hpp:22
QHash< QString, int > mFirstRowCache
Definition: infotableproxymodel.hpp:24
InfoTableProxyModel(UniversalId::Type type, QObject *parent=0)
Definition: infotableproxymodel.cpp:16
virtual void sourceRowsRemoved(const QModelIndex &parent, int start, int end)
Definition: infotableproxymodel.cpp:74
Definition: idtableproxymodel.hpp:18
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const
Definition: infotableproxymodel.cpp:38
ColumnId
Definition: columns.hpp:13
UniversalId::Type mType
Definition: infotableproxymodel.hpp:18
int getFirstInfoRow(int currentRow) const
Definition: infotableproxymodel.cpp:53
Columns::ColumnId mInfoColumnId
Contains ID for Topic or Journal ID.
Definition: infotableproxymodel.hpp:19