1 #ifndef CSM_WOLRD_REFIDCOLLECTION_H
2 #define CSM_WOLRD_REFIDCOLLECTION_H
21 struct NestedTableWrapperBase;
22 class NestedRefIdAdapterBase;
33 bool userEditable =
true);
46 std::map<UniversalId::Type, RefIdAdapter *>
mAdapters;
48 std::vector<std::pair<const ColumnBase*, std::map<UniversalId::Type, NestedRefIdAdapterBase*> > >
mNestedAdapters;
65 virtual std::string
getId (
int index)
const;
67 virtual int getIndex (
const std::string&
id)
const;
73 virtual QVariant
getData (
int index,
int column)
const;
75 virtual void setData (
int index,
int column,
const QVariant& data);
77 virtual void removeRows (
int index,
int count);
80 const std::string& destination,
86 virtual int searchId (
const std::string&
id)
const;
109 virtual std::vector<std::string>
getIds (
bool listDeleted)
const;
114 virtual bool reorderRows (
int baseIndex,
const std::vector<int>& newOrder);
120 virtual QVariant
getNestedData(
int row,
int column,
int subRow,
int subColumn)
const;
132 virtual void setNestedData(
int row,
int column,
const QVariant& data,
int subRow,
int subColumn);
136 virtual void addNestedRow(
int row,
int col,
int position);
Definition: nestedtablewrapper.hpp:6
std::deque< RefIdColumn > mColumns
Definition: refidcollection.hpp:45
virtual QVariant getData(int index, int column) const
Definition: refidcollection.cpp:741
virtual void replace(int index, const RecordBase &record)
Definition: refidcollection.cpp:805
virtual void removeRows(int index, int count)
< Merge modified into base.
Definition: refidcollection.cpp:776
Definition: esmreader.hpp:21
Definition: columnbase.hpp:167
void load(ESM::ESMReader &reader, bool base, UniversalId::Type type)
Definition: refidcollection.cpp:841
virtual int getNestedColumnsCount(int row, int column) const
Definition: refidcollection.cpp:879
Display
Definition: columnbase.hpp:39
const RefIdData & getDataSet() const
Definition: refidcollection.cpp:866
Type
Definition: universalid.hpp:40
NestableColumn * getNestableColumn(int column)
Definition: refidcollection.cpp:887
virtual int getColumns() const
Definition: refidcollection.cpp:731
virtual void cloneRecord(const std::string &origin, const std::string &destination, const UniversalId::Type type)
Definition: refidcollection.cpp:810
Definition: refiddata.hpp:219
RefIdColumn(int columnId, Display displayType, int flag=Flag_Table|Flag_Dialogue, bool editable=true, bool userEditable=true)
Definition: refidcollection.cpp:14
Definition: columnbase.hpp:33
virtual void appendBlankRecord(const std::string &id, UniversalId::Type type)
Definition: refidcollection.cpp:790
virtual bool isEditable() const
Definition: refidcollection.cpp:19
virtual int searchId(const std::string &id) const
Definition: refidcollection.cpp:795
virtual NestedTableWrapperBase * nestedTable(int row, int column) const
Definition: refidcollection.cpp:910
virtual int getIndex(const std::string &id) const
Definition: refidcollection.cpp:721
Definition: refidadapter.hpp:24
virtual int getNestedRowsCount(int row, int column) const
Definition: refidcollection.cpp:871
virtual int getSize() const
Definition: refidcollection.cpp:711
Definition: esmwriter.hpp:17
RefIdCollection()
Definition: refidcollection.cpp:39
Definition: refidcollection.hpp:24
virtual void setData(int index, int column, const QVariant &data)
Definition: refidcollection.cpp:758
virtual void removeNestedRows(int row, int column, int subRow)
Definition: refidcollection.cpp:781
virtual void setNestedTable(int row, int column, const NestedTableWrapperBase &nestedTable)
Definition: refidcollection.cpp:901
virtual std::vector< std::string > getIds(bool listDeleted) const
Definition: refidcollection.cpp:851
const RefIdAdapter & findAdapter(UniversalId::Type) const
Throws an exception if no adaptor for Type can be found.
Definition: refidcollection.cpp:29
virtual bool reorderRows(int baseIndex, const std::vector< int > &newOrder)
Definition: refidcollection.cpp:856
virtual int getAppendIndex(const std::string &id, UniversalId::Type type) const
Definition: refidcollection.cpp:846
virtual void addNestedRow(int row, int col, int position)
Definition: refidcollection.cpp:892
virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const
Definition: refidcollection.cpp:750
Definition: refidcollection.hpp:40
void save(int index, ESM::ESMWriter &writer) const
Definition: refidcollection.cpp:861
void copyTo(int index, RefIdCollection &target) const
Definition: refidcollection.cpp:937
std::vector< std::pair< const ColumnBase *, std::map< UniversalId::Type, NestedRefIdAdapterBase * > > > mNestedAdapters
Definition: refidcollection.hpp:48
virtual std::string getId(int index) const
Definition: refidcollection.cpp:716
Definition: columnbase.hpp:15
Base class for record collections.
Definition: collectionbase.hpp:23
const NestedRefIdAdapterBase & getNestedAdapter(const ColumnBase &column, UniversalId::Type type) const
Definition: refidcollection.cpp:918
virtual const ColumnBase & getColumn(int column) const
Definition: refidcollection.cpp:736
RefIdData mData
Definition: refidcollection.hpp:44
virtual bool isUserEditable() const
Can this column be edited directly by the user?
Definition: refidcollection.cpp:24
virtual ~RefIdCollection()
Definition: refidcollection.cpp:696
std::map< UniversalId::Type, RefIdAdapter * > mAdapters
Definition: refidcollection.hpp:46
virtual void setNestedData(int row, int column, const QVariant &data, int subRow, int subColumn)
Definition: refidcollection.cpp:767
Definition: columnbase.hpp:34
virtual void appendRecord(const RecordBase &record, UniversalId::Type type)
Definition: refidcollection.cpp:819
virtual const RecordBase & getRecord(const std::string &id) const
Definition: refidcollection.cpp:831
Definition: refidadapter.hpp:49
Definition: nestedcollection.hpp:13
bool mUserEditable
Definition: refidcollection.hpp:27
bool mEditable
Definition: refidcollection.hpp:26