• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

parley

  • sources
  • kde-4.14
  • kdeedu
  • parley
  • src
  • practice
sessionmanagercontinuous.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de>
3  (C) 2005-2007 Peter Hedlund <peter.hedlund@kdemail.net>
4  (C) 2007-2009 Frederik Gladhorn <gladhorn@kde.org>
5  (C) 2014 Inge Wallin <inge@lysator.liu.se>
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #include "sessionmanagercontinuous.h"
18 
19 // Qt
20 #include <QDateTime>
21 
22 // kdelibs
23 #include <klocale.h>
24 #include <kconfig.h>
25 #include <KDebug>
26 #include <KMessageBox>
27 
28 // kdeedulibs
29 #include <keduvoclesson.h>
30 #include <keduvocexpression.h>
31 #include <keduvocdocument.h>
32 
33 // parley
34 #include "entryfilter.h"
35 #include <prefs.h>
36 
37 
38 using namespace Practice;
39 
40 SessionManagerContinuous::SessionManagerContinuous(QWidget* parent)
41  : SessionManagerBase(parent)
42 {
43 }
44 
45 SessionManagerContinuous::~SessionManagerContinuous()
46 {
47 }
48 
49 
50 void SessionManagerContinuous::setDocument(KEduVocDocument* doc)
51 {
52  SessionManagerBase::setDocument(doc);
53 }
54 
55 void SessionManagerContinuous::initializeTraining()
56 {
57  // Store all entries that will be used later.
58  m_notAskedTestEntries = m_allTestEntries;
59 
60  // Pick the first N entries into the active set. No particular prioritization is done.
61  for (int i = 0; i < qMin(m_notAskedTestEntries.count(), Prefs::testNumberOfEntries()); ++i) {
62  m_currentEntries.append(m_notAskedTestEntries.takeAt(0));
63  }
64 }
QWidget
Practice::SessionManagerContinuous::SessionManagerContinuous
SessionManagerContinuous(QWidget *parent)
Create a collection of entries to be practiced.
Definition: sessionmanagercontinuous.cpp:40
QList::takeAt
T takeAt(int i)
prefs.h
sessionmanagercontinuous.h
entryfilter.h
Prefs::testNumberOfEntries
static int testNumberOfEntries()
Get The number of entries that are practiced at the same time.
Definition: prefs.h:374
Practice::SessionManagerContinuous::~SessionManagerContinuous
virtual ~SessionManagerContinuous()
destructor
Definition: sessionmanagercontinuous.cpp:45
Practice::SessionManagerBase::m_currentEntries
QList< TestEntry * > m_currentEntries
The list of entries that are being asked.
Definition: sessionmanagerbase.h:167
QList::count
int count(const T &value) const
QList::append
void append(const T &value)
Practice::SessionManagerBase::m_notAskedTestEntries
QList< TestEntry * > m_notAskedTestEntries
All entries that have not been entered into the active set.
Definition: sessionmanagerbase.h:162
Practice::SessionManagerContinuous::initializeTraining
virtual void initializeTraining()
Initialize the lists of entries that will be used in the training from the full set of available entr...
Definition: sessionmanagercontinuous.cpp:55
Practice::SessionManagerBase::m_allTestEntries
QList< TestEntry * > m_allTestEntries
All entries available in the document that fulfill the requirements set in the configuration and the ...
Definition: sessionmanagerbase.h:159
Practice::SessionManagerContinuous::setDocument
void setDocument(KEduVocDocument *doc)
Prepare for practice using the entries in this document.
Definition: sessionmanagercontinuous.cpp:50
Practice::SessionManagerBase::setDocument
virtual void setDocument(KEduVocDocument *doc)
Prepare for practice using the entries in this document.
Definition: sessionmanagerbase.cpp:55
Practice::SessionManagerBase
Definition: sessionmanagerbase.h:40
QObject::parent
QObject * parent() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal