LibKEduVocDocument

keduvocleitnerbox.h
1/*
2 * SPDX-FileCopyrightText: 2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 */
5
6#ifndef KEDUVOCLEITNERBOX_H
7#define KEDUVOCLEITNERBOX_H
8
9#include "keduvocdocument_export.h"
10
11#include "keduvoccontainer.h"
12
13#include <QList>
14#include <QString>
15
18
19/**
20 * Leitner Boxes are an alternative grading system.
21 * Classically flash cards are kept in boxes and moved corresponding to the users knowledge level.
22 */
23class KEDUVOCDOCUMENT_EXPORT KEduVocLeitnerBox : public KEduVocContainer
24{
25public:
26 /** default constructor */
27 explicit KEduVocLeitnerBox(const QString &name, KEduVocLeitnerBox *parent = nullptr);
28
29 /** destructor */
30 ~KEduVocLeitnerBox() override;
31
32 /**
33 * The leitner box class keeps track of individual translations, because for one entry, the translations can have different grades.
34 * @param row
35 * @return
36 */
37 KEduVocTranslation *translation(int row);
38
39 /**
40 * get a list of all entries in the box
41 * @return
42 */
43 QList<KEduVocExpression *> entries(EnumEntriesRecursive recursive = NotRecursive) Q_DECL_OVERRIDE;
44
45 KEduVocExpression *entry(int row, EnumEntriesRecursive recursive = NotRecursive) Q_DECL_OVERRIDE;
46
47 /** get the number of entries in the lesson */
48 int entryCount(EnumEntriesRecursive recursive = NotRecursive) Q_DECL_OVERRIDE;
49
50private:
51 class Private;
52 Private *const d;
53
54 /** add an entry to the lesson
55 * @param entryid id of the entry to add
56 */
57 void addTranslation(KEduVocTranslation *translation);
58
59 /** remove an entry from the lesson
60 * @param entryid id of the entry to remove
61 */
62 void removeTranslation(KEduVocTranslation *translation);
63
64 friend class KEduVocTranslation;
65};
66
67#endif
class to store information about a container - that can be a lesson or word types
virtual QList< KEduVocExpression * > entries(EnumEntriesRecursive recursive=NotRecursive)=0
get a list of all entries in the container
void removeTranslation(int translation)
Removes a translation.
This class contains one vocabulary expression as an original with one or more translations.
Leitner Boxes are an alternative grading system.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.