KEduVocContainer

Search for usage in LXR

#include <keduvoccontainer.h>

Inheritance diagram for KEduVocContainer:

Public Types

enum  EnumContainerType { Container , Lesson , WordType , Leitner }
 
enum  EnumEntriesRecursive { NotRecursive = 0 , Recursive = 1 }
 

Public Member Functions

 KEduVocContainer (const KEduVocContainer &other)
 
 KEduVocContainer (const QString &name, EnumContainerType type, KEduVocContainer *parent=nullptr)
 
virtual ~KEduVocContainer ()
 
void appendChildContainer (KEduVocContainer *child)
 
double averageGrade (int translation, EnumEntriesRecursive recursive)
 
KEduVocContainerchildContainer (const QString &name)
 
KEduVocContainerchildContainer (int row)
 
int childContainerCount () const
 
QList< KEduVocContainer * > childContainers ()
 
KEduVocContainer::EnumContainerType containerType ()
 
void deleteChildContainer (int row)
 
KEduVocDocumentdocument () const
 
virtual QList< KEduVocExpression * > entries (EnumEntriesRecursive recursive=NotRecursive)=0
 
virtual KEduVocExpressionentry (int row, EnumEntriesRecursive recursive=NotRecursive)=0
 
virtual int entryCount (EnumEntriesRecursive recursive=NotRecursive)=0
 
int expressionsOfGrade (int translation, grade_t grade, EnumEntriesRecursive recursive)
 
QUrl imageUrl ()
 
bool inPractice ()
 
void insertChildContainer (int row, KEduVocContainer *child)
 
QString name ()
 
KEduVocContaineroperator= (const KEduVocContainer &)
 
bool operator== (const KEduVocContainer &other) const
 
virtual KEduVocContainerparent ()
 
void removeChildContainer (int row)
 
void removeTranslation (int translation)
 
void resetGrades (int translation, EnumEntriesRecursive recursive)
 
int row () const
 
void setContainerType (KEduVocContainer::EnumContainerType type)
 
void setImageUrl (const QUrl &url)
 
void setInPractice (bool inPractice)
 
void setName (const QString &name)
 

Protected Member Functions

 KEduVocContainer (const QString &name, EnumContainerType type, KEduVocDocument *document)
 
QList< KEduVocExpression * > entriesRecursive ()
 
void invalidateChildLessonEntries ()
 
void updateChildLessonEntries ()
 

Detailed Description

class to store information about a container - that can be a lesson or word types

Definition at line 21 of file keduvoccontainer.h.

Member Enumeration Documentation

◆ EnumContainerType

enum KEduVocContainer::EnumContainerType

Definition at line 26 of file keduvoccontainer.h.

◆ EnumEntriesRecursive

enum KEduVocContainer::EnumEntriesRecursive

Definition at line 33 of file keduvoccontainer.h.

Constructor & Destructor Documentation

◆ KEduVocContainer() [1/3]

KEduVocContainer::KEduVocContainer ( const QString & name,
EnumContainerType type,
KEduVocContainer * parent = nullptr )
explicit

default constructor

Definition at line 61 of file keduvoccontainer.cpp.

◆ KEduVocContainer() [2/3]

KEduVocContainer::KEduVocContainer ( const KEduVocContainer & other)

copy constructor for d-pointer safe copying

Definition at line 73 of file keduvoccontainer.cpp.

◆ ~KEduVocContainer()

KEduVocContainer::~KEduVocContainer ( )
virtual

destructor

Definition at line 83 of file keduvoccontainer.cpp.

◆ KEduVocContainer() [3/3]

KEduVocContainer::KEduVocContainer ( const QString & name,
EnumContainerType type,
KEduVocDocument * document )
explicitprotected

Definition at line 49 of file keduvoccontainer.cpp.

Member Function Documentation

◆ appendChildContainer()

void KEduVocContainer::appendChildContainer ( KEduVocContainer * child)

Definition at line 99 of file keduvoccontainer.cpp.

◆ averageGrade()

double KEduVocContainer::averageGrade ( int translation,
EnumEntriesRecursive recursive )

Definition at line 266 of file keduvoccontainer.cpp.

◆ childContainer() [1/2]

KEduVocContainer * KEduVocContainer::childContainer ( const QString & name)

Retrieve a child container by its name Returns 0 if no container is found.

Parameters
namecontainer name
Returns
the child container

Definition at line 112 of file keduvoccontainer.cpp.

◆ childContainer() [2/2]

KEduVocContainer * KEduVocContainer::childContainer ( int row)

Definition at line 107 of file keduvoccontainer.cpp.

◆ childContainerCount()

int KEduVocContainer::childContainerCount ( ) const

Find a child container.

Parameters
name
Returns

Definition at line 141 of file keduvoccontainer.cpp.

