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

parley

  • sources
  • kde-4.12
  • kdeedu
  • parley
  • src
  • practice
testentrymanager.h
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-2010 Frederik Gladhorn <gladhorn@kde.org>
5  ***************************************************************************/
6 
7 /***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef PRACTICETESTENTRYMANAGER_H
17 #define PRACTICETESTENTRYMANAGER_H
18 
19 #include "testentry.h"
20 #include "prefs.h"
21 
22 #include <keduvocexpression.h>
23 #include <KRandomSequence>
24 #include <QVector>
25 
26 class KEduVocDocument;
27 class PracticeDialog;
28 
29 namespace Practice {
30 
31 class TestEntryManager
32 {
33 public:
38  explicit TestEntryManager(QWidget *parent);
39 
40  void practiceStarted();
41  void practiceFinished();
42 
46  ~TestEntryManager();
47 
48  void setDocument(KEduVocDocument *doc);
49 
54  TestEntry* getNextEntry();
55 
60  int totalEntryCount();
61 
66  int activeEntryCount();
67 
71  void printStatistics();
72 
74  void removeCurrentEntryFromPractice();
75 
77  //void entryFinished(TestEntry* entry);
78 
79  int statisticTotalCorrectFirstAttempt();
80  int statisticTotalWrong();
81  int statisticTotalUnanswered();
82 
84  int totalTime();
85 
86  QStringList multipleChoiceAnswers(int numberChoices);
87 
91  QList<TestEntry*> allTestEntries() { return m_allTestEntries; }
92 
96  QList<TestEntry*> allUnansweredTestEntries();
97  QString currentConjugationTense();
98 
99 private:
104  void filterTestEntries();
105 
110  bool isValidMultipleChoiceAnswer(KEduVocExpression *e);
111 
112  void setLanguages(int from, int to);
113 
114  KEduVocDocument *m_doc;
115  QWidget *m_parent;
116  int m_fromTranslation;
117  int m_toTranslation;
118  int m_testType;
119 
121  QList<TestEntry*> m_allTestEntries;
123  QList<TestEntry*> m_notAskedTestEntries;
125  QList<TestEntry*> m_currentEntries;
126  int m_currentEntry;
127 
128  QTime m_time;
129  int m_totalTime;
130 
131  KRandomSequence m_randomSequence;
132 
133 friend class EntryFilter;
134 };
135 
136 }
137 
138 #endif // kvtquery_included
Practice::TestEntryManager::activeEntryCount
int activeEntryCount()
The number of entries that are still to be practiced.
Definition: testentrymanager.cpp:139
Practice::TestEntryManager::statisticTotalCorrectFirstAttempt
int statisticTotalCorrectFirstAttempt()
Finish the given entry.
Definition: testentrymanager.cpp:154
Practice::TestEntryManager::allTestEntries
QList< TestEntry * > allTestEntries()
Get a list of all entries in the test - used by the summary dialog.
Definition: testentrymanager.h:91
QWidget
prefs.h
Practice::TestEntryManager
Definition: testentrymanager.h:31
Practice::TestEntryManager::setDocument
void setDocument(KEduVocDocument *doc)
Definition: testentrymanager.cpp:50
testentry.h
Practice::TestEntryManager::getNextEntry
TestEntry * getNextEntry()
Get the next entry to show to the user.
Definition: testentrymanager.cpp:188
Practice::TestEntryManager::totalTime
int totalTime()
the time in seconds
Definition: testentrymanager.cpp:116
Practice::EntryFilter
Definition: entryfilter.h:32
Practice::TestEntryManager::multipleChoiceAnswers
QStringList multipleChoiceAnswers(int numberChoices)
Definition: testentrymanager.cpp:216
Practice::TestEntryManager::totalEntryCount
int totalEntryCount()
The number of entries in the practice.
Definition: testentrymanager.cpp:134
Practice::TestEntryManager::statisticTotalWrong
int statisticTotalWrong()
Definition: testentrymanager.cpp:165
Practice::TestEntryManager::allUnansweredTestEntries
QList< TestEntry * > allUnansweredTestEntries()
Get a list of all unanswered entries in the test.
Definition: testentrymanager.cpp:144
Practice::TestEntryManager::practiceFinished
void practiceFinished()
Definition: testentrymanager.cpp:128
Practice::TestEntryManager::~TestEntryManager
~TestEntryManager()
Default ctor.
Definition: testentrymanager.cpp:44
Practice::TestEntryManager::TestEntryManager
TestEntryManager(QWidget *parent)
Create a collection of entries to be practiced.
Definition: testentrymanager.cpp:34
Practice::TestEntryManager::practiceStarted
void practiceStarted()
Definition: testentrymanager.cpp:122
Practice::TestEntryManager::printStatistics
void printStatistics()
Puts some grades on the shell.
Definition: testentrymanager.cpp:105
Practice::TestEntryManager::removeCurrentEntryFromPractice
void removeCurrentEntryFromPractice()
Finish the currently active entry.
Definition: testentrymanager.cpp:98
Practice::TestEntryManager::statisticTotalUnanswered
int statisticTotalUnanswered()
Definition: testentrymanager.cpp:176
Practice::TestEntryManager::currentConjugationTense
QString currentConjugationTense()
TestEntry
Definition: testentry.h:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:06 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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