| 1 | /*************************************************************************** |
| 2 | grainmodel.h |
| 3 | ------------------- |
| 4 | Grain model |
| 5 | ------------------- |
| 6 | Copyright 2006-2008, David Johnson |
| 7 | All rights reserved. |
| 8 | |
| 9 | Redistribution and use in source and binary forms, with or without |
| 10 | modification, are permitted provided that the following conditions |
| 11 | are met: |
| 12 | |
| 13 | 1. Redistributions of source code must retain the above copyright |
| 14 | notice, this list of conditions and the following disclaimer. |
| 15 | |
| 16 | 2. Redistributions in binary form must reproduce the above copyright |
| 17 | notice, this list of conditions and the following disclaimer in the |
| 18 | documentation and/or other materials provided with the distribution. |
| 19 | |
| 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 24 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 | ***************************************************************************/ |
| 32 | |
| 33 | #ifndef GRAINMODEL_H |
| 34 | #define GRAINMODEL_Hcxx . . $ `src/grainmodel.h:34:9`! |
| 35 | |
| 36 | #include <QAbstractTableModel> |
| 37 | #include <QModelIndex> |
| 38 | #include <QVariant> |
| 39 | |
| 40 | #include "grain.h"cxx . . $ `<file>/src/grain.h`/ |
| 41 | |
| 42 | class GrainModelcxx . . $ GrainModel# : public QAbstractTableModelcxx . . $ QAbstractTableModel# { |
| 43 | Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`! |
| 44 | public: |
| 45 | // model columns |
| 46 | enumcxx . . $ GrainModel#$anonymous_type_0# { NAMEcxx . . $ GrainModel#NAME., WEIGHTcxx . . $ GrainModel#WEIGHT., EXTRACTcxx . . $ GrainModel#EXTRACT., COLORcxx . . $ GrainModel#COLOR., TYPEcxx . . $ GrainModel#TYPE., USEcxx . . $ GrainModel#USE., COUNTcxx . . $ GrainModel#COUNT. }; |
| 47 | |
| 48 | GrainModelcxx . . $ GrainModel#GrainModel(25815c0855af4671).(QObjectcxx . . $ QObject# *parent, GrainListcxx . . $ GrainList# *list); |
| 49 | ~cxx . . $ GrainModel#`~GrainModel`(ced63f7c635d850d).GrainModelcxx . . $ GrainModel#(); |
| 50 | |
| 51 | QVariantcxx . . $ QVariant# datacxx . . $ GrainModel#data(69b5b18a001c0029).(const QModelIndexcxx . . $ QModelIndex# &index, int role) const; |
| 52 | bool setDatacxx . . $ GrainModel#setData(6d1d8401440d0a2c).(const QModelIndexcxx . . $ QModelIndex# &index, const QVariantcxx . . $ QVariant# &value, |
| 53 | int role = Qtcxx . . $ Qt/::EditRolecxx . . $ Qt/EditRole.); |
| 54 | Qtcxx . . $ Qt/::ItemFlagscxx . . $ Qt/ItemFlags# flagscxx . . $ GrainModel#flags(36b38c1b3d3f7b45).(const QModelIndexcxx . . $ QModelIndex# &index) const; |
| 55 | QVariantcxx . . $ QVariant# headerDatacxx . . $ GrainModel#headerData(b8cfec0985494997).(int section, Qtcxx . . $ Qt/::Orientationcxx . . $ Qt/Orientation# orientation, |
| 56 | int role = Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.) const; |
| 57 | bool insertRowscxx . . $ GrainModel#insertRows(c4e00837c4ba3150).(int row, int count, |
| 58 | const QModelIndexcxx . . $ QModelIndex# & parent = QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).()); |
| 59 | bool removeRowscxx . . $ GrainModel#removeRows(c4e00837c4ba3150).(int row, int count, |
| 60 | const QModelIndexcxx . . $ QModelIndex# &parent = QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).()); |
| 61 | int rowCountcxx . . $ GrainModel#rowCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &parent = QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).()) const; |
| 62 | int columnCountcxx . . $ GrainModel#columnCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &parent = QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).()) const; |
| 63 | |
| 64 | void sortcxx . . $ GrainModel#sort(11168df8d4e8286d).(int column, Qtcxx . . $ Qt/::SortOrdercxx . . $ Qt/SortOrder# order = Qtcxx . . $ Qt/::AscendingOrdercxx . . $ Qt/AscendingOrder.); |
| 65 | |
| 66 | void flushcxx . . $ GrainModel#flush(49f6e7a06ebc5aa8).(); |
| 67 | |
| 68 | signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!: |
| 69 | void modifiedcxx . . $ GrainModel#modified(49f6e7a06ebc5aa8).(); |
| 70 | |
| 71 | private: |
| 72 | GrainListcxx . . $ GrainList# *list_cxx . . $ GrainModel#list_.; |
| 73 | }; |
| 74 | |
| 75 | #endif // GRAINMODEL_H |