◆ childContainers()

QList< KEduVocContainer * > KEduVocContainer::childContainers ( )

Definition at line 207 of file keduvoccontainer.cpp.

◆ containerType()

KEduVocContainer::EnumContainerType KEduVocContainer::containerType ( )

The type of this container.

See also
EnumContainerType
Returns

Definition at line 222 of file keduvoccontainer.cpp.

◆ deleteChildContainer()

void KEduVocContainer::deleteChildContainer ( int row)

Definition at line 127 of file keduvoccontainer.cpp.

◆ document()

KEduVocDocument * KEduVocContainer::document ( ) const
Returns
the containing KEduVocDocument

Definition at line 88 of file keduvoccontainer.cpp.

◆ entries()

virtual QList< KEduVocExpression * > KEduVocContainer::entries ( EnumEntriesRecursive recursive = NotRecursive)
pure virtual

get a list of all entries in the container

Implemented in KEduVocLeitnerBox, KEduVocLesson, and KEduVocWordType.

◆ entriesRecursive()

QList< KEduVocExpression * > KEduVocContainer::entriesRecursive ( )
protected

Definition at line 199 of file keduvoccontainer.cpp.

◆ entryCount()

virtual int KEduVocContainer::entryCount ( EnumEntriesRecursive recursive = NotRecursive)
pure virtual

◆ expressionsOfGrade()

int KEduVocContainer::expressionsOfGrade ( int translation,
grade_t grade,
EnumEntriesRecursive recursive )

Definition at line 286 of file keduvoccontainer.cpp.

◆ imageUrl()

QUrl KEduVocContainer::imageUrl ( )

get the image url for this container if it exists

Definition at line 227 of file keduvoccontainer.cpp.

◆ inPractice()

bool KEduVocContainer::inPractice ( )

Definition at line 178 of file keduvoccontainer.cpp.

◆ insertChildContainer()

void KEduVocContainer::insertChildContainer ( int row,
KEduVocContainer * child )

Definition at line 237 of file keduvoccontainer.cpp.

◆ invalidateChildLessonEntries()

void KEduVocContainer::invalidateChildLessonEntries ( )
protected

Set the child entry cache to invalid.

Definition at line 257 of file keduvoccontainer.cpp.

◆ name()

QString KEduVocContainer::name ( )

get the container name

Definition at line 173 of file keduvoccontainer.cpp.

◆ operator=()

KEduVocContainer & KEduVocContainer::operator= ( const KEduVocContainer & other)

assignment operator

Definition at line 154 of file keduvoccontainer.cpp.

◆ operator==()

bool KEduVocContainer::operator== ( const KEduVocContainer & other) const

equality operator

Todo
make this return something useful

Definition at line 161 of file keduvoccontainer.cpp.

◆ parent()

KEduVocContainer * KEduVocContainer::parent ( )
virtual

Definition at line 212 of file keduvoccontainer.cpp.

◆ removeChildContainer()

void KEduVocContainer::removeChildContainer ( int row)

Definition at line 135 of file keduvoccontainer.cpp.

◆ removeTranslation()

void KEduVocContainer::removeTranslation ( int translation)

Removes a translation.

This has to be called when a language is removed from a document.

Parameters
translation

Definition at line 188 of file keduvoccontainer.cpp.

◆ resetGrades()

void KEduVocContainer::resetGrades ( int translation,
EnumEntriesRecursive recursive )

Remove grades from all entries of this lessons.

Parameters
translationwhich translation to remove. -1 for all.
recursivewhether to include child lessons

Definition at line 297 of file keduvoccontainer.cpp.

◆ row()

int KEduVocContainer::row ( ) const

Definition at line 146 of file keduvoccontainer.cpp.

◆ setContainerType()

void KEduVocContainer::setContainerType ( KEduVocContainer::EnumContainerType type)

Set the type of container.

For convenience by default this is taken over from the parent, so no need to set.

Parameters
typethe new type

Definition at line 217 of file keduvoccontainer.cpp.

◆ setImageUrl()

void KEduVocContainer::setImageUrl ( const QUrl & url)

set the image url for this container

Parameters
urlurl of the image

Definition at line 232 of file keduvoccontainer.cpp.

◆ setInPractice()

void KEduVocContainer::setInPractice ( bool inPractice)

Definition at line 183 of file keduvoccontainer.cpp.

◆ setName()

void KEduVocContainer::setName ( const QString & name)

set the container name

Parameters
nametext to set for the name

Definition at line 168 of file keduvoccontainer.cpp.

◆ updateChildLessonEntries()

void KEduVocContainer::updateChildLessonEntries ( )
protected

Recreate the cache of entries in this lesson's child lessons.

Definition at line 245 of file keduvoccontainer.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:49:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.