00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef ANTHYDICMODEL_H
00022 #define ANTHYDICMODEL_H
00023
00024 #include <QAbstractTableModel>
00025
00026 class AnthyDicModel : public QAbstractTableModel
00027 {
00028 Q_OBJECT
00029 public:
00030 enum Field {
00031 Sound,
00032 Spelling,
00033 WordType,
00034 Frequency,
00035 Count,
00036 };
00037 AnthyDicModel(QObject *parent = 0);
00038 ~AnthyDicModel();
00039
00040 void save();
00041
00042 int rowCount(const QModelIndex &parent = QModelIndex()) const;
00043 int columnCount(const QModelIndex &parent = QModelIndex()) const;
00044 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
00045 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
00046
00047 bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
00048 bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
00049
00050 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
00051 private:
00052 class Private;
00053 Private *d;
00054 };
00055
00056 #endif // ANTHYDICMODEL_H