diff options
Diffstat (limited to 'src/study/IStudyModel.h')
-rw-r--r-- | src/study/IStudyModel.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/study/IStudyModel.h b/src/study/IStudyModel.h new file mode 100644 index 0000000..392ef01 --- /dev/null +++ b/src/study/IStudyModel.h @@ -0,0 +1,35 @@ +#ifndef ISTUDYMODEL_H +#define ISTUDYMODEL_H + +#include <QObject> + +class Card; +class CardPack; +class DictTableModel; + +class IStudyModel: public QObject +{ +Q_OBJECT + +public: + IStudyModel( CardPack* aCardPack ); + virtual ~IStudyModel() {} + +public: + CardPack* getCardPack() { return cardPack; } + virtual Card* getCurCard() const = 0; + DictTableModel* getDictModel() const { return dictModel; } + + void setDictModel( DictTableModel* aModel ) { dictModel = aModel; } + +signals: + void nextCardSelected(); + void curCardUpdated(); + +protected: + CardPack* cardPack; + DictTableModel* dictModel; + int curCardNum; ///< Number of the current card in this session, base=0. +}; + +#endif |