OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
columnimp.hpp
Go to the documentation of this file.
1 #ifndef CSM_WOLRD_COLUMNIMP_H
2 #define CSM_WOLRD_COLUMNIMP_H
3 
4 #include <cassert>
5 #include <sstream>
6 #include <stdexcept>
7 
8 #include <boost/lexical_cast.hpp>
9 
10 #include <QColor>
11 
15 
16 #include "columnbase.hpp"
17 #include "columns.hpp"
18 #include "info.hpp"
19 
20 namespace CSMWorld
21 {
23  template<typename ESXRecordT>
24  struct FloatValueColumn : public Column<ESXRecordT>
25  {
27 
28  virtual QVariant get (const Record<ESXRecordT>& record) const
29  {
30  return record.get().mValue.getFloat();
31  }
32 
33  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
34  {
35  ESXRecordT record2 = record.get();
36  record2.mValue.setFloat (data.toFloat());
37  record.setModified (record2);
38  }
39 
40  virtual bool isEditable() const
41  {
42  return true;
43  }
44  };
45 
46  template<typename ESXRecordT>
47  struct StringIdColumn : public Column<ESXRecordT>
48  {
49  StringIdColumn (bool hidden = false)
50  : Column<ESXRecordT> (Columns::ColumnId_Id, ColumnBase::Display_Id,
52  {}
53 
54  virtual QVariant get (const Record<ESXRecordT>& record) const
55  {
56  return QString::fromUtf8 (record.get().mId.c_str());
57  }
58 
59  virtual bool isEditable() const
60  {
61  return false;
62  }
63  };
64 
65  template<typename ESXRecordT>
66  struct RecordStateColumn : public Column<ESXRecordT>
67  {
70  {}
71 
72  virtual QVariant get (const Record<ESXRecordT>& record) const
73  {
74  if (record.mState==Record<ESXRecordT>::State_Erased)
75  return static_cast<int> (Record<ESXRecordT>::State_Deleted);
76 
77  return static_cast<int> (record.mState);
78  }
79 
80  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
81  {
82  record.mState = static_cast<RecordBase::State> (data.toInt());
83  }
84 
85  virtual bool isEditable() const
86  {
87  return true;
88  }
89 
90  virtual bool isUserEditable() const
91  {
92  return false;
93  }
94  };
95 
96  template<typename ESXRecordT>
97  struct FixedRecordTypeColumn : public Column<ESXRecordT>
98  {
99  int mType;
100 
102  : Column<ESXRecordT> (Columns::ColumnId_RecordType, ColumnBase::Display_Integer, 0),
103  mType (type)
104  {}
105 
106  virtual QVariant get (const Record<ESXRecordT>& record) const
107  {
108  return mType;
109  }
110 
111  virtual bool isEditable() const
112  {
113  return false;
114  }
115  };
116 
118  template<typename ESXRecordT>
119  struct VarTypeColumn : public Column<ESXRecordT>
120  {
122  : Column<ESXRecordT> (Columns::ColumnId_ValueType, display)
123  {}
124 
125  virtual QVariant get (const Record<ESXRecordT>& record) const
126  {
127  return static_cast<int> (record.get().mValue.getType());
128  }
129 
130  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
131  {
132  ESXRecordT record2 = record.get();
133  record2.mValue.setType (static_cast<ESM::VarType> (data.toInt()));
134  record.setModified (record2);
135  }
136 
137  virtual bool isEditable() const
138  {
139  return true;
140  }
141  };
142 
144  template<typename ESXRecordT>
145  struct VarValueColumn : public Column<ESXRecordT>
146  {
148 
149  virtual QVariant get (const Record<ESXRecordT>& record) const
150  {
151  switch (record.get().mValue.getType())
152  {
153  case ESM::VT_String:
154 
155  return QString::fromUtf8 (record.get().mValue.getString().c_str());
156 
157  case ESM::VT_Int:
158  case ESM::VT_Short:
159  case ESM::VT_Long:
160 
161  return record.get().mValue.getInteger();
162 
163  case ESM::VT_Float:
164 
165  return record.get().mValue.getFloat();
166 
167  default: return QVariant();
168  }
169  }
170 
171  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
172  {
173  ESXRecordT record2 = record.get();
174 
175  switch (record2.mValue.getType())
176  {
177  case ESM::VT_String:
178 
179  record2.mValue.setString (data.toString().toUtf8().constData());
180  break;
181 
182  case ESM::VT_Int:
183  case ESM::VT_Short:
184  case ESM::VT_Long:
185 
186  record2.mValue.setInteger (data.toInt());
187  break;
188 
189  case ESM::VT_Float:
190 
191  record2.mValue.setFloat (data.toFloat());
192  break;
193 
194  default: break;
195  }
196 
197  record.setModified (record2);
198  }
199 
200  virtual bool isEditable() const
201  {
202  return true;
203  }
204  };
205 
206  template<typename ESXRecordT>
207  struct DescriptionColumn : public Column<ESXRecordT>
208  {
210  : Column<ESXRecordT> (Columns::ColumnId_Description, ColumnBase::Display_LongString)
211  {}
212 
213  virtual QVariant get (const Record<ESXRecordT>& record) const
214  {
215  return QString::fromUtf8 (record.get().mDescription.c_str());
216  }
217 
218  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
219  {
220  ESXRecordT record2 = record.get();
221 
222  record2.mDescription = data.toString().toUtf8().constData();
223 
224  record.setModified (record2);
225  }
226 
227  virtual bool isEditable() const
228  {
229  return true;
230  }
231  };
232 
233  template<typename ESXRecordT>
234  struct SpecialisationColumn : public Column<ESXRecordT>
235  {
238  {}
239 
240  virtual QVariant get (const Record<ESXRecordT>& record) const
241  {
242  return record.get().mData.mSpecialization;
243  }
244 
245  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
246  {
247  ESXRecordT record2 = record.get();
248 
249  record2.mData.mSpecialization = data.toInt();
250 
251  record.setModified (record2);
252  }
253 
254  virtual bool isEditable() const
255  {
256  return true;
257  }
258  };
259 
260  template<typename ESXRecordT>
261  struct UseValueColumn : public Column<ESXRecordT>
262  {
263  int mIndex;
264 
265  UseValueColumn (int index)
266  : Column<ESXRecordT> (Columns::ColumnId_UseValue1 + index, ColumnBase::Display_Float),
267  mIndex (index)
268  {}
269 
270  virtual QVariant get (const Record<ESXRecordT>& record) const
271  {
272  return record.get().mData.mUseValue[mIndex];
273  }
274 
275  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
276  {
277  ESXRecordT record2 = record.get();
278 
279  record2.mData.mUseValue[mIndex] = data.toFloat();
280 
281  record.setModified (record2);
282  }
283 
284  virtual bool isEditable() const
285  {
286  return true;
287  }
288  };
289 
290  template<typename ESXRecordT>
291  struct AttributeColumn : public Column<ESXRecordT>
292  {
294  : Column<ESXRecordT> (Columns::ColumnId_Attribute, ColumnBase::Display_Attribute)
295  {}
296 
297  virtual QVariant get (const Record<ESXRecordT>& record) const
298  {
299  return record.get().mData.mAttribute;
300  }
301 
302  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
303  {
304  ESXRecordT record2 = record.get();
305 
306  record2.mData.mAttribute = data.toInt();
307 
308  record.setModified (record2);
309  }
310 
311  virtual bool isEditable() const
312  {
313  return true;
314  }
315  };
316 
317  template<typename ESXRecordT>
318  struct NameColumn : public Column<ESXRecordT>
319  {
320  NameColumn() : Column<ESXRecordT> (Columns::ColumnId_Name, ColumnBase::Display_String) {}
321 
322  virtual QVariant get (const Record<ESXRecordT>& record) const
323  {
324  return QString::fromUtf8 (record.get().mName.c_str());
325  }
326 
327  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
328  {
329  ESXRecordT record2 = record.get();
330 
331  record2.mName = data.toString().toUtf8().constData();
332 
333  record.setModified (record2);
334  }
335 
336  virtual bool isEditable() const
337  {
338  return true;
339  }
340  };
341 
342  template<typename ESXRecordT>
343  struct AttributesColumn : public Column<ESXRecordT>
344  {
345  int mIndex;
346 
347  AttributesColumn (int index)
348  : Column<ESXRecordT> (Columns::ColumnId_Attribute1 + index, ColumnBase::Display_Attribute),
349  mIndex (index)
350  {}
351 
352  virtual QVariant get (const Record<ESXRecordT>& record) const
353  {
354  return record.get().mData.mAttribute[mIndex];
355  }
356 
357  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
358  {
359  ESXRecordT record2 = record.get();
360 
361  record2.mData.mAttribute[mIndex] = data.toInt();
362 
363  record.setModified (record2);
364  }
365 
366  virtual bool isEditable() const
367  {
368  return true;
369  }
370  };
371 
372  template<typename ESXRecordT>
373  struct SkillsColumn : public Column<ESXRecordT>
374  {
375  int mIndex;
376  bool mMajor;
377 
378  SkillsColumn (int index, bool typePrefix = false, bool major = false)
379  : Column<ESXRecordT> ((typePrefix ? (
380  major ? Columns::ColumnId_MajorSkill1 : Columns::ColumnId_MinorSkill1) :
381  Columns::ColumnId_Skill1) + index, ColumnBase::Display_Skill),
382  mIndex (index), mMajor (major)
383  {}
384 
385  virtual QVariant get (const Record<ESXRecordT>& record) const
386  {
387  int skill = record.get().mData.getSkill (mIndex, mMajor);
388 
389  return QString::fromUtf8 (ESM::Skill::indexToId (skill).c_str());
390  }
391 
392  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
393  {
394  std::istringstream stream (data.toString().toUtf8().constData());
395 
396  int index = -1;
397  char c;
398 
399  stream >> c >> index;
400 
401  if (index!=-1)
402  {
403  ESXRecordT record2 = record.get();
404 
405  record2.mData.getSkill (mIndex, mMajor) = index;
406 
407  record.setModified (record2);
408  }
409  }
410 
411  virtual bool isEditable() const
412  {
413  return true;
414  }
415  };
416 
417  template<typename ESXRecordT>
418  struct PlayableColumn : public Column<ESXRecordT>
419  {
421  {}
422 
423  virtual QVariant get (const Record<ESXRecordT>& record) const
424  {
425  return record.get().mData.mIsPlayable!=0;
426  }
427 
428  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
429  {
430  ESXRecordT record2 = record.get();
431 
432  record2.mData.mIsPlayable = data.toInt();
433 
434  record.setModified (record2);
435  }
436 
437  virtual bool isEditable() const
438  {
439  return true;
440  }
441  };
442 
443  template<typename ESXRecordT>
444  struct HiddenColumn : public Column<ESXRecordT>
445  {
447 
448  virtual QVariant get (const Record<ESXRecordT>& record) const
449  {
450  return record.get().mData.mIsHidden!=0;
451  }
452 
453  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
454  {
455  ESXRecordT record2 = record.get();
456 
457  record2.mData.mIsHidden = data.toInt();
458 
459  record.setModified (record2);
460  }
461 
462  virtual bool isEditable() const
463  {
464  return true;
465  }
466  };
467 
468  template<typename ESXRecordT>
469  struct FlagColumn : public Column<ESXRecordT>
470  {
471  int mMask;
472  bool mInverted;
473 
474  FlagColumn (int columnId, int mask,
475  int flags = ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue, bool inverted = false)
476  : Column<ESXRecordT> (columnId, ColumnBase::Display_Boolean, flags), mMask (mask),
477  mInverted (inverted)
478  {}
479 
480  virtual QVariant get (const Record<ESXRecordT>& record) const
481  {
482  bool flag = (record.get().mData.mFlags & mMask)!=0;
483 
484  if (mInverted)
485  flag = !flag;
486 
487  return flag;
488  }
489 
490  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
491  {
492  ESXRecordT record2 = record.get();
493 
494  int flags = record2.mData.mFlags & ~mMask;
495 
496  if ((data.toInt()!=0)!=mInverted)
497  flags |= mMask;
498 
499  record2.mData.mFlags = flags;
500 
501  record.setModified (record2);
502  }
503 
504  virtual bool isEditable() const
505  {
506  return true;
507  }
508  };
509 
510  template<typename ESXRecordT>
511  struct FlagColumn2 : public Column<ESXRecordT>
512  {
513  int mMask;
514  bool mInverted;
515 
516  FlagColumn2 (int columnId, int mask, bool inverted = false)
517  : Column<ESXRecordT> (columnId, ColumnBase::Display_Boolean), mMask (mask),
518  mInverted (inverted)
519  {}
520 
521  virtual QVariant get (const Record<ESXRecordT>& record) const
522  {
523  bool flag = (record.get().mFlags & mMask)!=0;
524 
525  if (mInverted)
526  flag = !flag;
527 
528  return flag;
529  }
530 
531  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
532  {
533  ESXRecordT record2 = record.get();
534 
535  int flags = record2.mFlags & ~mMask;
536 
537  if ((data.toInt()!=0)!=mInverted)
538  flags |= mMask;
539 
540  record2.mFlags = flags;
541 
542  record.setModified (record2);
543  }
544 
545  virtual bool isEditable() const
546  {
547  return true;
548  }
549  };
550 
551  template<typename ESXRecordT>
552  struct WeightHeightColumn : public Column<ESXRecordT>
553  {
554  bool mMale;
555  bool mWeight;
556 
557  WeightHeightColumn (bool male, bool weight)
558  : Column<ESXRecordT> (male ?
559  (weight ? Columns::ColumnId_MaleWeight : Columns::ColumnId_MaleHeight) :
560  (weight ? Columns::ColumnId_FemaleWeight : Columns::ColumnId_FemaleHeight),
562  mMale (male), mWeight (weight)
563  {}
564 
565  virtual QVariant get (const Record<ESXRecordT>& record) const
566  {
567  const ESM::Race::MaleFemaleF& value =
568  mWeight ? record.get().mData.mWeight : record.get().mData.mHeight;
569 
570  return mMale ? value.mMale : value.mFemale;
571  }
572 
573  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
574  {
575  ESXRecordT record2 = record.get();
576 
577  ESM::Race::MaleFemaleF& value =
578  mWeight ? record2.mData.mWeight : record2.mData.mHeight;
579 
580  (mMale ? value.mMale : value.mFemale) = data.toFloat();
581 
582  record.setModified (record2);
583  }
584 
585  virtual bool isEditable() const
586  {
587  return true;
588  }
589  };
590 
591  template<typename ESXRecordT>
592  struct SoundParamColumn : public Column<ESXRecordT>
593  {
594  enum Type
595  {
599  };
600 
602 
604  : Column<ESXRecordT> (type==Type_Volume ? Columns::ColumnId_Volume :
605  (type==Type_MinRange ? Columns::ColumnId_MinRange : Columns::ColumnId_MaxRange),
607  mType (type)
608  {}
609 
610  virtual QVariant get (const Record<ESXRecordT>& record) const
611  {
612  int value = 0;
613 
614  switch (mType)
615  {
616  case Type_Volume: value = record.get().mData.mVolume; break;
617  case Type_MinRange: value = record.get().mData.mMinRange; break;
618  case Type_MaxRange: value = record.get().mData.mMaxRange; break;
619  }
620 
621  return value;
622  }
623 
624  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
625  {
626  int value = data.toInt();
627 
628  if (value<0)
629  value = 0;
630  else if (value>255)
631  value = 255;
632 
633  ESXRecordT record2 = record.get();
634 
635  switch (mType)
636  {
637  case Type_Volume: record2.mData.mVolume = static_cast<unsigned char> (value); break;
638  case Type_MinRange: record2.mData.mMinRange = static_cast<unsigned char> (value); break;
639  case Type_MaxRange: record2.mData.mMaxRange = static_cast<unsigned char> (value); break;
640  }
641 
642  record.setModified (record2);
643  }
644 
645  virtual bool isEditable() const
646  {
647  return true;
648  }
649  };
650 
651  template<typename ESXRecordT>
652  struct SoundFileColumn : public Column<ESXRecordT>
653  {
655  : Column<ESXRecordT> (Columns::ColumnId_SoundFile, ColumnBase::Display_SoundRes)
656  {}
657 
658  virtual QVariant get (const Record<ESXRecordT>& record) const
659  {
660  return QString::fromUtf8 (record.get().mSound.c_str());
661  }
662 
663  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
664  {
665  ESXRecordT record2 = record.get();
666 
667  record2.mSound = data.toString().toUtf8().constData();
668 
669  record.setModified (record2);
670  }
671 
672  virtual bool isEditable() const
673  {
674  return true;
675  }
676  };
677 
680  template<typename ESXRecordT>
681  struct MapColourColumn : public Column<ESXRecordT>
682  {
685  : Column<ESXRecordT> (Columns::ColumnId_MapColour, ColumnBase::Display_Colour)
686  {}
687 
688  virtual QVariant get (const Record<ESXRecordT>& record) const
689  {
690  int colour = record.get().mMapColor;
691 
692  return QColor (colour & 0xff, (colour>>8) & 0xff, (colour>>16) & 0xff);
693  }
694 
695  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
696  {
697  ESXRecordT record2 = record.get();
698 
699  QColor colour = data.value<QColor>();
700 
701  record2.mMapColor = (colour.blue() << 16) | (colour.green() << 8) | colour.red();
702 
703  record.setModified (record2);
704  }
705 
706  virtual bool isEditable() const
707  {
708  return true;
709  }
710  };
711 
712  template<typename ESXRecordT>
713  struct SleepListColumn : public Column<ESXRecordT>
714  {
717  {}
718 
719  virtual QVariant get (const Record<ESXRecordT>& record) const
720  {
721  return QString::fromUtf8 (record.get().mSleepList.c_str());
722  }
723 
724  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
725  {
726  ESXRecordT record2 = record.get();
727 
728  record2.mSleepList = data.toString().toUtf8().constData();
729 
730  record.setModified (record2);
731  }
732 
733  virtual bool isEditable() const
734  {
735  return true;
736  }
737  };
738 
739  template<typename ESXRecordT>
740  struct TextureColumn : public Column<ESXRecordT>
741  {
743 
744  virtual QVariant get (const Record<ESXRecordT>& record) const
745  {
746  return QString::fromUtf8 (record.get().mTexture.c_str());
747  }
748 
749  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
750  {
751  ESXRecordT record2 = record.get();
752 
753  record2.mTexture = data.toString().toUtf8().constData();
754 
755  record.setModified (record2);
756  }
757 
758  virtual bool isEditable() const
759  {
760  return true;
761  }
762  };
763 
764  template<typename ESXRecordT>
765  struct SpellTypeColumn : public Column<ESXRecordT>
766  {
768  : Column<ESXRecordT> (Columns::ColumnId_SpellType, ColumnBase::Display_SpellType)
769  {}
770 
771  virtual QVariant get (const Record<ESXRecordT>& record) const
772  {
773  return record.get().mData.mType;
774  }
775 
776  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
777  {
778  ESXRecordT record2 = record.get();
779 
780  record2.mData.mType = data.toInt();
781 
782  record.setModified (record2);
783  }
784 
785  virtual bool isEditable() const
786  {
787  return true;
788  }
789  };
790 
791  template<typename ESXRecordT>
792  struct CostColumn : public Column<ESXRecordT>
793  {
794  CostColumn() : Column<ESXRecordT> (Columns::ColumnId_Cost, ColumnBase::Display_Integer) {}
795 
796  virtual QVariant get (const Record<ESXRecordT>& record) const
797  {
798  return record.get().mData.mCost;
799  }
800 
801  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
802  {
803  ESXRecordT record2 = record.get();
804  record2.mData.mCost = data.toInt();
805  record.setModified (record2);
806  }
807 
808  virtual bool isEditable() const
809  {
810  return true;
811  }
812  };
813 
814  template<typename ESXRecordT>
815  struct ScriptColumn : public Column<ESXRecordT>
816  {
817  enum Type
818  {
819  Type_File, // regular script record
820  Type_Lines, // console context
821  Type_Info // dialogue context (not implemented yet)
822  };
823 
825  : Column<ESXRecordT> (Columns::ColumnId_ScriptText,
827  type==Type_File ? 0 : ColumnBase::Flag_Dialogue)
828  {}
829 
830  virtual QVariant get (const Record<ESXRecordT>& record) const
831  {
832  return QString::fromUtf8 (record.get().mScriptText.c_str());
833  }
834 
835  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
836  {
837  ESXRecordT record2 = record.get();
838 
839  record2.mScriptText = data.toString().toUtf8().constData();
840 
841  record.setModified (record2);
842  }
843 
844  virtual bool isEditable() const
845  {
846  return true;
847  }
848  };
849 
850  template<typename ESXRecordT>
851  struct RegionColumn : public Column<ESXRecordT>
852  {
854 
855  virtual QVariant get (const Record<ESXRecordT>& record) const
856  {
857  return QString::fromUtf8 (record.get().mRegion.c_str());
858  }
859 
860  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
861  {
862  ESXRecordT record2 = record.get();
863 
864  record2.mRegion = data.toString().toUtf8().constData();
865 
866  record.setModified (record2);
867  }
868 
869  virtual bool isEditable() const
870  {
871  return true;
872  }
873  };
874 
875  template<typename ESXRecordT>
876  struct CellColumn : public Column<ESXRecordT>
877  {
878  bool mBlocked;
879 
881  CellColumn (bool blocked = false)
882  : Column<ESXRecordT> (Columns::ColumnId_Cell, ColumnBase::Display_Cell),
883  mBlocked (blocked)
884  {}
885 
886  virtual QVariant get (const Record<ESXRecordT>& record) const
887  {
888  return QString::fromUtf8 (record.get().mCell.c_str());
889  }
890 
891  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
892  {
893  ESXRecordT record2 = record.get();
894 
895  record2.mCell = data.toString().toUtf8().constData();
896 
897  record.setModified (record2);
898  }
899 
900  virtual bool isEditable() const
901  {
902  return true;
903  }
904 
905  virtual bool isUserEditable() const
906  {
907  return !mBlocked;
908  }
909  };
910 
911  template<typename ESXRecordT>
912  struct OriginalCellColumn : public Column<ESXRecordT>
913  {
915  : Column<ESXRecordT> (Columns::ColumnId_OriginalCell, ColumnBase::Display_Cell)
916  {}
917 
918  virtual QVariant get (const Record<ESXRecordT>& record) const
919  {
920  return QString::fromUtf8 (record.get().mOriginalCell.c_str());
921  }
922 
923  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
924  {
925  ESXRecordT record2 = record.get();
926 
927  record2.mOriginalCell = data.toString().toUtf8().constData();
928 
929  record.setModified (record2);
930  }
931 
932  virtual bool isEditable() const
933  {
934  return true;
935  }
936 
937  virtual bool isUserEditable() const
938  {
939  return false;
940  }
941  };
942 
943  template<typename ESXRecordT>
944  struct IdColumn : public Column<ESXRecordT>
945  {
946  IdColumn() : Column<ESXRecordT> (Columns::ColumnId_ReferenceableId,
948 
949  virtual QVariant get (const Record<ESXRecordT>& record) const
950  {
951  return QString::fromUtf8 (record.get().mRefID.c_str());
952  }
953 
954  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
955  {
956  ESXRecordT record2 = record.get();
957 
958  record2.mRefID = data.toString().toUtf8().constData();
959 
960  record.setModified (record2);
961  }
962 
963  virtual bool isEditable() const
964  {
965  return true;
966  }
967  };
968 
969  template<typename ESXRecordT>
970  struct ScaleColumn : public Column<ESXRecordT>
971  {
972  ScaleColumn() : Column<ESXRecordT> (Columns::ColumnId_Scale, ColumnBase::Display_Float) {}
973 
974  virtual QVariant get (const Record<ESXRecordT>& record) const
975  {
976  return record.get().mScale;
977  }
978 
979  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
980  {
981  ESXRecordT record2 = record.get();
982  record2.mScale = data.toFloat();
983  record.setModified (record2);
984  }
985 
986  virtual bool isEditable() const
987  {
988  return true;
989  }
990  };
991 
992  template<typename ESXRecordT>
993  struct OwnerColumn : public Column<ESXRecordT>
994  {
995  OwnerColumn() : Column<ESXRecordT> (Columns::ColumnId_Owner, ColumnBase::Display_Npc) {}
996 
997  virtual QVariant get (const Record<ESXRecordT>& record) const
998  {
999  return QString::fromUtf8 (record.get().mOwner.c_str());
1000  }
1001 
1002  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1003  {
1004  ESXRecordT record2 = record.get();
1005 
1006  record2.mOwner = data.toString().toUtf8().constData();
1007 
1008  record.setModified (record2);
1009  }
1010 
1011  virtual bool isEditable() const
1012  {
1013  return true;
1014  }
1015  };
1016 
1017  template<typename ESXRecordT>
1018  struct SoulColumn : public Column<ESXRecordT>
1019  {
1021 
1022  virtual QVariant get (const Record<ESXRecordT>& record) const
1023  {
1024  return QString::fromUtf8 (record.get().mSoul.c_str());
1025  }
1026 
1027  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1028  {
1029  ESXRecordT record2 = record.get();
1030 
1031  record2.mSoul = data.toString().toUtf8().constData();
1032 
1033  record.setModified (record2);
1034  }
1035 
1036  virtual bool isEditable() const
1037  {
1038  return true;
1039  }
1040  };
1041 
1042  template<typename ESXRecordT>
1043  struct FactionColumn : public Column<ESXRecordT>
1044  {
1046 
1047  virtual QVariant get (const Record<ESXRecordT>& record) const
1048  {
1049  return QString::fromUtf8 (record.get().mFaction.c_str());
1050  }
1051 
1052  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1053  {
1054  ESXRecordT record2 = record.get();
1055 
1056  record2.mFaction = data.toString().toUtf8().constData();
1057 
1058  record.setModified (record2);
1059  }
1060 
1061  virtual bool isEditable() const
1062  {
1063  return true;
1064  }
1065  };
1066 
1067  template<typename ESXRecordT>
1068  struct FactionIndexColumn : public Column<ESXRecordT>
1069  {
1071  : Column<ESXRecordT> (Columns::ColumnId_FactionIndex, ColumnBase::Display_Integer)
1072  {}
1073 
1074  virtual QVariant get (const Record<ESXRecordT>& record) const
1075  {
1076  return record.get().mFactionRank;
1077  }
1078 
1079  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1080  {
1081  ESXRecordT record2 = record.get();
1082  record2.mFactionRank = data.toInt();
1083  record.setModified (record2);
1084  }
1085 
1086  virtual bool isEditable() const
1087  {
1088  return true;
1089  }
1090  };
1091 
1092  template<typename ESXRecordT>
1093  struct ChargesColumn : public Column<ESXRecordT>
1094  {
1096 
1097  virtual QVariant get (const Record<ESXRecordT>& record) const
1098  {
1099  return record.get().mChargeInt;
1100  }
1101 
1102  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1103  {
1104  ESXRecordT record2 = record.get();
1105  record2.mChargeInt = data.toInt();
1106  record.setModified (record2);
1107  }
1108 
1109  virtual bool isEditable() const
1110  {
1111  return true;
1112  }
1113  };
1114 
1115  template<typename ESXRecordT>
1116  struct EnchantmentChargesColumn : public Column<ESXRecordT>
1117  {
1119  : Column<ESXRecordT> (Columns::ColumnId_Enchantment, ColumnBase::Display_Float)
1120  {}
1121 
1122  virtual QVariant get (const Record<ESXRecordT>& record) const
1123  {
1124  return record.get().mEnchantmentCharge;
1125  }
1126 
1127  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1128  {
1129  ESXRecordT record2 = record.get();
1130  record2.mEnchantmentCharge = data.toFloat();
1131  record.setModified (record2);
1132  }
1133 
1134  virtual bool isEditable() const
1135  {
1136  return true;
1137  }
1138  };
1139 
1140  template<typename ESXRecordT>
1141  struct GoldValueColumn : public Column<ESXRecordT>
1142  {
1144  : Column<ESXRecordT> (Columns::ColumnId_CoinValue, ColumnBase::Display_Integer) {}
1145 
1146  virtual QVariant get (const Record<ESXRecordT>& record) const
1147  {
1148  return record.get().mGoldValue;
1149  }
1150 
1151  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1152  {
1153  ESXRecordT record2 = record.get();
1154  record2.mGoldValue = data.toInt();
1155  record.setModified (record2);
1156  }
1157 
1158  virtual bool isEditable() const
1159  {
1160  return true;
1161  }
1162  };
1163 
1164  template<typename ESXRecordT>
1165  struct TeleportColumn : public Column<ESXRecordT>
1166  {
1168  : Column<ESXRecordT> (Columns::ColumnId_Teleport, ColumnBase::Display_Boolean)
1169  {}
1170 
1171  virtual QVariant get (const Record<ESXRecordT>& record) const
1172  {
1173  return record.get().mTeleport;
1174  }
1175 
1176  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1177  {
1178  ESXRecordT record2 = record.get();
1179 
1180  record2.mTeleport = data.toInt();
1181 
1182  record.setModified (record2);
1183  }
1184 
1185  virtual bool isEditable() const
1186  {
1187  return true;
1188  }
1189  };
1190 
1191  template<typename ESXRecordT>
1192  struct TeleportCellColumn : public Column<ESXRecordT>
1193  {
1195  : Column<ESXRecordT> (Columns::ColumnId_TeleportCell, ColumnBase::Display_Cell)
1196  {}
1197 
1198  virtual QVariant get (const Record<ESXRecordT>& record) const
1199  {
1200  return QString::fromUtf8 (record.get().mDestCell.c_str());
1201  }
1202 
1203  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1204  {
1205  ESXRecordT record2 = record.get();
1206 
1207  record2.mDestCell = data.toString().toUtf8().constData();
1208 
1209  record.setModified (record2);
1210  }
1211 
1212  virtual bool isEditable() const
1213  {
1214  return true;
1215  }
1216 
1217  virtual bool isUserEditable() const
1218  {
1219  return true;
1220  }
1221  };
1222 
1223  template<typename ESXRecordT>
1224  struct LockLevelColumn : public Column<ESXRecordT>
1225  {
1227  : Column<ESXRecordT> (Columns::ColumnId_LockLevel, ColumnBase::Display_Integer)
1228  {}
1229 
1230  virtual QVariant get (const Record<ESXRecordT>& record) const
1231  {
1232  return record.get().mLockLevel;
1233  }
1234 
1235  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1236  {
1237  ESXRecordT record2 = record.get();
1238  record2.mLockLevel = data.toInt();
1239  record.setModified (record2);
1240  }
1241 
1242  virtual bool isEditable() const
1243  {
1244  return true;
1245  }
1246  };
1247 
1248  template<typename ESXRecordT>
1249  struct KeyColumn : public Column<ESXRecordT>
1250  {
1252 
1253  virtual QVariant get (const Record<ESXRecordT>& record) const
1254  {
1255  return QString::fromUtf8 (record.get().mKey.c_str());
1256  }
1257 
1258  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1259  {
1260  ESXRecordT record2 = record.get();
1261 
1262  record2.mKey = data.toString().toUtf8().constData();
1263 
1264  record.setModified (record2);
1265  }
1266 
1267  virtual bool isEditable() const
1268  {
1269  return true;
1270  }
1271  };
1272 
1273  template<typename ESXRecordT>
1274  struct TrapColumn : public Column<ESXRecordT>
1275  {
1276  TrapColumn() : Column<ESXRecordT> (Columns::ColumnId_Trap, ColumnBase::Display_Spell) {}
1277 
1278  virtual QVariant get (const Record<ESXRecordT>& record) const
1279  {
1280  return QString::fromUtf8 (record.get().mTrap.c_str());
1281  }
1282 
1283  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1284  {
1285  ESXRecordT record2 = record.get();
1286 
1287  record2.mTrap = data.toString().toUtf8().constData();
1288 
1289  record.setModified (record2);
1290  }
1291 
1292  virtual bool isEditable() const
1293  {
1294  return true;
1295  }
1296  };
1297 
1298  template<typename ESXRecordT>
1299  struct FilterColumn : public Column<ESXRecordT>
1300  {
1302 
1303  virtual QVariant get (const Record<ESXRecordT>& record) const
1304  {
1305  return QString::fromUtf8 (record.get().mFilter.c_str());
1306  }
1307 
1308  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1309  {
1310  ESXRecordT record2 = record.get();
1311 
1312  record2.mFilter = data.toString().toUtf8().constData();
1313 
1314  record.setModified (record2);
1315  }
1316 
1317  virtual bool isEditable() const
1318  {
1319  return true;
1320  }
1321  };
1322 
1323  template<typename ESXRecordT>
1324  struct PosColumn : public Column<ESXRecordT>
1325  {
1326  ESM::Position ESXRecordT::* mPosition;
1327  int mIndex;
1328 
1329  PosColumn (ESM::Position ESXRecordT::* position, int index, bool door)
1330  : Column<ESXRecordT> (
1331  (door ? Columns::ColumnId_DoorPositionXPos : Columns::ColumnId_PositionXPos)+index,
1332  ColumnBase::Display_Float), mPosition (position), mIndex (index) {}
1333 
1334  virtual QVariant get (const Record<ESXRecordT>& record) const
1335  {
1336  const ESM::Position& position = record.get().*mPosition;
1337  return position.pos[mIndex];
1338  }
1339 
1340  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1341  {
1342  ESXRecordT record2 = record.get();
1343 
1344  ESM::Position& position = record2.*mPosition;
1345 
1346  position.pos[mIndex] = data.toFloat();
1347 
1348  record.setModified (record2);
1349  }
1350 
1351  virtual bool isEditable() const
1352  {
1353  return true;
1354  }
1355  };
1356 
1357  template<typename ESXRecordT>
1358  struct RotColumn : public Column<ESXRecordT>
1359  {
1360  ESM::Position ESXRecordT::* mPosition;
1361  int mIndex;
1362 
1363  RotColumn (ESM::Position ESXRecordT::* position, int index, bool door)
1364  : Column<ESXRecordT> (
1365  (door ? Columns::ColumnId_DoorPositionXRot : Columns::ColumnId_PositionXRot)+index,
1366  ColumnBase::Display_Float), mPosition (position), mIndex (index) {}
1367 
1368  virtual QVariant get (const Record<ESXRecordT>& record) const
1369  {
1370  const ESM::Position& position = record.get().*mPosition;
1371  return position.rot[mIndex];
1372  }
1373 
1374  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1375  {
1376  ESXRecordT record2 = record.get();
1377 
1378  ESM::Position& position = record2.*mPosition;
1379 
1380  position.rot[mIndex] = data.toFloat();
1381 
1382  record.setModified (record2);
1383  }
1384 
1385  virtual bool isEditable() const
1386  {
1387  return true;
1388  }
1389  };
1390 
1391  template<typename ESXRecordT>
1392  struct DialogueTypeColumn : public Column<ESXRecordT>
1393  {
1394  DialogueTypeColumn (bool hidden = false)
1395  : Column<ESXRecordT> (Columns::ColumnId_DialogueType, ColumnBase::Display_DialogueType,
1396  hidden ? 0 : ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue)
1397  {}
1398 
1399  virtual QVariant get (const Record<ESXRecordT>& record) const
1400  {
1401  return static_cast<int> (record.get().mType);
1402  }
1403 
1404  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1405  {
1406  ESXRecordT record2 = record.get();
1407 
1408  record2.mType = data.toInt();
1409 
1410  record.setModified (record2);
1411  }
1412 
1413  virtual bool isEditable() const
1414  {
1415  return true;
1416  }
1417 
1418  virtual bool isUserEditable() const
1419  {
1420  return false;
1421  }
1422  };
1423 
1424  template<typename ESXRecordT>
1425  struct QuestStatusTypeColumn : public Column<ESXRecordT>
1426  {
1429  {}
1430 
1431  virtual QVariant get (const Record<ESXRecordT>& record) const
1432  {
1433  return static_cast<int> (record.get().mQuestStatus);
1434  }
1435 
1436  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1437  {
1438  ESXRecordT record2 = record.get();
1439 
1440  record2.mQuestStatus = static_cast<Info::QuestStatus> (data.toInt());
1441 
1442  record.setModified (record2);
1443  }
1444 
1445  virtual bool isEditable() const
1446  {
1447  return true;
1448  }
1449  };
1450 
1451  template<typename ESXRecordT>
1452  struct QuestDescriptionColumn : public Column<ESXRecordT>
1453  {
1455 
1456  virtual QVariant get (const Record<ESXRecordT>& record) const
1457  {
1458  return QString::fromUtf8 (record.get().mResponse.c_str());
1459  }
1460 
1461  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1462  {
1463  ESXRecordT record2 = record.get();
1464 
1465  record2.mResponse = data.toString().toUtf8().constData();
1466 
1467  record.setModified (record2);
1468  }
1469 
1470  virtual bool isEditable() const
1471  {
1472  return true;
1473  }
1474  };
1475 
1476  template<typename ESXRecordT>
1477  struct QuestIndexColumn : public Column<ESXRecordT>
1478  {
1480  : Column<ESXRecordT> (Columns::ColumnId_QuestIndex, ColumnBase::Display_Integer)
1481  {}
1482 
1483  virtual QVariant get (const Record<ESXRecordT>& record) const
1484  {
1485  return record.get().mData.mDisposition;
1486  }
1487 
1488  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1489  {
1490  ESXRecordT record2 = record.get();
1491  record2.mData.mDisposition = data.toInt();
1492  record.setModified (record2);
1493  }
1494 
1495  virtual bool isEditable() const
1496  {
1497  return true;
1498  }
1499  };
1500 
1501  template<typename ESXRecordT>
1502  struct TopicColumn : public Column<ESXRecordT>
1503  {
1504  TopicColumn (bool journal)
1505  : Column<ESXRecordT> (journal ? Columns::ColumnId_Journal : Columns::ColumnId_Topic,
1507  {}
1508 
1509  virtual QVariant get (const Record<ESXRecordT>& record) const
1510  {
1511  return QString::fromUtf8 (record.get().mTopicId.c_str());
1512  }
1513 
1514  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1515  {
1516  ESXRecordT record2 = record.get();
1517 
1518  record2.mTopicId = data.toString().toUtf8().constData();
1519 
1520  record.setModified (record2);
1521  }
1522 
1523  virtual bool isEditable() const
1524  {
1525  return true;
1526  }
1527 
1528  virtual bool isUserEditable() const
1529  {
1530  return false;
1531  }
1532  };
1533 
1534  template<typename ESXRecordT>
1535  struct ActorColumn : public Column<ESXRecordT>
1536  {
1537  ActorColumn() : Column<ESXRecordT> (Columns::ColumnId_Actor, ColumnBase::Display_Npc) {}
1538 
1539  virtual QVariant get (const Record<ESXRecordT>& record) const
1540  {
1541  return QString::fromUtf8 (record.get().mActor.c_str());
1542  }
1543 
1544  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1545  {
1546  ESXRecordT record2 = record.get();
1547 
1548  record2.mActor = data.toString().toUtf8().constData();
1549 
1550  record.setModified (record2);
1551  }
1552 
1553  virtual bool isEditable() const
1554  {
1555  return true;
1556  }
1557  };
1558 
1559  template<typename ESXRecordT>
1560  struct RaceColumn : public Column<ESXRecordT>
1561  {
1562  RaceColumn() : Column<ESXRecordT> (Columns::ColumnId_Race, ColumnBase::Display_Race) {}
1563 
1564  virtual QVariant get (const Record<ESXRecordT>& record) const
1565  {
1566  return QString::fromUtf8 (record.get().mRace.c_str());
1567  }
1568 
1569  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1570  {
1571  ESXRecordT record2 = record.get();
1572 
1573  record2.mRace = data.toString().toUtf8().constData();
1574 
1575  record.setModified (record2);
1576  }
1577 
1578  virtual bool isEditable() const
1579  {
1580  return true;
1581  }
1582  };
1583 
1584  template<typename ESXRecordT>
1585  struct ClassColumn : public Column<ESXRecordT>
1586  {
1588 
1589  virtual QVariant get (const Record<ESXRecordT>& record) const
1590  {
1591  return QString::fromUtf8 (record.get().mClass.c_str());
1592  }
1593 
1594  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1595  {
1596  ESXRecordT record2 = record.get();
1597 
1598  record2.mClass = data.toString().toUtf8().constData();
1599 
1600  record.setModified (record2);
1601  }
1602 
1603  virtual bool isEditable() const
1604  {
1605  return true;
1606  }
1607  };
1608 
1609  template<typename ESXRecordT>
1610  struct PcFactionColumn : public Column<ESXRecordT>
1611  {
1613 
1614  virtual QVariant get (const Record<ESXRecordT>& record) const
1615  {
1616  return QString::fromUtf8 (record.get().mPcFaction.c_str());
1617  }
1618 
1619  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1620  {
1621  ESXRecordT record2 = record.get();
1622 
1623  record2.mPcFaction = data.toString().toUtf8().constData();
1624 
1625  record.setModified (record2);
1626  }
1627 
1628  virtual bool isEditable() const
1629  {
1630  return true;
1631  }
1632  };
1633 
1634  template<typename ESXRecordT>
1635  struct ResponseColumn : public Column<ESXRecordT>
1636  {
1638 
1639  virtual QVariant get (const Record<ESXRecordT>& record) const
1640  {
1641  return QString::fromUtf8 (record.get().mResponse.c_str());
1642  }
1643 
1644  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1645  {
1646  ESXRecordT record2 = record.get();
1647 
1648  record2.mResponse = data.toString().toUtf8().constData();
1649 
1650  record.setModified (record2);
1651  }
1652 
1653  virtual bool isEditable() const
1654  {
1655  return true;
1656  }
1657  };
1658 
1659  template<typename ESXRecordT>
1660  struct DispositionColumn : public Column<ESXRecordT>
1661  {
1663  : Column<ESXRecordT> (Columns::ColumnId_Disposition, ColumnBase::Display_Integer)
1664  {}
1665 
1666  virtual QVariant get (const Record<ESXRecordT>& record) const
1667  {
1668  return record.get().mData.mDisposition;
1669  }
1670 
1671  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1672  {
1673  ESXRecordT record2 = record.get();
1674  record2.mData.mDisposition = data.toInt();
1675  record.setModified (record2);
1676  }
1677 
1678  virtual bool isEditable() const
1679  {
1680  return true;
1681  }
1682  };
1683 
1684  template<typename ESXRecordT>
1685  struct RankColumn : public Column<ESXRecordT>
1686  {
1688  : Column<ESXRecordT> (Columns::ColumnId_Rank, ColumnBase::Display_Integer)
1689  {}
1690 
1691  virtual QVariant get (const Record<ESXRecordT>& record) const
1692  {
1693  return static_cast<int> (record.get().mData.mRank);
1694  }
1695 
1696  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1697  {
1698  ESXRecordT record2 = record.get();
1699  record2.mData.mRank = static_cast<signed char> (data.toInt());
1700  record.setModified (record2);
1701  }
1702 
1703  virtual bool isEditable() const
1704  {
1705  return true;
1706  }
1707  };
1708 
1709  template<typename ESXRecordT>
1710  struct PcRankColumn : public Column<ESXRecordT>
1711  {
1713  : Column<ESXRecordT> (Columns::ColumnId_PcRank, ColumnBase::Display_Integer)
1714  {}
1715 
1716  virtual QVariant get (const Record<ESXRecordT>& record) const
1717  {
1718  return static_cast<int> (record.get().mData.mPCrank);
1719  }
1720 
1721  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1722  {
1723  ESXRecordT record2 = record.get();
1724  record2.mData.mPCrank = static_cast<signed char> (data.toInt());
1725  record.setModified (record2);
1726  }
1727 
1728  virtual bool isEditable() const
1729  {
1730  return true;
1731  }
1732  };
1733 
1734  template<typename ESXRecordT>
1735  struct GenderColumn : public Column<ESXRecordT>
1736  {
1738  : Column<ESXRecordT> (Columns::ColumnId_Gender, ColumnBase::Display_Gender)
1739  {}
1740 
1741  virtual QVariant get (const Record<ESXRecordT>& record) const
1742  {
1743  return static_cast<int> (record.get().mData.mGender);
1744  }
1745 
1746  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1747  {
1748  ESXRecordT record2 = record.get();
1749 
1750  record2.mData.mGender = data.toInt();
1751 
1752  record.setModified (record2);
1753  }
1754 
1755  virtual bool isEditable() const
1756  {
1757  return true;
1758  }
1759  };
1760 
1761  template<typename ESXRecordT>
1762  struct EnchantmentTypeColumn : public Column<ESXRecordT>
1763  {
1766  {}
1767 
1768  virtual QVariant get (const Record<ESXRecordT>& record) const
1769  {
1770  return static_cast<int> (record.get().mData.mType);
1771  }
1772 
1773  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1774  {
1775  ESXRecordT record2 = record.get();
1776 
1777  record2.mData.mType = data.toInt();
1778 
1779  record.setModified (record2);
1780  }
1781 
1782  virtual bool isEditable() const
1783  {
1784  return true;
1785  }
1786  };
1787 
1788  template<typename ESXRecordT>
1789  struct ChargesColumn2 : public Column<ESXRecordT>
1790  {
1792 
1793  virtual QVariant get (const Record<ESXRecordT>& record) const
1794  {
1795  return record.get().mData.mCharge;
1796  }
1797 
1798  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1799  {
1800  ESXRecordT record2 = record.get();
1801  record2.mData.mCharge = data.toInt();
1802  record.setModified (record2);
1803  }
1804 
1805  virtual bool isEditable() const
1806  {
1807  return true;
1808  }
1809  };
1810 
1811  template<typename ESXRecordT>
1812  struct AutoCalcColumn : public Column<ESXRecordT>
1813  {
1815  {}
1816 
1817  virtual QVariant get (const Record<ESXRecordT>& record) const
1818  {
1819  return record.get().mData.mAutocalc!=0;
1820  }
1821 
1822  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1823  {
1824  ESXRecordT record2 = record.get();
1825 
1826  record2.mData.mAutocalc = data.toInt();
1827 
1828  record.setModified (record2);
1829  }
1830 
1831  virtual bool isEditable() const
1832  {
1833  return true;
1834  }
1835  };
1836 
1837  template<typename ESXRecordT>
1838  struct ModelColumn : public Column<ESXRecordT>
1839  {
1840  ModelColumn() : Column<ESXRecordT> (Columns::ColumnId_Model, ColumnBase::Display_Mesh) {}
1841 
1842  virtual QVariant get (const Record<ESXRecordT>& record) const
1843  {
1844  return QString::fromUtf8 (record.get().mModel.c_str());
1845  }
1846 
1847  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1848  {
1849  ESXRecordT record2 = record.get();
1850 
1851  record2.mModel = data.toString().toUtf8().constData();
1852 
1853  record.setModified (record2);
1854  }
1855 
1856  virtual bool isEditable() const
1857  {
1858  return true;
1859  }
1860  };
1861 
1862  template<typename ESXRecordT>
1863  struct VampireColumn : public Column<ESXRecordT>
1864  {
1866  {}
1867 
1868  virtual QVariant get (const Record<ESXRecordT>& record) const
1869  {
1870  return record.get().mData.mVampire!=0;
1871  }
1872 
1873  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1874  {
1875  ESXRecordT record2 = record.get();
1876 
1877  record2.mData.mVampire = data.toInt();
1878 
1879  record.setModified (record2);
1880  }
1881 
1882  virtual bool isEditable() const
1883  {
1884  return true;
1885  }
1886  };
1887 
1888  template<typename ESXRecordT>
1889  struct BodyPartTypeColumn : public Column<ESXRecordT>
1890  {
1892  : Column<ESXRecordT> (Columns::ColumnId_BodyPartType, ColumnBase::Display_BodyPartType)
1893  {}
1894 
1895  virtual QVariant get (const Record<ESXRecordT>& record) const
1896  {
1897  return static_cast<int> (record.get().mData.mPart);
1898  }
1899 
1900  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1901  {
1902  ESXRecordT record2 = record.get();
1903 
1904  record2.mData.mPart = data.toInt();
1905 
1906  record.setModified (record2);
1907  }
1908 
1909  virtual bool isEditable() const
1910  {
1911  return true;
1912  }
1913  };
1914 
1915  template<typename ESXRecordT>
1916  struct MeshTypeColumn : public Column<ESXRecordT>
1917  {
1919  : Column<ESXRecordT> (Columns::ColumnId_MeshType, ColumnBase::Display_MeshType, flags)
1920  {}
1921 
1922  virtual QVariant get (const Record<ESXRecordT>& record) const
1923  {
1924  return static_cast<int> (record.get().mData.mType);
1925  }
1926 
1927  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1928  {
1929  ESXRecordT record2 = record.get();
1930 
1931  record2.mData.mType = data.toInt();
1932 
1933  record.setModified (record2);
1934  }
1935 
1936  virtual bool isEditable() const
1937  {
1938  return true;
1939  }
1940  };
1941 
1942  template<typename ESXRecordT>
1943  struct OwnerGlobalColumn : public Column<ESXRecordT>
1944  {
1947  {}
1948 
1949  virtual QVariant get (const Record<ESXRecordT>& record) const
1950  {
1951  return QString::fromUtf8 (record.get().mGlobalVariable.c_str());
1952  }
1953 
1954  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1955  {
1956  ESXRecordT record2 = record.get();
1957 
1958  record2.mGlobalVariable = data.toString().toUtf8().constData();
1959 
1960  record.setModified (record2);
1961  }
1962 
1963  virtual bool isEditable() const
1964  {
1965  return true;
1966  }
1967  };
1968 
1969  template<typename ESXRecordT>
1970  struct RefNumCounterColumn : public Column<ESXRecordT>
1971  {
1973  : Column<ESXRecordT> (Columns::ColumnId_RefNumCounter, ColumnBase::Display_Integer, 0)
1974  {}
1975 
1976  virtual QVariant get (const Record<ESXRecordT>& record) const
1977  {
1978  return static_cast<int> (record.get().mRefNumCounter);
1979  }
1980 
1981  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
1982  {
1983  ESXRecordT record2 = record.get();
1984 
1985  record2.mRefNumCounter = data.toInt();
1986 
1987  record.setModified (record2);
1988  }
1989 
1990  virtual bool isEditable() const
1991  {
1992  return true;
1993  }
1994 
1995  virtual bool isUserEditable() const
1996  {
1997  return false;
1998  }
1999  };
2000 
2001  template<typename ESXRecordT>
2002  struct RefNumColumn : public Column<ESXRecordT>
2003  {
2005  : Column<ESXRecordT> (Columns::ColumnId_RefNum, ColumnBase::Display_Integer, 0)
2006  {}
2007 
2008  virtual QVariant get (const Record<ESXRecordT>& record) const
2009  {
2010  return static_cast<int> (record.get().mRefNum.mIndex);
2011  }
2012 
2013  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
2014  {
2015  ESXRecordT record2 = record.get();
2016 
2017  record2.mRefNum.mIndex = data.toInt();
2018 
2019  record.setModified (record2);
2020  }
2021 
2022  virtual bool isEditable() const
2023  {
2024  return true;
2025  }
2026 
2027  virtual bool isUserEditable() const
2028  {
2029  return false;
2030  }
2031  };
2032 
2033  template<typename ESXRecordT>
2034  struct SoundColumn : public Column<ESXRecordT>
2035  {
2037  : Column<ESXRecordT> (Columns::ColumnId_Sound, ColumnBase::Display_Sound)
2038  {}
2039 
2040  virtual QVariant get (const Record<ESXRecordT>& record) const
2041  {
2042  return QString::fromUtf8 (record.get().mSound.c_str());
2043  }
2044 
2045  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
2046  {
2047  ESXRecordT record2 = record.get();
2048 
2049  record2.mSound = data.toString().toUtf8().constData();
2050 
2051  record.setModified (record2);
2052  }
2053 
2054  virtual bool isEditable() const
2055  {
2056  return true;
2057  }
2058  };
2059 
2060  template<typename ESXRecordT>
2061  struct CreatureColumn : public Column<ESXRecordT>
2062  {
2064  : Column<ESXRecordT> (Columns::ColumnId_Creature, ColumnBase::Display_Creature)
2065  {}
2066 
2067  virtual QVariant get (const Record<ESXRecordT>& record) const
2068  {
2069  return QString::fromUtf8 (record.get().mCreature.c_str());
2070  }
2071 
2072  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
2073  {
2074  ESXRecordT record2 = record.get();
2075 
2076  record2.mCreature = data.toString().toUtf8().constData();
2077 
2078  record.setModified (record2);
2079  }
2080 
2081  virtual bool isEditable() const
2082  {
2083  return true;
2084  }
2085  };
2086 
2087  template<typename ESXRecordT>
2088  struct SoundGeneratorTypeColumn : public Column<ESXRecordT>
2089  {
2092  {}
2093 
2094  virtual QVariant get (const Record<ESXRecordT>& record) const
2095  {
2096  return static_cast<int> (record.get().mType);
2097  }
2098 
2099  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
2100  {
2101  ESXRecordT record2 = record.get();
2102 
2103  record2.mType = data.toInt();
2104 
2105  record.setModified (record2);
2106  }
2107 
2108  virtual bool isEditable() const
2109  {
2110  return true;
2111  }
2112  };
2113 
2114  template<typename ESXRecordT>
2115  struct BaseCostColumn : public Column<ESXRecordT>
2116  {
2118 
2119  virtual QVariant get (const Record<ESXRecordT>& record) const
2120  {
2121  return record.get().mData.mBaseCost;
2122  }
2123 
2124  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
2125  {
2126  ESXRecordT record2 = record.get();
2127  record2.mData.mBaseCost = data.toFloat();
2128  record.setModified (record2);
2129  }
2130 
2131  virtual bool isEditable() const
2132  {
2133  return true;
2134  }
2135  };
2136 
2137  template<typename ESXRecordT>
2138  struct SchoolColumn : public Column<ESXRecordT>
2139  {
2141  : Column<ESXRecordT> (Columns::ColumnId_School, ColumnBase::Display_School)
2142  {}
2143 
2144  virtual QVariant get (const Record<ESXRecordT>& record) const
2145  {
2146  return record.get().mData.mSchool;
2147  }
2148 
2149  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
2150  {
2151  ESXRecordT record2 = record.get();
2152 
2153  record2.mData.mSchool = data.toInt();
2154 
2155  record.setModified (record2);
2156  }
2157 
2158  virtual bool isEditable() const
2159  {
2160  return true;
2161  }
2162  };
2163 
2164  template<typename ESXRecordT>
2165  struct EffectTextureColumn : public Column<ESXRecordT>
2166  {
2168  : Column<ESXRecordT> (columnId,
2169  columnId == Columns::ColumnId_Particle ? ColumnBase::Display_Texture
2171  {
2172  assert (this->mColumnId==Columns::ColumnId_Icon ||
2174  }
2175 
2176  virtual QVariant get (const Record<ESXRecordT>& record) const
2177  {
2178  return QString::fromUtf8 (
2180  record.get().mIcon : record.get().mParticle).c_str());
2181  }
2182 
2183  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
2184  {
2185  ESXRecordT record2 = record.get();
2186 
2188  record2.mIcon : record2.mParticle)
2189  = data.toString().toUtf8().constData();
2190 
2191  record.setModified (record2);
2192  }
2193 
2194  virtual bool isEditable() const
2195  {
2196  return true;
2197  }
2198  };
2199 
2200  template<typename ESXRecordT>
2201  struct EffectObjectColumn : public Column<ESXRecordT>
2202  {
2204  : Column<ESXRecordT> (columnId, columnId==Columns::ColumnId_BoltObject ? ColumnBase::Display_Weapon : ColumnBase::Display_Static)
2205  {
2206  assert (this->mColumnId==Columns::ColumnId_CastingObject ||
2210  }
2211 
2212  virtual QVariant get (const Record<ESXRecordT>& record) const
2213  {
2214  const std::string *string = 0;
2215 
2216  switch (this->mColumnId)
2217  {
2218  case Columns::ColumnId_CastingObject: string = &record.get().mCasting; break;
2219  case Columns::ColumnId_HitObject: string = &record.get().mHit; break;
2220  case Columns::ColumnId_AreaObject: string = &record.get().mArea; break;
2221  case Columns::ColumnId_BoltObject: string = &record.get().mBolt; break;
2222  }
2223 
2224  if (!string)
2225  throw std::logic_error ("Unsupported column ID");
2226 
2227  return QString::fromUtf8 (string->c_str());
2228  }
2229 
2230  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
2231  {
2232  std::string *string = 0;
2233 
2234  ESXRecordT record2 = record.get();
2235 
2236  switch (this->mColumnId)
2237  {
2238  case Columns::ColumnId_CastingObject: string = &record2.mCasting; break;
2239  case Columns::ColumnId_HitObject: string = &record2.mHit; break;
2240  case Columns::ColumnId_AreaObject: string = &record2.mArea; break;
2241  case Columns::ColumnId_BoltObject: string = &record2.mBolt; break;
2242  }
2243 
2244  if (!string)
2245  throw std::logic_error ("Unsupported column ID");
2246 
2247  *string = data.toString().toUtf8().constData();
2248 
2249  record.setModified (record2);
2250  }
2251 
2252  virtual bool isEditable() const
2253  {
2254  return true;
2255  }
2256  };
2257 
2258  template<typename ESXRecordT>
2259  struct EffectSoundColumn : public Column<ESXRecordT>
2260  {
2262  : Column<ESXRecordT> (columnId, ColumnBase::Display_Sound)
2263  {
2264  assert (this->mColumnId==Columns::ColumnId_CastingSound ||
2268  }
2269 
2270  virtual QVariant get (const Record<ESXRecordT>& record) const
2271  {
2272  const std::string *string = 0;
2273 
2274  switch (this->mColumnId)
2275  {
2276  case Columns::ColumnId_CastingSound: string = &record.get().mCastSound; break;
2277  case Columns::ColumnId_HitSound: string = &record.get().mHitSound; break;
2278  case Columns::ColumnId_AreaSound: string = &record.get().mAreaSound; break;
2279  case Columns::ColumnId_BoltSound: string = &record.get().mBoltSound; break;
2280  }
2281 
2282  if (!string)
2283  throw std::logic_error ("Unsupported column ID");
2284 
2285  return QString::fromUtf8 (string->c_str());
2286  }
2287 
2288  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
2289  {
2290  std::string *string = 0;
2291 
2292  ESXRecordT record2 = record.get();
2293 
2294  switch (this->mColumnId)
2295  {
2296  case Columns::ColumnId_CastingSound: string = &record2.mCastSound; break;
2297  case Columns::ColumnId_HitSound: string = &record2.mHitSound; break;
2298  case Columns::ColumnId_AreaSound: string = &record2.mAreaSound; break;
2299  case Columns::ColumnId_BoltSound: string = &record2.mBoltSound; break;
2300  }
2301 
2302  if (!string)
2303  throw std::logic_error ("Unsupported column ID");
2304 
2305  *string = data.toString().toUtf8().constData();
2306 
2307  record.setModified (record2);
2308  }
2309 
2310  virtual bool isEditable() const
2311  {
2312  return true;
2313  }
2314  };
2315 
2316  template<typename ESXRecordT>
2317  struct FormatColumn : public Column<ESXRecordT>
2318  {
2320  : Column<ESXRecordT> (Columns::ColumnId_FileFormat, ColumnBase::Display_Integer)
2321  {}
2322 
2323  virtual QVariant get (const Record<ESXRecordT>& record) const
2324  {
2325  return record.get().mFormat;
2326  }
2327 
2328  virtual bool isEditable() const
2329  {
2330  return false;
2331  }
2332  };
2333 
2334  template<typename ESXRecordT>
2335  struct AuthorColumn : public Column<ESXRecordT>
2336  {
2338  : Column<ESXRecordT> (Columns::ColumnId_Author, ColumnBase::Display_String32)
2339  {}
2340 
2341  virtual QVariant get (const Record<ESXRecordT>& record) const
2342  {
2343  return QString::fromUtf8 (record.get().mAuthor.c_str());
2344  }
2345 
2346  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
2347  {
2348  ESXRecordT record2 = record.get();
2349 
2350  record2.mAuthor = data.toString().toUtf8().constData();
2351 
2352  record.setModified (record2);
2353  }
2354 
2355  virtual bool isEditable() const
2356  {
2357  return true;
2358  }
2359  };
2360 
2361  template<typename ESXRecordT>
2362  struct FileDescriptionColumn : public Column<ESXRecordT>
2363  {
2366  {}
2367 
2368  virtual QVariant get (const Record<ESXRecordT>& record) const
2369  {
2370  return QString::fromUtf8 (record.get().mDescription.c_str());
2371  }
2372 
2373  virtual void set (Record<ESXRecordT>& record, const QVariant& data)
2374  {
2375  ESXRecordT record2 = record.get();
2376 
2377  record2.mDescription = data.toString().toUtf8().constData();
2378 
2379  record.setModified (record2);
2380  }
2381 
2382  virtual bool isEditable() const
2383  {
2384  return true;
2385  }
2386  };
2387 
2388  struct BodyPartRaceColumn : public RaceColumn<ESM::BodyPart>
2389  {
2391 
2393 
2394  virtual QVariant get(const Record<ESM::BodyPart> &record) const;
2395  virtual void set(Record<ESM::BodyPart> &record, const QVariant &data);
2396  virtual bool isEditable() const;
2397  };
2398 }
2399 
2400 #endif
Definition: columnimp.hpp:207
Definition: columnimp.hpp:2201
TrapColumn()
Definition: columnimp.hpp:1276
Definition: columnimp.hpp:1477
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:860
Definition: columnimp.hpp:598
Definition: columns.hpp:34
StringIdColumn(bool hidden=false)
Definition: columnimp.hpp:49
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1079
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1488
Definition: columnimp.hpp:2034
virtual bool isEditable() const
Definition: columnimp.hpp:1782
Definition: columnimp.hpp:1970
Definition: columnbase.hpp:112
Definition: columnimp.hpp:1165
virtual bool isUserEditable() const
Can this column be edited directly by the user?
Definition: columnimp.hpp:2027
Definition: columnimp.hpp:597
virtual bool isEditable() const
Definition: columnimp.hpp:1061
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1102
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:695
Definition: columnbase.hpp:48
ChargesColumn2()
Definition: columnimp.hpp:1791
virtual bool isEditable() const
Definition: columnimp.hpp:1351
Definition: columns.hpp:168
bool mInverted
Definition: columnimp.hpp:472
virtual bool isEditable() const
Definition: columnimp.hpp:504
Definition: columnimp.hpp:469
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1746
PlayableColumn()
Definition: columnimp.hpp:420
SoundColumn()
Definition: columnimp.hpp:2036
Definition: columnbase.hpp:47
PcFactionColumn()
Definition: columnimp.hpp:1612
Definition: columns.hpp:30
virtual bool isEditable() const
Definition: columnimp.hpp:545
Definition: columnimp.hpp:1660
Definition: columns.hpp:362
VarValueColumn()
Definition: columnimp.hpp:147
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:624
virtual bool isEditable() const
Definition: columnimp.hpp:411
int mIndex
Definition: columnimp.hpp:1361
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1308
virtual bool isEditable() const
Definition: columnimp.hpp:1805
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:776
Definition: columns.hpp:209
Definition: columns.hpp:33
virtual bool isEditable() const
Definition: columnimp.hpp:785
QuestIndexColumn()
Definition: columnimp.hpp:1479
Definition: columnimp.hpp:912
virtual bool isEditable() const
Definition: columnimp.hpp:1856
Definition: columnbase.hpp:77
bool mBlocked
Definition: columnimp.hpp:878
Definition: columns.hpp:129
State mState
Definition: record.hpp:19
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:357
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:835
float pos[3]
Definition: defs.hpp:40
virtual bool isEditable() const
Definition: columnimp.hpp:1755
Definition: columnimp.hpp:792
virtual bool isEditable() const
Definition: columnimp.hpp:1578
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:171
Definition: columnbase.hpp:109
DialogueTypeColumn(bool hidden=false)
Definition: columnimp.hpp:1394
virtual bool isEditable() const
Definition: columnimp.hpp:437
SoundParamColumn(Type type)
Definition: columnimp.hpp:603
Definition: columnimp.hpp:552
Definition: columnimp.hpp:373
virtual bool isUserEditable() const
Can this column be edited directly by the user?
Definition: columnimp.hpp:1217
Definition: columnbase.hpp:113
Definition: columns.hpp:36
Definition: columns.hpp:128
virtual bool isEditable() const
Definition: columnimp.hpp:932
Definition: columnbase.hpp:104
Definition: columnimp.hpp:1093
LockLevelColumn()
Definition: columnimp.hpp:1226
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:573
virtual bool isEditable() const
Definition: columnimp.hpp:1445
Definition: columnbase.hpp:55
NameColumn()
Definition: columnimp.hpp:320
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:663
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1283
SoundFileColumn()
Definition: columnimp.hpp:654
Definition: columns.hpp:49
virtual bool isEditable() const
Definition: columnimp.hpp:2022
RefNumColumn()
Definition: columnimp.hpp:2004
SchoolColumn()
Definition: columnimp.hpp:2140
SpecialisationColumn()
Definition: columnimp.hpp:236
Definition: columnimp.hpp:511
virtual bool isEditable() const
Definition: columnimp.hpp:40
SoundGeneratorTypeColumn()
Definition: columnimp.hpp:2090
Definition: columnimp.hpp:944
PcRankColumn()
Definition: columnimp.hpp:1712
EffectObjectColumn(Columns::ColumnId columnId)
Definition: columnimp.hpp:2203
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1461
Definition: columns.hpp:207
Definition: columnimp.hpp:291
Definition: columns.hpp:165
virtual bool isEditable() const
Definition: columnimp.hpp:1011
Definition: columns.hpp:31
Definition: columnbase.hpp:42
Display
Definition: columnbase.hpp:39
Definition: columnimp.hpp:819
Definition: columnimp.hpp:24
Definition: columnbase.hpp:120
Definition: columnimp.hpp:1838
Definition: columnimp.hpp:2362
Definition: columns.hpp:44
virtual bool isEditable() const
Definition: columnimp.hpp:1653
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:245
QuestStatus
Definition: loadinfo.hpp:57
virtual bool isEditable() const
Definition: columnimp.hpp:2054
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1847
Definition: columnimp.hpp:876
Definition: columns.hpp:32
Definition: columns.hpp:22
virtual bool isEditable() const
Definition: columnimp.hpp:1470
Definition: columns.hpp:50
virtual bool isEditable() const
Definition: columnimp.hpp:1109
KeyColumn()
Definition: columnimp.hpp:1251
FlagColumn(int columnId, int mask, int flags=ColumnBase::Flag_Table|ColumnBase::Flag_Dialogue, bool inverted=false)
Definition: columnimp.hpp:474
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1696
TextureColumn()
Definition: columnimp.hpp:742
virtual bool isEditable() const
Definition: columnimp.hpp:1134
Definition: columnbase.hpp:107
virtual QVariant get(const Record< ESXRecordT > &record) const =0
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1514
Definition: columnbase.hpp:123
TeleportCellColumn()
Definition: columnimp.hpp:1194
Definition: columnimp.hpp:970
Definition: columnbase.hpp:95
ScaleColumn()
Definition: columnimp.hpp:972
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:2183
Definition: columnimp.hpp:234
Definition: columns.hpp:37
Definition: columnbase.hpp:91
virtual bool isEditable() const
Definition: columnimp.hpp:986
Definition: columnimp.hpp:2061
virtual bool isEditable() const
Definition: columnimp.hpp:1603
Definition: columnimp.hpp:261
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1544
Definition: columnimp.hpp:1863
virtual bool isUserEditable() const
Can this column be edited directly by the user?
Definition: columnimp.hpp:1418
CreatureColumn()
Definition: columnimp.hpp:2063
Definition: columnimp.hpp:1916
Definition: columns.hpp:167
HiddenColumn()
Definition: columnimp.hpp:446
virtual bool isEditable() const
Definition: columnimp.hpp:462
Definition: columnimp.hpp:1358
Definition: columnimp.hpp:1502
Definition: columnimp.hpp:652
Definition: columnimp.hpp:318
virtual bool isEditable() const
Definition: columnimp.hpp:1086
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:392
Definition: columnbase.hpp:33
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:2346
Definition: columnimp.hpp:2138
Definition: columnbase.hpp:49
virtual bool isEditable() const
Definition: columnimp.hpp:758
Definition: columns.hpp:28
Definition: columns.hpp:148
Definition: columnimp.hpp:1043
Definition: columnimp.hpp:1141
virtual bool isEditable() const
Definition: columnimp.hpp:2194
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:801
Definition: columnimp.hpp:596
int mMask
Definition: columnimp.hpp:513
FloatValueColumn()
Definition: columnimp.hpp:26
Definition: columns.hpp:158
Definition: columns.hpp:213
Definition: columnimp.hpp:765
virtual bool isEditable() const
Definition: columnimp.cpp:25
ESM::Position ESXRecordT::* mPosition
Definition: columnimp.hpp:1360
Definition: columns.hpp:163
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1619
Definition: columnbase.hpp:108
virtual bool isEditable() const
Definition: columnimp.hpp:1242
Definition: columnimp.hpp:713
Definition: columns.hpp:162
SpellTypeColumn()
Definition: columnimp.hpp:767
Definition: columnimp.hpp:1192
Definition: columns.hpp:180
State
Definition: record.hpp:10
ActorColumn()
Definition: columnimp.hpp:1537
Definition: columns.hpp:356
virtual bool isEditable() const
Definition: columnimp.hpp:1212
int mColumnId
Definition: columnbase.hpp:143
Definition: columnimp.hpp:2388
Definition: columnimp.hpp:1635
Definition: columns.hpp:307
virtual bool isEditable() const
Definition: columnimp.hpp:284
Definition: columnimp.hpp:97
Definition: columns.hpp:41
Definition: columnbase.hpp:78
bool mWeight
Definition: columnimp.hpp:555
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1981
Definition: columns.hpp:212
Definition: columns.hpp:211
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:749
Definition: columnimp.hpp:2317
RecordStateColumn()
Definition: columnimp.hpp:68
float mMale
Definition: loadrace.hpp:39
virtual bool isEditable() const
Definition: columnimp.hpp:366
Definition: columnbase.hpp:79
virtual bool isEditable() const
Definition: columnimp.hpp:1963
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:218
Definition: columnbase.hpp:74
Definition: columnimp.hpp:1585
Definition: columns.hpp:24
virtual bool isEditable() const
Definition: columnimp.hpp:311
Definition: columnimp.hpp:1889
FlagColumn2(int columnId, int mask, bool inverted=false)
Definition: columnimp.hpp:516
Definition: columns.hpp:53
Definition: columnimp.hpp:119
virtual bool isEditable() const
Definition: columnimp.hpp:2355
Definition: columns.hpp:178
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1127
Definition: columnimp.hpp:1685
PosColumn(ESM::Position ESXRecordT::*position, int index, bool door)
Definition: columnimp.hpp:1329
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1235
FileDescriptionColumn()
Definition: columnimp.hpp:2364
Definition: columnimp.hpp:2088
Definition: columnimp.hpp:343
Definition: nestedcolumnadapter.hpp:11
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1436
virtual bool isEditable() const
Definition: columnimp.hpp:1317
virtual bool isEditable() const
Definition: columnimp.hpp:1036
Definition: columnimp.hpp:1452
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:2288
ClassColumn()
Definition: columnimp.hpp:1587
virtual bool isEditable() const
Definition: columnimp.hpp:254
Definition: columnbase.hpp:185
Definition: columnimp.hpp:1116
virtual void set(Record< ESM::BodyPart > &record, const QVariant &data)
Definition: columnimp.cpp:16
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:490
Type
Definition: columnimp.hpp:817
Definition: columns.hpp:305
Definition: columns.hpp:205
int mType
Definition: columnimp.hpp:99
QuestStatusTypeColumn()
Definition: columnimp.hpp:1427
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:531
virtual bool isEditable() const
Definition: columnimp.hpp:200
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1594
Definition: columnimp.hpp:1425
virtual bool isEditable() const
Definition: columnimp.hpp:2382
virtual bool isEditable() const
Definition: columnimp.hpp:1831
FactionIndexColumn()
Definition: columnimp.hpp:1070
FormatColumn()
Definition: columnimp.hpp:2319
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1151
Definition: columnbase.hpp:71
Definition: columnbase.hpp:46
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1176
int mIndex
Definition: columnimp.hpp:345
DispositionColumn()
Definition: columnimp.hpp:1662
OwnerColumn()
Definition: columnimp.hpp:995
Definition: columns.hpp:164
CellColumn(bool blocked=false)
Definition: columnimp.hpp:881
Definition: columnimp.hpp:47
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:954
Definition: columns.hpp:208
virtual bool isEditable() const
Definition: columnimp.hpp:1703
Definition: columnbase.hpp:63
Definition: columnimp.hpp:145
virtual bool isEditable() const
Definition: columnimp.hpp:1882
bool mMale
Definition: columnimp.hpp:554
Definition: columns.hpp:19
Definition: columnimp.hpp:1710
Definition: columnimp.hpp:2259
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:327
RankColumn()
Definition: columnimp.hpp:1687
Definition: columnimp.hpp:444
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1721
RegionColumn()
Definition: columnimp.hpp:853
Definition: columns.hpp:45
Definition: variant.hpp:18
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1340
UseValueColumn(int index)
Definition: columnimp.hpp:265
AuthorColumn()
Definition: columnimp.hpp:2337
EffectSoundColumn(Columns::ColumnId columnId)
Definition: columnimp.hpp:2261
Definition: columns.hpp:25
virtual bool isEditable() const
Definition: columnimp.hpp:336
virtual bool isEditable() const
Definition: columnimp.hpp:585
Definition: columns.hpp:64
Definition: columns.hpp:62
int mIndex
Definition: columnimp.hpp:375
Definition: columnimp.hpp:681
Definition: columns.hpp:336
Definition: columnbase.hpp:110
Definition: columns.hpp:18
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:724
virtual bool isEditable() const
Definition: columnimp.hpp:1267
Definition: columnbase.hpp:70
Definition: columns.hpp:40
float mFemale
Definition: loadrace.hpp:39
Definition: columnbase.hpp:115
Definition: columns.hpp:54
Type mType
Definition: columnimp.hpp:601
RotColumn(ESM::Position ESXRecordT::*position, int index, bool door)
Definition: columnimp.hpp:1363
virtual bool isUserEditable() const
Can this column be edited directly by the user?
Definition: columnimp.hpp:1995
Definition: columnimp.hpp:1610
virtual bool isEditable() const
Definition: columnimp.hpp:1553
virtual bool isEditable() const
Definition: columnimp.hpp:844
Definition: columns.hpp:144
Definition: columns.hpp:56
virtual bool isEditable() const
Definition: columnimp.hpp:2158
Definition: columnimp.hpp:66
EffectTextureColumn(Columns::ColumnId columnId)
Definition: columnimp.hpp:2167
Definition: columnimp.hpp:2335
DescriptionColumn()
Definition: columnimp.hpp:209
SoulColumn()
Definition: columnimp.hpp:1020
virtual bool isEditable() const
Definition: columnimp.hpp:869
Definition: columns.hpp:199
virtual bool isEditable() const
Definition: columnimp.hpp:672
Definition: columnbase.hpp:54
Definition: columnimp.hpp:1018
Definition: columns.hpp:344
ScriptColumn(Type type)
Definition: columnimp.hpp:824
Definition: columns.hpp:198
virtual bool isEditable() const
Definition: columnimp.hpp:1385
Definition: columnbase.hpp:133
Definition: columns.hpp:39
Definition: columns.hpp:179
Definition: variant.hpp:16
virtual bool isEditable() const
Definition: columnimp.hpp:808
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1873
virtual bool isEditable() const
Definition: columnimp.hpp:733
virtual bool isUserEditable() const
Can this column be edited directly by the user?
Definition: columnimp.hpp:937
virtual bool isEditable() const
Definition: columnimp.hpp:1990
FactionColumn()
Definition: columnimp.hpp:1045
Definition: columnimp.hpp:820
BodyPartRaceColumn(const MeshTypeColumn< ESM::BodyPart > *meshType)
Definition: columnimp.cpp:3
Definition: columns.hpp:20
Definition: columnbase.hpp:122
Definition: columnimp.hpp:1224
virtual bool isEditable() const
Definition: columnimp.hpp:1292
VarTypeColumn(ColumnBase::Display display)
Definition: columnimp.hpp:121
Definition: columnbase.hpp:111
int mMask
Definition: columnimp.hpp:471
virtual bool isEditable() const
Definition: columnimp.hpp:1158
bool mInverted
Definition: columnimp.hpp:514
virtual bool isEditable() const
Definition: columnimp.hpp:2131
GenderColumn()
Definition: columnimp.hpp:1737
const ESXRecordT & get() const
Throws an exception, if the record is deleted.
Definition: record.hpp:106
Definition: columnbase.hpp:89
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:275
const MeshTypeColumn< ESM::BodyPart > * mMeshType
Definition: columnimp.hpp:2390
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1773
ESM::Position ESXRecordT::* mPosition
Definition: columnimp.hpp:1326
Definition: columns.hpp:193
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1203
Definition: columns.hpp:157
OwnerGlobalColumn()
Definition: columnimp.hpp:1945
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1671
virtual bool isEditable() const
Definition: columnimp.hpp:1728
Definition: columnimp.hpp:1392
Definition: columnimp.hpp:1560
WeightHeightColumn(bool male, bool weight)
Definition: columnimp.hpp:557
Definition: columnimp.hpp:1249
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:2373
MapColourColumn()
Definition: columnimp.hpp:684
Definition: columns.hpp:204
Definition: columns.hpp:117
Definition: columnimp.hpp:1789
Definition: columns.hpp:48
Definition: loadrace.hpp:37
OriginalCellColumn()
Definition: columnimp.hpp:914
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:2072
virtual bool isEditable() const
Definition: columnimp.hpp:706
Definition: defs.hpp:38
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:2230
TeleportColumn()
Definition: columnimp.hpp:1167
Definition: columnbase.hpp:15
Definition: columns.hpp:273
virtual bool isEditable() const
Definition: columnimp.hpp:1523
Definition: columns.hpp:52
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:2099
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1927
Definition: columnimp.hpp:1762
Definition: variant.hpp:20
void setModified(const ESXRecordT &modified)
Throws an exception, if the record is deleted.
Definition: record.hpp:133
AttributeColumn()
Definition: columnimp.hpp:293
virtual bool isUserEditable() const
Can this column be edited directly by the user?
Definition: columnimp.hpp:1528
Definition: columns.hpp:42
virtual bool isEditable() const
Definition: columnimp.hpp:2108
Definition: columnbase.hpp:116
virtual bool isEditable() const
Definition: columnimp.hpp:1185
Definition: columnimp.hpp:993
virtual bool isUserEditable() const
Can this column be edited directly by the user?
Definition: columnimp.hpp:90
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:2149
IdColumn()
Definition: columnimp.hpp:946
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1569
RefNumCounterColumn()
Definition: columnimp.hpp:1972
Definition: columnbase.hpp:75
EnchantmentChargesColumn()
Definition: columnimp.hpp:1118
Definition: columns.hpp:38
SkillsColumn(int index, bool typePrefix=false, bool major=false)
Definition: columnimp.hpp:378
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1002
ColumnId
Definition: columns.hpp:13
RaceColumn()
Definition: columnimp.hpp:1562
virtual bool isEditable() const
Definition: columnimp.hpp:111
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:302
Definition: columnimp.hpp:1274
Definition: columnbase.hpp:43
Definition: variant.hpp:19
virtual bool isEditable() const
Definition: columnimp.hpp:137
Definition: columnbase.hpp:106
Definition: columnbase.hpp:119
int mIndex
Definition: columnimp.hpp:1327
Definition: columnbase.hpp:97
Definition: columns.hpp:47
static std::string indexToId(int index)
Definition: loadskil.cpp:183
Definition: columnimp.hpp:740
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1822
virtual bool isEditable() const
Definition: columnimp.hpp:2081
virtual bool isEditable() const
Definition: columnimp.hpp:1909
float rot[3]
Definition: defs.hpp:43
Definition: columnbase.hpp:51
virtual bool isEditable() const
Definition: columnimp.hpp:1495
Definition: columns.hpp:203
AttributesColumn(int index)
Definition: columnimp.hpp:347
Definition: columns.hpp:169
VampireColumn()
Definition: columnimp.hpp:1865
BodyPartTypeColumn()
Definition: columnimp.hpp:1891
Definition: columns.hpp:26
Definition: columnimp.hpp:1943
Definition: columns.hpp:210
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:2045
virtual bool isEditable() const
Definition: columnimp.hpp:59
ModelColumn()
Definition: columnimp.hpp:1840
ChargesColumn()
Definition: columnimp.hpp:1095
virtual bool isEditable() const
Definition: columnimp.hpp:227
virtual bool isUserEditable() const
Can this column be edited directly by the user?
Definition: columnimp.hpp:905
AutoCalcColumn()
Definition: columnimp.hpp:1814
Definition: columnbase.hpp:96
Definition: columnbase.hpp:34
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1052
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:923
EnchantmentTypeColumn()
Definition: columnimp.hpp:1764
CostColumn()
Definition: columnimp.hpp:794
Definition: columns.hpp:350
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1900
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1798
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1027
ResponseColumn()
Definition: columnimp.hpp:1637
Definition: columnimp.hpp:2115
virtual bool isEditable() const
Definition: columnimp.hpp:85
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:2013
TopicColumn(bool journal)
Definition: columnimp.hpp:1504
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:80
virtual bool isEditable() const
Definition: columnimp.hpp:1413
Definition: columns.hpp:15
int mIndex
Definition: columnimp.hpp:263
Definition: variant.hpp:17
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:891
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1954
Definition: columnimp.hpp:815
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:453
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1258
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:2124
virtual bool isEditable() const
Definition: columnimp.hpp:2252
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1404
Definition: columnimp.hpp:2165
Definition: columnimp.hpp:418
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1374
Definition: columns.hpp:23
Definition: columnbase.hpp:90
Definition: columnimp.hpp:1299
GoldValueColumn()
Definition: columnimp.hpp:1143
Definition: columnimp.hpp:1535
virtual bool isEditable() const
Definition: columnimp.hpp:2328
Definition: columnbase.hpp:132
Definition: columnimp.hpp:1324
virtual bool isEditable() const
Definition: columnimp.hpp:2310
Definition: columnimp.hpp:1068
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:130
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:1644
Definition: columnimp.hpp:1735
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:33
virtual bool isEditable() const
Definition: columnimp.hpp:645
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:979
bool mMajor
Definition: columnimp.hpp:376
Definition: columnimp.hpp:2002
SleepListColumn()
Definition: columnimp.hpp:715
virtual void set(Record< ESXRecordT > &record, const QVariant &data)
Definition: columnimp.hpp:428
FixedRecordTypeColumn(int type)
Definition: columnimp.hpp:101
QuestDescriptionColumn()
Definition: columnimp.hpp:1454
Definition: columns.hpp:16
virtual bool isEditable() const
Definition: columnimp.hpp:900
virtual bool isEditable() const
Definition: columnimp.hpp:963
Definition: columnimp.hpp:821
Definition: columns.hpp:161
Definition: columnimp.hpp:592
virtual bool isEditable() const
Definition: columnimp.hpp:1936
Definition: columnbase.hpp:50
Definition: columnbase.hpp:53
Definition: columns.hpp:166
Definition: columnimp.hpp:1812
Definition: columns.hpp:43
Definition: columnbase.hpp:118
FilterColumn()
Definition: columnimp.hpp:1301
Definition: columnimp.hpp:851
virtual bool isEditable() const
Definition: columnimp.hpp:1678
virtual bool isEditable() const
Definition: columnimp.hpp:1628
Definition: columns.hpp:145
MeshTypeColumn(int flags=ColumnBase::Flag_Table|ColumnBase::Flag_Dialogue)
Definition: columnimp.hpp:1918
BaseCostColumn()
Definition: columnimp.hpp:2117
Type
Definition: columnimp.hpp:594