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
virtual QList< KEduVocExpression * > entries(EnumEntriesRecursive recursive=NotRecursive)=0
get a list of all entries in the container
void removeTranslation(int translation)
Removes a translation.
QString name()
get the container name
KEduVocContainer(const QString &name, EnumContainerType type, KEduVocContainer *parent=nullptr)
default constructor
This class contains one vocabulary expression as an original with one or more translations.
int entryCount(EnumEntriesRecursive recursive=NotRecursive) override
get the number of entries in the lesson
KEduVocTranslation * translation(int row)
The leitner box class keeps track of individual translations, because for one entry,...
KEduVocLeitnerBox(const QString &name, KEduVocLeitnerBox *parent=nullptr)
default constructor
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:20 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.