summaryrefslogtreecommitdiff
path: root/src/study/IStudyModel.h
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
committerJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
commitd24f813f3f2a05c112e803e4256b53535895fc98 (patch)
tree601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /src/study/IStudyModel.h
Initial mirror commitHEADmaster
Diffstat (limited to 'src/study/IStudyModel.h')
-rw-r--r--src/study/IStudyModel.h35
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