From d24f813f3f2a05c112e803e4256b53535895fc98 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Wed, 14 Jul 2021 11:49:10 +1200 Subject: Initial mirror commit --- src/study/IStudyModel.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/study/IStudyModel.h (limited to 'src/study/IStudyModel.h') 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 + +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 -- cgit