LibKEduVocDocument

keduvoclesson.h
1/*
2 * SPDX-FileCopyrightText: 2007 Jeremy Whiting <jpwhiting@kde.org>
3 * SPDX-FileCopyrightText: 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KEDUVOCLESSON_H
8#define KEDUVOCLESSON_H
9
10#include "keduvocdocument_export.h"
11
12#include "keduvoccontainer.h"
13
15
16/** class to store information about a lesson */
17class KEDUVOCDOCUMENT_EXPORT KEduVocLesson : public KEduVocContainer
18{
19public:
20 /** default constructor */
21 explicit KEduVocLesson(const QString &name, KEduVocContainer *parent = nullptr);
22
23 // void appendChildLesson(KEduVocLesson *child);
24
25 // QList<KEduVocLesson *> childLessons();
26 // KEduVocLesson *childLesson(int row);
27
28 // int childLessonCount() const;
29
30 // int row() const;
31 // KEduVocLesson *parent();
32
33 /** copy constructor for d-pointer safe copying */
34 KEduVocLesson(const KEduVocLesson &other);
35
36 /** destructor */
37 ~KEduVocLesson() override;
38
39 /** assignment operator */
41
42 KEduVocExpression *entry(int row, EnumEntriesRecursive recursive = NotRecursive) Q_DECL_OVERRIDE;
43
44 /** get a list of all entries in the lesson */
45 QList<KEduVocExpression *> entries(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
50 /** append an entry to the lesson
51 * @param entry the id of the entry to add
52 */
53 void appendEntry(KEduVocExpression *entry);
54
55 /**
56 * insert an entry at a specific position
57 * @param index
58 * @param entry
59 */
60 void insertEntry(int index, KEduVocExpression *entry);
61
62 /** remove an entry from the lesson
63 * @param entry the id of the entry to remove
64 */
65 void removeEntry(KEduVocExpression *entry);
66
67private:
68 friend class KEduVocDocument;
69 // This constructor is used by KEduVocDocument when creating the top level lesson.
70 explicit KEduVocLesson(const QString &name, KEduVocDocument *document);
71
72private:
73 class Private;
74 Private *const d;
75};
76
77#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
The primary entry point to the hierarchy of objects describing vocabularies.
This class contains one vocabulary expression as an original with one or more translations.
class to store information about a lesson
KEduVocLesson & operator=(const KEduVocLesson &)
assignment operator
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:06:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.