diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 (patch) | |
tree | d3bb9f5d25a2dc09ca81adecf39621d871534297 /klatin/klatin/klatinverbs.h | |
download | tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.tar.gz tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klatin/klatin/klatinverbs.h')
-rw-r--r-- | klatin/klatin/klatinverbs.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/klatin/klatin/klatinverbs.h b/klatin/klatin/klatinverbs.h new file mode 100644 index 00000000..b389102e --- /dev/null +++ b/klatin/klatin/klatinverbs.h @@ -0,0 +1,83 @@ +/*************************************************************************** + begin : Fri Aug 15 2003 + copyright : (C) 2001-2004 by George Wright + email : gwright@kde.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KLATINVERBS_H +#define KLATINVERBS_H + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <vector> + +#include "keduvocdata.h" +#include "klatinverbswidget.h" + +struct fileparts { + std::vector<QString> declension; + std::vector<const char*> mood; + std::vector<const char*> voice; +}; + +struct questionparts { + std::vector<const char*> person; + std::vector<const char*> number; + std::vector<const char*> tense; +}; + +/** @short Main class for testing verb forms */ +class KLatinVerbs : public KLatinVerbsWidget +{ + Q_OBJECT +public: + KLatinVerbs(QWidget* parent=0, const char *name=0); + ~KLatinVerbs(); + + /// Load next question + void nextQuestion(); + /// Update current scores + void updateScores(); +public slots: + /// Destroy the widget + void goBack(); + /// Called when the combobox is clicked + /** @param itemNumber is the index of the item selected */ + void conjugationActivated(int itemNumber); + /// Load the verb definitions database + void loadDatabase(); + /// Check the user's input + void checkAnswer(); +signals: + /// Signal that is emitted when the widget wishes to terminate + void exited(); + void statusMsg(const QString&); +private: + /// These are structs containing information required to generate a question + struct fileparts verbparts; + struct questionparts question; + /// String array for the various verbs + QString m_verb[36]; + QString m_currentVerb; + /// Number to reference the verb form given + int m_verbNumber; + /// Total number of wrong answers given + int m_numWrong; + /// Total number of answers given + int m_total; + /// Total number of correct answers given + int m_totalCorrect; +}; + +#endif // KLATINVERBS_H |