• 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
entryfilter.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
3  ***************************************************************************/
4 
5 /***************************************************************************
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  ***************************************************************************/
13 
14 #ifndef ENTRYFILTER_H
15 #define ENTRYFILTER_H
16 
17 #include "ui_entryfilter.h"
18 
19 #include <QtCore/QList>
20 #include <QtCore/QSet>
21 #include <prefs.h>
22 
23 class KEduVocText;
24 class KEduVocTranslation;
25 class KEduVocExpression;
26 class KEduVocDocument;
27 class KDialog;
28 class TestEntry;
29 
30 namespace Practice {
31 
32 class EntryFilter
33  :public QObject
34 {
35  Q_OBJECT
36 public:
37  EntryFilter(QObject * parent, KEduVocDocument *doc);
38 
43  QList<TestEntry*> entries();
44 
45 private:
51  void expireEntries();
52 
53  void lessonEntries();
54  void wordTypeEntries();
55 
56  bool isBlocked(const KEduVocText* const grade) const;
57  bool isConjugationBlocked(KEduVocTranslation* translation) const;
58  void blockedEntries();
59  void timesWrongEntries();
60  void timesPracticedEntries();
61  void minMaxGradeEntries();
62  void updateTotal();
63 
67  void cleanupInvalid();
68 
74  QList<TestEntry*> conjugationTestEntries(bool ignoreBlocked) const;
75 
76  static void randomizedInsert(QList<TestEntry*>& list, TestEntry* entry);
77 
78 private slots:
79  void checkBoxChanged(bool filter);
80 
81 private:
82  Ui::EntryFilter ui;
83 
84  QSet<KEduVocExpression*> m_entries;
85  QSet<KEduVocExpression*> m_entriesLesson;
86  QSet<KEduVocExpression*> m_entriesWordType;
87  QSet<KEduVocExpression*> m_entriesNotBlocked;
88  QSet<KEduVocExpression*> m_entriesTimesWrong;
89  QSet<KEduVocExpression*> m_entriesTimesPracticed;
90  QSet<KEduVocExpression*> m_entriesMinMaxGrade;
91  QSet<KEduVocExpression*> m_currentSelection;
92 
93  KEduVocDocument *m_doc;
94  int m_fromTranslation;
95  int m_toTranslation;
96  // The tenses selected by the user for practice
97  QStringList m_tenses;
98 
99  KDialog *m_dialog;
100 };
101 }
102 
103 #endif
104 
KDialog
prefs.h
QObject
Practice::EntryFilter
Definition: entryfilter.h:32
Practice::EntryFilter::entries
QList< TestEntry * > entries()
Returns the list of test entries after filtering out invalid entries according to the settings...
Definition: entryfilter.cpp:75
Practice::EntryFilter::EntryFilter
EntryFilter(QObject *parent, KEduVocDocument *doc)
Definition: entryfilter.cpp:32
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:05 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